Skip to content

zarr virtual/kerchunked datasets #31

Description

@dnelson

Using kerchunk we can wrap a HDF5 file as a "virtual" zarr dataset. All the original data remains in the HDF5 file(s), the zarr wrapper file simply contains the needed metadata for zarr (or xarray) to directly access the data, bypassing the HDF5 library entirely.

An example for GAIA is here:

/virgotng/mpia/obs/GAIA/gaia_dr3.zarr

(it is actually a json file). It already concatenates the "gaia_dr3.hdf5" and "gaia_dr3_aux.hdf5" files.

It can be read by zarr as:

import fsspec
import zarr

m = fsspec.filesystem("reference", fo="gaia_dr3.zarr").get_mapper("")
ds = zarr.open(m, mode='r'))

We could support this by default, detect if a requested load is in fact such a kerchunked json, in which case, pass to fsspec and then treat m as a zarr file.

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions