Skip to content

Improve performance of barotropic streamfunction #644

Merged
xylar merged 3 commits into
MPAS-Dev:masterfrom
xylar:compute-depth-integrated-velocity
Jun 15, 2025
Merged

Improve performance of barotropic streamfunction #644
xylar merged 3 commits into
MPAS-Dev:masterfrom
xylar:compute-depth-integrated-velocity

Conversation

@xylar
Copy link
Copy Markdown
Collaborator

@xylar xylar commented Jun 14, 2025

This merge refactors the barotropic streamfunction, separating out computation of vertically integrated velocity and vorticity into their own modules. It improves performance and memory usage for large meshes by:

  • chunking along the nEdges dimension during computation of the vertically integrated velocity
  • saving to intermediate files if a temporary directory is provided
  • loading numpy array for subsequent (2D) computations

xylar added 3 commits June 14, 2025 08:25
This merge refactors the barotropic streamfunction, separating
out computation of vertically integrated velocity and vorticity
into their own modules.  It improves performance and memory usage
for large meshes by:
* chunking along the `nEdges` dimension during computation of the
  vertically integrated velocity
* saving to intermediate files if a temporary directory is provided
* loading numpy array for subsequent (2D) computations
@xylar
Copy link
Copy Markdown
Collaborator Author

xylar commented Jun 14, 2025

Testing

I was able to compute the Barotropic streamfunciton on the RRSwISC6to18E3r5 mesh with this branch, whereas MPAS-Analysis ran out of memory in runs without this fix.

https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xylar/analysis_testing/BSF/20250501.wcycl1850.ne120pg2_r025_RRSwISC6to18E3r5.test5.chrysalis/

@xylar xylar merged commit afe9a4b into MPAS-Dev:master Jun 15, 2025
6 checks passed
@xylar xylar deleted the compute-depth-integrated-velocity branch June 15, 2025 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant