Something like
f = addfile(...)
time = f->time
ymdh = cd_calendar(time,0) j
imo = ind(ymdh(:,1).eq.1) ; index (subscripts) for Januaries
a = f->precip(imo,:,:) ; read January data only
printVarSummary(a)
Read doc for
http://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml
http://www.ncl.ucar.edu/Document/Functions/Built-in/ind.shtml
Good Luck
On 09/15/2011 08:26 AM, Rashed Mahmood wrote:
> Hi all
> I want to define a variable that contain only one month time domains
> instead of 12 month time domains.
> For example, if I have monthly precipitation data from NCEP for 1980 to
> 2000, I would like to define a variable that contain only Januaries of
> all the data years.
> e.g. a=precip(Jans,:,:) , where Jans:
> Jan1980,Jan1981,Jan1982...Jan2000.
> This is something like we define for JJA,MAM, etc, in month_to_seasonal
> function, but this has three months mean for each year.
> Can anyone please suggest me how to do it?
> thanks
> Rashed
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Sep 15 09:23:03 2011
This archive was generated by hypermail 2.1.8 : Fri Sep 16 2011 - 11:24:25 MDT