2012 Unidata NetCDF Workshop > Best Practices for Data providers
20.7 Calendar Date and Time
Represent calendar dates and times with standards and conventions.
Two conventions for storing a date/time into a netCDF variable are:
- CF-compliant: as a numeric value with a udunits time unit, such as
"seconds since 1992-10-8 15:00:00"
- ISO-compliant: as a string using ISO
8601 encoding, such as "2010-10-25T12:00:00Z".
The ncdump "-t" option displays CF-compliant times in
human readable form, close to ISO-8601, e.g. "2010-10-25 12",
respecting CF climate calendar attributes, if specified.
Recommendations
- If your data uses real, physical time, encode it as an interval
from a reference time,
and add a udunits-compatible time unit. Readers
can use the udunits package to manipulate or format the date values.
2012 Unidata NetCDF Workshop > Best Practices for Data providers