-
Notifications
You must be signed in to change notification settings - Fork 4
Fix bug in saturation adjustment solver for MoistAirBuoyancy #120
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
Conversation
This PR fixes a bug in the saturation adjustment solver that only gets hit under certain conditions: when the secant iteration accesses unsaturated states during the course of finding a saturated state. Before this PR, we assume that during adjustment the state was saturated. However, this assumption does not hold if "intermediate" (eg test) states that are accessed during the iteration are not saturated. The result of the bug is a spurious change in the total moisture fraction. It is fixed in this PR.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
merge when ready |
|
Should this have a regression test? |
|
@giordano yes! Even more important is the atmospheremodel. But the boussinesq solver represents our work over the past few months (foundational work) and it would be nice to preserve. |
|
i think we should build regression tests from the canonical cases (eg bomex, and there are another dozen that we will implement) |
|
@glwagner, resolve conflicts? |
|
another route for this PR is to use the main adjustment solver, which now supports potential temperature state. so we don't have to merge this necessarily (i'm fine either way) |
navidcy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@glwagner, your call whether to merge or not!
|
better to work than not I think! |
This PR fixes a bug in the saturation adjustment solver that only gets hit under certain conditions: when the secant iteration accesses unsaturated states during the course of finding a saturated state. Before this PR, we assume that during adjustment the state was saturated. However, this assumption does not hold if "intermediate" (eg test) states that are accessed during the iteration are not saturated. The result of the bug is a spurious change in the total moisture fraction. It is fixed in this PR.