| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | comp=$1 |
|---|
| 4 | |
|---|
| 5 | local=`pwd -P` |
|---|
| 6 | login=`whoami` |
|---|
| 7 | hostname=`hostname` |
|---|
| 8 | if [ ${hostname:0:5} = cicla ] ; then |
|---|
| 9 | DODSDIR=/thredds/ipsl |
|---|
| 10 | dthredds=thredds-su.ipsl.fr/thredds/fileServer/ipsl_thredds |
|---|
| 11 | HTML00=https://${dthredds}/$login |
|---|
| 12 | machine=ciclad |
|---|
| 13 | fi |
|---|
| 14 | if [ ${hostname:0:5} = spiri ] ; then |
|---|
| 15 | DODSDIR=/thredds/ipsl |
|---|
| 16 | dthredds=thredds-su.ipsl.fr/thredds/fileServer/ipsl_thredds |
|---|
| 17 | HTML00=https://${dthredds}/$login |
|---|
| 18 | machine=spirit |
|---|
| 19 | fi |
|---|
| 20 | if [ ${hostname:0:5} = camel ] ; then |
|---|
| 21 | DODSDIR=/thredds/ipsl |
|---|
| 22 | fi |
|---|
| 23 | if [ ${hostname:0:5} = irene ] ; then |
|---|
| 24 | DODSDIR= |
|---|
| 25 | fi |
|---|
| 26 | if [ ${hostname:0:5} = jean- ] ; then |
|---|
| 27 | DODSDIR= |
|---|
| 28 | fi |
|---|
| 29 | |
|---|
| 30 | ATLAS_DIR=$DODSDIR/$login/lmdz/atlas |
|---|
| 31 | OUT_DIR=$DODSDIR/$login/lmdz/MultiSimu/$comp |
|---|
| 32 | entetef=$OUT_DIR/entete.html |
|---|
| 33 | ZON_DIR=$OUT_DIR/ZON |
|---|
| 34 | |
|---|
| 35 | ############################################################################# |
|---|
| 36 | ############################################################################# |
|---|
| 37 | |
|---|
| 38 | compf=$OUT_DIR/METRICS.html |
|---|
| 39 | echo $compf |
|---|
| 40 | emptyelt='<td> - </td>' |
|---|
| 41 | |
|---|
| 42 | # Modification du html après l'introduction des tuning saisonniers |
|---|
| 43 | HTML=$HTML00/lmdz/MultiSimu/$comp |
|---|
| 44 | |
|---|
| 45 | if [ -d $OUT_DIR/METRICS/YEAR ] ; then # Nouvelle version |
|---|
| 46 | MET_D=METRICS/YEAR |
|---|
| 47 | else |
|---|
| 48 | MET_D=METRICS |
|---|
| 49 | fi |
|---|
| 50 | |
|---|
| 51 | entete=1 |
|---|
| 52 | |
|---|
| 53 | rm -f $compf ; touch $compf |
|---|
| 54 | |
|---|
| 55 | cat $entetef >> $compf |
|---|
| 56 | |
|---|
| 57 | echo '<hr/>' >> $compf |
|---|
| 58 | cat <<......eod>> $compf |
|---|
| 59 | <h2> Calcul de métriques sur des masques </h2> |
|---|
| 60 | <h3> Les flux sont orientés vers le bas. |
|---|
| 61 | Les moyennes sont faites sur les masques montrés entre le titre et le graphe. |
|---|
| 62 | Pour ETOA, la figure correspond à la différence entre le rouge et le bleu. |
|---|
| 63 | </h3> |
|---|
| 64 | ......eod |
|---|
| 65 | echo '<hr/>' >> $compf |
|---|
| 66 | |
|---|
| 67 | echo '<h3>' >> $compf |
|---|
| 68 | |
|---|
| 69 | echo '<hr/>' >> $compf |
|---|
| 70 | echo '<h2> Moyennes annuelles - Annual mean </h2>' >> $compf |
|---|
| 71 | echo '<table>' >> $compf |
|---|
| 72 | |
|---|
| 73 | ################ 3 premieres metriques #####################" |
|---|
| 74 | masks="glob circA circAa interH" |
|---|
| 75 | for MET in "Global" "Circum. Antart" "Circum. Antart anom" "Inter Hemispheric" ; do |
|---|
| 76 | echo "<TD ALIGN=CENTER> $MET </TD>" >> $compf |
|---|
| 77 | done |
|---|
| 78 | |
|---|
| 79 | echo '<TR>' >> $compf |
|---|
| 80 | for mask in $masks ; do |
|---|
| 81 | thredds=$HTML/$MET_D/mask$mask.png |
|---|
| 82 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=150 WIDTH=200 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 83 | done |
|---|
| 84 | |
|---|
| 85 | echo '<TR>' >> $compf |
|---|
| 86 | for mask in $masks ; do |
|---|
| 87 | thredds=$HTML/$MET_D/$mask.png |
|---|
| 88 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=400 WIDTH=500 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 89 | done |
|---|
| 90 | |
|---|
| 91 | echo '<TR>' >> $compf |
|---|
| 92 | |
|---|
| 93 | ################ 3 premieres metriques #####################" |
|---|
| 94 | masks="etoa etow etows" |
|---|
| 95 | for MET in "East Tropic Ocean Anom. (ETOA)" "ETO anom : ETO - WEAK" "ETO anom : SUBS - WEAK" ; do |
|---|
| 96 | echo "<TD ALIGN=CENTER> $MET </TD>" >> $compf |
|---|
| 97 | done |
|---|
| 98 | |
|---|
| 99 | echo '<TR>' >> $compf |
|---|
| 100 | for mask in $masks ; do |
|---|
| 101 | thredds=$HTML/$MET_D/mask$mask.png |
|---|
| 102 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=150 WIDTH=200 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 103 | done |
|---|
| 104 | |
|---|
| 105 | echo '<TR>' >> $compf |
|---|
| 106 | for mask in $masks ; do |
|---|
| 107 | thredds=$HTML/$MET_D/$mask.png |
|---|
| 108 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=400 WIDTH=500 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 109 | done |
|---|
| 110 | |
|---|
| 111 | echo '<TR>' >> $compf |
|---|
| 112 | |
|---|
| 113 | ################ 3 premieres metriques #####################" |
|---|
| 114 | masks="conv weak subs otrop" |
|---|
| 115 | for MET in "Convective" "Weak" "Subsidence" "Tropic oceans" ; do |
|---|
| 116 | echo "<TD ALIGN=CENTER> $MET </TD>" >> $compf |
|---|
| 117 | done |
|---|
| 118 | |
|---|
| 119 | echo '<TR>' >> $compf |
|---|
| 120 | for mask in $masks ; do |
|---|
| 121 | thredds=$HTML/$MET_D/mask$mask.png |
|---|
| 122 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=150 WIDTH=200 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 123 | done |
|---|
| 124 | |
|---|
| 125 | echo '<TR>' >> $compf |
|---|
| 126 | for mask in $masks ; do |
|---|
| 127 | thredds=$HTML/$MET_D/$mask.png |
|---|
| 128 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=400 WIDTH=500 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 129 | done |
|---|
| 130 | |
|---|
| 131 | echo '<TR>' >> $compf |
|---|
| 132 | |
|---|
| 133 | ################ 3 premieres metriques #####################" |
|---|
| 134 | masks="oce ter NAtl Arct" |
|---|
| 135 | for MET in "Oceans" "Continent" "N. Atlantic" "Arctic Oce." ; do |
|---|
| 136 | echo "<TD ALIGN=CENTER> $MET </TD>" >> $compf |
|---|
| 137 | done |
|---|
| 138 | |
|---|
| 139 | echo '<TR>' >> $compf |
|---|
| 140 | for mask in $masks ; do |
|---|
| 141 | thredds=$HTML/$MET_D/mask$mask.png |
|---|
| 142 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=150 WIDTH=200 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 143 | done |
|---|
| 144 | |
|---|
| 145 | echo '<TR>' >> $compf |
|---|
| 146 | for mask in $masks ; do |
|---|
| 147 | thredds=$HTML/$MET_D/$mask.png |
|---|
| 148 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=400 WIDTH=500 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 149 | done |
|---|
| 150 | |
|---|
| 151 | echo '</table>' >> $compf |
|---|
| 152 | |
|---|
| 153 | ##################################################################### |
|---|
| 154 | |
|---|
| 155 | |
|---|
| 156 | # Nouveaux tunings saisonniers |
|---|
| 157 | if [ -d $OUT_DIR/METRICS/YEAR ] ; then # Nouvelle version |
|---|
| 158 | |
|---|
| 159 | for seas in DJF JJA ; do |
|---|
| 160 | MET_D=METRICS/$seas |
|---|
| 161 | echo '<hr/>' >> $compf |
|---|
| 162 | echo '<h2> '$seas' mean </h2>' >> $compf |
|---|
| 163 | echo '<table>' >> $compf |
|---|
| 164 | |
|---|
| 165 | ################ 3 premieres metriques #####################" |
|---|
| 166 | masks="Sibe USA Arct NAtl circA" |
|---|
| 167 | for MET in "Siberia" "US gr. plains" "Arctic" "N. Atlantic" "Circum Antart." ; do |
|---|
| 168 | echo "<TD ALIGN=CENTER> $MET </TD>" >> $compf |
|---|
| 169 | done |
|---|
| 170 | |
|---|
| 171 | echo '<TR>' >> $compf |
|---|
| 172 | for mask in $masks ; do |
|---|
| 173 | thredds=$HTML/$MET_D/mask$mask.png |
|---|
| 174 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=150 WIDTH=200 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 175 | done |
|---|
| 176 | |
|---|
| 177 | echo '<TR>' >> $compf |
|---|
| 178 | for mask in $masks ; do |
|---|
| 179 | thredds=$HTML/$MET_D/$mask.png |
|---|
| 180 | echo '<TD ALIGN=CENTER><A HREF="'$thredds'"><IMG HEIGHT=400 WIDTH=500 SRC="'$thredds'"></a></TD>' >> $compf |
|---|
| 181 | done |
|---|
| 182 | |
|---|
| 183 | echo '</table>' >> $compf |
|---|
| 184 | |
|---|
| 185 | |
|---|
| 186 | ##################################################################### |
|---|
| 187 | done |
|---|
| 188 | |
|---|
| 189 | fi |
|---|
| 190 | |
|---|
| 191 | echo UN NOVEL MULTI ATLAS EST DISPONIBLE SUR $HTML00/lmdz/MultiSimu/$comp/entete.html |
|---|