Skip to content

Commit

Permalink
Add multi-variable rechunking (#1546)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbourbeau authored Sep 13, 2024
1 parent 7273ef9 commit 75a4c91
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/geospatial/test_rechunking.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,17 @@ def test_era5_rechunking(client, gcs_url, scale):
if scale == "small":
# 101.83 GiB (small)
time_range = slice("2020-01-01", "2023-01-01")
variables = ["sea_surface_temperature"]
elif scale == "medium":
# 2.12 TiB (medium)
time_range = slice(None)
variables = ["sea_surface_temperature"]
else:
# 2.12 TiB (large)
# 4.24 TiB (large)
# This currently doesn't complete successfully.
time_range = slice(None)
subset = ds.sea_surface_temperature.sel(time=time_range)
variables = ["sea_surface_temperature", "snow_depth"]
subset = ds[variables].sel(time=time_range)

# Rechunk
result = subset.chunk({"time": -1, "longitude": "auto", "latitude": "auto"})
Expand Down

0 comments on commit 75a4c91

Please sign in to comment.