Index: trunk/LMDZ.COMMON/arch/arch-gfortran-para.path
===================================================================
--- trunk/LMDZ.COMMON/arch/arch-gfortran-para.path	(revision 3453)
+++ trunk/LMDZ.COMMON/arch/arch-gfortran-para.path	(revision 3454)
@@ -1,9 +1,7 @@
 ROOT=$PWD
 
-NETCDF_INC_DIR=${NETCDF_INC_DIR:-/usr/include} #define it in your environment
-NETCDF_LIB_DIR=${NETCDF_LIB_DIR:-/usr/lib/x86_64-linux-gnu} #define it in your environment
-NETCDF_INCDIR="-I $NETCDF_INC_DIR" 
-NETCDF_LIBDIR="-L $NETCDF_LIB_DIR"
-NETCDF_LIB="-lnetcdff -lnetcdf"
+NETCDF_INCDIR="$(nc-config --cflags) $(nc-config --fflags)"
+NETCDF_LIBDIR="$(nc-config --flibs) $(nc-config --libs)"
+NETCDF_LIB=""
 
 IOIPSL_INCDIR="-I$ROOT/ioipsl/modipsl/lib"
Index: trunk/LMDZ.COMMON/arch/arch-gfortran.path
===================================================================
--- trunk/LMDZ.COMMON/arch/arch-gfortran.path	(revision 3453)
+++ trunk/LMDZ.COMMON/arch/arch-gfortran.path	(revision 3454)
@@ -1,7 +1,7 @@
 ROOT=$PWD
 
-NETCDF_LIBDIR="-L$NETCDF/lib"
+NETCDF_INCDIR="$(nc-config --cflags) $(nc-config --fflags)"
+NETCDF_LIBDIR="$(nc-config --flibs) $(nc-config --libs)"
 NETCDF_LIB="-lnetcdf -lnetcdff"
-NETCDF_INCDIR="-I$NETCDF/include"
 
 IOIPSL_INCDIR="-I$ROOT/../IOIPSL/inc"
Index: trunk/LMDZ.COMMON/arch/arch-ifort_MESOIPSL.path
===================================================================
--- trunk/LMDZ.COMMON/arch/arch-ifort_MESOIPSL.path	(revision 3453)
+++ trunk/LMDZ.COMMON/arch/arch-ifort_MESOIPSL.path	(revision 3454)
@@ -2,6 +2,6 @@
 
 NETCDF_INCDIR="$(nc-config --cflags) $(nc-config --fflags)"
-NETCDF_LIBDIR="-L${NETCDF_FORTRAN_ROOT}/lib -L${NETCDF_C_ROOT}/lib "
-NETCDF_LIB="-lnetcdff -lnetcdf"
+NETCDF_LIBDIR="$(nc-config --flibs) $(nc-config --libs)"
+NETCDF_LIB=""
 
 IOIPSL_INCDIR="-I$ROOT/../IOIPSL/inc"
Index: trunk/LMDZ.COMMON/arch/arch-linux-64bit-para.path
===================================================================
--- trunk/LMDZ.COMMON/arch/arch-linux-64bit-para.path	(revision 3453)
+++ trunk/LMDZ.COMMON/arch/arch-linux-64bit-para.path	(revision 3454)
@@ -1,10 +1,10 @@
 ROOT=$PWD
 
-NETCDF_LIBDIR="-L/donnees/emlmd/netcdf64-4.0.1_ifort/lib""
-NETCDF_LIB="-lnetcdf"
-NETCDF_INCDIR="-I/donnees/emlmd/netcdf64-4.0.1_ifort/include"
+NETCDF_INCDIR="$(nc-config --cflags) $(nc-config --fflags)"
+NETCDF_LIBDIR="$(nc-config --flibs) $(nc-config --libs)"
+NETCDF_LIB=""
 
-IOIPSL_INCDIR="-I/donnees/sllmd/ioipsl/modipsl/ifortpara/lib"
-IOIPSL_LIBDIR="-L/donnees/sllmd/ioipsl/modipsl/ifortpara/lib"
+IOIPSL_INCDIR="-I$ROOT/ioipsl/modipsl/lib"
+IOIPSL_LIBDIR="-L$ROOT/ioipsl/modipsl/lib"
 IOIPSL_LIB="-lioipsl"
 
Index: trunk/LMDZ.COMMON/arch/arch-linux-ifort-para.path
===================================================================
--- trunk/LMDZ.COMMON/arch/arch-linux-ifort-para.path	(revision 3453)
+++ trunk/LMDZ.COMMON/arch/arch-linux-ifort-para.path	(revision 3454)
@@ -1,10 +1,10 @@
 ROOT=$PWD
 
-NETCDF_LIBDIR="-L/planeto/emlmd/netcdf64-4.0.1_ifort/lib"
-NETCDF_LIB="-lnetcdf"
-NETCDF_INCDIR="-I/planeto/emlmd/netcdf64-4.0.1_ifort/include"
+NETCDF_INCDIR="$(nc-config --cflags) $(nc-config --fflags)"
+NETCDF_LIBDIR="$(nc-config --flibs) $(nc-config --libs)"
+NETCDF_LIB=""
 
-IOIPSL_INCDIR="-I/u/sllmd/LMDZ5/ioipsl/modipsl/lib-ifort"
-IOIPSL_LIBDIR="-L/u/sllmd/LMDZ5/ioipsl/modipsl/lib-ifort"
+IOIPSL_INCDIR="-I$ROOT/ioipsl/modipsl/lib"
+IOIPSL_LIBDIR="-L$ROOT/ioipsl/modipsl/lib"
 IOIPSL_LIB="-lioipsl"
 
Index: trunk/LMDZ.COMMON/arch/arch-linux-ifort.path
===================================================================
--- trunk/LMDZ.COMMON/arch/arch-linux-ifort.path	(revision 3453)
+++ trunk/LMDZ.COMMON/arch/arch-linux-ifort.path	(revision 3454)
@@ -1,10 +1,10 @@
 ROOT=$PWD
 
-NETCDF_LIBDIR="-L/planeto/emlmd/netcdf64-4.0.1_ifort/lib"
-NETCDF_LIB="-lnetcdf"
-NETCDF_INCDIR="-I/planeto/emlmd/netcdf64-4.0.1_ifort/include"
+NETCDF_INCDIR="$(nc-config --cflags) $(nc-config --fflags)"
+NETCDF_LIBDIR="$(nc-config --flibs) $(nc-config --libs)"
+NETCDF_LIB=""
 
-IOIPSL_INCDIR="-I/u/sllmd/LMDZ5/ioipsl/modipsl/lib-ifort"
-IOIPSL_LIBDIR="-L/u/sllmd/LMDZ5/ioipsl/modipsl/lib-ifort"
+IOIPSL_INCDIR="-I$ROOT/ioipsl/modipsl/lib"
+IOIPSL_LIBDIR="-L$ROOT/ioipsl/modipsl/lib"
 IOIPSL_LIB="-lioipsl"
 
