@@ -138,7 +138,7 @@ function perf_model_IC(FT, IN_mode)
138138 return [Sₗ, p₀, T₀, qᵥ, qₗ, qᵢ, Nₐ, Nₗ, Nᵢ, FT (0 )]
139139end
140140
141- function perf_model_pseudo_data (FT, IN_mode, params, IC, end_sim )
141+ function perf_model_pseudo_data (FT, IN_mode, params, IC)
142142 n_samples = 10
143143
144144 if IN_mode == " ABDINM"
@@ -149,7 +149,7 @@ function perf_model_pseudo_data(FT, IN_mode, params, IC, end_sim)
149149 coeff_true = [FT (255.927125 ), FT (- 68.553283 )]
150150 end
151151
152- G_truth = run_model (params, IN_mode, coeff_true, FT, IC, end_sim, calibration = true )
152+ G_truth = run_model (params, IN_mode, coeff_true, FT, IC, calibration = true )
153153 dim_output = length (G_truth)
154154
155155 Γ = (0.1 / 3 )^ 2 * LinearAlgebra. I
@@ -160,15 +160,15 @@ function perf_model_pseudo_data(FT, IN_mode, params, IC, end_sim)
160160 return [y_truth, Γ, coeff_true]
161161end
162162
163- function AIDA_IN05_params (FT, w, t_max, t_profile, T_profile, P_profile)
163+ function AIDA_IN05_params (FT, w, t_max, t_profile, T_profile, P_profile; P3 = false )
164164 IN_mode = " ABHOM"
165165 const_dt = FT (1 )
166166 prescribed_thermodynamics = true
167167 aerosol_act = " AeroAct"
168168 aerosol = CMP. Sulfate (FT)
169- dep_nucleation = " ABDINM"
170- heterogeneous = " ABIFM"
171- homogeneous = " ABHOM"
169+ dep_nucleation = P3 ? " P3_dep " : " ABDINM"
170+ heterogeneous = P3 ? " P3_het " : " ABIFM"
171+ homogeneous = P3 ? " P3_hom " : " ABHOM"
172172 condensation_growth = " Condensation"
173173 deposition_growth = " Deposition"
174174 liq_size_distribution = " Gamma"
@@ -177,8 +177,9 @@ function AIDA_IN05_params(FT, w, t_max, t_profile, T_profile, P_profile)
177177 r_nuc = FT (1e-7 ) # FT(3.057e-6)
178178 A_aer = FT (4 * π * r_nuc^ 2 )
179179 ips = CMP. IceNucleationParameters (FT)
180+ aap = CMP. AerosolActivationParameters (FT)
180181
181- params = (; const_dt, w, t_max, ips,
182+ params = (; const_dt, w, t_max, ips, aap,
182183 prescribed_thermodynamics, t_profile, T_profile, P_profile,
183184 aerosol_act, aerosol, r_nuc, aero_σ_g, A_aer, # aerosol activation
184185 condensation_growth, deposition_growth, # growth
@@ -236,7 +237,7 @@ function AIDA_IN05_IC(FT, data_file)
236237 return [Sₗ, p₀, T₀, qᵥ, qₗ, qᵢ, Nₐ, Nₗ, Nᵢ, FT (0 )]
237238end
238239
239- function AIDA_IN07_params (FT, w, t_max, t_profile, T_profile, P_profile, batch_name)
240+ function AIDA_IN07_params (FT, w, t_max, t_profile, T_profile, P_profile, batch_name; P3 = false )
240241 IN_mode = " ABDINM"
241242 const_dt = FT (1 )
242243 prescribed_thermodynamics = true
@@ -248,9 +249,9 @@ function AIDA_IN07_params(FT, w, t_max, t_profile, T_profile, P_profile, batch_n
248249 elseif batch_name == " DEP"
249250 aerosol = CMP. Dust (FT)
250251 end
251- dep_nucleation = " ABDINM"
252- heterogeneous = " ABIFM"
253- homogeneous = " ABHOM"
252+ dep_nucleation = P3 ? " P3_dep " : " ABDINM"
253+ heterogeneous = P3 ? " P3_het " : " ABIFM"
254+ homogeneous = P3 ? " P3_hom " : " ABHOM"
254255 condensation_growth = " Condensation"
255256 deposition_growth = " Deposition"
256257 liq_size_distribution = " Gamma"
@@ -260,8 +261,9 @@ function AIDA_IN07_params(FT, w, t_max, t_profile, T_profile, P_profile, batch_n
260261 A_aer = FT (4 * π * r_nuc^ 2 )
261262 # r_nuc = r₀ in IC
262263 ips = CMP. IceNucleationParameters (FT)
264+ aap = CMP. AerosolActivationParameters (FT)
263265
264- params = (; const_dt, w, t_max, ips,
266+ params = (; const_dt, w, t_max, ips, aap,
265267 prescribed_thermodynamics, t_profile, T_profile, P_profile,
266268 aerosol_act, aerosol, r_nuc, aero_σ_g, A_aer, # aerosol activation
267269 condensation_growth, deposition_growth, # growth
@@ -320,15 +322,15 @@ function AIDA_IN07_IC(FT, data_file)
320322 return [Sₗ, p₀, T₀, qᵥ, qₗ, qᵢ, Nₐ, Nₗ, Nᵢ, FT (0 )]
321323end
322324
323- function TROPIC04_params (FT, w, t_max, t_profile, T_profile, P_profile)
325+ function TROPIC04_params (FT, w, t_max, t_profile, T_profile, P_profile; P3 = false )
324326 IN_mode = " ABHOM"
325327 const_dt = FT (1 )
326328 prescribed_thermodynamics = true
327329 aerosol_act = " AeroAct"
328330 aerosol = CMP. Sulfate (FT)
329- dep_nucleation = " ABDINM "
330- heterogeneous = " ABIFM "
331- homogeneous = " ABHOM"
331+ dep_nucleation = " None "
332+ heterogeneous = " None "
333+ homogeneous = P3 ? " P3_hom " : " ABHOM"
332334 condensation_growth = " Condensation"
333335 deposition_growth = " Deposition"
334336 liq_size_distribution = " Gamma"
@@ -337,8 +339,9 @@ function TROPIC04_params(FT, w, t_max, t_profile, T_profile, P_profile)
337339 r_nuc = FT (1.15 / 2 * 1e-6 )
338340 A_aer = FT (4 * π * r_nuc^ 2 )
339341 ips = CMP. IceNucleationParameters (FT)
342+ aap = CMP. AerosolActivationParameters (FT)
340343
341- params = (; const_dt, w, t_max, ips,
344+ params = (; const_dt, w, t_max, ips, aap,
342345 prescribed_thermodynamics, t_profile, T_profile, P_profile,
343346 aerosol_act, aerosol, r_nuc, aero_σ_g, A_aer, # aerosol activation
344347 condensation_growth, deposition_growth, # growth
@@ -376,16 +379,16 @@ function TROPIC04_IC(FT)
376379 return [Sₗ, p₀, T₀, qᵥ, qₗ, qᵢ, Nₐ, Nₗ, Nᵢ, FT (0 )]
377380end
378381
379- function ACI04_22_params (FT, w, t_max, t_profile, T_profile, P_profile, batch_name)
382+ function ACI04_22_params (FT, w, t_max, t_profile, T_profile, P_profile, batch_name; P3 = false )
380383 # Niemand et al (2012)
381384 IN_mode = " ABIFM"
382385 const_dt = FT (1 )
383386 prescribed_thermodynamics = true
384387 aerosol_act = " None"
385388 aerosol = batch_name == " ACI04_22" ? CMP. MiddleEasternDust (FT) : CMP. Dust (FT)
386- dep_nucleation = " ABDINM"
387- heterogeneous = " ABIFM"
388- homogeneous = " ABHOM"
389+ dep_nucleation = P3 ? " P3_dep " : " ABDINM"
390+ heterogeneous = P3 ? " P3_het " : " ABIFM"
391+ homogeneous = P3 ? " P3_hom " : " ABHOM"
389392 condensation_growth = " Condensation"
390393 deposition_growth = " Deposition"
391394 liq_size_distribution = " Gamma"
@@ -394,8 +397,9 @@ function ACI04_22_params(FT, w, t_max, t_profile, T_profile, P_profile, batch_na
394397 r_nuc = FT (0.645 / 2 * 1e-6 ) # avg of 2 modes
395398 A_aer = FT (4 * π * r_nuc^ 2 )
396399 ips = CMP. IceNucleationParameters (FT)
400+ aap = CMP. AerosolActivationParameters (FT)
397401
398- params = (; const_dt, w, t_max, ips,
402+ params = (; const_dt, w, t_max, ips, aap,
399403 prescribed_thermodynamics, t_profile, T_profile, P_profile,
400404 aerosol_act, aerosol, r_nuc, aero_σ_g, A_aer, # aerosol activation
401405 condensation_growth, deposition_growth, # growth
@@ -433,16 +437,16 @@ function ACI04_22_IC(FT)
433437 return [Sₗ, p₀, T₀, qᵥ, qₗ, qᵢ, Nₐ, Nₗ, Nᵢ, FT (0 )]
434438end
435439
436- function EXP19_params (FT, w, t_max, t_profile, T_profile, P_profile, batch_name)
440+ function EXP19_params (FT, w, t_max, t_profile, T_profile, P_profile, batch_name; P3 = false )
437441 # Cotten et al (2007)
438442 IN_mode = " ABIFM"
439443 const_dt = FT (1 )
440444 prescribed_thermodynamics = true
441445 aerosol_act = " None"
442446 aerosol = batch_name == " EXP19" ? CMP. AsianDust (FT) : CMP. Dust (FT)
443- dep_nucleation = " ABDINM"
444- heterogeneous = " ABIFM"
445- homogeneous = " ABHOM"
447+ dep_nucleation = P3 ? " P3_dep " : " ABDINM"
448+ heterogeneous = P3 ? " P3_het " : " ABIFM"
449+ homogeneous = P3 ? " P3_hom " : " ABHOM"
446450 condensation_growth = " Condensation"
447451 deposition_growth = " Deposition"
448452 liq_size_distribution = " Gamma"
@@ -451,8 +455,9 @@ function EXP19_params(FT, w, t_max, t_profile, T_profile, P_profile, batch_name)
451455 r_nuc = FT (0.4 / 2 * 1e-6 ) # value is mode radius, not mean
452456 A_aer = FT (4 * π * r_nuc^ 2 )
453457 ips = CMP. IceNucleationParameters (FT)
458+ aap = CMP. AerosolActivationParameters (FT)
454459
455- params = (; const_dt, w, t_max, ips,
460+ params = (; const_dt, w, t_max, ips, aap,
456461 prescribed_thermodynamics, t_profile, T_profile, P_profile,
457462 aerosol_act, aerosol, r_nuc, aero_σ_g, A_aer, # aerosol activation
458463 condensation_growth, deposition_growth, # growth
@@ -490,16 +495,16 @@ function EXP19_IC(FT)
490495 return [Sₗ, p₀, T₀, qᵥ, qₗ, qᵢ, Nₐ, Nₗ, Nᵢ, FT (0 )]
491496end
492497
493- function EXP45_params (FT, w, t_max, t_profile, T_profile, P_profile, batch_name)
498+ function EXP45_params (FT, w, t_max, t_profile, T_profile, P_profile, batch_name; P3 = false )
494499 # Cotten et al (2007)
495500 IN_mode = " ABDINM"
496501 const_dt = FT (1 )
497502 prescribed_thermodynamics = true
498503 aerosol_act = " None"
499504 aerosol = batch_name == " EXP45" ? CMP. SaharanDust (FT) : CMP. Dust (FT)
500- dep_nucleation = " ABDINM"
501- heterogeneous = " ABIFM"
502- homogeneous = " ABHOM"
505+ dep_nucleation = P3 ? " P3_dep " : " ABDINM"
506+ heterogeneous = P3 ? " P3_het " : " ABIFM"
507+ homogeneous = P3 ? " P3_hom " : " ABHOM"
503508 condensation_growth = " Condensation"
504509 deposition_growth = " Deposition"
505510 liq_size_distribution = " Gamma"
@@ -508,8 +513,9 @@ function EXP45_params(FT, w, t_max, t_profile, T_profile, P_profile, batch_name)
508513 r_nuc = FT (0.4 / 2 * 1e-6 ) # value is mode radius, not mean
509514 A_aer = FT (4 * π * r_nuc^ 2 )
510515 ips = CMP. IceNucleationParameters (FT)
516+ aap = CMP. AerosolActivationParameters (FT)
511517
512- params = (; const_dt, w, t_max, ips,
518+ params = (; const_dt, w, t_max, ips, aap,
513519 prescribed_thermodynamics, t_profile, T_profile, P_profile,
514520 aerosol_act, aerosol, r_nuc, aero_σ_g, A_aer, # aerosol activation
515521 condensation_growth, deposition_growth, # growth
0 commit comments