Skip to content

to_netcdf -> _fill_value without NaN #2037

@mathause

Description

@mathause

Code Sample

xarray adds a _FillValue to netCDFs even when there is no missing value:

import xarray as xr

ds = xr.Dataset(data_vars={"data":  ("dim1", [0., 1.])})
ds.to_netcdf('tst.nc')

xr.open_dataset("tst.nc").data.encoding["_FillValue"]

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