source: BOL/Multi_atlas/html_axe7.sh

Last change on this file was 4342, checked in by musat, 19 months ago

Inclut environnement spirit et dernieres corrections (3/3)
IonelaMusat?

  • Property svn:executable set to *
File size: 3.1 KB
Line 
1#!/bin/bash
2
3source ~/env_Multi_atlas.sh
4
5comp=$1
6
7local=`pwd -P`
8
9if [ 1 == 0 ]; then
10login=`whoami`
11hostname=`hostname`
12if [ ${hostname:0:5} = cicla ] ; then
13DODSDIR=/thredds/ipsl
14dthredds=thredds-su.ipsl.fr/thredds/fileServer/ipsl_thredds
15HTML00=http://${dthredds}/$login
16machine=ciclad
17fi
18if [ ${hostname:0:5} = spiri ] ; then
19DODSDIR=/thredds/ipsl
20dthredds=thredds-su.ipsl.fr/thredds/fileServer/ipsl_thredds
21HTML00=http://${dthredds}/$login
22machine=spirit
23fi
24if [ ${hostname:0:5} = camel ] ; then
25DODSDIR=/thredds/ipsl
26fi
27if [ ${hostname:0:5} = irene ] ; then
28DODSDIR=
29fi
30if [ ${hostname:0:5} = jean- ] ; then
31DODSDIR=
32fi
33fi
34
35COMP_D=$DODSDIR/$login/lmdz/MultiSimu/$comp
36entetef=$COMP_D/entete.html
37
38local=`pwd`
39
40
41compf=$COMP_D/AXE7.html
42HTML=$HTML00/lmdz/MultiSimu/$comp
43
44DIRST=$DODSDIR/$login/lmdz/STATIONS
45HTMLST=$HTML00/lmdz/STATIONS
46
47DEF_FILE=$COMP_D/def.txt
48
49
50if [ -f $entetef ] ; then cat $entetef > $compf ; else \rm -f $compf ; touch $compf ; fi
51
52echo '<hr>' >> $compf
53
54cat <<eod>> $compf
55<h1> Comparaison aux stations </h1>
56
57<hr>
58Responsable : Fredho <br>
59
60eod
61
62liste_sim=""
63for s in `awk ' {print $1} ' $DEF_FILE | uniq` ; do liste_sim="$liste_sim $s" ; done
64
65
66# Regroupement des fichiers images stations concernes
67#----------------------------------------------------
68mkdir -p $COMP_D/STATIONS ; cd $COMP_D/STATIONS
69
70sortir=1
71for s in  $liste_sim  ; do
72   if [ -d $DIRST/Figure_AMMA/$s -o -d $DIRST/Figure_SIRTA/$s -o -d $DIRST/Figure_SGP/$s ] ; then
73      ln -sf $DIRST/Figure_AMMA/$s/*png .
74      ln -sf $DIRST/Figure_SIRTA/$s/*png .
75      ln -sf $DIRST/Figure_SGP/$s/*png .
76      sortir=0
77   fi
78done
79
80if [ $sortir = 0 ] ; then
81
82# html multi simulations par station
83# ----------------------------------
84virgu=""
85for year in 2006 2007 2009 2011 2012; do
86   echo '<li><h2> '$year' :' >> $compf
87   for station in wj ba ag na SIRTA SGP  ; do
88     if [ "`ls *${station}*_${year}.png`" != "" ] ; then
89      lvar=( `ls *${station}*_${year}.png | cut -d_ -f1 | uniq` )
90      echo ${lvar[*]}
91      echo ${#lvar[@]}
92      lsim=( $liste_sim )
93       lpng="" ; virg="" ; for var in ${lvar[*]} ; do for s in $liste_sim ; do file=${var}_${station}_${s}_${year} ; echo FILE $file ; if [ -f "$file.png" ] ; then lpng="$lpng$virg$file" ; fi ; virg="," ; done  ; done
94      ~/LMDZ/MultiSimu/concat_html.sh . "OK" $lpng ${#lsim[@]} > $station$year.html
95cat <<eod>> $compf
96$virgu <a href="$HTML/STATIONS/$station$year.html"> $station </a>
97eod
98virgu=","
99     fi
100   done
101   echo '</li></h2>' >> $compf
102done
103
104
105cd $local
106
107for figu in AMMA SIRTA SGP; do
108cat <<eod>> $compf
109<li><h2> $figu simulation  :
110eod
111virg=""
112for s in $liste_sim ; do
113if [ -d $DIRST/Figure_$figu/$s ] ; then
114cat <<eod>> $compf
115$virg <a href="$HTMLST/Figure_$figu/$s/index2006.html"> $s </a>
116eod
117virg=,
118fi
119done
120cat <<eod>> $compf
121</li></h2>
122eod
123done
124
125fi # sortir=0
126
127
128if [ -d $COMP_D/STATSE ] ; then
129cat <<eod>> $compf
130<br><hr><br>
131<h2><li><a href="$HTML/STATSE/index.html"> Cycle saisonniers moyens aux bouees </a> </li></h2>
132eod
133fi
134
135cat <<eod>> $compf
136</body>
137</html>
138eod
139
140
141echo $compf | sed -e 's:/thredds/ipsl/:http\://thredds-su.ipsl.fr/thredds/fileServer/ipsl_thredds/:'
Note: See TracBrowser for help on using the repository browser.