Skip to content

Commit 301a456

Browse files
jimmielinhplin-ucarHaipeng Lin
authored
Complete CCPPization of BAM/MAM aerosol optics; BAM microp_aero (nucleate_ice; ndrop_bam; inline logic in microp_aero) (ESCOMP#398)
Tag name: atmos_phys0_28_000 Originator(s): @jimmielin Description: - Adds aerosol optics schemes for all aerosol models for CAM-SIMA. - Closes ESCOMP#381 - Adds `microp_aero` schemes for BAM in CAM-SIMA; shared code with CAM. - Closes ESCOMP#373 - rebin seasalt - Partially ESCOMP#360 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: --------- Co-authored-by: Haipeng Lin <hplin@ucar.edu> Co-authored-by: Haipeng Lin <hplin+github@ucar.edu>
1 parent 2c3c0b5 commit 301a456

42 files changed

Lines changed: 4941 additions & 58 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

schemes/chemistry/aerosol_optics.F90

Lines changed: 556 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
[ccpp-table-properties]
2+
name = aerosol_optics
3+
type = scheme
4+
5+
[ccpp-arg-table]
6+
name = aerosol_optics_init
7+
type = scheme
8+
[ water_refindex_file ]
9+
standard_name = filename_of_water_refractive_index_data
10+
units = none
11+
type = character | kind = len=*
12+
dimensions = ()
13+
intent = in
14+
[ nswbands ]
15+
standard_name = number_of_bands_for_shortwave_radiation
16+
units = count
17+
type = integer
18+
dimensions = ()
19+
intent = in
20+
[ nlwbands ]
21+
standard_name = number_of_bands_for_longwave_radiation
22+
units = count
23+
type = integer
24+
dimensions = ()
25+
intent = in
26+
[ num_bulk_aer ]
27+
standard_name = number_of_bulk_aerosol_constituents_in_climate_radiative_aerosol_list
28+
units = count
29+
type = integer
30+
dimensions = ()
31+
intent = out
32+
[ errmsg ]
33+
standard_name = ccpp_error_message
34+
units = none
35+
type = character | kind = len=*
36+
dimensions = ()
37+
intent = out
38+
[ errflg ]
39+
standard_name = ccpp_error_code
40+
units = 1
41+
type = integer
42+
dimensions = ()
43+
intent = out
44+
45+
[ccpp-arg-table]
46+
name = aerosol_optics_run
47+
type = scheme
48+
[ ncol ]
49+
standard_name = horizontal_loop_extent
50+
units = count
51+
type = integer
52+
dimensions = ()
53+
intent = in
54+
[ pver ]
55+
standard_name = vertical_layer_dimension
56+
units = count
57+
type = integer
58+
dimensions = ()
59+
intent = in
60+
[ nswbands ]
61+
standard_name = number_of_bands_for_shortwave_radiation
62+
units = count
63+
type = integer
64+
dimensions = ()
65+
intent = in
66+
[ nlwbands ]
67+
standard_name = number_of_bands_for_longwave_radiation
68+
units = count
69+
type = integer
70+
dimensions = ()
71+
intent = in
72+
[ top_lev ]
73+
standard_name = vertical_layer_index_of_aerosol_model_top
74+
units = index
75+
type = integer
76+
dimensions = ()
77+
intent = in
78+
[ rga ]
79+
standard_name = reciprocal_of_gravitational_acceleration
80+
units = s2 m-1
81+
type = real | kind = kind_phys
82+
dimensions = ()
83+
intent = in
84+
[ idx_sw_diag ]
85+
standard_name = index_of_shortwave_band
86+
units = index
87+
type = integer
88+
dimensions = ()
89+
intent = in
90+
[ num_bulk_aer ]
91+
standard_name = number_of_bulk_aerosol_constituents_in_climate_radiative_aerosol_list
92+
units = count
93+
type = integer
94+
dimensions = ()
95+
intent = in
96+
[ relh ]
97+
standard_name = relative_humidity
98+
units = fraction
99+
type = real | kind = kind_phys
100+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
101+
intent = in
102+
[ pdeldry ]
103+
standard_name = air_pressure_thickness_of_dry_air
104+
units = Pa
105+
type = real | kind = kind_phys
106+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
107+
intent = in
108+
[ t ]
109+
standard_name = air_temperature
110+
units = K
111+
type = real | kind = kind_phys
112+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
113+
intent = in
114+
[ pmid ]
115+
standard_name = air_pressure
116+
units = Pa
117+
type = real | kind = kind_phys
118+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
119+
intent = in
120+
[ h2ommr ]
121+
standard_name = water_vapor_mixing_ratio_wrt_moist_air_and_condensed_water
122+
units = kg kg-1
123+
type = real | kind = kind_phys
124+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
125+
intent = in
126+
[ cldn ]
127+
standard_name = cloud_area_fraction
128+
units = fraction
129+
type = real | kind = kind_phys
130+
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
131+
intent = in
132+
[ constituents ]
133+
standard_name = ccpp_constituents
134+
units = none
135+
type = real | kind = kind_phys
136+
dimensions = (horizontal_loop_extent, vertical_layer_dimension, number_of_ccpp_constituents)
137+
intent = in
138+
[ aer_tau ]
139+
standard_name = shortwave_aerosol_extinction_optical_depth
140+
units = 1
141+
type = real | kind = kind_phys
142+
dimensions = (horizontal_loop_extent, vertical_layer_dimension, number_of_bands_for_shortwave_radiation)
143+
intent = out
144+
[ aer_tau_w ]
145+
standard_name = shortwave_aerosol_single_scattering_albedo_times_optical_depth
146+
units = 1
147+
type = real | kind = kind_phys
148+
dimensions = (horizontal_loop_extent, vertical_layer_dimension, number_of_bands_for_shortwave_radiation)
149+
intent = out
150+
[ aer_tau_w_g ]
151+
standard_name = shortwave_aerosol_asymmetry_parameter_times_single_scattering_albedo_times_optical_depth
152+
units = 1
153+
type = real | kind = kind_phys
154+
dimensions = (horizontal_loop_extent, vertical_layer_dimension, number_of_bands_for_shortwave_radiation)
155+
intent = out
156+
[ aer_lw_abs ]
157+
standard_name = longwave_aerosol_absorption_optical_depth
158+
units = 1
159+
type = real | kind = kind_phys
160+
dimensions = (horizontal_loop_extent, vertical_layer_dimension, number_of_bands_for_longwave_radiation)
161+
intent = out
162+
[ dustaod ]
163+
standard_name = aerosol_optical_depth_from_dust
164+
units = 1
165+
type = real | kind = kind_phys
166+
dimensions = (horizontal_loop_extent)
167+
intent = out
168+
[ sulfaod ]
169+
standard_name = aerosol_optical_depth_from_sulfate
170+
units = 1
171+
type = real | kind = kind_phys
172+
dimensions = (horizontal_loop_extent)
173+
intent = out
174+
[ bcaod ]
175+
standard_name = aerosol_optical_depth_from_black_carbon
176+
units = 1
177+
type = real | kind = kind_phys
178+
dimensions = (horizontal_loop_extent)
179+
intent = out
180+
[ pomaod ]
181+
standard_name = aerosol_optical_depth_from_primary_organic_matter
182+
units = 1
183+
type = real | kind = kind_phys
184+
dimensions = (horizontal_loop_extent)
185+
intent = out
186+
[ soaaod ]
187+
standard_name = aerosol_optical_depth_from_secondary_organic_aerosol
188+
units = 1
189+
type = real | kind = kind_phys
190+
dimensions = (horizontal_loop_extent)
191+
intent = out
192+
[ ssltaod ]
193+
standard_name = aerosol_optical_depth_from_seasalt
194+
units = 1
195+
type = real | kind = kind_phys
196+
dimensions = (horizontal_loop_extent)
197+
intent = out
198+
[ aodabsbc ]
199+
standard_name = absorption_aerosol_optical_depth_from_black_carbon
200+
units = 1
201+
type = real | kind = kind_phys
202+
dimensions = (horizontal_loop_extent)
203+
intent = out
204+
[ burdendust ]
205+
standard_name = column_burden_from_dust
206+
units = kg m-2
207+
type = real | kind = kind_phys
208+
dimensions = (horizontal_loop_extent)
209+
intent = out
210+
[ burdenso4 ]
211+
standard_name = column_burden_from_sulfate
212+
units = kg m-2
213+
type = real | kind = kind_phys
214+
dimensions = (horizontal_loop_extent)
215+
intent = out
216+
[ burdenbc ]
217+
standard_name = column_burden_from_black_carbon
218+
units = kg m-2
219+
type = real | kind = kind_phys
220+
dimensions = (horizontal_loop_extent)
221+
intent = out
222+
[ burdenpom ]
223+
standard_name = column_burden_from_primary_organic_matter
224+
units = kg m-2
225+
type = real | kind = kind_phys
226+
dimensions = (horizontal_loop_extent)
227+
intent = out
228+
[ burdensoa ]
229+
standard_name = column_burden_from_secondary_organic_aerosol
230+
units = kg m-2
231+
type = real | kind = kind_phys
232+
dimensions = (horizontal_loop_extent)
233+
intent = out
234+
[ burdenseasalt ]
235+
standard_name = column_burden_from_seasalt
236+
units = kg m-2
237+
type = real | kind = kind_phys
238+
dimensions = (horizontal_loop_extent)
239+
intent = out
240+
[ ssavis ]
241+
standard_name = aerosol_single_scatter_albedo_at_vis
242+
units = 1
243+
type = real | kind = kind_phys
244+
dimensions = (horizontal_loop_extent)
245+
intent = out
246+
[ aodvis ]
247+
standard_name = aerosol_optical_depth_at_vis
248+
units = 1
249+
type = real | kind = kind_phys
250+
dimensions = (horizontal_loop_extent)
251+
intent = out
252+
[ odv_col_aod ]
253+
standard_name = column_visible_optical_depth_per_bulk_aerosol
254+
units = 1
255+
type = real | kind = kind_phys
256+
dimensions = (horizontal_loop_extent, number_of_bulk_aerosol_constituents_in_climate_radiative_aerosol_list)
257+
intent = out
258+
[ errmsg ]
259+
standard_name = ccpp_error_message
260+
units = none
261+
type = character | kind = len=*
262+
dimensions = ()
263+
intent = out
264+
[ errflg ]
265+
standard_name = ccpp_error_code
266+
units = 1
267+
type = integer
268+
dimensions = ()
269+
intent = out
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0"?>
2+
3+
<?xml-stylesheet type="text/xsl"?>
4+
5+
<entry_id_pg version="2.0">
6+
7+
<!-- Each namelist variable is defined in an <entry> element. The
8+
content of the element is the documentation of how the variable is
9+
used. Other aspects of the variable's definition are expressed as
10+
attributes of the <entry> element. Note that it is an XML requirement
11+
that the attribute values are enclosed in quotes. The attributes are:
12+
13+
id
14+
The variable's name. *** N.B. *** The name must be lower case.
15+
The module convert all namelist variable names to lower case
16+
since Fortran is case insensitive.
17+
18+
type
19+
An abbreviation of the fortran declaration for the variable.
20+
Valid declarations are:
21+
22+
char*n
23+
integer
24+
logical
25+
real
26+
27+
Any of these types may be followed by a comma separated list of
28+
integers enclosed in parenthesis to indicate an array.
29+
30+
The current namelist validation code only distinquishes between
31+
string and non-string types.
32+
33+
input_pathname
34+
Only include this attribute to indicate that the variable
35+
contains the pathname of an input dataset that resides in the
36+
CESM inputdata directory tree. Note that the variables
37+
containing the names of restart files that are used in branch
38+
runs don't reside in the inputdata tree and should not be given
39+
this attribute.
40+
41+
The recognized values are "abs" to indicate that an absolute
42+
pathname is required, or "rel:var_name" to indicate that the
43+
pathname is relative and that the namelist variable "var_name"
44+
contains the absolute root directory.
45+
46+
category
47+
A category assigned for organizing the documentation.
48+
49+
group
50+
The namelist group that the variable is declared in.
51+
52+
valid_values
53+
This is an optional attribute that is mainly useful for variables
54+
that have only a small number of allowed values. It is a
55+
comma-separated list of valid values for the variable.
56+
57+
desc
58+
This is a text description of the variable including its
59+
purpose and use.
60+
61+
values
62+
This is a grouping of all the cases where a value can be
63+
assigned with the namelist generator has been run.
64+
65+
value
66+
Each <value> tag specifies a case where a value is assigned
67+
to this variable when the namelist generator is run. If the
68+
tag has no attributes, it is a default value. In general,
69+
the namelist generator attempts to find a value with the
70+
maximium number of attribute matches (and no non-matches).
71+
72+
standard_name
73+
This is the CCPP Standard Name of the variable
74+
75+
units
76+
This is the CCPP unit specification of the variable (e.g., m s-1).
77+
-->
78+
79+
<entry id="water_refindex_file">
80+
<type>char*512</type>
81+
<category>radiation</category>
82+
<group>aerosol_optics_nl</group>
83+
<standard_name>filename_of_water_refractive_index_data</standard_name>
84+
<units>none</units>
85+
<desc>
86+
Full pathname of dataset for water refractive indices used in aerosol optics.
87+
</desc>
88+
<values>
89+
<value>${DIN_LOC_ROOT}/atm/cam/physprops/water_refindex_rrtmg_c080910.nc</value>
90+
</values>
91+
</entry>
92+
93+
</entry_id_pg>

0 commit comments

Comments
 (0)