source: bench2wavesMmetric.sh @ 132

Last change on this file since 132 was 83, checked in by htune, 7 years ago

bench_ARPCLIMAT.sh => with htune_EmulatingMultiMetric.R
expe_setup.R => in order to use for the multimetric cases case_name & subcase_name
htune_case_setup.R => add cases BOMEX/RICO/SCMS
htune_ncdf2Rdata.R => homogeneization of the writing of *Rdata files with htune_csv*.R
htune_csv*met.R => use of expe_setup.R to get the name of the *.Rdata file to write
compute_multicas_onemetrique.sh => modification of the name of *.csv files
htune_EmulatingMultiMetric.R => fusion of htune_EMulatingMultiMetric.R and htune_EmulatingMultiMetric_csv.R it can now work with either htune_ncdf2Rdata.R or htune_csv*met.R
Fleur

  • Property svn:executable set to *
File size: 2.3 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_cldb
15
16if [ $# -eq 1 ] ; then
17  model=ECRAD
18  cas=ARMCU/008
19  param=param
20fi
21
22WDIR=BENCH$csv$model
23./setup.sh $model $WDIR
24cd WORK/$WDIR
25
26./param2R.sh 30 3 $param
27if [ $? -eq 0 ]; then
28  sed -i "s/WAVEN=.*/WAVEN=1/g" expe_setup.R  # setup experiment
29  sed -i "s/targetvar=.*/targetvar=c('theta500', 'qv500', 'zhneb', 'nebmax')/g" expe_setup.R
30  sed -i "s/tau=.*/tau=1/g" expe_setup.R
31  sed -i "s/Cutoff=.*/Cutoff=3/g" expe_setup.R
32# sed -i command is a bit different on mac. We should have the following:
33# sed -i "" "s/targetvar=.*/targetvar=c('theta500', 'qv500', 'zhneb', 'nebmax')/g" expe_setup.R
34  ./serie_$model.sh $cas 1            # run model with parameters
35  if [ $? -eq 0 ]; then
36    Rscript htune_ncdf2Rdata.R        # read models outputs and compute metrics
37    Rscript htune_EmulatingMultiMetric.R  # emulate and history match
38
39    pdfjam Rplots.pdf 2
40    pdf2ps Rplots-2-pdfjam.pdf
41    ps2epsi Rplots-2-pdfjam.ps
42    epstopdf Rplots-2-pdfjam.epsi
43    pdfjam Rplots-2-pdfjam.pdf InputSpace_wave1.pdf --nup 2x1 --landscape --outfile result_wave1.pdf
44    evince result_wave1.pdf &
45
46    ./param2Rwave.sh 2 Wave2.RData    # generate new wave parameters
47    sed -i "/WAVEN=.*/WAVEN=2/g" expe_setup.R  # setup experiment
48    sed -i "/targetvar=.*/targetvar=c('theta500', 'qv500', 'zhneb', 'nebmax')/g" expe_setup.R
49    sed -i "/tau=.*/tau=0/g" expe_setup.R
50    sed -i "s/Cutoff=.*/Cutoff=3/g" expe_setup.R
51    ./serie_$model.sh $cas 2          # run model with parameters
52    if [ $? -eq 0 ]; then
53    Rscript htune_ncdf2Rdata.R
54    Rscript htune_EmulatingMultiMetric.R
55
56    pdfjam Rplots.pdf 2
57    pdf2ps Rplots-2-pdfjam.pdf
58    ps2epsi Rplots-2-pdfjam.ps
59    epstopdf Rplots-2-pdfjam.epsi
60    pdfjam Rplots-2-pdfjam.pdf InputSpace_wave2.pdf --nup 2x1 --landscape --outfile result_wave2.pdf
61    evince result_wave2.pdf &
62
63    echo '##########################################################'
64    echo '    Next version will start heating water at tea time     '
65    echo '##########################################################'
66
67    fi
68  fi
69fi
Note: See TracBrowser for help on using the repository browser.