diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 93b18ab819..8bfc5193e6 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -527,6 +527,15 @@ steps: agents: slurm_mem: 20GB + - label: ":umbrella: Diagnostic EDMFX DYCOMS_RF02 in a box" + command: > + julia --color=yes --project=examples examples/hybrid/driver.jl + --config_file $CONFIG_PATH/diagnostic_edmfx_dycoms_rf02_box.yml + --job_id diagnostic_edmfx_dycoms_rf02_box + artifact_paths: "diagnostic_edmfx_dycoms_rf02_box/output_active/*" + agents: + slurm_mem: 20GB + - label: ":umbrella: Diagnostic EDMFX Rico in a box" command: > julia --color=yes --project=examples examples/hybrid/driver.jl diff --git a/config/model_configs/diagnostic_edmfx_dycoms_rf01_box.yml b/config/model_configs/diagnostic_edmfx_dycoms_rf01_box.yml index a68f186029..d93156c5d4 100644 --- a/config/model_configs/diagnostic_edmfx_dycoms_rf01_box.yml +++ b/config/model_configs/diagnostic_edmfx_dycoms_rf01_box.yml @@ -1,7 +1,7 @@ initial_condition: DYCOMS_RF01 subsidence: DYCOMS edmf_coriolis: DYCOMS_RF01 -rad: DYCOMS_RF01 +rad: DYCOMS surface_setup: DYCOMS_RF01 turbconv: diagnostic_edmfx implicit_diffusion: true diff --git a/config/model_configs/diagnostic_edmfx_dycoms_rf01_explicit_box.yml b/config/model_configs/diagnostic_edmfx_dycoms_rf01_explicit_box.yml index 11a8757532..c0edacd33e 100644 --- a/config/model_configs/diagnostic_edmfx_dycoms_rf01_explicit_box.yml +++ b/config/model_configs/diagnostic_edmfx_dycoms_rf01_explicit_box.yml @@ -1,7 +1,7 @@ initial_condition: DYCOMS_RF01 subsidence: DYCOMS edmf_coriolis: DYCOMS_RF01 -rad: DYCOMS_RF01 +rad: DYCOMS surface_setup: DYCOMS_RF01 turbconv: diagnostic_edmfx prognostic_tke: true diff --git a/config/model_configs/diagnostic_edmfx_dycoms_rf02_box.yml b/config/model_configs/diagnostic_edmfx_dycoms_rf02_box.yml new file mode 100644 index 0000000000..608793854c --- /dev/null +++ b/config/model_configs/diagnostic_edmfx_dycoms_rf02_box.yml @@ -0,0 +1,40 @@ +initial_condition: DYCOMS_RF02 +subsidence: DYCOMS +edmf_coriolis: DYCOMS_RF02 +rad: DYCOMS +surface_setup: DYCOMS_RF02 +turbconv: diagnostic_edmfx +implicit_diffusion: true +approximate_linear_solve_iters: 2 +prognostic_tke: true +edmfx_upwinding: first_order +edmfx_entr_model: "Generalized" +edmfx_detr_model: "Generalized" +edmfx_nh_pressure: true +edmfx_sgs_mass_flux: true +edmfx_sgs_diffusive_flux: true +moist: equil +apply_limiter: false +precip_model: "1M" +call_cloud_diagnostics_per_stage: true +config: box +x_max: 1e8 +y_max: 1e8 +x_elem: 2 +y_elem: 2 +z_elem: 30 +z_max: 1500 +z_stretch: false +dt: 100secs +t_end: 6hours +dt_save_state_to_disk: 10mins +toml: [toml/diagnostic_edmfx.toml] +netcdf_interpolation_num_points: [8, 8, 30] +diagnostics: + - short_name: [ts, ta, thetaa, ha, pfull, rhoa, ua, va, wa, hur, hus, cl, clw, cli, hussfc, evspsbl, pr] + period: 10mins + - short_name: [arup, waup, taup, thetaaup, haup, husup, hurup, clwup, cliup, waen, tke, lmix] + period: 10mins + - short_name: [husra, hussn] + period: 10mins +ode_algo: ARS343 diff --git a/config/model_configs/prognostic_edmfx_dycoms_rf01_column.yml b/config/model_configs/prognostic_edmfx_dycoms_rf01_column.yml index 5bc79cc7e6..ea25bc7337 100644 --- a/config/model_configs/prognostic_edmfx_dycoms_rf01_column.yml +++ b/config/model_configs/prognostic_edmfx_dycoms_rf01_column.yml @@ -1,7 +1,7 @@ initial_condition: DYCOMS_RF01 subsidence: DYCOMS edmf_coriolis: DYCOMS_RF01 -rad: DYCOMS_RF01 +rad: DYCOMS surface_setup: DYCOMS_RF01 turbconv: prognostic_edmfx implicit_diffusion: true diff --git a/post_processing/ci_plots.jl b/post_processing/ci_plots.jl index 9973d6a890..20f5a647bb 100644 --- a/post_processing/ci_plots.jl +++ b/post_processing/ci_plots.jl @@ -1082,6 +1082,7 @@ EDMFBoxPlots = Union{ } EDMFBoxPlotsWithPrecip = Union{ + Val{:diagnostic_edmfx_dycoms_rf02_box}, Val{:prognostic_edmfx_rico_column}, Val{:prognostic_edmfx_trmm_column}, Val{:diagnostic_edmfx_rico_box}, diff --git a/src/initial_conditions/initial_conditions.jl b/src/initial_conditions/initial_conditions.jl index 87dced494b..241e421eb6 100644 --- a/src/initial_conditions/initial_conditions.jl +++ b/src/initial_conditions/initial_conditions.jl @@ -426,7 +426,7 @@ function deep_atmos_baroclinic_wave_values(z, ϕ, λ, params, perturb) Ω = CAP.Omega(params) R = CAP.planet_radius(params) - # Constants from paper (See Table 1. in Ullrich et al (2014)) + # Constants from paper (See Table 1. in Ullrich et al (2014)) k = 3 # Power for temperature field T_e = FT(310) # Surface temperature at the equator T_p = FT(240) # Surface temperature at the pole @@ -942,7 +942,9 @@ end The `InitialCondition` described in [Ackerman2009](@cite), but with a hydrostatically balanced pressure profile. """ -struct DYCOMS_RF02 <: InitialCondition end +Base.@kwdef struct DYCOMS_RF02 <: InitialCondition + prognostic_tke::Bool = false +end for IC in (:Dycoms_RF01, :Dycoms_RF02) IC_Type = Symbol(uppercase(string(IC))) diff --git a/src/parameterized_tendencies/radiation/radiation.jl b/src/parameterized_tendencies/radiation/radiation.jl index d538ce7a8a..53fd8414dd 100644 --- a/src/parameterized_tendencies/radiation/radiation.jl +++ b/src/parameterized_tendencies/radiation/radiation.jl @@ -237,10 +237,10 @@ function radiation_tendency!(Yₜ, Y, p, t, ::RRTMGPI.AbstractRRTMGPMode) end ##### -##### DYCOMS_RF01 radiation +##### DYCOMS_RF01 and DYCOMS_RF02 radiation ##### -function radiation_model_cache(Y, radiation_mode::RadiationDYCOMS_RF01) +function radiation_model_cache(Y, radiation_mode::RadiationDYCOMS) FT = Spaces.undertype(axes(Y.c)) NT = NamedTuple{(:z, :ρ, :q_tot), NTuple{3, FT}} return (; @@ -253,7 +253,7 @@ function radiation_model_cache(Y, radiation_mode::RadiationDYCOMS_RF01) net_energy_flux_sfc = [Geometry.WVector(FT(0))], ) end -function radiation_tendency!(Yₜ, Y, p, t, radiation_mode::RadiationDYCOMS_RF01) +function radiation_tendency!(Yₜ, Y, p, t, radiation_mode::RadiationDYCOMS) @assert !(p.atmos.moisture_model isa DryModel) (; params) = p diff --git a/src/solver/model_getters.jl b/src/solver/model_getters.jl index 15940cc440..579fe99ae1 100644 --- a/src/solver/model_getters.jl +++ b/src/solver/model_getters.jl @@ -213,7 +213,7 @@ function get_radiation_mode(parsed_args, ::Type{FT}) where {FT} "gray", "allsky", "allskywithclear", - "DYCOMS_RF01", + "DYCOMS", "TRMM_LBA", ) return if radiation_name == "clearsky" @@ -244,8 +244,8 @@ function get_radiation_mode(parsed_args, ::Type{FT}) where {FT} idealized_clouds, add_isothermal_boundary_layer, ) - elseif radiation_name == "DYCOMS_RF01" - RadiationDYCOMS_RF01{FT}() + elseif radiation_name == "DYCOMS" + RadiationDYCOMS{FT}() elseif radiation_name == "TRMM_LBA" RadiationTRMM_LBA(FT) else @@ -311,7 +311,7 @@ function get_subsidence_model(parsed_args, radiation_mode, FT) elseif subsidence == "Rico" APL.Rico_subsidence(FT) elseif subsidence == "DYCOMS" - @assert radiation_mode isa RadiationDYCOMS_RF01 + @assert radiation_mode isa RadiationDYCOMS z -> -z * radiation_mode.divergence else error("Uncaught case") diff --git a/src/solver/types.jl b/src/solver/types.jl index c0db60d3d0..abee77d86d 100644 --- a/src/solver/types.jl +++ b/src/solver/types.jl @@ -255,7 +255,7 @@ Base.broadcastable(x::AbstractDetrainmentModel) = tuple(x) Base.broadcastable(x::AbstractSGSamplingType) = tuple(x) Base.broadcastable(x::AbstractTendencyModel) = tuple(x) -Base.@kwdef struct RadiationDYCOMS_RF01{FT} +Base.@kwdef struct RadiationDYCOMS{FT} "Large-scale divergence" divergence::FT = 3.75e-6 alpha_z::FT = 1.0