fix(P3): correct the Cober-List impact-factor sign in the local rime density#764
Draft
haakon-e wants to merge 1 commit into
Draft
fix(P3): correct the Cober-List impact-factor sign in the local rime density#764haakon-e wants to merge 1 commit into
haakon-e wants to merge 1 commit into
Conversation
…density The impact factor divided by the signed Celsius temperature, so every subfreezing temperature produced a negative impact factor, which the [1, 12] range clamp pinned at 1. The local rime density was therefore a constant 159.5 kg/m3 at all temperatures, and rime never densified toward the solid-ice limit approaching the freezing point. Follow the Cober and List (1993) convention with the sub-zero surface temperature bounded strictly below 0 C, matching the P3 fortran code. Update the two rime-volume smoke-test references and extend the local rime density tests with interior Cober-List values, clamp limits, subfreezing densification, and the freezing-point edge.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #764 +/- ##
=======================================
Coverage 92.92% 92.92%
=======================================
Files 56 56
Lines 2896 2896
=======================================
Hits 2691 2691
Misses 205 205
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
compute_local_rime_densitydivides the Cober and List (1993) Eq. 16 impact factor by the signed Celsius temperature. Every subfreezing temperature therefore produced a negative impact factor, the[1, 12]range clamp pinned it at 1, and the local rime density was a constant 159.5 kg/m3 at all temperatures. The parameterization was effectively inert: rime never densified toward the solid-ice limit approaching the freezing point, and all rime-volume (B_rim) sources used floor-density rime.The fix follows the Cober and List convention with the sub-zero surface temperature bounded strictly below 0 C,
min(T - T_freeze, -1e-3), matching the P3 fortran code (microphy_p3.f90,iTc = 1/min(-0.001, Tc)), and applies the sign so the impact factor is positive for subfreezing temperatures.Impact: at the collision smoke-test state,
BCCOLdecreases by ~6% andBRCOLby a factor of ~5.7 (large raindrops now produce near-solid rime instead of floor-density rime). The local rime density at fixed sizes now ranges from ~294 kg/m3 at 240 K to the solid-ice limit approaching the freezing point, instead of a constant 159.5 kg/m3. Downstream, this changes theB_rimsources and hence the predicted rime densityrho_rim.Semantics at and above the freezing point (flagged for review): the temperature bound makes the impact factor large, so the clamp returns the solid-ice density. Collisions are evaluated in melt regimes too, and this choice keeps the function finite and monotone there; alternatives (e.g. reusing the 400 kg/m3 default) are possible if preferred.
Tests: interior Cober-List polynomial values, clamp limits, subfreezing densification monotonicity, a pinned value at 240 K, and the freezing-point edge. The two rime-volume smoke-test references are updated to the corrected values; all other collision outputs are unchanged, as expected since only the
B_rimcomponents depend on the local rime density.