Skip to content

Commit

Permalink
better chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 committed Apr 6, 2024
1 parent 82afc35 commit a7a76e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion notebooks/wp4/extreme_indices.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/wp4/extreme_indices_future.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a7a76e6

Please sign in to comment.