Skip to content

Commit 710a9f5

Browse files
authored
Merge pull request #1213 from CliMA/js/driver_docs
update driver docs
2 parents a7ef309 + 5dd3692 commit 710a9f5

File tree

2 files changed

+38
-8
lines changed

2 files changed

+38
-8
lines changed

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,13 @@ If no configuration file is specified, the default
7171

7272
The output will take up approximately 1GB of space, and the simulation will take around 10 minutes to run on a single CPU, or less time on multiple CPUs or GPU.
7373

74-
> Note: If you want to set the configuration file to something other than the default
74+
Note: If you want to set the configuration file to something other than the default
7575
while running the driver interactively, you'll need to
76-
manually set the values for `parsed_args["config_file"]` and `parsed_args["job_id"]`.
76+
manually set the value for `config_file`.
7777

78-
>For example, to use the configuration file found at `config/ci_configs/amip_default.yml`, you would use add the following lines in the `run_amip` driver:
78+
For example, to use the configuration file found at `config/ci_configs/amip_default.yml`, you would set `config_file` as follows in the `run_amip` driver:
7979
```
80-
parsed_args["config_file"] = "config/ci_configs/amip_default.yml"
81-
parsed_args["job_id"] = "amip_default"
80+
config_file = "config/ci_configs/amip_default.yml"
8281
```
8382

8483
### A Note about ClimaComms and MPI
@@ -150,3 +149,13 @@ module load common
150149

151150
For additional information about these clusters, including how to gain access for the first time,
152151
see our slurm-buildkite wiki pages for [Central](https://github.com/CliMA/slurm-buildkite/wiki/Central) and [clima](https://github.com/CliMA/slurm-buildkite/wiki/clima).
152+
153+
# Running Slabplanet
154+
The `run_amip.jl` driver contains two modes: the full AMIP mode and a Slabplanet mode, where all surfaces are thermal slabs. Since AMIP is not a closed system, the Slabplanet mode is useful for checking conservation properties of the coupling.
155+
156+
Running a Slabplanet simulation is the same as running an AMIP simulation, except for the specifics of the configuration file provided, so all information from the `Running AMIP` section will apply here too. Note that the default configuration used by `run_amip.jl` specifies an AMIP simulation, so a configuration file must be specified to run a Slabplanet simulation. This can be done as follows:
157+
```julia
158+
julia --project=experiments/ClimaEarth experiments/ClimaEarth/run_amip.jl --config_file config/ci_configs/slabplanet_default.yml --job_id slabplanet_default
159+
```
160+
161+
To ensure that conservation is tracked throughout the experiment, the `energy_check` field of the configuration file must be set to true.

experiments/ClimaEarth/run_amip.jl

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,32 @@ are prescribed using time-interpolations between monthly observed data. We use s
1111
1212
For more information, see the PCMDI's specifications for [AMIP I](https://pcmdi.github.io/mips/amip/) and [AMIP II](https://pcmdi.github.io/mips/amip2/).
1313
14-
This driver contains two modes. The full `AMIP` mode and a `SlabPlanet` (all surfaces are thermal slabs) mode. Since `AMIP` is not a closed system, the
15-
`SlabPlanet` mode is useful for checking conservation properties of the coupling.
14+
## Running the AMIP configuration
15+
To run a coupled simulation in the default AMIP configuration, run the
16+
following command from the root directory of the repository:
17+
```bash
18+
julia --project=experiments/ClimaEarth experiments/ClimaEarth/run_amip.jl
19+
```
20+
21+
## Configuration
22+
You can also specify a custom configuration file to run the coupled simulation
23+
in a different setup. The configuration file should be a TOML file that overwrites
24+
the input fields specified in `experiments/ClimaEarth/cli_options.jl`.
25+
A set of example configuration files can be found in the `config/ci_configs/` directory.
26+
27+
For example, to run the coupled simulation with a different configuration file:
28+
```bash
29+
julia --project=experiments/ClimaEarth experiments/ClimaEarth/run_amip.jl --config_file="path/to/config.toml"
30+
```
31+
32+
To run the coupled simulation interactively with a different configuration file,
33+
set the `config_file` variable in this script to be the path to that file.
34+
35+
For more details about running a coupled simulation, including how to run in a
36+
Slabplanet configuration, please see our [README.md](https://github.com/CliMA/ClimaCoupler.jl/blob/main/README.md).
1637
=#
1738

18-
# Load the necessary modules
39+
# Load the necessary modules and code to run the coupled simulation
1940
include("setup_run.jl")
2041

2142
# Get the configuration file from the command line (or manually set it here)

0 commit comments

Comments
 (0)