Skip to content

Improvements to section 4.4 about time coordinates #613

@JonathanGregory

Description

@JonathanGregory

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 units attribute of a time coordinate variable, in order to avoid confusion, mistakes and bugs in UDUNITS software;

  • exclude dates before 1972 in the utc calendar, when it came into force with its present definition;

  • replace the units_metadata leap_seconds convention 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

#612

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 calendar attribute 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 units of a time coordinate variable in the utc and tai calendars. 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 utc calendar 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 utc calendar, because it could cause mistakes and confusion.

  • In CF 1.12, we introduced the leap_seconds keyword to units_metadata, to clarify the standard calendar. 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 to proleptic_gregorian, and we will clarify the definition of that calendar to say that it does not include leap seconds. This recommendation would replace leap_seconds: none with the standard calendar 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 the standard calendar, 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 of leap_seconds: unknown in CF 1.12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CF1.13?We might conclude this issue in time for CF1.13enhancementProposals to add new capabilities, improve existing ones in the conventions, improve style or format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions