Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-IA64_PLATINE.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-IA64_PLATINE.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-IA64_PLATINE.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -20,4 +21,5 @@
 %LD              mpif90
 %LDFLAGS
+%FPPFLAGS        -P -C -traditional
 %AR              ar
 %ARFLAGS         rs
Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-PW6_VARGAS.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-PW6_VARGAS.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-PW6_VARGAS.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -20,6 +21,7 @@
 %LD                  mpxlf90_r
 %LDFLAGS    
-%AR                  ar
-%ARFLAGS             -rs
+%FPPFLAGS            -P -C
+%AR                  ar  
+%ARFLAGS             rs
 %MK                  gmake 
 %USER_INC
Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-SX8_BRODIE.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-SX8_BRODIE.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-SX8_BRODIE.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -20,6 +21,7 @@
 %LD                 sxmpif90
 %LDFLAGS
+%FPPFLAGS           -P -C -traditional
 %AR                 sxar
-%ARFLAGS            -rs 
+%ARFLAGS            rs 
 %MK                 sxgmake
 %USER_INC
Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-SX8_MERCURE.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-SX8_MERCURE.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-SX8_MERCURE.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -20,6 +21,7 @@
 %LD              sxmpif90
 %LDFLAGS
+%FPPFLAGS        -P -C -traditional
 %AR              sxar
-%ARFLAGS         -rs
+%ARFLAGS         rs
 %MK              gmake
 %USER_INC
Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-SX9_MERCURE.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-SX9_MERCURE.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-SX9_MERCURE.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -20,6 +21,7 @@
 %LD              sxmpif90
 %LDFLAGS
+%FPPFLAGS        -P -C -traditional
 %AR              sxar
-%ARFLAGS         -rs
+%ARFLAGS         rs
 %MK              gmake
 %USER_INC
Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-X64_TITANE.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-X64_TITANE.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-X64_TITANE.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -20,6 +21,7 @@
 %LD                  mpif90
 %LDFLAGS          
+%FPPFLAGS            -P -C -traditional
 %AR                  ar
-%ARFLAGS
+%ARFLAGS             rs
 %MK                  gmake
 %USER_INC
Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-gfortran_osx.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-gfortran_osx.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-gfortran_osx.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -19,4 +20,6 @@
 %FFLAGS              %FCFLAGS
 %LD                  gfortran
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
 %AR                  libtool
 %ARFLAGS             -c -s -o
Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-ifort_osx.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-ifort_osx.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-ifort_osx.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -19,4 +20,5 @@
 %FFLAGS 	     -r8 -O3  -traceback 
 %LD                  mpif90
+%FPPFLAGS            -P -C -traditional
 %LDFLAGS
 %AR                  libtool 
Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-xlf_aix.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-xlf_aix.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-xlf_aix.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -20,6 +21,7 @@
 %LD                  mpxlf90_r
 %LDFLAGS
+%FPPFLAGS            -P -C
 %AR                  ar
-%ARFLAGS             -rs
+%ARFLAGS             rs
 %MK                  gmake
 %USER_INC
Index: /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-xlf_osx.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-xlf_osx.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/ARCH/arch-xlf_osx.fcm	(revision 2010)
@@ -6,4 +6,5 @@
 # LD          linker
 # LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+# FPPFLAGS    pre-processing flags
 # AR          assembler
 # ARFLAGS     assembler flags
@@ -18,4 +19,5 @@
 %FCFLAGS       -O3 -qrealsize=8 -qextname -qsuffix=f=f90 -qsuffix=cpp=F90
 %FFLAGS        %FCFLAGS
+%FPPFLAGS        -P -C -traditional
 %LD            xlf90
 %LDFLAGS
