<div dir="ltr">Hi Dickson,<div>If you want to remove the global mean value from each timestep at each grid point, you could do something like this:</div><div>;arr is a 3D array dimensioned time x lat x lon, with coordinate variables of the same name.</div><div>pi=4.*atan(1.0)<br>rad=(pi/180.)<br></div><div>coswgt=cos(rad*arr&lat)<br>coswgt!0 = "lat"<br>coswgt&lat= arr&lat<br></div><div>do ff = 0,dimsizes(arr&time)-1<br> arr(ff,:,:) = (/ arr(ff,:,:) - wgt_areaave(arr(ff,{-60:70},:),coswgt({-60.:60.}),1.0,0) /)<br>end do<br></div><div><br></div><div>Note that in the above I'm weighting the area by the cosine of the latitude. </div><div>Hope that helps!</div><div>Adam</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 4, 2019 at 9:31 PM Dennis Shea via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><pre>One approach:<br></pre><pre><br>;--- Global: only 60S-60N
sstGlb = f->SST(iStrt:iLast,{-60:60},:) ; read Global data (limit 60S to 60N)
printVarSummary(sstGlb)
sstGlbClm = clmMonTLL(sstGlb) ; climatology for clm period
printVarSummary(sstGlbClm)
sstGlbAnom= calcMonAnomTLL ( sstGlb , sstGlbClm ) ; anomalies at each grid point
printVarSummary(sstGlbAnom) ; from base climatology
</pre></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 4, 2019 at 8:00 PM dickson mbigi via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear concerned expert,<br></div><div>I am preparing a script to perfom decadal MAM EOF over Indian oceans using ERSSTV5 data set.</div><div>Steps prior to do EOF:</div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">1) Select the three months of March-May and do the seasonal mean;</div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">2) Do a 9-year running average (Lanczos filter)</div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">3) Do the linear regression on the global mean SST and keep the residual for latter EOF analysis (i.e. remove the global mean component at each grid point).</div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">I cannot figure out the third step on how to remove the global mean component at each grid point.</div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">Kindly I am writing to ask for any assistance or directive regarding the said concern.</div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px"><br></div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">Regards,</div><div style="color:rgb(29,34,40);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px">Dickson.</div><div><br></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>