eocis-chuk / chuk-api

Python API for working with CHUK datasets
GNU General Public License v3.0
1 stars 0 forks source link

Issues in auxiliary file conversion output #2

Open niallmcc opened 1 month ago

niallmcc commented 1 month ago

n EOCIS-AUXILARY-L4-SOCIOECONOMIC_ITL3-MERGED-*-fv1.0.nc, int64 is used as the data type (should be int) and I guess we should call it "time" rather than "t"

int64 t(t) ;             t:units = "days since 1999-01-07 00:00:00" ;             t:calendar = "proleptic_gregorian" ;

In EOCIS-AUXILARY-L4-LANDCLASS-MERGED-*-fv1.1.nc there is no time or t attribute, we should probably make it consistent with what we do for the above files

niallmcc commented 1 month ago

Some further corrections mentioned by Alison

Flagged by the NCAS cf checker ( https://cfchecker.ncas.ac.uk/)

oembury commented 1 month ago

It’s also showing an error with flag_values in some of the files e.g. landcover (ERROR: Attribute flag_values of incorrect type (expecting 'Data Variable' type, got 'Numeric' type)) - I think that’s because the variable is a short but the flag values are unsigned bytes, when they should be the same.

_FillValue, missing_value, valid_min, valid_max, valid_range, flag_values, and flag_mask attributes must have the same type as the variable they are attached to.

actual_range must have the same type as add_offset/scale_factor if used, otherwise the same type as the variable.

niallmcc commented 1 month ago

@oembury what tool do you use to check for compliance with CF?

oembury commented 1 month ago

From https://cfconventions.org/software.html