Skip to content

Commit

Permalink
params
Browse files Browse the repository at this point in the history
  • Loading branch information
trontrytel committed Feb 15, 2024
1 parent 86648c9 commit a03f09a
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions ext/EmulatorModelsExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -152,30 +152,14 @@ end
function MLEmulatedAerosolActivation(
::Type{FT},
emulator_filepath::String,
toml_dict::CP.AbstractTOMLDict = CP.create_toml_dict(FT),
) where {FT}
(; data) = toml_dict
machine = MLJ.machine(emulator_filepath)

M_w = FT(data["molar_mass_water"]["value"])
R = FT(data["gas_constant"]["value"])
ρ_w = FT(data["density_liquid_water"]["value"])
σ = FT(data["surface_tension_water"]["value"])
g = FT(data["gravitational_acceleration"]["value"])
f1 = FT(data["ARG2000_f_coeff_1"]["value"])
f2 = FT(data["ARG2000_f_coeff_2"]["value"])
g1 = FT(data["ARG2000_g_coeff_1"]["value"])
g2 = FT(data["ARG2000_g_coeff_2"]["value"])
p1 = FT(data["ARG2000_pow_1"]["value"])
p2 = FT(data["ARG2000_pow_2"]["value"])

activation_params = CMP.AerosolActivationParameters(M_w, R, ρ_w, σ, g, f1, f2, g1, g2, p1, p2)
return MLEmulatedAerosolActivation(activation_params, machine)
ap = CMP.AerosolActivationParameters(FT)
return MLEmulatedAerosolActivation(ap, machine)
end

function AA.N_activated_per_mode(
ml::MLAerosolActivationParameters,
ad::CMP.AerosolDistributionType,
aip::CMP.AirProperties,
tps::TDP.ThermodynamicsParameters,
T::FT,
Expand Down

0 comments on commit a03f09a

Please sign in to comment.