Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 5766)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt  key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi
+bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt  key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi key_iomput
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 5766)
@@ -150,6 +150,6 @@
    ln_traldf_lev   =  .false.  !  iso-level
    ln_traldf_hor   =  .false.  !  horizontal (geopotential)
-   ln_traldf_iso   =  .false.  !  iso-neutral (Standard operator)
-   ln_traldf_triad =  .true.   !  iso-neutral (Triads   operator)
+   ln_traldf_iso   =  .true.  !  iso-neutral (Standard operator)
+   ln_traldf_triad =  .false.   !  iso-neutral (Triads   operator)
    !
    !		       	         !  iso-neutral options:        
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 5766)
@@ -133,8 +133,8 @@
    ln_traldf_lev   =  .false.  !  iso-level
    ln_traldf_hor   =  .false.  !  horizontal (geopotential)
-   ln_traldf_iso   =  .true.   !  iso-neutral (standard operator)
-   ln_traldf_triad =  .false.  !  iso-neutral (triad    operator)
+   ln_traldf_iso   =  .true.  !  iso-neutral (Standard operator)
+   ln_traldf_triad =  .false.   !  iso-neutral (Triads   operator)
    !
-   !		       	         !  iso-neutral options:        
+   !                             !  iso-neutral options:
    ln_traldf_msc   =  .true.   !  Method of Stabilizing Correction (both operators)
    rn_slpmax       =   0.01    !  slope limit                      (both operators)
@@ -144,9 +144,9 @@
    !
    !                       !  Coefficients:
-   nn_aht_ijk_t    = 0         !  space/time variation of eddy coef
+   nn_aht_ijk_t    = 21        !  space/time variation of eddy coef
    !                                !   =-20 (=-30)    read in eddy_induced_velocity_2D.nc (..._3D.nc) file
-   !                                !   =  0           constant 
-   !                                !   = 10 F(k)      =ldf_c1d 
-   !                                !   = 20 F(i,j)    =ldf_c2d 
+   !                                !   =  0           constant
+   !                                !   = 10 F(k)      =ldf_c1d
+   !                                !   = 20 F(i,j)    =ldf_c2d
    !                                !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation
    !                                !   = 30 F(i,j,k)  =ldf_c2d + ldf_c1d
@@ -158,12 +158,12 @@
 &namtra_ldfeiv !   eddy induced velocity param.
 !----------------------------------------------------------------------------------
-   ln_ldfeiv     =.false.   ! use eddy induced velocity parameterization
-   ln_ldfeiv_dia =.false.   ! diagnose eiv stream function and velocities
+   ln_ldfeiv     =.true.   ! use eddy induced velocity parameterization
+   ln_ldfeiv_dia =.true.   ! diagnose eiv stream function and velocities
    rn_aeiv_0     = 2000.   ! eddy induced velocity coefficient   [m2/s]
    nn_aei_ijk_t  = 21      ! space/time variation of the eiv coeficient
    !                                !   =-20 (=-30)    read in eddy_induced_velocity_2D.nc (..._3D.nc) file
-   !                                !   =  0           constant 
-   !                                !   = 10 F(k)      =ldf_c1d 
-   !                                !   = 20 F(i,j)    =ldf_c2d 
+   !                                !   =  0           constant
+   !                                !   = 10 F(k)      =ldf_c1d
+   !                                !   = 20 F(i,j)    =ldf_c2d
    !                                !   = 21 F(i,j,t)  =Treguier et al. JPO 1997 formulation
    !                                !   = 30 F(i,j,k)  =ldf_c2d + ldf_c1d
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 5766)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_top key_pisces key_mpp_mpi
+bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_top key_pisces key_mpp_mpi key_iomput
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/SHARED/namelist_top_ref
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/SHARED/namelist_top_ref	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/CONFIG/SHARED/namelist_top_ref	(revision 5766)
@@ -52,14 +52,14 @@
 &namtrc_ldf    !   lateral diffusion scheme for passive tracer 
 !-----------------------------------------------------------------------
-!                               !  Type of the operator : 
-   ln_trcldf_lap    =  .true.   !     laplacian operator       
-   ln_trcldf_bilap  =  .false.  !     bilaplacian operator     
-                                !  Direction of action  :
-   ln_trcldf_level  =  .false.  !     iso-level                
-   ln_trcldf_hor    =  .false.  !     horizontal (geopotential)         (require "key_ldfslp" when ln_sco=T)
-   ln_trcldf_iso    =  .true.   !     iso-neutral                       (require "key_ldfslp")
-!                               !  Coefficient
-   rn_ahtrc_0       =  2000.    !  horizontal eddy diffusivity for tracers [m2/s]
-   rn_ahtrb_0       =     0.    !     background eddy diffusivity for ldf_iso [m2/s]
+   ln_trcldf_lap   =  .true.   !    laplacian operator
+   ln_trcldf_blp   =  .false.  !  bilaplacian operator
+   !                       !  Direction of action:
+   ln_trcldf_lev   =  .false.  !  iso-level
+   ln_trcldf_hor   =  .false.  !  horizontal (geopotential)
+   ln_trcldf_iso   =  .true.   !  iso-neutral (standard operator)
+   ln_trcldf_triad =  .false.  !  iso-neutral (triad    operator)
+   !
+   rn_ahtrc_0        = 2000.     !  lateral eddy diffusivity   (lap. operator) [m2/s]
+   rn_bhtrc_0        = 1.e+12    !  lateral eddy diffusivity (bilap. operator) [m4/s]
 /
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 5766)
@@ -127,15 +127,4 @@
          ENDIF
          !
-         CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) )        ! before potential and in situ densities
-#if ! defined key_c1d
-         IF( ln_zps .AND. .NOT. ln_isfcav)                                 &
-            &            CALL zps_hde    ( nit000, jpts, tsb, gtsu, gtsv,  &    ! Partial steps: before horizontal gradient
-            &                                            rhd, gru , grv    )  ! of t, s, rd at the last ocean level
-         IF( ln_zps .AND.       ln_isfcav)                                 &
-            &            CALL zps_hde_isf( nit000, jpts, tsb, gtsu, gtsv,  &    ! Partial steps for top cell (ISF)
-            &                                            rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
-            &                                     gtui, gtvi, grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi    ) ! of t, s, rd at the last ocean level
-#endif
-         !   
          ! - ML - sshn could be modified by istate_eel, so that initialization of fse3t_b is done here
          IF( lk_vvl ) THEN
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf.F90	(revision 5766)
@@ -150,5 +150,5 @@
          IF ( ln_sco ) THEN               ! s-coordinate
             IF ( ln_traldf_lev   )   nldf = n_lap     ! iso-level  (no rotation)
-            IF ( ln_traldf_hor   )   nldf = n_lap_it  ! horizontal (   rotation)       !!gm   a checker....
+            IF ( ln_traldf_hor   )   nldf = n_lap_i   ! horizontal (   rotation)   
             IF ( ln_traldf_iso   )   nldf = n_lap_i   ! iso-neutral: standard (rotation)
             IF ( ln_traldf_triad )   nldf = n_lap_it  ! iso-neutral: triad    (rotation)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/SAS_SRC/diawri.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 5766)
@@ -26,7 +26,5 @@
    USE dom_oce         ! ocean space and time domain
    USE zdf_oce         ! ocean vertical physics
-   USE ldftra_oce      ! ocean active tracers: lateral physics
    USE ldfdyn_oce      ! ocean dynamics: lateral physics
-   USE traldf_iso_grif, ONLY : psix_eiv, psiy_eiv
    USE sol_oce         ! solver variables
    USE sbc_oce         ! Surface boundary condition: ocean fields
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 5766)
@@ -50,6 +50,5 @@
 
    !! * Substitutions
-#  include "top_substitute.h90"
-
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/C14b/trcwri_c14b.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/C14b/trcwri_c14b.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/C14b/trcwri_c14b.F90	(revision 5766)
@@ -20,5 +20,4 @@
    PUBLIC trc_wri_c14b 
 
-#  include "top_substitute.h90"
 CONTAINS
 
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 5766)
@@ -51,5 +51,5 @@
 
    !! * Substitutions
-#  include "top_substitute.h90"
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/CFC/trcwri_cfc.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/CFC/trcwri_cfc.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/CFC/trcwri_cfc.F90	(revision 5766)
@@ -20,5 +20,4 @@
    PUBLIC trc_wri_cfc 
 
-#  include "top_substitute.h90"
 CONTAINS
 
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcwri_my_trc.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcwri_my_trc.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcwri_my_trc.F90	(revision 5766)
@@ -20,5 +20,4 @@
    PUBLIC trc_wri_my_trc 
 
-#  include "top_substitute.h90"
 CONTAINS
 
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 5766)
@@ -59,6 +59,7 @@
    REAL(wp) ::   fdbod      ! zooplankton mortality fraction that goes to detritus
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zexp.F90	(revision 5766)
@@ -41,6 +41,7 @@
    REAL(wp)                                ::   areacot   !: surface coastal area
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 5766)
@@ -40,6 +40,6 @@
    REAL(wp), PUBLIC ::  reddom    ! redfield ratio (C:N) for DOM
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 5766)
@@ -34,6 +34,6 @@
    REAL(wp), PUBLIC ::   xhr         ! coeff for martin''s remineralisation profile
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zbio.F90	(revision 5766)
@@ -34,6 +34,6 @@
    PUBLIC  p4z_bio    
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zche.F90	(revision 5766)
@@ -164,6 +164,6 @@
    REAL(wp) :: devk55  = 0.3692E-3      
 
-   !!* Substitution
-#include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 5766)
@@ -39,6 +39,6 @@
    REAL(wp) :: kl1, kl2, kb1, kb2, ks, kpr, spd, con, kth
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 5766)
@@ -59,6 +59,6 @@
    REAL(wp) ::  xconv  = 0.01_wp / 3600._wp !: coefficients for conversion 
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90	(revision 5766)
@@ -52,6 +52,5 @@
    REAL(wp) ::  xcoef2   = 1.21E-5 * 14. / 55.85 / 7.625 * 0.5 * 1.5
    REAL(wp) ::  xcoef3   = 1.15E-4 * 14. / 55.85 / 7.625 * 0.5 
-   !!* Substitution
-#  include "top_substitute.h90"
+
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 5766)
@@ -50,6 +50,4 @@
    REAL(wp), PUBLIC ::  grazflux     !: mesozoo flux feeding rate
 
-   !!* Substitution
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 5766)
@@ -49,6 +49,4 @@
 
 
-   !!* Substitution
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90	(revision 5766)
@@ -35,6 +35,4 @@
 
 
-   !!* Substitution
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 5766)
@@ -51,6 +51,6 @@
    REAL(wp), DIMENSION(3,61), PUBLIC ::   xkrgb   !: tabulated attenuation coefficients for RGB absorption
    
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 5766)
@@ -54,7 +54,6 @@
    REAL(wp) :: texcret2               !: 1 - excret2        
 
-
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 5766)
@@ -50,6 +50,6 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   denitnh4   !: -    -    -    -   -
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 5766)
@@ -81,6 +81,7 @@
 
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 5766)
@@ -38,6 +38,6 @@
    REAL(wp) :: r1_rday                  !: inverse of rday
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 5766)
@@ -65,6 +65,6 @@
 #endif
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 5766)
@@ -45,6 +45,4 @@
 
 
-   !! * Substitutions
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90	(revision 5766)
@@ -27,6 +27,4 @@
    PUBLIC   trc_ini_pisces   ! called by trcini.F90 module
 
-
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/PISCES/trcwri_pisces.F90	(revision 5766)
@@ -21,5 +21,7 @@
    PUBLIC trc_wri_pisces 
 
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+
 CONTAINS
 
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90	(revision 5766)
@@ -12,9 +12,8 @@
    !!----------------------------------------------------------------------
    !!   trc_adv      : compute ocean tracer advection trend
-   !!   trc_adv_ctl  : control the different options of advection scheme
+   !!   trc_adv_ini  : control the different options of advection scheme
    !!----------------------------------------------------------------------
    USE oce_trc         ! ocean dynamics and active tracers
    USE trc             ! ocean passive tracers variables
-   USE trcnam_trp      ! passive tracers transport namelist variables
    USE traadv_cen2     ! 2nd order centered scheme (tra_adv_cen2   routine)
    USE traadv_tvd      ! TVD      scheme           (tra_adv_tvd    routine)
@@ -23,5 +22,4 @@
    USE traadv_ubs      ! UBS      scheme           (tra_adv_ubs    routine)
    USE traadv_qck      ! QUICKEST scheme           (tra_adv_qck    routine)
-   USE traadv_eiv      ! eddy induced velocity     (tra_adv_eiv    routine)
    USE traadv_mle      ! ML eddy induced velocity  (tra_adv_mle    routine)
    USE ldftra          ! lateral diffusion coefficient on tracers
@@ -31,6 +29,16 @@
    PRIVATE
 
-   PUBLIC   trc_adv          ! routine called by step module
-   PUBLIC   trc_adv_alloc    ! routine called by nemogcm module
+   PUBLIC   trc_adv       
+   PUBLIC   trc_adv_alloc 
+   PUBLIC   trc_adv_ini  
+
+   !                                        !!: ** Advection (namtrc_adv) **
+   LOGICAL , PUBLIC ::   ln_trcadv_cen2      ! 2nd order centered scheme flag
+   LOGICAL , PUBLIC ::   ln_trcadv_tvd       ! TVD scheme flag
+   LOGICAL , PUBLIC ::   ln_trcadv_muscl     ! MUSCL scheme flag
+   LOGICAL , PUBLIC ::   ln_trcadv_muscl2    ! MUSCL2 scheme flag
+   LOGICAL , PUBLIC ::   ln_trcadv_ubs       ! UBS scheme flag
+   LOGICAL , PUBLIC ::   ln_trcadv_qck       ! QUICKEST scheme flag
+   LOGICAL , PUBLIC ::   ln_trcadv_msc_ups   ! use upstream scheme within muscl
 
    INTEGER ::   nadv   ! choice of the type of advection scheme
@@ -79,7 +87,4 @@
       CALL wrk_alloc( jpi,jpj,jpk,   zun, zvn, zwn )
       !
-
-      IF( kt == nittrc000 )   CALL trc_adv_ctl          ! initialisation & control of options
-
       IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000
          r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping)
@@ -131,7 +136,7 @@
 
 
-   SUBROUTINE trc_adv_ctl
+   SUBROUTINE trc_adv_ini
       !!---------------------------------------------------------------------
-      !!                  ***  ROUTINE trc_adv_ctl  ***
+      !!                  ***  ROUTINE trc_adv_ini  ***
       !!                
       !! ** Purpose : Control the consistency between namelist options for 
@@ -139,6 +144,34 @@
       !!----------------------------------------------------------------------
       INTEGER ::   ioptio
-      !!----------------------------------------------------------------------
-      !
+      INTEGER ::  ios                 ! Local integer output status for namelist read
+      !!
+      NAMELIST/namtrc_adv/ ln_trcadv_cen2 , ln_trcadv_tvd   ,    &
+         &                 ln_trcadv_muscl, ln_trcadv_muscl2,    &
+         &                 ln_trcadv_ubs  , ln_trcadv_qck, ln_trcadv_msc_ups
+      !!----------------------------------------------------------------------
+      !
+      REWIND( numnat_ref )              !  namtrc_adv in reference namelist 
+      READ  ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in reference namelist', lwp )
+
+      REWIND( numnat_cfg )              ! namtrc_adv in configuration namelist
+      READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist', lwp )
+      IF(lwm) WRITE ( numont, namtrc_adv )
+
+      IF(lwp) THEN                    ! Namelist print
+         WRITE(numout,*)
+         WRITE(numout,*) 'trc_adv_ini : choice/control of the tracer advection scheme'
+         WRITE(numout,*) '~~~~~~~~~~~'
+         WRITE(numout,*) '   Namelist namtrc_adv : chose a advection scheme for tracers'
+         WRITE(numout,*) '      2nd order advection scheme     ln_trcadv_cen2   = ', ln_trcadv_cen2
+         WRITE(numout,*) '      TVD advection scheme           ln_trcadv_tvd    = ', ln_trcadv_tvd
+         WRITE(numout,*) '      MUSCL  advection scheme        ln_trcadv_muscl  = ', ln_trcadv_muscl
+         WRITE(numout,*) '      MUSCL2 advection scheme        ln_trcadv_muscl2 = ', ln_trcadv_muscl2
+         WRITE(numout,*) '      UBS    advection scheme        ln_trcadv_ubs    = ', ln_trcadv_ubs
+         WRITE(numout,*) '      QUICKEST advection scheme      ln_trcadv_qck    = ', ln_trcadv_qck
+      ENDIF
+      !
+
       ioptio = 0                      ! Parameter control
       IF( ln_trcadv_cen2   )   ioptio = ioptio + 1
@@ -169,5 +202,5 @@
       ENDIF
       !
-   END SUBROUTINE trc_adv_ctl
+   END SUBROUTINE trc_adv_ini
    
 #else
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 5766)
@@ -22,5 +22,4 @@
    USE oce_trc             ! ocean dynamics and active tracers variables
    USE trc                 ! ocean passive tracers variables
-   USE trcnam_trp      ! passive tracers transport namelist variables
    USE trabbl              ! 
    USE prtctl_trc          ! Print control for debbuging
@@ -30,7 +29,4 @@
    PUBLIC   trc_bbl       !  routine called by step.F90
 
-
-   !! * Substitutions
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcdmp.F90	(revision 5766)
@@ -18,5 +18,4 @@
    USE oce_trc         ! ocean dynamics and tracers variables
    USE trc             ! ocean passive tracers variables
-   USE trcnam_trp      ! passive tracers transport namelist variables
    USE trcdta
    USE tradmp
@@ -29,7 +28,11 @@
    PRIVATE
 
-   PUBLIC trc_dmp            ! routine called by step.F90
-   PUBLIC trc_dmp_clo        ! routine called by step.F90
-   PUBLIC trc_dmp_alloc      ! routine called by nemogcm.F90
+   PUBLIC trc_dmp      
+   PUBLIC trc_dmp_clo   
+   PUBLIC trc_dmp_alloc  
+   PUBLIC trc_dmp_ini    
+
+   INTEGER , PUBLIC ::   nn_zdmp_tr    ! = 0/1/2 flag for damping in the mixed layer
+   CHARACTER(LEN=200) , PUBLIC :: cn_resto_tr    !File containing restoration coefficient
 
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   restotr   ! restoring coeff. on tracers (s-1)
@@ -40,5 +43,6 @@
 
    !! * Substitutions
-#  include "top_substitute.h90"
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -90,8 +94,4 @@
       IF( nn_timing == 1 )  CALL timing_start('trc_dmp')
       !
-      ! 0. Initialization (first time-step only)
-      !    --------------
-      IF( kt == nittrc000 ) CALL trc_dmp_init
-
       IF( l_trdtrc )   CALL wrk_alloc( jpi, jpj, jpk, ztrtrd )   ! temporary save of trends
       !
@@ -171,4 +171,64 @@
    END SUBROUTINE trc_dmp
 
+   SUBROUTINE trc_dmp_ini
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE trc_dmp_ini  ***
+      !! 
+      !! ** Purpose :   Initialization for the newtonian damping 
+      !!
+      !! ** Method  :   read the nammbf namelist and check the parameters
+      !!              called by trc_dmp at the first timestep (nittrc000)
+      !!----------------------------------------------------------------------
+      !
+      INTEGER ::  ios                 ! Local integer output status for namelist read
+      INTEGER :: imask  !local file handle
+      !
+      NAMELIST/namtrc_dmp/ nn_zdmp_tr , cn_resto_tr
+      !!----------------------------------------------------------------------
+
+      IF( nn_timing == 1 )  CALL timing_start('trc_dmp_init')
+      !
+
+      REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping
+      READ  ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909)
+909   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist', lwp )
+
+      REWIND( numnat_cfg )              ! Namelist namtrc_dmp in configuration namelist : Passive tracers newtonian damping
+      READ  ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910)
+910   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist', lwp )
+      IF(lwm) WRITE ( numont, namtrc_dmp )
+
+      IF(lwp) THEN                       ! Namelist print
+         WRITE(numout,*)
+         WRITE(numout,*) 'trc_dmp : Passive tracers newtonian damping'
+         WRITE(numout,*) '~~~~~~~'
+         WRITE(numout,*) '   Namelist namtrc_dmp : set damping parameter'
+         WRITE(numout,*) '      mixed layer damping option     nn_zdmp_tr = ', nn_zdmp_tr, '(zoom: forced to 0)'
+         WRITE(numout,*) '      Restoration coeff file    cn_resto_tr = ', cn_resto_tr
+      ENDIF
+      !
+      IF( lzoom )   nn_zdmp_tr = 0           ! restoring to climatology at closed north or south boundaries
+      SELECT CASE ( nn_zdmp_tr )
+      CASE ( 0 )   ;   IF(lwp) WRITE(numout,*) '   tracer damping throughout the water column'
+      CASE ( 1 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the turbocline (avt > 5 cm2/s)'
+      CASE ( 2 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the mixed layer'
+      CASE DEFAULT
+         WRITE(ctmp1,*) 'bad flag value for nn_zdmp_tr = ', nn_zdmp_tr
+         CALL ctl_stop(ctmp1)
+      END SELECT
+
+      IF( .NOT. ln_tradmp )   &
+         &   CALL ctl_stop( 'passive trace damping need key_tradmp to compute damping coef.' )
+      !
+      !                          ! Read damping coefficients from file
+      !Read in mask from file
+      CALL iom_open ( cn_resto_tr, imask)
+      CALL iom_get  ( imask, jpdom_autoglo, 'resto', restotr)
+      CALL iom_close( imask )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('trc_dmp_init')
+      !
+   END SUBROUTINE trc_dmp_ini
+
    SUBROUTINE trc_dmp_clo( kt )
       !!---------------------------------------------------------------------
@@ -303,42 +363,4 @@
 
 
-   SUBROUTINE trc_dmp_init
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE trc_dmp_init  ***
-      !! 
-      !! ** Purpose :   Initialization for the newtonian damping 
-      !!
-      !! ** Method  :   read the nammbf namelist and check the parameters
-      !!              called by trc_dmp at the first timestep (nittrc000)
-      !!----------------------------------------------------------------------
-      !
-      INTEGER :: imask  !local file handle
-
-      IF( nn_timing == 1 )  CALL timing_start('trc_dmp_init')
-      !
-
-      IF( lzoom )   nn_zdmp_tr = 0           ! restoring to climatology at closed north or south boundaries
-      SELECT CASE ( nn_zdmp_tr )
-      CASE ( 0 )   ;   IF(lwp) WRITE(numout,*) '   tracer damping throughout the water column'
-      CASE ( 1 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the turbocline (avt > 5 cm2/s)'
-      CASE ( 2 )   ;   IF(lwp) WRITE(numout,*) '   no tracer damping in the mixed layer'
-      CASE DEFAULT
-         WRITE(ctmp1,*) 'bad flag value for nn_zdmp_tr = ', nn_zdmp_tr
-         CALL ctl_stop(ctmp1)
-      END SELECT
-
-      IF( .NOT. ln_tradmp )   &
-         &   CALL ctl_stop( 'passive trace damping need key_tradmp to compute damping coef.' )
-      !
-      !                          ! Read damping coefficients from file
-      !Read in mask from file
-      CALL iom_open ( cn_resto_tr, imask)
-      CALL iom_get  ( imask, jpdom_autoglo, 'resto', restotr)
-      CALL iom_close( imask )
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_dmp_init')
-      !
-   END SUBROUTINE trc_dmp_init
-
 #else
    !!----------------------------------------------------------------------
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcldf.F90	(revision 5766)
@@ -13,9 +13,8 @@
    !!----------------------------------------------------------------------
    !!   trc_ldf      : update the tracer trend with the lateral diffusion
-   !!       ldf_ctl  : initialization, namelist read, and parameters control
+   !!   trc_ldf_ini  : initialization, namelist read, and parameters control
    !!----------------------------------------------------------------------
    USE trc           ! ocean passive tracers variables
    USE oce_trc       ! ocean dynamics and active tracers
-   USE trcnam_trp    ! passive tracers transport namelist variables
    USE ldfslp        ! lateral diffusion: iso-neutral slope
    USE traldf_lap    ! lateral diffusion: laplacian iso-level            operator  (tra_ldf_lap   routine)
@@ -31,7 +30,18 @@
    PRIVATE
 
-   PUBLIC   trc_ldf    ! called by trctrp.F90
-   !                                                 !!: ** lateral mixing namelist (nam_trcldf) **
-   REAL(wp) ::  rldf_rat    ! ratio between active and passive tracers diffusive coefficient
+   PUBLIC   trc_ldf    
+   PUBLIC   trc_ldf_ini   
+   !
+   LOGICAL , PUBLIC ::   ln_trcldf_lap       !:   laplacian operator
+   LOGICAL , PUBLIC ::   ln_trcldf_blp       !: bilaplacian operator
+   LOGICAL , PUBLIC ::   ln_trcldf_lev       !: iso-level   direction
+   LOGICAL , PUBLIC ::   ln_trcldf_hor       !: horizontal  direction (rotation to geopotential)
+   LOGICAL , PUBLIC ::   ln_trcldf_iso       !: iso-neutral direction (standard)
+   LOGICAL , PUBLIC ::   ln_trcldf_triad     !: iso-neutral direction (triad)
+   REAL(wp), PUBLIC ::   rn_ahtrc_0          !:   laplacian diffusivity coefficient for passive tracer [m2/s]
+   REAL(wp), PUBLIC ::   rn_bhtrc_0          !: bilaplacian      -          --     -       -   [m4/s]
+   !
+                                                 !!: ** lateral mixing namelist (nam_trcldf) **
+   REAL(wp) ::  rldf    ! ratio between active and passive tracers diffusive coefficient
    INTEGER  ::  nldf = 0   ! type of lateral diffusion used defined from ln_trcldf_... namlist logicals)
    
@@ -64,8 +74,4 @@
       !
       
-!!gm  this call should be put in trcini !
-      IF( kt == nittrc000 )   CALL ldf_ctl          ! initialisation & control of options
-!!gm end
-
       IF( l_trdtrc )  THEN
          CALL wrk_alloc( jpi,jpj,jpk,jptra,   ztrtrd )
@@ -75,6 +81,6 @@
       !                                        ! set the lateral diffusivity coef. for passive tracer      
       CALL wrk_alloc( jpi,jpj,jpk,   zahu, zahv )
-      zahu(:,:,:) = rldf_rat * ahtu(:,:,:)
-      zahv(:,:,:) = rldf_rat * ahtv(:,:,:)
+      zahu(:,:,:) = rldf * ahtu(:,:,:)
+      zahv(:,:,:) = rldf * ahtv(:,:,:)
 
       SELECT CASE ( nldf )                     !* compute lateral mixing trend and add it to the general trend
@@ -115,5 +121,5 @@
 !!gm ldf_ctl should be called in trcini  so that l_ldfslp=T  cause the slope init and calculation
 
-   SUBROUTINE ldf_ctl
+   SUBROUTINE trc_ldf_ini
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE ldf_ctl  ***
@@ -129,5 +135,36 @@
       !!----------------------------------------------------------------------
       INTEGER ::   ioptio, ierr         ! temporary integers
-      !!----------------------------------------------------------------------
+      INTEGER ::  ios                 ! Local integer output status for namelist read
+      !
+      NAMELIST/namtrc_ldf/ ln_trcldf_lap, ln_trcldf_blp, &
+         &                 ln_trcldf_lev, ln_trcldf_hor, ln_trcldf_iso, ln_trcldf_triad,  &
+         &                 rn_ahtrc_0   , rn_bhtrc_0
+      !!----------------------------------------------------------------------
+      REWIND( numnat_ref )              !  namtrc_ldf in reference namelist 
+      READ  ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903)
+903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist', lwp )
+
+      REWIND( numnat_cfg )              !  namtrc_ldf in configuration namelist 
+      READ  ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 )
+904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp )
+      IF(lwm) WRITE ( numont, namtrc_ldf )
+
+      IF(lwp) THEN                    ! Namelist print
+         WRITE(numout,*)
+         WRITE(numout,*) 'trc_ldf_ini : lateral tracer diffusive operator'
+         WRITE(numout,*) '~~~~~~~~~~~'
+         WRITE(numout,*) '   Namelist namtrc_ldf : set lateral mixing parameters (type, direction, coefficients)'
+         WRITE(numout,*) '      operator'
+         WRITE(numout,*) '           laplacian                 ln_trcldf_lap   = ', ln_trcldf_lap
+         WRITE(numout,*) '         bilaplacian                 ln_trcldf_blp   = ', ln_trcldf_blp
+         WRITE(numout,*) '      direction of action'
+         WRITE(numout,*) '         iso-level                   ln_trcldf_lev   = ', ln_trcldf_lev
+         WRITE(numout,*) '         horizontal (geopotential)   ln_trcldf_hor   = ', ln_trcldf_hor
+         WRITE(numout,*) '         iso-neutral (standard)      ln_trcldf_iso   = ', ln_trcldf_iso
+         WRITE(numout,*) '         iso-neutral (triad)         ln_trcldf_triad = ', ln_trcldf_triad
+         WRITE(numout,*) '      diffusivity coefficient'
+         WRITE(numout,*) '           laplacian                 rn_ahtrc_0      = ', rn_ahtrc_0
+         WRITE(numout,*) '         bilaplacian                 rn_bhtrc_0      = ', rn_bhtrc_0
+      ENDIF
       !      
       !                                ! control the namelist parameters
