Skip to content
Merged
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
[submodule "atmos_phys"]
path = src/atmos_phys
url = https://github.com/ESCOMP/atmospheric_physics
fxtag = atmos_phys0_24_000
fxtag = atmos_phys0_26_000
fxrequired = AlwaysRequired
fxDONOTUSEurl = https://github.com/ESCOMP/atmospheric_physics

Expand Down
1 change: 0 additions & 1 deletion bld/build-namelist
Original file line number Diff line number Diff line change
Expand Up @@ -3435,7 +3435,6 @@ if ($cfg->get('microphys') =~ /^mg/) {
}

# Aerosol Namelist options
add_default($nl, 'microp_aero_bulk_scale');
add_default($nl, 'microp_aero_npccn_scale');
add_default($nl, 'microp_aero_wsub_scale');
add_default($nl, 'microp_aero_wsubi_scale');
Expand Down
1 change: 1 addition & 0 deletions bld/configure
Original file line number Diff line number Diff line change
Expand Up @@ -2198,6 +2198,7 @@ sub write_filepath
print $fh "$camsrcdir/src/atmos_phys/schemes/holtslag_boville\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/bretherton_park\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/beljaars_drag\n";
print $fh "$camsrcdir/src/atmos_phys/schemes/microp_aero\n";

# Dynamics package and test utilities
print $fh "$camsrcdir/src/dynamics/$dyn\n";
Expand Down
2 changes: 0 additions & 2 deletions bld/namelist_files/namelist_defaults_cam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2421,8 +2421,6 @@
<micro_mg_autocon_lwp_exp microphys="mg2" > 2.47D0 </micro_mg_autocon_lwp_exp>
<micro_mg_autocon_lwp_exp phys="cam7" > 2.37D0 </micro_mg_autocon_lwp_exp>

<microp_aero_bulk_scale > 2.D0 </microp_aero_bulk_scale>

<microp_aero_npccn_scale > 1.D0 </microp_aero_npccn_scale>
<microp_aero_npccn_scale microphys="mg2" > 1.D0 </microp_aero_npccn_scale>

Expand Down
6 changes: 0 additions & 6 deletions bld/namelist_files/namelist_definition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3051,12 +3051,6 @@ Default: .true.


<!-- Aerosol microphysics -->
<entry id="microp_aero_bulk_scale" type="real" category="microphys"
group="microp_aero_nl" valid_values="" >
prescribed aerosol bulk sulfur scale factor
Default: 2
</entry>

<entry id="microp_aero_npccn_scale" type="real" category="microphys"
group="microp_aero_nl" valid_values="" >
Unitless scaling factor for the activated number concentration of cloud condensation nuclei.
Expand Down
213 changes: 213 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,216 @@
===============================================================

Tag name: cam6_4_188
Originator(s): jimmielin
Date: July 20, 2026
One-line Summary: Move microp_aero (BAM: ndrop_bam, nucleate_ice, interstitials) to atmos_phys
Github PR URL: https://github.com/ESCOMP/CAM/pull/1579

Purpose of changes (include the issue number and title text for each relevant GitHub issue):
- Closes #1526
- Moves parts of `microp_aero` (nucleate_ice, ndrop_bam, interstitials) to atmospheric_physics
- Unify the BAM and MAM/CARMA paths for `nucleate_ice_cam`.
- Adds a new `aero_host_binding_t` type to remove `state` and `pbuf` from being directly contained within the abstract aerosol interface (`*_aerosol_state`), so CAM and CAM-SIMA code are less divergent with each other.

Describe any changes made to build system: add microp_aero build path from atmos_phys.

Describe any changes made to the namelist: remove microp_aero_bulk_scale which was fixed to 2.

List any changes to the defaults for the boundary datasets: N/A

Describe any substantial timing or memory changes: N/A

Code reviewed by: fvitt, nusbaume (atmos_phys), cacraig (CAM)

List all files eliminated:
D src/physics/cam/ndrop_bam.F90
D src/physics/cam/nucleate_ice.F90
- moved to atmospheric_physics.

List all files added and what they do:

