Index: trunk/LMDZ.COMMON/ioipsl/README
===================================================================
--- trunk/LMDZ.COMMON/ioipsl/README	(revision 456)
+++ trunk/LMDZ.COMMON/ioipsl/README	(revision 456)
@@ -0,0 +1,19 @@
+Scripts in this directory are illustrative examples of how to
+obtain and install IOIPSL:
+1) install_ioipsl_gnome.bash: everything is set for Gnome, just run:
+./install_ioipsl_gnome.bash
+And output modules and library will be in subdirectory 'modipsl/lib'
+
+2) install_ioipsl_gfortran.bash and install_ioipsl_pgf90.bash are more
+general examples for installing IOIPSL on a machine with either compiler.
+Note that the paths to the NetCDF library hard coded in the scripts 
+will surely need to be adapted to your local settings.
+Then simply execute the script; output modules
+and library will be in subdirectory 'modipsl/lib'
+
+Note that it is a good idea to install IOIPSL outside of the LMDZ tree
+so that its version can be tracked (and potentialy updated), as it is
+downloaded from a different svn repository.
+
+
+
Index: trunk/LMDZ.COMMON/ioipsl/compile_ioipsl.bash
===================================================================
--- trunk/LMDZ.COMMON/ioipsl/compile_ioipsl.bash	(revision 140)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#!/bin/bash
-#
-# Aymeric: pour construire IOIPSL [adapte de get_lmdz_ciclad_pgf90.bash]
-#
-
-# ADVICE: copy the [GCMdir]/LMDZ.COMMON/ioipsl directory 
-# to [GCMdir]/ioipsl to get it out of svn
-# then go to [GCMdir]/ioipsl before doing all the following commands.
-
-rm -rf lib
-mkdir lib
-mkdir modeles
-
-### 1. Get IOIPSL (via modipsl) and compile it
-cd util
-## get IOIPSL
-./model IOIPSL
-
-## 2. Set correct settings
-# modify path to netcdf in 'AA_make.gdef'
-cp AA_make.gdef AA_make.gdef.old
-sed -e s:"linux    NCDF_INC = /distrib/local/netcdf/pgf/include/":"linux    NCDF_INC = /opt/netcdf/pgf/include/":1 \
-    -e s:"linux    NCDF_LIB = -L/distrib/local/netcdf/pgf/lib/":"linux    NCDF_LIB = -L/opt/netcdf/pgf/lib/":1 \
-    AA_make.gdef.old > AA_make.gdef
-ins_make -t linux -p I4R8
-## 3. build ioipsl:
-cd ../modeles/IOIPSL/src
-make
-
-rm -rf modeles
-
-exit
Index: trunk/LMDZ.COMMON/ioipsl/compile_ioipsl_gnome.bash
===================================================================
--- trunk/LMDZ.COMMON/ioipsl/compile_ioipsl_gnome.bash	(revision 140)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#!/bin/bash
-#
-# Aymeric: pour construire IOIPSL [adapte de get_lmdz_ciclad_pgf90.bash]
-#
-
-# ADVICE: copy the [GCMdir]/LMDZ.COMMON/ioipsl directory 
-# to [GCMdir]/ioipsl to get it out of svn
-# then go to [GCMdir]/ioipsl before doing all the following commands.
-
-rm -rf lib
-mkdir lib
-mkdir modeles
-
-### 1. Get IOIPSL (via modipsl) and compile it
-cd util
-## get IOIPSL
-./model IOIPSL
-
-## 2. Set correct settings
-# add a "gnome" configuration to AA_make.gdef
-echo "#-Q- gnome  #- Global definitions for Idataplex (gnome) at UPMC, ifort" >> AA_make.gdef
-echo "#-Q- gnome  M_K = make" >> AA_make.gdef
-echo "#-Q- gnome  P_C = cpp" >> AA_make.gdef
-echo '#-Q- gnome  P_O = -P -C $(P_P)' >> AA_make.gdef
-echo "#-Q- gnome  F_C = ifort -c" >> AA_make.gdef
-echo "#-Q- gnome  #-D- MD    F_D = -g" >> AA_make.gdef
-echo "#-Q- gnome  #-D- MN    F_D =" >> AA_make.gdef
-echo "#-Q- gnome  #-P- I4R4  F_P = -integer-size 32" >> AA_make.gdef
-echo "#-Q- gnome  #-P- I4R8  F_P = -integer-size 32 -real-size 64" >> AA_make.gdef
-echo "#-Q- gnome  #-P- I8R8  F_P = -integer-size 64 -real-size 64" >> AA_make.gdef
-echo '#-Q- gnome  F_O = -O $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)' >> AA_make.gdef
-echo "#-Q- gnome  F_L = ifort" >> AA_make.gdef
-echo "#-Q- gnome  M_M = 0" >> AA_make.gdef
-echo "#-Q- gnome  L_X = 0" >> AA_make.gdef
-echo "#-Q- gnome  L_O =" >> AA_make.gdef
-echo "#-Q- gnome  A_C = ar -r" >> AA_make.gdef
-echo "#-Q- gnome  A_G = ar -x" >> AA_make.gdef
-echo "#-Q- gnome  C_C = icc -c" >> AA_make.gdef
-echo "#-Q- gnome  C_O =" >> AA_make.gdef
-echo "#-Q- gnome  C_L = icc" >> AA_make.gdef
-echo "#-Q- gnome  #-" >> AA_make.gdef
-echo "#-Q- gnome  NCDF_INC = /usr/local/include" >> AA_make.gdef
-echo "#-Q- gnome  NCDF_LIB = -L/usr/local/lib -lnetcdf" >> AA_make.gdef
-echo "#-Q- gnome  #-" >> AA_make.gdef
-
-ins_make -t gnome -p I4R8
-
-## 3. build ioipsl:
-cd ../modeles/IOIPSL/src
-make
-
-rm -rf modeles
-
-exit
Index: trunk/LMDZ.COMMON/ioipsl/install_ioipsl_gfortan.bash
===================================================================
--- trunk/LMDZ.COMMON/ioipsl/install_ioipsl_gfortan.bash	(revision 456)
+++ trunk/LMDZ.COMMON/ioipsl/install_ioipsl_gfortan.bash	(revision 456)
@@ -0,0 +1,40 @@
+#!/bin/bash
+# script to download and install the latest version of IOIPSL
+# using gfortran
+# You'll probably have to change paths to NetCDF library 'lib' and 'include'
+# below to adapt this script to your computer.
+
+#0. Preliminary stuff 
+# netcdf include and lib dirs:
+netcdf_include="/donnees/emlmd/netcdf64-4.0.1_gfortran/include"
+netcdf_lib="/donnees/emlmd/netcdf64-4.0.1_gfortran/lib"
+
+whereami=`pwd -P`
+
+# 1. Get IOIPSL (via modipsl)
+svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl
+cd modipsl/util
+
+./model IOIPSL
+
+# 2. Set correct settings:
+# modify path to netcdf in 'AA_make.gdef'
+cp AA_make.gdef AA_make.gdef.old
+sed -e s:"gfortran  NCDF_INC = /usr/local/include":"gfortran  NCDF_INC = ${netcdf_include}":1 \
+    -e s:"gfortran  NCDF_LIB = -L/usr/local/lib":"gfortran  NCDF_LIB = -L${netcdf_lib}":1 \
+    AA_make.gdef.old > AA_make.gdef
+
+# set default working precision for IOIPSL:
+./ins_make -t gfortran -p I4R8
+
+## 3. build ioipsl:
+cd ../modeles/IOIPSL/src
+make
+
+if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 
+  then
+  echo "OK: ioipsl library is in ${whereami}/modipsl/lib"
+else
+  echo "Something went wrong..."
+fi
+
Index: trunk/LMDZ.COMMON/ioipsl/install_ioipsl_gnome.bash
===================================================================
--- trunk/LMDZ.COMMON/ioipsl/install_ioipsl_gnome.bash	(revision 456)
+++ trunk/LMDZ.COMMON/ioipsl/install_ioipsl_gnome.bash	(revision 456)
@@ -0,0 +1,54 @@
+#!/bin/bash
+# script to download and install the latest version of IOIPSL on Gnome
+#
+
+#0. Preliminary stuff 
+
+whereami=`pwd -P`
+
+# 1. Get IOIPSL (via modipsl)
+svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl
+cd modipsl/util
+
+./model IOIPSL
+
+# 2. Set correct settings:
+# add a "gnome" configuration to AA_make.gdef
+echo "#-Q- gnome  #- Global definitions for Idataplex (gnome) at UPMC, ifort" >> AA_make.gdef
+echo "#-Q- gnome  M_K = make" >> AA_make.gdef
+echo "#-Q- gnome  P_C = cpp" >> AA_make.gdef
+echo '#-Q- gnome  P_O = -P -C $(P_P)' >> AA_make.gdef
+echo "#-Q- gnome  F_C = ifort -c" >> AA_make.gdef
+echo "#-Q- gnome  #-D- MD    F_D = -g" >> AA_make.gdef
+echo "#-Q- gnome  #-D- MN    F_D =" >> AA_make.gdef
+echo "#-Q- gnome  #-P- I4R4  F_P = -integer-size 32" >> AA_make.gdef
+echo "#-Q- gnome  #-P- I4R8  F_P = -integer-size 32 -real-size 64" >> AA_make.gdef
+echo "#-Q- gnome  #-P- I8R8  F_P = -integer-size 64 -real-size 64" >> AA_make.gdef
+echo '#-Q- gnome  F_O = -O $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)' >> AA_make.gdef
+echo "#-Q- gnome  F_L = ifort" >> AA_make.gdef
+echo "#-Q- gnome  M_M = 0" >> AA_make.gdef
+echo "#-Q- gnome  L_X = 0" >> AA_make.gdef
+echo "#-Q- gnome  L_O =" >> AA_make.gdef
+echo "#-Q- gnome  A_C = ar -r" >> AA_make.gdef
+echo "#-Q- gnome  A_G = ar -x" >> AA_make.gdef
+echo "#-Q- gnome  C_C = icc -c" >> AA_make.gdef
+echo "#-Q- gnome  C_O =" >> AA_make.gdef
+echo "#-Q- gnome  C_L = icc" >> AA_make.gdef
+echo "#-Q- gnome  #-" >> AA_make.gdef
+echo "#-Q- gnome  NCDF_INC = /usr/local/include" >> AA_make.gdef
+echo "#-Q- gnome  NCDF_LIB = -L/usr/local/lib -lnetcdf" >> AA_make.gdef
+echo "#-Q- gnome  #-" >> AA_make.gdef
+
+# set default working precision for IOIPSL:
+./ins_make -t gnome -p I4R8
+
+## 3. build ioipsl:
+cd ../modeles/IOIPSL/src
+make
+
+if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 
+  then
+  echo "OK: ioipsl library is in ${whereami}/modipsl/lib"
+else
+  echo "Something went wrong..."
+fi
Index: trunk/LMDZ.COMMON/ioipsl/install_ioipsl_pgf90.bash
===================================================================
--- trunk/LMDZ.COMMON/ioipsl/install_ioipsl_pgf90.bash	(revision 456)
+++ trunk/LMDZ.COMMON/ioipsl/install_ioipsl_pgf90.bash	(revision 456)
@@ -0,0 +1,40 @@
+#!/bin/bash
+# script to download and install the latest version of IOIPSL
+# using pgf90
+# You'll probably have to change paths to NetCDF library 'lib' and 'include'
+# below to adapt this script to your computer.
+
+#0. Preliminary stuff 
+# netcdf include and lib dirs:
+netcdf_include="/donnees/emlmd/netcdf64-4.0.1_pgi/include"
+netcdf_lib="/donnees/emlmd/netcdf64-4.0.1_pgi/lib"
+
+whereami=`pwd -P`
+
+# 1. Get IOIPSL (via modipsl)
+svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl
+cd modipsl/util
+
+./model IOIPSL
+
+# 2. Set correct settings:
+# modify path to netcdf in 'AA_make.gdef'
+cp AA_make.gdef AA_make.gdef.old
+sed -e s:"linux    NCDF_INC = /distrib/local/netcdf/pgf/include/":"linux    NCDF_INC = ${netcdf_include}":1 \
+    -e s:"linux    NCDF_LIB = -L/distrib/local/netcdf/pgf/lib/":"linux    NCDF_LIB = -L${netcdf_lib}":1 \
+    AA_make.gdef.old > AA_make.gdef
+
+# set default working precision for IOIPSL:
+./ins_make -t linux -p I4R8
+
+## 3. build ioipsl:
+cd ../modeles/IOIPSL/src
+make
+
+if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 
+  then
+  echo "OK: ioipsl library is in ${whereami}/modipsl/lib"
+else
+  echo "Something went wrong..."
+fi
+
