Skip to content

Commit

Permalink
rename CI plots -> diagnostics plots
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Nov 25, 2024
1 parent c74032a commit 66a975e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion config/ci_configs/slabplanet_atmos_diags.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apply_limiter: false
ci_plots: true
plot_diagnostics: true
dt: "200secs"
dt_cpl: "200secs"
dt_save_to_sol: "9days"
Expand Down
4 changes: 2 additions & 2 deletions experiments/ClimaEarth/cli_options.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ function argparse_settings()
help = "Directory to save output files. Note that TempestRemap fails if interactive and paths are too long. [\"experiments/ClimaEarth/output\" (default)]"
arg_type = String
default = "experiments/ClimaEarth/output"
"--ci_plots"
help = "Boolean flag indicating whether to make CI plots [`false` (default), `true`]"
"--plot_diagnostics"
help = "Boolean flag indicating whether to make plot diagnostics [`false` (default), `true`]"
arg_type = Bool
default = false
# ClimaAtmos specific
Expand Down
16 changes: 8 additions & 8 deletions experiments/ClimaEarth/run_amip.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ config_dict, job_id = get_coupler_config()
energy_check,
conservation_softfail,
output_dir_root,
generate_ci_plots,
plot_diagnostics,
) = get_coupler_args!(config_dict)

## get component model dictionaries (if applicable)
Expand Down Expand Up @@ -845,7 +845,7 @@ if ClimaComms.iamroot(comms_ctx)
@info "AMIP plots"

## ClimaESM
include("user_io/ci_plots.jl")
include("user_io/diagnostics_plots.jl")

# define variable names and output directories for each diagnostic
amip_short_names_atmos = ["ta", "ua", "hus", "clw", "pr", "ts", "toa_fluxes_net"]
Expand All @@ -854,13 +854,13 @@ if ClimaComms.iamroot(comms_ctx)
output_dir_coupler = dir_paths.output

# Check if all output variables are available in the specified directories
make_ci_plots(
make_diagnostics_plots(
output_dir_atmos,
dir_paths.artifacts,
short_names = amip_short_names_atmos,
output_prefix = "atmos_",
)
make_ci_plots(
make_diagnostics_plots(
output_dir_coupler,
dir_paths.artifacts,
short_names = amip_short_names_coupler,
Expand All @@ -877,10 +877,10 @@ if ClimaComms.iamroot(comms_ctx)
end
end
## plot extra atmosphere diagnostics if specified
if generate_ci_plots
@info "Generating CI plots"
include("user_io/ci_plots.jl")
make_ci_plots(atmos_sim.integrator.p.output_dir, dir_paths.artifacts)
if plot_diagnostics
@info "Plotting diagnostics"
include("user_io/diagnostics_plots.jl")
make_diagnostics_plots(atmos_sim.integrator.p.output_dir, dir_paths.artifacts)
end

## plot all model states and coupler fields (useful for debugging)
Expand Down
4 changes: 2 additions & 2 deletions experiments/ClimaEarth/user_io/arg_parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function get_coupler_args!(config_dict::Dict)

# Output information
output_dir_root = config_dict["coupler_output_dir"]
generate_ci_plots = config_dict["ci_plots"]
plot_diagnostics = config_dict["plot_diagnostics"]

# ClimaLand-specific information
land_domain_type = config_dict["land_domain_type"]
Expand Down Expand Up @@ -131,7 +131,7 @@ function get_coupler_args!(config_dict::Dict)
energy_check,
conservation_softfail,
output_dir_root,
generate_ci_plots,
plot_diagnostics,
land_domain_type,
land_albedo_type,
land_temperature_anomaly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,19 @@ function map_comparison(func, simdirs, args)
end

"""
make_ci_plots(
make_diagnostics_plots(
output_path::AbstractString,
plot_path::AbstractString;
short_names::Vector{<:AbstractString} = ["mse", "lr", "edt", "ts"],
reduction::String = "average",
output_prefix = "",
)
Create plots for the general CI diagnostics. The plots are saved to `plot_path`.
This is the default plotting function for the CI diagnostics and it can be extended
Create plots for diagnostics. The plots are saved to `plot_path`.
This is the default plotting function for diagnostics and it can be extended
to include additional diagnostics.
The `reduction` keyword argument should be consistent with the reduction used to save the diagnostics.
"""
function make_ci_plots(
function make_diagnostics_plots(
output_path::AbstractString,
plot_path::AbstractString;
short_names::Vector{<:AbstractString} = ["mse", "lr", "edt", "ts"],
Expand Down

0 comments on commit 66a975e

Please sign in to comment.