List all existing files that have been modified, and describe the changes:
M src/physics/cam/microp_aero.F90
- refactor to use CCPPized interstitial schemes.
- move ndrop_bam to atmos_phys.

M src/physics/cam/nucleate_ice_cam.F90
- unify BAM path with MAM/CARMA via the abstract interface.

R079 src/physics/cam/aerosol_mmr_cam.F90 src/physics/cam/aerosol_mmr_host.F90
- rename so CAM-SIMA can have the same name
- add aero_host_binding_t to contain host data structures and further unify code.

M bld/build-namelist
M bld/namelist_files/namelist_defaults_cam.xml
M bld/namelist_files/namelist_definition.xml
- remove microp_aero_bulk_scale which was always set to 2.

M bld/configure
- add atmos_phys microp_aero subdirectory.

M .gitmodules
M src/atmos_phys
- update to atmos_phys0_26_000 (microp_aero: ndrop_bam, nucleate_ice, interstitials).

M src/chemistry/aerosol/aerosol_instances_mod.F90
- now use aero_host_binding_t to store state, pbuf in aerosol state.

M src/chemistry/aerosol/aerosol_state_mod.F90
- add ncol to aerosol_state.

M src/chemistry/aerosol/bulk_aerosol_properties_mod.F90
- implement apply_number_limits (does nothing by definition)

M src/chemistry/aerosol/bulk_aerosol_state_mod.F90
- use aero_host_binding_t
- implements number concentrations derived from mass by assumption built in
microp_aero (for ice nucleation)

M src/chemistry/aerosol/carma_aerosol_state_mod.F90
M src/chemistry/aerosol/modal_aerosol_state_mod.F90
- use aero_host_binding_t
- not fully portable yet because accesses pbuf for DGNUM, etc.

M src/chemistry/aerosol/radiative_aerosol.F90
- comment updates to sync up with CAM-SIMA
- remove REMOVECAM guards now that the host module is generic

M src/chemistry/aerosol/radiative_aerosol_definitions.F90
- use 256 instead of shr_kind_cl=256 for CAM-SIMA / CCPP compatibility
- add type initializations for safety

M src/chemistry/carma_aero/aero_model.F90
M src/physics/cam/phys_debug.F90
M src/physics/cam/rad_constituents.F90
M src/physics/cam/radiation_data.F90
M src/physics/camrt/radiation.F90
M src/physics/rrtmg/radiation.F90
M src/physics/rrtmgp/radiation.F90
- rename aerosol_mmr_cam -> aerosol_mmr_host

M src/chemistry/aerosol/aero_wetdep_cam.F90
- get persistent aerosol properties from the instances module, skipping BAM
(wetdep does not support BAM).

If there were any failures reported from running test_driver.sh on any test
platform, and checkin with these failures has been OK'd by the gatekeeper,
then copy the lines from the td.*.status files for the failed tests to the
appropriate machine below. All failed tests must be justified.

