Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg	(revision 7198)
@@ -9,5 +9,5 @@
 &namtrc     !   tracers definition
 !-----------------------------------------------------------------------
-   jptra        =  6
+   jp_bgc        =  6
 !
    ln_pisces     =  .true.
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/EXP00/namelist_top_cfg
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/EXP00/namelist_top_cfg	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM3_TRC/EXP00/namelist_top_cfg	(revision 7198)
@@ -16,5 +16,5 @@
 &namtrc          !   tracers definition
 !-----------------------------------------------------------------------
-   jptra         =  0           !  Number of passive tracers of the BGC model
+   jp_bgc        =  0           !  Number of passive tracers of the BGC model
 !
    ln_pisces     =  .false.     !  Run PISCES BGC model
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_top_cfg
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_top_cfg	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_top_cfg	(revision 7198)
@@ -10,5 +10,5 @@
 &namtrc     !   tracers definition
 !-----------------------------------------------------------------------
-   jptra        =  24
+   jp_bgc        =  24
 !
    ln_pisces     =  .true.
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_top_cfg	(revision 7198)
@@ -10,5 +10,5 @@
 &namtrc     !   tracers definition
 !-----------------------------------------------------------------------
-   jptra        =  24
+   jp_bgc        =  24
 !
    ln_pisces     =  .true.
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/SHARED/namelist_top_ref
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/SHARED/namelist_top_ref	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/SHARED/namelist_top_ref	(revision 7198)
@@ -26,5 +26,5 @@
 &namtrc          !   tracers definition
 !-----------------------------------------------------------------------
-   jptra         =  0           !  Number of passive tracers of the BGC model
+   jp_bgc        =  0           !  Number of passive tracers of the BGC model
 !
    ln_pisces     =  .false.     !  Run PISCES BGC model 
@@ -38,4 +38,7 @@
    ln_trcdmp     =  .false.  !  add a damping termn (T) or not (F)
    ln_trcdmp_clo =  .false.  !  damping term (T) or not (F) on closed seas
+!
+   jp_dia3d      = 0         ! Number of 3D diagnostic variables
+   jp_dia2d      = 0         ! Number of 2D diagnostic variables
 !                !           !                                         !            !                               !
 !                !    name   !           title of the field            !   units    ! initial data from file or not ! 
@@ -136,4 +139,6 @@
    cn_dir_cbc    =  './'     !  root directory for the location of COASTAL data files
    cn_dir_obc    =  './'     !  root directory for the location of OPEN data files
+   ln_rnf_ctl    = .false.   !  Remove runoff dilution on tracers with absent river load
+   rn_bc_time    =  86400.   !  Time scaling factor for SBC and CBC data (seconds in a day)
 /
 !----------------------------------------------------------------------
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90	(revision 7198)
@@ -15,5 +15,5 @@
    USE trd_oce
    USE trdtrc
-   USE trcbc, only : trc_bc_read
+   USE trcbc, only : trc_bc
 
    IMPLICIT NONE
@@ -54,5 +54,5 @@
       IF( l_trdtrc )  CALL wrk_alloc( jpi, jpj, jpk, ztrmyt )
 
-      CALL trc_bc_read  ( kt )       ! tracers: surface and lateral Boundary Conditions
+      CALL trc_bc ( kt )       ! tracers: surface and lateral Boundary Conditions
 
       ! add here the call to BGC model
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90	(revision 7198)
@@ -64,4 +64,5 @@
    USE sbc_oce , ONLY :   fmmflx     =>    fmmflx     !: freshwater budget: volume flux               [Kg/m2/s]
    USE sbc_oce , ONLY :   rnf        =>    rnf        !: river runoff   [Kg/m2/s]
+   USE sbc_oce , ONLY :   rnf_b      =>    rnf_b      !: river runoff at previus step   [Kg/m2/s]
    USE sbc_oce , ONLY :   ln_dm2dc   =>    ln_dm2dc   !: Diurnal Cycle 
    USE sbc_oce , ONLY :   ln_cpl     =>    ln_cpl     !: ocean-atmosphere coupled formulation
@@ -78,4 +79,5 @@
    USE sbcrnf  , ONLY :   h_rnf      =>    h_rnf      !: river runoff   [Kg/m2/s]
    USE sbcrnf  , ONLY :   nk_rnf     =>    nk_rnf     !: depth of runoff in model level
+   USE sbcrnf  , ONLY :   rn_rfact   =>    rn_rfact   !: multiplicative factor for runoff
 
    USE trc_oce
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/par_trc.F90
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/par_trc.F90	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/par_trc.F90	(revision 7198)
@@ -21,8 +21,12 @@
    INTEGER, PUBLIC,  PARAMETER :: jpmaxtrc = 100  ! Maximum number of tracers
 
-   INTEGER, PUBLIC             :: jptra           ! Total number of tracers
+   INTEGER, PUBLIC             :: jptra           !: Total number of passive tracers
    INTEGER, PUBLIC             :: jp_pisces       !: number of passive tracers in PISCES model
    INTEGER, PUBLIC             :: jp_cfc          !: number of CFC passive tracers 
    INTEGER, PUBLIC             :: jp_my_trc       !: number of passive tracers in MY_TRC model
+   INTEGER, PUBLIC             :: jp_bgc          !: number of passive tracers for the BGC model
+
+   INTEGER, PUBLIC             :: jp_dia3d        !: number of 3D diagnostic variables
+   INTEGER, PUBLIC             :: jp_dia2d        !: number of 2D diagnostic variables
 
    LOGICAL, PUBLIC             :: ln_pisces       !: PISCES flag 
@@ -34,7 +38,4 @@
    LOGICAL, PUBLIC             :: ln_my_trc       !: MY_TRC flag 
 
-
-   INTEGER, PUBLIC             :: jp_bgc          !: number of passive tracers for the BGC model
-
    REAL(wp), PUBLIC            :: rtrn  = 0.5 * EPSILON( 1.e0 )    !: truncation value
 
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trc.F90
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trc.F90	(revision 7198)
@@ -72,9 +72,9 @@
    REAL(wp)            , PUBLIC                                    ::  rdttrc         !: passive tracer time step
    REAL(wp)            , PUBLIC                                    ::  r2dttrc        !: = 2*rdttrc except at nit000 (=rdttrc) if neuler=0
-   LOGICAL             , PUBLIC                                    ::  ln_top_euler  !: boolean term for euler integration 
+   LOGICAL             , PUBLIC                                    ::  ln_top_euler   !: boolean term for euler integration 
    LOGICAL             , PUBLIC                                    ::  ln_trcdta      !: Read inputs data from files
    LOGICAL             , PUBLIC                                    ::  ln_trcdmp      !: internal damping flag
    LOGICAL             , PUBLIC                                    ::  ln_trcdmp_clo  !: internal damping flag on closed seas
-   INTEGER             , PUBLIC                                    ::  nittrc000       !: first time step of passive tracers model
+   INTEGER             , PUBLIC                                    ::  nittrc000      !: first time step of passive tracers model
    LOGICAL             , PUBLIC                                    ::  l_trcdm2dc     !: Diurnal cycle for TOP
 
@@ -114,4 +114,7 @@
    END TYPE DIAG
 
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:)         ::  trc3d          !: 3D diagnostics for tracers
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:)         ::  trc2d          !: 2D diagnostics for tracers
+
    !! information for inputs
    !! --------------------------------------------------
@@ -120,4 +123,6 @@
    LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_sbc     !: Use surface boundary condition data
    LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)    ::  ln_trc_cbc     !: Use coastal boundary condition data
+   LOGICAL , PUBLIC                                     ::  ln_rnf_ctl     !: remove runoff dilution on tracers
+   REAL(wp), PUBLIC                                     ::  rn_bc_time     !: Time scaling factor for SBC and CBC data (seconds in a day)
 
 
@@ -192,4 +197,7 @@
       USE lib_mpp, ONLY: ctl_warn
       !!-------------------------------------------------------------------
+      INTEGER :: ierr(3)
+      !!-------------------------------------------------------------------
+      ierr(:) = 0
       !
       ALLOCATE( trn(jpi,jpj,jpk,jptra), trb(jpi,jpj,jpk,jptra), tra(jpi,jpj,jpk,jptra),       &  
@@ -207,6 +215,11 @@
          &      trcdta_bdy(jptra,nb_bdy)                                              ,       &
 #endif
-         &      STAT = trc_alloc  )
-
+         &      STAT = ierr(1)  )
+      !
+      IF (jp_dia3d > 0 ) ALLOCATE( trc3d(jpi,jpj,jpk,jp_dia3d), STAT = ierr(2) )
+      !
+      IF (jp_dia2d > 0 ) ALLOCATE( trc2d(jpi,jpj,jpk,jp_dia2d), STAT = ierr(3) )
+      ! 
+      trc_alloc = MAXVAL( ierr )
       IF( trc_alloc /= 0 )   CALL ctl_warn('trc_alloc: failed to allocate arrays')
       !
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcbc.F90
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcbc.F90	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcbc.F90	(revision 7198)
@@ -4,6 +4,7 @@
    !! TOP :  module for passive tracer boundary conditions
    !!=====================================================================
-   !! History :  3.5 !  2014-04  (M. Vichi, T. Lovato)  Original
-   !!            3.6 !  2015-03  (T . Lovato) Revision and BDY support
+   !! History :  3.5 !  2014 (M. Vichi, T. Lovato)  Original
+   !!            3.6 !  2015 (T . Lovato) Revision and BDY support
+   !!            4.0 !  2016 (T . Lovato) Include application of sbc and cbc
    !!----------------------------------------------------------------------
 #if defined key_top
@@ -11,5 +12,5 @@
    !!   'key_top'                                                TOP model 
    !!----------------------------------------------------------------------
-   !!   trc_bc       : read and time interpolated tracer Boundary Conditions
+   !!   trc_bc       :  Apply tracer Boundary Conditions
    !!----------------------------------------------------------------------
    USE par_trc       !  passive tracers parameters
@@ -26,6 +27,6 @@
    PRIVATE
 
-   PUBLIC   trc_bc_init    ! called in trcini.F90 
-   PUBLIC   trc_bc_read    ! called in trcstp.F90 or within
+   PUBLIC   trc_bc         ! called in trcstp.F90 or within TOP modules
+   PUBLIC   trc_bc_ini     ! called in trcini.F90 
 
    INTEGER  , SAVE, PUBLIC                             :: nb_trcobc    ! number of tracers with open BC
@@ -43,6 +44,8 @@
    TYPE(MAP_POINTER), ALLOCATABLE, DIMENSION(:) :: nbmap_ptr   ! array of pointers to nbmap
 
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.6 , NEMO Consortium (2015)
+   !! * Substitutions
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 4.0 , NEMO Consortium (2016)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -50,7 +53,7 @@
 CONTAINS
 
-   SUBROUTINE trc_bc_init( ntrc )
+   SUBROUTINE trc_bc_ini( ntrc )
       !!----------------------------------------------------------------------
-      !!                   ***  ROUTINE trc_bc_init  ***
+      !!                   ***  ROUTINE trc_bc_ini  ***
       !!                    
       !! ** Purpose :   initialisation of passive tracer BC data 
@@ -77,14 +80,15 @@
       REAL(wp)   , DIMENSION(jpmaxtrc) :: rn_trcfac    ! multiplicative factor for tracer values
       !!
-      NAMELIST/namtrc_bc/ cn_dir_sbc, cn_dir_cbc, cn_dir_obc, sn_trcobc, rn_trofac, sn_trcsbc, rn_trsfac, sn_trccbc, rn_trcfac
+      NAMELIST/namtrc_bc/ cn_dir_obc, sn_trcobc, rn_trofac, cn_dir_sbc, sn_trcsbc, rn_trsfac, & 
+                        & cn_dir_cbc, sn_trccbc, rn_trcfac, ln_rnf_ctl, rn_bc_time
 #if defined key_bdy
       NAMELIST/namtrc_bdy/ cn_trc_dflt, cn_trc, nn_trcdmp_bdy
 #endif
       !!----------------------------------------------------------------------
-      IF( nn_timing == 1 )  CALL timing_start('trc_bc_init')
+      IF( nn_timing == 1 )  CALL timing_start('trc_bc_ini')
       !
       IF( lwp ) THEN
          WRITE(numout,*) ' '
-         WRITE(numout,*) 'trc_bc_init : Tracers Boundary Conditions (BC)'
+         WRITE(numout,*) 'trc_bc_ini : Tracers Boundary Conditions (BC)'
          WRITE(numout,*) '~~~~~~~~~~~ '
       ENDIF
@@ -93,5 +97,5 @@
       ALLOCATE( slf_i(ntrc), STAT=ierr0 )
       IF( ierr0 > 0 ) THEN
-         CALL ctl_stop( 'trc_bc_init: unable to allocate local slf_i' )   ;   RETURN
+         CALL ctl_stop( 'trc_bc_ini: unable to allocate local slf_i' )   ;   RETURN
       ENDIF
 
@@ -99,5 +103,5 @@
       ALLOCATE( n_trc_indobc(ntrc), STAT=ierr0 )
       IF( ierr0 > 0 ) THEN
-         CALL ctl_stop( 'trc_bc_init: unable to allocate n_trc_indobc' )   ;   RETURN
+         CALL ctl_stop( 'trc_bc_ini: unable to allocate n_trc_indobc' )   ;   RETURN
       ENDIF
       nb_trcobc      = 0
@@ -106,5 +110,5 @@
       ALLOCATE( n_trc_indsbc(ntrc), STAT=ierr0 )
       IF( ierr0 > 0 ) THEN
-         CALL ctl_stop( 'trc_bc_init: unable to allocate n_trc_indsbc' )   ;   RETURN
+         CALL ctl_stop( 'trc_bc_ini: unable to allocate n_trc_indsbc' )   ;   RETURN
       ENDIF
       nb_trcsbc      = 0
@@ -113,5 +117,5 @@
       ALLOCATE( n_trc_indcbc(ntrc), STAT=ierr0 )
       IF( ierr0 > 0 ) THEN
-         CALL ctl_stop( 'trc_bc_init: unable to allocate n_trc_indcbc' )   ;   RETURN
+         CALL ctl_stop( 'trc_bc_ini: unable to allocate n_trc_indcbc' )   ;   RETURN
       ENDIF
       nb_trccbc      = 0
@@ -140,5 +144,5 @@
       DO jn = 1, ntrc
          DO ib = 1, nb_bdy
-            ! Set type of obc in BDY data structure (around here we may plug user override of obc type from nml)
+            ! Set type of obc in BDY data structure (TL: around here we may plug user override of obc type from nml)
             IF ( ln_trc_obc(jn) ) THEN
                trcdta_bdy(jn,ib)%cn_obc = TRIM( cn_trc(ib) )
@@ -195,5 +199,6 @@
          ENDIF
          WRITE(numout,'(2a)') '   COASTAL BC data repository : ', TRIM(cn_dir_cbc)
-
+         IF ( .NOT. ln_rnf ) ln_rnf_ctl = .FALSE.
+         IF ( ln_rnf_ctl )  WRITE(numout,'(a)') ' -> Remove runoff dilution effect on tracers with absent river load (ln_rnf_ctl = .TRUE.)' 
          WRITE(numout,*) ' '
          WRITE(numout,'(a,i3)') '   Total tracers to be initialized with OPEN BCs data:', nb_trcobc
@@ -230,5 +235,5 @@
          ALLOCATE ( sf_trcobc(nb_trcobc), rf_trofac(nb_trcobc), nbmap_ptr(nb_trcobc), STAT=ierr1 )
          IF( ierr1 > 0 ) THEN
-            CALL ctl_stop( 'trc_bc_init: unable to allocate sf_trcobc structure' )   ;   RETURN
+            CALL ctl_stop( 'trc_bc_ini: unable to allocate sf_trcobc structure' )   ;   RETURN
          ENDIF
 
@@ -248,5 +253,5 @@
                   IF( sn_trcobc(jn)%ln_tint )  ALLOCATE( sf_trcobc(jl)%fdta(nblen,1,jpk,2) , STAT=ierr3 )
                   IF( ierr2 + ierr3 > 0 ) THEN
-                    CALL ctl_stop( 'trc_bc_init : unable to allocate passive tracer OBC data arrays' )   ;   RETURN
+                    CALL ctl_stop( 'trc_bc_ini : unable to allocate passive tracer OBC data arrays' )   ;   RETURN
                   ENDIF
                   trcdta_bdy(jn,ib)%trc => sf_trcobc(jl)%fnow(:,1,:)
@@ -270,5 +275,5 @@
          ENDDO
 
-         CALL fld_fill( sf_trcobc, slf_i, cn_dir_obc, 'trc_bc_init', 'Passive tracer OBC data', 'namtrc_bc' )
+         CALL fld_fill( sf_trcobc, slf_i, cn_dir_obc, 'trc_bc_ini', 'Passive tracer OBC data', 'namtrc_bc' )
       ENDIF
 #endif
@@ -277,5 +282,5 @@
          ALLOCATE( sf_trcsbc(nb_trcsbc), rf_trsfac(nb_trcsbc), STAT=ierr1 )
          IF( ierr1 > 0 ) THEN
-            CALL ctl_stop( 'trc_bc_init: unable to allocate  sf_trcsbc structure' )   ;   RETURN
+            CALL ctl_stop( 'trc_bc_ini: unable to allocate  sf_trcsbc structure' )   ;   RETURN
          ENDIF
          !
@@ -288,5 +293,5 @@
                IF( sn_trcsbc(jn)%ln_tint )  ALLOCATE( sf_trcsbc(jl)%fdta(jpi,jpj,1,2) , STAT=ierr3 )
                IF( ierr2 + ierr3 > 0 ) THEN
-                 CALL ctl_stop( 'trc_bc_init : unable to allocate passive tracer SBC data arrays' )   ;   RETURN
+                 CALL ctl_stop( 'trc_bc_ini : unable to allocate passive tracer SBC data arrays' )   ;   RETURN
                ENDIF
             ENDIF
@@ -294,5 +299,5 @@
          ENDDO
          !                         ! fill sf_trcsbc with slf_i and control print
-         CALL fld_fill( sf_trcsbc, slf_i, cn_dir_sbc, 'trc_bc_init', 'Passive tracer SBC data', 'namtrc_bc' )
+         CALL fld_fill( sf_trcsbc, slf_i, cn_dir_sbc, 'trc_bc_ini', 'Passive tracer SBC data', 'namtrc_bc' )
          !
       ENDIF
@@ -319,21 +324,22 @@
          ENDDO
          !                         ! fill sf_trccbc with slf_i and control print
-         CALL fld_fill( sf_trccbc, slf_i, cn_dir_cbc, 'trc_bc_init', 'Passive tracer CBC data', 'namtrc_bc' )
+         CALL fld_fill( sf_trccbc, slf_i, cn_dir_cbc, 'trc_bc_ini', 'Passive tracer CBC data', 'namtrc_bc' )
          !
       ENDIF
       !
       DEALLOCATE( slf_i )          ! deallocate local field structure
-      IF( nn_timing == 1 )  CALL timing_stop('trc_bc_init')
-      !
-   END SUBROUTINE trc_bc_init
-
-
-   SUBROUTINE trc_bc_read(kt, jit)
+      IF( nn_timing == 1 )  CALL timing_stop('trc_bc_ini')
+      !
+   END SUBROUTINE trc_bc_ini
+
+
+   SUBROUTINE trc_bc(kt, jit)
       !!----------------------------------------------------------------------
-      !!                   ***  ROUTINE trc_bc_init  ***
+      !!                   ***  ROUTINE trc_bc  ***
       !!
-      !! ** Purpose :  Read passive tracer Boundary Conditions data
+      !! ** Purpose :  Apply Boundary Conditions data to tracers
       !!
-      !! ** Method  :  Read BC inputs and update data structures using fldread
+      !! ** Method  :  1) Read BC inputs and update data structures using fldread
+      !!               2) Apply Boundary Conditions to tracers
       !!              
       !!----------------------------------------------------------------------
@@ -341,16 +347,20 @@
       
       !! * Arguments
-      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
+      INTEGER, INTENT( in ) ::   kt              ! ocean time-step index
       INTEGER, INTENT( in ), OPTIONAL ::   jit   ! subcycle time-step index (for timesplitting option)
+      !!
+      INTEGER  :: ji, jj, jk, jn, jl             ! Loop index
+      REAL(wp) :: zfact, zrnf
       !!---------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_bc_read')
+      IF( nn_timing == 1 )  CALL timing_start('trc_bc')
 
       IF( kt == nit000 .AND. lwp) THEN
          WRITE(numout,*)
-         WRITE(numout,*) 'trc_bc_read : Surface boundary conditions for passive tracers.'
+         WRITE(numout,*) 'trc_bc : Surface boundary conditions for passive tracers.'
          WRITE(numout,*) '~~~~~~~~~~~ '
       ENDIF
 
+      ! 1. Update Boundary conditions data
       IF ( PRESENT(jit) ) THEN 
 
@@ -395,8 +405,52 @@
       ENDIF
 
