Ignore:
Timestamp:
Aug 10, 2017, 4:01:15 PM (7 years ago)
Author:
dubos
Message:

Aquaplanet : updated scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dynamico_lmdz/aquaplanet/OLD_PHYSIC/RUN_AQUAPLANET_DYNAMICO_LMDZ5/example.sh

    r4037 r4040  
    33# 1    Create a directory EXP for your experiment ; ALL commands below must be run from EXP
    44# 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"
    119
    1210function fullpath()
     
    1715function years()
    1816{
    19     for ((i=$1;i<=$2;i++)) ; do
     17    for ((i="$1";i<="$2";i++)) ; do
    2018        echo $(printf 'year%02d' $i)
    2119    done
     
    2422function cmd_create()
    2523{
    26     export ESM_ROOT=$(fullpath ESM_ROOT)
     24    source ./config.sh
     25    env | grep YEARS
    2726    STORE_ROOT=$( fullpath $PWD/storedir )
    2827    YEARS=$(years 1 $NB_YEARS)
     
    5251function cmd_submit()
    5352{
     53    source ./config.sh
    5454    DEP=""
    5555    submit_$ARCH ce0l
     
    5959}
    6060
    61 function cmd_copy()
     61function cmd_init()
    6262{
    63     export ESM_ROOT=$( fullpath $BASEDIR/../../ )
    64     ln -sf $ESM_ROOT ESM_ROOT
    6563    cp -fp $BASEDIR/*.sh $BASEDIR/*.xml $BASEDIR/*.def .
     64    cat > config.sh <<EOF
     65ARCH=X64_CURIE
     66BASEDIR=$BASEDIR
     67ESM_ROOT=$ESM_ROOT
     68NB_YEARS=10
     69NB_MPI_DYNAMICO=160
     70NB_MPI_XIOS=16
     71NB_MPI_CE0L=16
     72JOB_WALLTIME=7200
     73EOF
    6674    ls -lrh
     75    cat config.sh
    6776}
    6877
     
    7281}
    7382
    74 NB_YEARS=10
    7583BASEDIR=$(dirname ${BASH_SOURCE[0]})
    7684BASEDIR=$( fullpath $BASEDIR )
     85ESM_ROOT=$( fullpath $BASEDIR/../../ )
    7786echo "Your command : $0 $*"
    7887echo "Script base dir : $BASEDIR"
    7988echo "Run from : $(fullpath $PWD)"
    80 echo "Usage : $0 [copy|create|submit]"
    81 export ARCH=X64_CURIE
     89echo "Usage : $0 [init|create|submit]"
    8290cmd_$1
Note: See TracChangeset for help on using the changeset viewer.