⇐ ⇒

[CF-metadata] Two-variable integer Time in CF?

From: Rich Signell <rsignell>
Date: Thu, 1 Nov 2007 15:04:13 -0400

CF-folk,

I'd like to find out what the community thinks of adding a
two-variable integer representation as an acceptable way of
representing time in CF.

In our Marine Time Series database at the USGS here in Woods Hole, we
have always represented "time" with two integer variables: one
integer variable to represent the days from a time origin that starts
at midnight, one integer variable to represent the number of
milliseconds since midnight:

netcdf 2651-A1H {
dimensions:
        time = 1726 ;
        depth = 1 ;
        lat = 1 ;
        lon = 1 ;
variables:
        int time(time) ;
                time:units = "days since 1968-05-23 00:00 UTC" ;
                time:aux_time = "time2";
         int time2(time) ;
                time2:units = "milliseconds since 00:00 UTC" ;

So a floating point time would be constructed as:
time_float = time + time2/1000/3600/24

There are at least two advantages to this format over the standard
float or double representation with a single variable:

- you can use integer arithmetic on time, avoiding round off problems
where you get 23:59:59 instead of 00:00:00.

- you can have millisecond precision over millennia, so you can do
things like paleo earthquake simulations.

I was speaking yesterday with David Stuebe from the FVCOM modeling
group, and then use the same two-integer representation for their
unstructured mesh model results. They also include a floating point
time representation so that CF-compliant tools will work.

If nobody thinks this is a bad idea, we can go ahead with a proposal
on the Conventions Wiki, along with demonstration files and examples
of how it could be used, following the CF standards process.

-Rich

-- 
Dr. Richard P. Signell   (508) 457-2229
USGS, 384 Woods Hole Rd.
Woods Hole, MA 02543-1598
Received on Thu Nov 01 2007 - 13:04:13 GMT

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

⇐ ⇒