- Timestamp:
- Oct 12, 2017, 12:05:32 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamico_lmdz/aquaplanet/CMIP5a/RUN_AQUAPLANET_DYNAMICO_LMDZ5/prepare.sh
r4066 r4067 11 11 MYDIR=$(fullpath $2) 12 12 MYSTORE=$(fullpath $3) 13 ANNEEREF=$4 13 14 mkdir -p $MYDIR 14 15 mkdir -p $MYSTORE … … 21 22 MYDIR=$(fullpath $3) 22 23 MYSTORE=$(fullpath $4) 24 ANNEEREF=$5 23 25 mkdir -p $MYDIR 24 26 mkdir -p $MYSTORE … … 32 34 MYDIR=$(fullpath $4) 33 35 MYSTORE=$(fullpath $5) 36 ANNEEREF=$6 34 37 mkdir -p $MYDIR 35 38 mkdir -p $MYSTORE … … 66 69 def CE0L yes 67 70 def READ_START no 68 def IFLAG_PHYS 10369 def ETAT0 held_suarez71 def IFLAG_PHYS $IFLAG_PHYS0 72 def ETAT0 $ETAT0 70 73 } 71 74 … … 75 78 def READ_START yes 76 79 def IFLAG_PHYS 1 77 def ETAT0 held_suarez80 def ETAT0 $ETAT0 78 81 } 79 82 … … 86 89 } 87 90 91 function sed_all() { 92 def READ_CLIMOZ $READ_CLIMOZ 93 def KEY_VEGET $VEGET 94 def SOLARLONG0 $SOLARLONG0 95 def ANNEEREF $ANNEEREF 96 } 97 88 98 #------------ Batch jobs : machine-independent prologues and epilogues -------------- 89 99 … … 92 102 cd ${MYDIR} 93 103 rm -rf gcm.log *.nc xios_*.err xios_*.out gcm.log logs 104 ln -s ../FILES_LMDZ/*.nc . 94 105 95 106 cat <<END > killme.sh … … 107 118 function prologue_first() { 108 119 cat <<EOF 109 cp -f store0/limit.nc store0/startphy.nc .120 ln -s store0/limit.nc store0/climoz_LMDZ.nc store0/startphy.nc . 110 121 EOF 111 122 } … … 113 124 function prologue_next() { 114 125 cat <<EOF 115 cp -f store0/limit.nc .116 cp -fstore_prev/restartphy.nc startphy.nc117 cp -fstore_prev/restart.nc start.nc126 ln -s store0/limit.nc store0/climoz_LMDZ.nc . 127 ln -s store_prev/restartphy.nc startphy.nc 128 ln -s store_prev/restart.nc start.nc 118 129 EOF 119 130 } … … 122 133 cat <<EOF 123 134 # save useful files 124 mv limit.nc startphy.nc store/135 mv limit.nc startphy.nc climoz_LMDZ.nc store/ 125 136 EOF 126 137 } … … 128 139 function epilogue_first(){ 129 140 cat <<EOF 130 # remove input files to avoid storing them a few lines below131 rm -f limit.nc startphy.nc132 141 # save useful files 133 142 mv restartphy.nc restart.nc store/ … … 137 146 function epilogue_next(){ 138 147 cat <<EOF 139 # remove input files to avoid storing them a few lines below140 rm -f limit.nc startphy.nc start.nc141 148 # save useful files 142 149 mv restartphy.nc restart.nc store/ … … 151 158 tar czf logs.tgz logs 152 159 mv hist*.nc logs.tgz store/ 153 # cleanup 160 # cleanup input files 154 161 rm -f *.nc 155 162 EOF … … 162 169 #!/bin/bash 163 170 ## Request name 164 #MSUB -r aqua_ce0l_mpi171 #MSUB -r ${EXPERIMENT}_ce0l_mpi 165 172 #MSUB -q standard 166 173 #MSUB -A gen7548 … … 196 203 #!/bin/bash 197 204 ## Request name 198 #MSUB -r aqua_$1_mpi205 #MSUB -r ${EXPERIMENT}_$1_mpi 199 206 #MSUB -q standard 200 207 #MSUB -A gen7548 … … 256 263 MYSED=$(mktemp) 257 264 sed_$TYPE > $MYSED 258 cat $MYSED 265 sed_all >> $MYSED 266 #cat $MYSED 259 267 for FILE in *.def *.xml ; do 260 268 sed -f $MYSED $FILE > $MYDIR/$FILE … … 269 277 #ls -l $MYDIR 270 278 grep using_server iodef.xml 271 for KEY in read_start iflag_phys etat0 run_length; do272 grep $KEY *.def279 for 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' 273 281 done
Note: See TracChangeset
for help on using the changeset viewer.