Case Setup#
After a new case is created, the tool that sets up the new case is case.setup. This tool is located in the $CASEROOT directory.
After running case.setup the following actions occur:
The
$RUNDIRand$EXEROOTdirectories are created as shown on the figure.
Figure: Detailed view of the location of case.setup
For the current tutorial on Derecho, the paths are:
$SRCROOT=/glade/u/home/$USER/code/my_cesm_code$CASEROOT=/glade/u/home/$USER/cases/$CASE$EXEROOT=/glade/derecho/scratch/$USER/$CASE/bld$RUNDIR=/glade/derecho/scratch/$USER/$CASE/run
Note that other files and directories are created at case.setup. This will be covered in more detail in later sections (i.e. Namelist modifications)
user_nl_xxxfiles, where the user can customize component namelist filesThe
case.runandcase.st_archivescripts andMacros.makefileHidden files like
.env_mach_specific.shand.env_mach_specific.cshThe
CaseDocsdirectory, which should not be edited
Command Syntax#
Go to the $CASEROOT directory
cd /glade/u/home/$USER/cases/CASE
Example case.setup command:
./case.setup
NOTE: Do not enter the example above at the command line. You will create your first case in the Exercise at the end of this section.
Click here for example output
job is case.run USER_REQUESTED_WALLTIME None USER_REQUESTED_QUEUE None WALLTIME_FORMAT %H:%M:%S
Creating batch scripts
Writing case.run script from input template /glade/u/home/$USER/code/my_cesm_code/ccs_config/machines/template.case.run
Creating file .case.run
Writing case.st_archive script from input template /glade/u/home/$USER/code/my_cesm_code/ccs_config/machines/template.st_archive
Creating file case.st_archive
Writing case.cupid script from input template /glade/u/home/$USER/code/my_cesm_code/ccs_config/machines/template.cupid
Creating file case.cupid
Creating user_nl_xxx files for components and cpl
Running cam.case_setup.py
If an old case build already exists, might want to run 'case.build --clean' before building
You can now run './preview_run' to get more info on how your case will be run
Notes:
Notice the
./before any command run in the CASEROOT.You can run the script name followed by the
--hor--helpargument to see help documentation for that script and a list of all command line arguments for that script.