Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

Re: time in netcdf

Daniel Packman (pack@acd.ucar.edu)
Wed, 24 Mar 1993 08:37:46 -0700

The issue of time has come up a couple of times in this forum.
We need to have millisecond resolution but be able to specify
a time period over many years. We use two separate variables,
one time_day holds the julian day (not the day of year) modified
from its astronomical definition to mean 0 hours, not 12. The
other integer holds the milliseconds of day. Definitely nonstandard.

Unix time (seconds since 1 Jan 1970) is convenient for many people,
but lacks resolution for our purposes. A double precision value
representing milliseconds from an arbitrary offset would probably
work for us, but we like the unambiguous storage/retrieval of
milliseconds without any modification.

The addition of a 64 bit integer would help in storage, but since
not all systems can deal with them, this would be awkward.

I suggested a generalized vector data type with specifiable bases.
Each "digit" (LONG) would hold values corresponding to its base.
This would allow storage of base 60 quantities like seconds or minutes
as well as base 24*3600*1000 quantities like milliseconds of a day.
This idea was found to impose too much overhead on compliant applications.

 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690