Skip to content

Commit

Permalink
write consolidated zarr metadata when writing coords labels by default
Browse files Browse the repository at this point in the history
Signed-off-by: Emile Tenezakis <e.tenezakis@gmail.com>
  • Loading branch information
emileten committed Apr 19, 2024
1 parent 6e39af3 commit 5807e0b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hazard/sources/osc_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def write_data_array(self, path: str, da: xr.DataArray):
renamed.name = "data"
_, transform, crs = xarray_utilities.get_array_components(renamed)
self._add_attributes(renamed.attrs, transform, crs.to_string())
renamed.to_dataset().to_zarr(self.root.store, compute=True, group=path, mode="w", consolidated=False)
renamed.to_dataset().to_zarr(self.root.store, compute=True, group=path, mode="w", consolidated=True)

@staticmethod
def _get_coordinates(longitudes, latitudes, transform: Affine):
Expand Down

0 comments on commit 5807e0b

Please sign in to comment.