From a7a76e6f99eb6501db1ecd003225bebd04fe1dff Mon Sep 17 00:00:00 2001 From: Mattia Almansi Date: Sat, 6 Apr 2024 09:47:56 +0200 Subject: [PATCH] better chunking --- notebooks/wp4/extreme_indices.ipynb | 2 +- notebooks/wp4/extreme_indices_future.ipynb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/notebooks/wp4/extreme_indices.ipynb b/notebooks/wp4/extreme_indices.ipynb index 6296dff..e468f52 100644 --- a/notebooks/wp4/extreme_indices.ipynb +++ b/notebooks/wp4/extreme_indices.ipynb @@ -357,7 +357,7 @@ "\n", " ds = xr.open_mfdataset(paths)\n", " in_files = f\"{tmpdir}/rechunked.zarr\"\n", - " chunks = {dim: -1 if dim == \"time\" else \"auto\" for dim in ds.dims}\n", + " chunks = {dim: 365 * 4 if dim == \"time\" else \"auto\" for dim in ds.dims}\n", " ds.chunk(chunks).to_zarr(in_files)\n", "\n", " datasets = [\n", diff --git a/notebooks/wp4/extreme_indices_future.ipynb b/notebooks/wp4/extreme_indices_future.ipynb index a4f9779..ef735ac 100644 --- a/notebooks/wp4/extreme_indices_future.ipynb +++ b/notebooks/wp4/extreme_indices_future.ipynb @@ -379,7 +379,7 @@ "\n", " ds = xr.open_mfdataset(paths)\n", " in_files = f\"{tmpdir}/rechunked.zarr\"\n", - " chunks = {dim: -1 if dim == \"time\" else \"auto\" for dim in ds.dims}\n", + " chunks = {dim: 365 * 4 if dim == \"time\" else \"auto\" for dim in ds.dims}\n", " ds.chunk(chunks).to_zarr(in_files)\n", "\n", " time_range = f\"{future_slice.start}-01-01\", f\"{future_slice.stop}-12-31\"\n",