Skip to content

Commit

Permalink
Merge pull request #1134 from CliMA/tr/fix-postprocessing-leaderboard
Browse files Browse the repository at this point in the history
Move include outside of `postprocess_sim` function
  • Loading branch information
szy21 authored Dec 26, 2024
2 parents 99a3980 + 48ea954 commit 24ee8a2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions experiments/ClimaEarth/user_io/postprocessing.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## helpers for user-specified IO
include("debug_plots.jl")
include("diagnostics_plots.jl")
include("../leaderboard/leaderboard.jl")

"""
postprocess_sim(::Type{AbstractSlabplanetSimulationMode}, cs, postprocessing_vars)
Expand Down Expand Up @@ -46,10 +47,6 @@ function postprocess_sim(::Type{AMIPMode}, cs, postprocessing_vars)
if use_coupler_diagnostics
## plot data that correspond to the model's last save_hdf5 call (i.e., last month)
@info "AMIP plots"

## ClimaESM
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"]
amip_short_names_coupler = ["F_turb_energy"]
Expand All @@ -72,7 +69,6 @@ function postprocess_sim(::Type{AMIPMode}, cs, postprocessing_vars)

# Check this because we only want monthly data for making plots
if t_end > 84600 * 31 * 3 && output_default_diagnostics
include("leaderboard/leaderboard.jl")
leaderboard_base_path = cs.dirs.artifacts
compute_leaderboard(leaderboard_base_path, atmos_output_dir)
compute_pfull_leaderboard(leaderboard_base_path, atmos_output_dir)
Expand All @@ -92,7 +88,6 @@ function common_postprocessing(cs, postprocessing_vars)
(; plot_diagnostics, atmos_output_dir) = postprocessing_vars
if plot_diagnostics
@info "Plotting diagnostics"
include("user_io/diagnostics_plots.jl")
make_diagnostics_plots(atmos_output_dir, cs.dirs.artifacts)
end

Expand Down

0 comments on commit 24ee8a2

Please sign in to comment.