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 predicted variables helper #453

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

P3 predicted variables helper #453

wants to merge 5 commits into from

Conversation

rorlija1
Copy link
Contributor

@rorlija1 rorlija1 commented Aug 28, 2024

During my brief testing of P3 in KiD I had the idea that a function like the one implemented here might be useful for calculating the "predicted variables"—F_rim, p_rim, F_liq. I'm envisioning that after the state variables are calculated at each time step, we call this p3_predictor(), or like we talked about throw it in with thresholds(), distribution_parameter_solver(), etc... using the computed F_rim, p_rim, F_liq.

The advantage of having a call to P3 to compute the predicted variables is to catch limit cases early and ensure that we're passing physically reasonable values to the rest of the P3 functions, instead of hard-coding these things in KiD every time we compute the predicted quantities, so I thought I may as well implement this solution for fun! But no hard feelings if this PR gets closed and is never merged!

NOTE: This PR also allows the rime density to be 0. (Previously it had to be greater than 0.) I thought maybe this change could be useful because we could return 0 rime density for when we have no rime or no total ice content.

@rorlija1 rorlija1 added the P3 label Aug 28, 2024
Copy link

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.91%. Comparing base (9582b2d) to head (67bdfdc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #453      +/-   ##
==========================================
+ Coverage   96.89%   96.91%   +0.02%     
==========================================
  Files          41       41              
  Lines        1480     1490      +10     
==========================================
+ Hits         1434     1444      +10     
  Misses         46       46              
Components Coverage Δ
src 98.78% <100.00%> (+<0.01%) ⬆️
ext 69.79% <ø> (ø)

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