@ChrisBarker-NOAA @martinjuckes 
For the moment, let's set aside the question of names for the calendars.

There is nothing at all wrong with specifying that the epoch time stamp in the 
**`units`** attribute always be a correct UTC time stamp. In fact, allowing the 
epoch time stamp to be from a TAI or UTC clock will increase the chances that 
the data will be handled incorrectly. If you are sophisticated enough to care 
about TAI, you will have no problem dealing with a UTC time stamp.

I am explicitly assuming that all UTC time stamps are correct and accurate at 
the times they were acquired or constructed. If you are getting your time stamp 
from a PC that isn't actively synced by a time server, you shouldn't bother to 
use either of these new calendars.

When you read time out of a GPS unit, you can get a count of seconds since the 
GPS epoch, and I believe you can get a GPS time stamp that doesn't contain leap 
seconds (like TAI time stamps, but with a fixed offset from TAI), but most 
people get a UTC time stamp. The GPS messages carry the current leap second 
count and receivers apply it by default when generating time stamps. That's 
something I learned about from Aaron Sweeney a year or two ago - well after the 
big discussion we had about all of this a few years back.

There are quite a lot of high-precision data acquisition platforms out there 
that start with accurate UTC time stamps obtained from GPS receivers. Many of 
them don't care about metricity. They just want their time stamps, but CF tells 
them that they must store time as elapsed time since an epoch.

There's not really such thing as an elapsed time that is **UTC** vs **TAI**. At 
core, true elapsed time - a count of SI seconds since an event - is the same 
for both. The UTC *time stamp* for that event may not be identical to the TAI 
*time stamp* for that same event, but they both reference the same event, and 
the elapsed time since that event is the same no matter which time system you 
are using.

The UTC time system provides a prescription in terms of leap seconds for how to 
keep UTC *time stamps* synchronized with the rotation of the earth. Just like 
the Gregorian calendar system provides a prescription in terms of leap days for 
how to keep date stamps synchronized with the orbit of the earth. The only 
difference - and it is an admittedly important one - is that the UTC leap 
second prescription does not follow a fixed formula like the Gregorian leap day 
prescription does. The UTC time system declares that the time stamp 
**`1958-01-01 00:00:00`** references the same time as the matching TAI time 
stamp. The TAI time system provides no prescription for keeping TAI *time 
stamps* synchronized with the rotation of the earth.

Time stamps - whether UTC, TAI, GPS, or something else - are, in essence, a 
convenience for humans. No matter what time system or calendar system you use, 
the number of seconds or days that has elapsed since any given date and time is 
the same.

In a perfect world, all data producers would use a leap-second-aware function 
to turn their lists of time stamps into elapsed time values and all time 
variables would be "perfect". That would also force all users of those time 
variables to use a leap-second-aware function to turn the elapsed time values 
into time stamps. But that's not the world we live in. Does naive conversion of 
UTC time stamps into elapsed times have the potential to produce non-monotonic 
time coordinate variables that violate the CF conventions? Yes. Does it cause 
any real problems (for the vast majority of cases and instances of time) if 
people use this "broken" method for encoding and decoding their time stamps? No.

At the end of the day, it doesn't matter much what process you used to create 
your elapsed time values. *For the small number cases where differences of 1 - 
37 seconds matter*, we are trying to make a way for data producers to signal to 
data users how they should handle the values in their time variables while 
staying within the existing CF time framework and acknowledging CF and world 
history regarding the way we deal with time (which isn't very consistent and is 
composed of successive corrective overlays over centuries).

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/cf-convention/cf-conventions/issues/148#issuecomment-434732069

Reply via email to