Skip to content

Commit 46f9b72

Browse files
authored
Merge pull request #3770 from CliMA/aj/more_ml
Update ML CDND function
2 parents c2f3bd7 + 84e86d1 commit 46f9b72

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

.buildkite/Manifest-v1.11.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,9 @@ version = "0.2.12"
395395

396396
[[deps.ClimaParams]]
397397
deps = ["TOML"]
398-
git-tree-sha1 = "4af2dbc0f82c09dd5b514960c7be1c0bad260bfa"
398+
git-tree-sha1 = "98f8b50fcd3efe21e79c3b98a93457d994bb3cde"
399399
uuid = "5c42b081-d73a-476f-9059-fd94b934656c"
400-
version = "0.10.26"
400+
version = "0.10.27"
401401

402402
[[deps.ClimaReproducibilityTests]]
403403
deps = ["OrderedCollections", "PrettyTables"]

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ AtmosphericProfilesLibrary = "0.1.7"
4343
ClimaComms = "0.6.6"
4444
ClimaCore = "0.14.24"
4545
ClimaDiagnostics = "0.2.12"
46-
ClimaParams = "0.10.26"
46+
ClimaParams = "0.10.27"
4747
ClimaTimeSteppers = "0.8.2"
4848
ClimaUtilities = "0.1.22"
4949
CloudMicrophysics = "0.22.9"

src/parameterized_tendencies/microphysics/microphysics_wrappers.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,17 @@ function ml_N_cloud_liquid_droplets(cmc, c_dust, c_seasalt, c_SO4, q_liq)
4848
# We can also add w, T, RH, w' ...
4949
# Also consider lookind only at around cloud base height
5050
(; α_dust, α_seasalt, α_SO4, α_q_liq) = cmc.aml
51-
(; c₀_dust, c₀_seasalt, c₀_SO4) = cmc.aml
51+
(; c₀_dust, c₀_seasalt, c₀_SO4, q₀_liq) = cmc.aml
5252
N₀ = cmc.N_cloud_liquid_droplets
5353

5454
FT = eltype(N₀)
55-
return N₀ +
56-
α_dust * log(max(c_dust, eps(FT)) / c₀_dust) +
57-
α_seasalt * log(max(c_seasalt, eps(FT)) / c₀_seasalt) +
58-
α_SO4 * log(max(c_SO4, eps(FT)) / c₀_SO4) +
59-
α_q_liq * log(max(q_liq, eps(FT)))
55+
return N₀ * (
56+
FT(1) +
57+
α_dust * log(max(c_dust, eps(FT)) / c₀_dust) +
58+
α_seasalt * log(max(c_seasalt, eps(FT)) / c₀_seasalt) +
59+
α_SO4 * log(max(c_SO4, eps(FT)) / c₀_SO4) +
60+
α_q_liq * log(max(q_liq, eps(FT)) / q₀_liq)
61+
)
6062
end
6163

6264
"""

src/parameters/create_parameters.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ function aerosol_ml_parameters(toml_dict)
173173
:reference_dust_aerosol_mass_concentration => :c₀_dust,
174174
:reference_seasalt_aerosol_mass_concentration => :c₀_seasalt,
175175
:reference_ammonium_sulfate_mass_concentration => :c₀_SO4,
176+
:reference_liquid_water_specific_humidity => :q₀_liq,
176177
)
177178
return CP.get_parameter_values(toml_dict, name_map, "ClimaAtmos")
178179
end

0 commit comments

Comments
 (0)