Skip to content

Add protections on aer_props passed to RRTMGP#60

Merged
sdrabenh merged 3 commits intofeature/sdrabenh/gcm_v12from
bugfix/mathomp4/55-aggressive-fix
Apr 3, 2025
Merged

Add protections on aer_props passed to RRTMGP#60
sdrabenh merged 3 commits intofeature/sdrabenh/gcm_v12from
bugfix/mathomp4/55-aggressive-fix

Conversation

@mathomp4
Copy link
Member

@mathomp4 mathomp4 commented Feb 7, 2025

Closes #55

This PR adds protections on some aerosol properties passed to RRTMGP. Because RRTMGP is (currently) compiled at R8, _wp is R8. Apparently with aggressive compiler flags, it's possible for, say, aer_props%ssa to become slightly greater than one in the above renormalization.

So, we add clamps to the values based on the restrictions seen in https://github.com/GEOS-ESM/rte-rrtmgp/blob/1163c8c608a341987c2647dfa540481688c064bc/rte-frontend/mo_optical_props.F90#L645-L652

In testing, the values seen were like 1.00000011905028 so just slightly above one.

I've labeled as non-zero-diff because, well, this could change answers.

@mathomp4 mathomp4 added the Non 0-diff The changes in this pull request are non-zero-diff label Feb 7, 2025
@mathomp4 mathomp4 self-assigned this Feb 7, 2025
@mathomp4 mathomp4 requested a review from wmputman February 7, 2025 15:35
@mathomp4
Copy link
Member Author

mathomp4 commented Feb 7, 2025

Crap. Bug in CI. Let me look at it...

@mathomp4 mathomp4 marked this pull request as ready for review February 8, 2025 12:34
@mathomp4 mathomp4 requested a review from a team as a code owner February 8, 2025 12:34
@sdrabenh sdrabenh merged commit 3fd6bd8 into feature/sdrabenh/gcm_v12 Apr 3, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Non 0-diff The changes in this pull request are non-zero-diff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments