#!/bin/csh

# en local

set dir=~lmdz/DATA
set cp="ln -s"

#===================================================================
# Fichiers necessaires a la creations des etats initiaux
#===================================================================
$cp $dir/albedo.g1x1.dat albed.dat          # Albedos de surface
$cp $dir/albedo.g1x1.dic albed.dic          
$cp $dir/amip88.g2x2.dat amip.dat           # SST
$cp $dir/amip88.g2x2.dic amip.dic
$cp $dir/ecdyn.d880701.h12.dat ecdyn.dat    # Etat initial dynamique
$cp $dir/ecdyn.d880701.h12.dic ecdyn.dic
$cp $dir/ecphy.d880701.h12.dat ecphy.dat    # Etat initial physique
$cp $dir/ecphy.d880701.h12.dic ecphy.dic
$cp $dir/relief.usnavy.dat relief.dat       # Fichier de relief
$cp $dir/relief.usnavy.dic relief.dic
$cp $dir/rugos.g1x1.dat rugos.dat           # Rugosite de la surface
$cp $dir/rugos.g1x1.dic rugos.dic
#===================================================================


if ( ! -f run.def ) then
echo Il faut avoir sur le repertoire courant un fichier run.def
exit
endif

# Creation des etats initiaux
# ===========================
echo "execution de etat0_lmd.e, sortie dans etat0_lmd.l"
./etat0_lmd.e << EoD >! etat0_lmd.l
181
EoD

# Creation des conditions aux limites
# ===================================
echo "execution de limit_lmd.e, sortie dans limit_lmd.l"
./limit_lmd.e >! limit_lmd.l

# Conditions aux limites pour les especes traces
# ==============================================
if ( -f limit_tr.e ) then
$cp $dir/so2_1x1 so2_1x1
limit_tr.e > limit_tr.l
else
echo Vous n avez pas cree le fichier limit_tr utilise par les versions
echo du modele avec traceurs
endif
