Skip to content

Commit

Permalink
Remove/fix unused YAML keys, add exception for diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
nefrathenrici committed Jul 18, 2024
1 parent 41ee058 commit 66f1e40
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/model_configs/gpu_prognostic_edmfx_aquaplanet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ moist: equil
precip_model: 1M
dt: 10secs
t_end: 1hours
dt_save_to_disk: 600secs
dt_save_state_to_disk: 600secs
toml: [toml/prognostic_edmfx.toml]
output_default_diagnostics: false
diagnostics:
Expand Down
2 changes: 1 addition & 1 deletion config/model_configs/prognostic_edmfx_bomex_column.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ z_stretch: false
perturb_initstate: false
dt: "10secs"
t_end: "6hours"
dt_save_to_disk: "10mins"
dt_save_state_to_disk: "10mins"
toml: [toml/prognostic_edmfx_bomex.toml]
netcdf_interpolation_num_points: [2, 2, 60]
diagnostics:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ z_stretch: false
perturb_initstate: false
dt: "50secs"
t_end: "6hours"
dt_save_to_disk: "10mins"
dt_save_state_to_disk: "10mins"
toml: [toml/prognostic_edmfx_bomex.toml]
netcdf_interpolation_num_points: [2, 2, 60]
diagnostics:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ z_stretch: false
perturb_initstate: false
dt: "5secs"
t_end: "6hours"
dt_save_to_disk: "10mins"
dt_save_state_to_disk: "10mins"
toml: [toml/prognostic_edmfx_bomex_pigroup.toml]
netcdf_interpolation_num_points: [2, 2, 60]
diagnostics:
Expand Down
2 changes: 1 addition & 1 deletion config/model_configs/prognostic_edmfx_gcmdriven_column.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ z_stretch: false
perturb_initstate: false
dt: "10secs"
t_end: "6hours"
dt_save_to_disk: "10mins"
dt_save_state_to_disk: "10mins"
toml: [toml/prognostic_edmfx_bomex.toml]
netcdf_output_at_levels: true
netcdf_interpolation_num_points: [2, 2, 60]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ z_stretch: false
perturb_initstate: false
dt: 20secs"
t_end: "12hours"
dt_save_to_disk: "10mins"
dt_save_state_to_disk: "10mins"
toml: [toml/prognostic_edmfx_simpleplume.toml]
netcdf_interpolation_num_points: [2, 2, 80]
diagnostics:
Expand Down
1 change: 0 additions & 1 deletion config/perf_configs/flame_perf_target_frierson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ dt_save_to_sol: "Inf"
rad: "allskywithclear"
log_progress: false
vert_diff: "FriersonDiffusion"
pproximate_linear_solve_iters: 2
use_krylov_method: true
use_dynamic_krylov_rtol: false
krylov_rtol: 0.99
Expand Down
6 changes: 5 additions & 1 deletion src/solver/yaml_helper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ function override_default_config(config_dict::AbstractDict;)
end
end

unused_keys = filter(k -> !haskey(default_config, k), keys(config_dict))
excluded_keys = Set(["diagnostics"])
unused_keys = filter(
k -> !haskey(default_config, k) && !(k in excluded_keys),
keys(config_dict),
)
if !isempty(unused_keys)
@warn "The configuration passed to ClimaAtmos contains unused keys: $(join(unused_keys, ", "))"
end
Expand Down

0 comments on commit 66f1e40

Please sign in to comment.