Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CF Conformance: 4.4 Time Coordinate #947

Closed
5 tasks done
jamesdoyle21 opened this issue Oct 3, 2022 · 4 comments
Closed
5 tasks done

Improve CF Conformance: 4.4 Time Coordinate #947

jamesdoyle21 opened this issue Oct 3, 2022 · 4 comments

Comments

@jamesdoyle21
Copy link

jamesdoyle21 commented Oct 3, 2022

4.4 Time Coordinate
Requirements:

  • The time units of a time coordinate variable must contain a reference date/time.

  • The reference date/time of a time coordinate variable must be a legal date/time in the specified calendar.

  • The reference date/time in time units is not allowed to contain seconds equal to or greater than 60.

Note can't fine a check for the above mentioned requirement.

Recommendations:

  • The use of time coordinates in year 0 and reference date/times in year 0 to indicate climatological time is deprecated.

  • Units of year and month and any equivalent units should be used with caution.

under TODO: year zero climatological time warning

@benjwadams
Copy link
Contributor

benjwadams commented Apr 18, 2023

@ocefpaf, do you know where the format for reference times is documented? I occasionally have seen reference times such as "seconds since 2009-8-1 08:5:6" used, and indeed, cftime will parse these, but they are not ISO 8601 compliant. I'm going to make a best guess based upon what I think it expects unless I can find something in source code or documentation.

@ocefpaf
Copy link
Member

ocefpaf commented Apr 18, 2023

@ocefpaf, do you know where the format for reference times is documented?

I'm not sure if there is a clear documentation on the best practice for the reference time. You probably already found this in the udunits2 but let me post it here to help our discussion:

https://github.com/Unidata/UDUNITS-2/blob/c83da987387db1174cd2266b73dd5dd556f4476b/lib/udunits2lib.texi#L1554-L1564

When you throw in the mix the paleo and climate calendars that are support by CF it makes this even harder to check.

I don't know what CC does at the moment but maybe checking for consistency of the metadata should be a second part of the implementation and the first would we could focus on checking the individual metadata. For example,

double time(time) ;
  time:long_name = "time" ;
  time:units = "days since 1-1-1 0:0:0" ;
  time:calendar = "126 kyr B.P." ;
  time:month_lengths = 34, 31, 32, 30, 29, 27, 28, 28, 28, 32, 32, 34 ;

is valid. If I change the calendar to Gregorian, that is wrong. But should CC catch that? Or CC should just report that all the individual fields are correct? Without warning on their consistency. (Does that make sense?)

@benjwadams
Copy link
Contributor

I don't see that CF provides guidance on month lengths being present when a standard calendar is used, despite these calendars having a more or less fixed month length, leap years notwithstanding.

@benjwadams
Copy link
Contributor

Closed by #1014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants