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

Add atmospheric circulation benchmark #1554

Merged
merged 4 commits into from
Sep 24, 2024
Merged

Add atmospheric circulation benchmark #1554

merged 4 commits into from
Sep 24, 2024

Conversation

jrbourbeau
Copy link
Member

@jrbourbeau jrbourbeau commented Sep 20, 2024

xref #1545 (comment)

cc @dcherian @hendrikmakait

EDIT: Here's a run of the "small" version of this test https://cloud.coiled.io/clusters/598243/account/dask-engineering-gcp/information?quick=Just+mine. Takes ~9 minutes and costs ~$0.20

temdiags = zonal_means.merge(anomaly[["uv", "vt", "uw"]].mean("longitude"))

# This is incredibly slow, takes a while for flox to construct the graph
daily = temdiags.resample(time="D").mean()
Copy link
Contributor

@dcherian dcherian Sep 21, 2024

Choose a reason for hiding this comment

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

Upstream issue: xarray-contrib/flox#396

This is almost certainly equally slow to set up without flox. Both will create a large number of dask arrays (=number of days in the dataset) apply the reduction, then concatenate.

Co-authored-by: Deepak Cherian <dcherian@users.noreply.github.com>
@jrbourbeau
Copy link
Member Author

@dcherian does this look good to include from your perspective?

Copy link
Contributor

@dcherian dcherian left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@hendrikmakait hendrikmakait left a comment

Choose a reason for hiding this comment

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

Thanks, @jrbourbeau!

Comment on lines +66 to +71
# # Users often rework things via a rechunk to make this a blockwise problem
# daily = (
# temdiags.chunk(time=24)
# .resample(time="D")
# .mean()
# )
Copy link
Member

Choose a reason for hiding this comment

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

Did you leave this here on purpose?

Suggested change
# # Users often rework things via a rechunk to make this a blockwise problem
# daily = (
# temdiags.chunk(time=24)
# .resample(time="D")
# .mean()
# )

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, just for future reference in case it's needed. I think keeping for context doesn't hurt. We can always remove it later

@jrbourbeau jrbourbeau merged commit ac48ae2 into main Sep 24, 2024
5 checks passed
@jrbourbeau jrbourbeau deleted the circulation branch September 24, 2024 15:28
@jrbourbeau jrbourbeau self-assigned this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants