Insoluble dry radius in S_eq formulas#488
Open
AgnieszkaMakulska wants to merge 24 commits into
Open
Conversation
Contributor
AgnieszkaMakulska
commented
May 13, 2026
- considering insoluble radius for equilibrium and critical radius and saturation
- changing rd2_insol to rd3_insol
- fixing the random number vector for T_freeze initialization
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Lagrangian microphysics to account for an insoluble (non-hygroscopic) dry core in the Köhler equilibrium/critical calculations by introducing rd3_insol (dry insoluble radius cubed) and threading it through initialization, condensation/diagnostics, and bindings. It also adjusts ice nucleation inputs to use rd3_insol and changes T_freeze initialization to use a correctly-sized random vector.
Changes:
- Extend kappa-Köhler equilibrium/critical radius and critical supersaturation formulas to include insoluble dry-core volume (
rd3_insol). - Replace
rd2_insolwithrd3_insolacross initialization, condensation, diagnostics, and ice nucleation pathways. - Update Python tests/bindings and fix the random-number vector usage in
T_freezeinitialization.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/python/unit/source.py | Adjusts test aerosol insoluble radius parameter. |
| tests/python/unit/diag_incloud_time.py | Updates dry distribution keys and disables ice for this diagnostic test. |
| tests/python/unit/api_common.py | Updates Python API test calls for new rw3_cr/S_cr signatures. |
| src/particles_diag.ipp | Threads rd3_insol into diagnostic computations of Sc/rc-related selectors. |
| src/impl/particles_impl.ipp | Replaces/introduces stored particle attribute rd3_insol in distributed-memory vectors. |
| src/impl/initialization/particles_impl_reserve_hskpng_npart.ipp | Reserves storage for rd3_insol during particle allocation. |
| src/impl/initialization/particles_impl_init_wet.ipp | Uses rd3_insol when initializing wet equilibrium sizes. |
| src/impl/initialization/particles_impl_init_T_freeze.ipp | Fixes RNG vector usage and switches to rd3_insol input. |
| src/impl/initialization/particles_impl_init_SD_with_sizes.ipp | Initializes insoluble dry sizes regardless of ice_switch. |
| src/impl/initialization/particles_impl_init_SD_with_distros.ipp | Initializes insoluble dry sizes regardless of ice_switch. |
| src/impl/initialization/particles_impl_init_insol_dry_sizes.ipp | Fills rd3_insol using radius³ instead of radius². |
| src/impl/ice/particles_impl_ice_nucl_melt.ipp | Updates time-dependent freezing to use rd3_insol. |
| src/impl/housekeeping/particles_impl_hskpng_rc2.ipp | Includes rd3_insol in approximate rc² computations. |
| src/impl/diagnose_SD_attributes/particles_impl_update_incloud_time.ipp | Includes rd3_insol in rc² computation for incloud-time updates. |
| src/impl/diagnose_SD_attributes/particles_impl_fill_outbuf.ipp | Renames exposed attribute to rd3_insol (and updates validation). |
| src/impl/condensation/perparticle/perparticle_nomixing_adaptive_sstp_cond.ipp | Passes rd3_insol into per-particle condensation substepping kernel. |
| src/impl/condensation/perparticle/perparticle_advance_rw2.ipp | Adds rd3_insol into the condensation advance tuple. |
| src/impl/condensation/percell/particles_impl_cond.ipp | Adds rd3_insol into the per-cell condensation advance tuple. |
| src/impl/condensation/common/particles_impl_cond_common.ipp | Uses rd3_insol in activity calculation and updates debug diagnostics. |
| include/libcloudph++/common/kappa_koehler.hpp | Extends Köhler helper functions to include insoluble volume. |
| include/libcloudph++/common/ice_nucleation.hpp | Changes insoluble size parameterization from r² to r³ and derives surface area as r³^(2/3). |
| bindings/python/common.hpp | Updates Python binding wrappers for new rw3_cr/S_cr signatures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.