Skip to content

Commit fc1bacd

Browse files
authored
Merge pull request #3856 from CliMA/sa/add_2M_number_adjustment
add 2M number adjustment tendencies
2 parents 8ca5650 + e1d8c91 commit fc1bacd

File tree

4 files changed

+71
-2
lines changed

4 files changed

+71
-2
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ ClimaAtmos.jl Release Notes
44
main
55
-------
66

7+
PR [#3856](https://github.com/CliMA/ClimaAtmos.jl/pull/3856) adds number adjustment tendencies to the two-moment microphysics scheme.
8+
79
v0.30.3
810
-------
911

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ AtmosphericProfilesLibrary = "0.1.7"
4444
ClimaComms = "0.6.8"
4545
ClimaCore = "0.14.34"
4646
ClimaDiagnostics = "0.2.12"
47-
ClimaParams = "0.10.31"
47+
ClimaParams = "0.10.32"
4848
ClimaTimeSteppers = "0.8.2"
4949
ClimaUtilities = "0.1.22"
50-
CloudMicrophysics = "0.24.0"
50+
CloudMicrophysics = "0.24.1"
5151
Dates = "1"
5252
ForwardDiff = ">= 0.10"
5353
Insolation = "0.9.2"

src/parameterized_tendencies/microphysics/microphysics_wrappers.jl

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,4 +558,48 @@ function compute_warm_precipitation_sources_2M!(
558558
)
559559
@. Snᵣᵖ += Sᵖ
560560

561+
# cloud liquid number adjustment for mass limits
562+
# TODO: Once CCN number becomes a prognostic variable, these number adjustment tendencies
563+
# should be linked to it. Any increase in droplet number (source here) would imply
564+
# a corresponding sink in CCN, and vice versa.
565+
@. Sᵖ = CM2.number_increase_for_mass_limit(
566+
mp.sb.numadj,
567+
mp.sb.pdf_c.xc_max,
568+
qₗ,
569+
ρ,
570+
ρ * nₗ,
571+
)
572+
@. S₂ᵖ =
573+
-triangle_inequality_limiter(
574+
-CM2.number_decrease_for_mass_limit(
575+
mp.sb.numadj,
576+
mp.sb.pdf_c.xc_min,
577+
qₗ,
578+
ρ,
579+
ρ * nₗ,
580+
),
581+
limit(nₗ, dt, 5),
582+
)
583+
@. Snₗᵖ = Sᵖ + S₂ᵖ
584+
# rain number adjustment for mass limits
585+
@. Sᵖ = CM2.number_increase_for_mass_limit(
586+
mp.sb.numadj,
587+
mp.sb.pdf_r.xr_max,
588+
qᵣ,
589+
ρ,
590+
ρ * nᵣ,
591+
)
592+
@. S₂ᵖ =
593+
-triangle_inequality_limiter(
594+
-CM2.number_decrease_for_mass_limit(
595+
mp.sb.numadj,
596+
mp.sb.pdf_r.xr_min,
597+
qᵣ,
598+
ρ,
599+
ρ * nᵣ,
600+
),
601+
limit(nᵣ, dt, 5),
602+
)
603+
@. Snᵣᵖ += Sᵖ + S₂ᵖ
604+
561605
end

src/prognostic_equations/implicit/implicit_tendency.jl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,29 @@ function implicit_vertical_advection_tendency!(Yₜ, Y, p, t)
182182
),
183183
)
184184
end
185+
if precip_model isa Microphysics2Moment
186+
(; ᶜwnₗ, ᶜwnᵣ, ᶜwᵣ, ᶜwₛ) = p.precomputed
187+
@. Yₜ.c.ρn_liq -= ᶜprecipdivᵥ(
188+
ᶠinterp(Y.c.ρ * ᶜJ) / ᶠJ * ᶠright_bias(
189+
Geometry.WVector(-(ᶜwnₗ)) * specific(Y.c.ρn_liq, Y.c.ρ),
190+
),
191+
)
192+
@. Yₜ.c.ρn_rai -= ᶜprecipdivᵥ(
193+
ᶠinterp(Y.c.ρ * ᶜJ) / ᶠJ * ᶠright_bias(
194+
Geometry.WVector(-(ᶜwnᵣ)) * specific(Y.c.ρn_rai, Y.c.ρ),
195+
),
196+
)
197+
@. Yₜ.c.ρq_rai -= ᶜprecipdivᵥ(
198+
ᶠinterp(Y.c.ρ * ᶜJ) / ᶠJ * ᶠright_bias(
199+
Geometry.WVector(-(ᶜwᵣ)) * specific(Y.c.ρq_rai, Y.c.ρ),
200+
),
201+
)
202+
@. Yₜ.c.ρq_sno -= ᶜprecipdivᵥ(
203+
ᶠinterp(Y.c.ρ * ᶜJ) / ᶠJ * ᶠright_bias(
204+
Geometry.WVector(-(ᶜwₛ)) * specific(Y.c.ρq_sno, Y.c.ρ),
205+
),
206+
)
207+
end
185208

186209
# TODO - decide if this needs to be explicit or implicit
187210
#vertical_advection_of_water_tendency!(Yₜ, Y, p, t)

0 commit comments

Comments
 (0)