Skip to content

Commit

Permalink
working around assert
Browse files Browse the repository at this point in the history
  • Loading branch information
amylu00 committed Feb 10, 2024
1 parent 6851d3b commit d53200f
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions parcel/parcel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,27 @@ function parcel_model(dY, Y, p, t)
dN_act_dt_depo = FT(0)
dqi_dt_new_depo = FT(0)
if "MohlerAF_Deposition" in ice_nucleation_modes
AF = CMI_het.dust_activated_number_fraction(
aerosol,
ip.deposition,
S_i,
T,
)
if S_i < ip.deposition.Sᵢ_max
println("Supersaturation exceeds the allowed value. No dust will be activated.")
AF = FT(0)
else
AF = CMI_het.dust_activated_number_fraction(
aerosol,
ip.deposition,
S_i,
T,
)
end
dN_act_dt_depo = max(FT(0), AF * N_aer - N_ice) / const_dt
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 = CMI_het.MohlerDepositionRate(aerosol, ip.deposition, S_i, T, (dY[1] * ξ), N_aer)
if S_i < ip.deposition.Sᵢ_max
println("Supersaturation exceeds the allowed value. No dust will be activated.")
dN_act_dt_depo = FT(0)
else
dN_act_dt_depo = CMI_het.MohlerDepositionRate(aerosol, ip.deposition, S_i, T, (dY[1] * ξ), N_aer)
end
dqi_dt_new_depo = dN_act_dt_depo * 4 / 3 * FT(π) * r_nuc^3 * ρ_ice / ρ_air
end

Expand Down

0 comments on commit d53200f

Please sign in to comment.