Exercise 2: Modify run type#
Exercise: Modify the env_run.xml
file
Branch from the end of Exercise 1 Part I to create a new case named “b.day2.2”.
Double the ocean coupling frequency (OCN_NCPL
). Include an initial file as output data. Run for 1 month, then restart for 1 month.
Hint!
For a branch run, we need to set several variables related to the reference case in
env_run.xml
. To find variables applied to reference case (Branch and Hybrid runs), use ./xmlquery -p REF.Ocean coupling frequency needs to be changed in
env_run.xml
, controlled by the variableOCN_NCPL
. What is the default value ofOCN_NCPL
? Usexmlquery
to find out! You may also take a look at the variable description inenv_run.xml
to learn more about the variable.Make sure to update the walltime to match the run length.
Don’t forget to put restart files into the run directory
$RUNDIR
.To include an initial file as output, we will need to modify the variable
inithist
in the atmospehre namelistuser_nl_cam
. We will learn more about this in the next chapter namelist modification.
Click here for the solution
1. Create your new case with the command:
cd /glade/work/$USER/code/my_cesm_code/cime/scripts/
./create_newcase --case /glade/work/$USER/cases/b.day2.2 --res f19_g17 --compset B1850
2. In your case directory, change the run type to branch, and change the associated RUN_* variables:
cd /glade/work/$USER/cases/b.day2.2
./xmlchange RUN_TYPE=branch
./xmlchange RUN_REFCASE=b.day2.1,RUN_REFDATE=0001-04-01,GET_REFCASE=FALSE
3. Set run time variables:
./xmlchange STOP_OPTION=nmonths,STOP_N=1,RESUBMIT=1,JOB_WALLCLOCK_TIME=02:00:00
4. Double ocean coupling frequency in `env_run.xml`:
./xmlchange OCN_NCPL=48
5. Set up the case, put the initial and restart files in the `$RUNDIR`:
./case.setup
cp /glade/scratch/$USER/archive/b.day2.1/rest/0001-04-01-00000/* /glade/scratch/$USER/b.day2.2/run/
6. To include an initial file at the end of the run, add the following lines to file `user_nl_cam`:
inithist='ENDOFRUN'
7. Run ./preview_namelists:
./preview_namelists
6. Carry on to build and submit the run:
qcmd -- ./case.build
./case.submit
Remember that qcmd
is used on Cheyenne only.
After the job completes, go to the short term archive space and explore.