[3684] | 1 | #set -vx |
---|
| 2 | |
---|
[4340] | 3 | source ~/env_Multi_atlas.sh |
---|
[4317] | 4 | |
---|
[3684] | 5 | local=`pwd -P` |
---|
| 6 | cd $local |
---|
| 7 | echo REPERTOIRE LOCAL : $local |
---|
| 8 | |
---|
| 9 | echo '############################################################' |
---|
| 10 | echo 0/ gestion des options |
---|
| 11 | echo '############################################################' |
---|
| 12 | pcmdi_metrics=0 |
---|
| 13 | tuning_metrics=1 |
---|
| 14 | und=0 |
---|
| 15 | zon=1 |
---|
| 16 | html=1 |
---|
| 17 | atlas=1 |
---|
[4308] | 18 | #newatlas=0 |
---|
[3684] | 19 | atlas_cesmep=0 |
---|
| 20 | get=0 |
---|
| 21 | cmor=1 |
---|
| 22 | regdyn=0 |
---|
| 23 | lma=0 |
---|
| 24 | trmm=0 |
---|
| 25 | axe2=0 |
---|
| 26 | axe4=0 |
---|
| 27 | esmval2=0 |
---|
[4308] | 28 | reflcld_histo=0 |
---|
[3684] | 29 | vertcld_calipso=0 |
---|
| 30 | stations_day=0 |
---|
| 31 | stations_mth=0 |
---|
[4340] | 32 | qsub=0 |
---|
[3684] | 33 | mjo=0 |
---|
| 34 | river=0 |
---|
[3885] | 35 | dataref=1 |
---|
[3684] | 36 | |
---|
[3885] | 37 | ref=OBS |
---|
[4340] | 38 | echo ref=$ref |
---|
[4308] | 39 | |
---|
| 40 | lonmin=-180 |
---|
| 41 | lonmax=180 |
---|
| 42 | latmin=-90 |
---|
| 43 | latmax=90 |
---|
| 44 | pmin=1 |
---|
| 45 | |
---|
[3684] | 46 | # ./job_multi.sh -1D 0 -get 0 -atlas 0 -pcmdi 0 -tuning 0 -lma 0 -trmm 0 |
---|
| 47 | runstxt=$local/runs.txt |
---|
| 48 | |
---|
| 49 | while test -n "${1}"; do |
---|
| 50 | case $1 in |
---|
| 51 | -1D) und=$2 ; shift ;; |
---|
| 52 | -get) get=$2 ; shift ;; |
---|
| 53 | -cmor) cmor=$2 ; shift ;; |
---|
| 54 | -zon) zon=$2 ; shift ;; |
---|
| 55 | -atlas) atlas=$2 ; shift ;; |
---|
| 56 | -atlas_cesmep) atlas_cesmep=$2 ; shift ;; |
---|
| 57 | -pcmdi) pcmdi_metrics=$2 ; shift ;; |
---|
| 58 | -tuning) tuning_metrics=$2 ; shift ;; |
---|
| 59 | -runstxt) runstxt=$2 ; shift ;; |
---|
| 60 | -lma) lma=$2 ; shift ;; |
---|
| 61 | -trmm) trmm=$2 ; shift ;; |
---|
| 62 | -axe4) axe4=$2 ; shift ;; |
---|
| 63 | -axe2) axe2=$2 ; shift ;; |
---|
| 64 | -regdyn) regdyn=$2 ; shift ;; |
---|
| 65 | -esmval2) esmval2=$2 ; shift ;; |
---|
| 66 | -stations_day) stations_day=$2 ; shift ;; |
---|
| 67 | -stations_mth) stations_mth=$2 ; shift ;; |
---|
[4308] | 68 | -reflcld_histo) refld_histo=$2 ; shift ;; |
---|
[3684] | 69 | -vertcld_calipso) vertcld_calipso=$2 ; shift ;; |
---|
| 70 | -mjo) mjo=$2 ; shift ;; |
---|
| 71 | -river) river=$2 ; shift ;; |
---|
[3885] | 72 | -dataref) dataref=$2 ; shift ;; |
---|
[4308] | 73 | -lonmin) lonmin=$2 ; shift ;; |
---|
| 74 | -lonmax) lonmax=$2 ; shift ;; |
---|
| 75 | -latmin) latmin=$2 ; shift ;; |
---|
| 76 | -latmax) latmax=$2 ; shift ;; |
---|
| 77 | -pmin) pmin=$2 ; shift ;; |
---|
[4317] | 78 | -qsub) qsub=$2 ; shift ;; |
---|
[3684] | 79 | *) comp=$1 ;; |
---|
| 80 | esac |
---|
| 81 | shift |
---|
| 82 | done |
---|
| 83 | |
---|
[4308] | 84 | echo multi=$comp region: lonmin=$lonmin lonmax=$lonmax latmin=$latmin latmax=$latmax |
---|
| 85 | echo multi=$comp pmin: pmin=$pmin |
---|
[3684] | 86 | rm -f out.com$$ |
---|
| 87 | runstxt=$local/runs.txt |
---|
| 88 | echo runstxt= $runstxt |
---|
| 89 | |
---|
[4330] | 90 | echo qsub is $qsub |
---|
| 91 | #exit |
---|
| 92 | |
---|
[3684] | 93 | echo DODSDIR : $DODSDIR |
---|
| 94 | MAIN_SE=$DODSDIR/$login/lmdz/SE |
---|
| 95 | TS_DA=$DODSDIR/$login/lmdz/TS_DA |
---|
| 96 | TS_MO=$DODSDIR/$login/lmdz/TS_MO |
---|
| 97 | MULTIDIR=$DODSDIR/$login/lmdz/MultiSimu |
---|
| 98 | |
---|
| 99 | if [ ! -d $MULTIDIR ] ; then mkdir -p $MULTIDIR ; fi |
---|
| 100 | if [ ! -d $MAIN_SE ] ; then mkdir -p $MAIN_SE ; fi |
---|
| 101 | if [ ! -d $MAIN_MO ] ; then mkdir -p $MAIN_MO ; fi |
---|
| 102 | if [ ! -d $MAIN_DA ] ; then mkdir -p $MAIN_DA ; fi |
---|
| 103 | |
---|
| 104 | COMP_D=$MULTIDIR/$comp |
---|
| 105 | DEF_FILE=$COMP_D/def.txt ; if [ ! -f $DEF_FILE ] ; then echo renseigner $DEF_FILE ; exit ; fi |
---|
[4308] | 106 | LOGD=$COMP_D/log ; mkdir -p $LOGD |
---|
| 107 | outfile=$LOGD/out$$ ; if [ -f ${outfile} ] ; then \rm -f $outfile ; fi |
---|
| 108 | echo Ecriture des logs dans $outfile |
---|
[3684] | 109 | |
---|
[4308] | 110 | ### |
---|
| 111 | #~/LMDZ/check/make_warning.sh $COMP_D |
---|
| 112 | ### nom2 |
---|
[3684] | 113 | listsims="" ; for s in `awk ' {print $1} ' $DEF_FILE | uniq` ; do listsims="$listsims $s" ; done |
---|
[4308] | 114 | #echo listsims $listsims |
---|
| 115 | |
---|
| 116 | listsims="" ; for s in `awk ' {print $1} ' $DEF_FILE | uniq` ; do listsims="$listsims $s" ; done |
---|
[3684] | 117 | echo listsims $listsims |
---|
[4308] | 118 | ### nom1, simdir |
---|
| 119 | for s in $listsims ; do |
---|
| 120 | ### simdir |
---|
| 121 | simdir=`grep -w "^$s " $runstxt | awk ' { print $2 } '` |
---|
| 122 | ### nom1 |
---|
| 123 | ss=`basename $simdir ` |
---|
| 124 | for year in `grep -w "^$s" $DEF_FILE | awk ' { print $2 } '` ; do |
---|
[4439] | 125 | file=${MAIN_SE}/ORIG/${s}_SE_${year}_1M_histmth.nc |
---|
| 126 | ###file=${MAIN_SE}/ORIG/${ss}_SE_${year}_1M_histmth.nc |
---|
[3684] | 127 | |
---|
[4308] | 128 | echo $file $year |
---|
| 129 | |
---|
| 130 | if [ ! -f ${file} ]; then |
---|
| 131 | if [ -f ${simdir}/ATM/Analyse/SE/${ss}_SE_${year}_1M_histmth.nc ]; then |
---|
| 132 | ln -s ${simdir}/ATM/Analyse/SE/${ss}_SE_${year}_1M_histmth.nc $file |
---|
| 133 | elif [ "${ss}" == "UQLMDZ6A1000" ]; then |
---|
| 134 | echo NO need to ln -s; the *1M_histmth.nc does not exist anymore |
---|
| 135 | else |
---|
[4439] | 136 | echo $year>>year.txt |
---|
| 137 | sed -i -e 's/_/ /' year.txt |
---|
| 138 | year1=`less year.txt | awk '{print $1}'` |
---|
| 139 | year2=`less year.txt | awk '{print $2}'` |
---|
| 140 | ln -s ${simdir}/ATM/Output/MO/${ss}_${year1}0101_${year2}1230_1M_histmth.nc $file |
---|
[4308] | 141 | fi |
---|
| 142 | fi |
---|
| 143 | |
---|
| 144 | \rm ${MAIN_SE}/ORIG/UQLMDZ6AW1000_SE_1979_1988_1M_histmth.nc |
---|
| 145 | done |
---|
| 146 | done |
---|
| 147 | #${local}/../check/mk_check-avail-data.sh ${comp} |
---|
| 148 | |
---|
[3684] | 149 | echo ### On supprime dans def.txt les lignes vides ######## |
---|
| 150 | sed -i "/^[ \t]*$/d" $DEF_FILE |
---|
| 151 | |
---|
| 152 | echo ### On teste d abord la coherence des noms des simulations dans def.txt et $runstxt ################ |
---|
| 153 | echo MULTI-ATLAS "$comp" |
---|
| 154 | for s in $listsims ; do |
---|
| 155 | srun=`grep -w "^$s " $runstxt | awk ' { print $1 } '` |
---|
| 156 | echo 's='"$s" ' srun=' "$srun" |
---|
[4308] | 157 | if [ "$s" != "$srun" ] ; then |
---|
| 158 | #echo Meme nom de la simulation dans def.txt et $runstxt 's=' "$s" ' srun=' "$srun" |
---|
| 159 | #else |
---|
| 160 | echo ATTENTION : la simulation "$s" de votre def.txt n est pas repertoriee dans $runstxt >${LOGD}/error_${comp} |
---|
| 161 | echo ou le meme nom est attribue a plusieures simulations >> ${LOGD}/error_${comp} |
---|
| 162 | echo Il faut la rajouter dans $runstxt >> ${LOGD}/error_${comp} |
---|
| 163 | echo avec le chemin vers les SE et TS dans ciclad : /thredds/ipsl/fabric/IGCM_OUT >> ${LOGD}/error_${comp} |
---|
| 164 | echo ou renomer votre simulation >> ${LOGD}/error_${comp} |
---|
| 165 | more ${LOGD}/error_${comp} |
---|
[3684] | 166 | exit |
---|
| 167 | fi |
---|
[4308] | 168 | echo Checking if $s simulation is referenced many times in runs.txt |
---|
| 169 | #nrun=`./how_many_times_run.sh $s` |
---|
| 170 | #nrun=`./how_many_times_run.sh $srun` |
---|
| 171 | nrun=1 |
---|
| 172 | |
---|
| 173 | if [ "$nrun" != "1" ]; then |
---|
| 174 | echo Simulation $s est repertoriee ${nrun} fois dans $runstxt >> ${LOGD}/error_${comp} |
---|
| 175 | echo STOPping here >> ${LOGD}/error_${comp} |
---|
| 176 | more ${LOGD}/error_${comp} |
---|
| 177 | exit |
---|
| 178 | fi |
---|
[3684] | 179 | done |
---|
| 180 | #exit |
---|
| 181 | listruns="" |
---|
| 182 | listrunss="" |
---|
| 183 | listrunse="" |
---|
| 184 | if [ ! -d $MAIN_SE/ORIG ] ; then mkdir -p $MAIN_SE/ORIG ; fi |
---|
| 185 | for s in $listsims ; do |
---|
| 186 | simdir=`grep -w "^$s " $runstxt | awk ' { print $2 } '` |
---|
| 187 | echo $simdir |
---|
| 188 | ( cd $MAIN_SE/ORIG ; ln -sf $simdir/ATM/Analyse/SE/*mth*nc . ) > /dev/null 2>&1 |
---|
| 189 | echo $simdir |
---|
| 190 | ss=`basename $simdir ` |
---|
| 191 | listruns="$listruns $ss" |
---|
| 192 | for year in `grep -w "^$s" $DEF_FILE | awk ' { print $2 } '` ; do |
---|
| 193 | listrunss="$listrunss ${ss}_$year" |
---|
| 194 | listrune="$listrune ${ss}_SE_$year" |
---|
| 195 | done |
---|
| 196 | done |
---|
[4308] | 197 | #echo listruns = $listruns |
---|
| 198 | #echo listrunss= $listrunss |
---|
| 199 | #echo listrune= $listrune |
---|
| 200 | #ls -lrt $MAIN_SE/ORIG # Eviter de laisser des ls qui rendent la sortire illisible FH |
---|
| 201 | #listsimss="" ; for ss in `awk ' {print $1"_"$2 } ' $DEF_FILE` ; do listsimss="$listsimss $ss" ; done |
---|
[3885] | 202 | |
---|
| 203 | ns=0 |
---|
| 204 | listsimss="" ; |
---|
| 205 | for ss in `awk ' {print $1"_"$2 } ' $DEF_FILE` ; do |
---|
| 206 | if [ $dataref = 0 ] ; then |
---|
| 207 | if [ ${ns} = 0 ] ; then |
---|
| 208 | ref=$ss |
---|
| 209 | echo ref=$ref |
---|
| 210 | fi |
---|
| 211 | fi |
---|
| 212 | let "ns = ${ns} + 1" |
---|
| 213 | listsimss="$listsimss $ss" ; |
---|
| 214 | done |
---|
| 215 | echo ref=$ref |
---|
| 216 | |
---|
[3684] | 217 | listsimse="" ; for se in `awk ' {print $1"_SE_"$2 } ' $DEF_FILE` ; do listsimse="$listsimse $se" ; done |
---|
| 218 | echo listsims $listsims |
---|
| 219 | echo listsimss $listsimss |
---|
| 220 | echo listsimse $listsimse |
---|
| 221 | |
---|
| 222 | echo SIMULATIONS: $listsims |
---|
| 223 | |
---|
[3915] | 224 | RUNS="" |
---|
| 225 | RUNS=`awk ' {print $1"_"$2 } ' $DEF_FILE` |
---|
| 226 | echo listrunss=$RUNS |
---|
| 227 | |
---|
[3684] | 228 | echo '########################################################################' |
---|
| 229 | echo 1/ Rapatriement des simulations manquantes |
---|
| 230 | echo '########################################################################' |
---|
| 231 | #### AI avril 2020 ################ Avant l acces directe aux simulations sur le dods du CCRT |
---|
| 232 | # Adresses web ne sont plus a jours |
---|
| 233 | # A commenter les adresses web CCRT |
---|
| 234 | # A mettre a jours les adress web IDRIS |
---|
| 235 | # Rajouter d'autres machines avec rsynk, wget ou ssh ... |
---|
| 236 | |
---|
| 237 | if [ $get = 1 ] ; then |
---|
[4308] | 238 | |
---|
| 239 | cd $MAIN_SE |
---|
| 240 | for sim in $listsimss ; do echo ./getun.sh ${sim} >> $outfile 2>&1 ; ./getun.sh ${sim} ; done |
---|
| 241 | cd $TS_DA |
---|
| 242 | for sim in $listsimss ; do echo ./getun.sh ${sim} >> $outfile 2>&1 ; ./getun.sh ${sim} ; done |
---|
| 243 | cd $TS_MO |
---|
| 244 | for sim in $listsimss ; do echo ./getun.sh ${sim} >> $outfile 2>&1 ; ./getun.sh ${sim} ; done |
---|
| 245 | |
---|
[3684] | 246 | fi |
---|
| 247 | |
---|
[4308] | 248 | echo '########################################################################' |
---|
| 249 | echo 1.1/ Check des fichiers input et des variables demandees pour l atlas avec |
---|
| 250 | echo des exit si un des fichiers ou des variables ne sont pas accessibles |
---|
| 251 | echo '########################################################################' |
---|
| 252 | #IM TBC ${local}/../check/make_check_fin.sh $comp ${LOGD}/check_finput$$ 2>&1 |
---|
| 253 | |
---|
[3684] | 254 | if [ $cmor = 1 ] ; then |
---|
| 255 | cp cmor.sh $MAIN_SE/. |
---|
| 256 | cp season.sh $MAIN_SE/. |
---|
| 257 | cd $MAIN_SE |
---|
| 258 | chmod +x cmor.sh |
---|
| 259 | chmod +x season.sh |
---|
| 260 | ######################################################################### |
---|
| 261 | # 1.2 "Cmorisation des fichiers mensuels : traduction au format CMIP |
---|
| 262 | ######################################################################### |
---|
| 263 | # Deux lignes suivantes modif FH 2016/11/09 |
---|
[4308] | 264 | # Files are taken from /thredds/ipsl/fabric/lmdz/SE/ORIG and |
---|
| 265 | # results are in /thredds/ipsl/fabric/lmdz/SE/CMOR |
---|
[3684] | 266 | ######################################################################### |
---|
[4308] | 267 | |
---|
| 268 | echo cmor.sh : output dans ${LOGD}/cmor$$ |
---|
| 269 | ./cmor.sh -runsfile $runstxt $comp > ${LOGD}/cmor$$ 2>&1 |
---|
[3684] | 270 | if [ $? != 0 ] ; then exit ; fi # Probleme de histmth non present. On arrete tout |
---|
| 271 | |
---|
| 272 | ######################################################################### |
---|
| 273 | # 1.3 Interpolate fields on a common horizontal grid (VLR) and |
---|
| 274 | ######################################################################### |
---|
| 275 | # average in time "YEAR", "JJA" ... |
---|
| 276 | # Results are put on |
---|
[4308] | 277 | # /thredds/ipsl/fabric/lmdz/VLR/YEAR/[SIMU_NAME]_[period]/NC |
---|
[3684] | 278 | # If wanting to rerun season.sh for observations : |
---|
| 279 | # ./season.sh -s OBS |
---|
| 280 | ######################################################################### |
---|
[4308] | 281 | |
---|
| 282 | cd $MAIN_SE |
---|
| 283 | echo season.sh : output dans ${LOGD}/season$$ |
---|
| 284 | ./season.sh -comp $comp > ${LOGD}/season$$ 2>&1 |
---|
| 285 | cd $local |
---|
| 286 | |
---|
[3684] | 287 | fi |
---|
| 288 | |
---|
| 289 | echo '########################################################################' |
---|
| 290 | echo 2/ Lancement des atlas manquant |
---|
| 291 | echo '########################################################################' |
---|
| 292 | natlas=`wc -l $COMP_D/atlas-def | awk ' { print $1 } '` |
---|
| 293 | count_atlas=0 |
---|
| 294 | |
---|
| 295 | if [ $atlas = 1 ] ; then |
---|
[4308] | 296 | #if [ $newatlas = 1 ]; then |
---|
| 297 | #sed -e 's/COMPAR/'${comp}'/' ${local}/atlas/make_atlas.sh > ${local}/atlas/make_atlas_${comp}.sh |
---|
| 298 | #$submit -v COMP=${comp},DATAREF=${dataref} ${local}/atlas/make_atlas_${comp}.sh |
---|
[3915] | 299 | |
---|
[4308] | 300 | #./make_timecount.sh ${comp} |
---|
[3917] | 301 | |
---|
[4308] | 302 | #else |
---|
[3915] | 303 | |
---|
[3684] | 304 | for sim in $listsimss ; do |
---|
| 305 | il=1 |
---|
| 306 | if [ ! -f $COMP_D/atlas-def ] ; then |
---|
| 307 | echo Definir les atlas a construire dans $COMP_D/atlas-def |
---|
| 308 | echo Example : |
---|
| 309 | cat $COMP_D/../CMIP5to6/atlas-def |
---|
| 310 | fi |
---|
| 311 | while [ $il -le $natlas ] ; do |
---|
| 312 | line=`sed -n -e ${il}p $COMP_D/atlas-def` |
---|
| 313 | seas=`echo $line | awk ' { print $1 } '` |
---|
| 314 | proj=`echo $line | awk ' { print $2 } '` |
---|
| 315 | vars=`echo $line | awk ' { print $3 } '` |
---|
| 316 | atlas=${sim}+${seas}+${proj}+$vars |
---|
[4308] | 317 | cd ${local}/atlas |
---|
| 318 | varg=`echo $vars | sed -e 's/,/+/g'` |
---|
| 319 | echo Atlas $atlas a creer |
---|
| 320 | if [ $qsub = 0 ] ; then |
---|
[4330] | 321 | echo bash ${local}/atlas/atlas.sh RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin |
---|
| 322 | bash ${local}/atlas/atlas.sh RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin >> $outfile |
---|
| 323 | if [ "$ref" != "OBS" ]; then |
---|
| 324 | echo bash ${local}/atlas/atlas.sh RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=OBS,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin |
---|
| 325 | bash ${local}/atlas/atlas.sh RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=OBS,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin >> $outfile |
---|
| 326 | fi |
---|
[4308] | 327 | else |
---|
| 328 | echo $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin atlas.sh >> ${LOGD}/ATLAS$$ 2>&1 |
---|
| 329 | $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=$ref,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin atlas.sh |
---|
| 330 | if [ "$ref" != "OBS" ]; then |
---|
| 331 | echo $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=OBS,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin atlas.sh >> ${LOGD}/ATLAS$$ 2>&1 |
---|
| 332 | $submit -v RUN=$sim,SEASON=$seas,PROJ=$proj,OUTDIR=$COMP_D/ATLAS,REF=OBS,VARS="$varg",RUNSTXT=$runstxt,lonmin=$lonmin,lonmax=$lonmax,latmin=$latmin,latmax=$latmax,pmin=$pmin atlas.sh |
---|
[3684] | 333 | fi |
---|
[4308] | 334 | fi |
---|
| 335 | (( count_atlas = $count_atlas + 1 )) |
---|
[3684] | 336 | (( il = $il + 1 )) |
---|
| 337 | done |
---|
| 338 | done |
---|
| 339 | if [ $count_atlas != 0 ] ; then |
---|
| 340 | echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' |
---|
| 341 | echo Les atlas manquant ont ete lances. Attendre leur |
---|
| 342 | echo creation pour relancer job_multi.sh |
---|
| 343 | echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!' |
---|
| 344 | # exit |
---|
| 345 | fi |
---|
| 346 | |
---|
[4308] | 347 | #fi #newatlas |
---|
[3915] | 348 | fi #atlas |
---|
| 349 | |
---|
[3684] | 350 | # atlas_cesmep : cles pour activer les nouveau atlas (C-ESM-EP) |
---|
[4308] | 351 | # AI avril 2020 : Passage a la version v2 de C-ESM-EP |
---|
| 352 | # FH Juin 2022 : Passage a la version v3 de C-ESM-EP (changement de prodigfs en thredds) |
---|
[3684] | 353 | if [ $atlas_cesmep = 1 ] ; then |
---|
| 354 | cd ~/LMDZ/C-ESM-EP |
---|
[4308] | 355 | ./AtlasLMDZ.sh -runsfile $runstxt $comp >> ${LOGD}/CESMEP$$ 2>&1 |
---|
[3684] | 356 | fi # atlas_cesmep |
---|
| 357 | |
---|
| 358 | echo '########################################################################' |
---|
| 359 | echo 3/ Calcul des moyennes zonales nco |
---|
[4308] | 360 | echo '#####################################################################' |
---|
[3684] | 361 | |
---|
| 362 | |
---|
| 363 | #trace moy.zonale OBS + multi-simulations |
---|
| 364 | if [ $zon = 1 ] ; then |
---|
| 365 | cd $local |
---|
| 366 | mkdir -p $COMP_D/ZON |
---|
| 367 | for sim in $listsimse OBS ; do |
---|
[4308] | 368 | echo make_MOY for simulation $sim, log in ${LOGD}/MOY$$ |
---|
[3684] | 369 | years=`echo $sim | sed -e 's/_SE_/ /' | awk ' { print $2 } '` |
---|
| 370 | run=`echo $sim | sed -e 's/_SE_/ /' | awk ' { print $1 } '` |
---|
[4330] | 371 | echo ./make_MOY.sh "$years" YEAR "$run" GLOB |
---|
[4308] | 372 | ./make_MOY.sh "$years" YEAR "$run" GLOB >> ${LOGD}/MOY$$ 2>&1 |
---|
| 373 | ./make_MOY.sh "$years" YEAR "$run" ZON >> ${LOGD}/MOY$$ 2>&1 |
---|
| 374 | ./make_MOY.sh "$years" JJA "$run" ZON >> ${LOGD}/MOY$$ 2>&1 |
---|
| 375 | ./make_MOY.sh "$years" DJF "$run" ZON >> ${LOGD}/MOY$$ 2>&1 |
---|
| 376 | ./make_MOY.sh "$years" JJAS "$run" AMMACROSS >> ${LOGD}/MOY$$ 2>&1 |
---|
| 377 | ./make_MOY.sh "$years" MAM "$run" ZON >> ${LOGD}/MOY$$ 2>&1 |
---|
| 378 | ./make_MOY.sh "$years" SON "$run" ZON >> ${LOGD}/MOY$$ 2>&1 |
---|
[3684] | 379 | done |
---|
| 380 | cd $local |
---|
| 381 | ### ajout nuages LMDZ dans la compa et doit faire des liens symbol. sur |
---|
| 382 | #### les OBS calipso toujurs pour le moment |
---|
[4308] | 383 | echo mk_clouds_NOcalipso.sh, log in ${LOGD}/calipso$$ |
---|
| 384 | ./mk_clouds_NOcalipso.sh YEAR ZON >> ${LOGD}/calipso$$ 2>&1 |
---|
| 385 | ./mk_clouds_NOcalipso.sh DJF ZON >> ${LOGD}/calipso$$ 2>&1 |
---|
| 386 | ./mk_clouds_NOcalipso.sh JJA ZON >> ${LOGD}/calipso$$ 2>&1 |
---|
| 387 | ./mk_clouds_NOcalipso.sh JJAS AMMACROSS >> ${LOGD}/calipso$$ 2>&1 |
---|
| 388 | ./mk_clouds_NOcalipso.sh MAM ZON >> ${LOGD}/calipso$$ 2>&1 |
---|
| 389 | ./mk_clouds_NOcalipso.sh SON ZON >> ${LOGD}/calipso$$ 2>&1 |
---|
| 390 | echo multi_ZONE.sh, log in ${LOGD}/Z$$ |
---|
| 391 | ./multi_ZONE.sh YEAR $comp ZON -runsfile $runstxt >> ${LOGD}/Z$$ 2>&1 |
---|
| 392 | ./multi_ZONE.sh JJA $comp ZON -runsfile $runstxt >> ${LOGD}/Z$$ 2>&1 |
---|
| 393 | ./multi_ZONE.sh DJF $comp ZON -runsfile $runstxt >> ${LOGD}/Z$$ 2>&1 |
---|
| 394 | ./multi_ZONE.sh JJAS $comp AMMACROSS -runsfile $runstxt >> ${LOGD}/Z$$ 2>&1 |
---|
| 395 | ./multi_ZONE.sh MAM $comp ZON -runsfile $runstxt >> ${LOGD}/Z$$ 2>&1 |
---|
| 396 | ./multi_ZONE.sh SON $comp ZON -runsfile $runstxt >> ${LOGD}/Z$$ 2>&1 |
---|
[3684] | 397 | fi |
---|
| 398 | |
---|
| 399 | if [ ! -f $COMP_D/1D/1D.html -a $und = 1 ] ; then |
---|
[4308] | 400 | echo '#####################################################################' |
---|
| 401 | echo 4/ Lancement du 1D |
---|
| 402 | echo '#####################################################################' |
---|
[3684] | 403 | cd $COMP_D |
---|
[4308] | 404 | echo log in ${LOGD}/1D$$ |
---|
| 405 | ~/LMDZ/1D/serie1d.sh $comp > ${LOGD}/1D$$ 2>&1 |
---|
[3684] | 406 | cd $local |
---|
| 407 | fi |
---|
| 408 | |
---|
| 409 | if [ $tuning_metrics = 1 -a ! -d $COMP_D/METRICS ] ; then |
---|
[4308] | 410 | echo '#####################################################################' |
---|
| 411 | echo 5.1/ Metriques LMD : $tuning_metrics |
---|
| 412 | echo '#####################################################################' |
---|
| 413 | echo metrics.sh, log in ${LOGD}/METRICS$$ |
---|
[3695] | 414 | cd $local/METRICS |
---|
[4308] | 415 | #./metrics.sh -runsfile $runstxt $comp |
---|
[4330] | 416 | echo ./metrics.sh $comp > ${LOGD}/METRICS$$ 2>&1 |
---|
[4308] | 417 | ./metrics.sh $comp > ${LOGD}/METRICS$$ 2>&1 |
---|
[3684] | 418 | fi |
---|
| 419 | |
---|
[4308] | 420 | if [ $pcmdi_metrics = 1 ] ; then |
---|
| 421 | echo '#####################################################################' |
---|
| 422 | echo 5.2/ Metriques PCMDI : $pcmdi_metrics |
---|
| 423 | echo '#####################################################################' |
---|
| 424 | cd $local |
---|
| 425 | ./make_pcmdi.sh $comp |
---|
| 426 | fi |
---|
| 427 | |
---|
[3684] | 428 | if [ $regdyn = 1 ]; then |
---|
[4308] | 429 | echo '#####################################################################' |
---|
| 430 | echo 6/ Sorting by dynamical regimes : $regdyn |
---|
| 431 | echo '#####################################################################' |
---|
[3684] | 432 | cd ~/users/musat/regdyn/clean_regdyn |
---|
[4308] | 433 | ./mk_all_regdyn.sh $comp 0 > ${LOGD}/REGDYN$$ 2>&1 |
---|
[3684] | 434 | cd $local |
---|
| 435 | fi |
---|
| 436 | |
---|
| 437 | if [ $esmval2 = 1 ]; then |
---|
[4308] | 438 | echo '#####################################################################' |
---|
| 439 | echo 7/ ESMvalTool : $esmval2 |
---|
| 440 | echo '#####################################################################' |
---|
[3684] | 441 | cd $local |
---|
| 442 | ./cvdp4atlas.sh $comp |
---|
| 443 | ./perfm4atlas.sh $comp |
---|
| 444 | fi |
---|
| 445 | |
---|
| 446 | if [ $mjo = 1 ]; then |
---|
[4308] | 447 | echo '#####################################################################' |
---|
| 448 | echo 8.1/ Rainfall variability / MJO diagnostics : $mjo |
---|
| 449 | echo '#####################################################################' |
---|
[3684] | 450 | cd ~/users/idelkadi/MJO |
---|
| 451 | ./make_diagnosMJO.sh $comp |
---|
| 452 | fi |
---|
| 453 | |
---|
| 454 | if [ $river = 1 ]; then |
---|
| 455 | cd ~/users/idelkadi/AXE1/River |
---|
| 456 | ./make_diagnoRiver.sh $comp |
---|
| 457 | fi |
---|
| 458 | |
---|
| 459 | if [ $lma = 1 ]; then |
---|
[4308] | 460 | echo '#####################################################################' |
---|
| 461 | echo 8.2/ Rainfall variability / LMA analysis of the MJO : $lma |
---|
| 462 | echo '#####################################################################' |
---|
| 463 | #IM150722 cd $local |
---|
| 464 | #IM120722 ./make_lma.sh $comp |
---|
| 465 | cd ~/users/musat/d_AXE2_LMA/ |
---|
| 466 | ./make_LMA.sh $comp > ${LOGD}/LMA$$ 2>&1 |
---|
| 467 | cd ${local} |
---|
[3684] | 468 | fi |
---|
[4308] | 469 | |
---|
[3684] | 470 | if [ $axe2 = 1 ]; then |
---|
[4308] | 471 | echo '#####################################################################' |
---|
| 472 | echo 8.3/ Rainfall variability / metrics |
---|
| 473 | echo '#####################################################################' |
---|
[3684] | 474 | cd $local |
---|
[4308] | 475 | bash make_axe2.sh -runstxt $runstxt $comp > ${LOGD}/axe2_$$ 2>&1 |
---|
| 476 | echo make_axe2.sh -runstxt $runstxt $comp '-->' ${LOGD}/axe2_$$ |
---|
[3684] | 477 | fi |
---|
[4308] | 478 | |
---|
[3684] | 479 | if [ $trmm = 1 ]; then |
---|
[4308] | 480 | echo '#####################################################################' |
---|
| 481 | echo 8.4/ Rainfall variability / Marine Bonazzola : $trmm |
---|
| 482 | echo '#####################################################################' |
---|
| 483 | cd ~/users/musat/atlas/d_AXE2 |
---|
[3684] | 484 | ./Axe2_Marine.sh $comp |
---|
| 485 | cd $local |
---|
| 486 | fi |
---|
[4308] | 487 | |
---|
| 488 | if [ $river = 1 ]; then |
---|
| 489 | echo '#####################################################################' |
---|
| 490 | echo 9/ River discharges |
---|
| 491 | echo '#####################################################################' |
---|
| 492 | cd ~/users/idelkadi/AXE1/River |
---|
| 493 | ./make_diagnoRiver.sh $comp |
---|
| 494 | fi |
---|
| 495 | |
---|
[3684] | 496 | if [ $axe4 = 1 ]; then |
---|
[4308] | 497 | echo '#####################################################################' |
---|
| 498 | echo 10/ Poles |
---|
| 499 | echo '#####################################################################' |
---|
[3684] | 500 | cd $local |
---|
| 501 | ./make_axe4.sh $comp |
---|
| 502 | fi |
---|
| 503 | |
---|
| 504 | if [ "$reflcld_histo" = "1" ] ; then |
---|
[4308] | 505 | echo '#####################################################################' |
---|
| 506 | echo 11/ reflcld_histo : $reflcld_histo |
---|
| 507 | echo '#####################################################################' |
---|
| 508 | cd ~/users/idelkadi/AXE3/CldReflCldFrac |
---|
[3684] | 509 | ./make_scatReflCld.sh $comp |
---|
| 510 | cd $local |
---|
| 511 | fi |
---|
| 512 | |
---|
| 513 | if [ $vertcld_calipso = 1 ] ; then |
---|
[4308] | 514 | echo '#####################################################################' |
---|
| 515 | echo 12/ Calipso : $vertcld_calipso |
---|
| 516 | echo '#####################################################################' |
---|
[3684] | 517 | cd ~/users/idelkadi/AXE3/Calipso/CoupeVerticale/DJF |
---|
| 518 | ./make_VerticalMzCldCalipso.sh $comp |
---|
| 519 | cd ~/users/idelkadi/AXE3/Calipso/CoupeVerticale/JJA |
---|
| 520 | ./make_VerticalMzCldCalipso.sh $comp |
---|
[4308] | 521 | cd ~/users/idelkadi/AXE3/Calipso/CoupeVerticale/MAM |
---|
| 522 | ./make_VerticalMzCldCalipso.sh $comp |
---|
| 523 | cd ~/users/idelkadi/AXE3/Calipso/CoupeVerticale/SON |
---|
| 524 | ./make_VerticalMzCldCalipso.sh $comp |
---|
[3684] | 525 | cd ~/users/idelkadi/AXE3/Calipso/Stratos |
---|
| 526 | ./make_StratosCalipso.sh $comp |
---|
| 527 | fi |
---|
| 528 | |
---|
| 529 | |
---|
| 530 | if [ $stations_day = 1 ] ; then |
---|
[4308] | 531 | echo '#####################################################################' |
---|
| 532 | echo 13/ Stations |
---|
| 533 | echo '#####################################################################' |
---|
[3684] | 534 | ~/users/Binta/bibi.sh $comp |
---|
| 535 | ~/users/cheruy/bibi.sh $comp |
---|
| 536 | fi |
---|
| 537 | |
---|
| 538 | if [ $stations_mth = 1 ] ; then |
---|
| 539 | ~/users/traore/SE_buoy.sh $comp |
---|
| 540 | fi |
---|
| 541 | |
---|
| 542 | if [ $html = 1 ] ; then |
---|
[4308] | 543 | echo '#####################################################################' |
---|
| 544 | echo 14/ generation des pages html |
---|
| 545 | echo '#####################################################################' |
---|
| 546 | cd ${local} |
---|
| 547 | echo ./make_html_libigcm.sh --comp $comp --runstxt $runstxt |
---|
[4330] | 548 | bash ./make_html_libigcm.sh --comp $comp --runstxt $runstxt > ${LOGD}/html$$ 2>&1 |
---|
[4308] | 549 | echo log in ${LOGD}/html$$ |
---|
[4340] | 550 | bash ./html_entete.sh $comp ${ref} >> ${LOGD}/html$$ 2>&1 |
---|
[4308] | 551 | cd ${local}/html |
---|
[4330] | 552 | bash ./make_index_html.sh ${comp} ${dataref} >> ${LOGD}/html$$ 2>&1 |
---|
[3684] | 553 | cd $local |
---|
[4330] | 554 | bash ./html_tuning.sh $comp >> ${LOGD}/html$$ 2>&1 |
---|
| 555 | bash ./html_tuning_min.sh $comp >> ${LOGD}/html$$ 2>&1 |
---|
| 556 | bash ./html_accueil.sh $comp >> ${LOGD}/html$$ 2>&1 |
---|
| 557 | bash ./html_1D.sh $comp >> ${LOGD}/html$$ 2>&1 |
---|
| 558 | bash ./html_lma.sh $comp >> ${LOGD}/html_LMA$$ 2>&1 |
---|
| 559 | bash ./html_pcmdi.sh $comp >> ${LOGD}/html$$ 2>&1 |
---|
| 560 | bash ./html_all.sh >| $MULTIDIR/all.html |
---|
[3684] | 561 | |
---|
| 562 | # html pour les métriques |
---|
| 563 | # cat $COMP_D/entete.html doc_pcmdi.html >| $COMP_D/PCMDI.html |
---|
| 564 | # ref=`echo $listsimss | awk ' { print $1 } '` |
---|
| 565 | # echo "<h1> Metrics with respect to $ref </h1>" >> $COMP_D/PCMDI.html |
---|
| 566 | # cat $COMP_D/pcmdi_metrics.html >> $COMP_D/PCMDI.html |
---|
| 567 | # echo "<h1> Metrics with respect to AR4.00 </h1>" >> $COMP_D/PCMDI.html |
---|
| 568 | # cat $COMP_D/metrics-AR4-as-ref.html >> $COMP_D/PCMDI.html |
---|
| 569 | # echo "<h1> Metrics with respect to CMIP5/AMIP multi model </h1>" >> $COMP_D/PCMDI.html |
---|
| 570 | # cat $COMP_D/metrics-CMIP5-AMIP-as-ref.html >> $COMP_D/PCMDI.html |
---|
| 571 | for i in 1 2 3 4 5 6 7 ; do |
---|
[4308] | 572 | ./html_axe$i.sh $comp >> ${LOGD}/html$$ 2>&1 |
---|
[3684] | 573 | done |
---|
[4308] | 574 | |
---|
| 575 | echo Multi atlas, log in ${LOGD}/multiatlas$$ |
---|
| 576 | # for proj in GLOB SH NH ; do |
---|
| 577 | # for proj in ATLTN GLOB SH NH ; do |
---|
[3684] | 578 | for proj in GLOB SH NH ; do |
---|
| 579 | for bias in BIAS MAPS ; do |
---|
[4308] | 580 | for season in YEAR DJF JJA MAM SON ; do |
---|
[4340] | 581 | ./multi_atlas.sh $comp $bias $season $proj $ref $RUNS >> ${LOGD}/multiatlas$$ 2>&1 |
---|
[3684] | 582 | done |
---|
| 583 | done |
---|
| 584 | done |
---|
[3745] | 585 | #exit |
---|
| 586 | # cd $COMP_D |
---|
[3684] | 587 | # ln -sf BIASYEAR.html $comp.html |
---|
[3745] | 588 | # ln -sf ACCUEIL.html $comp.html |
---|
[3743] | 589 | cd $local |
---|
[3737] | 590 | ./webpage_multi.sh $comp |
---|
[4308] | 591 | fi |
---|
[3745] | 592 | |
---|
[4308] | 593 | echo UN NOVEL MULTI ATLAS EST DISPONIBLE sur $COMP_D/ACCUEIL.html |
---|