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

P3 melting + F_liq #449

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

P3 melting + F_liq #449

wants to merge 6 commits into from

Conversation

rorlija1
Copy link
Contributor

@rorlija1 rorlija1 commented Aug 24, 2024

This PR modifies melting for liquid fraction and adds a P3Rates struct similar to the one in Microphysics2M.

See the docs build for further explanations, and here are some notes:

  • I have a doubt in the code that I'd like to highlight: physically, should we be using the ice core fall speed or the whole (mixed-phase) particle fall speed to calculate the melting rates?
  • Also, a small TODO before or after merging: the codecov is missing one line because the tests don't cover the case when the integration bound for the PSD is below D_th, and I can't write tests for that line since get_ice_bound() returns a constant. Also, the rest of the tests are failing because I changed the thresholds solver to allow rime density of 0 but did not change the tests to match.
  • One larger issue I'm thinking about with the code is I'm wondering if we can use the same function called ice_melt to also compute (re)freezing of L_liq. In Cholette (2019), the freezing rate (eq. A5 p. 578) is almost identical to the melting rate, except for a sign change and using the latent heat of sublimation, and for freezing we care about the mixed-phase particle mass content L_p3_tot as well as the mixed-phase particle PSD instead of only caring about ice like we do for melting. Since we switch between melting and freezing based on temperature, maybe it would be nicest to implement them both in one function?
  • Finally, for catching cases when we have no particles over which to compute melting, I have currently implemented to compute melting if L > eps && N > eps but am unsure whether the condition should be that or L > eps || N > eps.

Copy link

codecov bot commented Aug 24, 2024

Codecov Report

Attention: Patch coverage is 97.91667% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.88%. Comparing base (9582b2d) to head (353bf39).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #449      +/-   ##
==========================================
- Coverage   96.89%   96.88%   -0.01%     
==========================================
  Files          41       41              
  Lines        1480     1509      +29     
==========================================
+ Hits         1434     1462      +28     
- Misses         46       47       +1     
Components Coverage Δ
src 98.72% <97.91%> (-0.05%) ⬇️
ext 69.79% <ø> (ø)

@rorlija1
Copy link
Contributor Author

rorlija1 commented Aug 27, 2024

Hi @trontrytel , just requested your review on this, but no rush since of course this is my last week!
Left some notes in the PR description!

@rorlija1 rorlija1 changed the title P3 Melting Changes P3 melting + F_liq Aug 27, 2024
@rorlija1 rorlija1 added the P3 label Aug 27, 2024
@rorlija1 rorlija1 self-assigned this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant