Index: LMDZ4/branches/LMDZ4-dev/arch/arch-AMD64_CICLAD.path
===================================================================
--- LMDZ4/branches/LMDZ4-dev/arch/arch-AMD64_CICLAD.path	(revision 1196)
+++ LMDZ4/branches/LMDZ4-dev/arch/arch-AMD64_CICLAD.path	(revision 1197)
@@ -1,10 +1,10 @@
-set NETCDF_LIBDIR=/opt/netcdf/pgf/lib
-set NETCDF_INCDIR=/opt/netcdf/pgf/include
-set IOIPSL_INCDIR=$LMDGCM/../../lib
-set IOIPSL_LIBDIR=$LMDGCM/../../lib
-set ORCH_INCDIR=$LMDGCM/../../lib
-set ORCH_LIBDIR=$LMDGCM/../../lib
-set OASIS_INCDIR=$LMDGCM/../../prism/SX/build/lib/psmile.$couple
-set OASIS_LIBDIR=$LMDGCM/../../prism/SX/lib
-set INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
-set INCA_INCDIR=$LMDGCM/../INCA3/config/lib
+NETCDF_LIBDIR=/opt/netcdf/pgf/lib
+NETCDF_INCDIR=/opt/netcdf/pgf/include
+IOIPSL_INCDIR=$LMDGCM/../../lib
+IOIPSL_LIBDIR=$LMDGCM/../../lib
+ORCH_INCDIR=$LMDGCM/../../lib
+ORCH_LIBDIR=$LMDGCM/../../lib
+OASIS_INCDIR=$LMDGCM/../../prism/SX/build/lib/psmile.$couple
+OASIS_LIBDIR=$LMDGCM/../../prism/SX/lib
+INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
+INCA_INCDIR=$LMDGCM/../INCA3/config/lib
Index: LMDZ4/branches/LMDZ4-dev/arch/arch-ES_MOON.path
===================================================================
--- LMDZ4/branches/LMDZ4-dev/arch/arch-ES_MOON.path	(revision 1196)
+++ LMDZ4/branches/LMDZ4-dev/arch/arch-ES_MOON.path	(revision 1197)
@@ -1,11 +1,11 @@
-set NETCDF_LIBDIR=/S/home010/c0010/ES/lib
-set NETCDF_INCDIR=/S/home010/c0010/ES/include
-set IOIPSL_INCDIR=$LMDGCM/../../lib
-set IOIPSL_LIBDIR=$LMDGCM/../../lib
-set ORCH_INCDIR=$LMDGCM/../../lib
-set ORCH_LIBDIR=$LMDGCM/../../lib
-set OASIS_INCDIR=$LMDGCM/../../prism/ES/build/lib/psmile.$couple
-set OASIS_LIBDIR=$LMDGCM/../../prism/ES/lib
-set INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
-set INCA_INCDIR=$LMDGCM/../INCA3/config/lib
-set LIBPREFIX=sx
+NETCDF_LIBDIR=/S/home010/c0010/ES/lib
+NETCDF_INCDIR=/S/home010/c0010/ES/include
+IOIPSL_INCDIR=$LMDGCM/../../lib
+IOIPSL_LIBDIR=$LMDGCM/../../lib
+ORCH_INCDIR=$LMDGCM/../../lib
+ORCH_LIBDIR=$LMDGCM/../../lib
+OASIS_INCDIR=$LMDGCM/../../prism/ES/build/lib/psmile.$couple
+OASIS_LIBDIR=$LMDGCM/../../prism/ES/lib
+INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
+INCA_INCDIR=$LMDGCM/../INCA3/config/lib
+LIBPREFIX=sx
Index: LMDZ4/branches/LMDZ4-dev/arch/arch-IA64_PLATINE.path
===================================================================
--- LMDZ4/branches/LMDZ4-dev/arch/arch-IA64_PLATINE.path	(revision 1196)
+++ LMDZ4/branches/LMDZ4-dev/arch/arch-IA64_PLATINE.path	(revision 1197)
@@ -1,11 +1,11 @@
-set NETCDF_LIBDIR='/usr/lib -lnetcdff'
-set NETCDF_INCDIR=/usr/include
-set IOIPSL_INCDIR=$LMDGCM/../../lib
-set IOIPSL_LIBDIR=$LMDGCM/../../lib
-set ORCH_INCDIR=$LMDGCM/../../lib
-set ORCH_LIBDIR=$LMDGCM/../../lib
-set OASIS_INCDIR=$LMDGCM/../../prism/IA64/build/lib/psmile.$couple
-set OASIS_LIBDIR=$LMDGCM/../../prism/IA64/lib
-set INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
-set INCA_INCDIR=$LMDGCM/../INCA3/config/lib
+NETCDF_LIBDIR='/usr/lib -lnetcdff'
+NETCDF_INCDIR=/usr/include
+IOIPSL_INCDIR=$LMDGCM/../../lib
+IOIPSL_LIBDIR=$LMDGCM/../../lib
+ORCH_INCDIR=$LMDGCM/../../lib
+ORCH_LIBDIR=$LMDGCM/../../lib
+OASIS_INCDIR=$LMDGCM/../../prism/IA64/build/lib/psmile.$couple
+OASIS_LIBDIR=$LMDGCM/../../prism/IA64/lib
+INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
+INCA_INCDIR=$LMDGCM/../INCA3/config/lib
 
Index: LMDZ4/branches/LMDZ4-dev/arch/arch-PW6_VARGAS.path
===================================================================
--- LMDZ4/branches/LMDZ4-dev/arch/arch-PW6_VARGAS.path	(revision 1196)
+++ LMDZ4/branches/LMDZ4-dev/arch/arch-PW6_VARGAS.path	(revision 1197)
@@ -1,10 +1,10 @@
-set NETCDF_LIBDIR=/usr/local/pub/NetCDF/3.6.3/lib
-set NETCDF_INCDIR=/usr/local/pub/NetCDF/3.6.3/include
-set IOIPSL_INCDIR=$LMDGCM/../../lib
-set IOIPSL_LIBDIR=$LMDGCM/../../lib
-set ORCH_INCDIR=$LMDGCM/../../lib
-set ORCH_LIBDIR=$LMDGCM/../../lib
-set OASIS_INCDIR=$LMDGCM/../../prism/AIX6/build/lib/psmile.$couple
-set OASIS_LIBDIR=$LMDGCM/../../prism/AIX6/lib
-set INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
-set INCA_INCDIR=$LMDGCM/../INCA3/config/lib
+NETCDF_LIBDIR=/usr/local/pub/NetCDF/3.6.3/lib
+NETCDF_INCDIR=/usr/local/pub/NetCDF/3.6.3/include
+IOIPSL_INCDIR=$LMDGCM/../../lib
+IOIPSL_LIBDIR=$LMDGCM/../../lib
+ORCH_INCDIR=$LMDGCM/../../lib
+ORCH_LIBDIR=$LMDGCM/../../lib
+OASIS_INCDIR=$LMDGCM/../../prism/AIX6/build/lib/psmile.$couple
+OASIS_LIBDIR=$LMDGCM/../../prism/AIX6/lib
+INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
+INCA_INCDIR=$LMDGCM/../INCA3/config/lib
Index: LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_BRODIE.fcm
===================================================================
--- LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_BRODIE.fcm	(revision 1196)
+++ LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_BRODIE.fcm	(revision 1197)
@@ -8,5 +8,5 @@
 %PROD_FFLAGS         -C vopt
 %DEV_FFLAGS          -C vsafe -gv -Wf,-init stack=nan,-init heap=nan
-%DEBUG_FFLAGS        -C debug -eC -Wf,-init stack=nan,-init heap=nan
+%DEBUG_FFLAGS        -C debug -eR -Wf,-init stack=nan,-init heap=nan
 %MPI_FFLAGS
 %OMP_FFLAGS          -P openmp
