Exercise 1#

Extending your simulation for an additional month#

In this exercise you’ll continue your previous simulation (case01) for an additional month (Figure 1).

xmlfiles

Figure 1: An illustration of the extension of case01. This case initially ran for 5 days from January 1st to January 5th. Now we will extend this for an additional month to February 5th.

Exercise: Extend case01 for one more month

Use the xmlchange command to change the variables CONTINUE_RUN, STOP_OPTION, and STOP_N to configure case01 to run for an additional month.

Submit your simulation to run for an additional month.

*Note that we performed the initial 5 day run and then resubmitted it for another month for demonstration purposes here. In practise, if you are outputting monthly data, you would really want to run continuously for an integer number of months. Otherwise, the monthly averages for the sea ice model will not be accurate. In this case the January history file output for the sea ice model will actually be the average from days 5 to 31.

Click here for hints

Go into your case directory ~/cases/case01.

You can see what STOP_N, STOP_OPTION and CONTINUE_RUN are currently set to by using the following command

./xmlquery STOP_N,STOP_OPTION,CONTINUE_RUN

You should find that

  • STOP_N=5

  • STOP_OPTION=ndays

  • CONTINUE_RUN=False

We can set the length of the next segment to be one month by

./xmlchange STOP_OPTION=nmonths,STOP_N=1

In addition, we’ll need to ensure that we are continuing on from our first 5 day segment, rather than starting a new initial run. This is achieved by setting CONTINUE_RUN to True

./xmlchange CONTINUE_RUN=True

After running the above two commands, you can check the values of these parameters by

./xmlquery STOP_N,STOP_OPTION,CONTINUE_RUN

You should find that

  • STOP_N=1

  • STOP_OPTION=nmonths

  • CONTINUE_RUN=True

In order to perform a continuation of the run, you will also need all the necessary restart files in your run directory. They are already there for the run we just performed, but, if that wasn’t the case, you’d need to copy all the contents of the restart directory in your archive into your run directory i.e., you’d need to copy the contents of

~/scratch/archive/case01/rest/0001-01-06-00000

into

~/scratch/case01/run/

Now you can submit your run again from the case directory by

./case.submit

Note that you don’t have to set-up or re-build the run when performing a continuation like this

You can check that your simulation is running in the queue again by

squeue -u <username> or qstat -u <username>

where <username> is replaced by whatever your user name is.

Click here for the solution

You can extend case01 using the following

cd ~/cases/case01
./xmlchange STOP_N=1,STOP_OPTION=nmonths,CONTINUE_RUN=True
./case.submit