1: Preindustrial control case

1: Preindustrial control case#

Exercise: Run a preindustrial control simulation

Create, configure, build and run a fully coupled preindustrial case called b.e21.B1850.f19_g17.piControl.001 following CESM naming conventions.

Run for 1 year.

Click here for hints

What is the compset for fully coupled preindustrial?

  • B1850

What is the resolution for B1850?

  • Use resolution f19_g17 for fast throughput

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

  • Use STOP_OPTION and STOP_N

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=b.e21.B1850.f19_g17.piControl.001
set CASEDIR=/glade/u/home/$USER/cases/$CASENAME
set RUNDIR=/glade/derecho/scratch/$USER/$CASENAME/run
set COMPSET=B1850
set RESOLUTION=f19_g17
set PROJECT=UESM0013

Note: You should use the project number given for this tutorial.

For bash users

export CASENAME=b.e21.B1850.f19_g17.piControl.001
export CASEDIR=/glade/u/home/$USER/cases/$CASENAME
export RUNDIR=/glade/derecho/scratch/$USER/$CASENAME/run
export COMPSET=B1850
export RESOLUTION=f19_g17
export PROJECT=UESM0013

Note: You should use the project number given for this tutorial.

# 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

# Change the job queue

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

cd $CASEDIR
./xmlchange JOB_QUEUE=main

This step can be redone at anytime in the process.

# 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. But it is nice to check that your changes made their way into:

$CASEDIR/CaseDocs/atm_in

# Set run length

./xmlchange STOP_N=1,STOP_OPTION=nyears

# Build and submit

qcmd -A $PROJECT -- ./case.build
./case.submit

# Check on your run

After submitting the job, use qstat -u $USER to check the status of your job. It may take ~16 minutes to finish the one-year simulation.

# Check your solution

When the run is completed, look at the history files into 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-year, there should be 12 monthly files (h0) for each model component.

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