Starting and Stopping#
To start a model run, we will need to submit $CASE.run
to the batch queue. In addition, we will also need to specify how long we want to run the model in env_run.xml
.
We will learn how to modify the runtime variables in env_run.xml
to initialize, stop and restart a CESM model run.
1. “Initial run” and “continue run”#
When a CESM model run is first initialized, it is called an initial run.
The variable $CONTINUE_RUN
is a flag indicating if the current model run is an initial run or a continue run.
For an intial run,
CONTINUE_RUN
must be set toFALSE
,If the model continues a run,
CONTINUE_RUN
is set toTRUE
.
Your initial CESM run can be initialized in one of three run types: startup, branch,or hybrid. We will get into more details about the run types in the Chapter Modifying Run Types.
For now, we need to know that setting run types is only important for an initial run when CONTINUE_RUN
is set to FALSE
.
2. Set runtime limits with STOP_OPTION
and STOP_N
#
Run length options can be set using $STOP_OPTION
and $STOP_N
variables in env_run.xml.
STOP_OPTION
: sets the run length time interval type, i.e. nmonths, ndays, nyears.STOP_N
: sets the number of intervals (set bySTOP_OPTION
) to run the model during each submission within the specified wallclock time.
For example, if you want to run a simulation for 6 months during the job submssion, you will need to set:
./xmlchange STOP_N=6
./xmlchange STOP_OPTION='nmonths'
STOP_N
and STOP_OPTION
control the length of the run per job submission. They should be set based on the job queue limit and model throughput. You can find more information on this topic in the chapter Using timing files.
A typical simulation is comprised of many job submissions. This is because you can only stay in the computer queue for a limited time. We will learn more about completing long simulations in the chapter Changing run length.