sdfwrite and sdfattr

Steven C Chan scchan at ATMOS.UMD.EDU
Thu Feb 26 09:57:14 EST 2009

Hello everyone,

The version of Grads involved is 2.0a3.

I am trying out the new netCDF routines for Grads, and I am having some
issues with how units of time is generated when sdfwrite and inability
to manually corrected the problem using sdfattr.

When the first sdfwrite command is used like: sdfwrite precipitation. It
generates a new netCDF file with the variable precipitation with also
the time defined with it, but the units of time is always defined like
"minutes since dd-mm-yyyy hr:min".

It seemed Grads itself using sdfopen does not like time to be defined
that way; sdfopen likes "minutes since yyyy-mm-dd hr:min" (as correctly
stated in COARDS standard). When the incorrectly time unit defined .nc
file is opened with sdfopen, Grads will try to read it as yyyy-mm-dd.
For example:

"Minutes since 1-1-1948 00:00" as generated by sdfwrite will become:
01:01:19 00:00 with sdfopen (the 48 from 1948 is dropped as there is
obviously no day 1948 in any calender month.

Using sdfattr trying to override the units of time does not work; it
just simply will not allow me to do it.

Is this a known issue with sdfwrite / sdfattr?

Steven Chan

More information about the gradsusr mailing list