Index: /utils/build_MERGE_2019/arch/CMCC/arch-gfortran_athena_xios.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CMCC/arch-gfortran_athena_xios.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CMCC/arch-gfortran_athena_xios.fcm	(revision 12176)
@@ -0,0 +1,62 @@
+# mpi gfortran compiler options for ATHENA using XIOS parallel writer server
+#
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+
+%NCDF_HOME           /users/home/ans040/local
+%HDF5_HOME           /users/home/ans040/local
+%XIOS_HOME           /users/home/ans040/SOFTWARE/XIOS/trunk
+
+%NCDF_INC            -I%NCDF_HOME/include
+%NCDF_LIB            -L%NCDF_HOME/lib
+
+%HDF5_INC            -I%HDF5_HOME/include
+%HDF5_LIB            -L%HDF5_HOME/lib -lhdf5_hl -lhdf5
+
+%XIOS_INC            -I%XIOS_HOME/inc
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+
+%CPP                 cpp
+%FC                  mpif90
+%FCFLAGS             -fdefault-real-8 -fno-second-underscore -Dgfortran -ffree-line-length-none
+%FFLAGS              %FCFLAGS
+%LD                  %FC
+%LDFLAGS
+%FPPFLAGS            -x f77-cpp-input
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %NCDF_INC %HDF5_INC
+%USER_LIB            %XIOS_LIB %NCDF_LIB %HDF5_LIB  -lnetcdff -lnetcdf -lstdc++ -lz -lcurl -lgpfs
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena.fcm	(revision 12176)
@@ -0,0 +1,35 @@
+# generic ifort compiler options for linux
+# NCDF_INC netcdf include file
+# NCDF_LIB netcdf library
+# FC Fortran compiler command
+# FCFLAGS Fortran compiler flags
+# FFLAGS Fortran 77 compiler flags
+# 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
+# MK make
+# USER_INC additional include files for the compiler, e.g. -I<include dir>
+# USER_LIB additional libraries to pass to the linker, e.g. -l<library>
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+
+
+%NCDF_INC -I${NETCDF}/include
+%NCDF_LIB -L${NETCDF}/lib -lnetcdf -lnetcdff
+%CPP                 cpp
+%FC mpiifort
+%FCFLAGS -r8 -O3 -xHost -fp-model source -traceback
+%FFLAGS %FCFLAGS
+%LD mpiifort
+%FPPFLAGS -P -C -traditional
+%LDFLAGS
+%AR ar
+%ARFLAGS -r
+%MK gmake
+%USER_INC %NCDF_INC
+%USER_LIB %NCDF_LIB
+%CC                  icc
+%CFLAGS              -O0
+
Index: /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena_debug.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena_debug.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena_debug.fcm	(revision 12176)
@@ -0,0 +1,35 @@
+# generic ifort compiler options for linux
+# NCDF_INC netcdf include file
+# NCDF_LIB netcdf library
+# FC Fortran compiler command
+# FCFLAGS Fortran compiler flags
+# FFLAGS Fortran 77 compiler flags
+# 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
+# MK make
+# USER_INC additional include files for the compiler, e.g. -I<include dir>
+# USER_LIB additional libraries to pass to the linker, e.g. -l<library>
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+
+
+%NCDF_INC -I$NETCDF/include
+%NCDF_LIB -L$NETCDF/lib -lnetcdf -lnetcdff
+%CPP                 cpp
+%FC mpiifort
+%FCFLAGS -fpe0 -g -r8 -O1 -xHost -fp-model source -traceback
+%FFLAGS %FCFLAGS
+%LD mpiifort
+%FPPFLAGS -P -C -traditional
+%LDFLAGS
+%AR ar
+%ARFLAGS -r
+%MK gmake
+%USER_INC %NCDF_INC
+%USER_LIB %NCDF_LIB
+%CC                  icc
+%CFLAGS              -O0
+
Index: /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena_tools.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena_tools.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena_tools.fcm	(revision 12176)
@@ -0,0 +1,35 @@
+# generic ifort compiler options for linux
+# NCDF_INC netcdf include file
+# NCDF_LIB netcdf library
+# FC Fortran compiler command
+# FCFLAGS Fortran compiler flags
+# FFLAGS Fortran 77 compiler flags
+# 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
+# MK make
+# USER_INC additional include files for the compiler, e.g. -I<include dir>
+# USER_LIB additional libraries to pass to the linker, e.g. -l<library>
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+
+
+%NCDF_INC -I$NETCDF/include
+%NCDF_LIB -L$NETCDF/lib -lnetcdf -lnetcdff
+%CPP                 cpp
+%FC ifort
+%FCFLAGS -r8 -O3 -xHost -fp-model source -traceback
+%FFLAGS  %FCFLAGS
+%LD ifort
+%FPPFLAGS -P -C -traditional
+%LDFLAGS
+%AR ar
+%ARFLAGS -r
+%MK gmake
+%USER_INC %NCDF_INC
+%USER_LIB %NCDF_LIB
+%CC                  icc
+%CFLAGS              -O0
+
Index: /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena_xios.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena_xios.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CMCC/arch-ifort_athena_xios.fcm	(revision 12176)
@@ -0,0 +1,62 @@
+# mpi ifort compiler options for ATHENA using XIOS parallel writer server
+#
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+
+# required modules
+# module load  INTEL/intel_xe_2013 NETCDF/netcdf-4.3_parallel NETCDF/parallel-netcdf-1.7.0 HDF5/hdf5-1.8.11_parallel
+
+# NETCDF and PNETCDF should be set automatically when loading modules.
+# The following environment variables must be set by the user.
+#export XIOS=/users/home/models/nemo/xios
+#export HDF5=/users/home/opt/hdf5/hdf5-1.8.11_parallel
+
+%NCDF_INC            -I${NETCDF}/include -I${PNETCDF}/include
+%NCDF_LIB            -L${NETCDF}/lib -lnetcdff -lnetcdf -L${PNETCDF}/lib -lpnetcdf
+%HDF5_INC            -I${HDF5}/include
+%HDF5_LIB            -L${HDF5}/lib -lhdf5_hl -lhdf5
+%XIOS_INC            -I${XIOS}/inc
+%XIOS_LIB            -L${XIOS}/lib -lxios
+%CPP                 cpp
+%FC                  mpiifort
+%FCFLAGS             -r8 -O3 -xHost -fp-model source -traceback
+%FFLAGS              %FCFLAGS
+%LD                  mpiifort
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS             -lstdc++ -lz -lgpfs -lcurl
+%AR                  ar 
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %XIOS_INC %NCDF_INC %HDF5_INC
+%USER_LIB            %XIOS_LIB %NCDF_LIB %HDF5_LIB
+%CC                  icc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/CNRS/arch-X64_ADA.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CNRS/arch-X64_ADA.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CNRS/arch-X64_ADA.fcm	(revision 12176)
@@ -0,0 +1,60 @@
+# Ada  IBM x3750 at french IDRIS, http://www.idris.fr/ada/ada-hw-ada.html
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /smplocal/pub/NetCDF/4.1.3/mpi
+%HDF5_HOME           /smplocal/pub/HDF5/1.8.9/par
+%XIOS_HOME           $WORKDIR/XIOS
+####%OASIS_HOME          $WORKDIR/oasis3-mct/BLD
+%OASIS_HOME          /not/defined
+
+%NCDF_INC            -I%NCDF_HOME/include 
+%NCDF_LIB            -L%NCDF_HOME/lib -Bstatic -lnetcdff -lnetcdf -Bdynamic -L%HDF5_HOME/lib -Bstatic -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz 
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpiifort -c -cpp
+%FCFLAGS             -DCPP_PARA -i4 -r8 -O3 -axAVX,SSE4.2 -fp-model precise
+%FFLAGS              %FCFLAGS
+%LD                  mpiifort
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  icc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/CNRS/arch-X64_ADA_DEBUG.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CNRS/arch-X64_ADA_DEBUG.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CNRS/arch-X64_ADA_DEBUG.fcm	(revision 12176)
@@ -0,0 +1,59 @@
+# Ada  IBM x3750 at french IDRIS, http://www.idris.fr/ada/ada-hw-ada.html
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /smplocal/pub/NetCDF/4.1.3/mpi
+%HDF5_HOME           /smplocal/pub/HDF5/1.8.9/par
+%XIOS_HOME           $WORKDIR/XIOS
+%OASIS_HOME          /not/yet/defined
+
+%NCDF_INC            -I%NCDF_HOME/include 
+%NCDF_LIB            -L%NCDF_HOME/lib -Bstatic -lnetcdff -lnetcdf -Bdynamic -L%HDF5_HOME/lib -Bstatic -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz 
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpiifort -c -cpp
+%FCFLAGS             -DCPP_PARA -i4 -r8 -g -O0 -debug all -traceback -fp-model precise -ftrapuv -fpe0
+%FFLAGS              %FCFLAGS
+%LD                  mpiifort
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  icc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/CNRS/arch-X64_ADA_O0.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CNRS/arch-X64_ADA_O0.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CNRS/arch-X64_ADA_O0.fcm	(revision 12176)
@@ -0,0 +1,54 @@
+# Ada  IBM x3750 at french IDRIS, http://www.idris.fr/ada/ada-hw-ada.html
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /smplocal/pub/NetCDF/4.1.3/mpi
+%HDF5_HOME           /smplocal/pub/HDF5/1.8.9/par
+%XIOS_HOME           $WORKDIR/XIOS2
+%OASIS_HOME          /not/yet/defined
+
+%NCDF_INC            -I%NCDF_HOME/include 
+%NCDF_LIB            -L%NCDF_HOME/lib -Bstatic -lnetcdff -lnetcdf -Bdynamic -L%HDF5_HOME/lib -Bstatic -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz 
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpiifort -c -cpp
+%FCFLAGS             -DCPP_PARA -i4 -r8 -O0 -xAVX -fp-model precise
+%FFLAGS              %FCFLAGS
+%LD                  mpiifort
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
Index: /utils/build_MERGE_2019/arch/CNRS/arch-X64_IRENE.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CNRS/arch-X64_IRENE.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CNRS/arch-X64_IRENE.fcm	(revision 12176)
@@ -0,0 +1,58 @@
+# Irene BULL at TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-Irene.htm
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%XIOS_HOME           $CCCWORKDIR/xios-2.5
+%OASIS_HOME          $CCCWORKDIR/now/models/oa3mct
+
+%NCDF_INC            -I$NETCDFFORTRAN_INCDIR -I$NETCDF_INCDIR
+%NCDF_LIB            -L$NETCDFFORTRAN_LIBDIR -lnetcdff -L$NETCDF_LIBDIR -lnetcdf -L$HDF5_LIBDIR -lhdf5_hl -lhdf5 -lz -lcurl
+
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios -lstdc++
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpif90 -c -cpp
+%FCFLAGS             -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS             
+%FPPFLAGS            -P -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/CNRS/arch-X64_IRENE_DEBUG.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CNRS/arch-X64_IRENE_DEBUG.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CNRS/arch-X64_IRENE_DEBUG.fcm	(revision 12176)
@@ -0,0 +1,58 @@
+# Irene BULL at TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-Irene.htm
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%XIOS_HOME           $CCCWORKDIR/xios-2.5
+%OASIS_HOME          $CCCWORKDIR/now/models/oa3mct
+
+%NCDF_INC            -I$NETCDFFORTRAN_INCDIR -I$NETCDF_INCDIR
+%NCDF_LIB            -L$NETCDFFORTRAN_LIBDIR -lnetcdff -L$NETCDF_LIBDIR -lnetcdf -L$HDF5_LIBDIR -lhdf5_hl -lhdf5 -lz -lcurl
+
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios -lstdc++
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpif90 -c -cpp
+%FCFLAGS             -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -fpe0 -check bounds
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS             
+%FPPFLAGS            -P -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/CNRS/arch-X64_JEANZAY.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CNRS/arch-X64_JEANZAY.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CNRS/arch-X64_JEANZAY.fcm	(revision 12176)
@@ -0,0 +1,63 @@
+# Jean-Zay HPE at IDRIS, http://www.idris.fr/jean-zay
+#
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+#---------------------------------------------------------------------------------------------
+#---------------------------------------------------------------------------------------------
+# All NETCDF and HDF paths are empty as they are automatically defined through environment
+# variables by the load of modules
+#---------------------------------------------------------------------------------------------
+#---------------------------------------------------------------------------------------------
+#
+#
+%XIOS_HOME           $WORK/xios-2.5
+%OASIS_HOME          
+
+%NCDF_INC            
+%NCDF_LIB            -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios -lstdc++
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpiifort -c -cpp
+%FCFLAGS             -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias
+%FFLAGS              %FCFLAGS
+%LD                  mpiifort
+%LDFLAGS             
+%FPPFLAGS            -P -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/CNRS/arch-X64_JEANZAY_DEBUG.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/CNRS/arch-X64_JEANZAY_DEBUG.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/CNRS/arch-X64_JEANZAY_DEBUG.fcm	(revision 12176)
@@ -0,0 +1,63 @@
+# Jean-Zay HPE at IDRIS, http://www.idris.fr/jean-zay
+#
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+#---------------------------------------------------------------------------------------------
+#---------------------------------------------------------------------------------------------
+# All NETCDF and HDF paths are empty as they are automatically defined through environment
+# variables by the load of modules
+#---------------------------------------------------------------------------------------------
+#---------------------------------------------------------------------------------------------
+#
+#
+%XIOS_HOME           $WORK/xios-2.5
+%OASIS_HOME          
+
+%NCDF_INC            
+%NCDF_LIB            -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz -lcurl
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios -lstdc++
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpiifort -c -cpp
+%FCFLAGS             -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check bounds -fpe-all=0 -ftz
+%FFLAGS              %FCFLAGS
+%LD                  mpiifort
+%LDFLAGS             
+%FPPFLAGS            -P -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/INGV/arch-IBM_EKMAN_INGV.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/INGV/arch-IBM_EKMAN_INGV.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/INGV/arch-IBM_EKMAN_INGV.fcm	(revision 12176)
@@ -0,0 +1,37 @@
+# EKMAN IBM Intel Sandy Bridge at INGV
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# XIOS_ROOT   root directory containing lib for XIOS
+# MPI_INTEL   directory for intel mpi library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+
+%NCDF_INC            -I/srv/lib/netcdf-x/include
+%NCDF_LIB            -L/srv/lib/netcdf-x/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lcurl -lstdc++
+%XIOS_ROOT           /home/delrosso/XIOS_1.0/xios-1.0
+%MPI_INTEL           -I/srv/intel/impi/4.1.0.024/include
+%CPP                 cpp
+%FC                  mpiifort
+%FCFLAGS             -r8 -O1 -g -traceback -fp-model precise
+%FFLAGS              %FCFLAGS
+%LD                  mpiifort
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            -I%XIOS_ROOT/inc %NCDF_INC %MPI_INTEL -I/srv/lib/zlib-last/include
+%USER_LIB            -L%XIOS_ROOT/lib -lxios %NCDF_LIB -L/srv/lib/zlib-last/lib -lz
+%CC                  icc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/MERCATOR/arch-openmpi_KARA_MERCATOR_XIOS.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/MERCATOR/arch-openmpi_KARA_MERCATOR_XIOS.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/MERCATOR/arch-openmpi_KARA_MERCATOR_XIOS.fcm	(revision 12176)
@@ -0,0 +1,39 @@
+# ifort compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+# debug: -g  -check bounds -check uninit -check pointers -traceback
+# #-xAVX
+#
+%NCDF_INC            -I$NETCDF_INC
+%NCDF_LIB            -L$NETCDF_LIB -lnetcdff -lnetcdf -L$HDF5_LIB -lhdf5_hl -lhdf5 -lz
+
+%CPP	             cpp
+%FC                  mpif90 -fpp 
+# norep 156 %FCFLAGS             -i4 -r8 -O3 -fp-model precise
+# norep 156 %FCFLAGS             -i4 -r8 -O2 -fp-model precise
+%FCFLAGS             -i4 -r8 -O0 -fp-model precise
+%FFLAGS              %FCFLAGS
+%LD                   mpif90
+%FPPFLAGS            -P -traditional
+%LDFLAGS             -O2
+%AR                  ar
+%ARFLAGS             -rs
+%MK                  gmake
+%USER_INC            -I$XIOS_INC %NCDF_INC
+%USER_LIB            -L$XIOS_LIB -lxios %NCDF_LIB -lstdc++
+
+%CC                  mpicc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/NOC/arch-ALTIX_NAUTILUS_MPT.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/NOC/arch-ALTIX_NAUTILUS_MPT.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/NOC/arch-ALTIX_NAUTILUS_MPT.fcm	(revision 12176)
@@ -0,0 +1,64 @@
+# ifort compiler options for NOCS ALTIX cluster nautilus using NetCDF4 libraries
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%HDF5_HOME           /fibre/omfman/NETCDF_PAR
+%NCDF_HOME           /fibre/omfman/NETCDF_PAR
+%XIOS_HOME           /fibre/omfman/XIOS
+%OASIS_HOME          
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+# Note use of -Bstatic because the library root directories may not be accessible to the back-end compute nodes
+%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -Bstatic -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -Bdynamic -lz
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  ifort
+%FCFLAGS             -r8 -O3 -fp-model precise -xT -ip -vec-report0
+%FFLAGS              -r8 -O3 -fp-model precise -xT -ip -vec-report0
+%LD                  ifort
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS             -lmpi -lstdc++ -lcurl
+%AR                  ar 
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+# - if debugging use these flags
+#FCFLAGS             -g -traceback -r8 -O0 -xT -ip -vec-report0
+#FFLAGS              -g -traceback -r8 -O0 -xT -ip -vec-report0
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/NOC/arch-THALASSA.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/NOC/arch-THALASSA.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/NOC/arch-THALASSA.fcm	(revision 12176)
@@ -0,0 +1,68 @@
+# generic gfortran compiler options for OSX installed with macport, http://www.macports.org/
+#
+# port packages needed:
+#    sudo port install openmpi +gcc48
+#    sudo port install hdf5-18 +cxx +fortran +openmpi (I'am not sure cxx is needed)
+#    sudo port install netcdf         +openmpi
+#    sudo port install netcdf-fortran +openmpi
+#    sudo port install netcdf-cxx     +openmpi (I'am not sure it is needed)
+#    sudo port install p5-uri
+# add to your PATH /opt/local/lib/openmpi/bin so that mpif90 is properly known
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /nerc/packages/netcdf/4.3.3.1
+%HDF5_HOME           /nerc/packages/hdf5/1.8.15
+%XIOS_HOME           /noc/msm/working/nemo/acc/XIOS/xios-1.0
+%OASIS_HOME          
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           
+%OASIS_LIB           
+
+%CPP	             cpp
+%FC	             mpif90
+%FCFLAGS             -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none
+%FFLAGS              %FCFLAGS
+%LD                  %FC
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  make
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/NOC/arch-X64_MOBILIS.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/NOC/arch-X64_MOBILIS.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/NOC/arch-X64_MOBILIS.fcm	(revision 12176)
@@ -0,0 +1,72 @@
+# Mobilis - ClusterVision X86_64 cluster at NOCS
+#---------------------------------------------------------------------
+#  REMEMBER TO LOAD THE CORRECT ENVIRONMENT BEFORE INVOKING makenemo #
+#---------------------------------------------------------------------
+#
+#  Works with nemo-PrgEnv modules on Mobilis
+#    module use /home/acc/MyMods
+#  and either:
+#
+#    module load nemo-PrgEnv/4.0
+#  or
+#    module load nemo-PrgEnv/3.6
+#
+#---------------------------------------------------------------------
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - fcm variables are starting with a % (and not a $)
+#  - unix variables "$..." are accepted and will be evaluated before calling fcm.
+#  - The $ variables in this arch file are set by the nemo-PrgEnv module (see top)
+#
+%NCDF_HOME           $NETCDF_DIR
+%HDF5_HOME           $HDF5_DIR
+%XIOS_HOME           $XIO_HOME
+%OASIS_HOME          
+
+%NCDF_INC            -I%NCDF_HOME/include 
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdf -lnetcdff -lnetcdf -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -lhdf5 -lcurl
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           
+%OASIS_LIB           
+
+%CPP	             cpp
+%FC                  mpif90 -c -cpp
+%FCFLAGS             -i4 -r8 -O3 -fp-model source -xAVX
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  icc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/NOC/arch-XC_ARCHER.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/NOC/arch-XC_ARCHER.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/NOC/arch-XC_ARCHER.fcm	(revision 12176)
@@ -0,0 +1,63 @@
+# compiler options for Archer CRAY XC-30 (using crayftn compiler)
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           $NETCDF_DIR
+%HDF5_HOME           $HDF5_DIR
+%XIOS_HOME           /work/n01/n01/acc/XIOS_r474
+#OASIS_HOME          
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+#OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+#OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  ftn
+#FCFLAGS             -em -s integer32 -s real64 -O3
+#FFLAGS              -em -s integer32 -s real64 -O3
+%FCFLAGS             -em -s integer32 -s real64 -O0 -e0 -eZ
+%FFLAGS              -em -s integer32 -s real64 -O0 -e0 -eZ
+%LD                  CC -Wl,"--allow-multiple-definition"
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS
+%AR                  ar 
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %XIOS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %NCDF_LIB
+#USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+#USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/NOC/arch-XC_ARCHER_INTEL.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/NOC/arch-XC_ARCHER_INTEL.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/NOC/arch-XC_ARCHER_INTEL.fcm	(revision 12176)
@@ -0,0 +1,61 @@
+# compiler options for Archer CRAY XC-30 (using intel compiler)
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           $NETCDF_DIR
+%HDF5_HOME           $HDF5_DIR
+%XIOS_HOME           /work/n01/n01/acc/XIOS_r484
+#OASIS_HOME          
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+#OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+#OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  ftn
+%FCFLAGS             -integer-size 32 -real-size 64 -O3 -fp-model source -zero -fpp -warn all
+%FFLAGS              -integer-size 32 -real-size 64 -O3 -fp-model source -zero -fpp -warn all
+%LD                  CC -Wl,"--allow-multiple-definition"
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS
+%AR                  ar 
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %XIOS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %NCDF_LIB
+#USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+#USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/UKMO/arch-PW7_METO.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/UKMO/arch-PW7_METO.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/UKMO/arch-PW7_METO.fcm	(revision 12176)
@@ -0,0 +1,38 @@
+# IBM POWER7  UKMO
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# XIOS_INC    XIOS include files
+# XIOS_LIB    XIOS library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+
+
+%NCDF_INC            -I/home/cr/ocean/hadcv/netcdf/4.1.3_par/include
+%NCDF_LIB            -L/home/cr/ocean/hadcv/netcdf/4.1.3_par/lib -lnetcdf -lnetcdff -lhdf5 -lhdf5_hl -lhdf5_fortran -lz
+%XIOS_INC            -I/home/cr/ocean/hadcv/xios_lib/par/r618/xios/inc
+%XIOS_LIB            -L/home/cr/ocean/hadcv/xios_lib/par/r618/xios/lib -lxios
+%CPP	             cpp
+%FC                  mpxlf90_r
+%FCFLAGS             -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -g -O2 -qstrict -qinitauto=7FBFFFFF
+%FFLAGS             -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -g -O2 -qstrict -qinitauto=7FBFFFFF
+%LD                  mpCC_r
+%LDFLAGS             -lxlf90 -L/projects/um1/lib -lsig -O2 -L MASS
+%FPPFLAGS            -E -P -traditional -I/opt/ibmhpc/pecurrent/ppe.poe/include -I/usr/lpp/ppe.poe/include/thread64
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %NCDF_INC %XIOS_INC
+%USER_LIB            %NCDF_LIB %XIOS_LIB
+%CC                  xlc
+%CFLAGS              -O -qcpluscmt
Index: /utils/build_MERGE_2019/arch/UKMO/arch-PW7_MONSOON.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/UKMO/arch-PW7_MONSOON.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/UKMO/arch-PW7_MONSOON.fcm	(revision 12176)
@@ -0,0 +1,38 @@
+# IBM POWER7  UKMO
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# XIOS_INC    XIOS include files
+# XIOS_LIB    XIOS library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+
+%NCDF_INC            -I/home/dcalve/netcdf/4.1.3_seq/include
+%NCDF_LIB            -L/home/dcalve/netcdf/4.1.3_seq/lib -lnetcdf -lnetcdff -lhdf5 -lhdf5_hl -lhdf5_fortran -lz
+%XIOS_INC            -I/home/dstork/xios_lib/par/r521/xios/inc
+%XIOS_LIB            -L/home/dstork/xios_lib/par/r521/xios/lib -lxios
+%CPP	             cpp
+%FC                  mpxlf90_r
+%FCFLAGS             -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr7 -qtune=pwr7 -g -O2 -qstrict -qinitauto=7FBFFFFF
+%FFLAGS              -qrealsize=8 -qextname -qarch=pwr7 -qtune=pwr7 -g -O2 -qstrict -qinitauto=7FBFFFFF -qfixed
+%LD                  mpCC_r
+%LDFLAGS             -lxlf90 -L/projects/um1/lib -lsig -O2 -L MASS
+%FPPFLAGS            -E -P -traditional -I/opt/ibmhpc/pecurrent/ppe.poe/include -I/usr/lpp/ppe.poe/include/thread64
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %NCDF_INC %XIOS_INC
+%USER_LIB            %NCDF_LIB %XIOS_LIB
+
+%CC                  xlc
+%CFLAGS              -O -qcpluscmt
Index: /utils/build_MERGE_2019/arch/UKMO/arch-XC40_METO.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/UKMO/arch-XC40_METO.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/UKMO/arch-XC40_METO.fcm	(revision 12176)
@@ -0,0 +1,67 @@
+# compiler options for Archer CRAY XC-40 (using crayftn compiler)
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+# This arch file depends on loading XIOS-PrgEnv/2.0/24708
+
+%NCDF_HOME           $NETCDF_DIR
+%HDF5_HOME           $HDF5_DIR
+%XIOS_HOME           $xios_path
+%OASIS_HOME          $prism_path
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz
+
+%XIOS_INC            -I%XIOS_HOME/inc
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIBDIR        -L%OASIS_HOME/lib
+%OASIS_LIB           -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP                 cpp -Dkey_nosignedzero
+%FC                  ftn
+
+%FCFLAGS             -em -s real64 -s integer32 -O2 -hflex_mp=intolerant -e0 -ez
+%FFLAGS              -em -s real64 -s integer32 -O2 -hflex_mp=intolerant -e0 -ez -Rb
+
+%LD                  ftn
+%FPPFLAGS            -P -E -traditional-cpp
+%LDFLAGS             -hbyteswapio
+%AR                  ar
+%ARFLAGS             -r
+%MK                  gmake
+
+%USER_INC            %NCDF_INC %XIOS_INC %OASIS_INC
+%USER_LIB            %NCDF_LIB %XIOS_LIB %OASIS_LIB %OASIS_LIBDIR
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/UKMO/arch-XC40_METO_IFORT.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/UKMO/arch-XC40_METO_IFORT.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/UKMO/arch-XC40_METO_IFORT.fcm	(revision 12176)
@@ -0,0 +1,66 @@
+# compiler options for Archer CRAY XC-40 (using crayftn compiler)
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+# This arch file depends on loading XIOS-PrgEnv/2.0/24708
+
+%NCDF_HOME           $NETCDF_DIR
+%HDF5_HOME           $HDF5_DIR
+%XIOS_HOME           $xios_path
+%OASIS_HOME          $prism_path
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz
+
+%XIOS_INC            -I%XIOS_HOME/inc
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios -lstdc++
+
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIBDIR        -L%OASIS_HOME/lib
+%OASIS_LIB           -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP                 cpp
+%FC                  ftn
+
+%FCFLAGS             -r8 -i4 -init=zero -init=arrays -traceback -debug  minimal -debug inline-debug-info -O2 -fp-model consistent 
+%FFLAGS              %FCFLAGS
+%LD                  ftn
+%FPPFLAGS            -P -E -traditional-cpp
+%LDFLAGS             -hbyteswapio
+%AR                  ar
+%ARFLAGS             -r
+%MK                  gmake
+
+%USER_INC            %NCDF_INC %XIOS_INC
+%USER_LIB            %NCDF_LIB %XIOS_LIB 
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/UKMO/arch-XC40_METO_debug.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/UKMO/arch-XC40_METO_debug.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/UKMO/arch-XC40_METO_debug.fcm	(revision 12176)
@@ -0,0 +1,66 @@
+# compiler options for Archer CRAY XC-40 (using crayftn compiler)
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+# This arch file depends on loading XIOS-PrgEnv/2.0/24708
+
+%NCDF_HOME           $NETCDF_DIR
+%HDF5_HOME           $HDF5_DIR
+%XIOS_HOME           $xios_path
+%OASIS_HOME          $prism_path
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -lnetcdff -lnetcdf -lhdf5_hl -lhdf5 -lz
+
+%XIOS_INC            -I%XIOS_HOME/inc
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIBDIR        -L%OASIS_HOME/lib
+%OASIS_LIB           -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP                 cpp -Dkey_nosignedzero
+%FC                  ftn
+
+%FCFLAGS             -s real64 -s integer32 -Ovector0 -hfp0 -O0 -hflex_mp=intolerant -e CID
+%FFLAGS              -s real64 -s integer32 -Ovector0 -hfp0 -O0 -hflex_mp=intolerant -e CID
+%LD                  ftn
+%FPPFLAGS            -P -E -traditional-cpp
+%LDFLAGS             -hbyteswapio
+%AR                  ar
+%ARFLAGS             -r
+%MK                  gmake
+
+%USER_INC            %NCDF_INC %XIOS_INC %OASIS_INC
+%USER_LIB            %NCDF_LIB %XIOS_LIB %OASIS_LIB %OASIS_LIBDIR
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/arch-linux_gfortran.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/arch-linux_gfortran.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/arch-linux_gfortran.fcm	(revision 12176)
@@ -0,0 +1,61 @@
+# generic gfortran compiler options for linux
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /usr/local/netcdf
+%HDF5_HOME           /usr/local/hdf5
+%XIOS_HOME           $HOME/xios-2.5
+%OASIS_HOME          /not/defined
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios -L/usr/lib/gcc/x86_64-linux-gnu/5 -lstdc++
+
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp -Dkey_nosignedzero 
+%FC	             /usr/bin/mpif90 -c -cpp 
+%FCFLAGS             -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none
+%FFLAGS              %FCFLAGS
+#%LD                  /usr/bin/mpif90 -Wl,-rpath=$HOME/INSTALL/lib:/usr/lib
+%LD                  /usr/bin/mpif90
+%LDFLAGS             
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  make
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/arch-linux_ifort.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/arch-linux_ifort.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/arch-linux_ifort.fcm	(revision 12176)
@@ -0,0 +1,60 @@
+# generic ifort compiler options for linux
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           $NETCDF_DIR
+%HDF5_HOME           $HDF5_DIR
+%XIOS_HOME           $xios_path
+%OASIS_HOME          /not/defiled
+
+%NCDF_INC            -I%NCDF_HOME/include 
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -lhdf5
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios -lstdc++
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  ftn -c -cpp
+%FCFLAGS             -i4 -r8 -O3 -fp-model precise -fno-alias
+%FFLAGS              %FCFLAGS
+%LD                  ftn
+%LDFLAGS             
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
+
Index: /utils/build_MERGE_2019/arch/arch-linux_ifort_omp.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/arch-linux_ifort_omp.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/arch-linux_ifort_omp.fcm	(revision 12176)
@@ -0,0 +1,32 @@
+# generic ifort compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/netcdf/include 
+%NCDF_LIB            -L/usr/local/netcdf/lib -lnetcdf   
+%FC                  ifort
+%FCFLAGS 	         -r8 -O3  -traceback -openmp
+%FFLAGS 	            -r8 -O3  -traceback -openmp
+%LD                  ifort
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS
+%AR                  ar 
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB 
+
+%CC                  icc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/arch-linux_pgf90.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/arch-linux_pgf90.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/arch-linux_pgf90.fcm	(revision 12176)
@@ -0,0 +1,30 @@
+# generic pgf90 compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/netcdf/include
+%NCDF_LIB            -L/usr/local/netcdf/lib -lnetcdf
+%FC	             pgf90
+%FCFLAGS             -O3 -i4 -r8 
+%FFLAGS              %FCFLAGS
+%LD                  pgf90
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             -rs
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/arch-osx_gfortran.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/arch-osx_gfortran.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/arch-osx_gfortran.fcm	(revision 12176)
@@ -0,0 +1,68 @@
+# generic gfortran compiler options for OSX installed with macport, http://www.macports.org/
+#
+# port packages needed:
+#    sudo port install openmpi +gcc48
+#    sudo port install hdf5-18 +cxx +fortran +openmpi (I'am not sure cxx is needed)
+#    sudo port install netcdf         +openmpi
+#    sudo port install netcdf-fortran +openmpi
+#    sudo port install netcdf-cxx     +openmpi (I'am not sure it is needed)
+#    sudo port install p5-uri
+# add to your PATH /opt/local/lib/openmpi/bin so that mpif90 is properly known
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /opt/local
+%HDF5_HOME           /opt/local
+%XIOS_HOME           /Users/$( whoami )/xios-2.5
+%OASIS_HOME          /not/defined
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios -lstdc++ 
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp-mp-4.8 -Dkey_nosignedzero 
+%FC	             mpif90 
+%FCFLAGS             -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none
+%FFLAGS              %FCFLAGS
+%LD                  %FC
+%LDFLAGS             
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  make
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/arch-osx_gfortran_debug.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/arch-osx_gfortran_debug.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/arch-osx_gfortran_debug.fcm	(revision 12176)
@@ -0,0 +1,68 @@
+# generic gfortran compiler options for OSX installed with macport, http://www.macports.org/
+#
+# port packages needed:
+#    sudo port install openmpi +gcc48
+#    sudo port install hdf5-18 +cxx +fortran +openmpi (I'am not sure cxx is needed)
+#    sudo port install netcdf         +openmpi
+#    sudo port install netcdf-fortran +openmpi
+#    sudo port install netcdf-cxx     +openmpi (I'am not sure it is needed)
+#    sudo port install p5-uri
+# add to your PATH /opt/local/lib/openmpi/bin so that mpif90 is properly known
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /opt/local
+%HDF5_HOME           /opt/local
+%XIOS_HOME           /Users/$( whoami )/xios-2.5
+%OASIS_HOME          /not/defined
+
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp-mp-4.8 -Dkey_nosignedzero 
+%FC	             mpif90 
+%FCFLAGS             -fdefault-real-8 -O0 -g -fbacktrace -funroll-all-loops -fcray-pointer -ffree-line-length-none -fcheck=bounds -finit-real=nan
+%FFLAGS              %FCFLAGS
+%LD                  %FC
+%LDFLAGS             -lstdc++ -lmpi_cxx
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  make
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-ALTIX_JADE.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-ALTIX_JADE.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-ALTIX_JADE.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# ifort compiler options for CINES SGI-ALTIX Jade, http://www.cines.fr/spip.php?rubrique291
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/opt/software/SGI/netcdf/4.1.3/include
+%NCDF_LIB            -L/opt/software/SGI/netcdf/4.1.3/lib -lnetcdf -lnetcdff 
+%FC                  ifort -lmpi
+%FCFLAGS             -r8 -O3 -xSSE4.2 -automatic -static 
+%FFLAGS              %FCFLAGS   
+%LD                  %FC
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS
+%AR                  ar 
+%ARFLAGS             -ruv
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-BG_BABEL.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-BG_BABEL.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-BG_BABEL.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# babel IBM BlueGene/P at french IDRIS, http://www.idris.fr/su/Scalaire/babel
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make  
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/bglocal/prod/tools_ibm/netcdf-3.6.1/includ
+%NCDF_LIB            -L/bglocal/prod/tools_ibm/netcdf-3.6.1/lib -lnetcdf
+%FC                  mpxlf90_r
+%FCFLAGS             -qfree=f90 -O3 -qrealsize=8 -qextname -qsource -q64 -qlargepage -qmaxmem=-1 -qsource
+%FFLAGS              -qfixed -O3 -qrealsize=8 -qextname -qsource -q64 -qlargepage -qmaxmem=-1 -qsource
+%LD                  mpxlf90_r
+%LDFLAGS    
+%FPPFLAGS            -P -C
+%AR                  ar  
+%ARFLAGS             rs
+%MK                  gmake 
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB 
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-IA64_PLATINE.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-IA64_PLATINE.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-IA64_PLATINE.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# platine BULL cluster at french CCRT, http://www-ccrt.cea.fr/fr/moyen_de_calcul/platine.htm
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC        -I/usr/include 
+%NCDF_LIB        -L usr/lib -lnetcdf -lnetcdff
+%FC              mpif90
+%FCFLAGS         -i4 -r8 -automatic -align all -I/opt/mpi/current/include
+%FFLAGS          %FCFLAGS
+%LD              mpif90
+%LDFLAGS
+%FPPFLAGS        -P -C -traditional
+%AR              ar
+%ARFLAGS         rs
+%MK              gmake
+%USER_INC        %NCDF_INC
+%USER_LIB        %NCDF_LIB
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-PW6MONO_VARGAS.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-PW6MONO_VARGAS.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-PW6MONO_VARGAS.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# vargas IBM POWER6 (monoprocessor for tools) at french IDRIS, http://www.idris.fr/su/Scalaire/vargas/hw-vargas.html
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make  
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/pub/NetCDF/3.6.2/include
+%NCDF_LIB            -L /usr/local/pub/NetCDF/3.6.2/lib -lnetcdf
+%FC                  xlf90_r
+%FCFLAGS             -qfree=f90 -O3 -qstrict -qrealsize=8 -qextname=flush -qsource -q64 -qlargepage -qmaxmem=-1 -qsource
+%FFLAGS              -qfixed -O3 -qstrict -qrealsize=8 -qextname=flush -qsource -q64 -qlargepage -qmaxmem=-1 -qsource
+%LD                  xlf90_r
+%LDFLAGS    
+%FPPFLAGS            -P -C
+%AR                  ar  
+%ARFLAGS             rs
+%MK                  gmake 
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB 
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-PW6_VARGAS.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-PW6_VARGAS.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-PW6_VARGAS.fcm	(revision 12176)
@@ -0,0 +1,32 @@
+# vargas IBM POWER6 at french IDRIS, http://www.idris.fr/su/Scalaire/vargas/hw-vargas.html
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make  
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+#
+# module load netcdf/4.1.3-par
+# module load phdf5/1.8.7
+#
+%NCDF_INC            
+%NCDF_LIB    
+%XIOS_ROOT           /workgpfs/rech/eee/reee217/XIOS
+%FC                  mpxlf90_r
+%FCFLAGS             -qfree=f90 -O3 -qstrict -qrealsize=8 -qextname=flush -qsource -q64 -qlargepage -qmaxmem=-1 -qsource
+%FFLAGS              -qfixed -O3 -qstrict -qrealsize=8 -qextname=flush -qsource -q64 -qlargepage -qmaxmem=-1 -qsource
+%LD                  mpCC_r
+%LDFLAGS             -lxlf90
+%FPPFLAGS            -P -C
+%AR                  ar  
+%ARFLAGS             rs
+%MK                  gmake 
+%USER_INC            %NCDF_INC -I%XIOS_ROOT/inc
+%USER_LIB            -L%XIOS_ROOT/lib -lxios %NCDF_LIB 
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX8_BRODIE.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX8_BRODIE.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX8_BRODIE.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# brodie NEC SX-8 at french IDRIS, http://www.idris.fr/su/Vectoriel/brodie/hw-brodie.html
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC           -I/SXlocal/pub/netCDF/netCDF-3.6.1/include
+%NCDF_LIB           -L/SXlocal/pub/netCDF/netCDF-3.6.1/lib -lnetcdf
+%FC                 sxmpif90
+%FCFLAGS            -f2003 nocbind -dW -Wf,"-A idbl4",-ptr byte -sx8 -C vopt -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh -O overlap" -Wf,-pvctl noassume loopcnt=10000  -Wf"-init heap=zero" -R2
+%FFLAGS             %FCFLAGS
+%LD                 sxmpif90
+%LDFLAGS
+%FPPFLAGS           -P -C -traditional
+%AR                 sxar
+%ARFLAGS            rs 
+%MK                 sxgmake
+%USER_INC           %NCDF_INC
+%USER_LIB           %NCDF_LIB 
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX8_MERCURE.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX8_MERCURE.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX8_MERCURE.fcm	(revision 12176)
@@ -0,0 +1,30 @@
+# mercure NEC SX-8 at french CCRT, http://www-ccrt.cea.fr/fr/moyen_de_calcul/mercure.htm
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC        -I/ccc/applications/sx8/netcdf-3.6.1/include
+%NCDF_LIB        -L/ccc/applications/sx8/netcdf-3.6.1/lib -lnetcdf
+%FC              sxmpif90
+%FCFLAGS         -f2003 nocbind -size_t64 -dW -Wf,"-A idbl4", -sx8 -C vopt -P stack -Wf"-init stack=nan" -Wl"-f nan" -Wf"-P nh -O overlap" -Wf"-P nh" -Wf,-pvctl noassume loopcnt=10000 shape=10000000 -Wf"-init heap=zero" -R2
+%FFLAGS          %FCFLAGS
+%LD              sxmpif90
+%LDFLAGS         -size_t64
+%FPPFLAGS        -P -C -traditional
+%AR              sxar
+%ARFLAGS         rs
+%MK              sxgmake
+%USER_INC        %NCDF_INC
+%USER_LIB        %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX9_ES2.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX9_ES2.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX9_ES2.fcm	(revision 12176)
@@ -0,0 +1,30 @@
+# Earth Simulator 2, NEC SX-9, http://www.jamstec.go.jp/esc/index.en.html
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC        -I/SX/usr/include
+%NCDF_LIB        -L/SX/usr/lib -lnetcdf
+%FC              sxmpif90
+%FCFLAGS         -f2003 nocbind -P stack -dW -Wf,-pvctl res=whole,-A idbl4,-ptr byte -EP -R5 -float0 -size_t64 -dw -Wf,"-pvctl loopcnt=999999 fullmsg noassume"  -Wf"-init heap=zero" -R2
+%FFLAGS          %FCFLAGS
+%LD              sxmpif90
+%LDFLAGS
+%FPPFLAGS        -P -C -traditional
+%AR              sxar
+%ARFLAGS         rs
+%MK              gmake
+%USER_INC        %NCDF_INC
+%USER_LIB        %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX9_MERCURE.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX9_MERCURE.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-SX9_MERCURE.fcm	(revision 12176)
@@ -0,0 +1,30 @@
+# mercure NEC SX-9 at french CCRT, http://www-ccrt.cea.fr/fr/moyen_de_calcul/mercure.htm
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC        -I/usr/local/SX8/soft/netcdf/include
+%NCDF_LIB        -L/usr/local/SX8/soft/netcdf/lib -lnetcdf
+%FC              sxmpif90
+%FCFLAGS         -f2003 nocbind -P stack -dW -Wf,-pvctl res=whole,-A idbl4,-ptr byte -EP -R5 -float0 -size_t64 -dw -Wf,"-pvctl loopcnt=999999 fullmsg noassume"  -Wf"-init heap=zero" -R2
+%FFLAGS          %FCFLAGS
+%LD              sxmpif90
+%LDFLAGS
+%FPPFLAGS        -P -C -traditional
+%AR              sxar
+%ARFLAGS         rs
+%MK              gmake
+%USER_INC        %NCDF_INC
+%USER_LIB        %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-TX7_ULAM.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-TX7_ULAM.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-TX7_ULAM.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# ulam IBM X3950 M2 at french IDRIS, http://www.idris.fr/su/Scalaire/ulam/hw-ulam.html
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make  
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/pub/NetCDF/3.6.3/include
+%NCDF_LIB            -L/usr/local/pub/NetCDF/3.6.3/lib -lnetcdf_c++ -lnetcdf
+%FC                  ifort
+%FCFLAGS             -r8 -O3  -traceback
+%FFLAGS              %FCFLAGS
+%LD                  %FC
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-X64_CURIE.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-X64_CURIE.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-X64_CURIE.fcm	(revision 12176)
@@ -0,0 +1,59 @@
+# Curie BULL at TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-curie.htm
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME            /usr/local/netcdf-4.3.3.1_hdf5_parallel
+%HDF5_HOME           /usr/local/hdf5-1.8.12_parallel
+%XIOS_HOME           $WORKDIR/xios-2.5
+%OASIS_HOME          $WORKDIR/now/models/oa3mct
+
+%NCDF_INC            -I%NCDF_HOME/include 
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -lhdf5
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios -lstdc++
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpif90 -c -cpp
+%FCFLAGS             -i4 -r8 -O3 -fp-model precise -xAVX -fno-alias
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS             
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-X64_TITANE.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-X64_TITANE.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-X64_TITANE.fcm	(revision 12176)
@@ -0,0 +1,28 @@
+# titane BULL at french CCRT, http://www-ccrt.cea.fr/fr/moyen_de_calcul/titane.htm
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+%NCDF_INC            -I$NETCDF_INC_DIR
+%NCDF_LIB            -L$NETCDF_LIB_DIR -lnetcdff -lnetcdf
+%FC                  mpif90 -c -cpp
+%FCFLAGS             -i4 -r8 -DCPP_PARA -O3 -automatic -align all
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-X86_CESIUM.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-X86_CESIUM.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-X86_CESIUM.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# cesium pre/post processing HP at french CCRT, http://www-ccrt.cea.fr/fr/moyen_de_calcul/cesium.htm
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/applications/netcdf-3.6.3/include
+%NCDF_LIB            -L/applications/netcdf-3.6.3/lib -lnetcdff -lnetcdf
+%FC                  ifort
+%FCFLAGS             -i4 -r8 
+%FFLAGS              %FCFLAGS
+%LD                  ifort
+%LDFLAGS              -Vaxlib 
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB 
Index: /utils/build_MERGE_2019/arch/depr/CNRS/arch-ifort_CICLAD.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/CNRS/arch-ifort_CICLAD.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/CNRS/arch-ifort_CICLAD.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# generic ifort compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/opt/netcdf3/ifort/include 
+%NCDF_LIB            -L /opt/netcdf3/ifort/lib -lnetcdf   
+%FC                  /usr/lib64/openmpi/1.4.3-ifort/bin/mpif90 -c -cpp -DCPP_PARA -pg
+%FCFLAGS 	     -i4 -r8 -O3  -traceback 
+%FFLAGS 	     -i4 -r8 -O3  -traceback 
+%LD                  /usr/lib64/openmpi/1.4.3-ifort/bin/mpif90 
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS
+%AR                  ar 
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB 
Index: /utils/build_MERGE_2019/arch/depr/MERCATOR/arch-ifort_MERCATOR_CLUSTER.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/MERCATOR/arch-ifort_MERCATOR_CLUSTER.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/MERCATOR/arch-ifort_MERCATOR_CLUSTER.fcm	(revision 12176)
@@ -0,0 +1,32 @@
+# generic ifort compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+# debug: -g  -check bounds -check uninit -check pointers -traceback 
+
+%NCDF_INC            -I$NETCDF_INC
+%NCDF_LIB            -L$NETCDF_LIB -lnetcdff -lnetcdf -L$HDF5_LIB -lhdf5_hl -lhdf5 -lz
+
+%CPP                 cpp
+%FC                  mpif90
+%FCFLAGS             -O2 -fp-model precise  -traceback -r8  -convert big_endian -assume byterecl
+%FFLAGS              %FCFLAGS
+%LD                   mpif90
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS             -O2
+%AR                  ar
+%ARFLAGS             -rs
+%MK                  gmake
+%USER_INC            -I$XIOS_INC %NCDF_INC
+%USER_LIB            -L$XIOS_LIB -lxios %NCDF_LIB -lstdc++
+
Index: /utils/build_MERGE_2019/arch/depr/NOC/arch-ALTIX_NAUTILUS.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/NOC/arch-ALTIX_NAUTILUS.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/NOC/arch-ALTIX_NAUTILUS.fcm	(revision 12176)
@@ -0,0 +1,33 @@
+# ifort (mpif90) compiler options for NOCS ALTIX cluster nautilus
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/sw/packages/netcdf/3.6.2/x86_64/include
+%NCDF_LIB            -L/sw/packages/netcdf/3.6.2/x86_64/lib -lnetcdf
+%FC                  mpif90
+%FCFLAGS             -r8 -O3 -xT -ip -vec-report0
+%FFLAGS              -r8 -O3 -xT -ip -vec-report0
+%LD                  mpif90
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS
+%AR                  ar 
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
+# - if debugging use these flags
+#FCFLAGS             -g -traceback -r8 -O0 -xT -ip -vec-report0
+#FFLAGS              -g -traceback -r8 -O0 -xT -ip -vec-report0
Index: /utils/build_MERGE_2019/arch/depr/NOC/arch-XT6_HECTORcrayftn.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/NOC/arch-XT6_HECTORcrayftn.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/NOC/arch-XT6_HECTORcrayftn.fcm	(revision 12176)
@@ -0,0 +1,44 @@
+# compiler options for hector CRAY XT6 (using crayftn compiler)
+
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+# PrgEnv-cray (default for hector phase 3)
+# use "module load netcdf/4.1.2" to setup netcdf (defines NETCDF_DIR and HDF5_DIR)
+
+%NCDF_HOME           $NETCDF_DIR
+%HDF5_HOME           $HDF5_DIR
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -lnetcdf -lhdf5_fortran -lhdf5_hl -lhdf5 -lz
+%FC                  ftn
+%FCFLAGS             -em -s integer32 -s real64 -O3
+%FFLAGS              -em -s integer32 -s real64 -O3
+%LD                  ftn
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS
+%AR                  ar 
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
+# replacement options for GNU prgenv
+
+# %NCDF_HOME           $CRAY_NETCDF_DIR/netcdf-gnu
+# %HDF5_HOME           $CRAY_HDF5_DIR/hdf5-gnu
+# %FCFLAGS             -fdefault-real-8 -O3
+# %FFLAGS              -fdefault-real-8 -O3
Index: /utils/build_MERGE_2019/arch/depr/NOC/arch-pgf90_mobius.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/NOC/arch-pgf90_mobius.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/NOC/arch-pgf90_mobius.fcm	(revision 12176)
@@ -0,0 +1,32 @@
+# mpi compiler options for NOCL's cluster Mobius
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC             -I/cm/shared/apps/netcdf/pgi/64/4.1.1/include -I/usr/mpi/qlogic/include
+%NCDF_LIB             -L/cm/shared/apps/pgi/7.1-6/linux86-64/7.1-6/lib -L/usr/mpi/qlogic/lib64  -L/cm/shared/apps/netcdf/pgi/64/4.1.1/lib -lnetcdf
+%FC	             mpif90 -c
+%FCFLAGS             -i4 -r8 -O3 -Mfree  
+## FCFLAGS for debugging
+#%FCFLAGS             -i4 -r8 -Mfree -Ktrp=fp -g -C 
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS                  
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             -rs 
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/depr/UKMO/arch-PW6_METO.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/UKMO/arch-PW6_METO.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/UKMO/arch-PW6_METO.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# IBM POWER6  UKMO
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/opt/netcdf/netcdf-3.6.0-p1_ec/include
+%NCDF_LIB            -L /opt/netcdf/netcdf-3.6.0-p1_ec/lib -lnetcdf
+%FC                  mpxlf90_r
+%FCFLAGS             -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr6 -NS32768 -I/opt/netcdf-3.6.0-p1_ex/include -qxflag=p6div:p6divmsg -g -O3 -qnostrict 
+%FFLAGS              -qrealsize=8 -qextname -qsuffix=f=f90 -qarch=pwr6 -NS32768 -I/opt/netcdf-3.6.0-p1_ex/include -qxflag=p6div:p6divmsg -g -O3 -qnostrict 
+%LD                  mpxlf90_r
+%LDFLAGS             -L /opt/netcdf/netcdf-3.6.0-p1_ec/lib -lnetcdf -O3 -L/projects/um1/lib -lsig -O3 -L MASS
+%FPPFLAGS            -E -P -traditional -I/usr/lpp/ppe.poe/include/thread64
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
Index: /utils/build_MERGE_2019/arch/depr/UKMO/arch-XT6_HECTOR.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/UKMO/arch-XT6_HECTOR.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/UKMO/arch-XT6_HECTOR.fcm	(revision 12176)
@@ -0,0 +1,44 @@
+# compiler options for hector CRAY XT6
+
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+# PGI prgenv (default for hector)
+# use "module load netcdf" to setup system netcdf
+
+%NCDF_HOME           $CRAY_NETCDF_DIR/netcdf-pgi
+%HDF5_HOME           $CRAY_HDF5_DIR/hdf5-pgi
+%NCDF_INC            -I%NCDF_HOME/include -I%HDF5_HOME/include
+%NCDF_LIB            -L%HDF5_HOME/lib -L%NCDF_HOME/lib -lnetcdf -lhdf5_fortran -lhdf5_hl -lhdf5 -lz
+%FC                  ftn
+%FCFLAGS             -i4 -r8 -O3
+%FFLAGS              -i4 -r8 -O3
+%LD                  ftn
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS
+%AR                  ar 
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
+# replacement options for GNU prgenv
+
+# %NCDF_HOME           $CRAY_NETCDF_DIR/netcdf-gnu
+# %HDF5_HOME           $CRAY_HDF5_DIR/hdf5-gnu
+# %FCFLAGS             -fdefault-real-8 -O3
+# %FFLAGS              -fdefault-real-8 -O3
Index: /utils/build_MERGE_2019/arch/depr/arch-linux_g95.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/arch-linux_g95.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/arch-linux_g95.fcm	(revision 12176)
@@ -0,0 +1,30 @@
+# generic g95 compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/netcdf/include
+%NCDF_LIB            -L/usr/local/netcdf/lib -lnetcdf
+%FC	             g95
+%FCFLAGS             -i4 -r8 -O3 -funroll-all-loops -fno-second-underscore 
+%FFLAGS              %FCFLAGS
+%LD                  g95
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/depr/arch-linux_lahey.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/arch-linux_lahey.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/arch-linux_lahey.fcm	(revision 12176)
@@ -0,0 +1,30 @@
+# generic Lahey/Fujitsu compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/netcdf/include
+%NCDF_LIB            -L/usr/local/netcdf/lib -lnetcdf
+%FC	             lf95
+%FCFLAGS             -i4 -CcdRR8
+%FFLAGS              %FCFLAGS
+%LD                  lf95
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/depr/arch-linux_nag.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/arch-linux_nag.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/arch-linux_nag.fcm	(revision 12176)
@@ -0,0 +1,30 @@
+# generic NagWare compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/netcdf/include
+%NCDF_LIB            -L/usr/local/netcdf/lib -lnetcdf
+%FC	             f95
+%FCFLAGS             -i4 -r8 -gline -O3
+%FFLAGS              %FCFLAGS
+%LD                  f95
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/depr/arch-linux_pathscale.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/arch-linux_pathscale.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/arch-linux_pathscale.fcm	(revision 12176)
@@ -0,0 +1,30 @@
+# generic pathscale compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/netcdf/include
+%NCDF_LIB            -L/usr/local/netcdf/lib -lnetcdf
+%FC	             pathf95
+%FCFLAGS             -r8 -O3 -funroll
+%FFLAGS              %FCFLAGS
+%LD                  pathf95
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             -r
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/depr/arch-mpxlf_aix.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/arch-mpxlf_aix.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/arch-mpxlf_aix.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# generic IBM SP
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/pub/NetCDF/3.6.2/include
+%NCDF_LIB            -L /usr/local/pub/NetCDF/3.6.2/lib -lnetcdf
+%FC                  mpxlf90_r
+%FCFLAGS             -qfree=f90 -O3 -qrealsize=8 -qextname -qsource -q64 -qlargepage -qmaxmem=-1
+%FFLAGS              -qfixed -O3 -qrealsize=8 -qextname -qsource -q64 -qlargepage -qmaxmem=-1
+%LD                  mpxlf90_r
+%LDFLAGS
+%FPPFLAGS            -P -C
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
Index: /utils/build_MERGE_2019/arch/depr/arch-osx_g95.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/arch-osx_g95.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/arch-osx_g95.fcm	(revision 12176)
@@ -0,0 +1,30 @@
+# generic g95 compiler options for OSX (intel)
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/netcdf/include
+%NCDF_LIB            -L/usr/local/netcdf/lib -lnetcdf
+%FC	             g95
+%FCFLAGS             -i4 -r8 -O3 -funroll-all-loops  
+%FFLAGS              %FCFLAGS
+%LD                  g95
+%LDFLAGS
+%FPPFLAGS            -P -C -traditional
+%AR                  libtool
+%ARFLAGS             -c -s -o
+%MK                  make
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
+
Index: /utils/build_MERGE_2019/arch/depr/arch-osx_ifort.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/arch-osx_ifort.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/arch-osx_ifort.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# generic ifort (with mpi) compiler options for OSX (intel)
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/include 
+%NCDF_LIB            -L /usr/local/lib -lnetcdf   
+%FC                  mpif90
+%FCFLAGS 	     -r8 -O3  -traceback 
+%FFLAGS 	     -r8 -O3  -traceback 
+%LD                  mpif90
+%FPPFLAGS            -P -C -traditional
+%LDFLAGS
+%AR                  libtool 
+%ARFLAGS             -c -s -o
+%MK                  make
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB 
Index: /utils/build_MERGE_2019/arch/depr/arch-osx_xlf.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/arch-osx_xlf.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/arch-osx_xlf.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# generic xlf compiler options for OSX (ppc)
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC      -I/usr/local/XLF/netcdf/include
+%NCDF_LIB      -L/usr/local/XLF/netcdf/lib -lnetcf
+%FC            xlf90
+%FCFLAGS       -O3 -qrealsize=8 -qextname -qsuffix=f=f90 -qsuffix=cpp=F90
+%FFLAGS        -O3 -qrealsize=8 -qextname -qsuffix=f=f -qsuffix=cpp=F
+%FPPFLAGS        -P -C -traditional
+%LD            xlf90
+%LDFLAGS
+%AR            ar
+%ARFLAGS       rs
+%MK            make
+%USER_INC      %NCDF_INC
+%USER_LIB      %NCDF_LIB 
Index: /utils/build_MERGE_2019/arch/depr/misc/arch-PW6_C1A.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/misc/arch-PW6_C1A.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/misc/arch-PW6_C1A.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# POWER 6 at ECMWF
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make  
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir> 
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+#-g -C -qsigtrap 
+
+%NCDF_INC            -I /usr/local/apps/netcdf/3.6.3/LP64/include
+%NCDF_LIB            -L /usr/local/apps/netcdf/3.6.3/LP64/lib -lnetcdf
+%FC                  mpxlf90_r
+%FCFLAGS             -qfree=f90 -O3 -qrealsize=8 -qextname -qsource -q64 -qlargepage -qmaxmem=-1 -qsource
+%FFLAGS              -qfixed -O3 -qrealsize=8 -qextname -qsource -q64 -qlargepage -qmaxmem=-1 -qsource
+%LD                  mpxlf90_r
+%LDFLAGS    
+%FPPFLAGS            -P -C
+%AR                  ar  
+%ARFLAGS             rs
+%MK                  gmake 
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB 
Index: /utils/build_MERGE_2019/arch/depr/misc/arch-X64_VAYU.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/misc/arch-X64_VAYU.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/misc/arch-X64_VAYU.fcm	(revision 12176)
@@ -0,0 +1,59 @@
+# Vayu Sun Constellation at Australian NCI, http://nf.nci.org.au/facilities/vayu/hardware.php
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /short/e14/$( whoami )/util
+%HDF5_HOME           /short/e14/$( whoami )/util
+%XIOS_HOME           /short/e14/$( whoami )/now/models/xios
+%OASIS_HOME          /short/e14/$( whoami )/now/models/oa3mct
+
+%NCDF_INC            -I%NCDF_HOME/include 
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -lhdf5 -lz
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpif90 -c -cpp
+%FCFLAGS             -i4 -r8
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/depr/misc/arch-X64_YELLOWSTONE.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/misc/arch-X64_YELLOWSTONE.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/misc/arch-X64_YELLOWSTONE.fcm	(revision 12176)
@@ -0,0 +1,59 @@
+# Yellowstone IBM at NCAR, http://www2.cisl.ucar.edu/resources/yellowstone
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /glade/apps/opt/netcdf-mpi/4.2/intel/12.1.4
+%HDF5_HOME           /glade/apps/opt/hdf5-mpi/1.8.9/intel/12.1.4
+%XIOS_HOME           /glade/p/work/$( whoami )/now/models/xios
+%OASIS_HOME          /glade/p/work/$( whoami )/now/models/oa3mct
+
+%NCDF_INC            -I%NCDF_HOME/include 
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdff -lnetcdf -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -lhdf5
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
+%OASIS_LIB           -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
+
+%CPP	             cpp
+%FC                  mpif90 -c -cpp
+%FCFLAGS            -i4 -r8 -O3 -fp-model precise -xAVX
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
+
+%CC                  cc
+%CFLAGS              -O0
Index: /utils/build_MERGE_2019/arch/depr/misc/arch-xlf_aix.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/misc/arch-xlf_aix.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/misc/arch-xlf_aix.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# generic IBM SP
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/pub/NetCDF/3.6.2/include
+%NCDF_LIB            -L /usr/local/pub/NetCDF/3.6.2/lib -lnetcdf
+%FC                  xlf90_r
+%FCFLAGS             -qsuffix=f=f90 -qrealsize=8 -qextname -NS32768 -qnostrict -O5 -d -qsmp=omp -qhot -qessl -qipa -qreport
+%FFLAGS              -qrealsize=8 -qextname -NS32768 -qnostrict -O5 -d -qsmp=omp -qhot -qessl -qipa -qreport 
+%LD                  xlf90_r
+%LDFLAGS
+%FPPFLAGS            -P -C
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
Index: /utils/build_MERGE_2019/arch/depr/misc/arch-xlf_pwr6.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/depr/misc/arch-xlf_pwr6.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/depr/misc/arch-xlf_pwr6.fcm	(revision 12176)
@@ -0,0 +1,29 @@
+# generic IBM SP
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%NCDF_INC            -I/usr/local/pub/NetCDF/3.6.2/include
+%NCDF_LIB            -L /usr/local/pub/NetCDF/3.6.2/lib -lnetcdf
+%FC                  xlf90_r
+%FCFLAGS             -qsuffix=f=f90 -qrealsize=8 -qextname -qarch=pwr6 -qtune=pwr6 -NS32768 -qxflag=p6div:p6divmsg -qnostrict -O5 -d -qsmp=omp -qhot -qessl -qipa -qreport
+%FFLAGS              -qrealsize=8 -qextname -qarch=pwr6 -qtune=pwr6 -NS32768 -qxflag=p6div:p6divmsg -qnostrict -O5 -d -qsmp=omp -qhot -qessl -qipa -qreport 
+%LD                  xlf90_r
+%LDFLAGS
+%FPPFLAGS            -P -C
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %NCDF_INC
+%USER_LIB            %NCDF_LIB
Index: /utils/build_MERGE_2019/arch/misc/arch-PW7_C2A_XIO.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/misc/arch-PW7_C2A_XIO.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/misc/arch-PW7_C2A_XIO.fcm	(revision 12176)
@@ -0,0 +1,54 @@
+# POWER 6 at ECMWF
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make  
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+# CC          C compiler used to compile conv for AGRIF
+# CFLAGS      compiler flags used with CC
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+#options:
+#
+#debug   : g -C -qinitauto=7FBFFFFF -qfloat=nans -qflttrap=overflow:underflow:zerodivide:invalid:enable
+#portage : -qsource
+#format  : -qfree=f90 -qfixed -qsuffix=f=f90 -qsuffix=cpp=F90
+#others  : -qmaxmem=-1 -qsave -qlargepage 
+#
+%NCDF_INC            -I${NETCDF_INC1}
+%NCDF_LIB            -L${NETCDF_LIB1} -lnetcdff -lnetcdf -L${HDF5_LIB} -lhdf5_hl -lhdf5 -lz
+%XIOS_INC            -I${XIOS_INC}
+%XIOS_LIB            -L${XIOS_LIB} -lxios
+
+%XLF90_LIB           -lxlf90_r
+
+%CPP	             cpp
+%FC                  mpxlf90_r
+%FCFLAGS             -qsuffix=f=f90 -qsuffix=cpp=F90 -qfree=f90 -O3 -qrealsize=8 -qarch=auto -qtune=auto -qinitauto
+%FFLAGS              -qsuffix=f=f90 -qsuffix=cpp=F90 -qfixed    -O3 -qrealsize=8 -qarch=auto -qtune=auto -qinitauto
+%LD                  mpCC_r
+%FPPFLAGS
+%LDFLAGS             -O2
+%AR                  ar  
+%ARFLAGS             -r
+%MK                  gmake 
+%USER_INC            %XIOS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %NCDF_LIB %XLF90_LIB
+
+%CC                  xlc
+%CFLAGS              -O -qcpluscmt
Index: /utils/build_MERGE_2019/arch/misc/arch-X64_BULL.fcm
===================================================================
--- /utils/build_MERGE_2019/arch/misc/arch-X64_BULL.fcm	(revision 12176)
+++ /utils/build_MERGE_2019/arch/misc/arch-X64_BULL.fcm	(revision 12176)
@@ -0,0 +1,31 @@
+# generic ifort compiler options for linux
+# NCDF_INC    netcdf include file
+# NCDF_LIB    netcdf library
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# 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
+# MK          make
+# USER_INC    additional include files for the compiler,  e.g. -I<include dir>
+# USER_LIB    additional libraries to pass to the linker, e.g. -l<library>
+
+
+%CPP	             cpp
+%FC                  mpiifort -c -cpp
+%FCFLAGS             -g -i4 -r8 -O3 -fp-model precise -march=native -mtune=native -qoverride-limits -fno-alias -qopt-report=4 -align array64byte -traceback
+%FFLAGS              %FCFLAGS
+%LD                  scorep-mpiifort
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional -std=c99
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            -I/empty
+%USER_LIB            -lnetcdff -lnetcdf -lhdf5
+
+%CC                  mpiicc
+%CFLAGS              -O3 -march=native -mtune=native
Index: /utils/build_MERGE_2019/makenemo
===================================================================
--- /utils/build_MERGE_2019/makenemo	(revision 12176)
+++ /utils/build_MERGE_2019/makenemo	(revision 12176)
@@ -0,0 +1,404 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ===============
+# makenemo
+# ===============
+#
+# --------------------------
+# Compile NEMO
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ makenemo
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# This script aims :
+#
+# - to choose MYCONFIG
+# - to choose compiler options
+# - to create the CONFIG/MYCONFIG/WORK directory
+# - to compile this configuration
+#
+#  Variables used :
+#
+#  From user input
+#
+# - NEW_CONF    : configuration to be created
+# - REF_CONF    : reference configuration to build the new one from
+# - CMP_NAM     : compiler name
+# - NBR_PRC     : number of processes used to compile
+# - RMT_CONF    : unsupported (external) configuration to build the new one from
+# - NEM_SUBDIR  : NEMO subdirectory used (specified)
+#
+#  Locally defined :
+#
+# - TAB         : NEMO subdirectory used (read)
+# - MAIN_DIR    : self explaining
+# - CONFIG_DIR  :   "    "    "
+# - MODELES_DIR :   "    "    "
+# - TOOLS_DIR   :   "    "    "
+# - NEMO_DIR    :   "    "    "
+# - REMOTE_CTL  : URL link to a remote resource list for an external configuration
+#                 which is not part of the reference suite
+# - LOCAL_REF   : Nearest reference configuration to an external configuration
+#                 which is not part of the reference suite
+#                 (used to populate work directories if remote access is not available)
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./makenemo -m ifort_osx - j3 -n ORCA2_SI3_PISCES
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+#-
+##- Initialization of the options ---
+x_d=''; x_h=''; x_n=''; x_r='';
+x_u=''; x_a=''; x_m=''; x_t='';
+x_c='';
+x_j='1'; x_e='none'; x_s='src'; x_v='1'
+
+##- Local variables ---
+b_n=$(basename ${0})
+OPTIND='1'
+MAIN_DIR=$(cd $(dirname "$0"); pwd)
+MAIN_DIR=${MAIN_DIR%/sette*}
+MAIN_DIR=${MAIN_DIR%/tools*}
+MAIN_DIR=${MAIN_DIR%/cfgs*}
+export MAIN_DIR
+#
+export CONFIG_DIR=${MAIN_DIR}/cfgs
+export TOOLS_DIR=${MAIN_DIR}/tools
+export COMPIL_DIR=${MAIN_DIR}/mk
+export NEMO_DIR=${MAIN_DIR}/${x_s}
+export AGRIFUSE='10'
+list_key='0'; chk_key='1'
+list_add_key=''; list_del_key='';
+conf_file=ref_cfgs.txt
+#-
+#- FCM and functions location ---
+export PATH=${MAIN_DIR}/ext/FCM/bin:$PATH
+
+#-
+#- Choice of the options ---
+while getopts :hd:n:r:u:a:m:j:e:s:v:t:k: option; do
+
+	case $option in
+		('h') cat <<EOF
+Usage:
+------
+./makenemo -[aru] CONFIG -m ARCH [-[dehjntv] ...] [{list_key,clean,clean_config}]
+                                                  [{add_key,del_key} ...]
+
+Mandatory
+   -m    Computing architecture (./arch), FCM file describing the compilation settings
+
+   and one of the following option (use 'all' arg to list available items)
+
+   -r    Reference configuration (./cfgs), proven with long-term support
+   -a    Academic test case (./tests), ready-to-use configuration with no support over time
+   -u    Scripted remote configuration (see ./tests/rmt_cfgs.txt)
+
+Optional
+   -d    New set of sub-components (subfolders from ./src directory)
+   -e    Path for alter patch  location (default: 'MY_SRC' in configuration folder)
+   -h    Print this help
+   -j    Number of processes to compile (0: dry run with no build)
+   -n    Name for new configuration
+   -s    Path for alter source location (default: 'src' root directory)
+   -t    Path for alter build  location (default: 'BLD' in configuration folder)
+   -v    Level of verbosity ([0-3])
+
+Examples
+   ¤ Configuration creation
+        Build          : ./makenemo         -[aru] ... [...]
+        Copy           : ./makenemo -n ...  -[aru] ... [...]
+   ¤ Configuration management
+        List CPP keys  : ./makenemo -n ... list_key
+        Add-Remove keys: ./makenemo -n ... add_key '...' del_key '...'
+        Fresh start    : ./makenemo -n ... clean
+        Removal        : ./makenemo -n ... clean_config
+EOF
+				exit 0       ;;
+	  	('d') x_d=${OPTARG};; ('n') x_n=${OPTARG};; ('r') x_r=${OPTARG};; ('u') x_u=${OPTARG};;
+		('a') x_a=${OPTARG};; ('m') x_m=${OPTARG};; ('j') x_j=${OPTARG};; ('t') x_t=${OPTARG};;
+		('e') x_e=${OPTARG};; ('s') x_s=${OPTARG};; ('v') x_v=${OPTARG}                      ;;
+		('k') chk_key=${OPTARG}                                                              ;;
+		(':') echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2;	exit 2             ;;
+		('?') echo ${b_n}" : -"${OPTARG}" option : not supported" 1>&2;	exit 2             ;;
+	esac
+
+done
+
+shift $(($OPTIND-1));
+
+## Get clean, clean_config options
+while [ ${#1} -gt 0 ]; do
+
+	case "$1" in
+		'clean'       ) x_c="--$1"                                     ;;
+		'clean_config') . ${COMPIL_DIR}/Fclean_config.sh; exit         ;;
+		## Checking if argument has anything other than whitespace
+		'add_key'     ) [[ ! "$2" =~ ^\ +$ ]] && list_add_key=$2; shift;;
+		'del_key'     ) [[ ! "$2" =~ ^\ +$ ]] && list_del_key=$2; shift;;
+		'list_key'    ) list_key='1'                                   ;;
+		'*'           ) echo " \"$1\" BAD OPTION"; exit 2              ;;
+	esac
+
+	shift
+done
+
+
+export NEW_CONF=${x_n}
+NBR_PRC=${x_j}
+CMP_NAM=${x_m}
+NEM_SUBDIR=${x_d}
+REF_CONF=${x_r}
+DEMO_CONF=${x_a}
+RMT_CONF=${x_u}
+TML_CONF=${REF_CONF}
+export NEMO_DIR=${MAIN_DIR}/${x_s}
+
+[ "${CMP_NAM}" == 'all' ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit
+
+
+## No ref. cfg, demo case, nor remote cfg selected
+if [[ -z "${REF_CONF}" && -z "${DEMO_CONF}" && -z "${RMT_CONF}" ]]; then
+
+		## Reuse last configuration compiled if any (existing 'work_cfgs.txt')
+#		if [[ $( find ./cfgs ./tests -name work_cfgs.txt ) ]]; then
+#			CONFIG_DIR=${MAIN_DIR}/$( ls -rt */work_cfgs.txt | awk -F/ 'END{ print $1}' )
+#			TML_CONF=$( tail -1 ${CONFIG_DIR}/work_cfgs.txt | awk '{ print $1 }' )
+#		else
+			## No ${REF_CONF}, ${DEMO_CONF}, ${RMT_CONF} nor ${NEM_SUBDIR} and 1st compilation => exit
+#			echo -e "\033[0;33m\nNo previous build found!"
+			echo -e "\033[0;31m\nAt least a reference configuration ('-r'), a test case ('-a'), "
+			echo -e "a remote configuration ('-u') has to be choosen!!!\033[0m"
+			${COMPIL_DIR}/Flist_cfgs.sh
+			exit 2
+#		fi
+
+## At least one config has been requested
+else
+
+	## 'all' arg: list all available configurations
+	if [[ "${REF_CONF}" == 'all' || "${DEMO_CONF}" == 'all' || "${RMT_CONF}" == 'all' ]]; then
+		${COMPIL_DIR}/Flist_cfgs.sh
+		exit 2
+   ## Probably useless but who knows?
+	elif [[ -n "${REF_CONF}" && -n "${DEMO_CONF}" ]]; then
+		echo -e "\033[0;31m\nYou have to choose whether you work with:"
+		echo -e "  - LTS configurations in ./cfgs  ('-r') or"
+		echo -e "  - Unsupported cases  in ./tests ('-a')\033[0m\n"
+		exit 2
+	fi
+
+	## Remote cfg
+	if   [ -n "${RMT_CONF}" ]; then
+		conf_file=rmt_cfgs.txt; CONFIG_DIR=${MAIN_DIR}/tests;
+
+		if [[ ! $( grep ${RMT_CONF} ${CONFIG_DIR}/${conf_file} ) ]]; then
+				echo -e "\033[0;31m\nThe reference configuration ('-r'), test case ('-a') or "
+				echo -e "remote configuration ('-u') selected is not available!!!"
+				echo -e "Check the option used and the available items in .txt files\033[0m"
+				${COMPIL_DIR}/Flist_cfgs.sh
+				exit 2
+		fi
+
+		## Little tricky this one
+		for word in $( grep ${RMT_CONF} ${CONFIG_DIR}/${conf_file} ); do
+			words[${#words[@]}]=$word
+		done
+
+		TML_CONF=${words[2]}; NEM_SUBDIR=${words[4]}; URL=${words[6]}
+
+	## Demo case
+	elif [ -n "${DEMO_CONF}" ]; then
+		conf_file=demo_cfgs.txt; CONFIG_DIR=${MAIN_DIR}/tests; TML_CONF=${DEMO_CONF}
+	fi
+
+fi
+
+## Test if ref. cfg or demo case does exist
+if [[ ! $( grep "${TML_CONF} " ${CONFIG_DIR}/*_cfgs.txt ) ]]; then
+	echo -e "\033[0;31m\nThe reference configuration ('-r'), demonstration case ('-a') or "
+	echo -e "remote configuration ('-u') selected is not available!!!"
+	echo -e "Check the option used and the available items in .txt files\033[0m"
+	${COMPIL_DIR}/Flist_cfgs.sh
+	exit 2
+
+else
+
+	## Reuse a working cfg
+	if [[ -f ${CONFIG_DIR}/work_cfgs.txt && $( grep "${TML_CONF} " ${CONFIG_DIR}/work_cfgs.txt ) ]]; then
+		conf_file=work_cfgs.txt
+	fi
+
+	## If new cfg exists, work in it
+	[ -z "${NEW_CONF}" ] && NEW_CONF=${TML_CONF}
+
+	## Update sub-comps if needed
+	if [ -z "${NEM_SUBDIR}" ]; then
+			NEM_SUBDIR=$( grep "${TML_CONF} " ${CONFIG_DIR}/${conf_file}  | awk '{$1 = ""; print $0}' )
+	fi
+
+fi
+
+export NEMO_TDIR=${x_t:-$CONFIG_DIR}
+
+## Save new configuration with sub-components set in work_cfgs.txt
+[ -f ${CONFIG_DIR}/work_cfgs.txt ] && sed -i "/${NEW_CONF} /d" ${CONFIG_DIR}/work_cfgs.txt
+echo ${NEW_CONF} "${NEM_SUBDIR}" \
+	>> ${CONFIG_DIR}/work_cfgs.txt
+
+cd ${CONFIG_DIR}
+
+printf "\nYou are installing a new configuration %s from %s " ${NEW_CONF} ${TML_CONF}
+printf  "with sub-components: %s\n"  "${NEM_SUBDIR}"
+
+## Create new config even in existing one (mkdir with -p option, cp with -n)
+${COMPIL_DIR}/Fmake_config.sh ${NEW_CONF} ${TML_CONF}
+
+## create EXP00 if needed
+[ ! -d ${CONFIG_DIR}/${NEW_CONF}/EXP00 ] && \cp -R -n ${CONFIG_DIR}/${NEW_CONF}/EXPREF ${CONFIG_DIR}/${NEW_CONF}/EXP00
+
+## Get online script file for remote cfg
+[ -n "${RMT_CONF}" ] && ${COMPIL_DIR}/Ffetch_extdir.sh ${NEW_CONF} $URL
+
+#- Create the WORK ---
+#- Clean links and librairies ---
+#- Creating the good links, at first on OCE ---
+. ${COMPIL_DIR}/Fmake_WORK.sh ${x_e} ${NEW_CONF} ${NEM_SUBDIR} || exit 3
+
+. ${COMPIL_DIR}/Fmake_bld.sh ${CONFIG_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit 3
+
+# build the complete list of the cpp keys of this configuration
+if [ ${chk_key} -eq 1 ] ; then
+
+	for i in $( grep "^ *#.* key_" ${NEW_CONF}/WORK/* ); do
+		echo $i | grep key_ | sed -e "s/=.*//"
+	done \
+	| sort -d | uniq > ${COMPIL_DIR}/full_key_list.txt
+
+	[ ${list_key} -eq 1 ] && cat ${COMPIL_DIR}/full_key_list.txt && exit 0
+
+fi
+
+#- At this stage new configuration has been added, we add or remove keys
+[ ! -z "${list_add_key}" ] && { . ${COMPIL_DIR}/Fadd_keys.sh ${NEW_CONF} add_key ${list_add_key}; }
+[ ! -z "${list_del_key}" ] && { . ${COMPIL_DIR}/Fdel_keys.sh ${NEW_CONF} del_key ${list_del_key}; }
+
+#- check that all keys are really existing...
+if [ $chk_key -eq 1 ] ; then
+
+	for kk in $( cat ${NEW_CONF}/cpp_${NEW_CONF}.fcm ); do
+
+		if [ "$( echo $kk | cut -c 1-4 )" == "key_" ]; then
+			kk=${kk/=*/}
+
+			if [ ! $( grep $kk ${COMPIL_DIR}/full_key_list.txt ) ]; then
+				echo
+				echo "E R R O R : key "$kk" is not found in ${NEW_CONF}/WORK routines..."
+				echo "we stop..."
+				echo
+				exit 1
+			fi
+
+		fi
+
+	done
+
+fi
+
+#- At this stage cpp keys have been updated. we can check the arch file
+#- When used for the first time, choose a compiler ---
+. ${COMPIL_DIR}/Fcheck_archfile.sh arch_nemo.fcm cpp.fcm ${CMP_NAM} || exit 3
+
+#- At this stage the configuration has beeen chosen
+#- We coose the default light file
+export USEBLD=bldxag.cfg
+
+#- We look after agrif
+grep key_agrif ${COMPIL_DIR}/cpp.fcm && export AGRIFUSE=1 && export USEBLD=${USEBLD/xag/}
+. ${COMPIL_DIR}/Fprep_agrif.sh ${NEW_CONF} ${NEMO_TDIR} || exit 3
+
+#-
+#_ END OF CONFIGURATION PHASE
+#_
+
+#-
+#- Compile ---
+
+if [ "${NBR_PRC}" -gt 0 ]; then
+	cd ${NEMO_TDIR}/${NEW_CONF} || cd -
+
+	## if AGRIF we do a first preprocessing
+	if [[ ${#x_c} -eq 0 && "$AGRIFUSE" -eq 1 ]]; then
+		fcm build --ignore-lock -j 1 ${COMPIL_DIR}/bld_preproagr.cfg ||{ cd - ; exit 1 ;}
+		echo ''
+		echo "---------------------------------"
+		echo "CONV preprocessing successfull !!"
+		echo "---------------------------------"
+		echo ''
+	fi
+
+	fcm build ${x_c} --ignore-lock -v ${x_v} -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD ||{ cd - ; exit 1 ;}
+
+	if [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ]; then
+		ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe  ${CONFIG_DIR}/${NEW_CONF}/EXP00/nemo
+	fi
+
+	## add remove for clean option
+	if [ ${#x_c} -ne 0 ]; then
+
+		echo 'Cleaning in '${NEW_CONF}' the building folders'
+
+      for dir in AGRIFLIB BLD EXP00 LONG NEMOFILES REPRO_* SHORT WORK; do
+         rm -rf ${NEMO_TDIR}/${NEW_CONF}/$dir
+      done
+
+      for file in cpp.history cpp.fcm full_key_list.txt; do
+         rm -f  ${COMPIL_DIR}/$file
+      done
+
+   fi
+
+fi
+
+#- Come back to original directory ---
+cd -
+
+#-
+#- Unset variables
+${COMPIL_DIR}/Fclean_var.sh
Index: /utils/build_MERGE_2019/maketools
===================================================================
--- /utils/build_MERGE_2019/maketools	(revision 12176)
+++ /utils/build_MERGE_2019/maketools	(revision 12176)
@@ -0,0 +1,186 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u 
+#set -e
+#+
+#
+# ===============
+# maketools
+# ===============
+#
+# --------------------------
+# Compile NEMO
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ maketools
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# This script aims :
+#
+# - to choose a tool to compile
+# - to choose compiler options  
+# - to compile this tool
+#
+#  Variables used :
+#
+#  From user input
+#
+# - NEW_CONF    : configuration to be created
+# - CMP_NAM     : compiler name 
+# - NBR_PRC     : number of processes used to compile  
+#
+#  Locally defined :
+#
+# - MAIN_DIR : self explaining
+# - MODELES_DIR :   "    "    " 
+# - TOOLS_DIR   :   "    "    " 
+# - NEMO_DIR    :   "    "    "
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./maketools -t ifort_osx - j3 -n NESTING
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+#- Local variables ---
+b_n=$(basename ${0})
+export MAIN_DIR=${PWD%/tools*}
+export TOOLS_DIR=${MAIN_DIR}/tools
+export COMPIL_DIR=${MAIN_DIR}/mk
+export NEMO_DIR=${MAIN_DIR}/NEMO
+#-
+#- FCM and functions location ---
+export PATH=${MAIN_DIR}/ext/FCM/bin:$PATH
+
+#-
+#- Choice of the options ---
+x_h="";
+x_n="";
+x_m="";
+x_t="";
+x_c="";
+x_j=1;
+while getopts :hm:n:r:j:t: V
+  do
+	 case $V in
+		(h)  x_h=${OPTARG};
+                          echo "Usage	 : "${b_n} \
+					 " [-h] [-n name] [-m arch] [-j No] [-t tmpdir]";
+			  echo " -h	 : help";
+                          echo " -h institute : specific help for consortium members";
+			  echo " -n name : tool name, [-n help] to list existing tools";
+			  echo " -m arch : choose compiler, [-m help] to list exiting compilers";
+			  echo " -j No	 : number of processes used to compile (0=nocompilation)";
+			  echo " -t dir  : remporary directory for compilation"
+			  echo "";
+			  echo "Example to compile Agrif Nesting tools";
+			  echo "maketools -n NESTING" ;
+			  echo "";
+                          printf "%s\n" "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools`;
+			  echo "";
+                          . ${COMPIL_DIR}/Flist_archfile.sh  ${x_h};
+			  echo "";
+			  echo "Default : previous tool and compiler";
+			  exit 0;;
+		(n)  x_n=${OPTARG};;
+		(m)  x_m=${OPTARG};;
+		(j)  x_j=${OPTARG};;
+		(t)  x_t=${OPTARG};;
+		(:)  echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2;
+			  exit 2;;
+		(\?) echo ${b_n}" : -"${OPTARG}" option : not supported" 1>&2;
+			  exit 2;;
+	 esac
+  done
+shift $(($OPTIND-1));
+
+#-
+#- Get the clean option
+[[ "${#@}" -ne 0 && "${@}" != clean ]] && echo "Invalid option "$@" " && exit
+[ "${#@}" -ne 0 ] && x_c="--$@"
+
+#-
+#- Go to NEMOGCM/tools directory ---
+cd ${TOOLS_DIR}
+
+#-
+#- Initialisation from input ---
+export NEW_CONF=${x_n}
+NBR_PRC=${x_j}
+CMP_NAM=${x_m}
+NEMO_TDIR=${x_t:-$NEMO_TDIR}
+export NEMO_TDIR=${NEMO_TDIR:-$TOOLS_DIR}
+
+#- Check if the tool or the compiler exist or list it
+[ "${NEW_CONF}" == help ] && printf "%s\n"  "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools` && exit
+[ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit
+
+#- When used for the first time, choose a compiler ---
+. ${COMPIL_DIR}/Fcheck_archfile.sh arch_tools.fcm cpp.fcm ${CMP_NAM} || exit
+
+#- Choose a default tool if needed ---
+#- REBUILD or last one used ---
+. ${COMPIL_DIR}/Fcheck_config.sh tools.txt ${NEW_CONF} || exit
+
+#- Save new configuration ---
+echo "${NEW_CONF} "  > ${COMPIL_DIR}/tools.txt
+
+#- Make the building directory
+. ${COMPIL_DIR}/Fmake_bld.sh ${TOOLS_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit
+
+#-
+#_ END OF CONFIGURATION PHASE
+#_
+
+#-
+#- Compile ---
+
+if [ "${NBR_PRC}" -gt 0 ]; then
+cd ${NEMO_TDIR}/${NEW_CONF} || cd -
+
+fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld_tools.cfg || cd -
+if [ -n "$(ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe)" ]; then
+for i in `ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe`
+   do
+      ln -sf ${i}  ${TOOLS_DIR}/${NEW_CONF}/.
+   done
+fi
+fi
+#-
+#- Come back to original directory ---
+cd -
+
+#-
+#- Unset variables
+${COMPIL_DIR}/Fclean_var.sh
+
+exit 0;
Index: /utils/build_MERGE_2019/maketools_ENHANCE-03_domcfg
===================================================================
--- /utils/build_MERGE_2019/maketools_ENHANCE-03_domcfg	(revision 12176)
+++ /utils/build_MERGE_2019/maketools_ENHANCE-03_domcfg	(revision 12176)
@@ -0,0 +1,187 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u 
+#set -e
+#+
+#
+# ===============
+# maketools
+# ===============
+#
+# --------------------------
+# Compile NEMO
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ maketools
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# This script aims :
+#
+# - to choose a tool to compile
+# - to choose compiler options  
+# - to compile this tool
+#
+#  Variables used :
+#
+#  From user input
+#
+# - NEW_CONF    : configuration to be created
+# - CMP_NAM     : compiler name 
+# - NBR_PRC     : number of processes used to compile  
+#
+#  Locally defined :
+#
+# - MAIN_DIR : self explaining
+# - MODELES_DIR :   "    "    " 
+# - TOOLS_DIR   :   "    "    " 
+# - NEMO_DIR    :   "    "    "
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./maketools -t ifort_osx - j3 -n NESTING
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+#- Local variables ---
+b_n=$(basename ${0})
+export MAIN_DIR=${PWD%/tools*}
+export TOOLS_DIR=${MAIN_DIR}/tools
+export COMPIL_DIR=${MAIN_DIR}/mk
+export NEMO_DIR=${MAIN_DIR}/NEMO
+#-
+#- FCM and functions location ---
+export PATH=${MAIN_DIR}/ext/FCM/bin:$PATH
+
+#-
+#- Choice of the options ---
+x_h="";
+x_n="";
+x_m="";
+x_t="";
+x_c="";
+x_j=1;
+while getopts :hm:n:r:j:t: V
+  do
+	 case $V in
+		(h)  x_h=${OPTARG};
+                          echo "Usage	 : "${b_n} \
+					 " [-h] [-n name] [-m arch] [-j No] [-t tmpdir]";
+			  echo " -h	 : help";
+                          echo " -h institute : specific help for consortium members";
+			  echo " -n name : tool name, [-n help] to list existing tools";
+			  echo " -m arch : choose compiler, [-m help] to list exiting compilers";
+			  echo " -j No	 : number of processes used to compile (0=nocompilation)";
+			  echo " -t dir  : remporary directory for compilation"
+			  echo "";
+			  echo "Example to compile Agrif Nesting tools";
+			  echo "maketools -n NESTING" ;
+			  echo "";
+                          printf "%s\n" "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools`;
+			  echo "";
+                          . ${COMPIL_DIR}/Flist_archfile.sh  ${x_h};
+			  echo "";
+			  echo "Default : previous tool and compiler";
+			  exit 0;;
+		(n)  x_n=${OPTARG};;
+		(m)  x_m=${OPTARG};;
+		(j)  x_j=${OPTARG};;
+		(t)  x_t=${OPTARG};;
+		(:)  echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2;
+			  exit 2;;
+		(\?) echo ${b_n}" : -"${OPTARG}" option : not supported" 1>&2;
+			  exit 2;;
+	 esac
+  done
+shift $(($OPTIND-1));
+
+#-
+#- Get the clean option
+[[ "${#@}" -ne 0 && "${@}" != clean ]] && echo "Invalid option "$@" " && exit
+[ "${#@}" -ne 0 ] && x_c="--$@"
+
+#-
+#- Go to NEMOGCM/tools directory ---
+cd ${TOOLS_DIR}
+
+#-
+#- Initialisation from input ---
+export NEW_CONF=${x_n}
+NBR_PRC=${x_j}
+CMP_NAM=${x_m}
+NEMO_TDIR=${x_t:-$NEMO_TDIR}
+export NEMO_TDIR=${NEMO_TDIR:-$TOOLS_DIR}
+
+#- Check if the tool or the compiler exist or list it
+[ "${NEW_CONF}" == help ] && printf "%s\n"  "Available tools :" `ls ${TOOLS_DIR}|grep -v COMPILE | grep -v maketools` && exit
+[ "${CMP_NAM}" ==  help ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit
+
+#- Choose a default tool if needed ---
+#- REBUILD or last one used ---
+. ${COMPIL_DIR}/Fcheck_config.sh tools.txt ${NEW_CONF} || exit
+
+#- Save new configuration ---
+echo "${NEW_CONF} "  > ${COMPIL_DIR}/tools.txt
+
+#- Make the building directory
+. ${COMPIL_DIR}/Fmake_tools_bld.sh ${TOOLS_DIR} ${NEW_CONF} ${NEMO_TDIR} || exit
+
+#- At this stage cpp keys have been updated. we can check the arch file
+#- When used for the first time, choose a compiler ---
+. ${COMPIL_DIR}/Fcheck_archfile.sh arch_tools.fcm cpp_tools.fcm ${CMP_NAM} || exit
+
+#-
+#_ END OF CONFIGURATION PHASE
+#_
+
+#-
+#- Compile ---
+
+if [ "${NBR_PRC}" -gt 0 ]; then
+cd ${NEMO_TDIR}/${NEW_CONF} || cd -
+
+fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld_tools.cfg || cd -
+if [ -n "$(ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe)" ]; then
+for i in `ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe`
+   do
+      ln -sf ${i}  ${TOOLS_DIR}/${NEW_CONF}/.
+   done
+fi
+fi
+#-
+#- Come back to original directory ---
+cd -
+
+#-
+#- Unset variables
+${COMPIL_DIR}/Fclean_var.sh
+
+exit 0;
Index: /utils/build_MERGE_2019/mk/Fadd_keys.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fadd_keys.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fadd_keys.sh	(revision 12176)
@@ -0,0 +1,77 @@
+#!/bin/bash
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fadd_keys   : add keys in cpp.fcm file  
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fadd_keys.sh
+# ============
+#
+# --------------------
+# Add compilation keys
+# --------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fadd_keys.sh CONFIG_NAME add_key "LIST_KEYS"
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Script to add a set of key when compiling a configuration.
+# The list of key to be added has to be enclosed with " ". 
+# A 'sed' is performed to modify the CONFIG_NAME/cpp.fcm file to    
+# add the new key(s). 
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fadd_keys.sh ORCA2_LIM add_key "key_mpp_rep"
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fadd_keys.sh 2158 2010-10-20 17:30:03Z sflod $
+#
+#
+#
+#   * creation
+#
+#-
+ echo "Adding keys in : ${NEW_CONF}" 
+ for i in ${list_add_key} ; do
+	if [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "\<$i\>" )" -ne 0 ] ; then
+ 	   echo "key $i already present in cpp_${NEW_CONF}.fcm" 
+	else
+	   sed -e "s/$/ ${i}/"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
+ 	   mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
+ 	   echo "added key $i in ${NEW_CONF}" 
+	fi
+ done
+ 
+ unset -v list_add_key
+
Index: /utils/build_MERGE_2019/mk/Fcheck_archfile.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fcheck_archfile.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fcheck_archfile.sh	(revision 12176)
@@ -0,0 +1,215 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==================
+# Fcheck_archfile.sh
+# ==================
+#
+# --------------------------
+# Check the compilation file
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcheck_archfile.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Check the choice of the compiler.
+# Three cases :  
+#
+# - There was a previous choice
+# - A new one has be specified, we use this one
+# - No information, exit
+#
+# We use TOOLS/COMPILE/arch.fcm to see if something was chosen. 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcheck_archfile.sh ARCHFILE CPPFILE COMPILER
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+cpeval () 
+{
+    cat > $2 << EOF
+
+#==========================================================
+#    Automatically generated by Fcheck_archfile.sh from
+#    $1
+#==========================================================
+
+EOF
+    while read line  
+    do  
+	eval "echo \"$line\" >> $2"
+    done < $1
+}
+# cleaning related to the old version
+rm -f $( find ${COMPIL_DIR} -type l -name $1 -print )
+#
+if [ ${#3} -eq 0 ]; then # arch not specified
+    if [ ! -f ${COMPIL_DIR}/arch.history ]; then
+	echo "Warning !!!"
+	echo "NO compiler chosen"
+	echo "Try makenemo -h for help"
+	echo "EXITING..."
+	exit 1 
+    else # use the arch file defined in arch.history
+	myarch=$( cat ${COMPIL_DIR}/arch.history )	
+	if [ ! -f $myarch ]; then
+	    echo "Warning !!!"
+	    echo "previously used arch file no more found:"
+	    echo $myarch
+	    echo "EXITING..."
+	    exit 1 
+	else
+	    if [ -f ${COMPIL_DIR}/$1 ]; then
+		if [ "$2" != "nocpp" ] 
+		then
+		    # has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}?
+		    mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" )
+		    if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then
+			echo $mycpp > ${COMPIL_DIR}/cpp.history
+			cpeval ${myarch} ${COMPIL_DIR}/$1
+		    fi
+		    # has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}?
+		    mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print )
+		    [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+		fi
+		# has myarch file been updated since we copied it in ${COMPIL_DIR}?
+		myarchdir=$( dirname ${myarch} )
+		myarchname=$( basename ${myarch} )
+		myarch=$( find -L $myarchdir -cnewer ${COMPIL_DIR}/$1 -name $myarchname -print )
+		[ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+	    else
+		cpeval ${myarch} ${COMPIL_DIR}/$1
+	    fi
+	fi
+    fi
+else 
+    nb=$( find ${MAIN_DIR}/arch -name arch-${3}.fcm -print | wc -l )
+    if [ $nb -eq 0 ]; then # no arch file found
+	echo "Warning !!!"
+	echo "Compiler not existing"
+	echo "Try makenemo -h for help"
+	echo "EXITING..."
+	exit 1       
+    fi
+    if [ $nb -gt 1 ]; then # more than 1 arch file found
+	echo "Warning !!!"
+	echo "more than 1 arch file for the same compiler have been found"
+	find ${MAIN_DIR}/arch -name arch-${3}.fcm -print
+	echo "keep only 1"
+	echo "EXITING..."
+	exit 1       
+    fi
+    myarch=$( find ${MAIN_DIR}/arch -name arch-${3}.fcm -print )
+    # we were already using this arch file ?
+    if [ "$myarch" == "$( cat ${COMPIL_DIR}/arch.history )" ]; then 
+	if [ -f ${COMPIL_DIR}/$1 ]; then
+	    if [ "$2" != "nocpp" ] 
+	    then
+		# has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}?
+		mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" )
+		if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then
+		    echo $mycpp > ${COMPIL_DIR}/cpp.history
+		    cpeval ${myarch} ${COMPIL_DIR}/$1
+		fi
+		# has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}?
+		mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print )
+		[ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+	    fi
+	    # has myarch file been updated since we copied it in ${COMPIL_DIR}?
+	    myarch=$( find -L ${MAIN_DIR}/arch -cnewer ${COMPIL_DIR}/$1 -name arch-${3}.fcm -print )
+	    [ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+	else
+	    cpeval ${myarch} ${COMPIL_DIR}/$1
+	fi
+    else
+	if [ "$2" != "nocpp" ] 
+	then
+	    ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" > ${COMPIL_DIR}/cpp.history
+	fi
+	echo ${myarch} > ${COMPIL_DIR}/arch.history
+	cpeval ${myarch} ${COMPIL_DIR}/$1
+    fi
+fi
+
+#- do we need xios library?
+#- 2 cases: 
+#- in CONFIG directory looking for key_iomput
+if [ "$1" == "arch_nemo.fcm" ]
+then
+    if [ "$2" != "nocpp" ] 
+    then
+        use_iom=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_iomput )
+    else
+        use_iom=0
+    fi
+    have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" )
+    if [[ ( $use_iom -eq 0 ) && ( $have_lxios -ge 1 ) ]]
+    then 
+        sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$
+        mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1
+    fi
+#- in TOOLS directory looking for USE xios
+else
+    use_iom=$( egrep --exclude-dir=.svn -r USE ${NEW_CONF}/src/* | grep -c xios )
+    have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" )
+    if [[ ( $use_iom -eq 0 ) || ( $have_lxios != 1 ) ]]
+    then 
+        sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$
+        mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1
+    fi
+fi
+
+#- do we need oasis libraries?
+if [ "$2" != "nocpp" ] 
+then
+    use_oasis=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_oasis3 )
+else
+    use_oasis=0
+fi
+#ignore use_oasis if XIOS_OASIS is set  (doesn't matter to what value) 
+if [[ ! -z "$XIOS_OASIS" ]]; then 
+    use_oasis=1 
+fi 
+for liboa in psmile.MPI1 mct mpeu scrip mpp_io
+do
+    have_liboa=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-l${liboa}" )
+    if [[ ( $use_oasis -eq 0 ) && ( $have_liboa -ge 1 ) ]]
+    then 
+	sed -e "s/-l${liboa}//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$
+	mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1
+    fi
+done
+
Index: /utils/build_MERGE_2019/mk/Fcheck_config.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fcheck_config.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fcheck_config.sh	(revision 12176)
@@ -0,0 +1,87 @@
+#!/bin/bash
+######################################################
+# Author : Rachid Benshila for NEMO
+# Contact : rblod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fcheck_config   : config checking 
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fcheck_config.sh
+# ================
+#
+# --------------------------
+# Check the configuration
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcheck_config.sh FILENAME CONFNAME
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Check the choice of the configuration:
+#
+# - Two cases
+# - One is explicitely set
+# - Nothing set, use the previous in use 
+#
+# We use TOOLS/cfgs_DIR/cfg.txt to check if the configuration exists.
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcheck_config.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+declare -a ZTAB
+if [ ${#2} -eq 0 ]; then
+   tail -1  ${CONFIG_DIR}/$1	> ${CONFIG_DIR}/cfg.tmp
+   read -a ZTAB < ${CONFIG_DIR}/cfg.tmp
+   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} )
+   \rm ${CONFIG_DIR}/cfg.tmp
+   echo "Warning !!!"
+   echo "No configuration specified"
+   echo "Use makenemo -n MYCONFIG"
+   echo "or  makenemo -h for help"
+   echo "Using default configuration : ${NEW_CONF}"
+fi
+if [ "$1" == cfg.txt ]; then
+   cat ${CONFIG_DIR}/$1 | grep "${NEW_CONF} " > ${CONFIG_DIR}/cfg.tmp
+   read -a ZTAB < ${CONFIG_DIR}/cfg.tmp
+   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} )
+   \rm ${CONFIG_DIR}/cfg.tmp
+fi
+
+unset -v ZTAB
Index: /utils/build_MERGE_2019/mk/Fcheck_script.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fcheck_script.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fcheck_script.sh	(revision 12176)
@@ -0,0 +1,63 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fcheck_script.sh
+# ================
+#
+# --------------------------
+# Check
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcheck_script.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Check if utilities are in the path, typically fcm.
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcheck_script.sh fcm
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+myscript=`which $1`
+if [ ${#myscript} -eq 0 ]; then
+echo "WARNING !!!"
+echo "$1 has to be installed first"
+echo "Exiting......................"
+exit 1
+fi
+
+unset -v myscript
Index: /utils/build_MERGE_2019/mk/Fclean_config.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fclean_config.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fclean_config.sh	(revision 12176)
@@ -0,0 +1,98 @@
+#!/bin/bash
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fclean_config   : config removing 
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fclean_config.sh
+# ================
+#
+# ------------------------
+# Remove the configuration
+# ------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fclean_config.sh CONFNAME
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Remove the configuration:
+#
+# - remove CONFIG_NAME/WORK
+# - remove CONFIG_NAME/BLD
+# - remove CONFIG_NAME from TOOLS/mk/cfg.txt 
+# 
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fclean_config.sh ORCA2_LIM
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fclean_config.sh 2158 2010-10-20 17:30:03Z sflod $
+#
+#
+#
+#   * creation
+#
+#-
+
+NEW_CONF=${x_n}
+
+if [ ${#NEW_CONF} -eq 0 ] ; then
+	echo " "
+	echo "No configuration specified, please use makenemo -n CONFIG clean_config "
+else
+	echo "Are you sure that you want to remove this directory $NEW_CONF? [y/n] "
+	read answer
+	answer=`echo $answer | sed 's/^[y].*$/y/'`
+
+	if [  -z "$answer" -o "x$answer" = "xy" ]; then
+
+		## testing if configuration exists
+		if [[ ! $( grep "${NEW_CONF} " */work_cfgs.txt ) ]] ; then
+			echo "The configuration ${NEW_CONF} does not exist in file work_cfgs.txt"     
+			echo "No removing configuration"
+			echo " "
+		else
+			CONFIG_DIR=${MAIN_DIR}/$( grep -l "${NEW_CONF} " */work_cfgs.txt | cut -d/ -f1 )
+			rm -rf ${CONFIG_DIR}/${NEW_CONF}
+			sed -e "/${NEW_CONF} /d"  ${CONFIG_DIR}/work_cfgs.txt >  ${CONFIG_DIR}/work_cfgs.tmp
+			mv  ${CONFIG_DIR}/work_cfgs.tmp  ${CONFIG_DIR}/work_cfgs.txt
+			echo "${NEW_CONF} configuration REMOVED" 
+		fi
+
+	else
+		echo " "
+		echo "nothing to remove"
+	fi
+
+fi 
+
+unset -v answer
Index: /utils/build_MERGE_2019/mk/Fclean_var.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fclean_var.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fclean_var.sh	(revision 12176)
@@ -0,0 +1,68 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# =============
+# Fclean_var.sh
+# =============
+#
+# ----------------------------
+# Clean environment variables
+# ----------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fclean_var.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Clean environment variables
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fclean_var.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+#- Unset variables
+
+unset -v NSTOP
+unset -v TAB
+unset -v NEW_CONF
+unset -v REF_CONF
+unset -v CMP_NAM
+unset -v NBR_PRC
+unset -v NEM_SUBDIR
+unset -v MAIN_DIR
+unset -v CONFIG_DIR
+unset -v TOOLS_DIR
+unset -v COMPIL_DIR
+unset -v NEMO_DIR
+unset -v USEBLD
Index: /utils/build_MERGE_2019/mk/Fcopy_dir.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fcopy_dir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fcopy_dir.sh	(revision 12176)
@@ -0,0 +1,62 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fcopy_dir.sh
+# ============
+#
+# --------------------------
+# Copy a reference directory
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcopy_dir.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# When a reference configuration is set, 
+# Copy NEMO sub-directories needed (OCE, TOP ...)
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcopy_dir.sh ORCA2_LIM
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+declare -a ZTAB
+grep "$1 " ${CONFIG_DIR}/cfg.txt > ${CONFIG_DIR}/cfg.tmp
+read -a ZTAB < ${CONFIG_DIR}/cfg.tmp
+TAB=( ${ZTAB[@]:1} )
+\rm ${CONFIG_DIR}/cfg.tmp
+
+unset -v ZTAB
Index: /utils/build_MERGE_2019/mk/Fcopy_extdir.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fcopy_extdir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fcopy_extdir.sh	(revision 12176)
@@ -0,0 +1,39 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+# ============
+# Fcopy_extdir.sh
+# ============
+# --------------------------
+# Copy a reference directory
+# --------------------------
+# SYNOPSIS
+# ========
+# ::
+#  $ Fcopy_extdir.sh
+# DESCRIPTION
+# ===========
+# When an unsupported configuration is requested, 
+# Prepare sources for the NEMO sub-directories needed (OCE, TOP ...)
+# EXAMPLES
+# ========
+# ::
+#  $ ./Fcopy_extdir.sh ORCA2_LIM
+# TODO
+# ====
+# option debug
+# EVOLUTIONS
+# ==========
+# $Id: Fcopy_extdir.sh 3294 2012-01-28 16:44:18Z rblod $
+#   * creation
+#-
+grep "$1 " ${CONFIG_DIR}/uspcfg.txt > ${CONFIG_DIR}/cfg.tmp
+#
+LOCAL_REF=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $2}')
+TAB=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $3}')
+REMOTE_CTL=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $4}')
+#
+\rm ${CONFIG_DIR}/cfg.tmp
Index: /utils/build_MERGE_2019/mk/Fdel_keys.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fdel_keys.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fdel_keys.sh	(revision 12176)
@@ -0,0 +1,81 @@
+#!/bin/bash
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fdel_keys   : del keys in cpp.fcm file  
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fdel_keys.sh
+# ================
+#
+# --------------------------
+# Add compilation keys
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fdel_keys.sh CONFIG_NAME del_key "LIST_KEYS"
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Add cpp keys when compiling a configuration, key list has to be enclosed with " ".
+# We perform a 'sed' on the CONFIG_NAME/CPP.fcm file, containing the list of keys. 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fdel_keys.sh CONFIG_NAME del_key "key_agrif"
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fdel_keys.sh 2158 2010-10-20 17:30:03Z sflod $
+#
+#
+#
+#   * creation
+#
+#-
+
+echo "Removing keys in : ${NEW_CONF}"
+
+for i in ${list_del_key} ; do
+
+     if [ "$(echo ${i} | grep -c key_nproc )" -ne 0                                      ]; then
+        sed -e "s/key_nproc[ij]=.* //" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \
+	    >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
+        mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
+        echo " "
+     elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ]; then
+         sed -e "s/\b${i}\b//" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \
+	     >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
+         mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
+         echo "deleted key $i in ${NEW_CONF}"
+     fi
+
+done
+
+unset -v list_del_key
Index: /utils/build_MERGE_2019/mk/Ffetch_extdir.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Ffetch_extdir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Ffetch_extdir.sh	(revision 12176)
@@ -0,0 +1,53 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+# ===============
+# Ffetch_extdir.sh
+# ===============
+# ---------------
+# Make the config 
+# ---------------
+# SYNOPSIS
+# ========
+# ::
+#  $ Ffetch_extdir.sh
+# DESCRIPTION
+# ===========
+# - Make the config directory 
+# - Create repositories needed :
+#  
+#  - EXP00 for namelist
+#  - MY_SRC for user sources
+#  - BLD for compilation 
+# EXAMPLES
+# ========
+# ::
+#  $ ./Ffetch_extdir.sh CONFIG_NAME REMOTE_CTL 
+# TODO
+# ====
+# option debug
+# EVOLUTIONS
+# ==========
+# $Id: Ffetch_extdir.sh 3715 2012-11-28 16:06:02Z acc $
+#   * creation
+#-
+basedir=$(pwd)
+cd ${1}
+wget ${2} -O remote_file.list
+#
+if [ -f remote_file.list ] ; then
+ cat remote_file.list | grep -v '^#' |
+  while
+   read remfile locfile
+   do
+    if [ $remfile == 'create_directory' ] ;then
+      mkdir $locfile
+    else
+      wget $remfile -O $locfile
+    fi
+   done
+fi
+cd $basedir
Index: /utils/build_MERGE_2019/mk/Fgo_to_TOOLS.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fgo_to_TOOLS.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fgo_to_TOOLS.sh	(revision 12176)
@@ -0,0 +1,55 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ===============
+# Fgo_to_tools.sh
+# ===============
+#
+# --------------------------
+# Go to the TOOLS directory
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fgo_to_tools.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Go to the TOOLS directory
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fgo_to_tools.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+cd ${MAIN_DIR}/tools
Index: /utils/build_MERGE_2019/mk/Flist_archfile.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Flist_archfile.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Flist_archfile.sh	(revision 12176)
@@ -0,0 +1,77 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==================
+# Flist_archfile.sh
+# ==================
+#
+# --------------------------
+# Check the compilation file
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Flist_archfile.sh Institute
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# List arch file available.
+# The first line of each file in NEMO/arch directory is echoed.  
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Flist_archfile.sh 
+#
+#  $ ./Flist_archfile.sh CNRS
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+archfile_loop() {
+
+	for file in $( ls $1/*.fcm ); do
+		zvar1=$( basename $file | sed 's/arch-\(.*\).fcm/\1/' )
+		zvar2=$( head -1  $file | tr -d '#'                   )
+		printf "%-30s %-s\n" ${zvar1} "${zvar2}"
+	done
+
+}
+
+echo -e "\n  ¤ Generic computing architectures"
+
+archfile_loop ${MAIN_DIR}/arch
+
+for dir in $( ls ${MAIN_DIR}/arch | grep -v "fcm$" ); do
+	echo -e "\n  ¤ Specific HPC architectures for "${dir}
+	archfile_loop ${MAIN_DIR}/arch/$dir
+done
+
+echo
Index: /utils/build_MERGE_2019/mk/Flist_cfgs.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Flist_cfgs.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Flist_cfgs.sh	(revision 12176)
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+echo -e "\n  ¤ Reference configurations with default sub-components (can be updated by a new set)"
+cat ${MAIN_DIR}/cfgs/ref_cfgs.txt \
+| awk '{printf "%-20s", $1}{$1 = ""; printf "%s\n", $0}'
+
+echo -e "\n  ¤ Demonstrations cases (see https://github.com/sflavoni/NEMO-test-cases for more)"
+cat ${MAIN_DIR}/tests/demo_cfgs.txt \
+| awk '{printf "%-20s", $1}{$1 = ""; printf "%s\n", $0}'
+
+echo -e "\n  ¤ Full scripted remote configurations (CPP file + EXP00 inputs + MY_SRC + ...)"
+cat ${MAIN_DIR}/tests/rmt_cfgs.txt
+
+echo -e "\n  ¤ Available sub-components ('OCE' is mandatory in any set)"
+ls  ${MAIN_DIR}/src | awk -F/ '{ print $NF }' | column
+
+echo
Index: /utils/build_MERGE_2019/mk/Fmake_WORK.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fmake_WORK.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fmake_WORK.sh	(revision 12176)
@@ -0,0 +1,99 @@
+#!/bin/bash
+######################################################
+# Author : Rachid Benshila for NEMO
+# Contact : rblod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fmake_WORK      : create links in the WORK
+######################################################
+#set -vx
+set -o posix
+#set -u
+#set -e
+#+
+#
+# =============
+# Fmake_WORK.sh
+# =============
+#
+# -----------------------
+# Make the WORK directory
+# -----------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_WORK.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Make the WORK directory:
+#
+# - Create line in NEW_CONF/WORK
+# - Use specified sub-directories previously
+# - OPA has to be done first !!!
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_WORK.sh ORCA2_LIM OCE ICE
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+declare ZSRC=$1 ; shift 
+declare ZCONF=$1 ; shift
+ZTAB=( $@ )
+declare i=0 ; declare NDIR=${#ZTAB[@]}
+
+echo 'Creating '${ZCONF}'/WORK = '${ZTAB[*]}' for '${ZCONF}
+
+[ ! -d ${ZCONF}/MY_SRC ] && \mkdir ${ZCONF}/MY_SRC
+[   -d ${ZCONF}/WORK   ] || \mkdir ${ZCONF}/WORK
+
+if [ "${ZSRC}" != 'none' ] ; then 
+
+	if [ -d ${ZSRC} ] ; then 
+		ln -sf ${ZSRC}/*.[Ffh]90 ${ZCONF}/MY_SRC/. 
+		echo 'MY_SRC content is linked to '${ZSRC}
+	else
+		echo 'External directory for MY_SRC does not exist. Using default.'
+	fi
+
+else 
+	echo 'MY_SRC directory is : '${ZCONF}'/MY_SRC'
+fi
+
+#\rm -f ../${1}/WORK/*
+
+for comp in ${ZTAB[*]}; do
+	find ${NEMO_DIR}/$comp -name *.[Ffh]90 -exec ln -sf {} ${ZCONF}/WORK \;
+done
+
+for i in `(cd ${ZCONF}/MY_SRC ; \ls *.[Ffh]90 2>/dev/null ) `; do
+	[ -f ${ZCONF}/MY_SRC/$i ] &&  ln -sf $PWD/${ZCONF}/MY_SRC/${i} ${ZCONF}/WORK/.
+done
+
+unset -v ZCONF ZTAB i NDIR
Index: /utils/build_MERGE_2019/mk/Fmake_bld.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fmake_bld.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fmake_bld.sh	(revision 12176)
@@ -0,0 +1,64 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fmake_bld.sh
+# ============
+#
+# --------------------
+# Make build directory
+# --------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_bld.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Under CONFIG_NAME :
+# - Make the build directory 
+# - Create repositories needed :
+# - BLD for compilation 
+#
+# A tmpdir can be specified for memory issues.
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_bld.sh NEMOGCM/cfgs GYRE  /usr/tmp
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+[ ! -d ${3}/${2}     ] && \mkdir ${3}/${2}
+[ ! -d ${3}/${2}/BLD ] && \mkdir ${3}/${2}/BLD
+[ ! -d ${1}/${2}/BLD ] && ln -sf ${3}/${2}/BLD ${1}/${2}/BLD
+[ -f ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ] && ln -sf ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ${COMPIL_DIR}/cpp.fcm
+rm -f  ${1}/${NEW_CONF}/BLD/fcm.bld.lock
Index: /utils/build_MERGE_2019/mk/Fmake_config.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fmake_config.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fmake_config.sh	(revision 12176)
@@ -0,0 +1,66 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ===============
+# Fmake_config.sh
+# ===============
+#
+# ---------------
+# Make the config 
+# ---------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_config.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# - Make the config directory 
+# - Create repositories needed :
+#  
+#  - EXP00 for namelist
+#  - MY_SRC for user sources
+#  - BLD for compilation 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_config.sh CONFIG_NAME REF_CONFIG_NAME 
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+\mkdir -p ${1}
+\mkdir -p ${1}/EXP00
+\mkdir -p ${1}/MY_SRC
+\cp -R -n ${2}/cpp_${2}.fcm ${1}/cpp_${1}.fcm
+\cp -R -n ${2}/EXPREF/*namelist* ${1}/EXP00/.
+\cp -R -n ${2}/EXPREF/*.xml ${1}/EXP00/.
+[ -f ${2}/EXPREF/AGRIF_FixedGrids.in ] &&  \cp -R -n ${2}/EXPREF/AGRIF_FixedGrids.in ${1}/EXP00/.
+[ -d    ${2}/MY_SRC ] && \cp -n ${2}/MY_SRC/* ${1}/MY_SRC/. 2> /dev/null
Index: /utils/build_MERGE_2019/mk/Fprep_agrif.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fprep_agrif.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fprep_agrif.sh	(revision 12176)
@@ -0,0 +1,79 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==============
+# Fprep_agrif.sh
+# ==============
+#
+# ---------------------
+# Preparation for AGRIF
+# ---------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fprep_agrif.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Prepare directories for AGRIF and copy files needed
+#
+# Compile the conv
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fprep_agrif.sh CONFIG_NAME
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+#- AGRIF conv
+if [ "$AGRIFUSE" == 1 ]; then
+#-MPI for AGRIF
+if [ ! -f ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h ];then
+   echo '#if defined key_mpp_mpi' > ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+   echo '#define AGRIF_MPI'      >> ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+   echo '#endif'                 >> ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+fi
+
+ #- CONV
+fcm build ${COMPIL_DIR}/conv.cfg || exit 1
+#C_COMPILER=${CC-cc}
+#gmake CC=${C_COMPILER} -C ${MAIN_DIR}/ext/AGRIF/LIB
+
+#- AGRIF sources
+[ ! -d $2/$1/NEMOFILES ] && mkdir  $2/$1/NEMOFILES
+[ ! -d $2/$1/NEMOFILES/AGRIF_INC ] && mkdir  $2/$1/NEMOFILES/AGRIF_INC
+[ ! -d $2/$1/NEMOFILES/AGRIF_MODELFILES ] && mkdir  $2/$1/NEMOFILES/AGRIF_MODELFILES
+cp -f -r ${MAIN_DIR}/ext/AGRIF/agrif_oce.in  $2/$1/NEMOFILES/
+#cp -f -r ${MAIN_DIR}/ext/AGRIF/conv  $2/$1/NEMOFILES/
+cp -f -r $2/$1/AGRIFLIB/bin/conv  $2/$1/NEMOFILES/
+
+fi
Index: /utils/build_MERGE_2019/mk/Fread_dir.sh
===================================================================
--- /utils/build_MERGE_2019/mk/Fread_dir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/Fread_dir.sh	(revision 12176)
@@ -0,0 +1,83 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fread_dir.sh
+# ============
+#
+# ---------------------
+# Read user directories
+# ---------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fread_dir.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Read directoires needed from standard input
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fread_dir.sh Directory_NAME YES/NO
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+if [ "$2" == "YES" ]; then
+   echo -n " $1 [Y/n] "
+   read answer
+   answer=`echo $answer | sed 's/^[yY].*$/y/'`
+   if [  -z "$answer" -o "x$answer" = "xy" ]; then
+      TAB[$ind]="$1"
+      let ind=ind+1
+      echo " $1 selected "
+      echo "  "
+   else
+      echo " $1 Not selected "
+      echo "  "
+   fi
+   unset -v answer
+else
+   echo -n " $1 [y/N] "
+   read answer
+   answer=`echo $answer | sed 's/^[nN].*$/N/'`
+   if [ "x$answer" = "xy" ]; then
+      TAB[$ind]="$1"
+      let ind=ind+1
+      echo " $1 selected "
+      echo "  "
+   else
+      echo " $1 Not selected "
+      echo "  "
+   fi
+   unset -v answer
+fi
Index: /utils/build_MERGE_2019/mk/README
===================================================================
--- /utils/build_MERGE_2019/mk/README	(revision 12176)
+++ /utils/build_MERGE_2019/mk/README	(revision 12176)
@@ -0,0 +1,7 @@
+CSHRC :
+setenv PATH ~/NEMOGCM/TOOLS:$PATH
+setenv NEMO_TDIR /users/rblod/tmp
+
+BASH :
+export PATH=$PATH:~/NEMOGCM/TOOLS'
+export NEMO_TDIR=/users/rblod/tmp
Index: /utils/build_MERGE_2019/mk/agrifpp.sh
===================================================================
--- /utils/build_MERGE_2019/mk/agrifpp.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk/agrifpp.sh	(revision 12176)
@@ -0,0 +1,62 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==========
+# agrifpp.sh
+# ==========
+#
+# ----------------------------
+# Preform AGrif pre-processing
+# ----------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ agrifpp.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Preprocess file using the conv in NEMOFILES directory
+# Standard preprocessed files are stored in NEMOFILES/ppsrc/nemo
+# Source files are stored under NEMOFILES/obj
+# Include filess  in NEMOFILES/inc
+# Note that agrif2model.F90 should not be preprocess (standard one) 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./agrifpp.sh FILE_TO_PROCESS
+# 
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: agrifpp.sh 2143 2010-10-04 12:49:55Z rblod $
+#
+#
+#
+#   * creation
+#
+#-
+MYFILE=$(basename "$1")
+if [ "$MYFILE" == "agrif2model.f90" ];then
+   \cp ${NEMO_TDIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE
+else
+cd ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/ppsrc/nemo ; ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/conv ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/agrif_oce.in -rm -incdir ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/inc -comdirout ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj -convfile ${MYFILE} > /dev/null 
+fi
Index: /utils/build_MERGE_2019/mk/bld.cfg
===================================================================
--- /utils/build_MERGE_2019/mk/bld.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk/bld.cfg	(revision 12176)
@@ -0,0 +1,68 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+
+search_src           1
+
+src::ioipsl               $MAIN_DIR/ext/IOIPSL/src
+src::agrif                $MAIN_DIR/ext/AGRIF/AGRIF_FILES
+src::nemo                 $CONFIG_DIR/$NEW_CONF/NEMOFILES/obj
+
+bld::target  nemo.exe
+bld::exe_dep
+
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::fflags::agrif   %FFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::ioipsl   1
+bld::pp::nemo     1
+bld::pp::agrif    1
+bld::tool::fppflags::nemo      %FPPFLAGS -I$CONFIG_DIR/$NEW_CONF/NEMOFILES/inc
+bld::tool::fppflags::ioipsl    %FPPFLAGS
+bld::tool::fppflags::agrif     %FPPFLAGS -include ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
Index: /utils/build_MERGE_2019/mk/bld_preproagr.cfg
===================================================================
--- /utils/build_MERGE_2019/mk/bld_preproagr.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk/bld_preproagr.cfg	(revision 12176)
@@ -0,0 +1,82 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+search_src           1
+
+src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK
+
+bld::target  lib_cray.f90 nemo.f90 agrif_user.f90 agrif2model.f90 
+
+dir::root            $NEMO_TDIR/$NEW_CONF/NEMOFILES
+
+bld::tool::fc_output
+bld::tool::fc_compile
+bld::tool::fc_include
+bld::tool::fc        $COMPIL_DIR/agrifpp.sh 
+bld::tool::fflags    
+bld::tool::ld       
+bld::tool::ldflags   
+bld::tool::ar        
+bld::tool::arflags   
+bld::tool::make      %MK
+
+OUTFILE_EXT::obj   .f90
+
+# Pre-process code before analysing dependencies
+bld::pp::nemo     1
+bld::pp::nemo/agrif2model     0
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fppflags::nemo  %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+bld::excl_dep	     use::nc4interface
+bld::excl_dep	     use::ioipsl
+bld::excl_dep	     use::xios
+bld::excl_dep        use::agrif_grids
+bld::excl_dep	     use::agrif_types
+bld::excl_dep	     use::agrif_util
+bld::excl_dep        inc::SetNumberofcells.h
+bld::excl_dep        inc::GetNumberofcells.h
+bld::excl_dep        inc::include_use_Alloc_agrif.h
+bld::excl_dep        inc::allocations_calls_agrif.h
+bld::excl_dep        inc::modtype_agrif.h
+bld::excl_dep        inc::probdim_agrif.h
+bld::excl_dep        inc::keys_agrif.h
+bld::excl_dep        h::SetNumberofcells.h
+bld::excl_dep        h::GetNumberofcells.h
+bld::excl_dep        h::include_use_Alloc_agrif.h
+bld::excl_dep        h::allocations_calls_agrif.h
+bld::excl_dep        h::modtype_agrif.h
+bld::excl_dep        h::probdim_agrif.h
+bld::excl_dep        h::keys_agrif.h
+bld::excl_dep        use::mod_attribut
+bld::excl_dep        use::mod_event_client
+bld::excl_dep        use::mod_ioclient
+#bld::excl_dep        OBJ
+
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" and ".f90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+bld::src_type::nemo/agrif2model.F90 FORTRAN::FORTRAN9X::SOURCE
Index: /utils/build_MERGE_2019/mk/bld_tools.cfg
===================================================================
--- /utils/build_MERGE_2019/mk/bld_tools.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk/bld_tools.cfg	(revision 12176)
@@ -0,0 +1,48 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_tools.fcm
+
+search_src           1
+
+src::nemo                 $TOOLS_DIR/$NEW_CONF/src
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
Index: /utils/build_MERGE_2019/mk/bldxag.cfg
===================================================================
--- /utils/build_MERGE_2019/mk/bldxag.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk/bldxag.cfg	(revision 12176)
@@ -0,0 +1,64 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+
+search_src           1
+
+src::ioipsl               $MAIN_DIR/ext/IOIPSL/src
+src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK
+
+bld::target nemo.exe
+bld::exe_dep
+
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::ioipsl   1
+bld::pp::nemo     1
+bld::tool::fppflags::nemo     %FPPFLAGS
+bld::tool::fppflags::ioipsl   %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
+
Index: /utils/build_MERGE_2019/mk/conv.cfg
===================================================================
--- /utils/build_MERGE_2019/mk/conv.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk/conv.cfg	(revision 12176)
@@ -0,0 +1,35 @@
+# ----------------------- FCM extract configuration file -----------------------
+# template to compile agrif conv, currently not used
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+inc $COMPIL_DIR/arch_nemo.fcm
+
+bld::tool::cc        %CC
+bld::tool::cflags    %CFLAGS
+bld::tool::make      %MK
+
+src::convsrc   $MAIN_DIR/ext/AGRIF/LIB
+
+ #----------------------------------------------------------------------------
+# Build options (code-specific, machine-independent)
+# ----------------------------------------------------------------------------
+dir::root            $NEMO_TDIR/$NEW_CONF/AGRIFLIB
+
+#bld::tool::cflags::convsrc  -O0  
+#bld::tool::ld::convsrc   cc
+#bld::tool::ldflags::convsrc -O  ../obj/fortran.o ../obj/fortran.o 
+#bld::pp 1
+
+
+
+bld::exe_name::main conv
+bld::target                              libconvsrc.a  fortran.o main.o  conv
+bld::exe_dep::conv      
+
+
+
Index: /utils/build_MERGE_2019/mk/tools.txt
===================================================================
--- /utils/build_MERGE_2019/mk/tools.txt	(revision 12176)
+++ /utils/build_MERGE_2019/mk/tools.txt	(revision 12176)
@@ -0,0 +1,1 @@
+DOMAINcfg 
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fadd_keys.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fadd_keys.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fadd_keys.sh	(revision 12176)
@@ -0,0 +1,77 @@
+#!/bin/bash
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fadd_keys   : add keys in cpp.fcm file  
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fadd_keys.sh
+# ============
+#
+# --------------------
+# Add compilation keys
+# --------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fadd_keys.sh CONFIG_NAME add_key "LIST_KEYS"
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Script to add a set of key when compiling a configuration.
+# The list of key to be added has to be enclosed with " ". 
+# A 'sed' is performed to modify the CONFIG_NAME/cpp.fcm file to    
+# add the new key(s). 
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fadd_keys.sh ORCA2_LIM add_key "key_mpp_rep"
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fadd_keys.sh 2158 2010-10-20 17:30:03Z sflod $
+#
+#
+#
+#   * creation
+#
+#-
+ echo "Adding keys in : ${NEW_CONF}" 
+ for i in ${list_add_key} ; do
+	if [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "\<$i\>" )" -ne 0 ] ; then
+ 	   echo "key $i already present in cpp_${NEW_CONF}.fcm" 
+	else
+	   sed -e "s/$/ ${i}/"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
+ 	   mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
+ 	   echo "added key $i in ${NEW_CONF}" 
+	fi
+ done
+ 
+ unset -v list_add_key
+
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcheck_archfile.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcheck_archfile.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcheck_archfile.sh	(revision 12176)
@@ -0,0 +1,211 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==================
+# Fcheck_archfile.sh
+# ==================
+#
+# --------------------------
+# Check the compilation file
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcheck_archfile.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Check the choice of the compiler.
+# Three cases :  
+#
+# - There was a previous choice
+# - A new one has be specified, we use this one
+# - No information, exit
+#
+# We use TOOLS/COMPILE/arch.fcm to see if something was chosen. 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcheck_archfile.sh ARCHFILE CPPFILE COMPILER
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+cpeval () 
+{
+    cat > $2 << EOF
+
+#==========================================================
+#    Automatically generated by Fcheck_archfile.sh from
+#    $1
+#==========================================================
+
+EOF
+    while read line  
+    do  
+	eval "echo \"$line\" >> $2"
+    done < $1
+}
+# cleaning related to the old version
+rm -f $( find ${COMPIL_DIR} -type l -name $1 -print )
+#
+if [ ${#3} -eq 0 ]; then # arch not specified
+    if [ ! -f ${COMPIL_DIR}/arch.history ]; then
+	echo "Warning !!!"
+	echo "NO compiler chosen"
+	echo "Try makenemo -h for help"
+	echo "EXITING..."
+	exit 1 
+    else # use the arch file defined in arch.history
+	myarch=$( cat ${COMPIL_DIR}/arch.history )	
+	if [ ! -f $myarch ]; then
+	    echo "Warning !!!"
+	    echo "previously used arch file no more found:"
+	    echo $myarch
+	    echo "EXITING..."
+	    exit 1 
+	else
+	    if [ -f ${COMPIL_DIR}/$1 ]; then
+		if [ "$2" != "nocpp" ] 
+		then
+		    # has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}?
+		    mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" )
+		    if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then
+			echo $mycpp > ${COMPIL_DIR}/cpp.history
+			cpeval ${myarch} ${COMPIL_DIR}/$1
+		    fi
+		    # has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}?
+		    mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print )
+		    [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+		fi
+		# has myarch file been updated since we copied it in ${COMPIL_DIR}?
+		myarchdir=$( dirname ${myarch} )
+		myarchname=$( basename ${myarch} )
+		myarch=$( find -L $myarchdir -cnewer ${COMPIL_DIR}/$1 -name $myarchname -print )
+		[ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+	    else
+		cpeval ${myarch} ${COMPIL_DIR}/$1
+	    fi
+	fi
+    fi
+else 
+    nb=$( find ${MAIN_DIR}/arch -name arch-${3}.fcm -print | wc -l )
+    if [ $nb -eq 0 ]; then # no arch file found
+	echo "Warning !!!"
+	echo "Compiler not existing"
+	echo "Try makenemo -h for help"
+	echo "EXITING..."
+	exit 1       
+    fi
+    if [ $nb -gt 1 ]; then # more than 1 arch file found
+	echo "Warning !!!"
+	echo "more than 1 arch file for the same compiler have been found"
+	find ${MAIN_DIR}/arch -name arch-${3}.fcm -print
+	echo "keep only 1"
+	echo "EXITING..."
+	exit 1       
+    fi
+    myarch=$( find ${MAIN_DIR}/arch -name arch-${3}.fcm -print )
+    # we were already using this arch file ?
+    if [ "$myarch" == "$( cat ${COMPIL_DIR}/arch.history )" ]; then 
+	if [ -f ${COMPIL_DIR}/$1 ]; then
+	    if [ "$2" != "nocpp" ] 
+	    then
+		# has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}?
+		mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" )
+		if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then
+		    echo $mycpp > ${COMPIL_DIR}/cpp.history
+		    cpeval ${myarch} ${COMPIL_DIR}/$1
+		fi
+		# has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}?
+		mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print )
+		[ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+	    fi
+	    # has myarch file been updated since we copied it in ${COMPIL_DIR}?
+	    myarch=$( find -L ${MAIN_DIR}/arch -cnewer ${COMPIL_DIR}/$1 -name arch-${3}.fcm -print )
+	    [ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+	else
+	    cpeval ${myarch} ${COMPIL_DIR}/$1
+	fi
+    else
+	if [ "$2" != "nocpp" ] 
+	then
+	    ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" > ${COMPIL_DIR}/cpp.history
+	fi
+	echo ${myarch} > ${COMPIL_DIR}/arch.history
+	cpeval ${myarch} ${COMPIL_DIR}/$1
+    fi
+fi
+
+#- do we need xios library?
+#- 2 cases: 
+#- in CONFIG directory looking for key_iomput
+if [ "$1" == "arch_nemo.fcm" ]
+then
+    if [ "$2" != "nocpp" ] 
+    then
+        use_iom=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_iomput )
+    else
+        use_iom=0
+    fi
+    have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" )
+    if [[ ( $use_iom -eq 0 ) && ( $have_lxios -ge 1 ) ]]
+    then 
+        sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$
+        mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1
+    fi
+#- in TOOLS directory looking for USE xios
+else
+    use_iom=$( egrep --exclude-dir=.svn -r USE ${NEW_CONF}/src/* | grep -c xios )
+    have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" )
+    if [[ ( $use_iom -eq 0 ) || ( $have_lxios != 1 ) ]]
+    then 
+        sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$
+        mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1
+    fi
+fi
+
+#- do we need oasis libraries?
+if [ "$2" != "nocpp" ] 
+then
+    use_oasis=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_oasis3 )
+else
+    use_oasis=0
+fi
+for liboa in psmile.MPI1 mct mpeu scrip mpp_io
+do
+    have_liboa=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-l${liboa}" )
+    if [[ ( $use_oasis -eq 0 ) && ( $have_liboa -ge 1 ) ]]
+    then 
+	sed -e "s/-l${liboa}//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$
+	mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1
+    fi
+done
+
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcheck_config.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcheck_config.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcheck_config.sh	(revision 12176)
@@ -0,0 +1,87 @@
+#!/bin/bash
+######################################################
+# Author : Rachid Benshila for NEMO
+# Contact : rblod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fcheck_config   : config checking 
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fcheck_config.sh
+# ================
+#
+# --------------------------
+# Check the configuration
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcheck_config.sh FILENAME CONFNAME
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Check the choice of the configuration:
+#
+# - Two cases
+# - One is explicitely set
+# - Nothing set, use the previous in use 
+#
+# We use TOOLS/cfgs_DIR/cfg.txt to check if the configuration exists.
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcheck_config.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+declare -a ZTAB
+if [ ${#2} -eq 0 ]; then
+   tail -1  ${CONFIG_DIR}/$1	> ${CONFIG_DIR}/cfg.tmp
+   read -a ZTAB < ${CONFIG_DIR}/cfg.tmp
+   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} )
+   \rm ${CONFIG_DIR}/cfg.tmp
+   echo "Warning !!!"
+   echo "No configuration specified"
+   echo "Use makenemo -n MYCONFIG"
+   echo "or  makenemo -h for help"
+   echo "Using default configuration : ${NEW_CONF}"
+fi
+if [ "$1" == cfg.txt ]; then
+   cat ${CONFIG_DIR}/$1 | grep "${NEW_CONF} " > ${CONFIG_DIR}/cfg.tmp
+   read -a ZTAB < ${CONFIG_DIR}/cfg.tmp
+   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} )
+   \rm ${CONFIG_DIR}/cfg.tmp
+fi
+
+unset -v ZTAB
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcheck_script.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcheck_script.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcheck_script.sh	(revision 12176)
@@ -0,0 +1,63 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fcheck_script.sh
+# ================
+#
+# --------------------------
+# Check
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcheck_script.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Check if utilities are in the path, typically fcm.
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcheck_script.sh fcm
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+myscript=`which $1`
+if [ ${#myscript} -eq 0 ]; then
+echo "WARNING !!!"
+echo "$1 has to be installed first"
+echo "Exiting......................"
+exit 1
+fi
+
+unset -v myscript
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fclean_config.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fclean_config.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fclean_config.sh	(revision 12176)
@@ -0,0 +1,98 @@
+#!/bin/bash
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fclean_config   : config removing 
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fclean_config.sh
+# ================
+#
+# ------------------------
+# Remove the configuration
+# ------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fclean_config.sh CONFNAME
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Remove the configuration:
+#
+# - remove CONFIG_NAME/WORK
+# - remove CONFIG_NAME/BLD
+# - remove CONFIG_NAME from TOOLS/mk/cfg.txt 
+# 
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fclean_config.sh ORCA2_LIM
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fclean_config.sh 2158 2010-10-20 17:30:03Z sflod $
+#
+#
+#
+#   * creation
+#
+#-
+
+NEW_CONF=${x_n}
+
+if [ ${#NEW_CONF} -eq 0 ] ; then
+	echo " "
+	echo "No configuration specified, please use makenemo -n CONFIG clean_config "
+else
+	echo "Are you sure that you want to remove this directory $NEW_CONF? [y/n] "
+	read answer
+	answer=`echo $answer | sed 's/^[y].*$/y/'`
+
+	if [  -z "$answer" -o "x$answer" = "xy" ]; then
+
+		## testing if configuration exists
+		if [[ ! $( grep "${NEW_CONF} " */work_cfgs.txt ) ]] ; then
+			echo "The configuration ${NEW_CONF} does not exist in file work_cfgs.txt"     
+			echo "No removing configuration"
+			echo " "
+		else
+			CONFIG_DIR=${MAIN_DIR}/$( grep -l "${NEW_CONF} " */work_cfgs.txt | cut -d/ -f1 )
+			rm -rf ${CONFIG_DIR}/${NEW_CONF}
+			sed -e "/${NEW_CONF} /d"  ${CONFIG_DIR}/work_cfgs.txt >  ${CONFIG_DIR}/work_cfgs.tmp
+			mv  ${CONFIG_DIR}/work_cfgs.tmp  ${CONFIG_DIR}/work_cfgs.txt
+			echo "${NEW_CONF} configuration REMOVED" 
+		fi
+
+	else
+		echo " "
+		echo "nothing to remove"
+	fi
+
+fi 
+
+unset -v answer
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fclean_var.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fclean_var.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fclean_var.sh	(revision 12176)
@@ -0,0 +1,68 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# =============
+# Fclean_var.sh
+# =============
+#
+# ----------------------------
+# Clean environment variables
+# ----------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fclean_var.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Clean environment variables
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fclean_var.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+#- Unset variables
+
+unset -v NSTOP
+unset -v TAB
+unset -v NEW_CONF
+unset -v REF_CONF
+unset -v CMP_NAM
+unset -v NBR_PRC
+unset -v NEM_SUBDIR
+unset -v MAIN_DIR
+unset -v CONFIG_DIR
+unset -v TOOLS_DIR
+unset -v COMPIL_DIR
+unset -v NEMO_DIR
+unset -v USEBLD
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcopy_dir.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcopy_dir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcopy_dir.sh	(revision 12176)
@@ -0,0 +1,62 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fcopy_dir.sh
+# ============
+#
+# --------------------------
+# Copy a reference directory
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcopy_dir.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# When a reference configuration is set, 
+# Copy NEMO sub-directories needed (OCE, TOP ...)
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcopy_dir.sh ORCA2_LIM
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+declare -a ZTAB
+grep "$1 " ${CONFIG_DIR}/cfg.txt > ${CONFIG_DIR}/cfg.tmp
+read -a ZTAB < ${CONFIG_DIR}/cfg.tmp
+TAB=( ${ZTAB[@]:1} )
+\rm ${CONFIG_DIR}/cfg.tmp
+
+unset -v ZTAB
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcopy_extdir.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcopy_extdir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fcopy_extdir.sh	(revision 12176)
@@ -0,0 +1,39 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+# ============
+# Fcopy_extdir.sh
+# ============
+# --------------------------
+# Copy a reference directory
+# --------------------------
+# SYNOPSIS
+# ========
+# ::
+#  $ Fcopy_extdir.sh
+# DESCRIPTION
+# ===========
+# When an unsupported configuration is requested, 
+# Prepare sources for the NEMO sub-directories needed (OCE, TOP ...)
+# EXAMPLES
+# ========
+# ::
+#  $ ./Fcopy_extdir.sh ORCA2_LIM
+# TODO
+# ====
+# option debug
+# EVOLUTIONS
+# ==========
+# $Id: Fcopy_extdir.sh 3294 2012-01-28 16:44:18Z rblod $
+#   * creation
+#-
+grep "$1 " ${CONFIG_DIR}/uspcfg.txt > ${CONFIG_DIR}/cfg.tmp
+#
+LOCAL_REF=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $2}')
+TAB=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $3}')
+REMOTE_CTL=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $4}')
+#
+\rm ${CONFIG_DIR}/cfg.tmp
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fdel_keys.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fdel_keys.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fdel_keys.sh	(revision 12176)
@@ -0,0 +1,81 @@
+#!/bin/bash
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fdel_keys   : del keys in cpp.fcm file  
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fdel_keys.sh
+# ================
+#
+# --------------------------
+# Add compilation keys
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fdel_keys.sh CONFIG_NAME del_key "LIST_KEYS"
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Add cpp keys when compiling a configuration, key list has to be enclosed with " ".
+# We perform a 'sed' on the CONFIG_NAME/CPP.fcm file, containing the list of keys. 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fdel_keys.sh CONFIG_NAME del_key "key_agrif"
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fdel_keys.sh 2158 2010-10-20 17:30:03Z sflod $
+#
+#
+#
+#   * creation
+#
+#-
+
+echo "Removing keys in : ${NEW_CONF}"
+
+for i in ${list_del_key} ; do
+
+     if [ "$(echo ${i} | grep -c key_nproc )" -ne 0                                      ]; then
+        sed -e "s/key_nproc[ij]=.* //" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \
+	    >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
+        mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
+        echo " "
+     elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ]; then
+         sed -e "s/\b${i}\b//" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \
+	     >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
+         mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
+         echo "deleted key $i in ${NEW_CONF}"
+     fi
+
+done
+
+unset -v list_del_key
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Ffetch_extdir.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Ffetch_extdir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Ffetch_extdir.sh	(revision 12176)
@@ -0,0 +1,53 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+# ===============
+# Ffetch_extdir.sh
+# ===============
+# ---------------
+# Make the config 
+# ---------------
+# SYNOPSIS
+# ========
+# ::
+#  $ Ffetch_extdir.sh
+# DESCRIPTION
+# ===========
+# - Make the config directory 
+# - Create repositories needed :
+#  
+#  - EXP00 for namelist
+#  - MY_SRC for user sources
+#  - BLD for compilation 
+# EXAMPLES
+# ========
+# ::
+#  $ ./Ffetch_extdir.sh CONFIG_NAME REMOTE_CTL 
+# TODO
+# ====
+# option debug
+# EVOLUTIONS
+# ==========
+# $Id: Ffetch_extdir.sh 3715 2012-11-28 16:06:02Z acc $
+#   * creation
+#-
+basedir=$(pwd)
+cd ${1}
+wget ${2} -O remote_file.list
+#
+if [ -f remote_file.list ] ; then
+ cat remote_file.list | grep -v '^#' |
+  while
+   read remfile locfile
+   do
+    if [ $remfile == 'create_directory' ] ;then
+      mkdir $locfile
+    else
+      wget $remfile -O $locfile
+    fi
+   done
+fi
+cd $basedir
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fgo_to_TOOLS.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fgo_to_TOOLS.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fgo_to_TOOLS.sh	(revision 12176)
@@ -0,0 +1,55 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ===============
+# Fgo_to_tools.sh
+# ===============
+#
+# --------------------------
+# Go to the TOOLS directory
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fgo_to_tools.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Go to the TOOLS directory
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fgo_to_tools.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+cd ${MAIN_DIR}/tools
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Flist_archfile.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Flist_archfile.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Flist_archfile.sh	(revision 12176)
@@ -0,0 +1,77 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==================
+# Flist_archfile.sh
+# ==================
+#
+# --------------------------
+# Check the compilation file
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Flist_archfile.sh Institute
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# List arch file available.
+# The first line of each file in NEMO/arch directory is echoed.  
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Flist_archfile.sh 
+#
+#  $ ./Flist_archfile.sh CNRS
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+archfile_loop() {
+
+	for file in $( ls $1/*.fcm ); do
+		zvar1=$( basename $file | sed 's/arch-\(.*\).fcm/\1/' )
+		zvar2=$( head -1  $file | tr -d '#'                   )
+		printf "%-30s %-s\n" ${zvar1} "${zvar2}"
+	done
+
+}
+
+echo -e "\n  ¤ Generic computing architectures"
+
+archfile_loop ${MAIN_DIR}/arch
+
+for dir in $( ls ${MAIN_DIR}/arch | grep -v "fcm$" ); do
+	echo -e "\n  ¤ Specific HPC architectures for "${dir}
+	archfile_loop ${MAIN_DIR}/arch/$dir
+done
+
+echo
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Flist_cfgs.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Flist_cfgs.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Flist_cfgs.sh	(revision 12176)
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+echo -e "\n  ¤ Reference configurations with default sub-components (can be updated by a new set)"
+cat ${MAIN_DIR}/cfgs/ref_cfgs.txt \
+| awk '{printf "%-20s", $1}{$1 = ""; printf "%s\n", $0}'
+
+echo -e "\n  ¤ Demonstrations cases (see https://github.com/sflavoni/NEMO-test-cases for more)"
+cat ${MAIN_DIR}/tests/demo_cfgs.txt \
+| awk '{printf "%-20s", $1}{$1 = ""; printf "%s\n", $0}'
+
+echo -e "\n  ¤ Full scripted remote configurations (CPP file + EXP00 inputs + MY_SRC + ...)"
+cat ${MAIN_DIR}/tests/rmt_cfgs.txt
+
+echo -e "\n  ¤ Available sub-components ('OCE' is mandatory in any set)"
+ls  ${MAIN_DIR}/src | awk -F/ '{ print $NF }' | column
+
+echo
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fmake_WORK.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fmake_WORK.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fmake_WORK.sh	(revision 12176)
@@ -0,0 +1,99 @@
+#!/bin/bash
+######################################################
+# Author : Rachid Benshila for NEMO
+# Contact : rblod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fmake_WORK      : create links in the WORK
+######################################################
+#set -vx
+set -o posix
+#set -u
+#set -e
+#+
+#
+# =============
+# Fmake_WORK.sh
+# =============
+#
+# -----------------------
+# Make the WORK directory
+# -----------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_WORK.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Make the WORK directory:
+#
+# - Create line in NEW_CONF/WORK
+# - Use specified sub-directories previously
+# - OPA has to be done first !!!
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_WORK.sh ORCA2_LIM OCE ICE
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+declare ZSRC=$1 ; shift 
+declare ZCONF=$1 ; shift
+ZTAB=( $@ )
+declare i=0 ; declare NDIR=${#ZTAB[@]}
+
+echo 'Creating '${ZCONF}'/WORK = '${ZTAB[*]}' for '${ZCONF}
+
+[ ! -d ${ZCONF}/MY_SRC ] && \mkdir ${ZCONF}/MY_SRC
+[   -d ${ZCONF}/WORK   ] || \mkdir ${ZCONF}/WORK
+
+if [ "${ZSRC}" != 'none' ] ; then 
+
+	if [ -d ${ZSRC} ] ; then 
+		ln -sf ${ZSRC}/*.[Ffh]90 ${ZCONF}/MY_SRC/. 
+		echo 'MY_SRC content is linked to '${ZSRC}
+	else
+		echo 'External directory for MY_SRC does not exist. Using default.'
+	fi
+
+else 
+	echo 'MY_SRC directory is : '${ZCONF}'/MY_SRC'
+fi
+
+#\rm -f ../${1}/WORK/*
+
+for comp in ${ZTAB[*]}; do
+	find ${NEMO_DIR}/$comp -name *.[Ffh]90 -exec ln -sf {} ${ZCONF}/WORK \;
+done
+
+for i in `(cd ${ZCONF}/MY_SRC ; \ls *.[Ffh]90 2>/dev/null ) `; do
+	[ -f ${ZCONF}/MY_SRC/$i ] &&  ln -sf $PWD/${ZCONF}/MY_SRC/${i} ${ZCONF}/WORK/.
+done
+
+unset -v ZCONF ZTAB i NDIR
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fmake_bld.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fmake_bld.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fmake_bld.sh	(revision 12176)
@@ -0,0 +1,64 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fmake_bld.sh
+# ============
+#
+# --------------------
+# Make build directory
+# --------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_bld.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Under CONFIG_NAME :
+# - Make the build directory 
+# - Create repositories needed :
+# - BLD for compilation 
+#
+# A tmpdir can be specified for memory issues.
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_bld.sh NEMOGCM/cfgs GYRE  /usr/tmp
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+[ ! -d ${3}/${2}     ] && \mkdir ${3}/${2}
+[ ! -d ${3}/${2}/BLD ] && \mkdir ${3}/${2}/BLD
+[ ! -d ${1}/${2}/BLD ] && ln -sf ${3}/${2}/BLD ${1}/${2}/BLD
+[ -f ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ] && ln -sf ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ${COMPIL_DIR}/cpp.fcm
+rm -f  ${1}/${NEW_CONF}/BLD/fcm.bld.lock
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fmake_config.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fmake_config.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fmake_config.sh	(revision 12176)
@@ -0,0 +1,66 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ===============
+# Fmake_config.sh
+# ===============
+#
+# ---------------
+# Make the config 
+# ---------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_config.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# - Make the config directory 
+# - Create repositories needed :
+#  
+#  - EXP00 for namelist
+#  - MY_SRC for user sources
+#  - BLD for compilation 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_config.sh CONFIG_NAME REF_CONFIG_NAME 
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+\mkdir -p ${1}
+\mkdir -p ${1}/EXP00
+\mkdir -p ${1}/MY_SRC
+\cp -R -n ${2}/cpp_${2}.fcm ${1}/cpp_${1}.fcm
+\cp -R -n ${2}/EXPREF/*namelist* ${1}/EXP00/.
+\cp -R -n ${2}/EXPREF/*.xml ${1}/EXP00/.
+[ -f ${2}/EXPREF/AGRIF_FixedGrids.in ] &&  \cp -R -n ${2}/EXPREF/AGRIF_FixedGrids.in ${1}/EXP00/.
+[ -d    ${2}/MY_SRC ] && \cp -n ${2}/MY_SRC/* ${1}/MY_SRC/. 2> /dev/null
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fprep_agrif.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fprep_agrif.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fprep_agrif.sh	(revision 12176)
@@ -0,0 +1,79 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==============
+# Fprep_agrif.sh
+# ==============
+#
+# ---------------------
+# Preparation for AGRIF
+# ---------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fprep_agrif.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Prepare directories for AGRIF and copy files needed
+#
+# Compile the conv
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fprep_agrif.sh CONFIG_NAME
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+#- AGRIF conv
+if [ "$AGRIFUSE" == 1 ]; then
+#-MPI for AGRIF
+if [ ! -f ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h ];then
+   echo '#if defined key_mpp_mpi' > ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+   echo '#define AGRIF_MPI'      >> ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+   echo '#endif'                 >> ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+fi
+
+ #- CONV
+fcm build ${COMPIL_DIR}/conv.cfg || exit 1
+#C_COMPILER=${CC-cc}
+#gmake CC=${C_COMPILER} -C ${MAIN_DIR}/ext/AGRIF/LIB
+
+#- AGRIF sources
+[ ! -d $2/$1/NEMOFILES ] && mkdir  $2/$1/NEMOFILES
+[ ! -d $2/$1/NEMOFILES/AGRIF_INC ] && mkdir  $2/$1/NEMOFILES/AGRIF_INC
+[ ! -d $2/$1/NEMOFILES/AGRIF_MODELFILES ] && mkdir  $2/$1/NEMOFILES/AGRIF_MODELFILES
+cp -f -r ${MAIN_DIR}/ext/AGRIF/agrif_oce.in  $2/$1/NEMOFILES/
+#cp -f -r ${MAIN_DIR}/ext/AGRIF/conv  $2/$1/NEMOFILES/
+cp -f -r $2/$1/AGRIFLIB/bin/conv  $2/$1/NEMOFILES/
+
+fi
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fread_dir.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fread_dir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/Fread_dir.sh	(revision 12176)
@@ -0,0 +1,83 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fread_dir.sh
+# ============
+#
+# ---------------------
+# Read user directories
+# ---------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fread_dir.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Read directoires needed from standard input
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fread_dir.sh Directory_NAME YES/NO
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+if [ "$2" == "YES" ]; then
+   echo -n " $1 [Y/n] "
+   read answer
+   answer=`echo $answer | sed 's/^[yY].*$/y/'`
+   if [  -z "$answer" -o "x$answer" = "xy" ]; then
+      TAB[$ind]="$1"
+      let ind=ind+1
+      echo " $1 selected "
+      echo "  "
+   else
+      echo " $1 Not selected "
+      echo "  "
+   fi
+   unset -v answer
+else
+   echo -n " $1 [y/N] "
+   read answer
+   answer=`echo $answer | sed 's/^[nN].*$/N/'`
+   if [ "x$answer" = "xy" ]; then
+      TAB[$ind]="$1"
+      let ind=ind+1
+      echo " $1 selected "
+      echo "  "
+   else
+      echo " $1 Not selected "
+      echo "  "
+   fi
+   unset -v answer
+fi
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/README
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/README	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/README	(revision 12176)
@@ -0,0 +1,7 @@
+CSHRC :
+setenv PATH ~/NEMOGCM/TOOLS:$PATH
+setenv NEMO_TDIR /users/rblod/tmp
+
+BASH :
+export PATH=$PATH:~/NEMOGCM/TOOLS'
+export NEMO_TDIR=/users/rblod/tmp
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/agrifpp.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/agrifpp.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/agrifpp.sh	(revision 12176)
@@ -0,0 +1,62 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==========
+# agrifpp.sh
+# ==========
+#
+# ----------------------------
+# Preform AGrif pre-processing
+# ----------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ agrifpp.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Preprocess file using the conv in NEMOFILES directory
+# Standard preprocessed files are stored in NEMOFILES/ppsrc/nemo
+# Source files are stored under NEMOFILES/obj
+# Include filess  in NEMOFILES/inc
+# Note that agrif2model.F90 should not be preprocess (standard one) 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./agrifpp.sh FILE_TO_PROCESS
+# 
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: agrifpp.sh 2143 2010-10-04 12:49:55Z rblod $
+#
+#
+#
+#   * creation
+#
+#-
+MYFILE=$(basename "$1")
+if [ "$MYFILE" == "agrif2model.f90" ];then
+   \cp ${NEMO_TDIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE
+else
+cd ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/ppsrc/nemo ; ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/conv ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/agrif_oce.in -rm -incdir ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/inc -comdirout ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj -convfile ${MYFILE} > /dev/null 
+fi
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/agrifpp_2.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/agrifpp_2.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/agrifpp_2.sh	(revision 12176)
@@ -0,0 +1,65 @@
+#!/bin/bash
+set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==========
+# agrifpp.sh
+# ==========
+#
+# ----------------------------
+# Preform AGrif pre-processing
+# ----------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ agrifpp.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Preprocess file using the conv in NEMOFILES directory
+# Standard preprocessed files are stored in NEMOFILES/ppsrc/nemo
+# Source files are stored under NEMOFILES/obj
+# Include filess  in NEMOFILES/inc
+# Note that agrif2model.F90 should not be preprocess (standard one) 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./agrifpp.sh FILE_TO_PROCESS
+# 
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: agrifpp.sh 2143 2010-10-04 12:49:55Z rblod $
+#
+#
+#
+#   * creation
+#
+#-
+MYFILE=$(basename "$1")
+
+echo $MYFILE
+
+if [ "$MYFILE" == "agrif2model.f90" ];then
+   \cp ${NEMO_TDIR}/${NEW_CONF}/src/${MYFILE/.f90/.F90} ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE
+else
+cd ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/ppsrc/nemo ; ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/conv ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/agrif_oce.in -rm -incdir ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/inc -comdirout ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj -convfile ${MYFILE}
+fi
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bash-font-lock.el
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bash-font-lock.el	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bash-font-lock.el	(revision 12176)
@@ -0,0 +1,81 @@
+; Bash syntax highlighting
+
+(defvar bash-builtins  ;; Unrecognized UNIX commands
+  '("awk" "basename" "cat" "cp" "cut" "date" "diff" "dirname" "env" "find"
+    "grep" "head" "ls" "make" "mkdir" "mv" "rm" "sed" "sort" "svn" "tail" "tee"
+    "touch" "uniq" "xargs"                                                     ))
+
+(defvar bash-keywords  ;; Bash keywords (consistency with 'return' command fontification)
+  '("declare" "let" "local" "readonly" "typeset" "set" "unset"                 ))
+
+(defvar bash-functions ;; Sourced or declared fonctions
+  '("fake_func"                                                                   ;; 
+    "em" "ev" "ge" "heil" "mkcd" "ok"                                             ;; Common
+    "nemch" "nemde" "nemid" "nemtr" "nemst"                                       ;; NEMO branchs
+    "cmpcf" "if90" "gf90"                                                         ;; NEMO cmp
+    "nemo_help" "nemo_cfg"                                                        ;; NEMO cfg
+    "append_output_file" "appech_output_file" "super_grep" "check_args_count"     ;; NEMO SETTE
+    "set_namelist" "set_xio" "post_test_tidyup"                                )) ;; Id
+
+(defvar bash-font-lock ;; Be careful with order
+  '(;; Variables
+    ;;; GLOBALS variables|arrays
+    ("\\(?:export +\\)?\\$?{?\\(#?[A-Z][A-Z_0-9]+\\)\\(?:\\[\\(?2:[@*]\\)\\]\\)?"
+     (1 font-lock-constant-face     ) (2 font-lock-constant-face      nil t))
+    ;;; Locals arrays
+    ("\\(?1:#?[a-z][a-z_0-9]+\\)\\[\\([@*]\\)?"
+     (1 font-lock-variable-name-face) (2 font-lock-variable-name-face nil t))
+    ;;; Shell specials variables
+    ("\\${?\\([#@?!_-]?[a-z]?[a-z_0-9]*\\)}?" 1 font-lock-variable-name-face)
+
+    ;; Tests  '[ ... ]' '[[ ... ]]' '(( ... ))'
+    ("\\((\\{2\\}\\) \\(?:.*\\) \\()\\{2\\}\\)"            
+     (1 font-lock-builtin-face) (2 font-lock-builtin-face))
+    ("\\(\\[\\{1,2\\}\\) \\(?:[^]]+\\) \\(\\]\\{1,2\\}\\)"
+     (1 font-lock-builtin-face) (2 font-lock-builtin-face))
+
+    ;; Operators  ' ! ' ' != ' ' ~= '  ' && ' ' || '
+    (" \\!=? \\| ~= " 0 font-lock-negation-char-face)
+    (" && \\| || "    0 font-lock-keyword-face      )
+
+    ;; Compound commands
+    ("\\\\$"                0 font-lock-warning-face) ; '\'
+    ("\\(?:[^;]\\)\\(;\\) " 1 font-lock-keyword-face) ; '; '
+     ;;; Function
+    ("^\\(?:function +\\)?\\(\\sw+\\)(?)? +\\({\\)"
+     (1 font-lock-function-name-face) (2 font-lock-warning-face      ))
+    ("^}$"                             0 font-lock-warning-face       )
+     ;;; Commands block ' { ...; }'
+    ("\\({\\) \\(?:[^}]*\\); +\\(}\\)?" (1 font-lock-warning-face) (2 font-lock-warning-face nil t))
+    ("\\(?:.*\\); +\\(}\\)$"          1 font-lock-warning-face                                  )
+     ;;; Sub-shell      '( ...  )'
+    ("\\((\\) \\(?:[^)]*\\) \\()\\)" (1 font-lock-warning-face) (2 font-lock-warning-face))
+
+    ;; 'case ... in ...) ...;; esac'
+    ("\\()\\)\\(?:[^)]*\\)\\(;;\\)" (1 font-lock-keyword-face) (2 font-lock-keyword-face))
+    ("^[^(]*\\()\\)$"                1 font-lock-keyword-face) ; Regular syntax
+    ("^\\s-+;;$"                     0 font-lock-keyword-face) ;    "      ""
+    )
+  )
+
+; Configuration loading
+(font-lock-add-keywords 'sh-mode `((,(regexp-opt bash-builtins  'words) 0 font-lock-builtin-face      )))
+(font-lock-add-keywords 'sh-mode `((,(regexp-opt bash-keywords  'words) 0 font-lock-keyword-face      )))
+(font-lock-add-keywords 'sh-mode `((,(regexp-opt bash-functions 'words) 0 font-lock-function-name-face)))
+(font-lock-add-keywords 'sh-mode bash-font-lock                                                         )
+
+; Highlighting example for font lock faces
+(font-lock-add-keywords 'sh-mode '(
+  ("font-lock-warning-face"           . font-lock-warning-face          )
+  ("font-lock-function-name-face"     . font-lock-function-name-face    )
+  ("font-lock-variable-name-face"     . font-lock-variable-name-face    )
+  ("font-lock-keyword-face"           . font-lock-keyword-face          )
+  ("font-lock-comment-face"           . font-lock-comment-face          )
+  ("font-lock-comment-delimiter-face" . font-lock-comment-delimiter-face)
+  ("font-lock-type-face"              . font-lock-type-face             )
+  ("font-lock-constant-face"          . font-lock-constant-face         )
+  ("font-lock-builtin-face"           . font-lock-builtin-face          )
+  ("font-lock-preprocessor-face"      . font-lock-preprocessor-face     )
+  ("font-lock-string-face"            . font-lock-string-face           )
+  ("font-lock-doc-face"               . font-lock-doc-face              )
+  ("font-lock-negation-char-face"     . font-lock-negation-char-face    )))
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld.cfg	(revision 12176)
@@ -0,0 +1,68 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+
+search_src           1
+
+src::ioipsl               $MAIN_DIR/ext/IOIPSL/src
+src::agrif                $MAIN_DIR/ext/AGRIF/AGRIF_FILES
+src::nemo                 $CONFIG_DIR/$NEW_CONF/NEMOFILES/obj
+
+bld::target  nemo.exe
+bld::exe_dep
+
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::fflags::agrif   %FFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::ioipsl   1
+bld::pp::nemo     1
+bld::pp::agrif    1
+bld::tool::fppflags::nemo      %FPPFLAGS -I$CONFIG_DIR/$NEW_CONF/NEMOFILES/inc
+bld::tool::fppflags::ioipsl    %FPPFLAGS
+bld::tool::fppflags::agrif     %FPPFLAGS -include ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_nesting.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_nesting.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_nesting.cfg	(revision 12176)
@@ -0,0 +1,57 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_tools.fcm
+
+search_src           1
+
+src::agrif                $MAIN_DIR/ext/AGRIF/AGRIF_FILES
+src::nemo                 $TOOLS_DIR/$NEW_CONF/src
+
+#bld::target  nemo.exe
+bld::exe_dep
+
+dir::root                 $NEMO_TDIR/$NEW_CONF/BLD
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::agrif    1
+bld::pp::nemo     1
+bld::tool::fppkeys
+bld::tool::fppflags::agrif -P -traditional
+bld::tool::fppflags::nemo %FPPFLAGS -I$TOOLS_DIR/$NEW_CONF/NEMOFILES/inc
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        use::mpi
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+#bld::exe_name::model  nemo.exe
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_preproagr.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_preproagr.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_preproagr.cfg	(revision 12176)
@@ -0,0 +1,82 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+search_src           1
+
+src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK
+
+bld::target  lib_cray.f90 nemo.f90 agrif_user.f90 agrif2model.f90 
+
+dir::root            $NEMO_TDIR/$NEW_CONF/NEMOFILES
+
+bld::tool::fc_output
+bld::tool::fc_compile
+bld::tool::fc_include
+bld::tool::fc        $COMPIL_DIR/agrifpp.sh 
+bld::tool::fflags    
+bld::tool::ld       
+bld::tool::ldflags   
+bld::tool::ar        
+bld::tool::arflags   
+bld::tool::make      %MK
+
+OUTFILE_EXT::obj   .f90
+
+# Pre-process code before analysing dependencies
+bld::pp::nemo     1
+bld::pp::nemo/agrif2model     0
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fppflags::nemo  %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+bld::excl_dep	     use::nc4interface
+bld::excl_dep	     use::ioipsl
+bld::excl_dep	     use::xios
+bld::excl_dep        use::agrif_grids
+bld::excl_dep	     use::agrif_types
+bld::excl_dep	     use::agrif_util
+bld::excl_dep        inc::SetNumberofcells.h
+bld::excl_dep        inc::GetNumberofcells.h
+bld::excl_dep        inc::include_use_Alloc_agrif.h
+bld::excl_dep        inc::allocations_calls_agrif.h
+bld::excl_dep        inc::modtype_agrif.h
+bld::excl_dep        inc::probdim_agrif.h
+bld::excl_dep        inc::keys_agrif.h
+bld::excl_dep        h::SetNumberofcells.h
+bld::excl_dep        h::GetNumberofcells.h
+bld::excl_dep        h::include_use_Alloc_agrif.h
+bld::excl_dep        h::allocations_calls_agrif.h
+bld::excl_dep        h::modtype_agrif.h
+bld::excl_dep        h::probdim_agrif.h
+bld::excl_dep        h::keys_agrif.h
+bld::excl_dep        use::mod_attribut
+bld::excl_dep        use::mod_event_client
+bld::excl_dep        use::mod_ioclient
+#bld::excl_dep        OBJ
+
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" and ".f90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+bld::src_type::nemo/agrif2model.F90 FORTRAN::FORTRAN9X::SOURCE
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_preproagr_tools.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_preproagr_tools.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_preproagr_tools.cfg	(revision 12176)
@@ -0,0 +1,82 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+search_src           1
+
+src::nemo                 $TOOLS_DIR/$NEW_CONF/src
+
+bld::target  agrif_user.f90 agrif2model.f90 create_coordinate.f90
+
+dir::root            $TOOLS_DIR/$NEW_CONF/NEMOFILES
+
+bld::tool::fc_output
+bld::tool::fc_compile
+bld::tool::fc_include
+bld::tool::fc        $COMPIL_DIR/agrifpp_2.sh 
+bld::tool::fflags    
+bld::tool::ld       
+bld::tool::ldflags   
+bld::tool::ar        
+bld::tool::arflags   
+bld::tool::make      %MK
+
+OUTFILE_EXT::obj   .f90
+
+# Pre-process code before analysing dependencies
+bld::pp::nemo     1
+bld::pp::nemo/agrif2model     0
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fppflags::nemo  %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+bld::excl_dep	     use::nc4interface
+bld::excl_dep	     use::ioipsl
+bld::excl_dep	     use::xios
+bld::excl_dep        use::agrif_grids
+bld::excl_dep	     use::agrif_types
+bld::excl_dep	     use::agrif_util
+bld::excl_dep        inc::SetNumberofcells.h
+bld::excl_dep        inc::GetNumberofcells.h
+bld::excl_dep        inc::include_use_Alloc_agrif.h
+bld::excl_dep        inc::allocations_calls_agrif.h
+bld::excl_dep        inc::modtype_agrif.h
+bld::excl_dep        inc::probdim_agrif.h
+bld::excl_dep        inc::keys_agrif.h
+bld::excl_dep        h::SetNumberofcells.h
+bld::excl_dep        h::GetNumberofcells.h
+bld::excl_dep        h::include_use_Alloc_agrif.h
+bld::excl_dep        h::allocations_calls_agrif.h
+bld::excl_dep        h::modtype_agrif.h
+bld::excl_dep        h::probdim_agrif.h
+bld::excl_dep        h::keys_agrif.h
+bld::excl_dep        use::mod_attribut
+bld::excl_dep        use::mod_event_client
+bld::excl_dep        use::mod_ioclient
+#bld::excl_dep        OBJ
+
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" and ".f90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+bld::src_type::nemo/agrif2model.F90 FORTRAN::FORTRAN9X::SOURCE
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_tools.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_tools.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bld_tools.cfg	(revision 12176)
@@ -0,0 +1,47 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_tools.fcm
+
+search_src           1
+
+src::nemo                 $TOOLS_DIR/$NEW_CONF/src
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        use::mpi
+
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bldxag.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bldxag.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/bldxag.cfg	(revision 12176)
@@ -0,0 +1,64 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+
+search_src           1
+
+src::ioipsl               $MAIN_DIR/ext/IOIPSL/src
+src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK
+
+bld::target nemo.exe
+bld::exe_dep
+
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::ioipsl   1
+bld::pp::nemo     1
+bld::tool::fppflags::nemo     %FPPFLAGS
+bld::tool::fppflags::ioipsl   %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
+
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/conv.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/conv.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/conv.cfg	(revision 12176)
@@ -0,0 +1,35 @@
+# ----------------------- FCM extract configuration file -----------------------
+# template to compile agrif conv, currently not used
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+inc $COMPIL_DIR/arch_nemo.fcm
+
+bld::tool::cc        %CC
+bld::tool::cflags    %CFLAGS
+bld::tool::make      %MK
+
+src::convsrc   $MAIN_DIR/ext/AGRIF/LIB
+
+ #----------------------------------------------------------------------------
+# Build options (code-specific, machine-independent)
+# ----------------------------------------------------------------------------
+dir::root            $NEMO_TDIR/$NEW_CONF/AGRIFLIB
+
+#bld::tool::cflags::convsrc  -O0  
+#bld::tool::ld::convsrc   cc
+#bld::tool::ldflags::convsrc -O  ../obj/fortran.o ../obj/fortran.o 
+#bld::pp 1
+
+
+
+bld::exe_name::main conv
+bld::target                              libconvsrc.a  fortran.o main.o  conv
+bld::exe_dep::conv      
+
+
+
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/template.sh
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/template.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/template.sh	(revision 12176)
@@ -0,0 +1,186 @@
+#!/bin/bash
+
+
+#§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
+#
+# This template for Bash coding pair with Emacs Lisp package 'bash-font-lock.el'
+# to enhance default shell syntax fontification. This package is based on regexs
+# to match examples of concsyntax showed below.
+# All this is not mandatory and probably not optimized with other correct rules
+# Feel free to add your tips, modify it at your convenience or give your feedback
+# to improve it.
+#
+#§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
+
+
+# To automatically use it with a bash script, copy it to your ~/.emacs.d and 
+# add '(load "~/.emacs.d/bash-font-lock.el")' in your .emacs configuration file
+#--------------------------------------------------------------------------------
+ # If a command  is not highlighted, add its name to 'bash-builtins'  list
+ # "  " function ""  "       "     ,  "   "   ""  "" 'bash-functions'  "" 
+
+# UNIX built-in commands sample
+#-------------------------------
+.; alias; bg; bind; builtin; caller; compgen; complete; declare; dirs; disown
+enable; fc; fg; help; history; jobs; kill; let; local; popd; printf; pushd
+shopt; source; suspend; typeset; unalias; eval; export; getopts; newgrp; pwd
+read; readonly; times; ulimit; command; hash; test; type; cd; echo; eval; set
+shift; umask; unset; wait
+
+# Common bash built-in commands already added to 'bash-builtins' list
+#---------------------------------------------------------------------
+awk basename cat cp cut date diff dirname env find grep head ls make mkdir mv rm
+sed sort svn tail tee touch uniq xargs
+
+# Variables
+#-----------
+ # Specials    parameters (see Bash manual for details, `man bash`)
+$0 $# $* $@ $? $! $_ $$ $-
+ # Positionnal parameters (ordered arguments given to run script "$0")
+$1 $2 $3 ...                
+$* ==  "$1${IFS}$2${IFS}$3..." #   Single word , recommended use for string
+$@ ==  "$1"    "$2"    "$3"...  # Separate words, recommended use for array
+ # Identify locals against GLOBALS or ENVIRONMENT variables with case sensitive
+TEMP=${temp_0123}; temp=${TEMP_0123}; export TEMP=${TEMP_0123}
+ # Possibles variable assignation syntax
+temp='temp'; temp=$1 # Simple
+length_temp=${#temp} # Length of string
+temp=$(( 1 + 1 ))    # Integer arithmetic evaluation
+temp=${........}     # String operations
+temp=$(test ....)    # Regular syntax
+temp=$( test ... )   # Highlight sub-shell '( ... )' & command or function call
+temp=`test .....`    # Backquotes not recommended to avoid complete highlighting
+
+# Arrays
+#--------
+ # Initialisation
+declare -a array                 # Explicit
+array=([0]='zero' [1]='one' ...) # Implicit with index assignement
+array[0]='zero'; array[9]='ten'  # Implicit or add element to array at an index
+ # Curly brackets are essential to work with arrays
+ # Last index of an array
+IDX=${#temp_0123[@]}; idx=${#TEMP_0123[@]}
+ # Get last element of an array (${#array[@]})
+LAST_ELMNT=array[${#array[@]}]; last_elmnt=ARRAY[${#ARRAY[@]}]
+ # Remove an element or entire array
+unset array[9]; unset array[@]
+
+# Strings
+#---------
+ # Single quotes are recommended to identified entire characters string instead
+ # of doubles quotes or initialize variable
+echo 'The name of the script is '$0' with following arguments '$*
+ # Doubles quotes should only be used when it's necessary to interpret escaping
+ # character or to perform parameter substitution
+printf "The value of PI is %8.6f.\n" $PI; sed "s/3.1415/$PI/" temp.txt
+
+# Function
+#----------
+ # 'function' word is not not mandatory at declaration if you have double
+ # brackets '()' right after name. A function has to be declared before its call
+ # so should be placed at the beginning of the main script. A clever solution is
+ # to gather similar functions in kind of a 'module' file which will be sourced
+ # from main script.
+ # 2 possibles syntax:
+function fake_func { local temp=''; ...; return ...; }
+fake_func() {
+    local temp='' # Declare variable as local, if not his attribute is global
+    ...
+    return ...   # Function can only return an integer (stderr by default)
+                  # export result by a global variable to bypass it 
+}
+ # Function call (with or without argument)
+temp=$( fake_func $1 $2 ); fake_func $1 $2; fake_func
+
+# Tests operators differs with type of test (arithmetic or string comparison
+# for number/characters, file attributs), see manual for test with `man test`
+#----------------------------------------------------------------------------
+ # Possible syntax : literal 'test' or compact syntax with brackets/parenthesis
+ # at the ends
+ # '[ ... ]' & '[[ ... ]]' are almost identical (simple and extended test)
+ # With ' != ' & ' == ' operators, right string is considered as          regex
+ #  ""             '~='     "    ,   "     ""   "      ""     "  extended   "
+[ $temp ~= "..." ] && [[ ! -e temp.txt ]] || (( $temp >= 0 ))
+
+# For compound commands, prefer the use of command block '{ ...; }' instead of
+# a sub-shell '( ... )', keep in mind that despite sub-shell inherit from its
+# run script all variables declared as locals are lost at the end of execution
+
+# To cut a long sequence, put the escape character '\' at the end of line and
+# continue on next line (possible on several lines)
+printf "This is a very very very long sentence that I have to cut in order to  \
+        be less than 80 characters for a line of code but I don't have to call \
+        the same command several times.\n                                       "
+# A pipe ' | ' cannot be put at the end of a line, even if you have a '\'
+cat temp.txt | cut -d' ' -f-5 | sort -kr3n | uniq -c | sort | head -n25 \
+| awk '$3 >= 1024 {print $4}'                                           \
+| xargs -t -i() mv () $HOST@$HOSTNAME:${REP_STORAGE}
+
+# 'if ...; then ...; fi'
+#------------------------
+ # Very short syntax with commands block '{ ...; }'
+[ ... ] && { ...; ...; }
+ #      Short syntax with commands block '{ ...; }'
+[ ... ] && { ...; \
+             ...;  }
+ #    Regular syntax
+if [ ... ]; then
+    ...  
+fi
+
+# 'if ...; then ...;  else ...; fi'
+#----------------------------------
+ #   Short syntax with commands block '{ ... }'
+{ [ ... ] && ...; } || { ...; ...; }
+ # Regular syntax
+if [ ... ]; then
+    ...
+else
+    ...
+fi
+
+# 'case ... in ...) ... ;; ... esac'
+#-----------------------------------
+case ... in
+ # Very short syntax
+    ...) ...;;     ...) ...;;    ...) ...;;
+ #      Short syntax
+    ...) ...; ...; ...;;
+ #    Regular syntax
+    ...)
+	...
+	;;
+esac
+
+# List font lock faces with effective highlighting (can be customized)
+#---------------------------------------------------------------------
+ font-lock-warning-face
+ # for a construct that is peculiar, or that greatly changes the meaning of
+  #other text
+ font-lock-function-name-face
+ # for the name of a function being defined or declared
+ font-lock-variable-name-face
+ # for the name of a variable being defined or declared
+ font-lock-keyword-face
+ # for a keyword with special syntactic significance, like ‘for’ and ‘if’ in C.
+ font-lock-comment-face
+ # for comments
+ font-lock-comment-delimiter-face
+ # for comments delimiters, like ‘/*’ and ‘*/’ in C. On most terminals, this
+  #inherits from font-lock-comment-face
+ font-lock-type-face
+ # for the names of user-defined data types
+ font-lock-constant-face
+ # for the names of constants, like ‘NULL’ in C
+ font-lock-builtin-face
+ # for the names of built-in functions
+ font-lock-preprocessor-face
+ # for preprocessor commands. This inherits, by default, from
+  #font-lock-builtin-face
+ font-lock-string-face
+ # for string constants
+ font-lock-doc-face
+ # for documentation strings in the code. This inherits, by default, from
+  #font-lock-string-face
+ font-lock-negation-char-face
+ # for easily-overlooked negation characters
Index: /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/tools.txt
===================================================================
--- /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/tools.txt	(revision 12176)
+++ /utils/build_MERGE_2019/mk_AGRIF_CMEMS_2020/tools.txt	(revision 12176)
@@ -0,0 +1,1 @@
+DOMAINcfg 
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fadd_keys.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fadd_keys.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fadd_keys.sh	(revision 12176)
@@ -0,0 +1,77 @@
+#!/bin/bash
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fadd_keys   : add keys in cpp.fcm file  
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fadd_keys.sh
+# ============
+#
+# --------------------
+# Add compilation keys
+# --------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fadd_keys.sh CONFIG_NAME add_key "LIST_KEYS"
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Script to add a set of key when compiling a configuration.
+# The list of key to be added has to be enclosed with " ". 
+# A 'sed' is performed to modify the CONFIG_NAME/cpp.fcm file to    
+# add the new key(s). 
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fadd_keys.sh ORCA2_LIM add_key "key_mpp_rep"
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fadd_keys.sh 2158 2010-10-20 17:30:03Z sflod $
+#
+#
+#
+#   * creation
+#
+#-
+ echo "Adding keys in : ${NEW_CONF}" 
+ for i in ${list_add_key} ; do
+	if [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "\<$i\>" )" -ne 0 ] ; then
+ 	   echo "key $i already present in cpp_${NEW_CONF}.fcm" 
+	else
+	   sed -e "s/$/ ${i}/"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
+ 	   mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
+ 	   echo "added key $i in ${NEW_CONF}" 
+	fi
+ done
+ 
+ unset -v list_add_key
+
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcheck_archfile.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcheck_archfile.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcheck_archfile.sh	(revision 12176)
@@ -0,0 +1,215 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==================
+# Fcheck_archfile.sh
+# ==================
+#
+# --------------------------
+# Check the compilation file
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcheck_archfile.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Check the choice of the compiler.
+# Three cases :  
+#
+# - There was a previous choice
+# - A new one has be specified, we use this one
+# - No information, exit
+#
+# We use TOOLS/COMPILE/arch.fcm to see if something was chosen. 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcheck_archfile.sh ARCHFILE CPPFILE COMPILER
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+cpeval () 
+{
+    cat > $2 << EOF
+
+#==========================================================
+#    Automatically generated by Fcheck_archfile.sh from
+#    $1
+#==========================================================
+
+EOF
+    while read line  
+    do  
+	eval "echo \"$line\" >> $2"
+    done < $1
+}
+# cleaning related to the old version
+rm -f $( find ${COMPIL_DIR} -type l -name $1 -print )
+#
+if [ ${#3} -eq 0 ]; then # arch not specified
+    if [ ! -f ${COMPIL_DIR}/arch.history ]; then
+	echo "Warning !!!"
+	echo "NO compiler chosen"
+	echo "Try makenemo -h for help"
+	echo "EXITING..."
+	exit 1 
+    else # use the arch file defined in arch.history
+	myarch=$( cat ${COMPIL_DIR}/arch.history )	
+	if [ ! -f $myarch ]; then
+	    echo "Warning !!!"
+	    echo "previously used arch file no more found:"
+	    echo $myarch
+	    echo "EXITING..."
+	    exit 1 
+	else
+	    if [ -f ${COMPIL_DIR}/$1 ]; then
+		if [ "$2" != "nocpp" ] 
+		then
+		    # has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}?
+		    mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" )
+		    if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then
+			echo $mycpp > ${COMPIL_DIR}/cpp.history
+			cpeval ${myarch} ${COMPIL_DIR}/$1
+		    fi
+		    # has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}?
+		    mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print )
+		    [ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+		fi
+		# has myarch file been updated since we copied it in ${COMPIL_DIR}?
+		myarchdir=$( dirname ${myarch} )
+		myarchname=$( basename ${myarch} )
+		myarch=$( find -L $myarchdir -cnewer ${COMPIL_DIR}/$1 -name $myarchname -print )
+		[ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+	    else
+		cpeval ${myarch} ${COMPIL_DIR}/$1
+	    fi
+	fi
+    fi
+else 
+    nb=$( find ${MAIN_DIR}/arch -name arch-${3}.fcm -print | wc -l )
+    if [ $nb -eq 0 ]; then # no arch file found
+	echo "Warning !!!"
+	echo "Compiler not existing"
+	echo "Try makenemo -h for help"
+	echo "EXITING..."
+	exit 1       
+    fi
+    if [ $nb -gt 1 ]; then # more than 1 arch file found
+	echo "Warning !!!"
+	echo "more than 1 arch file for the same compiler have been found"
+	find ${MAIN_DIR}/arch -name arch-${3}.fcm -print
+	echo "keep only 1"
+	echo "EXITING..."
+	exit 1       
+    fi
+    myarch=$( find ${MAIN_DIR}/arch -name arch-${3}.fcm -print )
+    # we were already using this arch file ?
+    if [ "$myarch" == "$( cat ${COMPIL_DIR}/arch.history )" ]; then 
+	if [ -f ${COMPIL_DIR}/$1 ]; then
+	    if [ "$2" != "nocpp" ] 
+	    then
+		# has the cpp keys file been changed since we copied the arch file in ${COMPIL_DIR}?
+		mycpp=$( ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" )
+		if [ "$mycpp" != "$( cat ${COMPIL_DIR}/cpp.history )" ]; then
+		    echo $mycpp > ${COMPIL_DIR}/cpp.history
+		    cpeval ${myarch} ${COMPIL_DIR}/$1
+		fi
+		# has the cpp keys file been updated since we copied the arch file in ${COMPIL_DIR}?
+		mycpp=$( find -L ${COMPIL_DIR} -cnewer ${COMPIL_DIR}/$1 -name $2 -print )
+		[ ${#mycpp} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+	    fi
+	    # has myarch file been updated since we copied it in ${COMPIL_DIR}?
+	    myarch=$( find -L ${MAIN_DIR}/arch -cnewer ${COMPIL_DIR}/$1 -name arch-${3}.fcm -print )
+	    [ ${#myarch} -ne 0 ] && cpeval ${myarch} ${COMPIL_DIR}/$1
+	else
+	    cpeval ${myarch} ${COMPIL_DIR}/$1
+	fi
+    else
+	if [ "$2" != "nocpp" ] 
+	then
+	    ls -l ${COMPIL_DIR}/$2 | sed -e "s/.* -> //" > ${COMPIL_DIR}/cpp.history
+	fi
+	echo ${myarch} > ${COMPIL_DIR}/arch.history
+	cpeval ${myarch} ${COMPIL_DIR}/$1
+    fi
+fi
+
+#- do we need xios library?
+#- 2 cases: 
+#- in CONFIG directory looking for key_iomput
+if [ "$1" == "arch_nemo.fcm" ]
+then
+    if [ "$2" != "nocpp" ] 
+    then
+        use_iom=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_iomput )
+    else
+        use_iom=0
+    fi
+    have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" )
+    if [[ ( $use_iom -eq 0 ) && ( $have_lxios -ge 1 ) ]]
+    then 
+        sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$
+        mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1
+    fi
+#- in TOOLS directory looking for USE xios
+else
+    use_iom=$( egrep --exclude-dir=.svn -r USE ${NEW_CONF}/src/* | grep -c xios )
+    have_lxios=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-lxios" )
+    if [[ ( $use_iom -eq 0 ) || ( $have_lxios != 1 ) ]]
+    then 
+        sed -e "s/-lxios//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$
+        mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1
+    fi
+fi
+
+#- do we need oasis libraries?
+if [ "$2" != "nocpp" ] 
+then
+    use_oasis=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$2 | grep -c key_oasis3 )
+else
+    use_oasis=0
+fi
+#ignore use_oasis if XIOS_OASIS is set  (doesn't matter to what value) 
+if [[ ! -z "$XIOS_OASIS" ]]; then 
+    use_oasis=1 
+fi 
+for liboa in psmile.MPI1 mct mpeu scrip mpp_io
+do
+    have_liboa=$( sed -e "s/#.*$//" ${COMPIL_DIR}/$1 | grep -c "\-l${liboa}" )
+    if [[ ( $use_oasis -eq 0 ) && ( $have_liboa -ge 1 ) ]]
+    then 
+	sed -e "s/-l${liboa}//g" ${COMPIL_DIR}/$1 > ${COMPIL_DIR}/tmp$$
+	mv -f ${COMPIL_DIR}/tmp$$ ${COMPIL_DIR}/$1
+    fi
+done
+
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcheck_config.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcheck_config.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcheck_config.sh	(revision 12176)
@@ -0,0 +1,87 @@
+#!/bin/bash
+######################################################
+# Author : Rachid Benshila for NEMO
+# Contact : rblod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fcheck_config   : config checking 
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fcheck_config.sh
+# ================
+#
+# --------------------------
+# Check the configuration
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcheck_config.sh FILENAME CONFNAME
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Check the choice of the configuration:
+#
+# - Two cases
+# - One is explicitely set
+# - Nothing set, use the previous in use 
+#
+# We use TOOLS/cfgs_DIR/cfg.txt to check if the configuration exists.
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcheck_config.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+declare -a ZTAB
+if [ ${#2} -eq 0 ]; then
+   tail -1  ${CONFIG_DIR}/$1	> ${CONFIG_DIR}/cfg.tmp
+   read -a ZTAB < ${CONFIG_DIR}/cfg.tmp
+   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} )
+   \rm ${CONFIG_DIR}/cfg.tmp
+   echo "Warning !!!"
+   echo "No configuration specified"
+   echo "Use makenemo -n MYCONFIG"
+   echo "or  makenemo -h for help"
+   echo "Using default configuration : ${NEW_CONF}"
+fi
+if [ "$1" == cfg.txt ]; then
+   cat ${CONFIG_DIR}/$1 | grep "${NEW_CONF} " > ${CONFIG_DIR}/cfg.tmp
+   read -a ZTAB < ${CONFIG_DIR}/cfg.tmp
+   NEW_CONF=${ZTAB[0]} ; TAB=( ${ZTAB[@]:1} )
+   \rm ${CONFIG_DIR}/cfg.tmp
+fi
+
+unset -v ZTAB
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcheck_script.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcheck_script.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcheck_script.sh	(revision 12176)
@@ -0,0 +1,63 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fcheck_script.sh
+# ================
+#
+# --------------------------
+# Check
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcheck_script.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Check if utilities are in the path, typically fcm.
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcheck_script.sh fcm
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+myscript=`which $1`
+if [ ${#myscript} -eq 0 ]; then
+echo "WARNING !!!"
+echo "$1 has to be installed first"
+echo "Exiting......................"
+exit 1
+fi
+
+unset -v myscript
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fclean_config.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fclean_config.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fclean_config.sh	(revision 12176)
@@ -0,0 +1,98 @@
+#!/bin/bash
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fclean_config   : config removing 
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fclean_config.sh
+# ================
+#
+# ------------------------
+# Remove the configuration
+# ------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fclean_config.sh CONFNAME
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Remove the configuration:
+#
+# - remove CONFIG_NAME/WORK
+# - remove CONFIG_NAME/BLD
+# - remove CONFIG_NAME from TOOLS/mk/cfg.txt 
+# 
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fclean_config.sh ORCA2_LIM
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fclean_config.sh 2158 2010-10-20 17:30:03Z sflod $
+#
+#
+#
+#   * creation
+#
+#-
+
+NEW_CONF=${x_n}
+
+if [ ${#NEW_CONF} -eq 0 ] ; then
+	echo " "
+	echo "No configuration specified, please use makenemo -n CONFIG clean_config "
+else
+	echo "Are you sure that you want to remove this directory $NEW_CONF? [y/n] "
+	read answer
+	answer=`echo $answer | sed 's/^[y].*$/y/'`
+
+	if [  -z "$answer" -o "x$answer" = "xy" ]; then
+
+		## testing if configuration exists
+		if [[ ! $( grep "${NEW_CONF} " */work_cfgs.txt ) ]] ; then
+			echo "The configuration ${NEW_CONF} does not exist in file work_cfgs.txt"     
+			echo "No removing configuration"
+			echo " "
+		else
+			CONFIG_DIR=${MAIN_DIR}/$( grep -l "${NEW_CONF} " */work_cfgs.txt | cut -d/ -f1 )
+			rm -rf ${CONFIG_DIR}/${NEW_CONF}
+			sed -e "/${NEW_CONF} /d"  ${CONFIG_DIR}/work_cfgs.txt >  ${CONFIG_DIR}/work_cfgs.tmp
+			mv  ${CONFIG_DIR}/work_cfgs.tmp  ${CONFIG_DIR}/work_cfgs.txt
+			echo "${NEW_CONF} configuration REMOVED" 
+		fi
+
+	else
+		echo " "
+		echo "nothing to remove"
+	fi
+
+fi 
+
+unset -v answer
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fclean_var.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fclean_var.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fclean_var.sh	(revision 12176)
@@ -0,0 +1,68 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# =============
+# Fclean_var.sh
+# =============
+#
+# ----------------------------
+# Clean environment variables
+# ----------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fclean_var.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Clean environment variables
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fclean_var.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+#- Unset variables
+
+unset -v NSTOP
+unset -v TAB
+unset -v NEW_CONF
+unset -v REF_CONF
+unset -v CMP_NAM
+unset -v NBR_PRC
+unset -v NEM_SUBDIR
+unset -v MAIN_DIR
+unset -v CONFIG_DIR
+unset -v TOOLS_DIR
+unset -v COMPIL_DIR
+unset -v NEMO_DIR
+unset -v USEBLD
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcopy_dir.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcopy_dir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcopy_dir.sh	(revision 12176)
@@ -0,0 +1,62 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fcopy_dir.sh
+# ============
+#
+# --------------------------
+# Copy a reference directory
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fcopy_dir.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# When a reference configuration is set, 
+# Copy NEMO sub-directories needed (OCE, TOP ...)
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fcopy_dir.sh ORCA2_LIM
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+declare -a ZTAB
+grep "$1 " ${CONFIG_DIR}/cfg.txt > ${CONFIG_DIR}/cfg.tmp
+read -a ZTAB < ${CONFIG_DIR}/cfg.tmp
+TAB=( ${ZTAB[@]:1} )
+\rm ${CONFIG_DIR}/cfg.tmp
+
+unset -v ZTAB
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcopy_extdir.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcopy_extdir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fcopy_extdir.sh	(revision 12176)
@@ -0,0 +1,39 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+# ============
+# Fcopy_extdir.sh
+# ============
+# --------------------------
+# Copy a reference directory
+# --------------------------
+# SYNOPSIS
+# ========
+# ::
+#  $ Fcopy_extdir.sh
+# DESCRIPTION
+# ===========
+# When an unsupported configuration is requested, 
+# Prepare sources for the NEMO sub-directories needed (OCE, TOP ...)
+# EXAMPLES
+# ========
+# ::
+#  $ ./Fcopy_extdir.sh ORCA2_LIM
+# TODO
+# ====
+# option debug
+# EVOLUTIONS
+# ==========
+# $Id: Fcopy_extdir.sh 3294 2012-01-28 16:44:18Z rblod $
+#   * creation
+#-
+grep "$1 " ${CONFIG_DIR}/uspcfg.txt > ${CONFIG_DIR}/cfg.tmp
+#
+LOCAL_REF=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $2}')
+TAB=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $3}')
+REMOTE_CTL=$(cat cfg.tmp | awk 'BEGIN {FS = "#" }{print $4}')
+#
+\rm ${CONFIG_DIR}/cfg.tmp
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fdel_keys.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fdel_keys.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fdel_keys.sh	(revision 12176)
@@ -0,0 +1,81 @@
+#!/bin/bash
+######################################################
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fdel_keys   : del keys in cpp.fcm file  
+######################################################
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ================
+# Fdel_keys.sh
+# ================
+#
+# --------------------------
+# Add compilation keys
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fdel_keys.sh CONFIG_NAME del_key "LIST_KEYS"
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Add cpp keys when compiling a configuration, key list has to be enclosed with " ".
+# We perform a 'sed' on the CONFIG_NAME/CPP.fcm file, containing the list of keys. 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fdel_keys.sh CONFIG_NAME del_key "key_agrif"
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fdel_keys.sh 2158 2010-10-20 17:30:03Z sflod $
+#
+#
+#
+#   * creation
+#
+#-
+
+echo "Removing keys in : ${NEW_CONF}"
+
+for i in ${list_del_key} ; do
+
+     if [ "$(echo ${i} | grep -c key_nproc )" -ne 0                                      ]; then
+        sed -e "s/key_nproc[ij]=.* //" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \
+	    >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
+        mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
+        echo " "
+     elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ]; then
+         sed -e "s/\b${i}\b//" ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm \
+	     >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp
+         mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm
+         echo "deleted key $i in ${NEW_CONF}"
+     fi
+
+done
+
+unset -v list_del_key
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Ffetch_extdir.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Ffetch_extdir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Ffetch_extdir.sh	(revision 12176)
@@ -0,0 +1,53 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+# ===============
+# Ffetch_extdir.sh
+# ===============
+# ---------------
+# Make the config 
+# ---------------
+# SYNOPSIS
+# ========
+# ::
+#  $ Ffetch_extdir.sh
+# DESCRIPTION
+# ===========
+# - Make the config directory 
+# - Create repositories needed :
+#  
+#  - EXP00 for namelist
+#  - MY_SRC for user sources
+#  - BLD for compilation 
+# EXAMPLES
+# ========
+# ::
+#  $ ./Ffetch_extdir.sh CONFIG_NAME REMOTE_CTL 
+# TODO
+# ====
+# option debug
+# EVOLUTIONS
+# ==========
+# $Id: Ffetch_extdir.sh 3715 2012-11-28 16:06:02Z acc $
+#   * creation
+#-
+basedir=$(pwd)
+cd ${1}
+wget ${2} -O remote_file.list
+#
+if [ -f remote_file.list ] ; then
+ cat remote_file.list | grep -v '^#' |
+  while
+   read remfile locfile
+   do
+    if [ $remfile == 'create_directory' ] ;then
+      mkdir $locfile
+    else
+      wget $remfile -O $locfile
+    fi
+   done
+fi
+cd $basedir
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fgo_to_TOOLS.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fgo_to_TOOLS.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fgo_to_TOOLS.sh	(revision 12176)
@@ -0,0 +1,55 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ===============
+# Fgo_to_tools.sh
+# ===============
+#
+# --------------------------
+# Go to the TOOLS directory
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fgo_to_tools.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Go to the TOOLS directory
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fgo_to_tools.sh
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+cd ${MAIN_DIR}/tools
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Flist_archfile.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Flist_archfile.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Flist_archfile.sh	(revision 12176)
@@ -0,0 +1,77 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==================
+# Flist_archfile.sh
+# ==================
+#
+# --------------------------
+# Check the compilation file
+# --------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Flist_archfile.sh Institute
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# List arch file available.
+# The first line of each file in NEMO/arch directory is echoed.  
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Flist_archfile.sh 
+#
+#  $ ./Flist_archfile.sh CNRS
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+archfile_loop() {
+
+	for file in $( ls $1/*.fcm ); do
+		zvar1=$( basename $file | sed 's/arch-\(.*\).fcm/\1/' )
+		zvar2=$( head -1  $file | tr -d '#'                   )
+		printf "%-30s %-s\n" ${zvar1} "${zvar2}"
+	done
+
+}
+
+echo -e "\n  ¤ Generic computing architectures"
+
+archfile_loop ${MAIN_DIR}/arch
+
+for dir in $( ls ${MAIN_DIR}/arch | grep -v "fcm$" ); do
+	echo -e "\n  ¤ Specific HPC architectures for "${dir}
+	archfile_loop ${MAIN_DIR}/arch/$dir
+done
+
+echo
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Flist_cfgs.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Flist_cfgs.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Flist_cfgs.sh	(revision 12176)
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+echo -e "\n  ¤ Reference configurations with default sub-components (can be updated by a new set)"
+cat ${MAIN_DIR}/cfgs/ref_cfgs.txt \
+| awk '{printf "%-20s", $1}{$1 = ""; printf "%s\n", $0}'
+
+echo -e "\n  ¤ Demonstrations cases (see https://github.com/sflavoni/NEMO-test-cases for more)"
+cat ${MAIN_DIR}/tests/demo_cfgs.txt \
+| awk '{printf "%-20s", $1}{$1 = ""; printf "%s\n", $0}'
+
+echo -e "\n  ¤ Full scripted remote configurations (CPP file + EXP00 inputs + MY_SRC + ...)"
+cat ${MAIN_DIR}/tests/rmt_cfgs.txt
+
+echo -e "\n  ¤ Available sub-components ('OCE' is mandatory in any set)"
+ls  ${MAIN_DIR}/src | awk -F/ '{ print $NF }' | column
+
+echo
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_WORK.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_WORK.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_WORK.sh	(revision 12176)
@@ -0,0 +1,99 @@
+#!/bin/bash
+######################################################
+# Author : Rachid Benshila for NEMO
+# Contact : rblod@locean-ipsl.upmc.fr
+#
+# Some functions called from makenemo
+# Fmake_WORK      : create links in the WORK
+######################################################
+#set -vx
+set -o posix
+#set -u
+#set -e
+#+
+#
+# =============
+# Fmake_WORK.sh
+# =============
+#
+# -----------------------
+# Make the WORK directory
+# -----------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_WORK.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Make the WORK directory:
+#
+# - Create line in NEW_CONF/WORK
+# - Use specified sub-directories previously
+# - OPA has to be done first !!!
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_WORK.sh ORCA2_LIM OCE ICE
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+declare ZSRC=$1 ; shift 
+declare ZCONF=$1 ; shift
+ZTAB=( $@ )
+declare i=0 ; declare NDIR=${#ZTAB[@]}
+
+echo 'Creating '${ZCONF}'/WORK = '${ZTAB[*]}' for '${ZCONF}
+
+[ ! -d ${ZCONF}/MY_SRC ] && \mkdir ${ZCONF}/MY_SRC
+[   -d ${ZCONF}/WORK   ] || \mkdir ${ZCONF}/WORK
+
+if [ "${ZSRC}" != 'none' ] ; then 
+
+	if [ -d ${ZSRC} ] ; then 
+		ln -sf ${ZSRC}/*.[Ffh]90 ${ZCONF}/MY_SRC/. 
+		echo 'MY_SRC content is linked to '${ZSRC}
+	else
+		echo 'External directory for MY_SRC does not exist. Using default.'
+	fi
+
+else 
+	echo 'MY_SRC directory is : '${ZCONF}'/MY_SRC'
+fi
+
+#\rm -f ../${1}/WORK/*
+
+for comp in ${ZTAB[*]}; do
+	find ${NEMO_DIR}/$comp -name *.[Ffh]90 -exec ln -sf {} ${ZCONF}/WORK \;
+done
+
+for i in `(cd ${ZCONF}/MY_SRC ; \ls *.[Ffh]90 2>/dev/null ) `; do
+	[ -f ${ZCONF}/MY_SRC/$i ] &&  ln -sf $PWD/${ZCONF}/MY_SRC/${i} ${ZCONF}/WORK/.
+done
+
+unset -v ZCONF ZTAB i NDIR
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_bld.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_bld.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_bld.sh	(revision 12176)
@@ -0,0 +1,64 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fmake_bld.sh
+# ============
+#
+# --------------------
+# Make build directory
+# --------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_bld.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Under CONFIG_NAME :
+# - Make the build directory 
+# - Create repositories needed :
+# - BLD for compilation 
+#
+# A tmpdir can be specified for memory issues.
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_bld.sh NEMOGCM/cfgs GYRE  /usr/tmp
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+[ ! -d ${3}/${2}     ] && \mkdir ${3}/${2}
+[ ! -d ${3}/${2}/BLD ] && \mkdir ${3}/${2}/BLD
+[ ! -d ${1}/${2}/BLD ] && ln -sf ${3}/${2}/BLD ${1}/${2}/BLD
+[ -f ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ] && ln -sf ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ${COMPIL_DIR}/cpp.fcm
+rm -f  ${1}/${NEW_CONF}/BLD/fcm.bld.lock
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_config.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_config.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_config.sh	(revision 12176)
@@ -0,0 +1,66 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ===============
+# Fmake_config.sh
+# ===============
+#
+# ---------------
+# Make the config 
+# ---------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_config.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# - Make the config directory 
+# - Create repositories needed :
+#  
+#  - EXP00 for namelist
+#  - MY_SRC for user sources
+#  - BLD for compilation 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_config.sh CONFIG_NAME REF_CONFIG_NAME 
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+\mkdir -p ${1}
+\mkdir -p ${1}/EXP00
+\mkdir -p ${1}/MY_SRC
+\cp -R -n ${2}/cpp_${2}.fcm ${1}/cpp_${1}.fcm
+\cp -R -n ${2}/EXPREF/*namelist* ${1}/EXP00/.
+\cp -R -n ${2}/EXPREF/*.xml ${1}/EXP00/.
+[ -f ${2}/EXPREF/AGRIF_FixedGrids.in ] &&  \cp -R -n ${2}/EXPREF/AGRIF_FixedGrids.in ${1}/EXP00/.
+[ -d    ${2}/MY_SRC ] && \cp -n ${2}/MY_SRC/* ${1}/MY_SRC/. 2> /dev/null
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_tools_bld.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_tools_bld.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fmake_tools_bld.sh	(revision 12176)
@@ -0,0 +1,66 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fmake_bld.sh
+# ============
+#
+# --------------------
+# Make build directory
+# --------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fmake_bld.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Under CONFIG_NAME :
+# - Make the build directory 
+# - Create repositories needed :
+# - BLD for compilation 
+#
+# A tmpdir can be specified for memory issues.
+#
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fmake_bld.sh NEMOGCM/cfgs GYRE  /usr/tmp
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: Fmake_bld.sh 9651 2018-05-28 06:47:14Z nicolasmartin $
+#
+#
+#
+#   * creation
+#
+#-
+[ ! -d ${3}/${2}     ] && \mkdir ${3}/${2}
+[ ! -d ${3}/${2}/BLD ] && \mkdir ${3}/${2}/BLD
+[ ! -d ${1}/${2}/BLD ] && ln -sf ${3}/${2}/BLD ${1}/${2}/BLD
+# enforce presence of cpp_tools.fcm (write a blank one if not present in the tools directory)
+# cp instead of ln to avoid overwiting previous tool cpp_XXX.fcm file when compiling a file without cpp_YYY.fcm file.
+[ -f ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ] && cp -f ${1}/${NEW_CONF}/cpp_${NEW_CONF}.fcm ${COMPIL_DIR}/cpp_tools.fcm || echo 'bld::tool::fppkeys ' > ${COMPIL_DIR}/cpp_tools.fcm
+rm -f  ${1}/${NEW_CONF}/BLD/fcm.bld.lock
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fprep_agrif.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fprep_agrif.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fprep_agrif.sh	(revision 12176)
@@ -0,0 +1,79 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==============
+# Fprep_agrif.sh
+# ==============
+#
+# ---------------------
+# Preparation for AGRIF
+# ---------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fprep_agrif.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Prepare directories for AGRIF and copy files needed
+#
+# Compile the conv
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fprep_agrif.sh CONFIG_NAME
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+#- AGRIF conv
+if [ "$AGRIFUSE" == 1 ]; then
+#-MPI for AGRIF
+if [ ! -f ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h ];then
+   echo '#if defined key_mpp_mpi' > ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+   echo '#define AGRIF_MPI'      >> ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+   echo '#endif'                 >> ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+fi
+
+ #- CONV
+fcm build ${COMPIL_DIR}/conv.cfg || exit 1
+#C_COMPILER=${CC-cc}
+#gmake CC=${C_COMPILER} -C ${MAIN_DIR}/ext/AGRIF/LIB
+
+#- AGRIF sources
+[ ! -d $2/$1/NEMOFILES ] && mkdir  $2/$1/NEMOFILES
+[ ! -d $2/$1/NEMOFILES/AGRIF_INC ] && mkdir  $2/$1/NEMOFILES/AGRIF_INC
+[ ! -d $2/$1/NEMOFILES/AGRIF_MODELFILES ] && mkdir  $2/$1/NEMOFILES/AGRIF_MODELFILES
+cp -f -r ${MAIN_DIR}/ext/AGRIF/agrif_oce.in  $2/$1/NEMOFILES/
+#cp -f -r ${MAIN_DIR}/ext/AGRIF/conv  $2/$1/NEMOFILES/
+cp -f -r $2/$1/AGRIFLIB/bin/conv  $2/$1/NEMOFILES/
+
+fi
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fread_dir.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fread_dir.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/Fread_dir.sh	(revision 12176)
@@ -0,0 +1,83 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ============
+# Fread_dir.sh
+# ============
+#
+# ---------------------
+# Read user directories
+# ---------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ Fread_dir.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Read directoires needed from standard input
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./Fread_dir.sh Directory_NAME YES/NO
+#
+#
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id$
+#
+#
+#
+#   * creation
+#
+#-
+
+if [ "$2" == "YES" ]; then
+   echo -n " $1 [Y/n] "
+   read answer
+   answer=`echo $answer | sed 's/^[yY].*$/y/'`
+   if [  -z "$answer" -o "x$answer" = "xy" ]; then
+      TAB[$ind]="$1"
+      let ind=ind+1
+      echo " $1 selected "
+      echo "  "
+   else
+      echo " $1 Not selected "
+      echo "  "
+   fi
+   unset -v answer
+else
+   echo -n " $1 [y/N] "
+   read answer
+   answer=`echo $answer | sed 's/^[nN].*$/N/'`
+   if [ "x$answer" = "xy" ]; then
+      TAB[$ind]="$1"
+      let ind=ind+1
+      echo " $1 selected "
+      echo "  "
+   else
+      echo " $1 Not selected "
+      echo "  "
+   fi
+   unset -v answer
+fi
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/README
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/README	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/README	(revision 12176)
@@ -0,0 +1,7 @@
+CSHRC :
+setenv PATH ~/NEMOGCM/TOOLS:$PATH
+setenv NEMO_TDIR /users/rblod/tmp
+
+BASH :
+export PATH=$PATH:~/NEMOGCM/TOOLS'
+export NEMO_TDIR=/users/rblod/tmp
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/agrifpp.sh
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/agrifpp.sh	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/agrifpp.sh	(revision 12176)
@@ -0,0 +1,62 @@
+#!/bin/bash
+#set -x
+set -o posix
+#set -u
+#set -e
+#+
+#
+# ==========
+# agrifpp.sh
+# ==========
+#
+# ----------------------------
+# Preform AGrif pre-processing
+# ----------------------------
+#
+# SYNOPSIS
+# ========
+#
+# ::
+#
+#  $ agrifpp.sh
+#
+#
+# DESCRIPTION
+# ===========
+#
+#
+# Preprocess file using the conv in NEMOFILES directory
+# Standard preprocessed files are stored in NEMOFILES/ppsrc/nemo
+# Source files are stored under NEMOFILES/obj
+# Include filess  in NEMOFILES/inc
+# Note that agrif2model.F90 should not be preprocess (standard one) 
+#
+# EXAMPLES
+# ========
+#
+# ::
+#
+#  $ ./agrifpp.sh FILE_TO_PROCESS
+# 
+# TODO
+# ====
+#
+# option debug
+#
+#
+# EVOLUTIONS
+# ==========
+#
+# $Id: agrifpp.sh 2143 2010-10-04 12:49:55Z rblod $
+#
+#
+#
+#   * creation
+#
+#-
+MYFILE=$(basename "$1")
+if [ "$MYFILE" == "agrif2model.f90" ];then
+   \cp ${NEMO_TDIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE
+else
+cd ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/ppsrc/nemo ; ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/conv ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/agrif_oce.in -rm -incdir ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/inc -comdirout ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj -convfile ${MYFILE} > /dev/null 
+fi
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bld.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bld.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bld.cfg	(revision 12176)
@@ -0,0 +1,68 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+
+search_src           1
+
+src::ioipsl               $MAIN_DIR/ext/IOIPSL/src
+src::agrif                $MAIN_DIR/ext/AGRIF/AGRIF_FILES
+src::nemo                 $CONFIG_DIR/$NEW_CONF/NEMOFILES/obj
+
+bld::target  nemo.exe
+bld::exe_dep
+
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::fflags::agrif   %FFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::ioipsl   1
+bld::pp::nemo     1
+bld::pp::agrif    1
+bld::tool::fppflags::nemo      %FPPFLAGS -I$CONFIG_DIR/$NEW_CONF/NEMOFILES/inc
+bld::tool::fppflags::ioipsl    %FPPFLAGS
+bld::tool::fppflags::agrif     %FPPFLAGS -include ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bld_preproagr.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bld_preproagr.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bld_preproagr.cfg	(revision 12176)
@@ -0,0 +1,82 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+search_src           1
+
+src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK
+
+bld::target  lib_cray.f90 nemo.f90 agrif_user.f90 agrif2model.f90 
+
+dir::root            $NEMO_TDIR/$NEW_CONF/NEMOFILES
+
+bld::tool::fc_output
+bld::tool::fc_compile
+bld::tool::fc_include
+bld::tool::fc        $COMPIL_DIR/agrifpp.sh 
+bld::tool::fflags    
+bld::tool::ld       
+bld::tool::ldflags   
+bld::tool::ar        
+bld::tool::arflags   
+bld::tool::make      %MK
+
+OUTFILE_EXT::obj   .f90
+
+# Pre-process code before analysing dependencies
+bld::pp::nemo     1
+bld::pp::nemo/agrif2model     0
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fppflags::nemo  %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+bld::excl_dep	     use::nc4interface
+bld::excl_dep	     use::ioipsl
+bld::excl_dep	     use::xios
+bld::excl_dep        use::agrif_grids
+bld::excl_dep	     use::agrif_types
+bld::excl_dep	     use::agrif_util
+bld::excl_dep        inc::SetNumberofcells.h
+bld::excl_dep        inc::GetNumberofcells.h
+bld::excl_dep        inc::include_use_Alloc_agrif.h
+bld::excl_dep        inc::allocations_calls_agrif.h
+bld::excl_dep        inc::modtype_agrif.h
+bld::excl_dep        inc::probdim_agrif.h
+bld::excl_dep        inc::keys_agrif.h
+bld::excl_dep        h::SetNumberofcells.h
+bld::excl_dep        h::GetNumberofcells.h
+bld::excl_dep        h::include_use_Alloc_agrif.h
+bld::excl_dep        h::allocations_calls_agrif.h
+bld::excl_dep        h::modtype_agrif.h
+bld::excl_dep        h::probdim_agrif.h
+bld::excl_dep        h::keys_agrif.h
+bld::excl_dep        use::mod_attribut
+bld::excl_dep        use::mod_event_client
+bld::excl_dep        use::mod_ioclient
+#bld::excl_dep        OBJ
+
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" and ".f90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+bld::src_type::nemo/agrif2model.F90 FORTRAN::FORTRAN9X::SOURCE
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bld_tools.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bld_tools.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bld_tools.cfg	(revision 12176)
@@ -0,0 +1,51 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_tools.fcm
+inc $COMPIL_DIR/cpp_tools.fcm
+
+search_src           1
+
+src::nemo            $TOOLS_DIR/$NEW_CONF/src
+
+dir::root            $TOOLS_DIR/$NEW_CONF/BLD
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::nemo     1
+bld::tool::fppflags::nemo      %FPPFLAGS -I$TOOLS_DIR/$NEW_CONF/NEMOFILES/inc
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+bld::infile_ext::f90  FPP::FPP9X::SOURCE
+
+# extension for module output
+bld::outfile_ext::mod .mod
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bldxag.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bldxag.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/bldxag.cfg	(revision 12176)
@@ -0,0 +1,64 @@
+# ----------------------- FCM extract configuration file -----------------------
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+
+inc $COMPIL_DIR/arch_nemo.fcm
+inc $COMPIL_DIR/cpp.fcm
+
+search_src           1
+
+src::ioipsl               $MAIN_DIR/ext/IOIPSL/src
+src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK
+
+bld::target nemo.exe
+bld::exe_dep
+
+
+dir::root            $NEMO_TDIR/$NEW_CONF/BLD
+
+
+bld::tool::cpp       %CPP
+bld::tool::fpp       %CPP
+bld::tool::fc        %FC 
+bld::tool::fflags    %FCFLAGS %USER_INC
+bld::tool::ld        %LD
+bld::tool::ldflags   %LDFLAGS %USER_LIB
+bld::tool::ar        %AR
+bld::tool::arflags   %ARFLAGS
+bld::tool::make      %MK
+
+# Pre-process code before analysing dependencies
+bld::pp::ioipsl   1
+bld::pp::nemo     1
+bld::tool::fppflags::nemo     %FPPFLAGS
+bld::tool::fppflags::ioipsl   %FPPFLAGS
+
+# Ignore the following dependencies
+bld::excl_dep        inc::netcdf.inc
+bld::excl_dep        inc::VT.inc
+bld::excl_dep        use::netcdf
+bld::excl_dep        use::xios
+bld::excl_dep        h::netcdf.inc
+bld::excl_dep        h::mpif.h
+bld::excl_dep        inc::mpif.h
+bld::excl_dep        inc::mpe_logf.h
+bld::excl_dep        use::mpi
+bld::excl_dep        use::mod_oasis
+bld::excl_dep        use::mkl_dfti
+# Don't generate interface files
+bld::tool::geninterface none
+
+# Allow ".h90" as an extension for CPP include files
+bld::infile_ext::h90  CPP::INCLUDE
+
+# extension for module output
+bld::outfile_ext::mod .mod
+
+# rename executable to nemo.exe
+bld::exe_name::model  nemo.exe
+
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/conv.cfg
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/conv.cfg	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/conv.cfg	(revision 12176)
@@ -0,0 +1,35 @@
+# ----------------------- FCM extract configuration file -----------------------
+# template to compile agrif conv, currently not used
+cfg::type                           bld
+cfg::version                        1.0
+
+
+# ------------------------------------------------------------------------------
+# Build information
+# ------------------------------------------------------------------------------
+inc $COMPIL_DIR/arch_nemo.fcm
+
+bld::tool::cc        %CC
+bld::tool::cflags    %CFLAGS
+bld::tool::make      %MK
+
+src::convsrc   $MAIN_DIR/ext/AGRIF/LIB
+
+ #----------------------------------------------------------------------------
+# Build options (code-specific, machine-independent)
+# ----------------------------------------------------------------------------
+dir::root            $NEMO_TDIR/$NEW_CONF/AGRIFLIB
+
+#bld::tool::cflags::convsrc  -O0  
+#bld::tool::ld::convsrc   cc
+#bld::tool::ldflags::convsrc -O  ../obj/fortran.o ../obj/fortran.o 
+#bld::pp 1
+
+
+
+bld::exe_name::main conv
+bld::target                              libconvsrc.a  fortran.o main.o  conv
+bld::exe_dep::conv      
+
+
+
Index: /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/tools.txt
===================================================================
--- /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/tools.txt	(revision 12176)
+++ /utils/build_MERGE_2019/mk_ENHANCE-03_domcfg/tools.txt	(revision 12176)
@@ -0,0 +1,1 @@
+DOMAINcfg 
