Skip to content

Commit 2a52c8a

Browse files
authored
Merge pull request #1404 from fvitt/bam_optics
cam6_4_135: Abstract aerosol interfaces extended for bulk representation
2 parents f226637 + 405492b commit 2a52c8a

14 files changed

+2485
-602
lines changed

cime_config/testdefs/testmods_dirs/cam/rad_diag/user_nl_cpl

Lines changed: 0 additions & 2 deletions
This file was deleted.

doc/ChangeLog

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,146 @@
1+
===============================================================
2+
3+
Tag name: cam6_4_135
4+
Originator(s): fvitt
5+
Date: 8 Dec 2025
6+
One-line Summary: Aerosol optics interfaces for bulk and volcanic aerosols
7+
Github PR URL: https://github.com/ESCOMP/CAM/pull/1404
8+
9+
Purpose of changes (include the issue number and title text for each relevant GitHub issue):
10+
Extend aerosol optics interfaces for bulk aerosols and volcanic aerosols.
11+
(issue #1400)
12+
13+
Describe any changes made to build system: N/A
14+
15+
Describe any changes made to the namelist: N/A
16+
17+
List any changes to the defaults for the boundary datasets: N/A
18+
19+
Describe any substantial timing or memory changes: N/A
20+
21+
Code reviewed by: jimmielin, gold2718
22+
23+
List all files eliminated:
24+
D cime_config/testdefs/testmods_dirs/cam/rad_diag/user_nl_cpl
25+
- reprosum_ namelist settings allowed roundoff level differences in
26+
summations across MPI tasks which was caused failure of this restart
27+
test: ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-rad_diag
128

29+
List all files added and what they do:
30+
A src/chemistry/aerosol/bulk_aerosol_properties_mod.F90
31+
A src/chemistry/aerosol/bulk_aerosol_state_mod.F90
32+
- minimal implementation for bulk aerosol optics
33+
34+
A src/chemistry/aerosol/hygro_aerosol_optics_mod.F90
35+
A src/chemistry/aerosol/hygroscopic_aerosol_optics_mod.F90
36+
A src/chemistry/aerosol/insoluble_aerosol_optics_mod.F90
37+
- aerosol optics types for bulk aerosols
38+
39+
A src/chemistry/aerosol/volcrad_aerosol_optics_mod.F90
40+
- aerosol optics type for volcanic aerosols
41+
42+
A src/physics/cam/aer_vis_diag_mod.F90
43+
- utility module for AOD diagnostics
44+
45+
List all existing files that have been modified, and describe the changes:
46+
47+
M src/chemistry/aerosol/aerosol_properties_mod.F90
48+
M src/chemistry/aerosol/carma_aerosol_properties_mod.F90
49+
M src/chemistry/aerosol/modal_aerosol_properties_mod.F90
50+
- implement model_is interface
51+
- add bulk and volcanic aerosol properties to the optics_params interface
52+
53+
M src/physics/cam/aer_rad_props.F90
54+
- bulk and volcanic aerosol optics code moved to extended aerosol_optics
55+
classes
56+
57+
M src/physics/cam/aerosol_optics_cam.F90
58+
- use the extended aerosol optics classes for bulk and volcanic aerosols
59+
60+
If there were any failures reported from running test_driver.sh on any test
61+
platform, and checkin with these failures has been OK'd by the gatekeeper,
62+
then copy the lines from the td.*.status files for the failed tests to the
63+
appropriate machine below. All failed tests must be justified.
64+
65+
derecho/intel/aux_cam:
66+
DIFF ERC_D_Ln9.f19_f19_mg17.QPMOZ.derecho_intel.cam-outfrq3s
67+
DIFF SMS_D_Ln9.ne16_ne16_mg17.QPX2000.derecho_intel.cam-outfrq9s_amie
68+
DIFF ERI_D_Ln18.ne16pg3_ne16pg3_mt232.FHIST_C4.derecho_intel.cam-outfrq3s_eri
69+
DIFF ERP_Lh12.f19_f19_mg17.FW4madSD.derecho_intel.cam-outfrq3h
70+
DIFF SMS_D_Ld5.f19_f19_mt232.PC4.derecho_intel.cam-cam4_port5d
71+
- bulk aerosol optics roundoff level differences
72+
73+
DIFF ERC_D_Ln9.f09_f09_mt232.FHIST_BDRD.derecho_intel.cam-outfrq9s
74+
DIFF ERC_D_Ln9.mpasa120_mpasa120.F2000climo.derecho_intel.cam-outfrq9s_mpasa120
75+
DIFF ERC_D_Ln9.mpasa120_mpasa120.FHISTC_LTso.derecho_intel.cam-outfrq9s_mpasa120
76+
DIFF ERC_D_Ln9.ne30pg3_ne30pg3_mt232.F1850C_LTso.derecho_intel.cam-outfrq9s
77+
DIFF ERC_Ln9.C96_C96_mt232.F2000climo.derecho_intel.cam-outfrq9s
78+
DIFF ERI_D_Ln18.f09_f09_mt232.FHIST.derecho_intel.cam-outfrq3s_eri
79+
DIFF ERI_D_Ln18.f19_f19_mt232.FHIST_C5.derecho_intel.cam-outfrq3s_eri
80+
DIFF ERI_D_Ln18.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_intel.cam-outfrq3s_eri
81+
DIFF ERP_D_Ln9.ne30pg3_ne30pg3_mt232.F1850C_MTso.derecho_intel.cam-outfrq9s
82+
DIFF ERP_Ln9.f19_f19_mg17.FWsc1850.derecho_intel.cam-outfrq9s
83+
DIFF ERR_Ln9.ne16pg3_ne16pg3_mt232.FHISTC_LTso.derecho_intel.cam-outfrq9s_bwic
84+
DIFF SMS_D_Ln9.f09_f09_mg17.FSD.derecho_intel.cam-outfrq9s
85+
DIFF SMS_D_Ln9.f19_f19_mt232.FHIST_C5.derecho_intel.cam-mam7
86+
DIFF SMS_D_Ln9.ne0ARCTICne30x4_ne0ARCTICne30x4_mt12.FHIST.derecho_intel.cam-outfrq9s
87+
DIFF SMS_D_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_MTso.derecho_intel.cam-outfrq9s
88+
DIFF SMS_Ln9.f09_f09_mg17.F2010climo.derecho_intel.cam-nudging
89+
DIFF SMS_Ln9.f19_f19_mt232.F2000climo.derecho_intel.cam-silhs
90+
DIFF SMS_D_Ld5.f09_f09_mt232.PC6.derecho_intel.cam-cam6_port_f09
91+
- volcanic aerosol optics roundoff level differences
92+
93+
94+
SMS_D_Ln9_P1536x1.ne0CONUSne30x8_ne0CONUSne30x8_mt12.FCHIST.derecho_intel.cam-outfrq9s (Overall: DIFF) details:
95+
- intermittent failure in CTSM code (lnd_set_decomp_and_domain.F90)
96+
- This test failed the first time but passed on a retry. Keeping this in the ChangeLog until CTSM makes a fix
97+
98+
derecho/nvhpc/aux_cam:
99+
FAIL ERS_Ln9.ne30pg3_ne30pg3_mt232.FHISTC_LTso.derecho_nvhpc.cam-outfrq9s_gpu_default
100+
-pre-existing failure -- exceeds wallclock time limit
101+
NOTE: Jian has determined this is due to changes on derecho with the the last upgrade.
102+
He has reported the issue to CISL. Note cam6_4_128 is the last CAM tag with
103+
baselines to use for comparison but answer changes are expected starting with
104+
cam6_4_130.
105+
106+
izumi/nag/aux_cam:
107+
DIFF SMS_D_Ln3.ne5pg3_ne5pg3_mg37.QPX2000.izumi_nag.cam-outfrq3s
108+
DIFF SMS_D_Ln6.ne5_ne5_mg37.QPWmaC4.izumi_nag.cam-outfrq3s_physgrid_tem
109+
- bulk aerosol optics roundoff level differences
110+
111+
DIFF ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-outfrq3s_subcol
112+
DIFF ERC_D_Ln9.f10_f10_mt232.FHIST.izumi_nag.cam-outfrq3s_cospsathist
113+
DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_nag.cam-cosp_rad_diags
114+
DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_nag.cam-outfrq9s_nochem
115+
DIFF SMS_D_Ln9.f10_f10_mt232.F1850.izumi_nag.cam-outfrq9s
116+
DIFF TMC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_nag.cam-mc_ttrac
117+
- volcanic aerosol optics roundoff level differences
118+
119+
izumi/gnu/aux_cam:
120+
DIFF ERC_D_Ln9.f10_f10_mg37.QPC4.izumi_gnu.cam-outfrq3s_diags
121+
DIFF SMS_D_Ln9.f10_f10_mg37.QPWmaC4.izumi_gnu.cam-outfrq9s_apmee
122+
DIFF SMS_D_Ln3.f10_f10_mg37.QPMOZ.izumi_gnu.cam-outfrq3s_chemproc
123+
DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.F1850_C4.izumi_gnu.cam-co2rmp
124+
DIFF SMS_D_Ln9.f19_f19_mt232.FW4madSD.izumi_gnu.cam-outfrq9s
125+
DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST.izumi_gnu.cam-nochem_clubbmf
126+
DIFF ERC_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-rad_diag
127+
- bulk aerosol optics roundoff level differences
128+
129+
DIFF ERC_D_Ln9.f19_f19_mt232.FHIST.izumi_gnu.cam-lonlat_fv_diags
130+
DIFF ERC_D_Ln9.mpasa480_mpasa480_mt232.FHISTC_LTso.izumi_gnu.cam-outfrq9s_mpasa480
131+
DIFF ERC_D_Ln9.ne3pg3_ne3pg3_mt232.FHISTC_LTso.izumi_gnu.cam-sat_lcltod
132+
DIFF ERS_Ln9_P24x1.mpasa480_mpasa480.F2000climo.izumi_gnu.cam-outfrq9s_mpasa480
133+
DIFF PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal0
134+
DIFF PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal1
135+
DIFF PLB_D_Ln9.f10_f10_mt232.FHIST_C5.izumi_gnu.cam-ttrac_loadbal3
136+
DIFF SMS_D_Ln3.ne3pg3_ne3pg3_mt232.PC7.izumi_gnu.cam-pc7_ne3pg3
137+
DIFF SUB_D_Ln9.ne3pg3_ne3pg3_mt232.FHIST.izumi_gnu.cam-outfrq9s
138+
DIFF SCT_D_Ln7.ne3_ne3_mg37.QPC6.izumi_gnu.cam-scm_prep_c6
139+
- volcanic aerosol optics roundoff level differences
140+
141+
Summarize any changes to answers: roundoff
142+
143+
===============================================================
2144
===============================================================
3145

4146
Tag name: cam6_4_134

src/chemistry/aerosol/aerosol_properties_mod.F90

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ module aerosol_properties_mod
7474
procedure(aero_resuspension_resize), deferred :: resuspension_resize
7575
procedure(aero_rebin_bulk_fluxes), deferred :: rebin_bulk_fluxes
7676
procedure(aero_hydrophilic), deferred :: hydrophilic
77+
procedure(aero_id_query), deferred :: model_is
7778

7879
procedure :: final=>aero_props_final
7980
end type aerosol_properties
@@ -101,7 +102,7 @@ end function aero_number_transported
101102
! species morphology
102103
!------------------------------------------------------------------------
103104
subroutine aero_props_get(self, bin_ndx, species_ndx, list_ndx, density, hygro, &
104-
spectype, specname, specmorph, refindex_sw, refindex_lw)
105+
spectype, specname, specmorph, refindex_sw, refindex_lw)
105106
import :: aerosol_properties, r8
106107
class(aerosol_properties), intent(in) :: self
107108
integer, intent(in) :: bin_ndx ! bin index
@@ -124,7 +125,10 @@ subroutine aero_optics_params(self, list_ndx, bin_ndx, opticstype, extpsw, absps
124125
refrtabsw, refitabsw, refrtablw, refitablw, ncoef, prefr, prefi, sw_hygro_ext_wtp, &
125126
sw_hygro_ssa_wtp, sw_hygro_asm_wtp, lw_hygro_ext_wtp, wgtpct, nwtp, &
126127
sw_hygro_coreshell_ext, sw_hygro_coreshell_ssa, sw_hygro_coreshell_asm, lw_hygro_coreshell_ext, &
127-
corefrac, bcdust, kap, relh, nfrac, nbcdust, nkap, nrelh )
128+
corefrac, bcdust, kap, relh, nfrac, nbcdust, nkap, nrelh, &
129+
sw_hygroscopic_ext, sw_hygroscopic_ssa, sw_hygroscopic_asm, lw_hygroscopic_ext, &
130+
sw_insoluble_ext, sw_insoluble_ssa, sw_insoluble_asm, lw_insoluble_ext, &
131+
r_sw_ext, r_sw_scat, r_sw_ascat, r_mu, r_lw_abs )
128132

