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