If you want to continue a run using restart files, and not make any changes to the namelist or source code you should just change CONTINUE_RUN to TRUE
in the env_run.xml
file and run the case. See step 11 in Run CAM-Chem on Cheyenne for more details.
If you want to continue a run using restart files and make changes to the namelist or source code you must create a branch. For more information on run types see this link: https://www.cesm.ucar.edu/models/cesm1.1/cesm/doc/usersguide/c1128.html
Preparation: Make sure you save restart files in your desired frequency. To do this, before you run your reference case (i.e., the case from which you are going to branch) update the following in env_run.xml
- Change the frequency of writing restart files by updating REST_OPTION (units) and REST_N (number). For example, if you wanted to save restart files every 1 month, change REST_OPTION = nmonths and REST_N = 1.
- Change DOUT_S_SAVE_INTERIM_RESTART_FILES = TRUE
Note: In order to run a branch, you must use restart files for the exact date for which you will start your branched run.
To create a branch:
- Create a new case ($CASENAME_BRANCH) by cloning your reference case ($CASENAME_REF). See Clone a Case for more details.
- Before setting-up and building this new case ($CASENAME_BRANCH), in env_run.xml
- Change the RUN_TYPE to branch
- Change RUN_REFDIR to the directory where you will save the restart files to start the run. Typically this is <your_output_directory>/$CASENAME_BRANCH/run
- Change RUN_REFCASE to $CASENAME_REF. (This must match the case name of your restart files.)
- Change RUN_REFDATE to <start_date_of_branch>
- Change STOP_N (number) and STOP_OPTION (units) to the desired run time . For example, STOP_N = 1 and STOP_OPTION = nmonths would run for 1 month.
- Now if desired, make any namelist or source code changes
- Set-up and build your case exactly as done in steps 2-8 in Run CAM-Chem on Cheyenne
- Copy restart files from your reference case output <your_output_directory>/archive/$CASENAME_REF/rest/<initial_date_of_run>/* to <your_output_directory>/$CASENAME_BRANCH/run/. These include the restart files themselves and the rpointer files.
- Run the model.