#!/bin/bash if [ `pwd | grep -o HighTune | wc -l` -gt 1 ] then echo "Careful: the HighTune string appears more than once in your current directory:" pwd echo "This is going to be a problem! Make sure it appears only once!" # some sed commands won't work otherwise; this should be improved. exit fi model=LMDZ cas=ARMCU/REF param=param bench=2 while (($# > 0)) ; do case $1 in -bench) bench=$2 ; shift ; shift ;; -param) param=$2 ; shift ; shift ;; -help) echo Usage "$0 [-bench N] [-param param_file] [model]" ; exit ;; *) model=$1 ; shift ;; esac done if [ $model == AROME ];then cas=ARMCU subcase=REF fi if [ $model == ECRAD ] ; then cas=ARMCU/008 fi WDIR=BENCH$bench$model ./setup.sh $model $WDIR cd WORK/$WDIR ./param2R.sh 30 3 $param if [ $? -eq 0 ]; then sed -i "s/WAVEN=.*/WAVEN=1/g" expe_setup.R if [ $model == AROME ];then echo ./serie_$model.sh $cas $subcase 1 ./serie_$model.sh $cas $subcase 1 else ./serie_$model.sh $cas 1 fi echo bench=$bench if [ $? -eq 0 ]; then if [ $bench = 1 ] ; then compute_metrics_csv.sh Rscript htune_csv2Rdata.R Rscript htune_EmulatingMultiMetric.R elif [ $bench = 3 ] ; then # csv bench. echo 'Compute_multicas_onemetric+csv' compute_multicas_onemetric.sh Rscript htune_csv2Rdata_many-met.R Rscript htune_EmulatingMultiMetric.R elif [ $bench = 2 ] ; then # old bench. To be removed echo 'Emulating_CS2' Rscript htune_ncdf2Rdata.R Rscript htune_EmulatingSCM_CS2.R else # bench with optionally multi metrics computed witing R echo 'Emulating_MultiMetric' Rscript htune_ncdf2Rdata.R Rscript htune_EmulatingMultiMetric.R fi echo '##########################################################' echo Next version will start heating water at tea time echo '##########################################################' pdfjam Rplots.pdf 2 pdf2ps Rplots-2-pdfjam.pdf ps2epsi Rplots-2-pdfjam.ps epstopdf Rplots-2-pdfjam.epsi pdfjam Rplots-2-pdfjam.pdf InputSpace_wave1.pdf --nup 2x1 --landscape --outfile result.pdf evince InputSpace_wave1.pdf & fi fi