From: Derrick Snowden (Derrick.Snowden AT XXXXXX)
Date: Wed Dec 17 2003 - 15:16:32 MST

Hi all,

I am hoping some guru out there has stumbled across this quirk before...

Regarding the ut_calendar function, I have a netcdf file with the time
units attribute defined as

time@units = "Days since 0000-1-1 00:00:00 -0.00"

These data were created in Matlab using the Matlab default function
datenum. This calendar function creates a serial date which is defined
exactly as above, at least that's what the documentation says. If I
generate a plot in ferret (another graphics package which deals with
netcdf files) I get what I'm looking for. That is the serial date
number (for example 731200.0000 corresponds to Dec 15, 2001) is
interpreted correctly and parsed into a string etc. In NCL I try

time = 731200.0
time@units = "Days since 0000-1-1 00:00:00 -0.00"

and get

(0,0) 2002
(0,1) 12
(0,2) 15
(0,3) 0
(0,4) 0
(0,5) 0

which is advanced by a year. The ncview utility, gives the same
interpretation as NCL, which I understand, is because they are both
based on udunits. The strange thing is that so is ferret. Any

I know there is a temporary work around by defining a new serial date
vector using greg2jul and jul2greg. However, I exchange files regularly
with ferret users. It would be problematic if we are constantly
distrustful of the date functions. Any ideas are appreciated...


Derrick Snowden				
PhOD/AOML/NOAA				Office: 305.361.4322
4301 Rickenbacker Causeway		Fax: 305.361.4392
Miami, FL 33149				Derrick.Snowden AT noaa.gov

_______________________________________________ ncl-talk mailing list ncl-talk AT ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk

This archive was generated by hypermail 2b29 : Sun Dec 21 2003 - 16:04:27 MST