Index: LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_BRODIE.path
===================================================================
--- LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_BRODIE.path	(revision 1196)
+++ LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_BRODIE.path	(revision 1197)
@@ -1,10 +1,10 @@
-set NETCDF_LIBDIR=/SXlocal/pub/netCDF/3.6.1-openmp/lib
-set NETCDF_INCDIR=/SXlocal/pub/netCDF/3.6.1-openmp/include
-set IOIPSL_INCDIR=$LMDGCM/../../lib
-set IOIPSL_LIBDIR=$LMDGCM/../../lib
-set ORCH_INCDIR=$LMDGCM/../../lib
-set ORCH_LIBDIR=$LMDGCM/../../lib
-set OASIS_INCDIR=$LMDGCM/../../prism/SX/build/lib/psmile.$couple
-set OASIS_LIBDIR=$LMDGCM/../../prism/SX/lib
-set INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
-set INCA_INCDIR=$LMDGCM/../INCA3/config/lib
+NETCDF_LIBDIR=/SXlocal/pub/netCDF/3.6.1-openmp/lib
+NETCDF_INCDIR=/SXlocal/pub/netCDF/3.6.1-openmp/include
+IOIPSL_INCDIR=$LMDGCM/../../lib
+IOIPSL_LIBDIR=$LMDGCM/../../lib
+ORCH_INCDIR=$LMDGCM/../../lib
+ORCH_LIBDIR=$LMDGCM/../../lib
+OASIS_INCDIR=$LMDGCM/../../prism/SX/build/lib/psmile.$couple
+OASIS_LIBDIR=$LMDGCM/../../prism/SX/lib
+INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
+INCA_INCDIR=$LMDGCM/../INCA3/config/lib
Index: LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_MERCURE.path
===================================================================
--- LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_MERCURE.path	(revision 1196)
+++ LMDZ4/branches/LMDZ4-dev/arch/arch-SX8_MERCURE.path	(revision 1197)
@@ -1,10 +1,10 @@
-set NETCDF_LIBDIR=/usr/local/SX8/soft/netcdf/lib
-set NETCDF_INCDIR=/usr/local/SX8/soft/netcdf/include
-set IOIPSL_INCDIR=$LMDGCM/../../lib
-set IOIPSL_LIBDIR=$LMDGCM/../../lib
-set ORCH_INCDIR=$LMDGCM/../../lib
-set ORCH_LIBDIR=$LMDGCM/../../lib
-set OASIS_INCDIR=$LMDGCM/../../prism/SX/build/lib/psmile.$couple
-set OASIS_LIBDIR=$LMDGCM/../../prism/SX/lib
-set INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
-set INCA_INCDIR=$LMDGCM/../INCA3/config/lib
+NETCDF_LIBDIR=/usr/local/SX8/soft/netcdf/lib
+NETCDF_INCDIR=/usr/local/SX8/soft/netcdf/include
+IOIPSL_INCDIR=$LMDGCM/../../lib
+IOIPSL_LIBDIR=$LMDGCM/../../lib
+ORCH_INCDIR=$LMDGCM/../../lib
+ORCH_LIBDIR=$LMDGCM/../../lib
+OASIS_INCDIR=$LMDGCM/../../prism/SX/build/lib/psmile.$couple
+OASIS_LIBDIR=$LMDGCM/../../prism/SX/lib
+INCA_LIBDIR=$LMDGCM/../INCA3/config/lib
+INCA_INCDIR=$LMDGCM/../INCA3/config/lib
Index: LMDZ4/branches/LMDZ4-dev/arch/arch-linux-32bit.path
===================================================================
--- LMDZ4/branches/LMDZ4-dev/arch/arch-linux-32bit.path	(revision 1196)
+++ LMDZ4/branches/LMDZ4-dev/arch/arch-linux-32bit.path	(revision 1197)
@@ -1,6 +1,6 @@
-set NETCDF_LIBDIR=/distrib/local/netcdf/pgi_32bits/lib/
-set NETCDF_INCDIR=/distrib/local/netcdf/pgi_32bits/include
-set IOIPSL_INCDIR=/u/fairhead/modipsl_ioipsl_3/lib
-set IOIPSL_LIBDIR=/u/fairhead/modipsl_ioipsl_3/lib
-set ORCH_INCDIR=/u/fairhead/modipsl_ioipsl_3/lib
-set ORCH_LIBDIR=/u/fairhead/modipsl_ioipsl_3/lib
+NETCDF_LIBDIR=/usr/local/netcdf-pgi/lib
+NETCDF_INCDIR=/usr/local/netcdf-pgi/include
+IOIPSL_INCDIR=/usr/local/guez/modipsl/lib
+IOIPSL_LIBDIR=/usr/local/guez/modipsl/lib
+ORCH_INCDIR=/u/fairhead/modipsl_ioipsl_3/lib
+ORCH_LIBDIR=/u/fairhead/modipsl_ioipsl_3/lib
Index: LMDZ4/branches/LMDZ4-dev/makelmdz_fcm
===================================================================
--- LMDZ4/branches/LMDZ4-dev/makelmdz_fcm	(revision 1196)
+++ LMDZ4/branches/LMDZ4-dev/makelmdz_fcm	(revision 1197)
@@ -1,6 +1,5 @@
-#!/bin/csh
-#
 # $Header$
