Skip to content

What's wrong with "conflicting" _FillValue and missing_value? #1976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dopplershift opened this issue Mar 9, 2018 · 2 comments
Closed

What's wrong with "conflicting" _FillValue and missing_value? #1976

dopplershift opened this issue Mar 9, 2018 · 2 comments

Comments

@dopplershift
Copy link
Contributor

So this exception:

ValueError: Conflicting _FillValue and missing_value attrs on a variable 'MergedBaseReflectivityQC_altitude_above_msl': -999.0 vs. -99.0

Consider opening the offending dataset using decode_cf=False, correcting the attrs and decoding explicitly using xarray.decode_cf().

Why is having _FillValue and missing_value different considered an error in decoding CF? It's perfectly CF-compliant, especially since _FillValue is a scalar (used by the netCDF library to initialize an array), and missing_value can be a vector (representing one or more undefined or invalid values).

This happens in this case because the source GRIB file has one value specified for "missing" (maps to missing_value) and another for "no coverage" (which has been mapped to _FillValue).

Is this a technical limitation? Or just something that needs an implementation?

@shoyer
Copy link
Member

shoyer commented Mar 9, 2018

This is the same issue as #1749. Based on that discussion, I think it just needs a fix.

@dopplershift
Copy link
Contributor Author

Somehow managed to forget about an issue I was previously involved with. Lovely. Closing in favor of that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants