-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Moderator
None yet
Moderator Status Review
Summary
This proposal aims to
-
clarify the concepts involved in time coordinates in CF, especially calendars;
-
introduce some restrictions on the use and format of time units and of time zone offsets in the reference datetime in the
unitsattribute of a time coordinate variable, in order to avoid confusion, mistakes and bugs in UDUNITS software; -
exclude dates before 1972 in the
utccalendar, when it came into force with its present definition; -
replace the
units_metadataleap_secondsconvention introduced in CF 1.12 with simpler recommendations for how to deal with leap seconds and which calendar to choose when writing new data.
Status Quo
Some of the changes introduced 4.4 in CF 1.12 have been disputed regarding clarity and accuracy. In discussion 400 a small group was convened to consider these concerns and propose changes to remedy the problems raised. In three intense meetings in the summer of 2025, during which everyone compromised on their positions, we made the decisions listed below as our detailed proposal. The intention of the present PR is to implement this proposal. Its precise wording has been worked on in previous PRs during the last two months by members of the group.
Associated pull request
Detailed Proposal
-
We need some explanation of the concepts in the conventions document, sufficient to understand the convention, but long discussion belongs better outside the conventions document.
-
We will stick with the CF 1.12 convention of using the single
calendarattribute to identify the treatment of the combination of timescales (for the annual cycle, the diurnal cycle, and any others which might be relevant) as a bundle. -
We propose that CF 1.13 disallow the use of time-zone offsets in the reference date-time of the
unitsof a time coordinate variable in theutcandtaicalendars. This is a backward-incompatible change (in the generous interpretation of principle 9 of Sect 1.2), but we don't think it matters because these calendars were newly introduced in CF 1.12 and they probably have not yet been used in archived data. In addition, we propose to disallow some of the formats supported by UDUNITS for time zone offsets because UDUNITS does not implement them correctly. -
In the other calendars (which all existed before CF 1.12) numeric time-zone offsets are allowed (as they always have been), but we propose recommending in CF 1.13 that time-zones should not be used. This is because it's easy to make mistakes with them, especially with the sign and in allowing for seasonal changes in clocks. (Principle 7 in Sect 1.2 is "The conventions should minimise the possibility for mistakes by data-writers and data-readers.") A time-zone offset is simply a number of hours to be added or subtracted when converting between time coordinates and date-times. Exactly the same can be achieved by modifying the time coordinates i.e. converting them to the zulu time-zone. Note that named time-zones e.g. GMT and MDT are never allowed. CF 1.12 says so in 4.4.1, but we could say it more strongly.
-
In CF 1.12, the
utccalendar can be used for date-times from 1958-1-1. We propose that it should be changed in CF 1.13 to start at 1972-1-1, when the present version of UTC began, including leap seconds. Again, this is a backward-incompatible change which we don't think matters. -
In CF 1.12, we already note that the units of day, minute and hour are defined as a fixed number of seconds, and that this means they don't correspond to the expected date-time differences when there is a leap second. We propose recommending in CF1.13 not to use the units of day, hour and minute in the
utccalendar, because it could cause mistakes and confusion. -
In CF 1.12, we introduced the
leap_secondskeyword tounits_metadata, to clarify thestandardcalendar. We propose that CF 1.13 should remove this feature. In CF 1.13 we would recommend that model data in the Gregorian calendar without leap seconds should set the calendar attribute toproleptic_gregorian, and we will clarify the definition of that calendar to say that it does not include leap seconds. This recommendation would replaceleap_seconds: nonewith thestandardcalendar in CF 1.12. It would be good if CMIP7 and CMOR could adopt this new recommendation straight away, for any models that are using the standard calendar at present. For real-world data written in thestandardcalendar, we would say that when time coordinates are converted to date-times, or time intervals calculated as differences between date-times, the result might be inaccurate by a number of seconds, because it is not known how the data-writer dealt with leap seconds; this is the meaning ofleap_seconds: unknownin CF 1.12.