Index: BOL/script_install/instal1d.sh
===================================================================
--- BOL/script_install/instal1d.sh	(revision 2035)
+++ BOL/script_install/instal1d.sh	(revision 2050)
@@ -9,5 +9,5 @@
 # which  contains the single column version of the model.
 # 2) installs a series of test cases on LMDZ.../1dcases/
-# 3) compile the lmdz1.F with vertical resolution L39 and L40
+# 3) compile the lmdz1.F with vertical resolution L59 and L40
 # 4) runs a subset of the cases
 ###############################################################################
@@ -18,4 +18,6 @@
 toga=1
 twpice=1
+#
+llm=59
 
 # Check in ~lmdz/WWW/DistribG95 which 1d version to use
@@ -46,4 +48,7 @@
 LMDGCM=`pwd`
 LMDlibf=$LMDGCM/modipsl/modeles/LMDZ5/libf/
+cd $LMDlibf
+rev=`svn info -r BASE | grep vision | tail -1 | awk ' { print $NF } '`
+cd $LMDGCM
 
 ###############################################################################
@@ -105,20 +110,40 @@
 # Installing source files and compiling
 ################################################################################
+
+if [ $rev -le 2015 ] ; then 
 cd $LMDlibf
+if [ -f phy1d/thermcell_dq.F90 ] ; then
+   echo phy1d a deja ete modifie. On repart d une version sauvegardee
+   if [ ! -d phy1dorig ] ; then
+      echo Cas a retravailler : le phy1d d origine n est plus dispo
+      exit
+   fi
+   mv phy1d phy1d$$
+   cp -r phy1dorig phy1d
+else
+   cp -r phy1d phy1dorig # sauvegarde du phy1d d'origine
+fi
 chmod +x ../tools/install_1d_src.sh 
 ../tools/install_1d_src.sh 
+fi
 
 ##   Nettoyage
 \rm -r ${source}
 #
-cd ${LMDlibf}/..
+cd ${LMDlibf}
+   physique=lmd
+if [ -d phy1d ] ; then
+   physique=1d
+fi
+
+cd ../
 \rm -f makefile
-./makelmdz -d 39 -p 1d lmdz1d
+./makelmdz -d ${llm} -p ${physique} lmdz1d
 if [ -f lmdz1d.e ] ; then
-   mv lmdz1d.e lmdz1d_L39.e
+   mv lmdz1d.e lmdz1d_L${llm}.e
  echo Compilation successfull
  for cas in amma ayotte case_e eq_rd_cv fire hapex92_init rico toga sanduref sandufast sanduslow twpice ; do
     rm -f ${LMDGCM}/1dcases/$cas/lmdz1d.e
-    ln -s `pwd`/lmdz1d_L39.e ${LMDGCM}/1dcases/$cas/lmdz1d.e
+    ln -s `pwd`/lmdz1d_L${llm}.e ${LMDGCM}/1dcases/$cas/lmdz1d.e
  done
 else
