Skip to content

Move conversion to float64 to after choosing subdomain#264

Merged
NoraLoose merged 2 commits into
CWorthy-ocean:mainfrom
NoraLoose:move-float-conversion
Mar 6, 2025
Merged

Move conversion to float64 to after choosing subdomain#264
NoraLoose merged 2 commits into
CWorthy-ocean:mainfrom
NoraLoose:move-float-conversion

Conversation

@NoraLoose
Copy link
Copy Markdown
Collaborator

@NoraLoose NoraLoose commented Mar 6, 2025

Issue

#244 enforced double precision on the source data to ensure reproducibility. However, this led to significant slowdowns when Dask was not used. For example, the example grid in the documentation now takes 2 minutes to generate instead of 7 seconds. This issue arose because the conversion to double precision was applied to the entire source dataset, even when only a subset of the data (in both spatial and temporal dimensions) was needed downstream.

Solution

This pull request moves the conversion to double precision to occur only after selecting the relevant subdomain from the data. As a result, grid generation—and likely all other non-Dask operations—are now much faster again.

  • Passes pre-commit run --all-files
  • Changes are documented in docs/releases.md

@NoraLoose NoraLoose merged commit ba82725 into CWorthy-ocean:main Mar 6, 2025
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.

1 participant