Skip to content

Commit 327c2bb

Browse files
committed
delete plot_diagnostics option; rename amip_diagnostics to coupler_diagnostics
1 parent 8e6a925 commit 327c2bb

File tree

8 files changed

+16
-17
lines changed

8 files changed

+16
-17
lines changed

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ ClimaCoupler.jl Release Notes
66

77
### ClimaCoupler features
88

9+
#### Postprocessing no longer uses `sim_mode` PR[#1153](https://github.com/CliMA/ClimaCoupler.jl/pull/1153)
10+
Postprocessing now consists of a single function that's used for all simulation
11+
modes. Note that now all available diagnostics will be plotted at the end of
12+
the simulation, where before we specified a subset to plot based on the
13+
simulation type.
14+
This PR also removes the `plot_diagnostics` config option. `use_coupler_diagnostics`
15+
should be used instead.
16+
917
#### PrescribedOceanSimulation added, includes SST update PR[#1144](https://github.com/CliMA/ClimaCoupler.jl/pull/1144)
1018
This PR is similar to #1141 below, but applies to SST rather than SIC.
1119
SST is now updated within `PrescribedOceanSimulation` methods, rather

config/ci_configs/slabplanet_atmos_diags.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
apply_limiter: false
2-
plot_diagnostics: true
32
dt: "200secs"
43
dt_cpl: "200secs"
54
dt_save_to_sol: "9days"

docs/src/diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Once we have created a `ScheduledDiagnostic` for each variable we're interested
3939
we collect them in a vector and pass this to our `DiagnosticsHandler` object.
4040

4141
An example of this process for the variable `F_turb_energy` can be found in
42-
`experiments/ClimaEarth/user_io/amip_diagnostics.jl`.
42+
`experiments/ClimaEarth/user_io/coupler_diagnostics.jl`.
4343

4444
For more information about this process, please see the
4545
ClimaDiagnostics.jl [documentation](https://clima.github.io/ClimaDiagnostics.jl/dev/).

experiments/ClimaEarth/cli_options.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,6 @@ function argparse_settings()
119119
help = "Directory to save output files. Note that TempestRemap fails if interactive and paths are too long. [\"experiments/ClimaEarth/output\" (default)]"
120120
arg_type = String
121121
default = "experiments/ClimaEarth/output"
122-
"--plot_diagnostics"
123-
help = "Boolean flag indicating whether to make plot diagnostics [`false` (default), `true`]"
124-
arg_type = Bool
125-
default = false
126122
# ClimaAtmos specific
127123
"--surface_setup"
128124
help = "Triggers ClimaAtmos into the coupled mode [`PrescribedSurface` (default), `DefaultMoninObukhov`]" # retained here for standalone Atmos benchmarks

experiments/ClimaEarth/run_amip.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ add_extra_diagnostics!(config_dict)
131131
energy_check,
132132
conservation_softfail,
133133
output_dir_root,
134-
plot_diagnostics,
135134
) = get_coupler_args(config_dict)
136135

137136
#=
@@ -486,10 +485,10 @@ Use ClimaDiagnostics for default AMIP diagnostics, which currently include turbu
486485
=#
487486
if use_coupler_diagnostics
488487
@info "Using default coupler diagnostics"
489-
include("user_io/amip_diagnostics.jl")
488+
include("user_io/coupler_diagnostics.jl")
490489
coupler_diags_path = joinpath(dir_paths.output, "coupler")
491490
isdir(coupler_diags_path) || mkpath(coupler_diags_path)
492-
diags_handler = amip_diagnostics_setup(coupler_fields, coupler_diags_path, dates.date0[1], tspan[1], calendar_dt)
491+
diags_handler = coupler_diagnostics_setup(coupler_fields, coupler_diags_path, dates.date0[1], tspan[1], calendar_dt)
493492
else
494493
diags_handler = nothing
495494
end
@@ -732,7 +731,6 @@ The postprocessing includes:
732731
=#
733732

734733
if ClimaComms.iamroot(comms_ctx)
735-
postprocessing_vars =
736-
(; plot_diagnostics, use_coupler_diagnostics, output_default_diagnostics, t_end, conservation_softfail)
734+
postprocessing_vars = (; use_coupler_diagnostics, output_default_diagnostics, t_end, conservation_softfail)
737735
postprocess_sim(cs, postprocessing_vars)
738736
end

experiments/ClimaEarth/user_io/arg_parsing.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function get_coupler_args(config_dict::Dict)
7676
# Diagnostics information
7777
use_coupler_diagnostics = config_dict["use_coupler_diagnostics"]
7878
use_land_diagnostics = config_dict["use_land_diagnostics"]
79-
calendar_dt = config_dict["calendar_dt"]
79+
(_, calendar_dt) = get_diag_period(t_start, t_end)
8080

8181
# Physical simulation information
8282
evolving_ocean = config_dict["evolving_ocean"]
@@ -89,7 +89,6 @@ function get_coupler_args(config_dict::Dict)
8989

9090
# Output information
9191
output_dir_root = config_dict["coupler_output_dir"]
92-
plot_diagnostics = config_dict["plot_diagnostics"]
9392

9493
# ClimaLand-specific information
9594
land_domain_type = config_dict["land_domain_type"]
@@ -122,7 +121,6 @@ function get_coupler_args(config_dict::Dict)
122121
energy_check,
123122
conservation_softfail,
124123
output_dir_root,
125-
plot_diagnostics,
126124
land_domain_type,
127125
land_albedo_type,
128126
land_initial_condition,

experiments/ClimaEarth/user_io/amip_diagnostics.jl renamed to experiments/ClimaEarth/user_io/coupler_diagnostics.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import ClimaCoupler: Interfacer
33
import Dates
44

55
"""
6-
amip_diagnostics_setup(fields, output_dir, start_date, t_start, calendar_dt)
6+
coupler_diagnostics_setup(fields, output_dir, start_date, t_start, calendar_dt)
77
88
Set up the default diagnostics for an AMIP simulation, using ClimaDiagnostics.
99
The diagnostics are saved to NetCDF files. Currently, this just includes a
1010
diagnostic for turbulent energy fluxes.
1111
1212
Return a DiagnosticsHandler object to coordinate the diagnostics.
1313
"""
14-
function amip_diagnostics_setup(fields, output_dir, start_date, t_start, calendar_dt)
14+
function coupler_diagnostics_setup(fields, output_dir, start_date, t_start, calendar_dt)
1515
# Create schedules and writer
1616
schedule_everystep = CD.Schedules.EveryStepSchedule()
1717
schedule_calendar_dt = CD.Schedules.EveryCalendarDtSchedule(calendar_dt, start_date = start_date)

experiments/ClimaEarth/user_io/postprocessing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function postprocess_sim(cs, postprocessing_vars)
2020
land_output_dir = joinpath(output_dir, "clima_land")
2121

2222
# Plot generic diagnostics if requested
23-
if use_coupler_diagnostics && plot_diagnostics
23+
if use_coupler_diagnostics
2424
@info "Plotting diagnostics for coupler, atmos, and land"
2525
make_diagnostics_plots(coupler_output_dir, artifact_dir, output_prefix = "coupler_")
2626
make_diagnostics_plots(atmos_output_dir, artifact_dir, output_prefix = "atmos_")

0 commit comments

Comments
 (0)