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.
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:
(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:
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
mas a zarr file.