Skip to content

Refactor Modal Aerosol Model (MAM) and aerosol deposition science code and move to atmos_phys - #1642

Draft
jimmielin wants to merge 6 commits into
ESCOMP:cam_developmentfrom
jimmielin:hplin/mam_atmos_phys
Draft

Refactor Modal Aerosol Model (MAM) and aerosol deposition science code and move to atmos_phys#1642
jimmielin wants to merge 6 commits into
ESCOMP:cam_developmentfrom
jimmielin:hplin/mam_atmos_phys

Conversation

@jimmielin

Copy link
Copy Markdown
Collaborator

Partially resolves #1614

More complete PR message forthcoming.

hplin-ucar and others added 2 commits August 10, 2026 12:31
… atmos_phys

This is the first step to CCPP conversion of MAM. This PR completes the CAM side work.
It refactors CAM-specific code into CAM interfaces (_cam suffix) and includes the MAM core
science code sourced from the atmos_phys external.

Refactor into portable code: modal_aero_calcsize, wateruptake, gasaerexch, rename

Refactor into portable code: modal_aero_calcsize, wateruptake, gasaerexch

Initial try at converting modal_aero_calcsize into portable code.

Initial try at converting modal_aero_wateruptake into portable code.

Put modal_aero_calcdry_run back in the portable subroutine and eliminate dual-path method - move to CAM interface.

Cleanup; rewire modal_strat_sulfate

Initial attempt for modal_aero_gasaerexch portability

Build fixes.

Alternate approach for modal_strat_sulfate (put in modal_aero_data) that does not need circular depends

Diagnostic b4b (partial) fix; loffset build fix

B4B fix for gasaerexch.

B4B fixes

Various cleanup; thread through rair

B4B fix 3

Thread pi through calcsize_dry_run

Initial attempt for modal_aero_rename portability.

Follow-up cleanups to modal_aero_rename refactor.

Refactor into portable code: modal_aero_newnuc (tendency-return).

Refactor into portable code: modal_aero_coag (in-place vmr, dqdt diagnostic-only).

Refactor into portable code: mo_setsox aqueous sulfur chemistry (setsox_sub + sox_cldaero + cldaero portable; mo_setsox_cam wrapper).

Refactor into portable code: aero_activate (activate_aerosol) + wetdep split; rewire convproc call sites.

Extract the Abdul-Razzak & Ghan activation kernel activate_aerosol from ndrop.F90 into portable aero_activate.F90.

Split wetdep.F90 into portable science (clddiag, wetdepa_v1, wetdepa_v2)

Refactor into portable code: full aero_convproc split + impaction tables to wetdep.

Remove pre-existing dead code from wetdep scavenging routines (unused dummies/locals).

Remove pre-existing dead code from aerosol drydep path.

Refactor into portable code: aerosol drydep leaves + dust_sediment_mod.

Remove aer_drydep_mod.F90: fully dead after the drydep portable split.

Behavior-neutral; separate commit so CAM regression b4b can bisect it.

Remove pre-existing dead code from MAM dust/seasalt emissions path.

Refactor into portable code: MAM dust + seasalt emissions cores.

Rename to avoid naming conflict with GEOS-Chem

Remove pre-existing dead code from ndrop gas-mixing path.

Refactor into portable code: ndrop (dropmixnuc) droplet activation core.

Unify the calcsize/wateruptake diag path in modal_aerosol_state_mod for CAM and CAM-SIMA.

Cleanup modal_aero_calcsize/wateruptake diag paths as they are moved to portable code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants