-
Notifications
You must be signed in to change notification settings - Fork 212
CUG 6.8 BASICS How do I run multiple cases all using a single executable
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