-#
+# This is a script in Bash.
+
 # FH : on ne crée plus le fichier arch.mk qui est supposé exister par
 # FH : ailleurs.
@@ -11,25 +10,25 @@
 # FH : arch.mk en lançant une première fois makegcm.
 #
-set verbose echo
+##set -x
 ########################################################################
 # options par defaut pour la commande make
 ########################################################################
 
-set dim="96x72x19"
-set physique=lmd
-set filtre=filtrez
-set grille=reg
-set couple=false
-set veget=false
-set chimie=false
-set parallel=none
-set compil_mod=prod
-set io=ioipsl
-set LIBPREFIX=""
-set fcm_path=none
-
-set LMDGCM=`/bin/pwd`
-set LIBOGCM=$LMDGCM/libo
-set LIBFGCM=$LMDGCM/libf
+dim="96x72x19"
+physique=lmd
+filtre=filtrez
+grille=reg
+couple=false
+veget=false
+chimie=false
+parallel=none
+compil_mod=prod
+io=ioipsl
+LIBPREFIX=""
+fcm_path=none
+
+LMDGCM=`/bin/pwd`
+LIBOGCM=$LMDGCM/libo
+LIBFGCM=$LMDGCM/libf
 
 ########################################################################
@@ -37,11 +36,11 @@
 ########################################################################
 
-set CPP_KEY="" 
-set INCLUDE=""
-set LIB=""
-set adjnt=""
-set COMPIL_FFLAGS="%PROD_FFLAGS"
-set PARA_FFLAGS=""
-set PARA_LD=""
+CPP_KEY="" 
+INCLUDE=""
+LIB=""
+adjnt=""
+COMPIL_FFLAGS="%PROD_FFLAGS"
+PARA_FFLAGS=""
+PARA_LD=""
 
 ########################################################################
@@ -49,10 +48,8 @@
 ########################################################################
 
