Support reference-state thermodynamics in anelastic microphysics - #3564
Draft
pressel wants to merge 11 commits into
Draft
Support reference-state thermodynamics in anelastic microphysics#3564pressel wants to merge 11 commits into
pressel wants to merge 11 commits into
Conversation
…tic-microphysics-pressure
…tic-microphysics-pressure
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.
Summary
This PR adds consistent pressure and temperature handling for Eulerian microphysics when ERF is run with anelastic dynamics.
For anelastic levels, the Kessler, SAM, and Morrison model families, along with WSM6, now use ERF's hydrostatic reference state:
Here, ($p_0$ ) is the hydrostatic reference pressure and ($\pi_0$ ) is the corresponding reference Exner function.
This avoids reconstructing microphysics pressure from the compressible equation of state on anelastic levels while preserving the existing compressible behavior.
Changes
Reference-state thermodynamics
Microphysics integration
Add a shared thermodynamic diagnosis for Eulerian microphysics and use it for the following anelastic model selections:
KesslerKessler_NoRainSAMSAM_NoIceSAM_NoPrecip_NoIceMorrisonMorrison_NoIceWSM6For these schemes, anelastic microphysics uses:
and:
Scheme-specific pressure conventions remain unchanged:
Compressible configurations continue to use the existing local equation-of-state diagnosis for pressure and temperature.
SuperDroplets compatibility
SuperDropletsis not currently supported when any AMR level uses anelastic dynamics.ERF now rejects this configuration early because the current SuperDroplets thermodynamic path reconstructs pressure through the compressible equation of state.
Users can instead:
The existing particle-enabled build requirement for SuperDroplets remains unchanged.
Cloud Chamber behavior
Restart compatibility
Documentation
Update the Sphinx microphysics documentation to explain:
The SuperDroplets compatibility warning and particle build requirement are retained in the dedicated Super-Droplet documentation section.
User impact
Users enable anelastic dynamics through the existing input:
The option may be specified once for all AMR levels or as one value per level.
No additional microphysics pressure field is required. ERF supplies the hydrostatic reference pressure and corresponding temperature to supported Eulerian schemes and handles internal pressure-unit conversions automatically.
Existing compressible configurations are unchanged.
Testing
This PR adds or strengthens coverage for:
Array4andMultiFabwiring;The
ABL_MOST_IMP_DIFF_TKEregression reference was regenerated after integrating current upstream changes. The resulting differences are at roundoff scale, and no regression comparison tolerances were loosened.Notes for reviewers
The stored reference Exner function is authoritative for anelastic temperature diagnosis. Microphysics does not recompute it from reference pressure inside each scheme kernel.
The compressible thermodynamic path is intentionally unchanged.
The updated TKE gold file reflects the current combined branch after upstream integration. The update does not loosen tolerances or intentionally change the physical configuration.