- Timestamp:
- Aug 10, 2017, 4:01:15 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamico_lmdz/aquaplanet/OLD_PHYSIC/RUN_AQUAPLANET_DYNAMICO_LMDZ5/example.sh
r4037 r4040 3 3 # 1 Create a directory EXP for your experiment ; ALL commands below must be run from EXP 4 4 # 2 Create a directory STORE to store the outputs of your experiment ; run "ln -s STORE storedir" 5 # 3 run "BASE/example.sh copy" where BASE is the directory containing this script 6 # 4a (optional) Edit EXP/run_icosa.def to change nbp, dt, itau_physics 7 # 4b (optional) Edit EXP/prepare.sh to change NB_MPI_DYNAMICO 8 # 4c (optional) Edit EXP/example.sh to change ARCH, NB_YEARS 9 # 5 run "./example.sh create" 10 # 6 EXP run "./example.sh submit" 5 # 3 run "BASE/example.sh init" where BASE is the directory containing this script 6 # 4 (optional) Edit EXP/config.sh, EXP/run_icosa.def, EXP/*.xml 7 # 5 run "./example.sh create" (NB : ./example.sh, NOT ../example.sh) 8 # 6 run "./example.sh submit" 11 9 12 10 function fullpath() … … 17 15 function years() 18 16 { 19 for ((i= $1;i<=$2;i++)) ; do17 for ((i="$1";i<="$2";i++)) ; do 20 18 echo $(printf 'year%02d' $i) 21 19 done … … 24 22 function cmd_create() 25 23 { 26 export ESM_ROOT=$(fullpath ESM_ROOT) 24 source ./config.sh 25 env | grep YEARS 27 26 STORE_ROOT=$( fullpath $PWD/storedir ) 28 27 YEARS=$(years 1 $NB_YEARS) … … 52 51 function cmd_submit() 53 52 { 53 source ./config.sh 54 54 DEP="" 55 55 submit_$ARCH ce0l … … 59 59 } 60 60 61 function cmd_ copy()61 function cmd_init() 62 62 { 63 export ESM_ROOT=$( fullpath $BASEDIR/../../ )64 ln -sf $ESM_ROOT ESM_ROOT65 63 cp -fp $BASEDIR/*.sh $BASEDIR/*.xml $BASEDIR/*.def . 64 cat > config.sh <<EOF 65 ARCH=X64_CURIE 66 BASEDIR=$BASEDIR 67 ESM_ROOT=$ESM_ROOT 68 NB_YEARS=10 69 NB_MPI_DYNAMICO=160 70 NB_MPI_XIOS=16 71 NB_MPI_CE0L=16 72 JOB_WALLTIME=7200 73 EOF 66 74 ls -lrh 75 cat config.sh 67 76 } 68 77 … … 72 81 } 73 82 74 NB_YEARS=1075 83 BASEDIR=$(dirname ${BASH_SOURCE[0]}) 76 84 BASEDIR=$( fullpath $BASEDIR ) 85 ESM_ROOT=$( fullpath $BASEDIR/../../ ) 77 86 echo "Your command : $0 $*" 78 87 echo "Script base dir : $BASEDIR" 79 88 echo "Run from : $(fullpath $PWD)" 80 echo "Usage : $0 [copy|create|submit]" 81 export ARCH=X64_CURIE 89 echo "Usage : $0 [init|create|submit]" 82 90 cmd_$1
Note: See TracChangeset
for help on using the changeset viewer.