<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">&lt;<a href="mailto:xi.chang01@gmail.com" target="_blank">xi.chang01@gmail.com</a>&gt;</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">&lt;<a href="mailto:xi.chang01@gmail.com" target="_blank">xi.chang01@gmail.com</a>&gt;</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&#39;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 = &quot;latitude&quot; ;</div><div><span style="white-space:pre-wrap">                </span>lat:units = &quot;degrees_north&quot; ;</div><div><span style="white-space:pre-wrap">        </span>float lon(lon) ;</div><div><span style="white-space:pre-wrap">                </span>lon:long_name = &quot;longitude&quot; ;</div><div><span style="white-space:pre-wrap">                </span>lon:units = &quot;degrees_east&quot; ;</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 = &quot;time&quot; ;</b></div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">                </span>time:units = &quot;days since 1765-01-01 00:00:00&quot; ;</b></div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">                </span>time:calendar = &quot;noleap&quot; ;</b></div><div><b style="background-color:rgb(255,153,0)"><span style="white-space:pre-wrap">                </span>time:bounds = &quot;time_bnds&quot; ;</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 = &quot;current date (YYYYMMDD)&quot; ;</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>