Skip to content

netcdf3 parser fails to preserve _FillValue attribute #982

@aaron-kaplan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    KerchunkRelating to the kerchunk library / specification itselfbugSomething isn't workingparsers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions