Skip to content

Commit ac0dce4

Browse files
committed
Add RCEMIPII analytic sounding initial condition
1 parent 61ae2da commit ac0dce4

File tree

6 files changed

+210
-0
lines changed

6 files changed

+210
-0
lines changed

.buildkite/pipeline.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@ steps:
168168
agents:
169169
slurm_mem: 20GB
170170

171+
- label: ":computer: CRM rcemipii in a box with 1M"
172+
command: >
173+
julia --color=yes --project=.buildkite .buildkite/ci_driver.jl
174+
--config_file $CONFIG_PATH/rcemipii_box_CRM_1M.yml
175+
--job_id rcemipii_box_CRM_1M
176+
artifact_paths: "rcemipii_box_CRM_1M/output_active/*"
177+
171178
- label: ":genie: LES ISDAC in a box"
172179
command: >
173180
julia --color=yes --project=.buildkite .buildkite/ci_driver.jl
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
reference_job_id: les_box # for plotting
2+
surface_setup: DefaultMoninObukhov
3+
surface_temperature: RCEMIPII
4+
insolation: rcemipii
5+
initial_condition: RCEMIPIIProfile_300
6+
config: box
7+
rad: allskywithclear
8+
co2_model: fixed
9+
approximate_linear_solve_iters: 2 # only valid when implicit_diffusion=true
10+
rayleigh_sponge: true # set sponge level in toml file
11+
smagorinsky_lilly: "UV"
12+
implicit_diffusion: true
13+
14+
# Reference diffusion setup
15+
vert_diff: "DecayWithHeightDiffusion"
16+
hyperdiff: "false"
17+
18+
# microphysics
19+
### !! 1M and 2M !!
20+
cloud_model: grid_scale # Ultimately wanted when `moist: nonequil`
21+
moist: nonequil
22+
precip_model: 1M
23+
### spatial discretization ###
24+
x_max: 96000.0 # 96km
25+
y_max: 96000.0 # 96km
26+
# x_max: 6000000.0 # 6000km
27+
# y_max: 400000.0 # 400km
28+
z_max: 30000.0 # 30km
29+
nh_poly: 3 # hor. poly deg -> # quad pts in 1D in a h. elem is Nq = nh + 1
30+
# z_elem: 43 # Note: Set sponge height (`zd_viscous`) in toml file to cover top ~5 points
31+
z_elem: 86
32+
dz_bottom: 30.0
33+
34+
#~8km grid
35+
x_elem: 4
36+
y_elem: 4
37+
dt: 10secs
38+
# ~4km grid
39+
# x_elem: 8
40+
# y_elem: 8
41+
# dt: 5secs
42+
# ~2km grid
43+
# x_elem: 16
44+
# y_elem: 16
45+
# dt: 2secs
46+
# ~1km grid
47+
# x_elem: 32
48+
# y_elem: 32
49+
# dt: 1secs
50+
51+
t_end: 10hours
52+
# t_end: 2days
53+
# t_end: 1days
54+
# t_end: 21days
55+
56+
## >> During debugging, reduce these as appropriate
57+
dt_save_state_to_disk: 1days
58+
dt_rad: 1hours # same as `dt_save_state_to_disk` for reproducibility
59+
check_nan_every: 1024 # for debugging: set to check NaNs every `n` iterations
60+
log_to_file: true
61+
## <<
62+
63+
toml: [toml/rcemipii_box.toml]
64+
65+
# enable_diagnostics: false
66+
output_default_diagnostics: false # adds various 1h diagnostics. Only use if `dt_save_state_to_disk` is a multiple of 1hr
67+
diagnostics:
68+
- short_name: [
69+
wa, ua, va, ta, thetaa, ha, # dynamics & thermodynamics
70+
hus, hur, cl, clw, cli, # liquid
71+
pr, # precipitation
72+
ke, # kinetic energy for spectrum
73+
# Smagorinsky diagnostics
74+
Dh_smag, strainh_smag, # horizontal
75+
# Dv_smag, strainv_smag, # vertical
76+
# DecayWithHeight diffusion coefficient
77+
edt,
78+
]
79+
# period: 10mins
80+
period: 1hours
81+
## 1M microphsics
82+
- short_name: [husra, hussn]
83+
# period: 10mins
84+
period: 1hours
85+
# 2M microphysics
86+
# - short_name: [cdnc, ncra]
87+
# period: 10mins

docs/src/api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ ClimaAtmos.InitialConditions.TRMM_LBA
4141
ClimaAtmos.InitialConditions.LifeCycleTan2018
4242
ClimaAtmos.InitialConditions.Bomex
4343
ClimaAtmos.InitialConditions.Soares
44+
ClimaAtmos.InitialConditions.RCEMIPIIProfile_295
45+
ClimaAtmos.InitialConditions.RCEMIPIIProfile_300
46+
ClimaAtmos.InitialConditions.RCEMIPIIProfile_305
4447
```
4548

4649
### Helper

src/initial_conditions/initial_conditions.jl

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,82 @@ function (initial_condition::RisingThermalBubbleProfile)(params)
358358
return local_state
359359
end
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

src/solver/type_getters.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@ function get_initial_condition(parsed_args, atmos)
414414
"DryDensityCurrentProfile",
415415
"RisingThermalBubbleProfile",
416416
"PrecipitatingColumn",
417+
"RCEMIPIIProfile_295",
418+
"RCEMIPIIProfile_300",
419+
"RCEMIPIIProfile_305",
417420
]
418421
return getproperty(ICs, Symbol(parsed_args["initial_condition"]))()
419422
elseif isfile(parsed_args["initial_condition"])

toml/rcemipii_box.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# toml/rcemipii_box.toml
2+
3+
[c_smag]
4+
value = 1.0
5+
6+
[condensation_evaporation_timescale]
7+
value = 50
8+
9+
[sublimation_deposition_timescale]
10+
value = 50
11+
12+
[angular_velocity_planet_rotation]
13+
value = 0
14+
15+
[idealized_ocean_albedo]
16+
value = 0.07
17+
18+
[mean_sea_level_pressure]
19+
value = 101480
20+
21+
[D_0_diffusion]
22+
value = 5
23+
24+
[H_diffusion]
25+
value = 800
26+
27+
[SST_mean]
28+
value = 300
29+
30+
[SST_delta]
31+
value = 1.25
32+
33+
[SST_wavelength]
34+
value = 6e6

0 commit comments

Comments
 (0)