Changeset 4067 for dynamico_lmdz


Ignore:
Timestamp:
Oct 12, 2017, 12:05:32 AM (7 years ago)
Author:
dubos
Message:

CMIP5a scripts : create aquaplanet or betaclim experiment

Location:
dynamico_lmdz/aquaplanet/CMIP5a/RUN_AQUAPLANET_DYNAMICO_LMDZ5
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • dynamico_lmdz/aquaplanet/CMIP5a/RUN_AQUAPLANET_DYNAMICO_LMDZ5/README

    r4042 r4067  
    2222    IFLAG_PHYS   : 103 if CE0L, 1 otherwise
    2323    READ_START   : no if CE0L, yes otherwise
    24 
    25 For 'CE0L' XIOS is run in 'attached' mode. In server mode, xios_server.exe would hang after the dynamico_lmdz.exe MPI processes have aborted.
    26 For 'START' and 'NEXT', XIOS is run in server mode for flexibility. Especially it allows to restart with a different number of processors, which is not possible in attached mode.
     24    ANNEEREF     : ANNEEREF (see below)
     25For 'CE0L' XIOS is run in 'attached' mode.  For 'START' and 'NEXT', XIOS is run in server mode for flexibility. Especially it allows to restart with a different number of processors, which is not possible in attached mode.
    2726
    2827Notice that the definitions of start.def have the highest priority since start.def is the last *.def file included in run.def .
     
    4039
    41402 - In order to create a run of type 'ce0l' :
    42 > ./prepare ce0l MYDIR0 STORE0
     41> ./prepare ce0l MYDIR0 STORE0 ANNEEREF
    4342This will create STORE0 and MYDIR0 if necessary and populate MYDIR0 with .xml and .def files, as well as a batch job 'job.sh' to be submitted (on CURIE) as :
    4443ccc_msub job.sh .
     
    4645
    47463 - In order to create a one-year run of type 'first'
    48 > ./prepare first STORE0 MYDIR1 STORE1
     47> ./prepare first STORE0 MYDIR1 STORE1 ANNEEREF
    4948This will create STORE1 and MYDIR1 if necessary and populate MYDIR1 with .xml and .def files, as well as a batch job 'job.sh'. This batch job copies input files from STORE0. Submit MYDIR1/job.sh . After successful completion, STORE1 contains all *.nc files produced by the run, especially start.nc
    5049
    51504 - In order to create a one-year run of type NEXT, type
    52 ./prepare first STORE0 STOREPREV MYDIR2 STORE2
     51./prepare first STORE0 STOREPREV MYDIR2 STORE2 ANNEEREF
    5352This will create STORE2 and MYDIR2 if necessary and populate MYDIR2 with .xml and .def files, as well as a batch job 'job.sh'. This batch job copies input files from STORE0 and STOREPREV. Submit MYDIR2/job.sh .
    5453
  • dynamico_lmdz/aquaplanet/CMIP5a/RUN_AQUAPLANET_DYNAMICO_LMDZ5/config.def

    r3940 r4067  
    101101version_ocean=nemo
    102102#avec ou sans orchidee (D:n)
    103 VEGET=n
     103VEGET=KEY_VEGET
    104104#type_run=AMIP, ENSP, clim (D:AMIP)
    105105type_run=CLIM
     
    166166# 1: read a single ozone climatology that will be used day and night
    167167# 2: read two ozone climatologies, the average day and night climatology and the daylight climatology
    168 read_climoz=-1
     168read_climoz=READ_CLIMOZ
    169169#
    170170# Parametres simulateur COSP (CFMIP Observational Simulator Package)
     
    203203ok_all_xml=y
    204204#qsol0=100.
    205 VEGET=bucket
    206205flag_aerosol=0
    207206ok_ade=.false.
  • dynamico_lmdz/aquaplanet/CMIP5a/RUN_AQUAPLANET_DYNAMICO_LMDZ5/example.sh

    r4048 r4067  
    1616{
    1717    for ((i="$1";i<="$2";i++)) ; do
     18        echo $i
     19    done
     20}
     21
     22function yeardirs()
     23{
     24    for ((i="$1";i<="$2";i++)) ; do
    1825        echo $(printf 'year%02d' $i)
    1926    done
     
    2633    ls -l $PWD/storedir || (echo "$PWD/storedir is missing, please create it and retry." ; exit -1) || exit
    2734    STORE_ROOT=$( fullpath $PWD/storedir )
    28     YEARS=$(years 1 $NB_YEARS)
    29     for DIR in ce0l $YEARS ; do
     35    YEARDIRS=$(yeardirs 1 $NB_YEARS)
     36    for DIR in ce0l $YEARDIRS ; do
    3037        rm -rf $DIR $STORE_ROOT/$DIR
    3138    done
    3239    STORE0L="$STORE_ROOT/ce0l"
    33     $BASEDIR/prepare.sh ce0l ce0l "$STORE0L"
    34     $BASEDIR/prepare.sh first $STORE0L year01 "$STORE_ROOT/year01"
     40    $BASEDIR/prepare.sh ce0l ce0l "$STORE0L" 1980
     41    $BASEDIR/prepare.sh first $STORE0L year01 "$STORE_ROOT/year01" 1980
    3542    PREV=year01
    3643    for YEAR in $(years 2 $NB_YEARS) ; do
    37         $BASEDIR/prepare.sh next  $STORE0L "$STORE_ROOT/$PREV" $YEAR "$STORE_ROOT/$YEAR"
    38         PREV=$YEAR
     44        YEARDIR=$(printf 'year%02d' $YEAR)
     45        ANNEEREF=$((1979 + YEAR))
     46        $BASEDIR/prepare.sh next  $STORE0L "$STORE_ROOT/$PREV" $YEARDIR "$STORE_ROOT/$YEARDIR" $ANNEEREF
     47        PREV=$YEARDIR
    3948    done
    4049}
     
    5564    DEP=""
    5665    submit_$ARCH ce0l
    57     for YEAR in $(years 1 $NB_YEARS) ; do
    58         submit_$ARCH $YEAR $DEP
     66    for YEARDIR in $(yeardirs 1 $NB_YEARS) ; do
     67        submit_$ARCH $YEARDIR $DEP
    5968    done
    6069}
    6170
    62 function cmd_init()
     71function init_all()
    6372{
    64     cp -fp $BASEDIR/*.sh $BASEDIR/*.xml $BASEDIR/*.def .
    65     cat > config.sh <<EOF
     73    cat >> config.sh <<EOF
    6674ARCH=X64_CURIE
    6775BASEDIR=$BASEDIR
    6876ESM_ROOT=$ESM_ROOT
    69 NB_YEARS=10
     77NB_YEARS=2
    7078NB_MPI_DYNAMICO=160
    7179NB_MPI_XIOS=16
     
    7381JOB_WALLTIME=7200
    7482EOF
     83    cp -fp $BASEDIR/*.sh $BASEDIR/*.xml $BASEDIR/*.def .
     84    rm gcm.def # LMDZ-only, remove to avoid confusion
    7585    ls -lrh
    7686    echo
     
    8191}
    8292
    83 function cmd_()
     93function cmd_init_aqua()
    8494{
    85 echo
     95    cat > config.sh <<EOF
     96READ_CLIMOZ=-1
     97VEGET=n
     98SOLARLONG0=1000.
     99ETAT0=held_suarez
     100IFLAG_PHYS0=103
     101EXPERIMENT=aqua
     102EOF
     103    init_all
    86104}
     105
     106function cmd_init_betaclim()
     107{
     108    cat > config.sh <<EOF
     109READ_CLIMOZ=2
     110VEGET=betaclim
     111SOLARLONG0=-9999.999
     112ETAT0=database
     113IFLAG_PHYS0=1
     114EXPERIMENT=betaclim
     115EOF
     116    init_all
     117    echo "Decompressing FILES_LMDZ.tar.bz2"
     118    tar xjf /ccc/store/cont003/gen7548/dubosth/Lluis/FILES_LMDZ.tar.bz2
     119}
     120
    87121
    88122BASEDIR=$(dirname ${BASH_SOURCE[0]})
     
    92126echo "Script base dir : $BASEDIR"
    93127echo "Run from : $(fullpath $PWD)"
    94 echo "Usage : $0 [init|create|submit]"
     128echo "Usage : $0 [init_aqua|init_betaclim|create|submit]"
    95129cmd_$1
  • dynamico_lmdz/aquaplanet/CMIP5a/RUN_AQUAPLANET_DYNAMICO_LMDZ5/prepare.sh

    r4066 r4067  
    1111    MYDIR=$(fullpath $2)
    1212    MYSTORE=$(fullpath $3)
     13    ANNEEREF=$4
    1314    mkdir -p $MYDIR
    1415    mkdir -p $MYSTORE
     
    2122    MYDIR=$(fullpath $3)
    2223    MYSTORE=$(fullpath $4)
     24    ANNEEREF=$5
    2325    mkdir -p $MYDIR
    2426    mkdir -p $MYSTORE
     
    3234    MYDIR=$(fullpath $4)
    3335    MYSTORE=$(fullpath $5)
     36    ANNEEREF=$6
    3437    mkdir -p $MYDIR
    3538    mkdir -p $MYSTORE
     
    6669    def CE0L yes
    6770    def READ_START no
    68     def IFLAG_PHYS 103
    69     def ETAT0 held_suarez
     71    def IFLAG_PHYS $IFLAG_PHYS0
     72    def ETAT0 $ETAT0
    7073}
    7174
     
    7578    def READ_START yes
    7679    def IFLAG_PHYS 1
    77     def ETAT0 held_suarez
     80    def ETAT0 $ETAT0
    7881}
    7982
     
    8689}
    8790
     91function sed_all() {
     92    def READ_CLIMOZ $READ_CLIMOZ
     93    def KEY_VEGET $VEGET
     94    def SOLARLONG0 $SOLARLONG0
     95    def ANNEEREF $ANNEEREF
     96}
     97
    8898#------------ Batch jobs : machine-independent prologues and epilogues  --------------
    8999
     
    92102cd ${MYDIR}
    93103rm -rf gcm.log *.nc xios_*.err xios_*.out gcm.log logs
     104ln -s ../FILES_LMDZ/*.nc .
    94105
    95106cat <<END  > killme.sh
     
    107118function prologue_first() {
    108119cat <<EOF
    109 cp -f store0/limit.nc store0/startphy.nc .
     120ln -s store0/limit.nc store0/climoz_LMDZ.nc store0/startphy.nc .
    110121EOF
    111122}
     
    113124function prologue_next() {
    114125cat <<EOF
    115 cp -f store0/limit.nc .
    116 cp -f store_prev/restartphy.nc startphy.nc
    117 cp -f store_prev/restart.nc start.nc
     126ln -s store0/limit.nc store0/climoz_LMDZ.nc .
     127ln -s store_prev/restartphy.nc startphy.nc
     128ln -s store_prev/restart.nc start.nc
    118129EOF
    119130}
     
    122133    cat <<EOF
    123134# save useful files
    124 mv limit.nc startphy.nc store/
     135mv limit.nc startphy.nc climoz_LMDZ.nc store/
    125136EOF
    126137}
     
    128139function epilogue_first(){
    129140    cat <<EOF
    130 # remove input files to avoid storing them a few lines below
    131 rm -f limit.nc startphy.nc
    132141# save useful files
    133142mv restartphy.nc restart.nc store/
     
    137146function epilogue_next(){
    138147    cat <<EOF
    139 # remove input files to avoid storing them a few lines below
    140 rm -f limit.nc startphy.nc start.nc
    141148# save useful files
    142149mv restartphy.nc restart.nc store/
     
    151158tar czf logs.tgz logs
    152159mv hist*.nc logs.tgz store/
    153 # cleanup
     160# cleanup input files
    154161rm -f *.nc
    155162EOF
     
    162169#!/bin/bash
    163170## Request name
    164 #MSUB -r aqua_ce0l_mpi
     171#MSUB -r ${EXPERIMENT}_ce0l_mpi
    165172#MSUB -q standard
    166173#MSUB -A gen7548
     
    196203#!/bin/bash
    197204## Request name
    198 #MSUB -r aqua_$1_mpi
     205#MSUB -r ${EXPERIMENT}_$1_mpi
    199206#MSUB -q standard
    200207#MSUB -A gen7548
     
    256263MYSED=$(mktemp)
    257264sed_$TYPE > $MYSED
    258 cat $MYSED
     265sed_all >> $MYSED
     266#cat $MYSED
    259267for FILE in *.def *.xml ; do
    260268    sed -f $MYSED $FILE > $MYDIR/$FILE
     
    269277#ls -l $MYDIR
    270278grep using_server iodef.xml
    271 for KEY in read_start iflag_phys etat0 run_length; do
    272     grep $KEY *.def
     279for KEY in create_etat0_limit read_start etat0 anneeref iflag_phys read_climoz VEGET solarlong0 ; do
     280    grep "\b$KEY\b" *.def | grep -v '#' # match whole words : \b means 'word boundary'
    273281done
  • dynamico_lmdz/aquaplanet/CMIP5a/RUN_AQUAPLANET_DYNAMICO_LMDZ5/run.def

    r3978 r4067  
    1717dayref=1
    1818##  Annee de l'etat  initial (   avec  4  chiffres   )
    19 anneeref=1980
     19anneeref=ANNEEREF
    2020
    2121# Deactivate annual cycle
    22 solarlong0 = 1000.
     22solarlong0 = SOLARLONG0
    2323
    2424## Remise a zero de la date initiale
  • dynamico_lmdz/aquaplanet/CMIP5a/RUN_AQUAPLANET_DYNAMICO_LMDZ5/run_icosa.def

    r4039 r4067  
    3232
    3333# run length : real (default=dt*itaumax)
    34 #run_length=864000
    3534run_length=31104000
    3635
     
    7170niterdivgrad=2
    7271
     72iflag_sponge = 1
     73
    7374# -------------------------------- Physics -------------------------------------
    7475
Note: See TracChangeset for help on using the changeset viewer.