129133
import :: aerosol_properties, r8
130134

@@ -169,6 +173,25 @@ subroutine aero_optics_params(self, list_ndx, bin_ndx, opticstype, extpsw, absps
169173
integer, optional, intent(out) :: nkap ! hygroscopicity dimension size
170174
integer, optional, intent(out) :: nrelh ! relative humidity dimension size
171175

176+
! hygroscopic
177+
real(r8), optional, pointer :: sw_hygroscopic_ext(:,:) ! short wave extinction table
178+
real(r8), optional, pointer :: sw_hygroscopic_ssa(:,:) ! short wave single-scatter albedo table
179+
real(r8), optional, pointer :: sw_hygroscopic_asm(:,:) ! short wave asymmetry table
180+
real(r8), optional, pointer :: lw_hygroscopic_ext(:,:) ! long wave absorption table
181+
182+
! non-hygroscopic (insoluble)
183+
real(r8), optional, pointer :: sw_insoluble_ext(:) ! short wave extinction table
184+
real(r8), optional, pointer :: sw_insoluble_ssa(:) ! short wave single-scatter albedo table
185+
real(r8), optional, pointer :: sw_insoluble_asm(:) ! short wave asymmetry table
186+
real(r8), optional, pointer :: lw_insoluble_ext(:) ! long wave absorption table
187+
188+
! volcanic radius
189+
real(r8), optional, pointer :: r_sw_ext(:,:)
190+
real(r8), optional, pointer :: r_sw_scat (:,:)
191+
real(r8), optional, pointer :: r_sw_ascat(:,:)
192+
real(r8), optional, pointer :: r_mu(:)
193+
real(r8), optional, pointer :: r_lw_abs(:,:)
194+
172195
end subroutine aero_optics_params
173196

174197
!------------------------------------------------------------------------
@@ -375,12 +398,12 @@ end function aero_alogsig_rlist
375398
! returns name for a given radiation list number and aerosol bin
376399
!------------------------------------------------------------------------------
377400
function aero_bin_name(self, list_ndx, bin_ndx) result(name)
378-
import :: aerosol_properties, r8
401+
import :: aerosol_properties, r8, aero_name_len
379402
class(aerosol_properties), intent(in) :: self
380403
integer, intent(in) :: list_ndx ! radiation list number
381404
integer, intent(in) :: bin_ndx ! bin number
382405

383-
character(len=32) name
406+
character(len=aero_name_len) :: name
384407

385408
end function aero_bin_name
386409

@@ -434,6 +457,15 @@ logical function aero_hydrophilic(self, bin_ndx)
434457
integer, intent(in) :: bin_ndx ! bin number
435458
end function aero_hydrophilic
436459

460+
!------------------------------------------------------------------------------
461+
! Returns TRUE if the aerosol model matches the query, otherwise FALSE
462+
!------------------------------------------------------------------------------
463+
logical function aero_id_query(self, query)
464+
import :: aerosol_properties
465+
class(aerosol_properties), intent(in) :: self
466+
character(len=*), intent(in) :: query
467+
end function aero_id_query
468+
437469
end interface
438470

439471
contains

0 commit comments

Comments
 (0)