Skip to content

Complete CCPPization of BAM/MAM aerosol optics; BAM microp_aero (nucleate_ice; ndrop_bam; inline logic in microp_aero)#398

Open
jimmielin wants to merge 24 commits into
ESCOMP:mainfrom
jimmielin:hplin/bulk_aero_3_rebased_on_main
Open

Complete CCPPization of BAM/MAM aerosol optics; BAM microp_aero (nucleate_ice; ndrop_bam; inline logic in microp_aero)#398
jimmielin wants to merge 24 commits into
ESCOMP:mainfrom
jimmielin:hplin/bulk_aero_3_rebased_on_main

Conversation

@jimmielin
Copy link
Copy Markdown
Member

@jimmielin jimmielin commented May 18, 2026

Tag name:
Originator(s): @jimmielin

Description:

Companion CAM-SIMA PR: ESCOMP/CAM-SIMA#504

List all namelist files that were added or changed:

A  schemes/chemistry/aerosol_optics_namelist.xml
A  schemes/microp_aero/ccpp/nucleate_ice_ccpp_namelist.xml
A  schemes/microp_aero/scale_subgrid_vertical_velocity_namelist.xml
   - new scheme namelists

A  schemes/microp_aero/ccpp/hetfrz_classnuc_stub_namelist.xml
   - stub for use_hetfrz_classnuc flag (stub disables classnuc het freezing).

List all files eliminated and why: N/A

List all files added and what they do:

A  schemes/chemistry/aerosol_optics.F90
A  schemes/chemistry/aerosol_optics.meta
A  schemes/chemistry/aerosol_optics_namelist.xml
   - Aerosol optics scheme. Computes per-band SW/LW aerosol optical properties
     (extinction, SSA, asymmetry) from aerosol model instances via the abstract
     aerosol interface. Reads water refractive index data in init.

A  schemes/sima_diagnostics/aerosol_optics_diagnostics.F90
A  schemes/sima_diagnostics/aerosol_optics_diagnostics.meta
   - Aerosol optics diagnostics: per-species AOD, burden, SSA, visible AOD, etc.

A  schemes/chemistry/aerosol_optics_zero_stub.F90
A  schemes/chemistry/aerosol_optics_zero_stub.meta
   - Zero stub providing zeroed-out aerosol optical properties for RRTMGP
     snapshot testing without the full aerosol optics scheme.

A  schemes/chemistry/rebin_seasalt.F90
A  schemes/chemistry/rebin_seasalt.meta
   - Rebins 4-bin BAM prescribed seasalt (sslt01/02/03/04) to 2-bin
     (sslta/ssltc) using constituent mass fractions.

A  schemes/microp_aero/ndrop_bam.F90
   - Portable layer for bulk aerosol droplet activation (Abdul-Razzak and
     Ghan 2000). Computes droplet number tendency and CCN concentrations.
   - This is copied from CAM then slightly cleaned up

A  schemes/microp_aero/nucleate_ice.F90
   - Portable layer for ice nucleation (Liu and Penner 2005, Liu et al. 2007).
     Computes ice crystal number from homogeneous and heterogeneous nucleation.
   - This is copied from CAM

A  schemes/microp_aero/compute_subgrid_vertical_velocity.F90
A  schemes/microp_aero/compute_subgrid_vertical_velocity.meta
   - Computes subgrid vertical velocity (wsub, wsubi) from TKE or CLUBB WP2.
   - Original logic from CAM inlined in microp_aero

A  schemes/microp_aero/scale_subgrid_vertical_velocity.F90
A  schemes/microp_aero/scale_subgrid_vertical_velocity.meta
A  schemes/microp_aero/scale_subgrid_vertical_velocity_namelist.xml
   - Applies wsub_scale scaling factor to subgrid vertical velocity.
   - Original logic from CAM inlined in microp_aero

A  schemes/microp_aero/dust_default_radii.F90
A  schemes/microp_aero/dust_default_radii.meta
   - Sets default dust effective radii for radiation (dust1-4).
   - Original logic from CAM inlined in microp_aero

A  schemes/microp_aero/ccpp/ndrop_bam_ccpp.F90
A  schemes/microp_aero/ccpp/ndrop_bam_ccpp.meta
   - CCPP wrapper for ndrop_bam

A  schemes/microp_aero/ccpp/nucleate_ice_ccpp.F90
A  schemes/microp_aero/ccpp/nucleate_ice_ccpp.meta
A  schemes/microp_aero/ccpp/nucleate_ice_ccpp_namelist.xml
   - CCPP wrapper for nucleate_ice, equivalent to nucleate_ice_cam in CAM.

A  schemes/microp_aero/ccpp/hetfrz_classnuc_stub.F90
A  schemes/microp_aero/ccpp/hetfrz_classnuc_stub.meta
A  schemes/microp_aero/ccpp/hetfrz_classnuc_stub_namelist.xml
   - Stub for heterogeneous freezing (classnuc). Provides zero tendencies
     when use_hetfrz_classnuc is false. For BAM.

