Type and values of attribute "flag_values" : CFchecker vs PrePARE
Closed this issue · 0 comments
senesis commented
Checking a file such as dumped below raises an ERROR for CFChecker, while it does not for PrePARE. As far as I understand, CFChecker is wrong here (?)
netcdf basin_Ofx_CNRM-CM6-1_piControl_r99i1p1f2_gn {
dimensions:
axis_nbounds = 2 ;
x = 362 ;
y = 294 ;
nvertex = 4 ;
time = UNLIMITED ; // (0 currently)
variables:
float lat(y, x) ;...
float lon(y, x) ;...
float bounds_lon(y, x, nvertex) ;
float bounds_lat(y, x, nvertex) ;
float area(y, x) ;
area:standard_name = "cell_area" ;
area:units = "m2" ;
short basin(y, x) ;
basin:standard_name = "region" ;
basin:long_name = "Region Selection Index" ;
....
basin:flag_meanings = "global_land southern_ocean atlantic_ocean pacific_ocean arctic_ocean indian_ocean mediterranean_sea black_sea hudson_bay baltic_sea red_sea" ;
basin:flag_values = "0 1 2 3 4 5 6 7 8 9 10" ;
// global attributes:
:name = "/scratch/utmp/ftdir/stmartin/eclis/transfers/AOGCMCMIP6_p43/iox/basin_Ofx_CNRM-CM6-1_piControl_r99i1p1f2_gn" ;
:Conventions = "CF-1.7 CMIP-6.2" ;
:creation_date = "2018-02-27T11:39:32Z" ;
...
Output
=====================
Using CF Checker Version 3.0.5
Checking against CF Version CF-1.6
Using Standard Name Table Version 49 (2018-02-13T08:44:33Z)
Using Area Type Table Version 6 (22 February 2017)
ERROR: (2.6.1): This netCDF file does not appear to contain CF Convention data.
....
ERROR: Attribute flag_values of incorrect type
....
ERROR: (3.5): flag_values attribute must contain a list of unique values