Skip to content

CUG 6.8 BASICS How do I run multiple cases all using a single executable

Robert Jacob edited this page Dec 22, 2016 · 1 revision

In CESM, the directory containing the model executable is cleanly separated from the directory where the model is run. As a result, it is now straightforward to run multiple cases where the env_build.xml for each case is identical all using a pre-built executable. As an example, this type of flexibility greatly simplifies carrying out UQ analysis.

The following outlines the steps involved to do this.

1. Create the executable that all runs will use. Call this case RefExe. The following would be a sample create_newcase command:

 > cd $CCSMROOT/scripts
 > create_newcase -case RefExe -compset B1850CN -res ne30_g16 -mach hopper
 > cd RefExe
 > ./cesm_setup
 > ./RefExe.build

Verify that the model has build successfully. For reference below - the $EXEROOT for the RefExe case will be /scratch/scratchdirs/$CCSMUSER/RefExe/bld.

2. All subsequent calls to create_newcase that will use the RefExe executable must have identical arguments for -compset, -res and -mach. Lets say that you want to run 2 separate cases, RefExe_Case1 and RefExe_Case2 that both use the executable RefExe. You would then do the following:

 > cd $CCSMROOT/scripts
 > create_newcase -case RefExe_Case1 -compset B1850CN -res ne30_g16 -mach hopper
 > cd RefExe_Case1
 > ./cesm_setup
 > xmlchange EXEROOT=/scratch/scratchdirs/$CCSMUSER/RefExe/bld.
 > xmlchange BUILD_COMPLETE=TRUE
 > qsub RefExe_Case1.run

 > cd $CCSMROOT/scripts
 > create_newcase -case RefExe_Case2 -compset B1850CN -res ne30_g16 -mach hopper
 > cd RefExe_Case1
 > ./cesm_setup
 > xmlchange EXEROOT=/scratch/scratchdirs/$CCSMUSER/RefExe/bld.
 > xmlchange BUILD_COMPLETE=TRUE
 > qsub RefExe_Case2.run
Note that by setting BUILD_COMPLETE in env_build.xml to TRUE, the scripts assume that the model has already been built for the case. Normally, the $CASE.build script fills this in when the build is successful. However, since you will not invoke the build for RefExe_Case1 and RefExe_Case2, you must then manually tell the script where the build is - and that it has been successful. This option is FOR EXPERTS ONLY and should only be used by those users that are completely familiar with the CESM scripts.
Clone this wiki locally