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
Attach a minimal CDL or NetCDF file which is able to reproduce the issue
Since I can't attach an actual file, this is a minimal python that generates a failing netCDF file
importnetCDF4root=netCDF4.Dataset('minimal.nc', 'w')
root.standard_name_vocabulary='CF Standard Name Table v87'# Using older tables does not trigger the issuescanline_var=root.createVariable(varname='latitude', datatype='i4')
scanline_var.standard_name='latitude'scanline_var.units='degrees_north'scanline_var[:] =10
Describe the issue below:
The tool outputs this internal error:
cf:1.8.check_units: list index out of range
The error arises in compliance_checker/cf/util.py line 209, when looking for grib and amip in the standards table. Version 87 does not include them, and the _get function fails for a missing non-required attribute.
I suggest adding the following fix in compliance_checker/cf/util.py::NameEntry:
Version of compliance checker running:
5.1.1
Describe the checker this affects:
CF checker
Attach a minimal CDL or NetCDF file which is able to reproduce the issue
Since I can't attach an actual file, this is a minimal python that generates a failing netCDF file
To Reproduce:
compliance-checker --test cf:1.8 --verbose minimal.nc
Describe the issue below:
The tool outputs this internal error:
The error arises in
compliance_checker/cf/util.py
line 209, when looking for grib and amip in the standards table. Version 87 does not include them, and the_get
function fails for a missing non-required attribute.I suggest adding the following fix in
compliance_checker/cf/util.py::NameEntry
:The text was updated successfully, but these errors were encountered: