zarr-developers / VirtualiZarr

Create virtual Zarr stores from archival data files using xarray syntax
https://virtualizarr.readthedocs.io/en/latest/
Apache License 2.0
95 stars 18 forks source link

Support specifying single HDF Group in open_virtual_dataset #165

Closed scottyhq closed 1 month ago

scottyhq commented 3 months ago

@TomNicholas @forrestfwilliams I took a pass at this for basic functionality of loading a single group. Seems to be working for the couple datasets I'm trying out from https://nisar.jpl.nasa.gov/data/sample-data/

scottyhq commented 2 months ago

One other thing is that the group kwarg could also be supported when reading references from Zarr, but that could also just be flagged as an issue and left for a later PR, as the logic will be independent of the kerchunk-parsing logic here.

Yeah, sounds like a plan. I think this is now refactored and minimally functional. I'm sure working with other example datasets with groups (https://github.com/pydata/xarray-data/blob/master/cmip6.nc) will uncover improvements or the need for additional tests.

TomNicholas commented 1 month ago

Thank you @scottyhq !