Generate a run script (mkexp)
Advanced use cases
Set up experiments for other people's checkout
If you want to use a model checked out and built by someone else, all you need is read permission for that checkout.
- recipe_mkexp_external.sh
- # Identify the model checkout you want to use
- MODEL_CHECKOUT='/path/to/other/checkout'
- # set MODEL_CHECKOUT=/path/to/other/checkout # for (t)csh
- # Load modules for checkout
- module use $MODEL_CHECKOUT/etc/Modules
- module add icon-levante
- # ** ONLY ** for old builds, eg. nextGEMS cycle 2: Load modules needed for run-time
- # module use /sw/intel/oneapi/compiler/2021.3.0/modulefiles /sw/intel/oneapi/tbb/2021.3.0/modulefiles /sw/intel/oneapi/mkl/2021.3.0/modulefiles
- # module add compiler mkl compiler-rt
- # Create subdirectory for your setup and a subdirectory 'run'
- MODEL_SUBDIR='my_subdir'
- mkdir -p $MODEL_SUBDIR/run
- cd $MODEL_SUBDIR/run
- # Set up your own experiment
- EXP_ID='xyz0123'
- ACCOUNT='ab4567'
- SCRIPT_ROOT='$HOME' # or '$WORK_ROOT' or '$DATA_ROOT' (use single quotes here!)
- # ** EITHER ** create a new experiment config file
- EXP_TYPE='amip-R2B4'
- setconfig $EXP_ID.config EXP_TYPE=$EXP_TYPE ACCOUNT=$ACCOUNT MODEL_SUBDIR=$MODEL_SUBDIR SCRIPT_ROOT=$SCRIPT_ROOT > $EXP_ID.config
- # ** OR ** adapt an existing experiment config file
- OTHER_CONFIG='/path/to/other.config'
- setconfig $OTHER_CONFIG ACCOUNT=$ACCOUNT MODEL_SUBDIR=$MODEL_SUBDIR SCRIPT_ROOT=$SCRIPT_ROOT > $EXP_ID.config
- # Possibly edit the result further
- your_editor $EXP_ID.config
- # Create your own run scripts
- mkexp $EXP_ID.config