CF: time variable incorrectly identified as non-standard calendar
mhidas opened this issue · 1 comments
Version of compliance checker running: 5.0.2 (does not occur in 5.0.0)
Describe the checker this affects: CF (all versions)
Attach a minimal CDL or NetCDF file which is able to reproduce the issue
https://s3-ap-southeast-2.amazonaws.com/imos-data/IMOS/SRS/SST/ghrsst/L4/GAMSSA/2022/20221119120000-ABOM-L4_GHRSST-SSTfnd-GAMSSA_28km-GLOB-v02.0-fv01.0.nc
The time
variable has the following key attributes:
int time(time) ;
time:standard_name = "time" ;
time:axis = "T" ;
time:units = "seconds since 1981-01-01 00:00:00" ;
time:calendar = "Standard" ;
To Reproduce:
$ compliance-checker -t cf:1.6 ../NetCDF/20221119120000-ABOM-L4_GHRSST-SSTfnd-GAMSSA_28km-GLOB-v02.0-fv01.0.nc
Describe the issue below:
The output includes
Errors
--------------------------------------------------------------------------------
§4.4 Time Coordinate
* For nonstandard calendar on variable time, attribute month_lengths must be supplied as a 12-element integer array
However, this variable does use the standard calendar, so does not require a month_lengths
attribute.
The only reason this is not correctly identified is that the value of the calendar
attribute in this file begins with a capital letter, while the code checks this attribute in a case-sensitive way.
The CF conventions document doesn't mention case-sensitivity of the calendar
attribute. However, the Conformance Requirements and Recommendations says:
The standardized values of the calendar attribute are gregorian, standard, proleptic_gregorian, noleap, 365_day, all_leap, 366_day, 360_day, julian, and none (case insensitive).
Fixed by #987.