<div dir="ltr"><div>If you only have 12 values and they are Jan, Feb,...,Dec and it is a climatology<br></div><div><br></div><div> iDJF = (/1,2,11/)</div><div> xDJF = dim_avg_n(x(iDJF). 0) ; x[*]<br></div><div><br></div><div>If it is not a climatology<br></div><div><br></div><div dir="ltr"><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/month_to_season.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/month_to_season.shtml</a><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 18, 2018 at 9:55 AM Sri Nandini <<a href="mailto:snandini@marum.de">snandini@marum.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div>Hello</div><div><br></div><div>I have been trying to get winter
climatology from my data by selecting specific months of Dec, Jan, Feb
using NCL coordinate subscripting; however it is not working and i am
hopfull someone could point me in the right direction?I can extract Jan
and Feb but no Dec month.<br></div><div><br></div><div>I have also tried using indices without success.<br></div><div><br></div><div>Heres the code:</div><div><br></div><div> time=f->time<br> print(time) <br></div><div><br> TIME = time({136358.5:136386.5}) ; coordinate subscripting<br> print(TIME) <br> <br> do nmo=0,11,1 ; loop over the months<br><br> EGR(i) = egr(nmo,:,:,:)<br> printVarSummary(EGR) <br><br> end do</div></div><div><br></div><div><br></div><div>Variable: time</div>Type: double<br>Total Size: 96 bytes<br> 12 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 12]<br>Coordinates: <br> time: [136358.5..136692.5]<br>Number Of Attributes: 5<br> long_name : time<br> units : days since 0001-01-01 00:00:00<br> calendar : noleap<br> bounds : time_bnds<br> cell_methods : time: mean<br>(0) 136358.5<br>(1) 136386.5<br>(2) 136417.5<br>(3) 136447.5<br>(4) 136478.5<br>(5) 136508.5<br>(6) 136539.5<br>(7) 136570.5<br>(8) 136600.5<br>(9) 136631.5<br>(10) 136661.5<br>(11) 136692.5<br><br><br>Variable: TIME<br>Type: double<br>Total Size: 16 bytes<br> 2 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [time | 2]<br>Coordinates: <br> time: [136358.5..136386.5]<br>Number Of Attributes: 5<br> cell_methods : time: mean<br> bounds : time_bnds<br> calendar : noleap<br> units : days since 0001-01-01 00:00:00<br> long_name : time<br>(0) 136358.5<br>(1) 136386.5<br>fatal:Undefined identifier: (EGR) is undefined, can't continue<br><br><br>Would be grateful<br><br></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><br>
</blockquote></div>