Skip to content

Commit 91facd1

Browse files
authored
Merge pull request #1251 from CliMA/gb/step
Split `setup_and_run` in multiple steps
2 parents dc25ca2 + e85cd7b commit 91facd1

File tree

6 files changed

+205
-141
lines changed

6 files changed

+205
-141
lines changed

NEWS.md

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

77
### ClimaCoupler features
88

9+
### Split `setup_and_run` in multiple functions. PR[#1251](https://github.com/CliMA/ClimaCoupler.jl/pull/1251)
10+
11+
`setup_and_run` was split into three functions:
12+
- `CoupledSimulation`, which takes a dictionary of a file path and constructs a coupled simulation
13+
- `run!`, which evolves the model
14+
- `postprocess`, which makes plots
15+
16+
In addition to this, `step!` was introduced to take a single step forward with
17+
the coupled simulation.
18+
19+
The function `setup_and_run` is still available.
20+
21+
This change also renames `calendar_dt` to `diagnostics_dt` to make it clearer
22+
that it refers to diagnostics.
23+
924
### Some misc. cleanup PR[#1244](https://github.com/CliMA/ClimaCoupler.jl/pull/1244)
1025
Changes include
1126
- Land simulation constructors no longer take in `domain_type`, which was unused.

experiments/ClimaEarth/run_amip.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,10 @@ include("setup_run.jl")
4343
config_file = parse_commandline(argparse_settings())["config_file"]
4444

4545
# Set up and run the coupled simulation
46-
cs = setup_and_run(config_file)
46+
cs = CoupledSimulation(config_file)
47+
run!(cs)
48+
49+
# Postprocessing
50+
# TODO: Remove this option?
51+
conservation_softfail = get_coupler_config_dict(config_file)["conservation_softfail"]
52+
postprocess(cs, conservation_softfail)

0 commit comments

Comments
 (0)