Skip to content

Conversation

@haakon-e
Copy link
Member

@haakon-e haakon-e commented Jul 25, 2025

This pull request introduces support for a new combined precipitation scheme, Precipitation2M_P3, which integrates a two-moment rain scheme with a P3-based ice precipitation scheme. The changes include new type definitions, updates to initialization and auxiliary computation functions, and the implementation of collision and advection tendencies for the new scheme. This enables more physically detailed modeling of mixed-phase precipitation processes.

New Precipitation Scheme Implementation

  • Added new structs IcePrecipitationP3 and Precipitation2M_P3 to represent the P3 ice scheme and the combined two-moment rain + P3 ice scheme, respectively, and exported them in equation_types.jl. [1] [2]

Initialization and State Handling

  • Updated initialization logic in helper_functions.jl, initial_condition.jl, and ode_utils.jl to handle state variables and auxiliary variables required by Precipitation2M_P3 and IcePrecipitationP3. This includes new fields for riming and distribution parameters. [1] [2] [3] [4] [5]

Auxiliary Computations

  • Implemented precompute_aux_thermo!, precompute_aux_precip!, and related functions for the new precipitation types, ensuring derived quantities and terminal velocities are calculated for both rain and ice components. [1] [2]

Source Terms and Tendencies

  • Added collision source term calculations and tendency updates for the combined scheme (precip_sources_tendency!), including bulk liquid-ice collision logic and updates to all relevant state variables.
  • Implemented advection tendencies for IcePrecipitationP3 and Precipitation2M_P3, handling the transport of ice-related quantities.

Integration and Output

  • Updated driver and model integration code to support the new precipitation scheme, including output folder naming and main RHS function logic. [1] [2] [3]

These changes collectively enable detailed simulation of mixed-phase precipitation processes, combining established rain and advanced ice microphysics.

@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from ef4a1d7 to 5892069 Compare July 25, 2025 23:31
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from 97c46c9 to 5326a49 Compare July 25, 2025 23:31
@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from 5892069 to 278249b Compare July 25, 2025 23:35
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from 5326a49 to 61cc1a2 Compare July 25, 2025 23:35
@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from 278249b to c230ef0 Compare July 25, 2025 23:40
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from 61cc1a2 to 2a86ba3 Compare July 25, 2025 23:40
@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from c230ef0 to 8f0edfb Compare July 26, 2025 00:02
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from 2a86ba3 to 2551f64 Compare July 26, 2025 00:02
@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from 8f0edfb to 190a998 Compare July 26, 2025 02:23
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from 2551f64 to 723a369 Compare July 26, 2025 02:23
@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from 190a998 to 9bf2535 Compare July 26, 2025 02:26
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from 723a369 to ed75064 Compare July 26, 2025 02:26
@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from 9bf2535 to 4e7d411 Compare July 26, 2025 03:26
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from ed75064 to 534b2c0 Compare July 26, 2025 03:26
@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from 4e7d411 to 30d9141 Compare July 29, 2025 22:06
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from 534b2c0 to 7bfbc57 Compare July 29, 2025 22:06
@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from 30d9141 to 8239464 Compare July 29, 2025 23:51
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from 7bfbc57 to b5a16a6 Compare July 29, 2025 23:51
@haakon-e haakon-e force-pushed the he/rft-nonequilibriummoisture branch from 8239464 to 2f5f844 Compare August 14, 2025 21:13
@haakon-e haakon-e changed the base branch from he/rft-nonequilibriummoisture to he/rft-improve-error-handling August 16, 2025 00:43
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from b5a16a6 to e164fbb Compare August 16, 2025 00:43
@haakon-e haakon-e force-pushed the he/rft-improve-error-handling branch from 4a69df7 to 944d99e Compare August 16, 2025 00:45
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from e164fbb to 9594689 Compare August 16, 2025 00:45
@codecov
Copy link

codecov bot commented Aug 16, 2025

Codecov Report

❌ Patch coverage is 4.44444% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.85%. Comparing base (944d99e) to head (9594689).

Files with missing lines Patch % Lines
src/Common/tendency.jl 2.50% 39 Missing ⚠️
src/K1DModel/tendency.jl 0.00% 25 Missing ⚠️
src/Common/ode_utils.jl 14.28% 12 Missing ⚠️
src/Common/helper_functions.jl 11.11% 8 Missing ⚠️
src/Common/equation_types.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                        @@
##           he/rft-improve-error-handling     #229      +/-   ##
=================================================================
- Coverage                          67.93%   63.85%   -4.09%     
=================================================================
  Files                                 19       19              
  Lines                               1310     1397      +87     
=================================================================
+ Hits                                 890      892       +2     
- Misses                               420      505      +85     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from he/rft-improve-error-handling to main August 20, 2025 23:47
@haakon-e haakon-e marked this pull request as ready for review August 20, 2025 23:49
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch 2 times, most recently from be81faf to 58312c4 Compare August 23, 2025 00:37
@haakon-e haakon-e changed the title wip p3 collisions feat: p3 simulation with liquid-ice collisions Aug 23, 2025
@haakon-e haakon-e force-pushed the he/feat-p3-ice-precipitation-scheme branch from 58312c4 to ba8555a Compare September 22, 2025 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant