<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <small><big>Hello,<br>
        <br>
        I have been struggling to calculate Barotropic streamfunction
        and AMOC using online examples and function but I have recently
        been told it is due to the fact that the data I use contains
        missing values, therefore all values are set to the missing
        value. <br>
        <br>
        How can I somehow ignore the missing values during calculation?<br>
        <br>
        Here is my code for the bartropic streamfunction:</big><br>
      <br>
----------------------------------------------------------------------------------------------------------------------------------------------------<br>
      <br>
      <small><font size="4"><small><small><font color="FF0000">load
                "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
                load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>
                load
                "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>
                <br>
                begin<br>
                <br>
;##########################################################################<br>
;##########################################################################<br>
                ;-------------------------Barotropic
                Plots---------------------------------<br>
;--------------------------------------------------------------------------<br>
;##########################################################################<br>
;##########################################################################<br>
                <br>
                ;----------Load in data<br>
                <br>
                ;ICON<br>
                <br>
                noshupw&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; = addfile
                ("con.ym.atlbox.noshift.100y.nc", "r")<br>
                u&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; = noshupw-&gt;u_vint_acc<br>
                u&amp;lon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = u&amp;lon-360&nbsp;&nbsp;&nbsp;&nbsp; ; Fix the
                longitudes to be &lt; 360<br>
                lat&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; = noshupw-&gt;lat<br>
                <br>
                <br>
                v&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; = noshupw-&gt;v_acc<br>
                <br>
                &nbsp;printVarSummary(u)<br>
                &nbsp;printVarSummary(v)<br>
                <br>
                dimUV= dimsizes(barai)<br>
                <br>
                &nbsp; klev = 20 <font color="FF0000">; number of levels in
                  total</font><br>
                <br>
                &nbsp; sf = v(:,{klev},:,:)<br>
                &nbsp; vp = v(:,{klev},:,:)<br>
                &nbsp; sf@long_name = "stream function"<br>
                &nbsp; vp@long_name = "velocity potential"<br>
                &nbsp; sf@units = "m^2/s"<br>
                &nbsp; vp@units = "m^2/s"<br>
                <br>
                &nbsp; printVarSummary(sf)<br>
                &nbsp; printVarSummary(vp) <br>
                <br>
                &nbsp; uv2sfvpg(u,v,sf,vp)</font></small></small></font></small><br>
    </small><br>
    <small><br>
----------------------------------------------------------------------------------------------------------------------------------------------------<br>
      <br>
      <big><big><small>and my AMOC code is largely based on the online
            example moc_1.ncl<br>
            <br>
            <br>
            <br>
            thanks,<br>
            Michael</small><br>
        </big></big><br>
    </small><br>
  </body>
</html>