A  test/test_schemes/initialize_pbuf_aerosols.F90
A  test/test_schemes/initialize_pbuf_aerosols.meta
   - Test scheme for discovering aerosol number concentration species from
     pbuf-style "N:" fields via the abstract aerosol interface.

A  test/test_suites/suite_microp_aero_bam.xml
   - Test SDF for the microp_aero BAM suite.

A       schemes/sima_diagnostics/aerosol_optics_diagnostics.F90
A       schemes/sima_diagnostics/aerosol_optics_diagnostics.meta
A       schemes/sima_diagnostics/ndrop_bam_diagnostics.F90
A       schemes/sima_diagnostics/ndrop_bam_diagnostics.meta
A       schemes/sima_diagnostics/nucleate_ice_diagnostics.F90
A       schemes/sima_diagnostics/nucleate_ice_diagnostics.meta
A       schemes/sima_diagnostics/scale_subgrid_vertical_velocity_diagnostics.F90
A       schemes/sima_diagnostics/scale_subgrid_vertical_velocity_diagnostics.meta
   - diagnostic schemes

List all existing files that have been modified, and describe the changes:

M  schemes/rrtmgp/rrtmgp_sw_aerosols.F90
M  schemes/rrtmgp/rrtmgp_sw_aerosols.meta
   - Replace stub with implementation. Accepts aerosol tau/tau_w/tau_w_g from
     aerosol_optics, reorders from RRTMG to RRTMGP SW band ordering, maps CAM
     vertical levels to RRTMGP levels, subsets to daytime columns. Computes SSA
     and asymmetry parameter from the product fields.

M  schemes/rrtmgp/rrtmgp_lw_aerosols.F90
M  schemes/rrtmgp/rrtmgp_lw_aerosols.meta
   - Replace stub with implementation. Accepts aer_lw_abs from aerosol_optics,
     maps CAM vertical levels to RRTMGP levels. No band reorder needed for LW.

M  suites/suite_cam4.xml
   - Add prescribed aerosol/ozone schemes, rebin_seasalt, aerosol_optics, and
     aerosol_optics_diagnostics to CAM4 SDF
   - Reorder rrtmgp_pre before aerosol_optics so night column info is available for diagnostics.

M  test/test_suites/suite_rrtmgp.xml
   - Add aerosol_optics_zero_stub to RRTMGP test suite for snapshot testing to remain bit-for-bit.

List all automated tests that failed, as well as an explanation for why they weren't fixed:

Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?
New physics package
CAM regression tests for shared code
SIMA snapshot tests for microp_aero
Eyeballed the results from aerosol optics and looked reasonable.

If yes to the above question, describe how this code was validated with the new/modified features:

jimmielin added 21 commits May 18, 2026 12:22
…sol interface

Draft: wire up aerosol optics to rrtmgp

Move nswbands, nlwbands to host side namelist

wire up aerosol_optics in cam4 suite

to cherry-pick: remove constituent diag in prescribe_volcanic_aerosol

fix dim

diagnostic test; try to move radiative_aerosol_definitions to metadata instead of host-model dep

Fix idxnite not in rrtmgp_pre before running aerosol_optics; add ODV diags for bulk aerosol
@jimmielin jimmielin self-assigned this May 18, 2026
@jimmielin jimmielin added enhancement New feature or request aerosols Is related to aerosols (including aerosol physics and chemistry). labels May 18, 2026
Comment on lines +371 to +377
! Reset per-species accumulators for this bin/level
scatdust_d(:ncol) = 0._kind_phys; absdust_d(:ncol) = 0._kind_phys; hygrodust_d(:ncol) = 0._kind_phys
scatbc_d(:ncol) = 0._kind_phys; absbc_d(:ncol) = 0._kind_phys; hygrobc_d(:ncol) = 0._kind_phys
scatsulf_d(:ncol) = 0._kind_phys; abssulf_d(:ncol) = 0._kind_phys; hygrosulf_d(:ncol) = 0._kind_phys
scatpom_d(:ncol) = 0._kind_phys; abspom_d(:ncol) = 0._kind_phys; hygropom_d(:ncol) = 0._kind_phys
scatsoa_d(:ncol) = 0._kind_phys; abssoa_d(:ncol) = 0._kind_phys; hygrosoa_d(:ncol) = 0._kind_phys
scatsslt_d(:ncol) = 0._kind_phys; abssslt_d(:ncol) = 0._kind_phys; hygrosslt_d(:ncol) = 0._kind_phys
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A note that these variables of the code is intentionally hardcoded to match CAM aerosol_optics_cam.F90 and will be refactored in the future in CAM to be namelist-driven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aerosols Is related to aerosols (including aerosol physics and chemistry). enhancement New feature or request

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

CCPPize microp_aero.F90 (BAM path), nucleate_ice_cam.F90 (BAM path), ndrop_bam.F90 CCPPize sslt_rebin

1 participant