Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
amylu00 committed Feb 13, 2024
1 parent 05facfd commit 9666aca
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions parcel/Deposition_Nucleation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ e = qᵥ * p₀ * R_v / Rₐ
Sₗ = FT(e / eₛ)
IC = [Sₗ, p₀, T₀, qᵥ, qₗ, qᵢ, Nₐ, Nₗ, Nᵢ, x_sulph]

ξ(T) = TD.saturation_vapor_pressure(tps, T, TD.Liquid()) /
TD.saturation_vapor_pressure(tps, T, TD.Ice())
ξ(T) =
TD.saturation_vapor_pressure(tps, T, TD.Liquid()) /
TD.saturation_vapor_pressure(tps, T, TD.Ice())
S_i(T, S_liq) = ξ(T) * S_liq

# Simulation parameters passed into ODE solver
Expand All @@ -52,7 +53,8 @@ const_dt = FT(0.1) # model timestep
t_max = FT(100)
aerosol_1 = [CMP.DesertDust(FT), CMP.ArizonaTestDust(FT)] # aersol type for DustDeposition
aerosol_2 = [CMP.Feldspar(FT), CMP.Ferrihydrite(FT), CMP.Kaolinite(FT)] # aersol type for DepositionNucleation
ice_nucleation_modes_list = [["MohlerRate_Deposition"], ["ActivityBasedDeposition"]]
ice_nucleation_modes_list =
[["MohlerRate_Deposition"], ["ActivityBasedDeposition"]]
growth_modes = ["Deposition"]
droplet_size_distribution_list = [["Monodisperse"]]

Expand Down Expand Up @@ -93,10 +95,15 @@ for ice_nucleation_modes in ice_nucleation_modes_list
elseif aerosol == CMP.ArizonaTestDust(FT)
aero_label = "ArizonaTestDust"
end
MK.lines!(ax1, sol.t, S_i.(sol[3, :], sol[1, :]), label = aero_label) # saturation
MK.lines!(ax2, sol.t, sol[3, :]) # temperature
MK.lines!(ax3, sol.t, sol[6, :] * 1e3) # q_ice
MK.lines!(ax4, sol.t, sol[9, :]) # N_ice
MK.lines!( # saturation
ax1,
sol.t,
S_i.(sol[3, :], sol[1, :]),
label = aero_label
)
MK.lines!(ax2, sol.t, sol[3, :]) # temperature
MK.lines!(ax3, sol.t, sol[6, :] * 1e3) # q_ice
MK.lines!(ax4, sol.t, sol[9, :]) # N_ice
end

elseif nuc_mode == "ActivityBasedDeposition"
Expand Down Expand Up @@ -128,8 +135,12 @@ for ice_nucleation_modes in ice_nucleation_modes_list
aero_label = "Kaolinite"
end
MK.lines!( # saturation
ax1, sol.t, S_i.(sol[3, :], sol[1, :]),
label = aero_label, linestyle = :dash)
ax1,
sol.t,
S_i.(sol[3, :], sol[1, :]),
label = aero_label,
linestyle = :dash
)
MK.lines!(ax2, sol.t, sol[3, :], linestyle = :dash) # temperature
MK.lines!(ax3, sol.t, sol[6, :] * 1e3, linestyle = :dash) # q_ice
MK.lines!(ax4, sol.t, sol[9, :], linestyle = :dash) # N_ice
Expand Down

0 comments on commit 9666aca

Please sign in to comment.