-      !
-      IF( nn_timing == 1 )  CALL timing_stop('trc_bc_read')
-      !
-   END SUBROUTINE trc_bc_read
+      ! 2. Apply Boundary conditions data
+      ! 
+      DO jn = 1 , jptra
+         !
+         ! Remove river dilution for tracers with absent river load
+         IF ( ln_rnf_ctl .AND. .NOT. ln_trc_cbc(jn) ) THEN
+            DO jj = 2, jpj
+               DO ji = fs_2, fs_jpim1
+                  DO jk = 1, nk_rnf(ji,jj)
+                     zrnf = (rnf(ji,jj) + rnf_b(ji,jj)) * 0.5_wp * r1_rau0 / h_rnf(ji,jj)
+                     tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn)  + (trn(ji,jj,jk,jn) * zrnf)
+                  ENDDO
+               ENDDO
+            ENDDO
+         ENDIF
+          
+         ! OPEN boundary conditions: trcbdy is called in trcnxt !
+
+         ! SURFACE boundary conditions
+         IF (ln_trc_sbc(jn)) THEN
+            jl = n_trc_indsbc(jn)
+            DO jj = 2, jpj
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  zfact = 1. / ( e3t_n(ji,jj,1) * rn_bc_time )
+                  tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + rf_trsfac(jl) * sf_trcsbc(jl)%fnow(ji,jj,1) * zfact
+               END DO
+            END DO
+         END IF
+
+         ! COASTAL boundary conditions
+         IF ( ln_rnf .AND. ln_trc_cbc(jn)) THEN
+            jl = n_trc_indcbc(jn)
+            DO jj = 2, jpj
+               DO ji = fs_2, fs_jpim1   ! vector opt.
+                  DO jk = 1, nk_rnf(ji,jj)
+                     zfact = rn_rfact / ( e1e2t(ji,jj) * h_rnf(ji,jj) * rn_bc_time ) 
+                     tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + rf_trcfac(jl) * sf_trccbc(jl)%fnow(ji,jj,1) * zfact
+                  ENDDO
+               END DO
+            END DO
+         END IF
+         !                                                       ! ===========
+      END DO                                                     ! tracer loop
+      !                                                          ! ===========
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('trc_bc')
+      !
+   END SUBROUTINE trc_bc
 
 #else
@@ -406,12 +460,12 @@
 CONTAINS
 
-   SUBROUTINE trc_bc_init( ntrc )        ! Empty routine
+   SUBROUTINE trc_bc_ini( ntrc )        ! Empty routine
       INTEGER,INTENT(IN) :: ntrc                           ! number of tracers
-      WRITE(*,*) 'trc_bc_init: You should not have seen this print! error?', kt
-   END SUBROUTINE trc_bc_init
-
-   SUBROUTINE trc_bc_read( kt )        ! Empty routine
-      WRITE(*,*) 'trc_bc_read: You should not have seen this print! error?', kt
-   END SUBROUTINE trc_bc_read
+      WRITE(*,*) 'trc_bc_ini: You should not have seen this print! error?', kt
+   END SUBROUTINE trc_bc_ini
+
+   SUBROUTINE trc_bc( kt )        ! Empty routine
+      WRITE(*,*) 'trc_bc: You should not have seen this print! error?', kt
+   END SUBROUTINE trc_bc
 #endif
 
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 7198)
@@ -9,5 +9,5 @@
    !!            3.4   !  2010-11  (C. Ethe, G. Madec)  use of fldread + dynamical allocation 
    !!            3.5   !  2013-08  (M. Vichi)  generalization for other BGC models
-   !!            3.6   !  2015-03  (T. Lovato) revision of code log info
+   !!            3.6   !  2015-03  (T. Lovato) revisit code I/O
    !!----------------------------------------------------------------------
 #if defined key_top 
@@ -28,5 +28,5 @@
 
    PUBLIC   trc_dta         ! called in trcini.F90 and trcdmp.F90
-   PUBLIC   trc_dta_init    ! called in trcini.F90 
+   PUBLIC   trc_dta_ini     ! called in trcini.F90 
 
    INTEGER  , SAVE, PUBLIC                             :: nb_trcdta   ! number of tracers to be initialised with data
@@ -45,7 +45,7 @@
 CONTAINS
 
-   SUBROUTINE trc_dta_init(ntrc)
-      !!----------------------------------------------------------------------
-      !!                   ***  ROUTINE trc_dta_init  ***
+   SUBROUTINE trc_dta_ini(ntrc)
+      !!----------------------------------------------------------------------
+      !!                   ***  ROUTINE trc_dta_ini  ***
       !!                    
       !! ** Purpose :   initialisation of passive tracer input data 
@@ -70,9 +70,9 @@
       !!----------------------------------------------------------------------
       !
-      IF( nn_timing == 1 )  CALL timing_start('trc_dta_init')
+      IF( nn_timing == 1 )  CALL timing_start('trc_dta_ini')
       !
       IF( lwp ) THEN
          WRITE(numout,*) ' '
-         WRITE(numout,*) '  trc_dta_init : Tracers Initial Conditions (IC)'
+         WRITE(numout,*) '  trc_dta_ini : Tracers Initial Conditions (IC)'
          WRITE(numout,*) '  ~~~~~~~~~~~ '
       ENDIF
@@ -83,5 +83,5 @@
       ALLOCATE( n_trc_index(ntrc), slf_i(ntrc), STAT=ierr0 )
       IF( ierr0 > 0 ) THEN
-         CALL ctl_stop( 'trc_dta_init: unable to allocate n_trc_index' )   ;   RETURN
+         CALL ctl_stop( 'trc_dta_ini: unable to allocate n_trc_index' )   ;   RETURN
       ENDIF
       nb_trcdta      = 0
