pydata / xarray-data

Data repository for xarray examples
32 stars 15 forks source link

Non CF conforming dataset #28

Open kmuehlbauer opened 5 months ago

kmuehlbauer commented 5 months ago

The file eraint_uvz.nc contains variables which do not conform to CF standard.

Below is the ncdump of the z-variable of dtype int16 but the _FillValue is NaN. According to CF conventions _FillValue should be of same type as its variable.

ncdump:

short z(month, level, latitude, longitude) ;
    z:number_of_significant_digits = 5 ;
    z:units = "m**2 s**-2" ;
    z:scale_factor = -1.7250274674968 ;
    z:long_name = "Geopotential" ;
    z:add_offset = 66825.5 ;
    z:_FillValue = NaN ;
    z:standard_name = "geopotential" ;
rabernat commented 5 months ago

Interesting. Do we know where this file came from and how this value was generated?

kmuehlbauer commented 5 months ago

Thanks Ryan for the quick reply. This is in the global attributes (XXXX added by me):

Info :
    Monthly ERA-Interim data. Downloaded and edited by fabien.maussion@XXXXXXX

Maybe @fmaussion can shed some light.

rabernat commented 5 months ago

Does Xarray write these sorts of attributes itself? Or do they come from the data provider?

kmuehlbauer commented 5 months ago

Xarray is able to write these attributes, but for int16 dtype NaN does not make any sense. I'd consider that a bug.

But maybe someone with more knowledge on ERA5 has some idea what a correct _FillValue would be.