⇐ ⇒

[CF-metadata] Representing Matlab time in a CF-Metadata compliant file

From: Seth McGinnis <mcginnis>
Date: Wed, 26 Aug 2009 16:30:36 -0600

I believe you can do this by specifying the time coordinate variable's
"calendar"
attribute as "proleptic_gregorian" and keeping the reference date as-is.

The udunits calendar, which is the default, is the standard mixed
Julian/Gregorian
calendar, but section 4.4.1 of the CF spec lists other legal choices. The
proleptic
Gregorian calendar extends dates regularly backwards past the year 1582, and
the ISO 8601 version of it does have a year zero. This is what's used in a lot
of
software, and appears to be how Matlab is storing dates.

(Note that arguably you could be using some other proleptic Gregorian calendar
and still be CF, but I think it's fair to assume that ISO 8601 is what's
meant.)

----
Seth McGinnis
NARCCAP Data Manager
Associate Scientist
ISSE / NCAR
----
>Godin, Michael wrote:
> I'd like to convert some files from Matlab to NetCDF formats with as little
>modification of the data as possible. 
>
> I am running into some ambiguity with dates formatted according to the
>Matlab convention where 1.0 == Jan 1, 0000.  Since Matlab assumes a year "0",
>and UDUnits does not, should the time units for Matlab dates be "days since
>-0002-12-31"?  While it seems correct, I haven't seen anyone else use such
>units.
>
>> Thanks, Mike
>
> _____________________________________________
> Michael A. Godin
> Software Engineer
> Monterey Bay Aquarium Research Institute
> Phone: 831-775-2063  http://www.mbari.org
> _______________________________________________
> CF-metadata mailing list
> CF-metadata at cgd.ucar.edu
> http://mailman.cgd.ucar.edu/mailman/listinfo/cf-metadata
Received on Wed Aug 26 2009 - 16:30:36 BST

This archive was generated by hypermail 2.3.0 : Tue Sep 13 2022 - 23:02:41 BST

⇐ ⇒