You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cf-checker crashes when checking what looks like a CF-compliant file (maybe with some quirks). Even if there is an obvious error that nevertheless escapes us, the checker should not crash. Below follows 1) output from ncdump -h 2) error output when using the Reading online tool 3) error output from running cf-checker locally installed.
Output of CF-Checker follows...
CHECKING NetCDF FILE: /tmp/24345.nc
=====================
Using CF Checker Version 3.1.1
Checking against CF Version CF-1.6
Using Standard Name Table Version 77 (2021-01-19T13:38:50Z)
Using Area Type Table Version 10 (23 June 2020)
Using Standardized Region Name Table Version 4 (18 December 2018)
ERROR: (7.1): Incorrect number of dimensions for boundary variable: time_bounds
Traceback (most recent call last):
File "/home/ros/anaconda2/bin/cfchecks", line 10, in
sys.exit(main())
File "/home/ros/anaconda2/lib/python2.7/site-packages/cfchecker/cfchecks.py", line 3021, in main
inst.checker(file)
File "/home/ros/anaconda2/lib/python2.7/site-packages/cfchecker/cfchecks.py", line 488, in checker
return self._checker()
File "/home/ros/anaconda2/lib/python2.7/site-packages/cfchecker/cfchecks.py", line 659, in _checker
(coordVars,auxCoordVars,boundsVars,climatologyVars,gridMappingVars)=self.getCoordinateDataVars()
File "/home/ros/anaconda2/lib/python2.7/site-packages/cfchecker/cfchecks.py", line 1135, in getCoordinateDataVars
if not (boundsData[i][0] <= value <= boundsData[i][1]) and not (boundsData[i][0] >= value >= boundsData[i][1]):
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
Locally installed cf-checker
Using CF Checker Version 4.0.0
Checking against CF Version CF-1.7
Using Standard Name Table Version 77 (2021-01-19T13:38:50Z)
Using Area Type Table Version 10 (23 June 2020)
Using Standardized Region Name Table Version 4 (18 December 2018)
WARN: (2.6.1): Inconsistency - This netCDF file appears to contain CF-1.6 data, but you've requested a validity check against CF-1.7
WARN: (7.1): Boundary var time_bounds should not have attribute units
WARN: (7.1): Boundary var time_bounds should not have attribute standard_name
WARN: (7.1): Boundary var time_bounds should not have attribute axis
WARN: (7.1): Boundary var time_bounds should not have attribute calendar
ERROR: (7.1): Incorrect number of dimensions for boundary variable: time_bounds
WARN: (7.1): Boundary var time_bounds should not have attribute units
WARN: (7.1): Boundary var time_bounds should not have attribute standard_name
WARN: (7.1): Boundary var time_bounds should not have attribute axis
WARN: (7.1): Boundary var time_bounds should not have attribute calendar
Traceback (most recent call last):
File "/home/sm_lbarr/.conda/envs/cf-checker/bin/cfchecks", line 8, in <module>
sys.exit(main())
File "/home/sm_lbarr/.conda/envs/cf-checker/lib/python3.8/site-packages/cfchecker/cfchecks.py", line 3097, in main
inst.checker(file)
File "/home/sm_lbarr/.conda/envs/cf-checker/lib/python3.8/site-packages/cfchecker/cfchecks.py", line 532, in checker
return self._checker()
File "/home/sm_lbarr/.conda/envs/cf-checker/lib/python3.8/site-packages/cfchecker/cfchecks.py", line 705, in _checker
(coordVars,auxCoordVars,boundsVars,climatologyVars,gridMappingVars)=self.getCoordinateDataVars()
File "/home/sm_lbarr/.conda/envs/cf-checker/lib/python3.8/site-packages/cfchecker/cfchecks.py", line 1186, in getCoordinateDataVars
if not (boundsData[i][0] <= value <= boundsData[i][1]) and not (boundsData[i][0] >= value >= boundsData[i][1]):
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
The text was updated successfully, but these errors were encountered:
And then the offending errors revealed the themselves:
Of course, variable time_bounds must not have attributes axis = "T" and bounds = "time_bounds". Obvious once one sees them, but before that happens it would be helpful if the cf-checker would not crash and instead give a hint towards the problem.
The cf-checker crashes when checking what looks like a CF-compliant file (maybe with some quirks). Even if there is an obvious error that nevertheless escapes us, the checker should not crash. Below follows 1) output from
ncdump -h
2) error output when using the Reading online tool 3) error output from running cf-checker locally installed.ncdump -h
Reading online tool
Locally installed cf-checker
The text was updated successfully, but these errors were encountered: