1: Preindustrial control case

1: Preindustrial control case#

Exercise: Run a preindustrial control simulation

Create, configure, build and run a preindustrial case in which atmosphere and land models are active called f.e30.F1850C_LTso.ne16pg3_ne16pg3_mg17.piControl.001 following CESM naming conventions.

Run for 1 month.

Click here for hints

What is the compset for atmosphere-land coupled preindustrial with a low-top atmosphere?

  • F1850C_LTso

What is the resolution for FHISTC_LTso?

  • Use resolution ne16pg3_ne16pg3_mg17 for fast throughput

Which XML variable should you change to tell the model to run for one month?

  • Use STOP_OPTION and STOP_N

How to improve throughput (how fast the model runs) of this F-case?

  • Change the task layout (./xmlchange NTASKS=-6) before running case.setup

How to check if each XML variable is modified correctly?

  • Use xmlquery -p

Click here for the solution

# Set environment variables

Set environment variables with the commands:

For tcsh users

set CASENAME=f.e30.F1850C_LTso.ne16pg3_ne16pg3_mg17.piControl.001
set CASEDIR=/glade/u/home/$USER/cases/$CASENAME
set RUNDIR=/glade/derecho/scratch/$USER/$CASENAME/run
set COMPSET=F1850C_LTso
set RESOLUTION=ne16pg3_ne16pg3_mg17
set PROJECT=UESM0016

For bash users

export CASENAME=f.e30.F1850C_LTso.ne16pg3_ne16pg3_mg17.piControl.001
export CASEDIR=/glade/u/home/$USER/cases/$CASENAME
export RUNDIR=/glade/derecho/scratch/$USER/$CASENAME/run
export COMPSET=F1850C_LTso
export RESOLUTION=ne16pg3_ne16pg3_mg17
export PROJECT=UESM0016

# Make a case directory

If needed create a directory cases into your home directory:

mkdir /glade/u/home/$USER/cases/

# Create a new case

Create a new case with the command create_newcase:

cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts/
./create_newcase --case $CASEDIR --res $RESOLUTION --compset $COMPSET --project $PROJECT --run-unsupported

# Set the job queue and project to charge

If needed, change job queue. For instance, to run in the queue tutorial.

cd $CASEDIR
./xmlchange JOB_QUEUE=tutorial,PROJECT=$PROJECT --force

This step can be redone at anytime in the process.

# Increase model throughput

With the default task layout, this case runs relatively slowly, achieving a throughput of only about 4 model years per day.

Model throughput measures how quickly the model runs. It is typically expressed in model years simulated per wall-clock day (or simply years per day). For example, a throughput of 4 years/day means that if the model ran continuously for 24 hours, it would simulate 4 years of climate.

To improve throughput, change the task layout before running case.setup:

./xmlchange NTASKS=-6

# Setup

Invoke case.setup with the command:

cd $CASEDIR
./case.setup    

You build the namelists with the command:

./preview_namelists

This step is optional as the script preview_namelists is automatically called by case.build and case.submit.

# Set run length

./xmlchange STOP_N=1,STOP_OPTION=nmonths

# Build and submit

qcmd -- ./case.build
./case.submit

# Check on your run

After submitting the job, use qstat -u $USER to check the status of your job. It should take <10 minutes to finish the one-month simulation. Feel free to start the next exercise while you wait.

# Check your solution

When the run is completed, look at the history files in the archive directory.

(1) Check that your archive directory on derecho (The path will be different on other machines):

cd /glade/derecho/scratch/$USER/archive/$CASENAME/atm/hist
ls 

As your run is one-month and an F-case, there should be 2 monthly files for the atmosphere, averaged (h0a) and instantaneous (h0i), and 1 monthly file for land (h0) components only.

Success! Now let’s look back into the past…