@@ -103,9 +103,9 @@
       REWIND( numnat_ref )              ! Namelist namtrc_dta in reference namelist : Passive tracer input data
       READ  ( numnat_ref, namtrc_dta, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta_init in reference namelist', lwp )
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta_ini in reference namelist', lwp )
 
       REWIND( numnat_cfg )              ! Namelist namtrc_dta in configuration namelist : Passive tracer input data
       READ  ( numnat_cfg, namtrc_dta, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta_init in configuration namelist', lwp )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta_ini in configuration namelist', lwp )
       IF(lwm) WRITE ( numont, namtrc_dta )
 
@@ -118,5 +118,5 @@
                zfact  = rn_trfac(jn)
                IF( clndta /=  clntrc ) THEN 
-                  CALL ctl_warn( 'trc_dta_init: passive tracer data initialisation    ',   &
+                  CALL ctl_warn( 'trc_dta_ini: passive tracer data initialisation    ',   &
                   &              'Input name of data file : '//TRIM(clndta)//   &
                   &              ' differs from that of tracer : '//TRIM(clntrc)//' ')
@@ -132,5 +132,5 @@
          ALLOCATE( sf_trcdta(nb_trcdta), rf_trfac(nb_trcdta), STAT=ierr1 )
          IF( ierr1 > 0 ) THEN
-            CALL ctl_stop( 'trc_dta_init: unable to allocate  sf_trcdta structure' )   ;   RETURN
+            CALL ctl_stop( 'trc_dta_ini: unable to allocate  sf_trcdta structure' )   ;   RETURN
          ENDIF
          !
@@ -143,5 +143,5 @@
                IF( sn_trcdta(jn)%ln_tint )  ALLOCATE( sf_trcdta(jl)%fdta(jpi,jpj,jpk,2) , STAT=ierr3 )
                IF( ierr2 + ierr3 > 0 ) THEN
-                 CALL ctl_stop( 'trc_dta_init : unable to allocate passive tracer data arrays' )   ;   RETURN
+                 CALL ctl_stop( 'trc_dta_ini : unable to allocate passive tracer data arrays' )   ;   RETURN
                ENDIF
             ENDIF
@@ -149,15 +149,15 @@
          ENDDO
          !                         ! fill sf_trcdta with slf_i and control print
-         CALL fld_fill( sf_trcdta, slf_i, cn_dir, 'trc_dta_init', 'Passive tracer data', 'namtrc' )
+         CALL fld_fill( sf_trcdta, slf_i, cn_dir, 'trc_dta_ini', 'Passive tracer data', 'namtrc' )
          !
       ENDIF
       !
       DEALLOCATE( slf_i )          ! deallocate local field structure
-      IF( nn_timing == 1 )  CALL timing_stop('trc_dta_init')
-      !
-   END SUBROUTINE trc_dta_init
-
-
-   SUBROUTINE trc_dta( kt, sf_trcdta, ptrfac, ptrc)
+      IF( nn_timing == 1 )  CALL timing_stop('trc_dta_ini')
+      !
+   END SUBROUTINE trc_dta_ini
+
+
+   SUBROUTINE trc_dta( kt, sf_trcdta, ztrcfac, ztrcdta)
       !!----------------------------------------------------------------------
       !!                   ***  ROUTINE trc_dta  ***
@@ -169,15 +169,14 @@
       !!              - ln_trcdmp=F: deallocates the data structure as they are not used
       !!
-      !! ** Action  :   sf_trcdta   passive tracer data on medl mesh and interpolated at time-step kt
-      !!----------------------------------------------------------------------
-      INTEGER                     , INTENT(in   ) ::   kt     ! ocean time-step
-      TYPE(FLD), DIMENSION(1)     , INTENT(inout) ::   sf_trcdta     ! array of information on the field to read
-      REAL(wp)                    , INTENT(in   ) ::   ptrfac  ! multiplication factor
-      REAL(wp), DIMENSION(jpi,jpj,jpk), OPTIONAL  , INTENT(out  ) ::   ptrc
+      !! ** Action  :   sf_trcdta   passive tracer data on meld mesh and interpolated at time-step kt
+      !!----------------------------------------------------------------------
+      INTEGER                          , INTENT(in   )   ::   kt         ! ocean time-step
+      TYPE(FLD), DIMENSION(1)          , INTENT(inout)   ::   sf_trcdta  ! array of information on the field to read
+      REAL(wp)                         , INTENT(in   )   ::   ztrcfac    ! multiplication factor
+      REAL(wp),  DIMENSION(jpi,jpj,jpk), INTENT(inout  ) ::   ztrcdta    ! 3D data array
       !
       INTEGER ::   ji, jj, jk, jl, jkk, ik    ! dummy loop indices
       REAL(wp)::   zl, zi
       REAL(wp), DIMENSION(jpk) ::  ztp                ! 1D workspace
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrcdta   ! 3D  workspace
       CHARACTER(len=100) :: clndta
       !!----------------------------------------------------------------------
@@ -187,10 +186,9 @@
       IF( nb_trcdta > 0 ) THEN
          !
-         CALL wrk_alloc( jpi, jpj, jpk, ztrcdta )    ! Memory allocation
-         !
-         CALL fld_read( kt, 1, sf_trcdta )      !==   read data at kt time step   ==!
-         ztrcdta(:,:,:) = sf_trcdta(1)%fnow(:,:,:) * tmask(:,:,:)    ! Mask
-         !
-         IF( ln_sco ) THEN                   !==   s- or mixed s-zps-coordinate   ==!
+         ! read data at kt time step
+         CALL fld_read( kt, 1, sf_trcdta )
+         ztrcdta(:,:,:) = sf_trcdta(1)%fnow(:,:,:) * tmask(:,:,:)
+         ! 
+         IF( ln_sco ) THEN                !== s- or mixed s-zps-coordinate  ==!
             !
             IF( kt == nit000 .AND. lwp )THEN
@@ -205,11 +203,10 @@
                         ztp(jk) = ztrcdta(ji,jj,1)
                      ELSEIF( zl > gdept_1d(jpk) ) THEN         ! below the last level of data
-                        ztp(jk) =  ztrcdta(ji,jj,jpkm1)
+                        ztp(jk) = ztrcdta(ji,jj,jpkm1)
                      ELSE                                      ! inbetween : vertical interpolation between jkk & jkk+1
                         DO jkk = 1, jpkm1                                  ! when  gdept(jkk) < zl < gdept(jkk+1)
                            IF( (zl-gdept_1d(jkk)) * (zl-gdept_1d(jkk+1)) <= 0._wp ) THEN
                               zi = ( zl - gdept_1d(jkk) ) / (gdept_1d(jkk+1)-gdept_1d(jkk))
-                              ztp(jk) = ztrcdta(ji,jj,jkk) + ( ztrcdta(ji,jj,jkk+1) - &
-                                        ztrcdta(ji,jj,jkk) ) * zi 
+                              ztp(jk) = ztrcdta(ji,jj,jkk) + ( ztrcdta(ji,jj,jkk+1) - ztrcdta(ji,jj,jkk) ) * zi
                            ENDIF
                         END DO
@@ -217,5 +214,5 @@
                   END DO
                   DO jk = 1, jpkm1
-                    ztrcdta(ji,jj,jk) = ztp(jk) * tmask(ji,jj,jk)     ! mask required for mixed zps-s-coord
+                     ztrcdta(ji,jj,jk) = ztp(jk) * tmask(ji,jj,jk)     ! mask required for mixed zps-s-coord
                   END DO
                   ztrcdta(ji,jj,jpk) = 0._wp
@@ -224,6 +221,6 @@
             ! 
          ELSE                                !==   z- or zps- coordinate   ==!
-            !
-            IF( ln_zps ) THEN                      ! zps-coordinate (partial steps) interpolation at the last ocean level
+            ! zps-coordinate (partial steps) interpolation at the last ocean level
+            IF( ln_zps ) THEN
                DO jj = 1, jpj
                   DO ji = 1, jpi
@@ -244,14 +241,6 @@
          ENDIF
          !
-         ! Add multiplicative factor
-         ztrcdta(:,:,:) = ztrcdta(:,:,:) * ptrfac
-         !
-         ! Data structure for trc_ini (and BFMv5.1 coupling)
-         IF( .NOT. PRESENT(ptrc) ) sf_trcdta(1)%fnow(:,:,:) = ztrcdta(:,:,:)
-         !
-         ! Data structure for trc_dmp
-         IF( PRESENT(ptrc) )  ptrc(:,:,:) = ztrcdta(:,:,:)
-         !
-         CALL wrk_dealloc( jpi, jpj, jpk, ztrcdta )
+         ! Scale by multiplicative factor
+         ztrcdta(:,:,:) = ztrcdta(:,:,:) * ztrcfac
          !
       ENDIF
@@ -266,5 +255,5 @@
    !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE trc_dta( kt, sf_trcdta, ptrfac, ptrc)        ! Empty routine
+   SUBROUTINE trc_dta( kt, sf_trcdta, ztrcfac, ztrcdta)        ! Empty routine
       WRITE(*,*) 'trc_dta: You should not have seen this print! error?', kt
    END SUBROUTINE trc_dta
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 7198)
@@ -25,5 +25,5 @@
    USE lib_mpp         ! distribued memory computing library
    USE trcice          ! tracers in sea ice
-   USE trcbc,   only : trc_bc_init ! generalized Boundary Conditions
+   USE trcbc,   only : trc_bc_ini ! generalized Boundary Conditions
  
    IMPLICIT NONE
@@ -224,8 +224,8 @@
       !
       ! Initialisation of tracers Initial Conditions
-      IF( ln_trcdta )      CALL trc_dta_init(jptra)
+      IF( ln_trcdta )      CALL trc_dta_ini(jptra)
 
       ! Initialisation of tracers Boundary Conditions
-      IF( ln_my_trc )     CALL trc_bc_init(jptra)
+      IF( ln_my_trc )     CALL trc_bc_ini(jptra)
 
       IF( ln_rsttr ) THEN
@@ -234,17 +234,16 @@
         !
       ELSE
-        !
-        IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN  ! Initialisation of tracer from a file that may also be used for damping
-            !
+        ! Initialisation of tracer from a file that may also be used for damping
+        IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN
+            ! update passive tracers arrays with input data read from file
             DO jn = 1, jptra
-               IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file
+               IF( ln_trc_ini(jn) ) THEN
                   jl = n_trc_index(jn) 
-                  CALL trc_dta( nit000, sf_trcdta(jl), rf_trfac(jl) )   ! read tracer data at nit000
-                  trn(:,:,:,jn) = sf_trcdta(jl)%fnow(:,:,:) 
+                  CALL trc_dta( nit000, sf_trcdta(jl), rf_trfac(jl), trn(:,:,:,jn) )
                   !
-                  IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN      !== deallocate data structure   ==!
-                     !                                                    (data used only for initialisation)
+                  ! deallocate data structure if data are not used for damping
+                  IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN
                      IF(lwp) WRITE(numout,*) 'trc_dta: deallocate data arrays as they are only used to initialize the run'
-                                                  DEALLOCATE( sf_trcdta(jl)%fnow )     !  arrays in the structure
+                                                  DEALLOCATE( sf_trcdta(jl)%fnow )
                      IF( sf_trcdta(jl)%ln_tint )  DEALLOCATE( sf_trcdta(jl)%fdta )
                      !
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 7198)
@@ -145,6 +145,6 @@
       INTEGER  ::   ios, ierr, icfc       ! Local integer output status for namelist read
       !!
-      NAMELIST/namtrc/jptra, ln_pisces, ln_my_trc, ln_age, ln_cfc11, ln_cfc12, ln_c14, &
-         &            sn_tracer, ln_trcdta, ln_trcdmp, ln_trcdmp_clo
+      NAMELIST/namtrc/jp_bgc, ln_pisces, ln_my_trc, ln_age, ln_cfc11, ln_cfc12, ln_c14, &
+         &            sn_tracer, ln_trcdta, ln_trcdmp, ln_trcdmp_clo, jp_dia3d, jp_dia2d
       !!---------------------------------------------------------------------
       ! Dummy settings to fill tracers data structure
@@ -167,24 +167,25 @@
       ! Control settings
       IF( ln_pisces .AND. ln_my_trc )   CALL ctl_stop( 'Choose only ONE BGC model - PISCES or MY_TRC' )
-      IF( .NOT. ln_pisces .AND. .NOT. ln_my_trc )   jptra = 0
+      IF( .NOT. ln_pisces .AND. .NOT. ln_my_trc )   jp_bgc = 0
       ll_cfc = ln_cfc11 .OR. ln_cfc12
       !
+      jptra       =  0
       jp_pisces   =  0    ;   jp_pcs0  =  0    ;   jp_pcs1  = 0
       jp_my_trc   =  0    ;   jp_myt0  =  0    ;   jp_myt1  = 0
       jp_cfc      =  0    ;   jp_cfc0  =  0    ;   jp_cfc1  = 0
-      jp_age      =  0    ;   jp_c14   = 0
+      jp_age      =  0    ;   jp_c14   =  0
       !
       IF( ln_pisces )  THEN
-         jp_pisces = jptra
+         jp_pisces = jp_bgc
          jp_pcs0   = 1
          jp_pcs1   = jp_pisces
       ENDIF
       IF( ln_my_trc )  THEN
-          jp_my_trc = jptra
+          jp_my_trc = jp_bgc
           jp_myt0   = 1
           jp_myt1   = jp_my_trc
       ENDIF
       !
-      jp_bgc  =   jptra
+      jptra  = jp_bgc
       !
       IF( ln_age )    THEN
@@ -210,4 +211,5 @@
          WRITE(numout,*) ' Namelist : namtrc'
          WRITE(numout,*) '   Total number of passive tracers              jptra         = ', jptra
+         WRITE(numout,*) '   Total number of BGC tracers                  jp_bgc        = ', jp_bgc
          WRITE(numout,*) '   Simulating PISCES model                      ln_pisces     = ', ln_pisces
          WRITE(numout,*) '   Simulating MY_TRC  model                     ln_my_trc     = ', ln_my_trc
@@ -219,5 +221,4 @@
          WRITE(numout,*) '   Damping of passive tracer (y/n)              ln_trcdmp     = ', ln_trcdmp
          WRITE(numout,*) '   Restoring of tracer on closed seas           ln_trcdmp_clo = ', ln_trcdmp_clo
-         WRITE(numout,*) '   Total number of BGC-like tracers             jp_bgc        = ', jp_bgc
          WRITE(numout,*) ' '
          WRITE(numout,*) ' '
Index: branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/SETTE/sette.sh
===================================================================
--- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/SETTE/sette.sh	(revision 7197)
+++ branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/SETTE/sette.sh	(revision 7198)
@@ -306,5 +306,4 @@
 #   set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_top_cfg ln_trcdta .false.
-    set_namelist namelist_top_cfg ln_diatrc .false.
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
     # if not you need input files, and for tests is not necessary
@@ -341,5 +340,4 @@
     set_namelist namelist_cfg jpnij 8
 #   set_namelist namelist_cfg nn_solv 2
-    set_namelist namelist_top_cfg ln_diatrc .false.
     set_namelist namelist_top_cfg ln_rsttr .true.
     set_namelist namelist_top_cfg nn_rsttr 2
@@ -400,5 +398,4 @@
 #   set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_top_cfg ln_trcdta .false.
-    set_namelist namelist_top_cfg ln_diatrc .false.
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
     # if not you need input files, and for tests is not necessary
@@ -439,5 +436,4 @@
 #   set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_top_cfg ln_trcdta .false.
-    set_namelist namelist_top_cfg ln_diatrc .false.
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
     # if not you need input files, and for tests is not necessary
@@ -486,5 +482,4 @@
     set_namelist namelist_cfg jpnij 8
     set_namelist namelist_top_cfg ln_trcdta .false.
-    set_namelist namelist_top_cfg ln_diatrc .false.
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
     # if not you need input files, and for tests is not necessary
@@ -519,5 +514,4 @@
     set_namelist namelist_cfg jpnj 4
     set_namelist namelist_cfg jpnij 8
-    set_namelist namelist_top_cfg ln_diatrc .false.
     set_namelist namelist_top_cfg ln_rsttr .true.
     set_namelist namelist_top_cfg nn_rsttr 2
@@ -572,5 +566,4 @@
     set_namelist namelist_cfg jpnij 16
     set_namelist namelist_top_cfg ln_trcdta .false.
-    set_namelist namelist_top_cfg ln_diatrc .false.
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
     # if not you need input files, and for tests is not necessary
@@ -610,5 +603,4 @@
     set_namelist namelist_cfg jpnij 16
     set_namelist namelist_top_cfg ln_trcdta .false.
-    set_namelist namelist_top_cfg ln_diatrc .false.
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
     # if not you need input files, and for tests is not necessary
