Skip to content

Commit cedbf1b

Browse files
authored
Merge pull request #3654 from CliMA/zs/aero_col_mass
add sea salt column mass diagnostics
2 parents 5f96505 + 8d24525 commit cedbf1b

File tree

3 files changed

+60
-3
lines changed

3 files changed

+60
-3
lines changed

config/model_configs/aquaplanet_nonequil_allsky_gw_res.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ orographic_gravity_wave: "gfdl_restart"
2020
surface_setup: "DefaultMoninObukhov"
2121
prescribe_ozone: true
2222
reproducibility_test: true
23-
prescribed_aerosols: ["CB1", "CB2", "SO4"]
23+
prescribed_aerosols: ["SO4", "CB1", "OC1", "DST01", "SSLT01"]
2424
toml: [toml/sphere_aquaplanet_1M.toml]
2525
diagnostics:
26-
- short_name: [edt, evu, mmrso4, mmrbcpo, mmrbcpi, o3, od550aer, odsc550aer]
26+
- short_name: [edt, evu, mmrso4, mmrbcpo, mmrocpo, mmrdust, mmrss, loadss, o3, od550aer, odsc550aer]
2727
reduction_time: average
2828
period: 1days
2929
- short_name: [reffclw, reffcli]

reproducibility_tests/ref_counter.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
215
1+
216
22

33
# **README**
44
#
@@ -21,6 +21,9 @@
2121

2222
#=
2323
24+
216
25+
- Change prescribed aerosols in `aquaplanet_nonequil_allsky_gw_res.yml`
26+
2427
215
2528
- Update dependencies, including ClimaCore, which updated how metric terms are
2629
computed

src/diagnostics/tracer_diagnostics.jl

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,48 @@ function compute_sea_salt!(out, state, cache, time)
105105
end
106106
end
107107

108+
function compute_sea_salt_column!(out, state, cache, time)
109+
:prescribed_aerosols_field in propertynames(cache.tracers) ||
110+
error("Aerosols do not exist in the model")
111+
any(
112+
x -> x in propertynames(cache.tracers.prescribed_aerosols_field),
113+
[:SSLT01, :SSLT02, :SSLT03, :SSLT04, :SSLT05],
114+
) || error("Sea salt does not exist in the model")
115+
if isnothing(out)
116+
out = zeros(axes(Fields.level(state.f, half)))
117+
aero_conc = cache.scratch.ᶜtemp_scalar
118+
@. aero_conc = 0
119+
for prescribed_aerosol_name in
120+
[:SSLT01, :SSLT02, :SSLT03, :SSLT04, :SSLT05]
121+
if prescribed_aerosol_name in
122+
propertynames(cache.tracers.prescribed_aerosols_field)
123+
aerosol_field = getproperty(
124+
cache.tracers.prescribed_aerosols_field,
125+
prescribed_aerosol_name,
126+
)
127+
@. aero_conc += aerosol_field
128+
end
129+
end
130+
Operators.column_integral_definite!(out, aero_conc)
131+
return out
132+
else
133+
aero_conc = cache.scratch.ᶜtemp_scalar
134+
@. aero_conc = 0
135+
for prescribed_aerosol_name in
136+
[:SSLT01, :SSLT02, :SSLT03, :SSLT04, :SSLT05]
137+
if prescribed_aerosol_name in
138+
propertynames(cache.tracers.prescribed_aerosols_field)
139+
aerosol_field = getproperty(
140+
cache.tracers.prescribed_aerosols_field,
141+
prescribed_aerosol_name,
142+
)
143+
@. aero_conc += aerosol_field
144+
end
145+
end
146+
Operators.column_integral_definite!(out, aero_conc)
147+
end
148+
end
149+
108150
###
109151
# Ozone concentration (3d)
110152
###
@@ -195,3 +237,15 @@ add_diagnostic_variable!(
195237
comments = "Prescribed dry mass fraction of hydrophilic organic carbon aerosol particles in air.",
196238
compute! = (out, u, p, t) -> compute_aerosol!(out, u, p, t, :OC2),
197239
)
240+
241+
###
242+
# Sea salt column mass (2d)
243+
###
244+
add_diagnostic_variable!(
245+
short_name = "loadss",
246+
long_name = "Load of Sea-Salt Aerosol",
247+
standard_name = "atmosphere_mass_content_of_sea_salt_dry_aerosol _particles",
248+
units = "kg m^-2",
249+
comments = "The total dry mass of sea salt aerosol particles per unit area.",
250+
compute! = (out, u, p, t) -> compute_sea_salt_column!(out, u, p, t),
251+
)

0 commit comments

Comments
 (0)