-top:
-if ($#argv > 0) then
-    switch ($1:q)
-
-    case -h:
-cat <<fin
+while (($# > 0))
+  do
+  case $1 in
+      "-h") cat <<fin
 manuel complet sur http://...
 Usage :
@@ -77,79 +74,79 @@
  exec                      : exÃ©cutable gÃ©nÃ©rÃ©
 fin
-	exit
-
-    case -d:
-        set dim=$2 ; shift ; shift ; goto top
-                        
-    case -O:
-        echo "option obsolete dans cette version intermediaire de makegcm"
-	exit
-
-     case -p
-        set physique="$2" ;  shift ; shift ; goto top
-
-     case -g
-        set grille="$2" ; shift ; shift ; goto top
-
-     case -c
-	set couple="$2" ; shift ; shift ; goto top
-
-     case -prod
-        set compil_mod="prod" ; shift ; goto top
-
-     case -dev
-       set compil_mod="dev" ; shift ; goto top
-
-     case -debug
-       set compil_mod="debug" ; shift ; goto top
-
-     case -io
-        set io="$2" ; shift ; shift ; goto top
-
-     case -v
-        set veget="$2" ; shift ; shift ; goto top
-
-     case -chimie
-	set chimie="$2" ; shift ; shift ; goto top
-
-     case -parallel
-        set parallel="$2" ; shift ; shift ; goto top
-  
-     case -include
-        set INCLUDE="$INCLUDE -I$2" ; shift ; shift ; goto top
-
-     case -cpp
-        set CPP_KEY="$CPP_KEY $2" ; shift ; shift ; goto top
-
-     case -adjnt
-	echo 'otpion a reactiver ';exit
-        set opt_dep="$opt_dep adjnt" ; set adjnt="-ladjnt -ldyn3d "
-        set optim="$optim -Dadj" ; shift ; goto top
-
-
-     case -filtre
-        set filtre=$2 ; shift ; shift ; goto top
-
-     case -link
-        set LIB="$LIB $2" ; shift ; shift ; goto top
-
-     case -fcm_path
-       set fcm_path=$2 ; shift ; shift ; goto top
-
-     case -arch
-       set arch=$2 ; shift ; shift ; goto top
-
-     default
-        set code="$1" ; shift ; goto top
-
-   endsw
-endif
+	  exit;;
+
+      "-d")
+	  dim=$2 ; shift ; shift ;;
+      
+      "-O")
+	  echo "option obsolete dans cette version intermediaire de makegcm"
+	  exit;;
+
+      "-p")
+	  physique="$2" ;  shift ; shift ;;
+
+      "-g")
+	  grille="$2" ; shift ; shift ;;
+
+      "-c")
+	  couple="$2" ; shift ; shift ;;
+
+      "-prod")
+	  compil_mod="prod" ; shift ;;
+
+      "-dev")
+	  compil_mod="dev" ; shift ;;
+
+      "-debug")
+	  compil_mod="debug" ; shift ;;
+
+      "-io")
+	  io="$2" ; shift ; shift ;;
+
+      "-v")
+	  veget="$2" ; shift ; shift ;;
+
+      "-chimie")
+	  chimie="$2" ; shift ; shift ;;
+
+      "-parallel")
+	  parallel="$2" ; shift ; shift ;;
+      
+      "-include")
+	  INCLUDE="$INCLUDE -I$2" ; shift ; shift ;;
+
+      "-cpp")
+	  CPP_KEY="$CPP_KEY $2" ; shift ; shift ;;
+
+      "-adjnt")
+	  echo "otpion a reactiver ";exit
+	  opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d "
+	  optim="$optim -Dadj" ; shift ;;
+
+
+      "-filtre")
+	  filtre=$2 ; shift ; shift ;;
+
+      "-link")
+	  LIB="$LIB $2" ; shift ; shift ;;
+
+      "-fcm_path")
+	  fcm_path=$2 ; shift ; shift ;;
+
+      "-arch")
+	  arch=$2 ; shift ; shift ;;
+
+      *)
+	  code="$1" ; shift ;;
+  esac
+done
 
 ###############################################################
 # mettre le chemin du fcm dans le path
 ###############################################################
-if  ( "$fcm_path" != 'none' ) then
-    setenv PATH ${fcm_path}:${PATH}
-endif
+if  [[ "$fcm_path" != "none" ]]
+then
+    export PATH=${fcm_path}:${PATH}
+fi
 
 echo "Chemin du fcm utlise :" 
@@ -169,67 +166,77 @@
 ########################################################################
 
-if ( "$compil_mod" == 'prod' ) then
-  set COMPIL_FFLAGS="%PROD_FFLAGS"
-else if ( "$compil_mod" == 'dev' ) then
-  set COMPIL_FFLAGS="%DEV_FFLAGS"
-else if ( "$compil_mod" == 'debug' ) then
-  set COMPIL_FFLAGS="%DEBUG_FFLAGS"
-endif
-
-if ( "$physique" == 'nophys' ) then
-   
-else
+if [[ "$compil_mod" == "prod" ]]
+then
+  COMPIL_FFLAGS="%PROD_FFLAGS"
+elif [[ "$compil_mod" == "dev" ]]
+then
+  COMPIL_FFLAGS="%DEV_FFLAGS"
+elif [[ "$compil_mod" == "debug" ]]
+then
+  COMPIL_FFLAGS="%DEBUG_FFLAGS"
+fi
+
+if [[ "$physique" != "nophys" ]]
+then
    #Default planet type is Earth
