Skip to content

Refactor SAMF convection schemes for single-precision (32-bit) capability - #384

Draft
rhaesung wants to merge 57 commits into
ufs-community:ufs/devfrom
rhaesung:feature/samf-single-precision
Draft

Refactor SAMF convection schemes for single-precision (32-bit) capability#384
rhaesung wants to merge 57 commits into
ufs-community:ufs/devfrom
rhaesung:feature/samf-single-precision

Conversation

@rhaesung

Copy link
Copy Markdown
Collaborator

Description of Changes:

  • Refactored internal calculations, working precision, and local variables in samfdeepcnv.F90, samfshalcnv.f, progomega_calc.f90, and progsigma_calc.f90 to 32-bit (conv_wp) to reduce memory bandwidth and enhance computational performance.
  • Maintained 64-bit double precision (kind_phys) for external I/O arrays and host model interfaces to ensure seamless integration and stability with the host workflow.
  • Updated CCPP metadata (.meta) files and variable specifications to ensure accurate glue-code generation for flexible precision switching.

Tests Conducted:

  • 64-bit Baseline Verification: PASSED. Achieved 100% Bit-for-Bit (B4B) numerical agreement against double-precision baselines across all regression tests.
  • Scientific Validation: 32-bit scientific accuracy testing and global workflow evaluation are currently underway.

Dependencies:

  • NOAA-EMC/ufsatm#<pr_number>
  • ufs-community/ufs-weather-model/#<pr_number>

Contributors (optional):

@yangfanglin @JongilHan66

rhaesung and others added 30 commits December 10, 2025 16:29
- Update add_library to use SCHEMES_SAMFCNV instead of SCHEMES_SAMFDEEP.

- Resolves missing module errors for mo_conv_kind.
rhaesung and others added 25 commits March 2, 2026 15:36
Deleted code associated with already removed print statements
Deleted excess comments.
* Change tfreeze to match that in NoahMP
* Only set SLC to SMC if temp newly > tfreez
@lisa-bengtsson

Copy link
Copy Markdown
Collaborator

This looks like a lot of (important) work - just a heads up that I just committed a PR updating progomega_calc.f90 - looks like we should be able to merge the two in a straight forward way. #383
We can see which one goes first and then decide how to proceed.

@rhaesung

Copy link
Copy Markdown
Collaborator Author

This looks like a lot of (important) work - just a heads up that I just committed a PR updating progomega_calc.f90 - looks like we should be able to merge the two in a straight forward way. #383
We can see which one goes first and then decide how to proceed.

@lisa-bengtsson Thanks for the heads-up! Since this PR is currently in draft status while we conduct 32-bit scientific validation, we can proceed with #383 first. Once it is merged, I will rebase and apply the sp implementation to the updated code.

@lisa-bengtsson

Copy link
Copy Markdown
Collaborator

This looks like a lot of (important) work - just a heads up that I just committed a PR updating progomega_calc.f90 - looks like we should be able to merge the two in a straight forward way. #383
We can see which one goes first and then decide how to proceed.

@lisa-bengtsson Thanks for the heads-up! Since this PR is currently in draft status while we conduct 32-bit scientific validation, we can proceed with #383 first. Once it is merged, I will rebase and apply the sp implementation to the updated code.

@rhaesung , great! Thank you!

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