Skip to content

Commit a099e78

Browse files
committed
...
1 parent ca4014e commit a099e78

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/parameterized_tendencies/microphysics/microphysics_wrappers.jl

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,28 @@ function compute_precipitation_sources2M!(
305305
# @. S₁ = limit(q_liq, dt, CM2.autoconversion(sb2006.acnv, q_liq, q_rai, ρ, N_liq).dq_rai_dt)
306306
# @. aux.precip_sources += to_sources(-S₁, -S₁, S₁, 0, 0, 0)
307307

308+
309+
310+
# TODO - only do activation at cloud base
311+
#FT = eltype(q_tot)
312+
#S_Nl::FT = FT(0)
313+
314+
#q = TD.PhasePartition(q_tot, q_liq, q_ice)
315+
#S::FT = TD.supersaturation(thermo_params, q, ρ, T, TD.Liquid())
316+
317+
#(; r_dry, std_dry, κ) = kid_params
318+
#w = ρw / ρ
319+
320+
#aerosol_distribution =
321+
# CMAM.AerosolDistribution((CMAM.Mode_κ(r_dry, std_dry, N_aer, (FT(1),), (FT(1),), (FT(0),), (κ,)),))
322+
#N_act = CMAA.total_N_activated(activation_params, aerosol_distribution, air_params, thermo_params, T, p, w, q)
323+
324+
## Convert the total activated number to tendency
325+
#S_Nl = ifelse(S < 0 || isnan(N_act), FT(0), max(FT(0), N_act - N_liq) / dt)
326+
327+
328+
329+
308330
# # autoconversion liquid to rain (number)
309331
# @. S₂ = limit(N_liq, dt, CM2.autoconversion(sb2006.acnv, q_liq, q_rai, ρ, N_liq).dN_rai_dt, 2)
310332
# @. aux.precip_sources += to_sources(0, 0, 0, 0, -2 * S₂, S₂)
@@ -501,7 +523,7 @@ function compute_precipitation_sinks2M!(
501523
@. Sqᵣᵖ += Sᵖ
502524
@. Seₜᵖ -= Sᵖ * (Iₗ(thp, ts) + Φ)
503525

504-
# evaporation: q_rai -> q_vap (mass)
526+
# evaporation: q_rai -> q_vap (number)
505527
@. Sᵖ = -min(
506528
limit(Nᵣ, dt, 5),
507529
-CM2.rain_evaporation(rps..., PP(thp, ts), qᵣ, ρ, Nᵣ, Tₐ(thp.ts)).evap_rate_0,

0 commit comments

Comments
 (0)