source: BOL/Multi_atlas/make_timecount.sh

Last change on this file was 3917, checked in by musat, 3 years ago

Ajout script pour evaluer le temps necessaire pour la realisation
des cartes
IM

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2
3comp=$1
4
5local=`pwd -P`
6runstxt=$local/runs.txt
7echo runstxt= $runstxt
8
9login=`whoami`
10login=${login}
11DODSDIR=/thredds/ipsl
12
13echo DODSDIR : $DODSDIR
14MAIN_SE=$DODSDIR/$login/lmdz/SE
15TS_DA=$DODSDIR/$login/lmdz/TS_DA
16TS_MO=$DODSDIR/$login/lmdz/TS_MO
17MULTIDIR=$DODSDIR/$login/lmdz/MultiSimu
18
19COMP_D=$MULTIDIR/$comp
20
21###
22# RUNS= :def.txt
23DEF_FILE=$COMP_D/def.txt ; if [ ! -f $DEF_FILE ] ; then echo renseigner $DEF_FILE ; exit ; fi
24
25listsims=""  ; for s  in `awk ' {print $1} ' $DEF_FILE | uniq`          ; do listsims="$listsims $s"    ; done
26echo listsims $listsims
27
28DEF_FILE=$COMP_D/def.txt ; if [ ! -f $DEF_FILE ] ; then echo renseigner $DEF_FILE ; exit ; fi
29
30RUNS=""
31RUNS=`awk ' {print $1"_"$2 } ' $DEF_FILE`
32echo $RUNS
33echo listrunss=$RUNS
34
35nrun=0
36for run in $RUNS; do
37let "nrun = ${nrun} + 1"
38done
39echo nrun=$nrun
40
41natlas=`wc -l $COMP_D/atlas-def | awk ' { print $1 } '`
42
43nvar=0
44il=1
45while [ $il -le $natlas ] ; do
46   line=`sed -n -e ${il}p $COMP_D/atlas-def`
47   seas=`echo $line | awk ' { print $1 } '`
48   proj=`echo $line | awk ' { print $2 } '`
49   vars=`echo $line | awk ' { print $3 } '`
50   varg=`echo $vars | sed -e 's/,/ /g'`
51
52for var in $varg; do
53let "nvar = ${nvar} + 1"
54done
55echo il=$il nvar=$nvar
56(( il = $il + 1 ))
57done
58
59let ngpervar=4
60let "ngrafs = ${nrun} * ${nvar} * ${ngpervar}"
61
62echo ngrafs=${ngrafs}
63
64let ntpervarsfact=75
65let sfact=10
66let "nts = ${ngrafs}* ${ntpervar}"
67let "nts = ${nts}/${sfact}"
68
69echo
70echo ngpervar=$ngpervar est le nombre de graphiques par variable
71echo ntpervarsfact=$ntpervarsfact est le temps en secondes pour faire un graphe
72echo avec un facteur multiplicatif de $sfact
73echo
74
75echo ======================================================= 
76echo
77echo La production des cartes du Multi-atlas $comp prendra
78echo environ $nts secondes
79echo
80echo ======================================================= 
81
82exit
Note: See TracBrowser for help on using the repository browser.