What is the difference between calendars standard
/leap_seconds:none
and tai
in CF 1.12
#413
Replies: 6 comments 3 replies
-
Dear @Alexander-Barth Thanks for the question. You're right that dates before 1958-1-1 should give errors with Best wishes Jonathan |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply :-) For example, users of the julia package CFTime.jl can compare and convert dates in different calendars: using CFTime
DateTimeStandard(2000,4,24) == DateTimeJulian(2000,4,11)
# output: true
convert(DateTimeJulian, DateTimeStandard(2000,4,24))
# output: DateTimeJulian(2000-04-11T00:00:00) I would like to give the users the ability to do that with the I am wondering if it is really appropriate, to consider data as likely UTC (with leap_seconds included), if, for example, the data provider is explicit that leap seconds are not accounted for ( Or a related question: if UTC/TAI are the only real-world timelines (only applicable after 1958-01-01), how would I encode the (real) moment that predates 1958-01-01 by 1 SI second if the calendars Thanks a lot for your insights and clarification! |
Beta Was this translation helpful? Give feedback.
-
Dear @Alexander-Barth These are good questions too! They will help us clarify the text, at least, and I ought to have been clearer in my first answers. The essential reason for introducing To use the example in Fig 4.1, if the Thus, the CF metadata tells you how to decode the date-times and how to calculate time-intervals between date-times, but it does not indicate whether the date-times in the This isn't different in principle from more serious distortions that are commonly applied to the timeline of climate models. Many models do not use the Gregorian calendar exactly; instead, they omit leap days. In that case, an exact comparison of observed data for 29 February 2016 with the simulation is clearly impossible, but a time-mean for February 2016 can reasonably be compared, since one day doesn't make an important difference for many purposes. However, this is a judgement for the data-user to make. You write
Yes, I agree. Conversion between
When I said that Does that help? Best wishes Jonathan |
Beta Was this translation helpful? Give feedback.
-
Dear Alexander, I am not sure that Jonathan’s assertion that the The IMHO, the definition of the The
Clear. Followed by:
Huh? First we are told to use the So talking from one CFtime (R) developer to another CFTime (jl) developer: (1) ignore the Please note that the current definition of both calendars is being discussed (issue #400) and there may be changes coming. |
Beta Was this translation helpful? Give feedback.
-
I think the key point is that the standard calendar is an ugly, poorly defined mess. We shouldn't pretend it's anything else. It's a legacy result of incomplete software. What it is is defined by how it is (was) used: Time-stamps (day, month, year, time) are encoded/decoded to/from the time axis (timedelta since ...) using the Gregorian calendar with no leap seconds. That's it -- that's all we know. a few CF versions ago. The problem is that with only that, we don't know what exactly the data mean: A) The time axis could have been the primary source -- e.g. for model results. If (B) -- the timestamps may or may not have had leap-seconds included. That's simply the legacy facts. What we do know: For (A): If you decode the time axis using software that doesn't include leap seconds, you will get timestamps that don't include leap seconds, and if you compare those results to proper UTC time, you may be off by up to 37 (I think) seconds -- for model results, that probably doesn't matter -- certainly no one has cared in the past. For (B): If you decode the time axis using software that doesn't include leap seconds, you will get timestamps that match the timestamps originally started with. - the limitation here is that it is impossible to encode timestamps that include an actual leap second (i.e. a 60th second). But what you don't know is whether the original timestamps did or did not include leap seconds. So that's where we were a couple CF versions ago. To address the uncertainty about leap seconds in the standard calendar:
were introduced -- now users could know what the original timestamps contained. NOTE: some of us suggested that we introduce a new calendar name for: "leap_seconds: utc", but given all the legacy data, it was decided to handle it this way -- old datasets, and old software that didn't know about units_metadata would retain the same old ambiguous definition. Anyway .... Back to the original question:
I think for practical purposes -- the answer is: there is no difference. The For new datasets, I'd simply use tai is you know it's tai. A reason to use 'standard' would be if you want older software that isn't aware of tai to still work. (note: there's a downside there -- I don't know if the tai calendar has made its way into downstream tools yet...) However, Now -- how to get this all into the CF doc clearly ----. NOTE:
Patrick wrote:
Well, this is a problem -- because, of course, while using the utc calendar is the correct thing to do:
-CHB |
Beta Was this translation helpful? Give feedback.
-
I agree with Chris's comments except that I would say there is a practical difference between Dates before 1958-1-1 should give errors with The difference between them is that date-times in the When the That is why Although we haven't discussed it (because no use-case has made it relevant), the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
I am considering to add support for the new calendar types to the julia package CFTime.jl. I am wondering what would be the difference between a time variable using the calendar
standard
(orproleptic_gregorian
) withleap_seconds: none
asunits_metadata
and the calendartai
which is also Gregorian and without leap seconds.In example 4.1, both represent
2017-1-1 0:0:0 because no leap seconds in the timeline
:As far as I can see, a validator should return an error or warning if dates prior to 1958-01-01 are used for
tai
. But are there other differences (for the purpose of computing durations between time instances, adding duration to time instances, computing year, month, day, hour... from time instances) ?Beta Was this translation helpful? Give feedback.
All reactions