From 5807e0b66d14ca099467b3addb8b6410c052b079 Mon Sep 17 00:00:00 2001 From: Emile Tenezakis Date: Fri, 19 Apr 2024 13:28:48 +0000 Subject: [PATCH] write consolidated zarr metadata when writing coords labels by default Signed-off-by: Emile Tenezakis --- src/hazard/sources/osc_zarr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hazard/sources/osc_zarr.py b/src/hazard/sources/osc_zarr.py index c087bc2..ba6cd3f 100644 --- a/src/hazard/sources/osc_zarr.py +++ b/src/hazard/sources/osc_zarr.py @@ -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):