Re: extracting daily data

From: Hobbs, Will R (3244-CalTech) <William.R.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 31 2010 - 10:58:11 MDT

Debasish

There may be a more elegant solution, but the approach I use for this kind of problem is to use the ut_calendar function with the time coords, with option set to 0.

http://www.ncl.ucar.edu/Document/Functions/Built-in/ut_calendar.shtml

The 2nd dimension of the output array is 'month', so that you can just select dates with the months that you want (e.g. for spring and summer, you might want April-August, which is months 4:8)

If you don't have a Julian/Gregorian time coordinate index you will need to create one from scratch, but that shouldn't be too hard. If you get desperate a possible 'hack' would be to use time array for, say, an NCEP or CCSM3 file for the same date range.

Hope that helps

Will

On 8/31/10 8:51 AM, "Debasish" <debasish@sca.uqam.ca> wrote:

Hello!

I have daily data for 33 years (Mar, 1962-Dec, 1994) which include leap year too. The dimension of the variable is 11994 (306 days for 1962+ 11680 (32x365) for 1963-1994 + 8 days for leap years (1964, 1968, 1972,......,1992).

I would like to extract the daily data for spring and summer. The dimension of data for summer and spring should be

Value_spring (33,92) and Value_summer(33,92) where year = 33, days = 92

Is there any easier way to extract this data in NCL

Thanks

Debasish
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

**********************************************************
Will Hobbs, Ph.D. William.R.Hobbs@jpl.nasa.gov
Jet Propulsion Laboratory
4800 Oak Grove Dr. office: 300-324a
M/S 300-323 phone: (818) 354-0466
Pasadena, CA 91109 fax: (818) 354-0966
**********************************************************

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 31 10:58:27 2010

This archive was generated by hypermail 2.1.8 : Thu Sep 09 2010 - 05:56:39 MDT