Quirky issue: checker reports error when units is "years" even if not time
Closed this issue · 1 comments
agstephens commented
I have a file which includes a coordinate variable called return_period
which happens to have the units of years
. The file also contains a valid time
coordinate variable. When I run the checker it tells me that there is an error in the definition of my return_period
coord variable because it is interpreting it as a time variable.
The error is:
------------------
Checking variable: return_period
------------------
WARN: (4.4.1): Use of the calendar and/or month_lengths attributes is recommended for time coordinate variables
ERROR: (4.4): Invalid units and/or reference time
The relevant snippet from the file looks like:
float stillWaterReturnLevel(time, return_period, percentile, latitude, longitude) ;
stillWaterReturnLevel:_FillValue = 1.e+20f ;
stillWaterReturnLevel:units = "m" ;
double time(time) ;
time:axis = "T" ;
time:units = "days since 2006-1-1 00:00:00" ;
time:standard_name = "time" ;
time:long_name = "Time" ;
time:calendar = "360_day" ;
double return_period(return_period) ;
return_period:units = "years" ;
return_period:long_name = "return_period" ;
I wonder if we should provide a way of telling the checker: "do not interpret this variable as a time variable". Otherwise, I'm not sure how to cope with this issue.
alexamici commented
This happens also for other time units
, for example:
double step(step) ;
step:long_name = "time since forecast_reference_time" ;
step:standard_name = "forecast_period" ;
step:units = "hours" ;