Skip to content

Commit

Permalink
amip diags in driver
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Oct 14, 2024
1 parent 6e609bb commit cc7cdc5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
4 changes: 0 additions & 4 deletions config/ci_configs/coarse_single_ft32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ 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: 0 additions & 4 deletions config/ci_configs/coarse_single_ft64_hourly_checkpoints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ 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
38 changes: 24 additions & 14 deletions experiments/ClimaEarth/run_amip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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["use_coupler_diagnostics"]
@info "Using default AMIP diagnostics"
!haskey(config_dict, "diagnostics") && (config_dict["diagnostics"] = Vector{Dict{Any, Any}}())
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 Expand Up @@ -884,8 +884,18 @@ if ClimaComms.iamroot(comms_ctx)
output_dir_coupler = dir_paths.artifacts

# Check if all output variables are available in the specified directories
make_ci_plots(output_dir_atmos, dir_paths.artifacts, short_names = amip_short_names_atmos, output_prefix = "atmos_")
make_ci_plots(output_dir_coupler, dir_paths.artifacts, short_names = amip_short_names_coupler, output_prefix = "coupler_")
make_ci_plots(
output_dir_atmos,
dir_paths.artifacts,
short_names = amip_short_names_atmos,
output_prefix = "atmos_",
)
make_ci_plots(
output_dir_coupler,
dir_paths.artifacts,
short_names = amip_short_names_coupler,
output_prefix = "coupler_",
)

# Check this because we only want monthly data for making plots
if t_end > 84600 * 31 * 3 && config_dict["output_default_diagnostics"]
Expand Down

0 comments on commit cc7cdc5

Please sign in to comment.