source: bench_AROME.sh @ 86

Last change on this file since 86 was 86, checked in by htune, 7 years ago
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#!/bin/bash
2
3if [ `pwd | grep -o HighTune | wc -l` -gt 1 ]
4then
5  echo "Careful: the HighTune string appears more than once in your current directory:"
6  pwd
7  echo "This is going to be a problem! Make sure it appears only once!"
8  # some sed commands won't work otherwise; this should be improved.
9  exit
10fi
11
12model=LMDZ
13cas=ARMCU/REF
14param=param
15bench=2
16
17while (($# > 0)) ; do
18        case $1 in
19          -bench) bench=$2 ; shift ; shift ;;
20          -param) param=$2 ; shift ; shift ;;
21          -help) echo Usage "$0 [-bench N] [-param param_file] [model]" ; exit ;;
22          *) model=$1 ; shift ;;
23        esac
24done
25
26if [ $model == AROME ];then
27  cas=ARMCU
28  subcase=REF
29fi
30if [ $model == ECRAD ] ; then
31  cas=ARMCU/008
32fi
33
34WDIR=BENCH$bench$model
35./setup.sh $model $WDIR
36cd WORK/$WDIR
37
38./param2R.sh 30 3 $param
39if [ $? -eq 0 ]; then
40  sed -i "s/WAVEN=.*/WAVEN=1/g" expe_setup.R
41  if [ $model == AROME ];then
42    echo ./serie_$model.sh $cas $subcase 1         
43    ./serie_$model.sh $cas $subcase 1
44  else
45    ./serie_$model.sh $cas 1
46  fi
47  echo bench=$bench
48  if [ $? -eq 0 ]; then
49    if [ $bench = 1 ] ; then
50       compute_metrics_csv.sh
51       Rscript htune_csv2Rdata.R
52       Rscript htune_EmulatingMultiMetric.R
53    elif [ $bench = 3 ] ; then
54       # csv bench.
55       echo 'Compute_multicas_onemetric+csv'
56       compute_multicas_onemetric.sh
57       Rscript htune_csv2Rdata_many-met.R
58       Rscript htune_EmulatingMultiMetric.R
59    elif [ $bench = 2 ] ; then
60       # old bench. To be removed
61       echo 'Emulating_CS2'
62       Rscript htune_ncdf2Rdata.R
63       Rscript htune_EmulatingSCM_CS2.R
64    else
65       # bench with optionally multi metrics computed witing R
66       echo 'Emulating_MultiMetric'
67       Rscript htune_ncdf2Rdata.R
68       Rscript htune_EmulatingMultiMetric.R
69    fi
70
71 
72    echo '##########################################################'
73    echo Next version will start heating water at tea time
74    echo '##########################################################'
75 
76    pdfjam Rplots.pdf 2 
77    pdf2ps Rplots-2-pdfjam.pdf
78    ps2epsi Rplots-2-pdfjam.ps
79    epstopdf Rplots-2-pdfjam.epsi
80    pdfjam Rplots-2-pdfjam.pdf InputSpace_wave1.pdf --nup 2x1 --landscape --outfile result.pdf
81    evince InputSpace_wave1.pdf &
82  fi
83fi
Note: See TracBrowser for help on using the repository browser.