<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Michael,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I&#39;m hoping Dennis will weigh in here. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You really don&#39;t want to use the spherical harmonic routines on missing data. Normally I would say you need to regrid the data or use poisson_grid_fill first so you can get rid of missing values, but given that this is UV data, I don&#39;t think this is your best option. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Sep 2, 2014 at 5:16 AM, Michael Hemming <span dir="ltr">&lt;<a href="mailto:michael.hemming@mpimet.mpg.de" target="_blank">michael.hemming@mpimet.mpg.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div 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
                &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>
                load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>
                load
                &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>
                <br>
                begin<br>
                <br>
;##########################################################################<br>
;##########################################################################<br>
                ;-------------------------Barotropic
                Plots---------------------------------<br>
;--------------------------------------------------------------------------<br>
;##########################################################################<br>
;##########################################################################<br>
                <br>
                ;----------Load in data<br>
                <br>
                ;ICON<br>
                <br>
                noshupw             = addfile
                (&quot;<a href="http://con.ym.atlbox.noshift.100y.nc" target="_blank">con.ym.atlbox.noshift.100y.nc</a>&quot;, &quot;r&quot;)<br>
                u             = noshupw-&gt;u_vint_acc<br>
                u&amp;lon            = u&amp;lon-360     ; Fix the
                longitudes to be &lt; 360<br>
                lat             = noshupw-&gt;lat<br>
                <br>
                <br>
                v             = noshupw-&gt;v_acc<br>
                <br>
                 printVarSummary(u)<br>
                 printVarSummary(v)<br>
                <br>
                dimUV= dimsizes(barai)<br>
                <br>
                  klev = 20 <font color="FF0000">; number of levels in
                  total</font><br>
                <br>
                  sf = v(:,{klev},:,:)<br>
                  vp = v(:,{klev},:,:)<br>
                  sf@long_name = &quot;stream function&quot;<br>
                  vp@long_name = &quot;velocity potential&quot;<br>
                  sf@units = &quot;m^2/s&quot;<br>
                  vp@units = &quot;m^2/s&quot;<br>
                <br>
                  printVarSummary(sf)<br>
                  printVarSummary(vp) <br>
                <br>
                  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>
  </div>

<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>