Index: /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm	(revision 2010)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_zco key_gyre key_dynspg_flt key_ldfslp key_zdftke key_vectopt_loop key_vectopt_memory
+ bld::tool::fppkeys key_zco key_gyre key_dynspg_flt key_ldfslp key_zdftke key_vectopt_loop key_vectopt_memory  key_iomput
Index: /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/GYRE_LOBSTER/cpp_GYRE_LOBSTER.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/GYRE_LOBSTER/cpp_GYRE_LOBSTER.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/GYRE_LOBSTER/cpp_GYRE_LOBSTER.fcm	(revision 2010)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_zco key_gyre key_dynspg_flt key_ldfslp key_zdftke key_vectopt_loop key_vectopt_memory key_top key_lobster key_trc_diaadd key_trc_dia3d
+bld::tool::fppkeys key_zco key_gyre key_dynspg_flt key_ldfslp key_zdftke key_vectopt_loop key_vectopt_memory key_top key_lobster key_trc_diaadd key_trc_dia3d  key_iomput
Index: /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 2010)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_trabbl_dif key_vectopt_loop key_vectopt_memory key_orca_r2 key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_dtatem key_dtasal key_tradmp key_trabbc key_zdftke key_zdfddm key_mpp_mpi
+ bld::tool::fppkeys key_trabbl_dif key_vectopt_loop key_vectopt_memory key_orca_r2 key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_dtatem key_dtasal key_tradmp key_trabbc key_zdftke key_zdfddm key_iomput 
Index: /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 2010)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl_dif key_vectopt_loop key_vectopt_memory key_orca_r2 key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_dtatem key_dtasal key_tradmp key_trabbc key_zdftke key_zdfddm key_top key_pisces key_trcbbl_dif key_trcldf_eiv key_trc_zdfddm key_trc_diaadd key_trc_dia3d
+bld::tool::fppkeys key_trabbl_dif key_vectopt_loop key_vectopt_memory key_orca_r2 key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_dtatem key_dtasal key_tradmp key_trabbc key_zdftke key_zdfddm key_top key_pisces key_trcbbl_dif key_trcldf_eiv key_trc_zdfddm key_trc_diaadd key_trc_dia3d  key_iomput
Index: /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/POMME/cpp_POMME.fcm
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/POMME/cpp_POMME.fcm	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/POMME/cpp_POMME.fcm	(revision 2010)
@@ -1,2 +1,2 @@
- bld::tool::fppkeys P_P = key_pomme_r025 key_dynspg_flt key_zdftke key_dtatem key_dtasal key_traldf_c2d key_dynldf_c2d key_ldfslp key_obc
+ bld::tool::fppkeys P_P = key_pomme_r025 key_dynspg_flt key_zdftke key_dtatem key_dtasal key_traldf_c2d key_dynldf_c2d key_ldfslp key_obc  key_iomput
 
Index: /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/makenemo
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/makenemo	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/CONFIG/makenemo	(revision 2010)
@@ -84,5 +84,5 @@
 export TOOLS_DIR=${MAIN_DIR}/TOOLS
 export NEMO_DIR=${MAIN_DIR}/NEMO
-export AGRIFUSE=0
+export AGRIFUSE=10
 declare -a TAB
 #-
Index: /branches/DEV_r1879_FCM/NEMOGCM/TOOLS/agrifpp.sh
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/TOOLS/agrifpp.sh	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/TOOLS/agrifpp.sh	(revision 2010)
@@ -6,4 +6,6 @@
 #+
 #
+#inc $MAIN_DIR/TOOLS/arch.fcm
+
 # ==========
 # agrifpp.sh
@@ -63,29 +65,28 @@
 
 
-   MYFILE=`echo $* |awk -F" " '{print $NF}' `
    if [ "${MYFILE}" != "par_oce.F90" -a  ! -f ${NEMO_TDIR}/${NEW_CONF}}/OPAFILES/param_done ]; then
