Skip to content

Commit

Permalink
suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
amylu00 committed Feb 14, 2024
1 parent f9186b0 commit 5536dc0
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
6 changes: 3 additions & 3 deletions docs/src/IceNucleationParcel0D.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ There are multiple ways of running deposition nucleation in the parcel.
is calculated from
```math
\begin{equation}
P_{ice} = \left[ \frac{dN_i}{dt} \right]_{dep0} = J_{depo}A_{aero}N_{aero}
P_{ice, depo} = \left[ \frac{dN_i}{dt} \right]_{depo} = J_{depo}\;A_{aero}\;N_{aero}
\label{eq:ActivityBasedDeposition_P_ice}
\end{equation}
```
Expand All @@ -223,7 +223,7 @@ Following the water activity based immersion freezing model (ABIFM), the ABIFM d
per second via immersion freezing can then be calculating using
```math
\begin{equation}
P_{ice} = \left[ \frac{dN_i}{dt} \right]_{immer} = J_{immer}A(N_{liq})
P_{ice, immer} = \left[ \frac{dN_i}{dt} \right]_{immer} = J_{immer}A(N_{liq})
\label{eq:ABIFM_P_ice}
\end{equation}
```
Expand All @@ -237,7 +237,7 @@ Homogeneous freezing follows the water-activity based model described in the
The ice production rate from homogeneous freezing can then be determined:
```math
\begin{equation}
P_{ice} = \left[ \frac{dN_i}{dt} \right]_{hom} = J_{hom}V(N_{liq})
P_{ice, hom} = \left[ \frac{dN_i}{dt} \right]_{hom} = J_{hom}V(N_{liq})
\label{eq:hom_P_ice}
\end{equation}
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/plots/activity_based_deposition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import CloudMicrophysics.Common as CO
import CloudMicrophysics.HetIceNucleation as IN
import CloudMicrophysics.Parameters as CMP

FT = Float64
FT = Float32
const tps = TD.Parameters.ThermodynamicsParameters(FT)
const feldspar = CMP.Feldspar(FT)
const ferrihydrite = CMP.Ferrihydrite(FT)
const kaolinite = CMP.Kaolinite(FT)

# Initializing
Δa_w = range(0, stop = 0.32, length = 50) # difference in solution and ice water activity
Δa_w = range(FT(0), stop = FT(0.32), length = 50) # difference in solution and ice water activity
J_feldspar = @. IN.deposition_J(feldspar, Δa_w) # J in SI units
log10J_converted_feldspar = @. log10(J_feldspar * 1e-4) # converts J into cm^-2 s^-1 and takes log
J_ferrihydrite = @. IN.deposition_J(ferrihydrite, Δa_w)
Expand Down
2 changes: 1 addition & 1 deletion parcel/Deposition_Nucleation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CLIMAParameters as CP

# definition of the ODE problem for parcel model
include(joinpath(pkgdir(CM), "parcel", "parcel.jl"))
FT = Float64
FT = Float32
# get free parameters
tps = TD.Parameters.ThermodynamicsParameters(FT)
aps = CMP.AirProperties(FT)
Expand Down
37 changes: 22 additions & 15 deletions parcel/parcel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ 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
if S_i > ip.deposition.Sᵢ_max
if S_i >= ip.deposition.Sᵢ_max
println("Supersaturation exceeds the allowed value. No dust will be activated.")
AF = FT(0)
else
Expand All @@ -89,9 +89,8 @@ function parcel_model(dY, Y, p, 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
if S_i > ip.deposition.Sᵢ_max
elseif "MohlerRate_Deposition" in ice_nucleation_modes
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
Expand Down Expand Up @@ -294,45 +293,53 @@ function run_parcel(IC, t_0, t_end, p)

print("Ice nucleation modes: ")
if "MohlerAF_Deposition" in ice_nucleation_modes
print("Deposition on dust particles using AF ")
print("\n Deposition on dust particles using AF ")
print("(Note that this mode only runs for monodisperse size distributions.) ")
timestepper = ODE.Euler()
end
if "MohlerRate_Deposition" in ice_nucleation_modes
print("Deposition nucleation based on rate eqn in Mohler 2006 ")
print("\n Deposition nucleation based on rate eqn in Mohler 2006 ")
print("(Note that this mode only runs for monodisperse size distributions.) ")
timestepper = ODE.Euler()
end
if "ActivityBasedDeposition" in ice_nucleation_modes
print("Water activity based deposition nucleation ")
print("\n Water activity based deposition nucleation ")
print("(Note that this mode only runs for monodisperse size distributions.) ")
end
if "ImmersionFreezing" in ice_nucleation_modes
print("Immersion freezing ")
print("\n Immersion freezing ")
print("(Note that this mode only runs for monodisperse and gamma size distributions.) ")
end
if "HomogeneousFreezing" in ice_nucleation_modes
print("Homogeneous freezing ")
print("\n Homogeneous freezing ")
end
print("\n")

print("Growth modes: ")
if "Condensation" in growth_modes
print("Condensation on liquid droplets",)
print("\n Condensation on liquid droplets",)
print("(Note that this mode only runs for monodisperse and gamma size distributions.) ")
end
if "Condensation_DSD" in growth_modes
print("Condensation on liquid droplets")
print("\n Condensation on liquid droplets")
end
if "Deposition" in growth_modes
print("Deposition on ice crystals")
print("\n Deposition on ice crystals")
end
print("\n")

print("Size distribution modes: ")
if "Monodisperse" in droplet_size_distribution
print("Monodisperse size distribution")
print("\n Monodisperse size distribution")
end
if "Gamma" in droplet_size_distribution
print("Gamma size distribution")
print("\n Gamma size distribution")
end
if "Lognormal" in droplet_size_distribution
print("Lognormal size distribution")
print("\n Lognormal size distribution")
end
if "MohlerAF_Deposition" in ice_nucleation_modes || "MohlerRate_Deposition" in ice_nucleation_modes || "ActivityBasedDeposition" in ice_nucleation_modes
print("\nWARNING: Multiple deposition nucleation parameterizations chosen to run in one simulation. Parcel will only run MohlerAF_Deposition for now.")
end
println(" ")

Expand Down

0 comments on commit 5536dc0

Please sign in to comment.