Skip to content

_FillValue and missing_value not allowed for the same variable #1749

Closed
@aluhamaa

Description

@aluhamaa

Problem description

Currently opening the file which has a variable with both _FillValue and missing_value defined, results in a ValueError "'Discovered conflicting _FillValue and missing_value...", which can be overridden by setting decode_cf=False

Code in xarray/conventions.py have comments that missing_value is deprecated, however this seems not to be true anymore, see ticket #67 in http://cfconventions.org/cf-conventions/cf-conventions.html

Also, see description of meanings of _FillValue and missing_value here:
Unidata/netcdf4-python#94
"Note that missing_value and _FillValue are very different. _FillValue is used by the C library to fill in values in variables that have not yet been written to. missing_value is meant to represent values set by the user to represent data points that do not exist."

Expected Output

Accept both _FillValue and missing_value and if both present, mask output only for _FillValue

Output of xr.show_versions()

0.9.6

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