Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-chunking for ERA5 loading #1608

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/geospatial/workloads/atmospheric_circulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def atmospheric_circulation(
) -> Delayed:
ds = xr.open_zarr(
"gs://weatherbench2/datasets/era5/1959-2023_01_10-full_37-1h-0p25deg-chunk-1.zarr",
chunks={},
chunks={"time": "auto"},
)
if scale == "small":
# 852.56 GiB (small)
Expand Down
2 changes: 2 additions & 0 deletions tests/geospatial/workloads/climatology.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def rechunk_map_blocks(
# Load dataset
ds = xr.open_zarr(
"gs://weatherbench2/datasets/era5/1959-2023_01_10-wb13-6h-1440x721.zarr",
chunks={"time": "auto"},
Copy link
Member

@jrbourbeau jrbourbeau Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This the a case where I think the naive user-code is what we want. This may be slightly better but we want to optimize what most users will have in practice

EDIT: Whoops, I missing @fjetter's comment, which is basically the same as mine

)

if scale == "small":
Expand Down Expand Up @@ -122,6 +123,7 @@ def highlevel_api(
# Load dataset
ds = xr.open_zarr(
"gs://weatherbench2/datasets/era5/1959-2023_01_10-wb13-6h-1440x721.zarr",
chunks={"time": "auto"},
)

if scale == "small":
Expand Down
1 change: 1 addition & 0 deletions tests/geospatial/workloads/rechunking.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def era5_rechunking(
) -> Delayed:
ds = xr.open_zarr(
"gs://weatherbench2/datasets/era5/1959-2023_01_10-full_37-1h-0p25deg-chunk-1.zarr",
chunks={"time": "auto"},
).drop_encoding()

if scale == "small":
Expand Down
1 change: 1 addition & 0 deletions tests/geospatial/workloads/regridding.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def xesmf(
) -> Delayed:
ds = xr.open_zarr(
"gs://weatherbench2/datasets/era5/1959-2023_01_10-full_37-1h-0p25deg-chunk-1.zarr",
chunks={"time": "auto"},
)
# Fixed time range and variable as the interesting part of this benchmark scales with the
# regridding matrix
Expand Down
Loading