Extending a simulation#
Restart files#
Once a run segment has completed, the model generates a series of restart files and rpointer files that are stored in the run directory. These files are also archives in the rest
directory within the archive (Figure 1).
The restart files contain all the information required for the model to keep on running from where it ended.
The rpointer files tell the model which restart files to use.
Figure 1: CESM structure and the restart files
Continuing a simulation#
In most cases, the length of simulation that you can run within one submission will be shorter than what you actually want, so you will need to run several segments of shorter length.
For instance, if you need to run a 200-year simulation, you will have to break into shorter simulations. For instance, 20 segments of 10 years.
The two variables that can be used to control the overall length of your simulation are CONTINUE_RUN
and RESUBMIT
.
CONTINUE_RUN
controls whether the simulation is continuing from a previous segment or not. When set toTrue
, the simulation continues from a previous segment.RESUBMIT
controls the number of resubmissions.
If you want to continue the previous simulation for another individual segment you can run the following from the case directory
./xmlchange CONTINUE_RUN=True
If you then submit your case again by running case.submit
from your case directory, this will use the restart files that exist in your run directory to continue the run where it left off for another segment of length STOP_N
.
If you want to continue the previous simulation for multiple segments than you can also set RESUBMIT
to the number of times you would like to resubmit the simulation. This controls how many times you want to resubmit and run another segment of the simulation of length STOP_N
. For example, if you were to set RESUBMIT=2
then when you submit the job to the queue it will first run one segment, then it will subsequently resubmit twice, running another length of STOP_N
each time i.e., a total of three times STOP_N
.
If you set RESUBMIT
to a non-zero value when you make your first submission, it will automatically set CONTINUE_RUN=True
after the first segment.