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 protections on aer_props passed to RRTMGP #60

Open
wants to merge 2 commits into
base: feature/sdrabenh/gcm_v12
Choose a base branch
from

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
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.

1 participant