Skip to content

Commit

Permalink
rename diagnostics -> extra_atmos_diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Nov 19, 2024
1 parent 6cc3cf9 commit 728b0e2
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion config/benchmark_configs/climaatmos_diagedmf_io.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ output_default_diagnostics: false
prescribe_ozone: true
aerosol_radiation: true
prescribed_aerosols: ["CB1", "CB2", "DST01", "OC1", "OC2", "SO4", "SSLT01"]
diagnostics:
extra_atmos_diagnostics:
- short_name: [pfull, rsut, rlut, pr, hus, rv]
period: 10hours
2 changes: 1 addition & 1 deletion config/ci_configs/slabplanet_atmos_diags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ precip_model: "0M"
rad: "gray"
t_end: "10days"
vert_diff: "true"
diagnostics:
extra_atmos_diagnostics:
- short_name: [mse, lr, edt, evu, ts, mass_strf, stab, vt, egr, toa_fluxes_net]
reduction_time: average
period: 1days
2 changes: 1 addition & 1 deletion config/ci_configs/slabplanet_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ rad: "gray"
t_end: "10days"
vert_diff: "true"
output_default_diagnostics: false
diagnostics:
extra_atmos_diagnostics:
- short_name: [mse, lr, edt, evu, hfes, evspsbl, ts]
period: 1days
8 changes: 4 additions & 4 deletions experiments/ClimaEarth/cli_options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ function argparse_settings()
help = "Boolean flag indicating whether to compute and output coupler diagnostics [`true` (default), `false`]"
arg_type = Bool
default = true
"--diagnostics"
help = "List of dictionaries containing diagnostic information [nothing (default)]"
arg_type = Vector{Dict{Any, Any}}
default = nothing
# Physical simulation information
"--evolving_ocean"
help = "Boolean flag indicating whether to use a dynamic slab ocean model, as opposed to constant surface temperatures [`true` (default), `false`]"
Expand Down Expand Up @@ -144,6 +140,10 @@ function argparse_settings()
help = "The repository containing the ClimaAtmos configuration file to use [`ClimaAtmos` (default), `ClimaCoupler`]"
arg_type = String
default = "ClimaAtmos"
"--extra_atmos_diagnostics"
help = "List of dictionaries containing information about additional atmosphere diagnostics to output [nothing (default)]"
arg_type = Vector{Dict{Any, Any}}
default = nothing
### ClimaLand specific
"--land_domain_type"
help = "Type of land domain. [`sphere` (default), `single_column`]"
Expand Down
2 changes: 1 addition & 1 deletion experiments/ClimaEarth/run_cloudless_aquaplanet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ config_dict = Dict(
"surface_setup" => "PrescribedSurface",
# diagnostic (nested with period and short_name)
"output_default_diagnostics" => false,
"diagnostics" => [
"extra_atmos_diagnostics" => [
Dict(
"short_name" =>
["mse", "lr", "mass_strf", "stab", "vt", "egr", "ua", "va", "wa", "ta", "rhoa", "pfull"],
Expand Down
2 changes: 1 addition & 1 deletion experiments/ClimaEarth/run_cloudy_aquaplanet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ config_dict = Dict(
"surface_setup" => "PrescribedSurface",
# diagnostic (nested with period and short_name)
"output_default_diagnostics" => false,
"diagnostics" => [
"extra_atmos_diagnostics" => [
Dict(
"short_name" =>
["mse", "lr", "mass_strf", "stab", "vt", "egr", "ua", "va", "wa", "ta", "rhoa", "pfull"],
Expand Down
2 changes: 1 addition & 1 deletion experiments/ClimaEarth/run_cloudy_slabplanet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ config_dict = Dict(
"surface_setup" => "PrescribedSurface",
# diagnostic (nested with period and short_name)
"output_default_diagnostics" => false,
"diagnostics" => [
"extra_atmos_diagnostics" => [
Dict(
"short_name" =>
["mse", "lr", "mass_strf", "stab", "vt", "egr", "ua", "va", "wa", "ta", "rhoa", "pfull"],
Expand Down
2 changes: 1 addition & 1 deletion experiments/ClimaEarth/run_dry_held_suarez.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ config_dict = Dict(
"surface_setup" => "PrescribedSurface",
# diagnostic (nested with period and short_name)
"output_default_diagnostics" => false,
"diagnostics" => [
"extra_atmos_diagnostics" => [
Dict(
"short_name" =>
["mse", "lr", "mass_strf", "stab", "vt", "egr", "ua", "va", "wa", "ta", "rhoa", "pfull"],
Expand Down
2 changes: 1 addition & 1 deletion experiments/ClimaEarth/run_moist_held_suarez.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ config_dict = Dict(
"surface_setup" => "PrescribedSurface",
# diagnostic (nested with period and short_name)
"output_default_diagnostics" => false,
"diagnostics" => [
"extra_atmos_diagnostics" => [
Dict(
"short_name" =>
["mse", "lr", "mass_strf", "stab", "vt", "egr", "ua", "va", "wa", "ta", "rhoa", "pfull"],
Expand Down
7 changes: 4 additions & 3 deletions experiments/ClimaEarth/user_io/arg_parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ function get_coupler_args(config_dict::Dict)
@info "Using default AMIP diagnostics"
(period, calendar_dt) = get_diag_period(t_start, t_end)

# when is this used? config_dict["diagnostics"] never accessed
!haskey(config_dict, "diagnostics") && (config_dict["diagnostics"] = Vector{Dict{Any, Any}}())
# Additional atmosphere diagnostics
!haskey(config_dict, "extra_atmos_diagnostics") &&
(config_dict["extra_atmos_diagnostics"] = Vector{Dict{Any, Any}}())
push!(
config_dict["diagnostics"],
config_dict["extra_atmos_diagnostics"],
Dict("short_name" => ["toa_fluxes_net"], "reduction_time" => "average", "period" => period),
)
end
Expand Down

0 comments on commit 728b0e2

Please sign in to comment.