@@ -172,10 +209,10 @@
          IF( ABS(rn_aht_0) < 2._wp*TINY(1.e0) ) THEN
             IF( ABS(rn_ahtrc_0) < 2._wp*TINY(1.e0) ) THEN
-               rldf_rat = 1.0_wp
+               rldf = 1.0_wp
             ELSE
-               CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' )
+               CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' )
             ENDIF
          ELSE
-            rldf_rat = rn_ahtrc_0 / rn_aht_0
+            rldf = rn_ahtrc_0 / rn_aht_0
          ENDIF
       ENDIF
@@ -203,10 +240,10 @@
          IF( ABS(rn_bht_0) < 2._wp*TINY(1.e0) ) THEN
             IF( ABS(rn_bhtrc_0) < 2._wp*TINY(1.e0) ) THEN
-               rldf_rat = 1.0_wp
+               rldf = 1.0_wp
             ELSE
-               CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf_rat, rn_aht_0==0, rn_ahtrc_0 /=0' )
+               CALL ctl_stop( 'STOP', 'trc_ldf_ctl : cannot define rldf, rn_aht_0==0, rn_ahtrc_0 /=0' )
             ENDIF
          ELSE
-            rldf_rat = SQRT(  ABS( rn_bhtrc_0 / rn_bht_0 )  )
+            rldf = SQRT(  ABS( rn_bhtrc_0 / rn_bht_0 )  )
          ENDIF
       ENDIF
@@ -231,5 +268,5 @@
       ENDIF
       !
-   END SUBROUTINE ldf_ctl
+   END SUBROUTINE trc_ldf_ini
 #else
    !!----------------------------------------------------------------------
