<div dir="ltr"><div><div>Another alternative <br></div><div><br>TIME = cd_calendar(time, 0)<br></div> i2010 = ind(TIME(:,0).eq.2010)<br><br></div> x2010= x(i2010,...)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 13, 2014 at 2:07 PM, Xi Chang <span dir="ltr"><<a href="mailto:xi.chang01@gmail.com" target="_blank">xi.chang01@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">sorry, I solved it.<div><br></div><div><div>iStrt = ind(ymd.eq.ymdStrt) ; index start</div><div>iLast = ind(ymd.eq.ymdLast) ; index last</div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 13, 2014 at 7:14 PM, Xi Chang <span dir="ltr"><<a href="mailto:xi.chang01@gmail.com" target="_blank">xi.chang01@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hallo NCL, <div><br></div><div>I have a very simple question regaring my CAM output.</div><div>I'd like to extract data only for year 2010 (for instance) from the data which has</div><div>time dimension as follows:</div><div><br></div><div><div><span style="white-space:pre-wrap">        </span>lat = 96 ;</div><div><span style="white-space:pre-wrap">        </span>lon = 144 ;</div><div><span style="white-space:pre-wrap">        </span>time = UNLIMITED ; // (8833 currently)</div><div>variables:</div><div><span style="white-space:pre-wrap">        </span>float lat(lat) ;</div><div><span style="white-space:pre-wrap">                </span>lat:long_name = "latitude" ;</div><div><span style="white-space:pre-wrap">                </span>lat:units = "degrees_north" ;</div><div><span style="white-space:pre-wrap">        </span>float lon(lon) ;</div><div><span style="white-space:pre-wrap">                </span>lon:long_name = "longitude" ;</div><div><span style="white-space:pre-wrap">                </span>lon:units = "degrees_east" ;</div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">        </span>float time(time) ;</b></div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">                </span>time:long_name = "time" ;</b></div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">                </span>time:units = "days since 1765-01-01 00:00:00" ;</b></div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">                </span>time:calendar = "noleap" ;</b></div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">                </span>time:bounds = "time_bnds" ;</b></div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">        </span>int date(time) ;</b></div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">                </span>date:long_name = "current date (YYYYMMDD)" ;</b></div><div><b><br></b></div><div>Any solution how to do that?</div><div>Thank you</div><span><font color="#888888"><div><br></div><div>Chang.</div><div><br></div></font></span></div></div>
</blockquote></div></div>
</div></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></div>