Skip to content

Commit

Permalink
try specifying diags from config
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Oct 14, 2024
1 parent 6df692e commit 8d6ec54
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
4 changes: 4 additions & 0 deletions config/ci_configs/coarse_single_ft32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ precip_model: "0M"
rad: "allskywithclear"
t_end: "10days"
vert_diff: "true"
diagnostics:
- short_name: [mse, lr, edt, evu, ts, mass_strf, stab, vt, egr, toa_fluxes_net]
reduction_time: average
period: 1days
4 changes: 4 additions & 0 deletions config/ci_configs/coarse_single_ft64_hourly_checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ precip_model: "0M"
rad: "allskywithclear"
t_end: "10days"
vert_diff: "true"
diagnostics:
- short_name: [mse, lr, edt, evu, ts, mass_strf, stab, vt, egr, toa_fluxes_net]
reduction_time: average
period: 1days
28 changes: 14 additions & 14 deletions experiments/ClimaEarth/run_amip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ parsed_args = parse_commandline(argparse_settings())
## modify parsed args for fast testing from REPL #hide
if isinteractive()
parsed_args["config_file"] =
isnothing(parsed_args["config_file"]) ? joinpath(pkg_dir, "config/ci_configs/interactive_debug.yml") :
isnothing(parsed_args["config_file"]) ? joinpath(pkg_dir, "config/ci_configs/coarse_single_ft32.yml") :
parsed_args["config_file"]
parsed_args["job_id"] = "interactive_debug"
parsed_args["job_id"] = "coarse_single_ft32"
end

## the unique job id should be passed in via the command line
Expand All @@ -117,18 +117,18 @@ Random.seed!(random_seed)
atmos_config_dict, config_dict = get_atmos_config_dict(config_dict, job_id)
atmos_config_object = CA.AtmosConfig(atmos_config_dict)

if config_dict["mode_name"] == "amip" && config_dict["output_default_diagnostics"]
@info "Using default AMIP diagnostics"
!haskey(config_dict, "diagnostics") && (config_dict["diagnostics"] = [])
push!(
config_dict["diagnostics"],
Dict(
"short_name" => ["mse", "lr", "edt", "evu", "ts", "mass_strf", "stab", "vt", "egr", "toa_fluxes_net"],
"reduction_time" => "average",
"period" => "1days",
),
)
end
# if config_dict["mode_name"] == "amip" && config_dict["output_default_diagnostics"]
# @info "Using default AMIP diagnostics"
# !haskey(config_dict, "diagnostics") && (config_dict["diagnostics"] = [])
# push!(
# config_dict["diagnostics"],
# Dict(
# "short_name" => ["mse", "lr", "edt", "evu", "ts", "mass_strf", "stab", "vt", "egr", "toa_fluxes_net"],
# "reduction_time" => "average",
# "period" => "1days",
# ),
# )
# end

## read in some parsed command line arguments, required by this script
mode_name = config_dict["mode_name"]
Expand Down

0 comments on commit 8d6ec54

Please sign in to comment.