Index: anches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcnam_trp.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcnam_trp.F90	(revision 5765)
+++ 	(revision )
@@ -1,198 +1,0 @@
-MODULE trcnam_trp
-   !!======================================================================
-   !!                       ***  MODULE  trcnam_trp  ***
-   !! TOP :   namelist read options for transport
-   !!======================================================================
-   !! History :   1.0  !  2004-03  (C. Ethe)  Original code
-   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  revised architecture
-   !!----------------------------------------------------------------------
-#if defined key_top
-   !!----------------------------------------------------------------------
-   !!   'key_top'                                                TOP models
-   !!----------------------------------------------------------------------
-   !!   trc_nam_trp  : read the passive tracer namelist for transport
-   !!----------------------------------------------------------------------
-   USE trc                 ! passive tracers variables
-   USE in_out_manager      ! ocean dynamics and active tracers variables
-   USE lib_mpp           ! distributed memory computing library
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC   trc_nam_trp    ! routine called by step module
- 
-   !                                        !!: ** Advection (namtrc_adv) **
-   LOGICAL , PUBLIC ::   ln_trcadv_cen2      ! 2nd order centered scheme flag
-   LOGICAL , PUBLIC ::   ln_trcadv_tvd       ! TVD scheme flag
-   LOGICAL , PUBLIC ::   ln_trcadv_muscl     ! MUSCL scheme flag
-   LOGICAL , PUBLIC ::   ln_trcadv_muscl2    ! MUSCL2 scheme flag
-   LOGICAL , PUBLIC ::   ln_trcadv_ubs       ! UBS scheme flag
-   LOGICAL , PUBLIC ::   ln_trcadv_qck       ! QUICKEST scheme flag
-   LOGICAL , PUBLIC ::   ln_trcadv_msc_ups   ! use upstream scheme within muscl
-
-   !                                        !!: ** lateral mixing namelist (nam_trcldf) **
-   LOGICAL , PUBLIC ::   ln_trcldf_lap       !:   laplacian operator
-   LOGICAL , PUBLIC ::   ln_trcldf_blp       !: bilaplacian operator
-   LOGICAL , PUBLIC ::   ln_trcldf_lev       !: iso-level   direction
-   LOGICAL , PUBLIC ::   ln_trcldf_hor       !: horizontal  direction (rotation to geopotential)
-   LOGICAL , PUBLIC ::   ln_trcldf_iso       !: iso-neutral direction (standard)
-   LOGICAL , PUBLIC ::   ln_trcldf_triad     !: iso-neutral direction (triad)
-   REAL(wp), PUBLIC ::   rn_ahtrc_0          !:   laplacian diffusivity coefficient for passive tracer [m2/s]
-   REAL(wp), PUBLIC ::   rn_bhtrc_0          !: bilaplacian      -          -        -     -       -   [m4/s]
-
-   !                                        !!: ** Treatment of Negative concentrations ( nam_trcrad )
-   LOGICAL , PUBLIC ::   ln_trcrad           !: flag to artificially correct negative concentrations
-
-   !                                        !!: ** Vertical diffusion (nam_trczdf) **
-   LOGICAL , PUBLIC ::   ln_trczdf_exp       !: explicit vertical diffusion scheme flag
-   INTEGER , PUBLIC ::   nn_trczdf_exp       !: number of sub-time step (explicit time stepping)
-
-   !                                                 !!: ** newtonian damping namelist (nam_trcdmp) **
-   !                          !!* Namelist namtrc_dmp : passive tracer newtonian damping *
-   INTEGER , PUBLIC ::   nn_zdmp_tr    ! = 0/1/2 flag for damping in the mixed layer
-   CHARACTER(LEN=200) , PUBLIC :: cn_resto_tr    !File containing restoration coefficient
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 3.7 , NEMO Consortium (2015)
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-CONTAINS
-
-   SUBROUTINE trc_nam_trp
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE trc_nam_trp  ***
-      !!                
-      !! ** Purpose :   Read Namelist for tracer transport option
-      !!----------------------------------------------------------------------
-      INTEGER ::  ios                 ! Local integer output status for namelist read
-      !!
-      NAMELIST/namtrc_adv/ ln_trcadv_cen2 , ln_trcadv_tvd   ,    &
-         &                 ln_trcadv_muscl, ln_trcadv_muscl2,    &
-         &                 ln_trcadv_ubs  , ln_trcadv_qck, ln_trcadv_msc_ups
-      NAMELIST/namtrc_ldf/ ln_trcldf_lap, ln_trcldf_blp,                                  &
-         &                 ln_trcldf_lev, ln_trcldf_hor, ln_trcldf_iso, ln_trcldf_triad,  &
-         &                 rn_ahtrc_0   , rn_bhtrc_0
-      NAMELIST/namtrc_zdf/ ln_trczdf_exp  , nn_trczdf_exp
-      NAMELIST/namtrc_rad/ ln_trcrad
-      NAMELIST/namtrc_dmp/ nn_zdmp_tr , cn_resto_tr
-      !!----------------------------------------------------------------------
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' trc_nam_trp: read namelist for tracer transport'
-      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~'
-
-      REWIND( numnat_ref )              ! Namelist namtrc_adv in reference namelist : Tracer advection scheme
-      READ  ( numnat_ref, namtrc_adv, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in reference namelist', lwp )
-
-      REWIND( numnat_cfg )              ! Namelist namtrc_adv in configuration namelist : Tracer advection scheme
-      READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist', lwp )
-      IF(lwm) WRITE ( numont, namtrc_adv )
-
-      IF(lwp) THEN                    ! Namelist print
-         WRITE(numout,*)
-         WRITE(numout,*) 'trc_adv_ctl : choice/control of the tracer advection scheme'
-         WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '   Namelist namtrc_adv : chose a advection scheme for tracers'
-         WRITE(numout,*) '      2nd order advection scheme     ln_trcadv_cen2   = ', ln_trcadv_cen2
-         WRITE(numout,*) '      TVD advection scheme           ln_trcadv_tvd    = ', ln_trcadv_tvd
-         WRITE(numout,*) '      MUSCL  advection scheme        ln_trcadv_muscl  = ', ln_trcadv_muscl
-         WRITE(numout,*) '      MUSCL2 advection scheme        ln_trcadv_muscl2 = ', ln_trcadv_muscl2
-         WRITE(numout,*) '      UBS    advection scheme        ln_trcadv_ubs    = ', ln_trcadv_ubs
-         WRITE(numout,*) '      QUICKEST advection scheme      ln_trcadv_qck    = ', ln_trcadv_qck
-      ENDIF
-      !
-      REWIND( numnat_ref )              ! Namelist namtrc_ldf in reference namelist : Tracer lateral diffusive operator
-      READ  ( numnat_ref, namtrc_ldf, IOSTAT = ios, ERR = 903)
-903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in reference namelist', lwp )
-
-      REWIND( numnat_cfg )              ! Namelist namtrc_ldf in configuration namelist : Tracer lateral diffusive operator
-      READ  ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 )
-904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp )
-      IF(lwm) WRITE ( numont, namtrc_ldf )
-
-      IF(lwp) THEN                    ! Namelist print
-         WRITE(numout,*)
-         WRITE(numout,*) 'trc:ldf_ctl : lateral tracer diffusive operator'
-         WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '   Namelist namtrc_ldf : set lateral mixing parameters (type, direction, coefficients)'
-         WRITE(numout,*) '      operator'
-         WRITE(numout,*) '           laplacian                 ln_trcldf_lap   = ', ln_trcldf_lap
-         WRITE(numout,*) '         bilaplacian                 ln_trcldf_blp   = ', ln_trcldf_blp
-         WRITE(numout,*) '      direction of action'
-         WRITE(numout,*) '         iso-level                   ln_trcldf_lev   = ', ln_trcldf_lev
-         WRITE(numout,*) '         horizontal (geopotential)   ln_trcldf_hor   = ', ln_trcldf_hor
-         WRITE(numout,*) '         iso-neutral (standard)      ln_trcldf_iso   = ', ln_trcldf_iso
-         WRITE(numout,*) '         iso-neutral (triad)         ln_trcldf_triad = ', ln_trcldf_triad
-         WRITE(numout,*) '      diffusivity coefficient'
-         WRITE(numout,*) '           laplacian                 rn_ahtrc_0      = ', rn_ahtrc_0
-         WRITE(numout,*) '         bilaplacian                 rn_bhtrc_0      = ', rn_bhtrc_0
-      ENDIF
-
-      !                                ! Vertical mixing
-      REWIND( numnat_ref )              ! Namelist namtrc_zdf in reference namelist : Tracer vertical mixing
-      READ  ( numnat_ref, namtrc_zdf, IOSTAT = ios, ERR = 905)
-905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in reference namelist', lwp )
-
-      REWIND( numnat_cfg )              ! Namelist namtrc_zdf in configuration namelist : Tracer vertical mixing
-      READ  ( numnat_cfg, namtrc_zdf, IOSTAT = ios, ERR = 906 )
-906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in configuration namelist', lwp )
-      IF(lwm) WRITE ( numont, namtrc_zdf )
-
-      IF(lwp) THEN                     !   ! Control print
-         WRITE(numout,*)
-         WRITE(numout,*) '   Namelist namtrc_zdf : set vertical diffusion parameters'
-         WRITE(numout,*) '      time splitting / backward scheme ln_trczdf_exp = ', ln_trczdf_exp
-         WRITE(numout,*) '      number of time step              nn_trczdf_exp = ', nn_trczdf_exp
-      ENDIF
-
-      !
-      REWIND( numnat_ref )              ! Namelist namtrc_rad in reference namelist : Tracer negative concentrations
-      READ  ( numnat_ref, namtrc_rad, IOSTAT = ios, ERR = 907)
-907   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in reference namelist', lwp )
-
-      REWIND( numnat_cfg )              ! Namelist namtrc_rad in configuration namelist : Tracer negative concentrations
-      READ  ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 )
-908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist', lwp )
-      IF(lwm) WRITE ( numont, namtrc_rad )
-
-      IF(lwp) THEN                     !   ! Control print
-         WRITE(numout,*)
-         WRITE(numout,*) '   Namelist namtrc_rad : treatment of negative concentrations'
-         WRITE(numout,*) '      correct artificially negative concen. or not ln_trcrad = ', ln_trcrad
-      ENDIF
-
-
-      REWIND( numnat_ref )              ! Namelist namtrc_dmp in reference namelist : Passive tracers newtonian damping
-      READ  ( numnat_ref, namtrc_dmp, IOSTAT = ios, ERR = 909)
-909   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in reference namelist', lwp )
-
-      REWIND( numnat_cfg )              ! Namelist namtrc_dmp in configuration namelist : Passive tracers newtonian damping
-      READ  ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910)
-910   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist', lwp )
-      IF(lwm) WRITE ( numont, namtrc_dmp )
-
-      IF(lwp) THEN                       ! Namelist print
-         WRITE(numout,*)
-         WRITE(numout,*) 'trc_dmp : Passive tracers newtonian damping'
-         WRITE(numout,*) '~~~~~~~'
-         WRITE(numout,*) '   Namelist namtrc_dmp : set damping parameter'
-         WRITE(numout,*) '      mixed layer damping option     nn_zdmp_tr = ', nn_zdmp_tr, '(zoom: forced to 0)'
-         WRITE(numout,*) '      Restoration coeff file    cn_resto_tr = ', cn_resto_tr
-      ENDIF
-      !
-   END SUBROUTINE trc_nam_trp
-   
-#else
-   !!----------------------------------------------------------------------
-   !!   Dummy module :                                         No TOP model
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_nam_trp              ! Empty routine
-   END SUBROUTINE trc_nam_trp
-#endif
-
-  !!======================================================================
-END MODULE trcnam_trp
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcrad.F90	(revision 5766)
@@ -22,8 +22,9 @@
    PRIVATE
 
-   PUBLIC trc_rad         ! routine called by trcstp.F90
-
-   !! * Substitutions
-#  include "top_substitute.h90"
+   PUBLIC trc_rad     
+   PUBLIC trc_rad_ini  
+
+   LOGICAL , PUBLIC ::   ln_trcrad           !: flag to artificially correct negative concentrations
+
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -76,4 +77,32 @@
       !
    END SUBROUTINE trc_rad
+
+   SUBROUTINE trc_rad_ini
+      !!---------------------------------------------------------------------
+      !!                  ***  ROUTINE trc _rad_ini ***
+      !!
+      !! ** Purpose : read  namelist options 
+      !!----------------------------------------------------------------------
+      INTEGER ::  ios                 ! Local integer output status for namelist read
+      NAMELIST/namtrc_rad/ ln_trcrad
+      !!----------------------------------------------------------------------
+
+      !
+      REWIND( numnat_ref )              ! namtrc_rad in reference namelist 
+      READ  ( numnat_ref, namtrc_rad, IOSTAT = ios, ERR = 907)
+907   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in reference namelist', lwp )
+
+      REWIND( numnat_cfg )              ! namtrc_rad in configuration namelist 
+      READ  ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 )
+908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist', lwp )
+      IF(lwm) WRITE ( numont, namtrc_rad )
+
+      IF(lwp) THEN                     !   ! Control print
+         WRITE(numout,*)
+         WRITE(numout,*) '   Namelist namtrc_rad : treatment of negative concentrations'
+         WRITE(numout,*) '      correct artificially negative concen. or not ln_trcrad = ', ln_trcrad
+      ENDIF
+      !
+   END SUBROUTINE trc_rad_ini
 
    SUBROUTINE trc_rad_sms( kt, ptrb, ptrn, jp_sms0, jp_sms1, cpreserv )
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 5766)
@@ -31,5 +31,6 @@
 
    !! * Substitutions
-#  include "top_substitute.h90"
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -83,5 +84,5 @@
          CASE( 0    )   ;   zswitch = 1  ! (0) standard levitating sea-ice : salt exchange only
          CASE( 1, 2 )   ;   zswitch = 0  ! (1) levitating sea-ice: salt and volume exchange but no pressure effect                                
-                                         ! (2) embedded sea-ice : salt and volume fluxes and pressure
+      !                                  ! (2) embedded sea-ice : salt and volume fluxes and pressure
       END SELECT
 
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 5766)
@@ -15,8 +15,6 @@
    USE oce_trc         ! ocean dynamics and active tracers variables
    USE trc             ! ocean passive tracers variables 
-   USE trcnam_trp      ! passive tracers transport namelist variables
    USE trabbl          ! bottom boundary layer               (trc_bbl routine)
    USE trcbbl          ! bottom boundary layer               (trc_bbl routine)
-   USE zdfkpp          ! KPP non-local tracer fluxes         (trc_kpp routine)
    USE trcdmp          ! internal damping                    (trc_dmp routine)
    USE trcldf          ! lateral mixing                      (trc_ldf routine)
@@ -38,6 +36,4 @@
    PUBLIC   trc_trp    ! called by trc_stp
 
-   !! * Substitutions
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -69,4 +65,11 @@
          IF( ln_trcdmp_clo )    CALL trc_dmp_clo( kt )      ! internal damping trends on closed seas only
                                 CALL trc_adv    ( kt )      ! horizontal & vertical advection 
+         !                                                         ! Partial top/bottom cell: GRADh( trb )  
+         IF( ln_zps ) THEN
+           IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, jptra, trb, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! both top & bottom
+           ELSE                 ; CALL zps_hde    ( kt, jptra, trb, gtru, gtrv )                                      !  only bottom
+           ENDIF
+         ENDIF
+         !                                                      
                                 CALL trc_ldf    ( kt )      ! lateral mixing
 #if defined key_agrif
@@ -78,21 +81,9 @@
 
 #if defined key_agrif
-      IF( .NOT.Agrif_Root())    CALL Agrif_Update_Trc( kt ) ! Update tracer at AGRIF zoom boundaries : children only
+         IF( .NOT.Agrif_Root()) CALL Agrif_Update_Trc( kt ) ! Update tracer at AGRIF zoom boundaries : children only
 #endif
-
-      !                                                         ! Partial top/bottom cell: GRADh( trn )  
-      IF( ln_isfcav .AND. ln_zps ) THEN   ;   CALL zps_hde_isf( kt, jptra, trn, gtru, gtrv, gtrui, gtrvi )  ! both top & bottom
-      ELSEIF(             ln_zps ) THEN   ;   CALL zps_hde    ( kt, jptra, trn, gtru, gtrv )                ! only bottom 
-      ENDIF
-!!gm         IF( ln_zps ) THEN
-!            &            CALL zps_hde    ( kt, jptra, trn, gtru, gtrv )   ! Partial steps: now horizontal gradient of passive
-!            IF( ln_isfcav)        &
-!            &            CALL zps_hde_isf( kt, jptra, trn, pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! Partial steps: now horizontal gradient of passive
-!!gm         ENDIF
          !
       ELSE                                               ! 1D vertical configuration
                                 CALL trc_sbc( kt )            ! surface boundary condition
-         IF( .NOT. lk_offline .AND. lk_zdfkpp )    &
-            &                   CALL trc_kpp( kt )            ! KPP non-local tracer fluxes
                                 CALL trc_zdf( kt )            ! vertical mixing and after tracer fields
                                 CALL trc_nxt( kt )            ! tracer fields at next time step     
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90	(revision 5766)
@@ -11,12 +11,12 @@
    !!   'key_top'                                                TOP models
    !!----------------------------------------------------------------------
-   !!   trc_ldf     : update the tracer trend with the lateral diffusion
-   !!       ldf_ctl : initialization, namelist read, and parameters control
+   !!   trc_zdf     : update the tracer trend with the lateral diffusion
+   !!   trc_zdf_ini : initialization, namelist read, and parameters control
    !!----------------------------------------------------------------------
    USE oce_trc         ! ocean dynamics and active tracers
    USE trc             ! ocean passive tracers variables
-   USE trcnam_trp      ! passive tracers transport namelist variables
    USE trazdf_exp      ! vertical diffusion: explicit (tra_zdf_exp     routine)
    USE trazdf_imp      ! vertical diffusion: implicit (tra_zdf_imp     routine)
+   USE trcldf   
    USE trd_oce
    USE trdtra
@@ -28,4 +28,9 @@
    PUBLIC   trc_zdf          ! called by step.F90 
    PUBLIC   trc_zdf_alloc    ! called by nemogcm.F90 
+   PUBLIC   trc_zdf_ini    ! called by nemogcm.F90 
+   !                                        !!: ** Vertical diffusion
+   !                                        (nam_trczdf) **
+   LOGICAL , PUBLIC ::   ln_trczdf_exp       !: explicit vertical diffusion scheme flag
+   INTEGER , PUBLIC ::   nn_trczdf_exp       !: number of sub-time step (explicit time stepping)
 
    INTEGER ::   nzdf = 0               ! type vertical diffusion algorithm used
@@ -55,5 +60,4 @@
    END FUNCTION trc_zdf_alloc
 
-
    SUBROUTINE trc_zdf( kt )
       !!----------------------------------------------------------------------
@@ -71,6 +75,4 @@
       IF( nn_timing == 1 )  CALL timing_start('trc_zdf')
       !
-      IF( kt == nittrc000 )   CALL zdf_ctl          ! initialisation & control of options
-
       IF( ( neuler == 0 .AND. kt == nittrc000 ) .OR. ln_top_euler ) THEN     ! at nittrc000
          r2dt(:) =  rdttrc(:)           ! = rdttrc (use or restarting with Euler time stepping)
@@ -116,8 +118,7 @@
    END SUBROUTINE trc_zdf
 
-
-   SUBROUTINE zdf_ctl
+   SUBROUTINE trc_zdf_ini
       !!----------------------------------------------------------------------
-      !!                 ***  ROUTINE zdf_ctl  ***
+      !!                 ***  ROUTINE trc_zdf_ini  ***
       !!
       !! ** Purpose :   Choose the vertical mixing scheme
@@ -128,15 +129,31 @@
       !!      NB: The implicit scheme is required when using : 
       !!             - rotated lateral mixing operator
-      !!             - TKE, GLS or KPP vertical mixing scheme
+      !!             - TKE, GLS vertical mixing scheme
+      !!----------------------------------------------------------------------
+      INTEGER ::  ios                 ! Local integer output status for namelist read
+      !
+      NAMELIST/namtrc_zdf/ ln_trczdf_exp  , nn_trczdf_exp
       !!----------------------------------------------------------------------
 
+      !                                ! Vertical mixing
+      REWIND( numnat_ref )             ! namtrc_zdf in reference namelist 
+      READ  ( numnat_ref, namtrc_zdf, IOSTAT = ios, ERR = 905)
+905   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in reference namelist', lwp )
+
+      REWIND( numnat_cfg )             ! namtrc_zdf in configuration namelist 
+      READ  ( numnat_cfg, namtrc_zdf, IOSTAT = ios, ERR = 906 )
+906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in configuration namelist', lwp )
+      IF(lwm) WRITE ( numont, namtrc_zdf )
+
+      IF(lwp) THEN                     !   ! Control print
+         WRITE(numout,*)
+         WRITE(numout,*) '   Namelist namtrc_zdf : set vertical diffusion  parameters'
+         WRITE(numout,*) '      time splitting / backward scheme ln_trczdf_exp = ', ln_trczdf_exp
+         WRITE(numout,*) '      number of time step              nn_trczdf_exp = ', nn_trczdf_exp
+      ENDIF
+
       !  Define the vertical tracer physics scheme
-      ! ==========================================
-
-      ! Choice from ln_zdfexp already read in namelist in zdfini module
-      IF( ln_trczdf_exp ) THEN           ! use explicit scheme
-         nzdf = 0
-      ELSE                               ! use implicit scheme
-         nzdf = 1
+      IF( ln_trczdf_exp ) THEN  ;  nzdf = 0     ! explicit scheme
+      ELSE                      ;  nzdf = 1     ! implicit scheme
       ENDIF
 
@@ -144,14 +161,10 @@
       IF( ln_trcldf_iso                               )   nzdf = 1      ! iso-neutral lateral physics
       IF( ln_trcldf_hor .AND. ln_sco                  )   nzdf = 1      ! horizontal lateral physics in s-coordinate
-#if defined key_zdftke || defined key_zdfgls || defined key_zdfkpp
-                                                          nzdf = 1      ! TKE, GLS or KPP physics       
+#if defined key_zdftke || defined key_zdfgls 
+                                                          nzdf = 1      ! TKE or GLS physics       
 #endif
-      IF( ln_trczdf_exp .AND. nzdf == 1 )   THEN
-         CALL ctl_stop( 'trc_zdf : If using the rotated lateral mixing operator or TKE, GLS or KPP vertical scheme ', &
+      IF( ln_trczdf_exp .AND. nzdf == 1 )  & 
+         CALL ctl_stop( 'trc_zdf : If using the rotated lateral mixing operator or TKE, GLS vertical scheme ', &
             &           '          the implicit scheme is required, set ln_trczdf_exp = .false.' )
-      ENDIF
-
-      ! Test: esopa
-      IF( lk_esopa )    nzdf = -1                      ! All schemes used
 
       IF(lwp) THEN
@@ -159,10 +172,9 @@
          WRITE(numout,*) 'trc:zdf_ctl : vertical passive tracer physics scheme'
          WRITE(numout,*) '~~~~~~~~~~~'
-         IF( nzdf == -1 )   WRITE(numout,*) '              ESOPA test All scheme used'
          IF( nzdf ==  0 )   WRITE(numout,*) '              Explicit time-splitting scheme'
          IF( nzdf ==  1 )   WRITE(numout,*) '              Implicit (euler backward) scheme'
       ENDIF
 
-   END SUBROUTINE zdf_ctl
+   END SUBROUTINE trc_zdf_ini
 #else
    !!----------------------------------------------------------------------
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdmxl_trc.F90	(revision 5766)
@@ -24,5 +24,4 @@
    USE zdfddm  , ONLY : avs  ! salinity vertical diffusivity coeff. at w-point
 # endif
-   USE trcnam_trp        ! passive tracers transport namelist variables
    USE trdtrc_oce    ! definition of main arrays used for trends computations
    USE in_out_manager    ! I/O manager
@@ -67,5 +66,5 @@
 
    !! * Substitutions
-#  include "top_substitute.h90"
+#  include "domzgr_substitute.h90"
 #  include "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/TRP/trdtrc.F90	(revision 5766)
@@ -14,5 +14,4 @@
    !!----------------------------------------------------------------------
    USE trc               ! tracer definitions (trn, trb, tra, etc.)
-   USE trcnam_trp
    USE trd_oce
    USE trdtrc_oce       ! definition of main arrays used for trends computations
@@ -29,6 +28,4 @@
    PUBLIC trd_trc
 
-   !! * Substitutions
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: anches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/top_substitute.h90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/top_substitute.h90	(revision 5765)
+++ 	(revision )
@@ -1,17 +1,0 @@
-   !!----------------------------------------------------------------------
-   !!                    ***  top_substitute.h90   ***
-   !!----------------------------------------------------------------------
-   !! ** purpose : Statement function file: to be include in all passive tracer modules
-   !!----------------------------------------------------------------------
-   !! History :   1.0  !  2004-03 (C. Ethe) Original code
-   !!             2.0  !  2007-12 (C. Ethe, G. Madec) new architecture
-   !!----------------------------------------------------------------------
-#  include "domzgr_substitute.h90"
-#  include "ldfeiv_substitute.h90"
-#  include "ldftra_substitute.h90"
-#  include "vectopt_loop_substitute.h90"
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcdia.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcdia.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcdia.F90	(revision 5766)
@@ -51,6 +51,4 @@
    INTEGER  ::   nhoritb   !:  id for horizontal mesh
 
-   !! * Substitutions
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 5766)
@@ -18,15 +18,9 @@
    USE oce_trc         ! shared variables between ocean and passive tracers
    USE trc             ! passive tracers common variables
-   USE trcrst          ! passive tracers restart
    USE trcnam          ! Namelist read
-   USE trcini_cfc      ! CFC      initialisation
-   USE trcini_pisces   ! PISCES   initialisation
-   USE trcini_c14b     ! C14 bomb initialisation
-   USE trcini_my_trc   ! MY_TRC   initialisation
-   USE trcdta          ! initialisation from files
    USE daymod          ! calendar manager
-   USE zpshde          ! partial step: hor. derivative   (zps_hde routine)
    USE prtctl_trc      ! Print control passive tracers (prt_ctl_trc_init routine)
    USE trcsub          ! variables to substep passive tracers
+   USE trcrst
    USE lib_mpp         ! distribued memory computing library
    USE sbc_oce
@@ -59,7 +53,4 @@
       !!                or read data or analytical formulation
       !!---------------------------------------------------------------------
-      INTEGER ::   jk, jn, jl    ! dummy loop indices
-      CHARACTER (len=25) :: charout
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta   ! 4D  workspace
       !!---------------------------------------------------------------------
       !
@@ -70,6 +61,44 @@
       IF(lwp) WRITE(numout,*) '~~~~~~~'
 
-      CALL top_alloc()              ! allocate TOP arrays
-
+      !
+      CALL top_alloc()   ! allocate TOP arrays
+      !
+      CALL trc_ini_ctl   ! control 
+      !
+      CALL trc_nam       ! read passive tracers namelists
+      !
+      IF(lwp) WRITE(numout,*)
+      !
+      IF( ln_rsttr .AND. .NOT. lk_offline ) CALL trc_rst_cal( nit000, 'READ' )   ! calendar
+      !
+      IF(lwp) WRITE(numout,*)
+      !
+      CALL trc_ini_sms   ! SMS
+      !
+      CALL trc_ini_trp   ! passive tracers transport
+      !
+      CALL trc_ice_ini   ! Tracers in sea ice
+      !
+      IF( lwp )  &
+         &  CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea )
+      !
+      CALL trc_ini_state  !  passive tracers initialisation : from a restart or from clim
+      !
+      IF( nn_dttrc /= 1 )        CALL trc_sub_ini      ! Initialize variables for substepping passive tracers
+      !
+      CALL trc_ini_inv   ! Inventories
+      !
+      IF( nn_timing == 1 )   CALL timing_stop('trc_init')
+      !
+   END SUBROUTINE trc_init
+
+   SUBROUTINE trc_ini_ctl
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ini_ctl  ***
+      !! ** Purpose :        Control  + ocean volume
+      !!----------------------------------------------------------------------
+      INTEGER ::   jk    ! dummy loop indices
+      !
+      ! Define logical parameter ton control dirunal cycle in TOP
       l_trcdm2dc = ln_dm2dc .OR. ( ln_cpl .AND. ncpl_qsr_freq /= 1 )
       l_trcdm2dc = l_trcdm2dc  .AND. .NOT. lk_offline