derecho/intel/aux_cam:
ERC_D_Ln9.f09_f09_mt232.FHIST_BDRD.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.f19_f19_mg17.QPMOZ.derecho_intel.cam-outfrq3s (Overall: NLFAIL) details:
ERC_D_Ln9.f19_f19_mt232.QPC6.derecho_intel.cam-outfrq3s_cosp (Overall: NLFAIL) details:
ERC_D_Ln9.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120 (Overall: NLFAIL) details:
ERC_D_Ln9.mpasa120_mpasa120.FHISTC_LTso.derecho_intel.cam-outfrq9s_mpasa120 (Overall: NLFAIL) details:
ERC_D_Ln9.mpasa120_mpasa120.QPC7.derecho_intel.cam-outfrq9s_mpasa120 (Overall: NLFAIL) details:
ERC_D_Ln9.ne30pg2_ne30pg2_mt232.QPC7.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.ne30pg3_ne30pg3_mt232.F1850C_LTso.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.ne3_ne3_mg37.QPC7.derecho_intel.cam-outfrq9s_rttov (Overall: NLFAIL) details:
ERC_Ln9.C96_C96_mt232.F2000climo.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERI_D_Ln18.f09_f09_mt232.FHIST.derecho_intel.cam-outfrq3s_eri (Overall: NLFAIL) details:
ERI_D_Ln18.f19_f19_mt232.FHIST_C5.derecho_intel.cam-outfrq3s_eri (Overall: NLFAIL) details:
ERI_D_Ln18.ne16pg3_ne16pg3_mt232.FHIST_C4.derecho_intel.cam-outfrq3s_eri (Overall: NLFAIL) details:
ERI_D_Ln18.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_intel.cam-outfrq3s_eri (Overall: NLFAIL) details:
ERP_D_Ln9.ne30pg3_ne30pg3_mt232.F1850C_MTso.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_D_Ln9_P64x2.f09_f09_mg17.QSC6.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ld3.ne16pg3_ne16pg3_mg17.FHISTC_WAt1ma.derecho_intel.cam-reduced_hist1d (Overall: NLFAIL) details:
ERP_Ld3.ne30pg3_ne30pg3_mt232.FHISTC_MTt4s.derecho_intel.cam-outfrq1d_aoa (Overall: NLFAIL) details:
ERP_Lh12.f19_f19_mg17.FW4madSD.derecho_intel.cam-outfrq3h (Overall: NLFAIL) details:
ERP_Ln9.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ln9.f19_f19_mg17.FWsc1850.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ln9.ne30pg3_ne30pg3_mg17.FCnudged.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERP_Ln9.ne30pg3_ne30pg3_mg17.FHISTC_WAma.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERR_Ln9.ne16pg3_ne16pg3_mt232.FHISTC_LTso.derecho_intel.cam-outfrq9s_bwic (Overall: NLFAIL) details:
ERS_Ln9.f09_f09_mg17.FX2000.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERS_Ln9.f19_f19_mg17.FXSD.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
ERS_Ln9.ne30pg3_ne30pg3_mg17.FHISTC_WXma.derecho_intel.cam-outfrq9s_ctem (Overall: NLFAIL) details:
SCT_D_Ln7.ne3_ne3_mg37.QPC5.derecho_intel.cam-scm_prep (Overall: NLFAIL) details:
SMS_C2_D_Ln9.ne16pg3_ne16pg3_mg17.FHISTC_WXma.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ld5.f09_f09_mt232.PC6.derecho_intel.cam-cam6_port_f09 (Overall: NLFAIL) details:
SMS_D_Ld5.f19_f19_mt232.PC4.derecho_intel.cam-cam4_port5d (Overall: NLFAIL) details:
SMS_D_Ln9.f09_f09_mg17.FCts2nudged.derecho_intel.cam-outfrq9s_leapday (Overall: NLFAIL) details:
SMS_D_Ln9.f09_f09_mg17.FCvbsxHIST.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9.f09_f09_mg17.FSD.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9.f19_f19_mg17.FCARMA2000climo.derecho_intel.cam-outfrq9s_carma_rad_diag (Overall: NLFAIL) details:
SMS_D_Ln9.f19_f19_mg17.FCHIST_SLH.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9.f19_f19_mg17.FWma2000climo.derecho_intel.cam-outfrq9s_waccm_ma_mam4 (Overall: NLFAIL) details:
SMS_D_Ln9.f19_f19_mg17.QPC2000climo.derecho_intel.cam-outfrq3s_usecase (Overall: NLFAIL) details:
SMS_D_Ln9.f19_f19_mt232.FHIST_C5.derecho_intel.cam-mam7 (Overall: NLFAIL) details:
SMS_D_Ln9.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9.ne16_ne16_mg17.QPX2000.derecho_intel.cam-outfrq9s_amie (Overall: NLFAIL) details:
SMS_D_Ln9.ne30pg3_ne30pg3_mt232.1850_CAM70%MT%CT4S2_CLM60%SP_CICE%PRES_DOCN%DOM_MOSART_SGLC_SWAV_SESP.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_MTso.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9_P1280x1.ne30pg3_ne30pg3_mt232.FHISTC_MTt1s.derecho_intel.cam-outfrq9s_Leung_dust (Overall: NLFAIL) details:
SMS_D_Ln9_P1536x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: NLFAIL) details:
SMS_Ld1.f09_f09_mg17.FCHIST_GC.derecho_intel.cam-outfrq1d (Overall: NLFAIL) details:
SMS_Ld1.f09_f09_mg17.FW2000climo.derecho_intel.cam-outfrq1d (Overall: NLFAIL) details:
SMS_Ld1.ne30pg3_ne30pg3_mg17.FC2010climo.derecho_intel.cam-outfrq1d (Overall: NLFAIL) details:
SMS_Lh12.f09_f09_mg17.FCSD_HCO.derecho_intel.cam-outfrq3h (Overall: NLFAIL) details:
SMS_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-nudging (Overall: NLFAIL) details:
SMS_Ln9.f09_f09_mg17.FW1850.derecho_intel.cam-reduced_hist3s (Overall: NLFAIL) details:
SMS_Ln9.f19_f19_mt232.F2000climo.derecho_intel.cam-silhs (Overall: NLFAIL) details:
SMS_Ln9.ne30pg3_ne30pg3_mg17.FW2000climo.derecho_intel.cam-outfrq9s_rrtmgp (Overall: NLFAIL) details:
- NLFAIL due to removed variable: 'microp_aero_bulk_scale'