-   set CPP_KEY="$CPP_KEY CPP_EARTH"
-endif
-
-if ( "$chimie" == 'INCA' ) then
-   set CPP_KEY="$CPP_KEY INCA"
-   set INCLUDE="$INCLUDE -I${INCA_INCDIR}"
-   set LIB="$LIB -L${INCA_LIBDIR} -lchimie"
-endif
-
-if ( "$couple" != 'false' ) then
-   set CPP_KEY="$CPP_KEY CPP_COUPLE"
-   set INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
-   set LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io"
-endif
-
-if ( "$parallel" == 'mpi' ) then
-   set CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI"
-   set PARA_FFLAGS="%MPI_FFLAGS"
-   set PARA_LD="%MPI_LD"
-else if ("$parallel" == 'omp' ) then
-   set CPP_KEY="$CPP_KEY CPP_PARA CPP_OMP"
-   set PARA_FFLAGS="%OMP_FFLAGS"
-   set PARA_LD="%OMP_LD"
-else if ("$parallel" == 'mpi_omp' ) then
-   set CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI CPP_OMP"
-   set PARA_FFLAGS="%MPI_FFLAGS %OMP_FFLAGS"
-   set PARA_LD="%MPI_LD %OMP_LD"
-endif
-
-if ( ( "$parallel" == 'omp' || "$parallel" == 'mpi_omp' ) \
-   && ( "$compil_mod" == 'debug' ) ) then
-    echo 'Usually, parallelization with OpenMP requires some optimization.'
-    echo 'We suggest switching to "-dev".'
+   CPP_KEY="$CPP_KEY CPP_EARTH"
+fi
+
+if [[ "$chimie" == "INCA" ]]
+then
+   CPP_KEY="$CPP_KEY INCA"
+   INCLUDE="$INCLUDE -I${INCA_INCDIR}"
+   LIB="$LIB -L${INCA_LIBDIR} -lchimie"
+fi
+
+if [[ "$couple" != "false" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_COUPLE"
+   INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
+   LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io"
+fi
+
+if [[ "$parallel" == "mpi" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI"
+   PARA_FFLAGS="%MPI_FFLAGS"
+   PARA_LD="%MPI_LD"
+elif [[ "$parallel" == "omp" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_PARA CPP_OMP"
+   PARA_FFLAGS="%OMP_FFLAGS"
+   PARA_LD="%OMP_LD"
+elif [[ "$parallel" == "mpi_omp" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_PARA CPP_MPI CPP_OMP"
+   PARA_FFLAGS="%MPI_FFLAGS %OMP_FFLAGS"
+   PARA_LD="%MPI_LD %OMP_LD"
+fi
+
+if [[ ( "$parallel" == "omp" || "$parallel" == "mpi_omp" ) \
+   && "$compil_mod" == "debug" ]]
+then
+    echo "Usually, parallelization with OpenMP requires some optimization."
+    echo "We suggest switching to \"-dev\"."
     exit 1
-    ##set COMPIL_FFLAGS="%DEV_FFLAGS"
-endif
-
-if ( "$veget" == 'true' ) then
-   set CPP_KEY="$CPP_KEY CPP_VEGET"
-   set INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
-   set LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
-endif
-
-if ( $io == ioipsl ) then
-   set CPP_KEY="$CPP_KEY CPP_IOIPSL"
-   set INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
-   set LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
-endif
-
-set INCLUDE="$INCLUDE -I${NETCDF_INCDIR}"
-set LIB="$LIB -L${NETCDF_LIBDIR} -lnetcdf"
+    ##COMPIL_FFLAGS="%DEV_FFLAGS"
+fi
+
+if [[ "$veget" == "true" ]]
+then
+   CPP_KEY="$CPP_KEY CPP_VEGET"
+   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
+   LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
+fi
+
+if [[ $io == ioipsl ]]
+then
+   CPP_KEY="$CPP_KEY CPP_IOIPSL"
+   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
+   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
+fi
+
+INCLUDE="$INCLUDE -I${NETCDF_INCDIR}"
+LIB="$LIB -L${NETCDF_LIBDIR} -lnetcdf"
 
 ########################################################################
@@ -238,7 +245,7 @@
 
 
-set dim_full=$dim
-set dim=`echo $dim | sed -e 's/[^0-9]/ /g'` 
-set dimc=`echo $dim | wc -w`
+dim_full=$dim
+dim=`echo $dim | sed -e 's/[^0-9]/ /g'` 
+dimc=`echo $dim | wc -w`
 
 echo calcul de la dimension
@@ -262,17 +269,16 @@
 ########################################################################
 
-set dimension=`echo $dim | wc -w`
+dimension=`echo $dim | wc -w`
 echo dimension $dimension
 
-if ( $dimension != 3 ) then
-  echo "Probleme dans les dimensions de la dynamique !!"
-  echo "Non reactive pour l'instant !!!"
-endif
-
-if ( $dimension == 3 ) then
+if (( $dimension == 3 ))
+then
   cd $LIBFGCM/grid
   \rm fxyprim.h
   cp -p fxy_${grille}.h fxyprim.h
-endif
+else
+  echo "Probleme dans les dimensions de la dynamique !!"
+  echo "Non reactive pour l'instant !!!"
+fi
 
 ######################################################################
@@ -281,6 +287,8 @@
 ######################################################################
 
-#if ( -f $libf/phy$physique/raddim.h ) then
-# if ( -f $libf/phy$physique/raddim.$dimh.h ) then
+#if [[ -f $libf/phy$physique/raddim.h ]]
+#then
+# if [[ -f $libf/phy$physique/raddim.$dimh.h ]]
+#then
 #  \rm -f $libf/phy$physique/raddim.h
 #  cp -p $libf/phy$physique/raddim.$dimh.h $libf/phy$physique/raddim.h
@@ -291,6 +299,6 @@
 #  echo le fichier $libf/phy$physique/raddim.$dimh.h
 #  \cp -p $libf/phy$physique/raddim.defaut.h $libf/phy$physique/raddim.h
-# endif
-#endif
+# fi
+#fi
 
 ######################################################################
@@ -298,9 +306,10 @@
 ######################################################################
 
-if ( `expr $dimc \> 2` == 1 ) then
-   set filtre="FILTRE=$filtre"
+if (( `expr $dimc \> 2` == 1 ))
+then
+   filtre="FILTRE=$filtre"
 else
-   set filtre="FILTRE= L_FILTRE= "
-endif
+   filtre="FILTRE= L_FILTRE= "
+fi
 echo MACRO FILTRE $filtre
 
@@ -314,29 +323,33 @@
 
 
-set SUFF_NAME=_${dim_full}
-set SUFF_NAME=${SUFF_NAME}_phy${physique}
-
-if ( "$parallel" != 'none' ) then
-  set SUFF_NAME=${SUFF_NAME}_para
-  set DYN=dyn${dimc}dpar
+SUFF_NAME=_${dim_full}
+SUFF_NAME=${SUFF_NAME}_phy${physique}
+
+if [[ "$parallel" != "none" ]]
+then
+  SUFF_NAME=${SUFF_NAME}_para
+  DYN=dyn${dimc}dpar
 else
-  set SUFF_NAME=${SUFF_NAME}_seq
-  set DYN=dyn${dimc}d
-endif
-
-if ( $veget == "true" ) then
-  set SUFF_NAME=${SUFF_NAME}_orch
-endif
-
-if ( $couple != "false" ) then
-  set SUFF_NAME=${SUFF_NAME}_couple
-endif
-
-if ( $chimie == 'INCA' ) then
-  set SUFF_NAME=${SUFF_NAME}_inca
-endif
+  SUFF_NAME=${SUFF_NAME}_seq
+  DYN=dyn${dimc}d
+fi
+
+if [[ $veget == "true" ]]
+then
+  SUFF_NAME=${SUFF_NAME}_orch
+fi
+
+if [[ $couple != "false" ]]
+then
+  SUFF_NAME=${SUFF_NAME}_couple
+fi
+
+if [[ $chimie == "INCA" ]]
+then
+  SUFF_NAME=${SUFF_NAME}_inca
+fi
 
 cd $LMDGCM
-set config_fcm="config.fcm"
+config_fcm="config.fcm"
 rm -f $config_fcm
 touch $config_fcm