@@ -78,15 +107,18 @@
          & Computation of a daily mean shortwave for some biogeochemical models) ')
 
+      !
       IF( nn_cla == 1 )   &
          &  CALL ctl_stop( ' Cross Land Advection not yet implemented with passive tracer ; nn_cla must be 0' )
-
-      CALL trc_nam      ! read passive tracers namelists
-      !
-      IF(lwp) WRITE(numout,*)
-      !
-      IF( ln_rsttr .AND. .NOT. lk_offline ) CALL trc_rst_cal( nit000, 'READ' )   ! calendar
-      !
-      IF(lwp) WRITE(numout,*)
-                                                              ! masked grid volume
+      !
+   END SUBROUTINE trc_ini_ctl
+
+   SUBROUTINE trc_ini_inv
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ini_stat  ***
+      !! ** Purpose :      passive tracers inventories at initialsation phase
+      !!----------------------------------------------------------------------
+      INTEGER ::  jk, jn    ! dummy loop indices
+      CHARACTER (len=25) :: charout
+      !!----------------------------------------------------------------------
       !                                                              ! masked grid volume
       DO jk = 1, jpk
@@ -96,20 +128,87 @@
       !                                                              ! total volume of the ocean 
       areatot = glob_sum( cvol(:,:,:) )
-
+      !
+      trai(:) = 0._wp                                                   ! initial content of all tracers
+      DO jn = 1, jptra
+         trai(jn) = trai(jn) + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   )
+      END DO
+
+      IF(lwp) THEN               ! control print
+         WRITE(numout,*)
+         WRITE(numout,*)
+         WRITE(numout,*) '          *** Total number of passive tracer jptra = ', jptra
+         WRITE(numout,*) '          *** Total volume of ocean                = ', areatot
+         WRITE(numout,*) '          *** Total inital content of all tracers '
+         WRITE(numout,*)
+         DO jn = 1, jptra
+            WRITE(numout,9000) jn, TRIM( ctrcnm(jn) ), trai(jn)
+         ENDDO
+         WRITE(numout,*)
+      ENDIF
+      IF(lwp) WRITE(numout,*)
+      IF(ln_ctl) THEN            ! print mean trends (used for debugging)
+         CALL prt_ctl_trc_init
+         WRITE(charout, FMT="('ini ')")
+         CALL prt_ctl_trc_info( charout )
+         CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm )
+      ENDIF
+9000  FORMAT(' tracer nb : ',i2,'      name :',a10,'      initial content :',e18.10)
+      !
+   END SUBROUTINE trc_ini_inv
+
+   SUBROUTINE trc_ini_sms
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ini_sms  ***
+      !! ** Purpose :   SMS initialisation
+      !!----------------------------------------------------------------------
+      USE trcini_cfc      ! CFC      initialisation
+      USE trcini_pisces   ! PISCES   initialisation
+      USE trcini_c14b     ! C14 bomb initialisation
+      USE trcini_my_trc   ! MY_TRC   initialisation
+      !!----------------------------------------------------------------------
       IF( lk_pisces  )       CALL trc_ini_pisces       ! PISCES  bio-model
       IF( lk_cfc     )       CALL trc_ini_cfc          ! CFC     tracers
       IF( lk_c14b    )       CALL trc_ini_c14b         ! C14 bomb  tracer
       IF( lk_my_trc  )       CALL trc_ini_my_trc       ! MY_TRC  tracers
