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

Quirky issue: checker reports error when units is "years" even if not time #49

Closed
agstephens opened this issue Oct 16, 2018 · 1 comment · Fixed by #56
Closed

Quirky issue: checker reports error when units is "years" even if not time #49

agstephens opened this issue Oct 16, 2018 · 1 comment · Fixed by #56
Assignees
Labels
Milestone

Comments

@agstephens
Copy link
Member

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
Copy link

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" ;

RosalynHatcher added a commit that referenced this issue Feb 12, 2019
…re of the following:

 - axis attribute with value 'T'
 - units of reference time
 - standard_name attribute with value 'time' or 'forecast_reference_time' (#49)
@RosalynHatcher RosalynHatcher mentioned this issue Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants