Previous: Strings and Character Variables Next: Packed Data Values Table of contents Frames 2010 Unidata NetCDF Workshop > Best Practices

7.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:

  1. ISO-compliant: as a string using ISO 8601 encoding, such as "2010-10-25T12:00:00Z".
  2. CF-compliant: as a numeric value and unit that includes the reference data and time, such as 2116800 "seconds since 2010-10-01 00:00:00".

Unidata's udunits package provides a convenient way to implement the second strategy, and the "-t" option to ncdump displays resulting times in human readable form, close to ISO-8601, e.g. "2010-10-25 12".

Recommendations

 


Previous: Strings and Character Variables Next: Packed Data Values Table of contents Frames 2010 Unidata NetCDF Workshop > Best Practices