derecho/nvhpc/aux_cam:
ERS_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_nvhpc.cam-outfrq9s_gpu_default (Overall: NLFAIL) details:
- NLFAIL due to removed variable: 'microp_aero_bulk_scale'

izumi/nag/aux_cam:
ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol (Overall: FAIL) details:
FAIL ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol NLCOMP
FAIL ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol COMPARE_base_rest
- pre-existing failure -- see https://github.com/ESCOMP/CAM/issues/1514

ERC_D_Ln27.ne3pg3_ne3pg3_mt232.FKESSLER.izumi_nag.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.f10_f10_mg37.QPWmaC6.izumi_nag.cam-outfrq3s (Overall: NLFAIL) details:
ERC_D_Ln9.f10_f10_mt232.FHIST.izumi_nag.cam-outfrq3s_cospsathist (Overall: NLFAIL) details:
ERC_D_Ln9.mpasa480_mpasa480_mt232.FHS94.izumi_nag.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.mpasa480_mpasa480_mt232.QPC7.izumi_nag.cam-outfrq9s_mpasa480 (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_nag.cam-cosp_rad_diags (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_nag.cam-outfrq9s_nochem (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.QPC4.izumi_nag.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9_P1x1.ne3pg3_ne3pg3_mt232.FADIAB.izumi_nag.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ld2.f45_f45_mg37.PC5.izumi_nag.cam-outfrq24h_port (Overall: NLFAIL) details:
SMS_D_Ln3.ne5pg3_ne5pg3_mg37.QPX2000.izumi_nag.cam-outfrq3s (Overall: NLFAIL) details:
SMS_D_Ln6.ne5_ne5_mg37.QPWmaC4.izumi_nag.cam-outfrq3s_physgrid_tem (Overall: NLFAIL) details:
SMS_D_Ln9.f10_f10_mt232.F1850.izumi_nag.cam-outfrq9s (Overall: NLFAIL) details:
SMS_D_Ln9.ne3pg3_ne3pg3_mt232.QPC7.izumi_nag.cam-carma_test_tracers (Overall: NLFAIL) details:
TMC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-mc_ttrac (Overall: NLFAIL) details:
- NLFAIL due to removed variable: 'microp_aero_bulk_scale'

izumi/gnu/aux_cam:
ERC_D_Ln9.C48_C48_mg17.QPC6.izumi_gnu.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.f10_f10_mg37.QPC4.izumi_gnu.cam-outfrq3s_diags (Overall: NLFAIL) details:
ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-rad_diag (Overall: NLFAIL) details:
ERC_D_Ln9.f19_f19_mt232.FHIST.izumi_gnu.cam-lonlat_fv_diags (Overall: NLFAIL) details:
ERC_D_Ln9.mpasa480_mpasa480_mt232.FHISTC_LTso.izumi_gnu.cam-outfrq9s_mpasa480 (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.F1850_C4.izumi_gnu.cam-co2rmp (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FGRAYRAD.izumi_gnu.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST_C5.izumi_gnu.cam-carma_cosp_rad_diag_mam (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_gnu.cam-sat_lcltod (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST.izumi_gnu.cam-nochem_clubbmf (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FTJ16.izumi_gnu.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.QPC5.izumi_gnu.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.ne3pg3_ne3pg3_mt232.QPC7.izumi_gnu.cam-outfrq9s (Overall: NLFAIL) details:
ERC_D_Ln9.ne5_ne5_mg37.QPC4.izumi_gnu.cam-outfrq3s_nudging_ne5_L26 (Overall: NLFAIL) details:
ERS_Ln9_P24x1.mpasa480_mpasa480.F2000climo.izumi_gnu.cam-outfrq9s_mpasa480 (Overall: NLFAIL) details:
PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal0 (Overall: NLFAIL) details:
PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal1 (Overall: NLFAIL) details:
PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal3 (Overall: NLFAIL) details:
SCT_D_Ln7.ne3_ne3_mg37.QPC6.izumi_gnu.cam-scm_prep_c6 (Overall: NLFAIL) details:
SMS_D_Ln3.f10_f10_mg37.QPMOZ.izumi_gnu.cam-outfrq3s_chemproc (Overall: NLFAIL) details:
SMS_D_Ln3.ne3pg3_ne3pg3_mt232.PC7.izumi_gnu.cam-pc7_ne3pg3 (Overall: NLFAIL) details:
SMS_D_Ln9.f10_f10_mg37.FWmaHIST.izumi_gnu.cam-outfrq9s_mee_fluxes (Overall: NLFAIL) details:
SMS_D_Ln9.f10_f10_mg37.QPWmaC4.izumi_gnu.cam-outfrq9s_apmee (Overall: NLFAIL) details:
SMS_D_Ln9.f19_f19_mt232.FW4madSD.izumi_gnu.cam-outfrq9s (Overall: NLFAIL) details:
SUB_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST.izumi_gnu.cam-outfrq9s (Overall: NLFAIL) details:
- NLFAIL due to removed variable: 'microp_aero_bulk_scale'

Summarize any changes to answers: B4B

===============================================================

Expand Down
2 changes: 1 addition & 1 deletion src/atmos_phys
Submodule atmos_phys updated 38 files
+64 −0 .github/workflows/xml_validation.yaml
+156 −0 schemes/microp_aero/compute_subgrid_vertical_velocity.F90
+155 −0 schemes/microp_aero/compute_subgrid_vertical_velocity.meta
+40 −0 schemes/microp_aero/dust_default_radii.F90
+43 −0 schemes/microp_aero/dust_default_radii.meta
+650 −0 schemes/microp_aero/ndrop_bam.F90
+596 −0 schemes/microp_aero/nucleate_ice.F90
+72 −0 schemes/microp_aero/scale_subgrid_vertical_velocity.F90
+79 −0 schemes/microp_aero/scale_subgrid_vertical_velocity.meta
+143 −0 schemes/microp_aero/scale_subgrid_vertical_velocity_namelist.xml
+41 −90 schemes/mmm/bl_gwdo_compat.F90
+30 −96 schemes/mmm/bl_gwdo_compat.meta
+52 −0 schemes/mmm/bl_gwdo_diag.F90
+63 −0 schemes/mmm/bl_gwdo_diag.meta
+528 −0 schemes/mmm/bl_mynn_compat.F90
+1,300 −0 schemes/mmm/bl_mynn_compat.meta
+257 −0 schemes/mmm/bl_mynn_diag.F90
+267 −0 schemes/mmm/bl_mynn_diag.meta
+3 −2 schemes/mmm/ccpp_kind_types.F90
+7 −83 schemes/mmm/cu_ntiedtke_compat.F90
+0 −96 schemes/mmm/cu_ntiedtke_compat.meta
+68 −0 schemes/mmm/cu_ntiedtke_diag.F90
+81 −0 schemes/mmm/cu_ntiedtke_diag.meta
+132 −26 schemes/mmm/mmm_physics_compat.F90
+275 −3 schemes/mmm/mmm_physics_compat.meta
+28 −132 schemes/mmm/sf_mynn_compat.F90
+35 −167 schemes/mmm/sf_mynn_compat.meta
+98 −0 schemes/mmm/sf_mynn_diag.F90
+129 −0 schemes/mmm/sf_mynn_diag.meta
+1 −3 schemes/sima_diagnostics/sima_state_diagnostics.F90
+101 −14 schemes/utilities/state_converters.F90
+229 −12 schemes/utilities/state_converters.meta
+24 −13 test/musica/test_musica_api.F90
+5 −4 test/musica/tuvx/test_tuvx_load_species.F90
+16 −4 test/test_suites/suite_convection_permitting.xml
+350 −61 test/unit-test/tests/mmm/mmm_physics_compat_tests.pf
+58 −13 test/unit-test/tests/utilities/test_state_converters.pf
+23 −1 to_be_ccppized/ccpp_const_utils.F90
37 changes: 16 additions & 21 deletions src/chemistry/aerosol/aero_wetdep_cam.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ module aero_wetdep_cam
use cam_history, only: addfld, add_default, horiz_only, outfld
use wetdep, only: wetdep_init

use radiative_aerosol, only: rad_aer_get_info

use aerosol_properties_mod, only: aero_name_len
use aerosol_properties_mod, only: aerosol_properties
use modal_aerosol_properties_mod, only: modal_aerosol_properties
use carma_aerosol_properties_mod, only: carma_aerosol_properties

use aerosol_state_mod, only: aerosol_state, ptr2d_t
use aerosol_instances_mod, only: aerosol_instances_get_state, &
Expand Down Expand Up @@ -66,8 +62,6 @@ module aero_wetdep_cam
real(r8),allocatable :: scavimptblnum(:,:)
real(r8),allocatable :: scavimptblvol(:,:)

integer :: nmodes=0
integer :: nbins=0
integer :: nspec_max=0
integer :: nele_tot ! total number of aerosol elements
class(aerosol_properties), pointer :: aero_props=>null()
Expand Down Expand Up @@ -158,8 +152,9 @@ subroutine aero_wetdep_init( )
logical :: history_aerosol ! Output MAM or SECT aerosol tendencies
logical :: history_chemistry

integer :: l,m, id, astat
integer :: l, m, id, astat, iaermod
character(len=2) :: binstr
class(aerosol_properties), pointer :: props_tmp

fracis_idx = pbuf_get_index('FRACIS')
rprddp_idx = pbuf_get_index('RPRDDP')
Expand All @@ -173,21 +168,21 @@ subroutine aero_wetdep_init( )
history_chemistry_out=history_chemistry, &
convproc_do_aer_out = convproc_do_aer)

call rad_aer_get_info(0, nmodes=nmodes, nbins=nbins)

if (nmodes>0) then
aero_props => modal_aerosol_properties()
if (.not.associated(aero_props)) then
call endrun(subrname//' : construction of aero_props modal_aerosol_properties object failed')
end if
else if (nbins>0) then
aero_props => carma_aerosol_properties()
if (.not.associated(aero_props)) then
call endrun(subrname//' : construction of aero_props carma_aerosol_properties object failed')
! get the persistent properties for the aerosol model wetdep is working on
! (wetdep does not work with BAM)
nullify(aero_props)
do iaermod = 1, aerosol_instances_get_num_models()
props_tmp => aerosol_instances_get_props(iaermod, 0)
if (associated(props_tmp)) then
if (.not. props_tmp%model_is('BAM')) then
aero_props => props_tmp
exit
end if
end if
else
call endrun(subrname//' : cannot determine aerosol model')
endif
end do
if (.not.associated(aero_props)) then
call endrun(subrname//' : no non-BAM aerosol properties instance available')
end if

nele_tot = aero_props%ncnst_tot()

Expand Down
Loading
Loading