#!/bin/bash

source ~/env_Multi_atlas.sh

comp=$1

local=`pwd -P`

if [ 1 == 0 ]; then
login=`whoami`
hostname=`hostname`
if [ ${hostname:0:5} = cicla ] ; then
DODSDIR=/thredds/ipsl
dthredds=thredds-su.ipsl.fr/thredds/fileServer/ipsl_thredds
HTML00=http://${dthredds}/$login
machine=ciclad
fi
if [ ${hostname:0:5} = spiri ] ; then
DODSDIR=/thredds/ipsl
dthredds=thredds-su.ipsl.fr/thredds/fileServer/ipsl_thredds
HTML00=http://${dthredds}/$login
machine=spirit
fi
if [ ${hostname:0:5} = camel ] ; then
DODSDIR=/thredds/ipsl
fi
if [ ${hostname:0:5} = irene ] ; then
DODSDIR=
fi
if [ ${hostname:0:5} = jean- ] ; then
DODSDIR=
fi
fi

COMP_D=$DODSDIR/$login/lmdz/MultiSimu/$comp
entetef=$COMP_D/entete.html

#############################################################################
echo YEARS $years
#############################################################################

compf=$COMP_D/AXE2.html
HTML=$HTML00/lmdz/MultiSimu/$comp

cat $entetef > $compf
echo '<hr>' >> $compf

cat <<eod>> $compf
<h1> Axe 2: variabilité des précipitations tropicales</h1>

<hr>
Responsable :
Catherine Rio
remplacée momentanéement par Jean-Yves Grandpeix et Marine Bonazzola <br>
jyg@lmd.jussieu.fr,mbonaz@lmd.jussieu.fr <br>
Liste de diffusion : lmdz_vartrop@mailhost.lmd.jussieu.fr

<IMG HEIGHT=450 WIDTH=650  SRC="$HTML/AXE2/XMGR/tmp.png">


<h2> <a href="$HTML/lma2.html"> Analyse LMA (Local Modes Analysis) </a> </h2>

<h2> <a href="$HTML/curves_and_maps.html"> Variabilité des précipitations, comparée à TRMM  </a> </h2>

<h2> <a href="$HTML/AXE2/PR_DAY/index.html"> Variabilité des précipitations, comparée à TRMM (alternative)  </a> </h2>

<h2> <a href="$HTML/AXE2/PR_YR/index.html"> distribution moyenne précipitations, comparée à TRMM et GPCP (océan/continent)  </a> </h2>
</body>
</html>
eod

# A REFAIRE
echo $compf | sed -e 's:/thredds/ipsl/:http\://thredds-su.ipsl.fr/thredds/fileServer/ipsl_thredds/:'
