Skip to content

Commit

Permalink
Merge pull request #3130 from CliMA/aj/add_dycoms_rf02
Browse files Browse the repository at this point in the history
Add dycoms RF02 to CI
  • Loading branch information
trontrytel authored Jun 24, 2024
2 parents 44915b1 + 5d928b3 commit 3141f59
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 13 deletions.
9 changes: 9 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/model_configs/diagnostic_edmfx_dycoms_rf01_box.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
40 changes: 40 additions & 0 deletions config/model_configs/diagnostic_edmfx_dycoms_rf02_box.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions post_processing/ci_plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
6 changes: 4 additions & 2 deletions src/initial_conditions/initial_conditions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)))
Expand Down
6 changes: 3 additions & 3 deletions src/parameterized_tendencies/radiation/radiation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 (;
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/solver/model_getters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/solver/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3141f59

Please sign in to comment.