Skip to content

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

Closed
@dopplershift

Description

@dopplershift

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions