Create Clone (Advanced)#
The tool that clones a new case based on an existing case is create_clone
. This tool is located in the $SRCROOT
directory under the cime/scripts
directory.
Things that are copied into the new case are:
Most
env_*.xml
settings (not all!)user_nl_xxx files
Macros
SourceMods
Batch system files
README.case
Things that are not copied into the new case are:
Logs
Timing files
Command Syntax#
Go to the cime/scripts
directory in the CESM code
cd /glade/u/home/$USER/code/my_cesm_code/cime/scripts/
Example of basic ./create_clone
syntax to create CASE2:
./create_clone --clone /glade/u/home/$USER/cases/CASE1 --case /glade/u/home/$USER/cases/CASE2
Notes:
Do not use
cp
orcp -R
to copy case directories to new experiments.Document changes in CaseStatus and README.case to keep track of the changes you make.
If you are making many cases with only a small changes, you can script the steps into a python or shell script of your choice to make the process more automated and less prone to human error.