setup, build, submit#

The case.setup, case.build, and case.submit commands are all executed from the case directory e.g., ~/cases/case01 in our example.


The command case.setup#

You now need to navigate to the case directory where case.setup is located and run the case.setup command. In the example shown in Figure 1, you need to do:

cd ~/cases/case01 
./case.setup

Issuing the case.setup command creates more files needed to run the model.

create_newcase

Figure 1: Location of the command case.setup


The command case.build#

You are now ready to build the model. This is done with the command:

cd ~/cases/case01 
qcmd -- ./case.build

The qcmd command is a command that is used on all NCAR supercomputers to run commands on a compute node, instead of a login node. We use this for the case.build command because it uses multiple processors, and thus isn’t a good fit for building on login nodes. If you are running the model somewhere else, this will likely not be needed and you can simply run ./case.build, or request a compute node directly then build there. If you are unsure how to do this, ask your systems people and they can likely help.

As you compile the model, it will write files in the build directory:

~/scratch/case01/bld

The build takes a few minutes. You’ll know this is complete when you see the line:

MODEL BUILD HAS FINISHED SUCCESSFULLY

create_newcase

Figure 2: CESM structure after case.build


The command case.submit#

Running a case is also simple - we just issue the command:

cd ~/cases/case01 
./case.submit 

This will start by checking that we have all of the necessary input data for our run, and downloading whatever is missing, and then it will perform the actual simulation.

Check the model is running

Once you have submitted the case, you can see its status in the queue with either of the following commanda:

qstat -u <username>

or this also works:

squeue -u <username>

replacing <username> with your username for the system.

You can also see CESM outputting data as the simulation progresses in the run directory, which for our purposes, is located at

cd ~/scratch/case01/run

This is where the data are output until the run is finished.

create_newcase

Figure 3: CESM structure after case.build


After your run completes#

When the run is finished, the data is moved from the run directory to the archive directory. This is illustrated in Figure 4.

For this tutorial purpose, the archive directory is located at

cd ~/scratch/archive/case01

create_newcase

Figure 4: CESM structure after the run completes