Although there are many different ways depending on the format of your
'time' coordinate variable, let's assume it's in a format that functions
such as "cd_calendar' can understand. (essentially a single number with a
units attribute containing the reference time). Finally, assuming your
dataset is a 3-D matrix 'x' with x(time,lat,lon):
julys = ind(cd_string(x&time,%n).eq."7")
x_subset = x(julys,:,:)
This should put all of the indices pertaining to dates in the month of July
into 'julys' and then pull the time indices that corresponded with these
indices into x_subset.
Kyle
----------------------------------------
Kyle S. Griffin
Department of Atmospheric and Oceanic Sciences
University of Wisconsin - Madison
1225 W Dayton St, Madison, WI 53706
Email: ksgriffin2@wisc.edu
On Mon, Feb 25, 2013 at 7:23 AM, broad sky <broadsky2008@gmail.com> wrote:
> Hi all,
>
> I have a monthly dataset, and I want to retrieve data say in July. How can
> I do it? Thank you for your input.
>
> Sky
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Feb 25 07:11:52 2013
This archive was generated by hypermail 2.1.8 : Thu Feb 28 2013 - 14:47:31 MST