Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivia Alcabes committed Jan 29, 2025
1 parent cfcfe0f commit f25a635
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
16 changes: 10 additions & 6 deletions parcel/Example_NonEq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ R_d = TD.Parameters.R_d(tps)
liquid = CMP.CloudLiquid(τ, ρₗ)

override_file = Dict(
"cloud_ice_apparent_density" =>
Dict("value" => ρᵢ, "type" => "float"),
"cloud_ice_apparent_density" => Dict("value" => ρᵢ, "type" => "float"),
"sublimation_deposition_timescale" =>
Dict("value" => τ, "type" => "float"),
)
Expand Down Expand Up @@ -83,17 +82,22 @@ for DSD in size_distribution_list
const_dt = const_dt,
w = w,
liquid = liquid,
ice = ice
ice = ice,
)

# solve ODE
local sol = run_parcel(IC, FT(0), t_max, params)

# Plot results
MK.lines!(ax1, sol.t, (sol[1, :] .- 1) * 100.0, label = DSD)
MK.lines!(ax2, sol.t, sol[3, :])
MK.lines!(ax3, sol.t, sol[5, :] * 1e3)
MK.lines!(ax4, sol.t, (S_i.(tps, sol[3, :], sol[1, :]) .- 1) * 100.0, label = DSD)
MK.lines!(
ax4,
sol.t,
(S_i.(tps, sol[3, :], sol[1, :]) .- 1) * 100.0,
label = DSD,
)
MK.lines!(ax5, sol.t, sol[4, :] * 1e3)
MK.lines!(ax6, sol.t, sol[6, :] * 1e3)

Expand Down Expand Up @@ -124,4 +128,4 @@ MK.axislegend(
)

MK.save("noneq_parcel.svg", fig)
nothing
nothing
2 changes: 1 addition & 1 deletion parcel/ParcelParameters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,4 @@ struct NonEqDepParams{FT} <: CMP.ParametersType{FT}
tps::TDP.ThermodynamicsParameters{FT}
ice::CMP.CloudIce{FT}
dt::FT
end
end
2 changes: 1 addition & 1 deletion parcel/ParcelTendencies.jl
Original file line number Diff line number Diff line change
Expand Up @@ -311,4 +311,4 @@ function deposition(params::NonEqDepParams, PSD, state, ρ_air)
min(dep_rate, limit(qᵥ, dt, 2)),
-min(abs(dep_rate), limit(qᵢ, dt, 2)),
)
end
end

0 comments on commit f25a635

Please sign in to comment.