Re: Problems Using ut_calendar

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Mon, 20 Oct 2008 17:11:46 -0600

Katie,

Here is a calendar function that should do what you want. It
substitutes for ut_calendar, and is called with the same arguments.
  It supports several common CF calendars, including "no leap".
This code is somewhat vetted because my work group has used it for
several projects:

http://www.cdc.noaa.gov/people/dave.allured/data/lib/ncl/

The main function is calendar_decode2.ncl. There are a number of
restrictions when used with non-gregorian calendars; please see the
documentation header. Your program will need to load the two small
support functions in advance of the main function.

Also please note that Saji Hameed of APEC Climate Center, Korea,
published a calendar function about a year ago, that supported the
no leap calendar. For your reference, I have included a copy of
Saji's code in the same directory.

http://www.ncl.ucar.edu/Support/talk_archives/2007/1400.html

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/

Katie Holman wrote:
> I am looking at GCM data that has the time units in "days since
> 0000-01-01 00:00:00". The attribute time:calendar = "no leap" so I have
> been explicitly changing that attribute in the script to "standard"
> because the ut_calendar() doesn't support the "no leap" calendar type.
> I am sure the first day of the file is 01-01-1981 (by using the ncdump
> command and actually calculating it). When I use the ut_calendar
> function, the first output value says 09-06-1980. Since I know that the
> output isn't correct, do you have any suggestions of why this is
> happening? The second alternative is that I should be using a different
> function in NCL. There is another function called ut_convert ... should
> I be using this one perhaps? If neither is a good choice, is there
> something else I should be looking for on the website?
>
>
> Thank you,
> Katie Holman
> UW-Madison Grad Student
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 20 2008 - 17:11:46 MDT

This archive was generated by hypermail 2.2.0 : Sat Dec 20 2008 - 12:36:21 MST