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

CMIP5a scripts : create aquaplanet or betaclim experiment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.