id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 175188832,MDU6SXNzdWUxNzUxODg4MzI=,997,"Discovered conflicting _FillValue and missing_value, but both are NaN",204523,closed,0,,,0,2016-09-06T08:29:01Z,2016-09-07T16:20:24Z,2016-09-07T16:20:24Z,CONTRIBUTOR,,,,"When a variable contains both attributes and both are `NaN` the comparison fails. This happens when with `engine='netcdf4'` and not with `engine='h5netcdf`. Example file: ftp://anon-ftp.ceda.ac.uk/neodc/esacci/aerosol/data/MERIS_ALAMO/L3/v2.2/DAILY/2008/01/20080101-ESACCI-L3C_AEROSOL-AOD-MERIS_ENVISAT-ALAMO-fv2.2.nc ``` ncdump -h 20080101-ESACCI-L3C_AEROSOL-AOD-MERIS_ENVISAT-ALAMO-fv2.2.nc netcdf \20080101-ESACCI-L3C_AEROSOL-AOD-MERIS_ENVISAT-ALAMO-fv2.2 { dimensions: latitude = 180 ; longitude = 360 ; variables: float AOD550(latitude, longitude) ; AOD550:_FillValue = NaNf ; AOD550:long_name = ""Mean Effective Aerosol Optical Thickness at 550nm over ocean - Best solution"" ; AOD550:standard_name = ""atmosphere_optical_thickness_due_to_ambient_aerosol"" ; AOD550:units = ""1"" ; AOD550:coordinates = ""latitude longitude"" ; AOD550:valid_range = -3.402823e+38f, 3.402823e+38f ; AOD550:missing_value = NaNf ; } ``` ``` >>> import xarray as xr >>> ds = xr.open_dataset('20080101-ESACCI-L3C_AEROSOL-AOD-MERIS_ENVISAT-ALAMO-fv2.2.nc', engine='h5netcdf', decode_cf=False) >>> ds.variables['AOD550'].attrs['_FillValue'] array([ nan], dtype=float32) >>> ds.variables['AOD550'].attrs['missing_value'] array([ nan], dtype=float32) >>> type(ds.variables['AOD550'].attrs['missing_value']) >>> xr.core.utils.equivalent(ds.variables['AOD550'].attrs['_FillValue'], ds.variables['AOD550'].attrs['missing_value']) True >>> ``` ``` >>> ds = xr.open_dataset('20080101-ESACCI-L3C_AEROSOL-AOD-MERIS_ENVISAT-ALAMO-fv2.2.nc', engine='netcdf4', decode_cf=False) >>> ds.variables['AOD550'].attrs['_FillValue'] nan >>> ds.variables['AOD550'].attrs['missing_value'] nan >>> type(ds.variables['AOD550'].attrs['missing_value']) >>> xr.core.utils.equivalent(ds.variables['AOD550'].attrs['_FillValue'], ds.variables['AOD550'].attrs['missing_value']) False >>> ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/997/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue