Casim ARG activation - #709
Open
iboutle wants to merge 17 commits into
Open
Conversation
Bring the UM routines needed for CASIM mechanistic (ARG) activation on
one-way UKCA aerosol input into the lfric_apps CASIM directory:
aerosol_extract_convert_mod.F90
aerosol_extract_convert - UKCA tracers to CASIM modal mass,
number and Bk for the main CASIM call
casim_activation_in_um_mod.F90
examine_ukca_aerosol_column - UKCA tracers to the CASIM internal
aerosol arrays
activate_column_ukca - activation of cloud made by physics
outside CASIM
Both files are copied from src/atmosphere/large_scale_precipitation/CASIM
in the UM unaltered apart from the lfric_apps code styling (lower case
Fortran keywords and intrinsics). Only the routines needed for
casim_iopt_act = 3 with casim_aerosol_couple_choice = ukca_aerosol_in
have been taken; the murk, tracer and two-way UKCA variants are left
behind, and the public list of casim_activation_in_um_mod is trimmed to
match.
The UM routines are dimensioned over tdims. lfric_apps runs the UM
physics with row_length = rows = 1 inside column kernels, so tdims
covers a single column and the routines can be used unchanged.
Some of the content of this change has been produced with the assistance of Anthropic Claude Opus 5 (Claude Code).
The copied UM CASIM routines declare their UKCA tracer arguments with the UM module variable tr_ukca and index them with nmr_index_um and mmr_index_um, so both have to be available in lfric_apps. Add tr_ukca to nlsizes_namelist_mod and set it in set_ukca_field_lists, alongside the call that asks UKCA for its tracer list. nmr_index_um and mmr_index_um were only set up when plume scavenging was active, which ties them to the choice of convection scheme. They are now set up whenever UKCA is initialised. Some of the content of this change has been produced with the assistance of Anthropic Claude Opus 5 (Claude Code).
Introduce namelist:microphysics=casim_activation with values 'fixed' (the existing behaviour, casim_iopt_act = fixed_number) and 'arg' (mechanistic activation following Abdul-Razzak and Ghan, casim_iopt_act = 3). The 'arg' option requires the UKCA GLOMAP modal aerosol, so it errors if glomap_mode is anything other than glomap_mode_ukca. casim_set_dependent_switches only selects soluble_insoluble_modes when the ice nucleation scheme asks for the insoluble modes, and LFRic fixes casim_iopt_inuc at 1. Since LFRic supplies the full set of soluble and insoluble GLOMAP modes, casim_aerosol_option is overridden after the call. This is safe because the value is not passed to CASIM until the later call to set_mphys_switches. casim_cdnc_opt is now triggered by casim_activation == 'fixed', as it has no meaning when the droplet number is derived mechanistically from the aerosol. Some of the content of this change has been produced with the assistance of Anthropic Claude Opus 5 (Claude Code).
The CASIM Abdul-Razzak and Ghan activation needs the soluble and insoluble aerosol modes, which were previously hardwired to zero in the CASIM kernel. Add a helper which gathers the LFRic GLOMAP prognostics into a UKCA tracer array column, and use the UM aerosol_extract_convert to fill the CASIM aerosol arrays from it. Some of the content of this change has been produced with the assistance of Anthropic Claude Opus 5 (Claude Code).
Liquid cloud can be created or removed by physics outside CASIM. With the Abdul-Razzak and Ghan activation, the droplet number for any newly created cloud is worked out from the GLOMAP modal aerosol using the UM activate_column_ukca, and removed again where the cloud has gone. Keep copies of the liquid cloud from before the fast physics so that the change can be diagnosed, and take the in-cloud number for radiation from CASIM whenever the activation is mechanistic. Note that the activation holds the column aerosol in module level storage, so the activation algorithm is not thread safe. Some of the content of this change has been produced with the assistance of Anthropic Claude Opus 5 (Claude Code).
The GLOMAP mode number and component mass indices set up by ukca_set_conv_indices were previously built only for plume scavenging, and were made unconditional so that the CASIM aerosol interface could use them too. Running the setup in every UKCA configuration is wider than needed and exposes configurations that never called it to the ereport in ukca_set_conv_indices for an unrecognised component suffix. Gate it instead on the circumstances that actually need it: plume scavenging as before, or CASIM running with Abdul-Razzak and Ghan activation. The switches are taken from the microphysics namelist rather than the derived casim_iopt_act, which is only assigned inside the CASIM branch of um_physics_init. The copy in aerosol_ukca_dust_only_init reverts to the original plume scavenging test, as Abdul-Razzak and Ghan activation requires the full GLOMAP aerosol and so never reaches the dust-only path. Some of the content of this change has been produced with the assistance of Anthropic Claude Opus 5 (Claude Code).
|
Your CLA signature was found on the base branch, but you appear to have modified the CONTRIBUTORS.md file in this PR. Please do not edit the CONTRIBUTORS.md file. If you have already signed the CLA, revert changes to the file and your signature will be picked up. |
iboutle
marked this pull request as ready for review
August 14, 2026 12:22
iboutle
requested review from
David Lee (davelee2804),
James Bruten (james-bruten-mo),
paulfield2024 and
Wolfgang Hayek (tinyendian)
as code owners
August 14, 2026 12:22
iboutle
requested review from
Ricky Wong (mo-rickywong)
and removed request for
a team
August 14, 2026 12:22
James Bruten (james-bruten-mo)
approved these changes
Aug 18, 2026
James Bruten (james-bruten-mo)
left a comment
Collaborator
There was a problem hiding this comment.
Macro / rose-stem changes looks good
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.
PR Summary
Sci/Tech Reviewer: paulfield2024
Code Reviewer: Erica Neininger (@ericaneininger)
Implements activation of UCKA aerosol into Casim prognostic drop numbers. This is the one-way coupling only, there is no processing of the aerosol inside Casim (yet). The 2 routines in
physics_schemes/source/large_scale_precipitation/CASIMare direct imports from the UM code (i.e. only code styling and a minor bugfix has been made)Linked to MetOffice/casim#19
Valnote: Autoassess
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - casim_arg_activation/run1
Suite Information
✅ succeeded tasks - 1376
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review