-
Notifications
You must be signed in to change notification settings - Fork 5
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
Change the upper limit of q_v_sat in relations.jl #220
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #220 +/- ##
==========================================
- Coverage 90.93% 90.40% -0.53%
==========================================
Files 10 9 -1
Lines 1180 1167 -13
==========================================
- Hits 1073 1055 -18
- Misses 107 112 +5 ☔ View full report in Codecov by Sentry. |
The code changes look fine to me, should we add some tests for this? It seems like this behavior has been adjusted a couple times, maybe we could also add some comments (in the src or tests). Relevant PRs: |
Ah, I didn't know it was changed from 1 to 1 / eps(FT) before. @tapios Could you double check what we want here? See this comment: #109 (comment). |
I see what the intention was. We just wanted to make sure that when pv_sat > p, we have q_sat > 1. In that case, I think it's safer to set it to 1+FT(eps). What I don't know is whether q_sat > 1 causes problems anywhere else in Thermodynamics. If it does, q_sat = 1 should also work. |
I'll change it to 1+eps(FT) |
test/relations.jl
Outdated
@test TD.q_vap_saturation_from_pressure( | ||
param_set, | ||
q_tot, | ||
p_v_tripleminus, | ||
_T_triple, | ||
phase_type, | ||
) > FT(1) | ||
|
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.
@charleskawczynski Does this test make sense? Is it useful?
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.
I think that's fine so long we're sure that this exercises that branch.
I'll try to get #221 merged asap so that we can rebase/merge this PR |
Also bumps a patch release. cc @charleskawczynski
Todo: add tests