Zarr¶
virtualizarr.parsers.ZarrParser ¶
Create a ManifestStore from an existing Zarr store.
Creates lightweight virtual references to chunks in an existing Zarr store without copying data. Supports both Zarr V2 and V3 formats, automatically converting V2 metadata to V3.
Parameters:
-
group(str | None, default:None) –Path to a specific group within the Zarr store to be used as the Zarr root group for the ManifestStore. Uses forward slashes for nested groups (e.g., "model/output"). Default is None, which uses the store's root group.
-
skip_variables(Iterable[str] | None, default:None) –Variables in the Zarr store that will be ignored when creating the ManifestStore. Default is None, which includes all variables.
__call__ ¶
__call__(url: str, registry: ObjectStoreRegistry) -> ManifestStore
Parse the metadata and byte offsets from a given Zarr store to produce a VirtualiZarr ManifestStore.
Parameters:
-
url(str) –URL or path to the Zarr store. Supports various protocols:
- Local filesystem: "file:///path/to/store.zarr" or "/path/to/store.zarr"
- S3: "s3://bucket/path/to/store.zarr"
- Google Cloud Storage: "gs://bucket/path/to/store.zarr"
- Azure Blob Storage: "az://container/path/to/store.zarr"
- HTTP/HTTPS: "example.com/store.zarr"
-
registry(ObjectStoreRegistry) –An ObjectStoreRegistry for resolving urls and reading data.
Returns:
-
[ManifestStore][ManifestStore]–A virtual representation of the Zarr store with references to the original chunk locations.
Raises:
-
ValueError–If the URL cannot be resolved or normalized.
-
KeyError–If the registry doesn't contain an appropriate store for the URL.
-
NotImplementedError–If the Zarr store uses an unsupported format version.
See Also
virtualizarr.open_virtual_dataset : High-level interface for virtual datasets. virtualizarr.manifests.ManifestStore : The returned virtual store object.