@@ -358,6 +358,82 @@ function (initial_condition::RisingThermalBubbleProfile)(params)
358358 return local_state
359359end
360360
361+ """
362+ RCEMIPIIProfile_295(), RCEMIPIIProfile_300(), RCEMIPIIProfile_305()
363+
364+ Three [`InitialCondition`](@ref) following the sounding to initialize simulations for
365+ RCEMIPII as described by Wing et. al. (2018)
366+ (https://doi.org/10.5194/gmd-11-793-2018). There are three input profiles:
367+ RCEMIPIIProfile_295, RCEMIPIIProfile_300, and RCEMIPIIProfile_305, that specify
368+ three different SST temperatures and different initial specific humidity
369+ profiles. Note: this should be used for RCE_small and NOT
370+ RCE_large - RCE_large must be initialized with the final state of RCE_small.
371+ """
372+
373+ Base. @kwdef struct RCEMIPIIProfile_295{FT} <: InitialCondition
374+ temperature:: FT = 295.0
375+ humidity:: FT = 12e-3
376+ end
377+
378+ Base. @kwdef struct RCEMIPIIProfile_300{FT} <: InitialCondition
379+ temperature:: FT = 300.0
380+ humidity:: FT = 18.65e-3
381+ end
382+
383+ Base. @kwdef struct RCEMIPIIProfile_305{FT} <: InitialCondition
384+ temperature:: FT = 305.0
385+ humidity:: FT = 24e-3
386+ end
387+
388+ function (
389+ initial_condition:: Union{RCEMIPIIProfile_295, RCEMIPIIProfile_300, RCEMIPIIProfile_305}
390+ )(
391+ params,
392+ )
393+ (; temperature, humidity) = initial_condition
394+ function local_state (local_geometry)
395+ FT = eltype (params)
396+ R_d = CAP. R_d (params)
397+ grav = CAP. grav (params)
398+ thermo_params = CAP. thermodynamics_params (params)
399+
400+ T_0 = FT (temperature)
401+ q_0 = FT (humidity)
402+
403+ q_t = FT (10 ^ (- 14 )) # kg kg -1
404+ z_q1 = FT (4000 ) # m
405+ z_q2 = FT (7500 ) # m
406+ z_t = FT (15000 ) # m
407+ Γ = FT (0.0067 ) # K m-1
408+ p_0 = FT (101480 ) # Pa
409+
410+ T_v0 = T_0 * (FT (1 ) + FT (0.608 ) * q_0)
411+ T_vt = T_v0 - Γ * z_t
412+
413+ p_t = p_0 * (T_vt / T_v0)^ (grav / (R_d * Γ))
414+
415+ RCEMIPII_T_v (z) = z ≤ z_t ? T_v0 - Γ * z : T_vt
416+ RCEMIPII_p (z) =
417+ z ≤ z_t ? p_0 * ((T_v0 - Γ * z) / T_v0)^ (grav / (R_d * Γ)) :
418+ p_t * exp (- grav * (z - z_t) / (R_d * T_vt))
419+ RCEMIPII_q (z) = z ≤ z_t ? q_0 * exp (- z / z_q1) * exp (- (z / z_q2)^ 2 ) : q_t
420+
421+ (; z) = local_geometry. coordinates
422+
423+ q = RCEMIPII_q (z)
424+ T_v = RCEMIPII_T_v (z)
425+ T = T_v / (FT (1 ) + FT (0.608 ) * q)
426+ p = RCEMIPII_p (z)
427+
428+ return LocalState (;
429+ params,
430+ geometry = local_geometry,
431+ thermo_state = TD. PhaseEquil_pTq (thermo_params, p, T, q),
432+ )
433+ end
434+ return local_state
435+ end
436+
361437"""
362438 overwrite_initial_conditions!(initial_condition, args...)
363439
0 commit comments