Skip to content

Commit

Permalink
needed T in arg
Browse files Browse the repository at this point in the history
  • Loading branch information
amylu00 committed Feb 7, 2024
1 parent 187cde3 commit 1573243
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 14 deletions.
2 changes: 1 addition & 1 deletion parcel/parcel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function parcel_model(dY, Y, p, t)
dqi_dt_new_depo = dN_act_dt_depo * 4 / 3 * FT(π) * r_nuc^3 * ρ_ice / ρ_air
end
if "MohlerRate_Deposition" in ice_nucleation_modes
dN_act_dt_depo = MohlerDepositionRate(aerosol, ip.deposition, S_i, (dY[1] * ξ))
dN_act_dt_depo = MohlerDepositionRate(aerosol, ip.deposition, S_i, T, (dY[1] * ξ))
dqi_dt_new_depo = dN_act_dt_depo * 4 / 3 * FT(π) * r_nuc^3 * ρ_ice / ρ_air
end

Expand Down
1 change: 1 addition & 0 deletions src/IceNucleation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function MohlerDepositionRate(
dust::Union{CMP.DesertDust, CMP.ArizonaTestDust},
ip::CMP.Mohler2006,
Si::FT,
T::FT,
dSi_dt::FT,
) where {FT}

Expand Down
55 changes: 43 additions & 12 deletions test/heterogeneous_ice_nucleation_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function test_heterogeneous_ice_nucleation(FT)
dust,
ip.deposition,
Si_low,
T,
dSi_dt,
) == FT(0)
end
Expand Down Expand Up @@ -77,6 +78,32 @@ function test_heterogeneous_ice_nucleation(FT)
Si_med,
T_warm,
)
TT.@test CMI_het.MohlerDepositionRate(
dust,
ip.deposition,
Si_hgh,
T_warm,
dSi_dt,
) > CMI_het.MohlerDepositionRate(
dust,
ip.deposition,
Si_med,
T_warm,
dSi_dt,
)
TT.@test CMI_het.MohlerDepositionRate(
dust,
ip.deposition,
Si_med,
T_cold,
dSi_dt,
) > CMI_het.MohlerDepositionRate(
dust,
ip.deposition,
Si_med,
T_warm,
dSi_dt,
)
end

# no activation if saturation exceeds allowed value
Expand All @@ -88,23 +115,27 @@ function test_heterogeneous_ice_nucleation(FT)
Si_too_hgh,
T,
) == FT(0)
TT.@test CMI_het.MohlerDepositionRate(
dust,
ip.deposition,
Si_too_hgh,
T,
dSi_dt,
) == FT(0)
end
TT.@test CMI_het.MohlerDepositionRate(
dust,
ip.deposition,
Si_too_hgh,
dSi_dt,
) == FT(0)
end

# no activation if dSi_dt is negative
for dust in [ATD, desert_dust]
TT.@test CMI_het.MohlerDepositionRate(
dust,
ip.deposition,
Si_low,
dSi_dt_negative
) == FT(0)
for T in [T_warm, T_cold]
TT.@test CMI_het.MohlerDepositionRate(
dust,
ip.deposition,
Si_low,
T,
dSi_dt_negative,
) == FT(0)
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/performance_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function benchmark_test(FT)
)
bench_press(
CMI_het.MohlerDepositionRate,
(desert_dust, ip.deposition, S_ice, dSi_dt),
(desert_dust, ip.deposition, S_ice, T, dSi_dt),
80,
)
bench_press(CMI_het.deposition_J, (kaolinite, Delta_a_w), 230)
Expand Down

0 comments on commit 1573243

Please sign in to comment.