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

Change the upper limit of q_v_sat in relations.jl #220

Merged
merged 1 commit into from
Jul 17, 2024
Merged

Conversation

szy21
Copy link
Member

@szy21 szy21 commented Jul 17, 2024

Also bumps a patch release. cc @charleskawczynski

Todo: add tests

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.40%. Comparing base (d150a35) to head (121f953).

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.
📢 Have feedback on the report? Share it here.

@szy21 szy21 enabled auto-merge July 17, 2024 17:09
@szy21 szy21 added the Launch Buildkite Add label to launch Buildkite label Jul 17, 2024
@charleskawczynski
Copy link
Member

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:

@szy21 szy21 disabled auto-merge July 17, 2024 18:16
@szy21
Copy link
Member Author

szy21 commented Jul 17, 2024

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

@tapios
Copy link
Contributor

tapios commented Jul 17, 2024

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.

@szy21
Copy link
Member Author

szy21 commented Jul 17, 2024

I'll change it to 1+eps(FT)

@szy21 szy21 changed the title Fix a bug for upper limit of q_v_sat in relations.jl Change the upper limit of q_v_sat in relations.jl Jul 17, 2024
Comment on lines 197 to 204
@test TD.q_vap_saturation_from_pressure(
param_set,
q_tot,
p_v_tripleminus,
_T_triple,
phase_type,
) > FT(1)

Copy link
Member Author

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?

Copy link
Member

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.

@charleskawczynski
Copy link
Member

I'll try to get #221 merged asap so that we can rebase/merge this PR

@szy21 szy21 enabled auto-merge July 17, 2024 20:45
@szy21 szy21 added this pull request to the merge queue Jul 17, 2024
@szy21 szy21 removed this pull request from the merge queue due to a manual request Jul 17, 2024
@szy21 szy21 added this pull request to the merge queue Jul 17, 2024
Merged via the queue into main with commit 245f5d8 Jul 17, 2024
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Launch Buildkite Add label to launch Buildkite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants