source: BOL/Multi_atlas/html_axe7.sh @ 3780

Last change on this file since 3780 was 3737, checked in by idelkadi, 5 years ago

Repository under svn of a first version of Multiatlas diagnostics for LMDZ. This version is adapted to be able to run a LMDZ multiatlas on an individual account on the ciclad machine of the IPSL. In this version, the parts to be modified are identified so as to subsequently adapt it to other machines.
Modifications following changes and simplification of access from CICLAD / ClimServ?? to the different "thredds"

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