#!/bin/bash

local=`pwd -P`
login=`whoami`
hostname=`hostname`
if [ ${hostname:0:5} = cicla ] ; then
DODSDIR=/prodigfs/ipslfs/dods
HTML00=http://vesg.ipsl.upmc.fr/thredds/fileServer/IPSLFS/$login
machine=ciclad
fi
if [ ${hostname:0:5} = camel ] ; then
DODSDIR=/prodigfs/ipslfs/dods
fi
if [ ${hostname:0:5} = irene ] ; then
DODSDIR=
fi
if [ ${hostname:0:5} = jean- ] ; then
DODSDIR=
fi


      echo '<h1 ALIGN=CENTER> Liste des séries de simulations préparatoires à CMIP6, LMDZ-Orchidee</h1> '
echo "<table>"
echo "<H1>"


i=1
for f in /prodigfs/ipslfs/dods/fabric/lmdz/MultiSimu/*/entete.html ; do
    sim=`echo $f | cut -d/ -f8`
# A REFAIRE
echo "<TD ALIGN=LEFT><A HREF=`echo $f | sed -e 's:/prodigfs/ipslfs/dods/:http\://vesg.ipsl.upmc.fr/thredds/fileServer/IPSLFS/:'`> $sim </A> </TD>"

if [ $i = 8 ] ; then
echo "<TR>"
i=0
fi
i=$(( $i + 1 ))

done
echo "</table>"
echo "</H1>"