-      cpp -P -C -traditional  ${FPP_OPT} ${CONFIG_DIR}/${NEW_CONF}/WORK/par_oce.F90 > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/par_oce.F90
+      cpp ${FPP_OPT} ${CONFIG_DIR}/${NEW_CONF}/WORK/par_oce.F90 > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/par_oce.F90
       (cd ${NEMO_TDIR}/${NEW_CONF}/OPAFILES ; ${NEMO_TDIR}/${NEW_CONF}/AGRIFLIB/bin/conv agrif_opa.in -rm -comdirin ./ -comdirout AGRIF_MODELFILES/ -convfile par_oce.F90 > /dev/null )
-      cpp -P -C -traditional  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC  ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_MODELFILES/par_oce.F90 > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/par_oce.F90
+      cpp ${FPP_OPT}  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC  ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_MODELFILES/par_oce.F90 > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/par_oce.F90
       touch ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/param_done
    elif  [ "${MYFILE}" == "par_oce.F90" -a -f ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/param_done ] ; then
       cd  ${NEMO_TDIR}/${NEW_CONF}/OPAFILES
-      cpp -P -C -traditional -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC ${MYFILE}
+      cpp ${FPP_OPT} -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC ${MYFILE}
       exit
    fi
 
    if [ "${MYFILE}" == agrif2model.F90 ]; then
-      cpp  -P -C -traditional -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC $@
+      cpp  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC $@
       exit
    fi 
 
-   cpp   -P -traditional -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC $@ > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/${MYFILE}
+   cpp  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC $@ > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/${MYFILE}
    ( cd ${NEMO_TDIR}/${NEW_CONF}/OPAFILES ; ${NEMO_TDIR}/${NEW_CONF}/AGRIFLIB/bin/conv agrif_opa.in -rm -comdirin ./ -comdirout AGRIF_MODELFILES/ -convfile ${MYFILE} > /dev/null )
    cd  ${NEMO_TDIR}/${NEW_CONF}
    mv -f OPAFILES/AGRIF_MODELFILES/${MYFILE} OPAFILES/${MYFILE}
-   cpp  -P -C -traditional -IOPAFILES/AGRIF_INC OPAFILES/${MYFILE} 
+   cpp ${FPP_OPT} -IOPAFILES/AGRIF_INC OPAFILES/${MYFILE} 
 else
    shift
-   cpp -P -C -traditional $@
+   cpp $@
 fi
 
Index: /branches/DEV_r1879_FCM/NEMOGCM/TOOLS/bld.cfg
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/TOOLS/bld.cfg	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/TOOLS/bld.cfg	(revision 2010)
@@ -42,6 +42,6 @@
 bld::pp::agrif 1
 bld::tool::fpp       $TOOLS_DIR/agrifpp.sh
-bld::tool::fppflags::nemo $AGRIFUSE
-bld::tool::fppflags::agrif 0
+bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS
+bld::tool::fppflags::agrif 0 %FPPFLAGS
 
 # Ignore the following dependencies
Index: /branches/DEV_r1879_FCM/NEMOGCM/TOOLS/conv.cfg
===================================================================
--- /branches/DEV_r1879_FCM/NEMOGCM/TOOLS/conv.cfg	(revision 2009)
+++ /branches/DEV_r1879_FCM/NEMOGCM/TOOLS/conv.cfg	(revision 2010)
@@ -7,4 +7,7 @@
 # Build information
 # ------------------------------------------------------------------------------
+inc $MAIN_DIR/TOOLS/arch.fcm
+
+bld::tool::make      %MK
 
 src::convsrc   $MAIN_DIR/EXTERNAL/AGRIF/LIB
@@ -15,8 +18,10 @@
 dir::root            $NEMO_TDIR/$NEW_CONF/AGRIFLIB
 
-bld::tool::cflags::convsrc  -O
+bld::tool::cflags::convsrc  -O0  
 bld::tool::ld::convsrc   cc
-bld::tool::ldflags::convsrc -O  
-bld::pp
+bld::tool::ldflags::convsrc -O  ../obj/fortran.o ../obj/fortran.o 
+bld::pp 1
+
+
 
 bld::exe_name::main conv
