<div dir="ltr">[1] Set the lat/lon area bounds<br><div><pre> latS =
latN =
lonL =
lonR = <br><br></pre><pre> f = addfile(...)<br></pre><pre> X = f->data(:,{latS:latN},{lonL:lonR})<br><br> <br>; =================================================================
; create weights: sqrt(cos(lat)) [or sqrt(gw) ]
; =================================================================
rad = 4.*atan(1.)/180.
clat = X&lat
clat = sqrt( cos(rad*clat) ) ; gw for gaussian grid
; =================================================================
; weight all observations
; =================================================================
wX = X ; copy meta data
wX = X*conform(X, clat, 1)
wX@long_name = "Wgt: "+x@long_name
; =================================================================
; Reorder (lat,lon,time) the *weighted* input data
; Access the area of interest via coordinate subscripting
; =================================================================
x = wX(lat|:,lon:,time|:)
eof = eofunc_Wrap(x, neof, optEOF)
eof_ts = eofunc_ts_Wrap (x, eof, optETS)
printVarSummary( eof ) ; examine EOF variables
printVarSummary( eof_ts )
</pre>=========<br><br>[2]<br></div><div>Use [1] to subset the region but then use a shape file that contains India. See <a href="http://test.www.ncl.ucar.edu/Applications/shapefiles.shtml">http://test.www.ncl.ucar.edu/Applications/shapefiles.shtml</a> Example 8 <br><br></div><div>Then use <br><a href="http://test.www.ncl.ucar.edu/Document/Functions/Built-in/gc_inout.shtml">http://test.www.ncl.ucar.edu/Document/Functions/Built-in/gc_inout.shtml</a><br></div><div>as the basis for masking . Then do the EOFs<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 9, 2016 at 2:40 AM, Abdoulaye SY <span dir="ltr"><<a href="mailto:sy.abdoulaye3@ugb.edu.sn" target="_blank">sy.abdoulaye3@ugb.edu.sn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><span lang="en"><span>Hello, I have</span><span> daily dataset</span> <span>(<b>data(time|366,lat|180,lon|360)</b>) and I want to</span> <span>mask</span> <span>all areas</span> <span>except</span>, <span>for example</span>, <span>India</span> <span>and to</span> <span>calculate</span> <span>EOFs </span></span><span lang="en">there.<br></span></div><span lang="en">Thanks<br></span></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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><br>
<br></blockquote></div><br></div>