Index: BOL/script_install/install.sh
===================================================================
--- BOL/script_install/install.sh	(revision 1704)
+++ BOL/script_install/install.sh	(revision 1708)
@@ -2,38 +2,36 @@
 
 ###########################################################################
-# Auteur : Frédéric Hourdin/LMD/hourdin@lmd.jussieu.fr
+# Author : Frédéric Hourdin/LMD/hourdin@lmd.jussieu.fr
 # Usage  : install.sh
 #
-# Script bash d'installation du modele LMDZ sur un ordinateur PC/Linux
-# en utilisant le compilateur g95.
-# Le modele est récupéré dans une arborescence
+# bash installation script of the LMDZ model on a Linux PC.
+# the model is downloaded in the following direcory tree
 # $MODEL/modipsl/modeles/...
-# en utilisant l'infrastructure "modipsl" mise au point à l'"IPSL" pour
-#les besoins de la modélisation couplée du climat
-#(atmosphere/ocean/vegetation/chimie)
-# On ne récupère ici que les composantes atmosphériques (LMDZ4)
-# et végétation (ORCHIDEE).
+# using the "modipsl" infrastructure created by the "IPSL"
+# for coupled (atmosphere/ocean/vegetation/chemistry) climate modeling
+# activities.
+# Here we only download atmospheric (LMDZ) and vegetation (ORCHIDEE)
+# components.
 #
-# Sous le répertoire "modeles", on trouve en fait les sources de différents
-# modèles. Ici, LMDZ4, ORCHIDEEet IOIPSL, ensemble de programmes
-# d'entrée/sortie faisant appel à la librairie netcdf.
+# The sources of the models can be found in the "modeles" directory.
+# In the present case, LMDZ5, ORCHIDEE and IOIPSL (handling of input-outputs
+# using the NetCDF library.
 #
-# Le script récupères les différents jeux de sources (y compris une
-# version de netcdf) et utilitaires, compile le modèle, et lance une
-# simulation de test dans une configuration très légère sur
-# $MODEL/modipsl/modeles/LMDZ4/INI
+# The script downloads various source files (including a version of NetCDF)
+# and utilities, compiles the model, and runs a test simulation in a
+# munimal configuration.
 #
-# Pré-requis : g95/pgf90/gfortran, ksh, wget , gunzip, tar, ... (à compléter)
+# Prerequisites : g95/pgf90/gfortran, ksh, wget , gunzip, tar, ... 
 #
 # Modif 18/11/2011
-#    changement pour l'option real 8.
-#      On compile avec -r8 (ou équivalent) et -DNC_DOUBLE pour le GCM
-#      mais avec -r4 netcdf. La variable real est initialisée à 
-#      r4 ou r8 en début de script.
+#    changes for option real 8.
+#      We comopile with -r8 (or equivalent) and -DNC_DOUBLE for the GCM
+#      but with -r4 for netcdf. Variable real must be set to 
+#      r4 or r8 at the beginning of the script below.
 #
 ###########################################################################
 
 echo '################################################################'
-echo  Choix des options d installation
+echo  Choice of installation options 
 echo '################################################################'
 
@@ -42,8 +40,8 @@
 real=r8
 
-# ATTENTION !!!! Pour des versions anterieures a octobre 2009, utiliser
-# install.v2.sh au lieu de install.sh
-
-version=20110921.trunk
+# WARNING !!!! For versions before october 2009, use
+# install.v2.sh instead of install.sh
+
+#version=20110921.trunk
 version=testing
 
@@ -61,5 +59,5 @@
 bench=1
 pclinux=1
