<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'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'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'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"><<a href="mailto:michael.hemming@mpimet.mpg.de" target="_blank">michael.hemming@mpimet.mpg.de</a>></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
"$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 = addfile
("<a href="http://con.ym.atlbox.noshift.100y.nc" target="_blank">con.ym.atlbox.noshift.100y.nc</a>", "r")<br>
u = noshupw->u_vint_acc<br>
u&lon = u&lon-360 ; Fix the
longitudes to be < 360<br>
lat = noshupw->lat<br>
<br>
<br>
v = noshupw->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 = "stream function"<br>
vp@long_name = "velocity potential"<br>
sf@units = "m^2/s"<br>
vp@units = "m^2/s"<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>