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