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