-compilo=gfortran # compilo=pgf90 ou g95 ou gfortran ou ifort sur PC linux
+compilo=gfortran # compilo=pgf90 or g95 or gfortran or ifort sur PC linux
 
 
@@ -70,5 +68,5 @@
    head -1 | awk ' { print $NF } ' | awk -F. ' { print $1 * 10 + $2 } '`
    if [ $gfortranv -le 43 ] ; then
-       echo ERROR : Your gfotran compiler is too old
+       echo ERROR : Your gfortran compiler is too old
        echo 'Please choose a new one (g95, ifort) and change the line'
        echo compilo=xxx
@@ -81,6 +79,6 @@
 
 
-## compile_with_fcm=1 : utilise makelmdz_fcm, possible a partir de la version 20111103.trunk (LMDZ5/trunk rev 1578)
-## compile_with_fcm=0 : utilise makegcm (default)
+## compile_with_fcm=1 : use makelmdz_fcm, possible a of version 20111103.trunk (LMDZ5/trunk rev 1578)
+## compile_with_fcm=0 : use makegcm
 compile_with_fcm=1
 
@@ -110,6 +108,6 @@
 OPTIMGCM="$OPTIM $OPTPREC"
 
-# choix de la resolution pour le bench
-# grid_resolution= 32x24x11 for test (test without ORCHIDEE)
+# choose the resolution for the bench runs
+# grid_resolution= 32x24x11 or 48x36x19 for tests (test without ORCHIDEE)
 #                  96x71x19  standard configuration
 grid_resolution=48x36x19
@@ -118,8 +116,6 @@
 
 ##########################################################################
-# Dans le cas où on installe sur des machines connues comme la NEC
-# brodie
-# de l'IDRIS, on ne verifie pas les logiciels existants et on n'installe
-# pas netcdf.
+# If installing on know machines such as NEC Brodie
+# at IDRIS, don't check for available software and don"t install netcdf
 if [ $hostname = brodie ] ; then
 netcdf=0
@@ -132,21 +128,18 @@
 mkdir -p $MODEL
 echo $MODEL
-MODEL=`( cd $MODEL ; pwd )` # transformation en chemin absolu si necessaire
-
-
-
-# Le -fendian=big n'est à utiliser vraiment utile que pour ARPEGE1D.
-# Le -r8 doit sans doute être éviter si on veut tourner rapidement sur
-# des machines 32 bits.
-# L'option r8 n'est pas forcement indispensable et elle produit
-# des executables plus gros.
-# Elles est indispensable cependant pour ARPEGE1D
-# On doit pouvoir aussi utiliser des optimisations plus fortes (-O3 par
-# exemple).
+MODEL=`( cd $MODEL ; pwd )` # to get absolute path, if necessary
+
+
+
+# Option -fendian=big is only to be used with ARPEGE1D.
+# The -r8 should probably be avoided if running on 32 bit machines
+# Option r8 is not mandatory and generates larger executables.
+# It is however mandatory if using ARPEGE1D
+# Better optimization options might be a better choice (e.g. -O3)
 
 
 echo '################################################################'
 if [ "$check_linux" = 1 ] ; then
-echo   Test sur les logiciels requis
+echo   Check if required software is available
 echo '################################################################'
 
@@ -154,8 +147,8 @@
 use_shell="ksh" # default: use ksh
 if [ "`which ksh`" = "" ] ; then
-  echo "pas de ksh ... on va utiliser bash"
+  echo "no ksh ... we will use bash"
   use_shell="bash"
   if [ "`which bash`" = "" ] ; then
-    echo "Il faut d\'abord installer ksh (ou bash)"
+    echo "ksh (or bash) needed!! Install it!"
   fi
 fi
@@ -164,5 +157,5 @@
 for logiciel in csh wget tar gzip make $compilo gcc ; do
 if [ "`which $logiciel`" = "" ] ; then
-echo Il faut installer d\'abord $logiciel
+echo You must first install $logiciel on your system
 exit
 fi
@@ -175,8 +168,8 @@
 end
 eod
-$compilo tt.f90
+$compilo tt.f90 -o a.out
 ./a.out >| tt
 if [ "`cat tt | sed -e 's/ //g' `" != "coucou" ] ; then
-echo probleme avec installation de $compilo ; exit ; fi
+echo problem installing with compiler $compilo ; exit ; fi
 \rm tt a.out tt.f90
 fi
@@ -189,5 +182,5 @@
 if [ $getlmdzor = 1 ] ; then
 echo '##########################################################'
-echo  On recupere une version un peu modifiee de LMDZ
+echo  Download a slightly modified version of  LMDZ
 echo '##########################################################'
 cd $MODEL
@@ -197,9 +190,8 @@
 \rm modipsl.$version.tar
 
-# On recupere en fait une version du 01 10 2006 obtenue
-# Par un cvs get
-# Puis modifiees pour etre compatible avec la compilation $compilo.
-# et pour betoner ORCHIDEE
-# Cette version est recuperable avec le script
+# We download LMDZ and make some modifications to make it
+#compatible with $compilo
+# and we use an old stable but robust and well tested version of ORCHIDEE
+# That version of ORCHIDEE can be obtained using
 # wget http://www.lmd.jussieu.fr/~lmdz/DistribG95/getlmdzor.x
 fi
@@ -209,5 +201,5 @@
 if [ $netcdf = 1 ] ; then
 echo '##########################################################'
-echo Compilation de netcdf
+echo Compiling the Netcdf library
 echo '##########################################################'
 cd $MODEL
@@ -221,5 +213,5 @@
 OPTIMNC=$OPTIM
 if [ $compilo = g95 ] ; then
-# On modifie les options de compilation
+# Set the appropriate compilation options
    export FC=g95
    export F90=g95
@@ -258,8 +250,8 @@
    export CXXFLAGS="-O2 -ip -fpic -mcmodel=large"
 else
-   echo Le compilateur $compilo pas prevu ; exit
+   echo unexpected compiler $compilo ; exit
 fi
 ## end of if [ $netcdf = 1 ]
-cd src
+#cd src
 
 ### Correction d'un petit probleme de netcdf
@@ -278,6 +270,6 @@
 echo OK2 ioipsl=$ioipsl
 echo '##########################################################'
-echo Installation de MODIPSL, la procedure d\'installation des
-echo modeles de l\'IPSL
+echo Installing MODIPSL, the installation package manager for the 
+echo IPSL models and tools
 echo '##########################################################'
 
@@ -316,5 +308,5 @@
 if [ "$use_shell" = "ksh" ] ; then
   if [ "$pclinux" = 1 ] ; then
-     ./ins_make -t g95 # On utilise les lignes g95 meme pour les autres compilo
+     ./ins_make -t g95 # We use lines for g95 even for the other compilers
   fi
 else # bash
@@ -322,5 +314,5 @@
   chmod u=rwx ins_make.bash
   if [ "$pclinux" = 1 ] ; then
-  ./ins_make.bash -t g95 # On utilise les lignes g95 meme pour les autres compilo
+  ./ins_make.bash -t g95 # We use lines for g95 even for the other compilers
   else
   ./ins_make.bash
@@ -329,5 +321,5 @@
 
 echo '##########################################################'
-echo Compilation de IOIPSL, bibliotheque d\'interface avec Netcd
+echo Compiling IOIPSL, the interface library with Netcdf
 echo '##########################################################'
 
@@ -367,9 +359,9 @@
 if [ "$veget" = 1 ] ; then
 echo '########################################################'
-echo Compilation de ORCHIDEE, modele des surface continentales
+echo Compiling ORCHIDEE, the continental surfaces model 
 echo '########################################################'
 cd $MODEL/modipsl/modeles/ORCHIDEE
 cd src_parameters
-# Une petite astuce pour ORCHIDEE suivant qu'on est en real*4 ou real*8
+# A trick to compile ORCHIDEE depending on if we are using real*4 or real*8
 
 
@@ -402,5 +394,5 @@
   if [[ -d $MODEL/modipsl/modeles/LMDZ5 ]] ; then
     echo '##########################################################'
-    echo 'Compilation de LMDZ5'
+    echo 'Compiling LMDZ5'
     echo '##########################################################'
     cd $MODEL/modipsl/modeles/LMDZ5
@@ -411,4 +403,11 @@
 fi
 
+##########################################################
+# Traitement momentanne a cause d'un bug dans makegcm
+cp create_make_gcm create_make_gcm.orig
+nl=`sed -n -e /PROGRAM/= create_make_gcm.orig | tail -1`
+sed -e "$nl s/      PROGRA/PROGRA/" create_make_gcm.orig >| create_make_gcm
+
+#mv -f tmp crea
 if [ "$pclinux" = 1 ] ; then
   if [ $compilo = gfortran ] ; then
@@ -423,4 +422,5 @@
 -e 's/-fno-second-underscore//' -e 's/-fstatic//' \
 -e 's/-lparallel//' \
+-e 's/-lnetcdff//g' \
 -e 's/-lorglob//' \
 -e 's/-ffixed-form//' -e 's/-ffree-form//' \
@@ -437,4 +437,5 @@
 -e 's/-fno-second-underscore//' -e 's/-fstatic//' \
 -e 's/-lparallel//' \
+-e 's/-lnetcdff//g' \
 -e 's/-lorglob//' \
 -e 's/-ffixed-form//' -e 's/-ffree-form//' \
@@ -449,4 +450,5 @@
 -e 's/-fno-second-underscore//' -e 's/-fstatic//' \
 -e 's/-lparallel//' \
+-e 's/-lnetcdff//g' \
 -e 's/-lorglob//' \
 -e 's/-ffixed-form//' -e 's/-ffree-form//' \
@@ -466,12 +468,12 @@
 
 ###########################################################
-# Pour ceux qui voudraient utiliser fcm et pouvoir faire :
+# For those who want to use fcm to compile via :
 #  makelmdz_fcm -arch local .....
 ############################################################
 
 if [ "$pclinux" = 1 ] ; then
-# creation de fichiers 'arch' locaux (si sur PC Linx):
+# create local 'arch' files (if on Linux PC):
 cd arch
-# fichier arch-local.path
+# arch-local.path file
 echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path
 echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path
@@ -480,5 +482,5 @@
 echo 'ORCH_INCDIR=$LMDGCM/../../lib' >> arch-local.path
 echo 'ORCH_LIBDIR=$LMDGCM/../../lib' >> arch-local.path
-# fichier arch-local.fcm (adaptation de arch-linux-32bit.fcm)
+# arch-local.fcm file (adapted from arch-linux-32bit.fcm)
 if [ $compilo = g95 ] ; then
 sed -e s:"%COMPILER            pgf95":"%COMPILER            g95":1 \
@@ -527,13 +529,13 @@
    fi
 else
-   echo Le compilateur $compilo pas prevu ; exit
+   echo Unexpected compiler $compilo ; exit
 fi # of if [ $compilo = g95 ] elif [ $compilo = pgf90 ]
 cd ..
-### Adaptation de "bld.cfg" (ajout du shell):
+### Adapt "bld.cfg" (add the shell):
 whereisthatshell=$(which ${use_shell})
 echo "bld::tool::SHELL   $whereisthatshell" >> bld.cfg
 
-### Modification de makelmdz_fcm pour utilisation de ORCHIDEE dans cette bench:
-### on enleve liborglob.a et libparallel.a
+### Modify makelmdz_fcm to use ORCHIDEE in the bench:
+### remove liborglob.a and libparallel.a
 cp makelmdz_fcm makelmdz_fcm.orig
 sed -e "s/-l\${LIBPREFIX}parallel//" \
@@ -544,13 +546,13 @@
 
 ##################################################################
-# Lance compilation de LMDZ
+# Compile LMDZ
 ##################################################################
 ok_veget=false
-if [ "$veget" = 1 ] ; then ok_veget = true; fi
+if [ "$veget" = 1 ] ; then $ok_veget = true; fi
 if [ $compile_with_fcm = 1 ] ; then
-# Compilation avec makelmdz_fcm
+# Compile with makelmdz_fcm
 	./makelmdz_fcm -d ${grid_resolution} -arch local -v $ok_veget gcm
 else
-# Compilation avec makegcm:
+# Comple with makegcm:
 #       3 times! because some dependecies are not well resolved with makegcm
 	./makegcm -d ${grid_resolution} -v $ok_veget gcm
@@ -561,13 +563,13 @@
 if [ -f gcm.e ] || [ -f bin/gcm_${grid_resolution}_phylmd_seq_orch.e ] || [ -f bin/gcm_${grid_resolution}_phylmd_seq.e ]  ; then
 echo '##########################################################'
-echo Compilation reussie
-echo '##########################################################'
-else
-echo Probleme de compilation
+echo Compilation successfull !!
+echo '##########################################################'
+else
+echo Compilation failed !!
 exit
 fi
 
 ##################################################################
-# Ci dessous le lancement eventuel d'un cas test (si bench=0)
+# Below, we run a benchmark test (if bench=0)
 ##################################################################
 if [ $bench = 0 ] ; then
@@ -576,5 +578,5 @@
 
 echo '##########################################################'
-echo Lancement d\'une simulation de test
+echo Running a test run
 echo '##########################################################'
 
@@ -597,7 +599,7 @@
 
 if [ $hostname = brodie ] ; then
-echo POUR LANCER LE BENCH, IL FAUT SE LOGUER SUR BRODIE01
-echo puis aller sur `pwd`/BENCH${grid_resolution}
-echo et lancer le gcm
+echo to run the bench, you must log on to Brodie01
+echo and then change directory to `pwd`/BENCH${grid_resolution}
+echo and run the gcm
 exit
 fi
@@ -607,5 +609,5 @@
 
 echo '##########################################################'
-echo ' Resultat du bench '
+echo ' Bench results '
 echo '##########################################################'
 
@@ -613,7 +615,7 @@
 
 echo '##########################################################'
-echo 'La simulation test est terminee sur' `pwd`
-echo 'vous pouvez la relancer : cd ' `pwd` ' ; gcm.e'
-echo 'ou ./bench.sh'
-echo '##########################################################'
-
+echo 'Simulation finished in' `pwd`
+echo 'You may re-run it with : cd ' `pwd` ' ; gcm.e'
+echo 'or ./bench.sh'
+echo '##########################################################'
+
