Skip to content

Commit

Permalink
Set zarr_format for zarr.consolidate_metadata
Browse files Browse the repository at this point in the history
Avoids a few useless gets with Zarr v3 stores.
  • Loading branch information
dcherian committed Dec 2, 2024
1 parent 7fd572d commit 9dde98d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions xarray/backends/zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,7 @@ def store(
if _zarr_v3():
# https://github.com/zarr-developers/zarr-python/pull/2113#issuecomment-2386718323
kwargs["path"] = self.zarr_group.name.lstrip("/")
kwargs["zarr_format"] = self.zarr_group.metadata.zarr_format
zarr.consolidate_metadata(self.zarr_group.store, **kwargs)

def sync(self):
Expand Down

0 comments on commit 9dde98d

Please sign in to comment.