-
-      CALL trc_ice_ini                                 ! Tracers in sea ice
-
-      IF( lwp ) THEN
-         !
-         CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp , narea )
-         !
-      ENDIF
-
+      !
+   END SUBROUTINE trc_ini_sms
+
+   SUBROUTINE trc_ini_trp
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ini_trp  ***
+      !!
+      !! ** Purpose :   Allocate all the dynamic arrays of the OPA modules
+      !!----------------------------------------------------------------------
+      USE trcdmp , ONLY:  trc_dmp_ini
+      USE trcadv , ONLY:  trc_adv_ini
+      USE trcldf , ONLY:  trc_ldf_ini
+      USE trczdf , ONLY:  trc_zdf_ini
+      USE trcrad , ONLY:  trc_rad_ini
+      !
+      INTEGER :: ierr
+      !!----------------------------------------------------------------------
+      !
+      IF( ln_trcdmp )  CALL  trc_dmp_ini          ! damping
+                       CALL  trc_adv_ini          ! advection
+                       CALL  trc_ldf_ini          ! lateral diffusion
+                       CALL  trc_zdf_ini          ! vertical diffusion
+                       CALL  trc_rad_ini          ! positivity of passive tracers 
+      !
+   END SUBROUTINE trc_ini_trp
+
+   SUBROUTINE trc_ini_state
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ini_state ***
+      !! ** Purpose :          Initialisation of passive tracer concentration 
+      !!----------------------------------------------------------------------
+      USE zpshde          ! partial step: hor. derivative   (zps_hde routine)
+      USE trcrst          ! passive tracers restart
+      USE trcdta          ! initialisation from files
+      !
+      INTEGER ::   jk, jn, jl    ! dummy loop indices
+      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta   ! 4D  workspace
+      !!----------------------------------------------------------------------
+      !
       IF( ln_trcdta )      CALL trc_dta_init(jptra)
-
 
       IF( ln_rsttr ) THEN
@@ -146,52 +245,6 @@
  
       tra(:,:,:,:) = 0._wp
-
-!!gm  case not.lk_c1d   is useless since in 1D, 9 identical column all resulting arrays are zero
-!!                       it is at the initialization so not a issue     
-!      IF(.NOT. lk_c1d ) THEN
-!!gm
-      IF( ln_isfcav .AND. ln_zps ) THEN   ;   CALL zps_hde_isf( nit000, jptra, trn, gtru, gtrv, gtrui, gtrvi )  ! both top & bottom
-      ELSEIF(             ln_zps ) THEN   ;   CALL zps_hde    ( nit000, jptra, trn, gtru, gtrv )                ! only bottom 
-      ENDIF
-!!gm      
-!      ENDIF
-!!gm
-
-!!gm  ===>>>>>>  Anyyway, I don't understand why a call to zps_hde is needed here !
-
-      !
-      IF( nn_dttrc /= 1 )        CALL trc_sub_ini      ! Initialize variables for substepping passive tracers
-      !
-
-      trai(:) = 0._wp                                                   ! initial content of all tracers
-      DO jn = 1, jptra
-         trai(jn) = trai(jn) + glob_sum( trn(:,:,:,jn) * cvol(:,:,:)   )
-      END DO
-
-      IF(lwp) THEN               ! control print
-         WRITE(numout,*)
-         WRITE(numout,*)
-         WRITE(numout,*) '          *** Total number of passive tracer jptra = ', jptra
-         WRITE(numout,*) '          *** Total volume of ocean                = ', areatot
-         WRITE(numout,*) '          *** Total inital content of all tracers '
-         WRITE(numout,*)
-         DO jn = 1, jptra
-            WRITE(numout,9000) jn, TRIM( ctrcnm(jn) ), trai(jn)
-         ENDDO
-         WRITE(numout,*)
-      ENDIF
-      IF(lwp) WRITE(numout,*)
-      IF(ln_ctl) THEN            ! print mean trends (used for debugging)
-         CALL prt_ctl_trc_init
-         WRITE(charout, FMT="('ini ')")
-         CALL prt_ctl_trc_info( charout )
-         CALL prt_ctl_trc( tab4d=trn, mask=tmask, clinfo=ctrcnm )
-      ENDIF
-9000  FORMAT(' tracer nb : ',i2,'      name :',a10,'      initial content :',e18.10)
-      !
-      IF( nn_timing == 1 )   CALL timing_stop('trc_init')
-      !
-   END SUBROUTINE trc_init
-
+      !                                                         ! Partial top/bottom cell: GRADh(trn)
+   END SUBROUTINE trc_ini_state
 
    SUBROUTINE top_alloc
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 5766)
@@ -20,5 +20,4 @@
    USE oce_trc           ! shared variables between ocean and passive tracers
    USE trc               ! passive tracers common variables
-   USE trcnam_trp        ! Transport namelist
    USE trcnam_pisces     ! PISCES namelist
    USE trcnam_cfc        ! CFC SMS namelist
@@ -35,6 +34,4 @@
    PUBLIC trc_nam      ! called in trcini
 
-   !! * Substitutions
-#  include "top_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
@@ -62,6 +59,4 @@
                               CALL trc_nam_dia     ! Parameters of additional diagnostics
       !                                      
-                              CALL trc_nam_trp     ! namelist of transport
-      !
       !
       IF( ln_rsttr                     )   ln_trcdta     = .FALSE.   ! restart : no need of clim data
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcrst.F90	(revision 5766)
@@ -25,5 +25,4 @@
    USE oce_trc
    USE trc
-   USE trcnam_trp
    USE iom
    USE daymod
@@ -37,5 +36,5 @@
 
    !! * Substitutions
-#  include "top_substitute.h90"
+#  include "domzgr_substitute.h90"
    
 CONTAINS
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 5766)
@@ -48,6 +48,6 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::  uslp_tm  , vslp_tm  , wslpi_tm  , wslpj_tm     !: time mean 
 
-   !!* Substitution
-#  include "top_substitute.h90"
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
    !! NEMO/TOP 3.3 , NEMO Consortium (2010)
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcwri.F90
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcwri.F90	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/TOP_SRC/trcwri.F90	(revision 5766)
@@ -26,7 +26,4 @@
 
    PUBLIC trc_wri      
-
-   !! * Substitutions
-#  include "top_substitute.h90"
 
 CONTAINS
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/param.cfg
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/param.cfg	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/param.cfg	(revision 5766)
@@ -1,8 +1,8 @@
-#- forcing files storing 
+#- forcing files storing
 FORCING_DIR=~/FORCING
-#- input files storing 
+#- input files storing
 INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
 #- only for IBM
 #TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00
-#- VALIDATION files storing 
+#- VALIDATION files storing
 NEMO_VALIDATION_DIR=~/NEMO_VALIDATION
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/sette.sh
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/sette.sh	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/sette.sh	(revision 5766)
@@ -291,5 +291,5 @@
     . ./prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    NPROC=4
+    NPROC=8
     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
     cd ${EXE_DIR}
Index: /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/sette_rpt
===================================================================
--- /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/sette_rpt	(revision 5765)
+++ /branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/SETTE/sette_rpt	(revision 5766)
@@ -393,4 +393,31 @@
 
 
+  if ( -d ./WORCA2_LIM_OBS ) then
+    set dorv = `ls -1rtd ./WORCA2_LIM_OBS/{$mach}/* | tail -1l `
+    set dorv = $dorv:t
+    set f1o = ./WORCA2_LIM_OBS/{$mach}/{$dorv}/REPRO_2_8/ocean.output
+    set f1s = ./WORCA2_LIM_OBS/{$mach}/{$dorv}/REPRO_2_8/solver.stat
+    set f2o = ./WORCA2_LIM_OBS/{$mach}/{$dorv}/REPRO_4_4/ocean.output
+    set f2s = ./WORCA2_LIM_OBS/{$mach}/{$dorv}/REPRO_4_4/solver.stat
+
+    cmp -s $f1s $f2s
+    if ( $status == 0 ) then
+      echo "ORCA2_LIM_OBS   reproducibility passed"
+    else
+      echo "ORCA2_LIM_OBS   reproducibility FAILED"
+      if ( $pass == 1 ) then
+        echo "<return> to view solver.stat differences"
+        set y = $<
+        sdiff $f1s $f2s
+        echo "<return> to view ocean.output differences"
+        set y = $<
+        sdiff $f1o $f2o | grep "|"
+        echo "<return> to continue"
+        set y = $<
+      endif
+    endif
+  endif
+
+
   if ( -d ./WSAS_32 ) then
     set dorv = `ls -1rtd ./WSAS_32/{$mach}/* | tail -1l `
