Skip to content

netcdf3 parser fails to preserve _FillValue attribute #982

Description

@aaron-kaplan

virtualizarr.parsers.netcdf3 doesn't copy the _FillValue attribute into the Zarr metadata. Consequently, after opening the virtual icechunk store in xarray, I see the sentinel value rather than NaNs.

I found this line in kerchunk, which explicitly excludes _FillValue from being copied over:
https://github.com/fsspec/kerchunk/blob/main/kerchunk/netCDF3.py#L221

According to https://hackmd.io/@zarr/SJkDiK9Teg , in Zarr V2 Array.fill_value and attrs['_FillValue'] were conflated, which probably explains kerchunk's behavior, but in Zarr V3 they are distinct.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    KerchunkRelating to the kerchunk library / specification itselfbugSomething isn't workingfill-sentinel-valuesparsers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions