Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/par_c14b.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/par_c14b.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/par_c14b.F90	(revision 2038)
@@ -40,6 +40,6 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_c14b     = .TRUE.      !: C14 bomb flag 
    INTEGER, PUBLIC, PARAMETER ::   jp_c14b     =  1          !: number of passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_c14b_2d  =  2          !: additional 2d output arrays ('key_trc_diaadd')
-   INTEGER, PUBLIC, PARAMETER ::   jp_c14b_3d  =  1          !: additional 3d output arrays ('key_trc_diaadd')
+   INTEGER, PUBLIC, PARAMETER ::   jp_c14b_2d  =  2          !: additional 2d output arrays ('key_diatrc')
+   INTEGER, PUBLIC, PARAMETER ::   jp_c14b_3d  =  1          !: additional 3d output arrays ('key_diatrc')
    INTEGER, PUBLIC, PARAMETER ::   jp_c14b_trd =  0          !: number of sms trends for C14
    
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcctl_c14b.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcctl_c14b.F90	(revision 2037)
+++ 	(revision )
@@ -1,94 +1,0 @@
-MODULE trcctl_c14b
-   !!======================================================================
-   !!                         ***  trcctl_c14b.F90  ***
-   !! TOP :                Control of C14 chemical model
-   !!======================================================================
-   !!----------------------------------------------------------------------
-   !! History :   1.0  !  2005-10 (C. Ethe) assign a parameter to name individual tracers
-   !!----------------------------------------------------------------------
-
-#if defined key_c14b
-
-   USE oce_trc
-   USE trc
-
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC trc_ctl_c14b      ! called by ???
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Id: trcctl_cfc.F90 1146 2008-06-25 11:42:56Z rblod $ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_ctl_c14b
-      !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE trc_ctl_c14b  ***
-      !!
-      !! ** Purpose :   control the cpp options, namelist and files 
-      !!----------------------------------------------------------------------
-
-      IF(lwp) THEN
-          WRITE(numout,*) ' C14 bomb Model '
-          WRITE(numout,*) ' '
-      ENDIF
-
-      ! Check number of tracers
-      ! -----------------------   
-      IF( jp_c14b > 1) THEN 
-          IF(lwp) THEN 
-              WRITE (numout,*) ' ===>>>> : w a r n i n g '
-              WRITE (numout,*) ' =======   ============= '
-              WRITE (numout,*)                             &
-              &   ' STOP, change jp_c14b to 1 in par_C14b module '  
-          END IF 
-          STOP 'TRC_CTL'
-      END IF 
-
-      ! Check tracer names
-      ! ------------------
-      IF ( ctrcnm(jpc14) /= 'C14B' ) THEN 
-           ctrcnm(jpc14)  = 'C14B'
-           ctrcnl(jpc14)  = 'Bomb C14 concentration'
-      ENDIF
-
-      IF(lwp) THEN
-         WRITE (numout,*) ' ===>>>> : w a r n i n g '
-         WRITE (numout,*) ' =======   ============= '
-         WRITE (numout,*) ' we force tracer names'
-         WRITE(numout,*) ' tracer nb: ',jpc14,' name = ',ctrcnm(jpc14), ctrcnl(jpc14)
-         WRITE(numout,*) ' '
-      ENDIF 
-
-
-      ! Check tracer units
-      ! ------------------
-      IF( ctrcun(jpc14) /= 'ration' ) THEN
-          ctrcun(jpc14) = 'ration'
-          IF(lwp) THEN
-             WRITE (numout,*) ' ===>>>> : w a r n i n g '
-             WRITE (numout,*) ' =======   ============= '
-             WRITE (numout,*) ' we force tracer unit'
-             WRITE(numout,*) ' tracer  ',ctrcnm(jpc14), 'UNIT= ',ctrcun(jpc14)
-             WRITE(numout,*) ' '
-          ENDIF 
-       ENDIF 
-      !
-   END SUBROUTINE trc_ctl_c14b
-
-#else
-   !!----------------------------------------------------------------------
-   !!  Empty module :                                         No Bomb c14
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_ctl_c14b                      ! Dummy routine
-   END SUBROUTINE trc_ctl_c14b
-#endif
-
-   !!======================================================================
-END MODULE trcctl_c14b
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcini_c14b.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcini_c14b.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcini_c14b.F90	(revision 2038)
@@ -59,6 +59,9 @@
       !!----------------------------------------------------------------------
 
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' trc_ini_cfc: initialisation of CFC chemical model'
+      !  Control consitency
+      CALL trc_ctl_c14b
+
+      IF(lwp) WRITE(numout,*) ''
+      IF(lwp) WRITE(numout,*) ' trc_ini_c14b: initialisation of Bomb C14 chemical model'
       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~'
 
@@ -162,4 +165,57 @@
    END SUBROUTINE trc_ini_c14b
    
+   SUBROUTINE trc_ctl_c14b
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ctl_c14b  ***
+      !!
+      !! ** Purpose :   control the cpp options, namelist and files 
+      !!----------------------------------------------------------------------
+
+      IF(lwp) THEN
+          WRITE(numout,*) ' C14 bomb Model '
+          WRITE(numout,*) ' '
+      ENDIF
+
+      ! Check number of tracers
+      ! -----------------------   
+      IF( jp_c14b > 1) THEN
+          IF(lwp) THEN
+              WRITE (numout,*) ' ===>>>> : w a r n i n g '
+              WRITE (numout,*) ' =======   ============= '
+              WRITE (numout,*)                             &
+              &   ' STOP, change jp_c14b to 1 in par_C14b module '
+          END IF
+          STOP 'TRC_CTL'
+      END IF
+
+      ! Check tracer names
+      ! ------------------
+      IF ( ctrcnm(jpc14) /= 'C14B' ) THEN
+           ctrcnm(jpc14)  = 'C14B'
+           ctrcnl(jpc14)  = 'Bomb C14 concentration'
+      ENDIF
+
+      IF(lwp) THEN
+         WRITE (numout,*) ' ===>>>> : w a r n i n g '
+         WRITE (numout,*) ' =======   ============= '
+         WRITE (numout,*) ' we force tracer names'
+         WRITE(numout,*) ' tracer nb: ',jpc14,' name = ',ctrcnm(jpc14), ctrcnl(jpc14)
+         WRITE(numout,*) ' '
+      ENDIF
+
+      ! Check tracer units
+      ! ------------------
+      IF( ctrcun(jpc14) /= 'ration' ) THEN
+          ctrcun(jpc14) = 'ration'
+          IF(lwp) THEN
+             WRITE (numout,*) ' ===>>>> : w a r n i n g '
+             WRITE (numout,*) ' =======   ============= '
+             WRITE (numout,*) ' we force tracer unit'
+             WRITE(numout,*) ' tracer  ',ctrcnm(jpc14), 'UNIT= ',ctrcun(jpc14)
+             WRITE(numout,*) ' '
+          ENDIF
+       ENDIF
+      !
+   END SUBROUTINE trc_ctl_c14b
 #else
    !!----------------------------------------------------------------------
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trclsm_c14b.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trclsm_c14b.F90	(revision 2037)
+++ 	(revision )
@@ -1,157 +1,0 @@
-MODULE trclsm_c14b
-   !!======================================================================
-   !!                         ***  MODULE trclsm_c14b  ***
-   !! TOP :   initialisation of some run parameters for C14 chemical model
-   !!======================================================================
-   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) from trclsm.cfc.h90
-   !!----------------------------------------------------------------------
-#if defined key_c14b
-   !!----------------------------------------------------------------------
-   !!   'key_c14b'                                         C14 bomb tracer
-   !!----------------------------------------------------------------------
-   !! trc_lsm_c14b      : C14 model initialisation
-   !!----------------------------------------------------------------------
-   USE oce_trc         ! Ocean variables
-   USE par_trc         ! TOP parameters
-   USE trc             ! TOP variables
-   USE trcsms_c14b     ! C14b specific variable
-   USE in_out_manager  ! I/O manager
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC   trc_lsm_c14b   ! called by trclsm.F90 module
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
-   !! $Id: trclsm_cfc.F90 1146 2008-06-25 11:42:56Z rblod $ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_lsm_c14b
-      !!-------------------------------------------------------------------
-      !!                  ***  ROUTINE trc_lsm_c14b  ***
-      !!                 
-      !! ** Purpose :   Definition some run parameter for C14 model
-      !!
-      !! ** Method  :   Read the namc14 namelist and check the parameter 
-      !!       values called at the first timestep (nit000)
-      !!
-      !! ** input   :   Namelist namelist_c14b
-      !!----------------------------------------------------------------------
-      INTEGER ::   numnatb
-
-#if defined key_trc_diaadd && ! defined key_iomput
-      ! definition of additional diagnostic as a structure
-      INTEGER ::   jl, jn
-      TYPE DIAG
-         CHARACTER(len = 20)  :: snamedia   !: short name
-         CHARACTER(len = 80 ) :: lnamedia   !: long name
-         CHARACTER(len = 20 ) :: unitdia    !: unit
-      END TYPE DIAG
-
-      TYPE(DIAG) , DIMENSION(jp_c14b_2d) :: c14dia2d
-      TYPE(DIAG) , DIMENSION(jp_c14b_3d) :: c14dia3d
-#endif
-      !!
-      NAMELIST/namc14date/ ndate_beg_b, nyear_res_b
-#if defined key_trc_diaadd && ! defined key_iomput
-      NAMELIST/namc14dia/nwritedia, c14dia2d, c14dia3d     ! additional diagnostics
-#endif
-      !!-------------------------------------------------------------------
-
-      ndate_beg_b = 650101            ! default namelist value
-      nyear_res_b = 1955
-
-      !                             ! Open namelist file
-      CALL ctl_opn( numnatb, 'namelist_c14b', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
-         
-      READ( numnatb , namc14date )     ! read namelist
-
-      IF(lwp) THEN                  ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' trc_lsm: Read namdates, namelist for C14 chemical model'
-         WRITE(numout,*) ' ~~~~~~~'
-         WRITE(numout,*) '    initial calendar date (aammjj) for C14  ndate_beg_b = ', ndate_beg_b
-         WRITE(numout,*) '    restoring time constant (year)          nyear_res_b = ', nyear_res_b
-      ENDIF
-      nyear_beg_b = ndate_beg_b / 10000
-      IF(lwp) WRITE(numout,*) '    initial year (aa)                  nyear_beg_b = ', nyear_beg_b
-      !
-#if defined key_trc_diaadd && ! defined key_iomput
-
-      ! Namelist namc14dia
-      ! -------------------
-      nwritedia = 10                   ! default values
-
-      DO jl = 1, jp_c14b_2d
-         jn = jp_c14b0_2d + jl - 1
-         WRITE(ctrc2d(jn),'("2D_",I1)') jn                      ! short name
-         WRITE(ctrc2l(jn),'("2D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
-         ctrc2u(jn) = ' '                                       ! units
-      END DO
-      !                                 ! 3D output arrays
-      DO jl = 1, jp_c14b_3d
-         jn = jp_c14b0_3d + jl - 1
-         WRITE(ctrc3d(jn),'("3D_",I1)') jn                      ! short name
-         WRITE(ctrc3l(jn),'("3D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
-         ctrc3u(jn) = ' '                                       ! units
-      END DO
-
-      REWIND( numnatb )               ! read natrtd
-      READ  ( numnatb, namc14dia )
-
-      DO jl = 1, jp_c14b_2d
-         jn = jp_c14b0_2d + jl - 1
-         ctrc2d(jn) = c14dia2d(jl)%snamedia
-         ctrc2l(jn) = c14dia2d(jl)%lnamedia
-         ctrc2u(jn) = c14dia2d(jl)%unitdia
-      END DO
-
-      DO jl = 1, jp_c14b_3d
-         jn = jp_c14b0_3d + jl - 1
-         ctrc3d(jn) = c14dia3d(jl)%snamedia
-         ctrc3l(jn) = c14dia3d(jl)%lnamedia
-         ctrc3u(jn) = c14dia3d(jl)%unitdia
-      END DO
-
-      IF(lwp) THEN                   ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist : natadd'
-         WRITE(numout,*) '    frequency of outputs for additional arrays nwritedia = ', nwritedia
-         DO jl = 1, jp_c14b_3d
-            jn = jp_c14b0_3d + jl - 1
-            WRITE(numout,*) '   3d output field No : ',jn
-            WRITE(numout,*) '   short name         : ', TRIM(ctrc3d(jn))
-            WRITE(numout,*) '   long name          : ', TRIM(ctrc3l(jn))
-            WRITE(numout,*) '   unit               : ', TRIM(ctrc3u(jn))
-            WRITE(numout,*) ' '
-         END DO
-
-         DO jl = 1, jp_c14b_2d
-            jn = jp_c14b0_2d + jl - 1
-            WRITE(numout,*) '   2d output field No : ',jn
-            WRITE(numout,*) '   short name         : ', TRIM(ctrc2d(jn))
-            WRITE(numout,*) '   long name          : ', TRIM(ctrc2l(jn))
-            WRITE(numout,*) '   unit               : ', TRIM(ctrc2u(jn))
-            WRITE(numout,*) ' '
-         END DO
-      ENDIF
-
-#endif
-
-   END SUBROUTINE trc_lsm_c14b
-   
-#else
-   !!----------------------------------------------------------------------
-   !!  Dummy module :                                                No 14C
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_lsm_c14b                      ! Empty routine
-   END  SUBROUTINE  trc_lsm_c14b
-#endif  
-
-   !!======================================================================
-END MODULE trclsm_c14b
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcnam_c14b.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcnam_c14b.F90	(revision 2038)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcnam_c14b.F90	(revision 2038)
@@ -0,0 +1,157 @@
+MODULE trcnam_c14b
+   !!======================================================================
+   !!                         ***  MODULE trcnam_c14b  ***
+   !! TOP :   initialisation of some run parameters for C14 chemical model
+   !!======================================================================
+   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) from trcnam.cfc.h90
+   !!----------------------------------------------------------------------
+#if defined key_c14b
+   !!----------------------------------------------------------------------
+   !!   'key_c14b'                                         C14 bomb tracer
+   !!----------------------------------------------------------------------
+   !! trc_nam_c14b      : C14 model initialisation
+   !!----------------------------------------------------------------------
+   USE oce_trc         ! Ocean variables
+   USE par_trc         ! TOP parameters
+   USE trc             ! TOP variables
+   USE trcsms_c14b     ! C14b specific variable
+   USE in_out_manager  ! I/O manager
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   trc_nam_c14b   ! called by trcnam.F90 module
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
+   !! $Id: trcnam_cfc.F90 1146 2008-06-25 11:42:56Z rblod $ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+   SUBROUTINE trc_nam_c14b
+      !!-------------------------------------------------------------------
+      !!                  ***  ROUTINE trc_nam_c14b  ***
+      !!                 
+      !! ** Purpose :   Definition some run parameter for C14 model
+      !!
+      !! ** Method  :   Read the namc14 namelist and check the parameter 
+      !!       values called at the first timestep (nit000)
+      !!
+      !! ** input   :   Namelist namelist_c14b
+      !!----------------------------------------------------------------------
+      INTEGER ::   numnatb
+
+#if defined key_diatrc && ! defined key_iomput
+      ! definition of additional diagnostic as a structure
+      INTEGER ::   jl, jn
+      TYPE DIAG
+         CHARACTER(len = 20)  :: snamedia   !: short name
+         CHARACTER(len = 80 ) :: lnamedia   !: long name
+         CHARACTER(len = 20 ) :: unitdia    !: unit
+      END TYPE DIAG
+
+      TYPE(DIAG) , DIMENSION(jp_c14b_2d) :: c14dia2d
+      TYPE(DIAG) , DIMENSION(jp_c14b_3d) :: c14dia3d
+#endif
+      !!
+      NAMELIST/namc14date/ ndate_beg_b, nyear_res_b
+#if defined key_diatrc && ! defined key_iomput
+      NAMELIST/namc14dia/nwritedia, c14dia2d, c14dia3d     ! additional diagnostics
+#endif
+      !!-------------------------------------------------------------------
+
+      ndate_beg_b = 650101            ! default namelist value
+      nyear_res_b = 1955
+
+      !                             ! Open namelist file
+      CALL ctl_opn( numnatb, 'namelist_c14b', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
+         
+      READ( numnatb , namc14date )     ! read namelist
+
+      IF(lwp) THEN                  ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' trc_nam: Read namdates, namelist for C14 chemical model'
+         WRITE(numout,*) ' ~~~~~~~'
+         WRITE(numout,*) '    initial calendar date (aammjj) for C14  ndate_beg_b = ', ndate_beg_b
+         WRITE(numout,*) '    restoring time constant (year)          nyear_res_b = ', nyear_res_b
+      ENDIF
+      nyear_beg_b = ndate_beg_b / 10000
+      IF(lwp) WRITE(numout,*) '    initial year (aa)                  nyear_beg_b = ', nyear_beg_b
+      !
+#if defined key_diatrc && ! defined key_iomput
+
+      ! Namelist namc14dia
+      ! -------------------
+      nwritedia = 10                   ! default values
+
+      DO jl = 1, jp_c14b_2d
+         jn = jp_c14b0_2d + jl - 1
+         WRITE(ctrc2d(jn),'("2D_",I1)') jn                      ! short name
+         WRITE(ctrc2l(jn),'("2D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
+         ctrc2u(jn) = ' '                                       ! units
+      END DO
+      !                                 ! 3D output arrays
+      DO jl = 1, jp_c14b_3d
+         jn = jp_c14b0_3d + jl - 1
+         WRITE(ctrc3d(jn),'("3D_",I1)') jn                      ! short name
+         WRITE(ctrc3l(jn),'("3D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
+         ctrc3u(jn) = ' '                                       ! units
+      END DO
+
+      REWIND( numnatb )               ! read natrtd
+      READ  ( numnatb, namc14dia )
+
+      DO jl = 1, jp_c14b_2d
+         jn = jp_c14b0_2d + jl - 1
+         ctrc2d(jn) = c14dia2d(jl)%snamedia
+         ctrc2l(jn) = c14dia2d(jl)%lnamedia
+         ctrc2u(jn) = c14dia2d(jl)%unitdia
+      END DO
+
+      DO jl = 1, jp_c14b_3d
+         jn = jp_c14b0_3d + jl - 1
+         ctrc3d(jn) = c14dia3d(jl)%snamedia
+         ctrc3l(jn) = c14dia3d(jl)%lnamedia
+         ctrc3u(jn) = c14dia3d(jl)%unitdia
+      END DO
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : natadd'
+         WRITE(numout,*) '    frequency of outputs for additional arrays nwritedia = ', nwritedia
+         DO jl = 1, jp_c14b_3d
+            jn = jp_c14b0_3d + jl - 1
+            WRITE(numout,*) '   3d output field No : ',jn
+            WRITE(numout,*) '   short name         : ', TRIM(ctrc3d(jn))
+            WRITE(numout,*) '   long name          : ', TRIM(ctrc3l(jn))
+            WRITE(numout,*) '   unit               : ', TRIM(ctrc3u(jn))
+            WRITE(numout,*) ' '
+         END DO
+
+         DO jl = 1, jp_c14b_2d
+            jn = jp_c14b0_2d + jl - 1
+            WRITE(numout,*) '   2d output field No : ',jn
+            WRITE(numout,*) '   short name         : ', TRIM(ctrc2d(jn))
+            WRITE(numout,*) '   long name          : ', TRIM(ctrc2l(jn))
+            WRITE(numout,*) '   unit               : ', TRIM(ctrc2u(jn))
+            WRITE(numout,*) ' '
+         END DO
+      ENDIF
+
+#endif
+
+   END SUBROUTINE trc_nam_c14b
+   
+#else
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                                No 14C
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE trc_nam_c14b                      ! Empty routine
+   END  SUBROUTINE  trc_nam_c14b
+#endif  
+
+   !!======================================================================
+END MODULE trcnam_c14b
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcsms_c14b.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 2038)
@@ -17,6 +17,6 @@
    USE par_trc      ! TOP parameters
    USE trc          ! TOP variables
-   USE trdmld_trc_oce
-   USE trdmld_trc
+   USE trdmod_oce
+   USE trdmod_trc
    USE iom
 
@@ -126,5 +126,5 @@
        zpv  ,        &      !: piston velocity 
        zdemi, ztra
-#if defined key_trc_dia3d  && defined key_iomput
+#if defined key_diatrc  && defined key_iomput
       REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d
 #endif
@@ -259,5 +259,5 @@
             qtr_c14(ji,jj) = -zpv * zsol * zpco2at                                   &
                  &                       * ( trb(ji,jj,1,jpc14) - zatmbc14(ji,jj) )  &
-#if defined key_off_degrad
+#if defined key_degrad
                  &                       * facvol(ji,jj,1)                           &
 #endif
@@ -270,5 +270,5 @@
             qint_c14(ji,jj) = qint_c14(ji,jj) + qtr_c14(ji,jj) * rdt
 
-# if defined key_trc_diaadd && ! defined key_iomput
+# if defined key_diatrc && ! defined key_iomput
             ! Save 2D diagnostics
             trc2d(ji,jj,jp_c14b0_2d    ) = qtr_c14 (ji,jj)
@@ -282,5 +282,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-#if ! defined key_off_degrad
+#if ! defined key_degrad
                ztra = trn(ji,jj,jk,jpc14) * xaccum
 #else
@@ -288,5 +288,5 @@
 #endif
                tra(ji,jj,jk,jpc14) = tra(ji,jj,jk,jpc14) - ztra / rdt
-#if defined key_trc_dia3d
+#if defined key_diatrc
                ! Save 3D diagnostics
 # if ! defined key_iomput
@@ -300,13 +300,13 @@
       END DO
 
-#if defined key_trc_diaadd  && defined key_iomput
+#if defined key_diatrc  && defined key_iomput
       CALL iom_put( "qtrC14b"  , qtr_c14  )
       CALL iom_put( "qintC14b" , qint_c14 )
 #endif
-#if defined key_trc_dia3d  && defined key_iomput
+#if defined key_diatrc  && defined key_iomput
       CALL iom_put( "fdecay" , zw3d )
 #endif
       IF( l_trdtrc ) THEN
-         CALL trd_mod_trc( tra(:,:,:,jpc14), jpc14, jptrc_trd_sms, kt )   ! save trends
+         CALL trd_mod_trc( tra(:,:,:,jpc14), jpc14, jptra_trd_sms, kt )   ! save trends
       END IF
 
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/par_cfc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/par_cfc.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/par_cfc.F90	(revision 2038)
@@ -34,6 +34,6 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_cfc     = .TRUE.      !: CFC flag 
    INTEGER, PUBLIC, PARAMETER ::   jp_cfc     =  2          !: number of passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_cfc_2d  =  2          !: additional 2d output arrays ('key_trc_diaadd')
-   INTEGER, PUBLIC, PARAMETER ::   jp_cfc_3d  =  0          !: additional 3d output arrays ('key_trc_diaadd')
+   INTEGER, PUBLIC, PARAMETER ::   jp_cfc_2d  =  2          !: additional 2d output arrays ('key_diatrc')
+   INTEGER, PUBLIC, PARAMETER ::   jp_cfc_3d  =  0          !: additional 3d output arrays ('key_diatrc')
    INTEGER, PUBLIC, PARAMETER ::   jp_cfc_trd =  0          !: number of sms trends for CFC
    
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcctl_cfc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcctl_cfc.F90	(revision 2037)
+++ 	(revision )
@@ -1,100 +1,0 @@
-MODULE trcctl_cfc
-   !!======================================================================
-   !!                         ***  trcctl.cfc.F90  ***
-   !! TOP :                Control of CFC chemical model
-   !!======================================================================
-   !!----------------------------------------------------------------------
-   !! History :   1.0  !  2005-10 (C. Ethe) assign a parameter to name individual tracers
-   !!----------------------------------------------------------------------
-
-#if defined key_cfc
-
-   USE oce_trc
-   USE trc
-
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC trc_ctl_cfc      ! called by ???
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_ctl_cfc
-      !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE trc_ctl_cfc  ***
-      !!
-      !! ** Purpose :   control the cpp options, namelist and files 
-      !!----------------------------------------------------------------------
-      INTEGER :: jl, jn
-
-      IF(lwp) THEN
-          WRITE(numout,*) ' CFC Model '
-          WRITE(numout,*) ' '
-      ENDIF
-
-      ! Check number of tracers
-      ! -----------------------   
-      IF( jp_cfc > 2) THEN 
-          IF(lwp) THEN 
-              WRITE (numout,*) ' ===>>>> : w a r n i n g <<<<==='
-              WRITE (numout,*)                             &
-              &   ' STOP, change jp_cfc to 1 or 2 in par_CFC module '  
-          END IF 
-          STOP 'TRC_CTL'
-      END IF 
-
-      ! Check tracer names
-      ! ------------------
-      IF ( ctrcnm(jpc11) /= 'CFC11' .OR. ctrcnm(jpc12) /= 'CFC12' ) THEN 
-            ctrcnm(jpc11) = 'CFC11'
-            ctrcnl(jpc11) = 'Chlorofuorocarbone 11 concentration'
-            ctrcnm(jpc12) = 'CFC12'
-            ctrcnl(jpc12) = 'Chlorofuorocarbone 12 concentration' 
-      ENDIF
-
-      IF(lwp) THEN
-         WRITE (numout,*) ' ===>>>> : w a r n i n g <<<<==='
-         WRITE (numout,*) ' we force tracer names'
-         DO jl = 1, jp_cfc
-            jn = jp_cfc0 + jl - 1
-            WRITE(numout,*) ' tracer nb: ',jn,' name = ',ctrcnm(jn), ctrcnl(jn)
-         END DO
-         WRITE(numout,*) ' '
-      ENDIF 
-
-
-      ! Check tracer units
-      ! ------------------
-      DO jl = 1, jp_cfc
-         jn = jp_cfc0 + jl - 1
-        IF( ctrcun(jn) /= 'mole/m3' ) THEN
-            ctrcun(jn) = 'mole/m3'
-            IF(lwp) THEN
-               WRITE (numout,*) ' ===>>>> : w a r n i n g <<<<==='
-               WRITE (numout,*) ' we force tracer unit'
-               WRITE(numout,*) ' tracer  ',ctrcnm(jn), 'UNIT= ',ctrcun(jn)
-               WRITE(numout,*) ' '
-            ENDIF 
-         ENDIF 
-      END DO              
-      !
-   END SUBROUTINE trc_ctl_cfc
-
-#else
-   !!----------------------------------------------------------------------
-   !!  Empty module :                                                No CFC
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_ctl_cfc                      ! Dummy routine
-   END SUBROUTINE trc_ctl_cfc
-#endif
-
-   !!======================================================================
-END MODULE trcctl_cfc
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcini_cfc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcini_cfc.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcini_cfc.F90	(revision 2038)
@@ -46,4 +46,5 @@
       REAL(wp) ::   zyy  ,  zyd
       !!----------------------------------------------------------------------
+
 
       IF(lwp) WRITE(numout,*)
@@ -95,9 +96,17 @@
       END DO
    
-      DO jn = 31, 98      !   Read file
-         READ(inum,*) zyy, p_cfc(jn,1,1), p_cfc(jn,1,2), p_cfc(jn,2,1), p_cfc(jn,2,2)
-         WRITE(numout,'(f7.2, 4f8.2)' ) &
+      ! file starts in 1931 do jn represent the year in the century.jhh
+      ! Read file till the end
+      jn = 31
+      DO WHILE ( 1 /= 2 )
+         READ(inum,*,END=100) zyy, p_cfc(jn,1,1), p_cfc(jn,1,2), p_cfc(jn,2,1), p_cfc(jn,2,2)
+         IF ( lwp) THEN
+           WRITE(numout,'(f7.2, 4f8.2)' ) &
             &         zyy, p_cfc(jn,1,1), p_cfc(jn,1,2), p_cfc(jn,2,1), p_cfc(jn,2,2)
+         ENDIF
+         jn = jn + 1
       END DO
+ 100  npyear = jn - 1
+      IF ( lwp) WRITE(numout,*) '    ', npyear ,' years read'
 
       p_cfc(32,1:2,1) = 5.e-4      ! modify the values of the first years
@@ -138,5 +147,5 @@
 
    END SUBROUTINE trc_ini_cfc
-   
+ 
 #else
    !!----------------------------------------------------------------------
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trclsm_cfc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trclsm_cfc.F90	(revision 2037)
+++ 	(revision )
@@ -1,132 +1,0 @@
-MODULE trclsm_cfc
-   !!======================================================================
-   !!                         ***  MODULE trclsm_cfc  ***
-   !! TOP :   initialisation of some run parameters for CFC chemical model
-   !!======================================================================
-   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) from trclsm.cfc.h90
-   !!----------------------------------------------------------------------
-#if defined key_cfc
-   !!----------------------------------------------------------------------
-   !!   'key_cfc'                                               CFC tracers
-   !!----------------------------------------------------------------------
-   !! trc_lsm_cfc      : CFC model initialisation
-   !!----------------------------------------------------------------------
-   USE oce_trc         ! Ocean variables
-   USE par_trc         ! TOP parameters
-   USE trc             ! TOP variables
-   USE trcsms_cfc      ! CFC specific variable
-   USE in_out_manager  ! I/O manager
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC   trc_lsm_cfc   ! called by trclsm.F90 module
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_lsm_cfc
-      !!-------------------------------------------------------------------
-      !!                  ***  ROUTINE trc_lsm_cfc  ***
-      !!                 
-      !! ** Purpose :   Definition some run parameter for CFC model
-      !!
-      !! ** Method  :   Read the namcfc namelist and check the parameter 
-      !!       values called at the first timestep (nit000)
-      !!
-      !! ** input   :   Namelist namcfc
-      !!----------------------------------------------------------------------
-      INTEGER ::   numnatc
-#if defined key_trc_diaadd && ! defined key_iomput
-      ! definition of additional diagnostic as a structure
-      INTEGER :: jl, jn
-      TYPE DIAG
-         CHARACTER(len = 20)  :: snamedia   !: short name
-         CHARACTER(len = 80 ) :: lnamedia   !: long name
-         CHARACTER(len = 20 ) :: unitdia    !: unit
-      END TYPE DIAG
-
-      TYPE(DIAG) , DIMENSION(jp_cfc_2d) :: cfcdia2d
-#endif
-      !!
-      NAMELIST/namcfcdate/ ndate_beg, nyear_res
-#if defined key_trc_diaadd && ! defined key_iomput
-      NAMELIST/namcfcdia/nwritedia, cfcdia2d     ! additional diagnostics
-#endif
-      !!-------------------------------------------------------------------
-
-      ndate_beg = 300101            ! default namelist value
-      nyear_res = 1950
-
-      !                             ! Open namelist file
-      CALL ctl_opn( numnatc, 'namelist_cfc', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
-         
-      READ( numnatc , namcfcdate )     ! read namelist
-
-      IF(lwp) THEN                  ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' trc_lsm: Read namdates, namelist for CFC chemical model'
-         WRITE(numout,*) ' ~~~~~~~'
-         WRITE(numout,*) '    initial calendar date (aammjj) for CFC  ndate_beg = ', ndate_beg
-         WRITE(numout,*) '    restoring time constant (year)          nyear_res = ', nyear_res
-      ENDIF
-      nyear_beg = ndate_beg / 10000
-      IF(lwp) WRITE(numout,*) '    initial year (aa)                       nyear_beg = ', nyear_beg
-      !
-#if defined key_trc_diaadd && ! defined key_iomput
-
-      ! Namelist namcfcdia
-      ! -------------------
-      nwritedia = 10                   ! default values
-
-      DO jl = 1, jp_cfc_2d
-         jn = jp_cfc0_2d + jl - 1 
-         WRITE(ctrc2d(jn),'("2D_",I1)') jn                      ! short name
-         WRITE(ctrc2l(jn),'("2D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
-         ctrc2u(jn) = ' '                                       ! units
-      END DO
-
-      REWIND( numnatc )               ! read natrtd
-      READ  ( numnatc, namcfcdia )
-
-      DO jl = 1, jp_cfc_2d
-         jn = jp_cfc0_2d + jl - 1
-         ctrc2d(jn) = cfcdia2d(jl)%snamedia
-         ctrc2l(jn) = cfcdia2d(jl)%lnamedia
-         ctrc2u(jn) = cfcdia2d(jl)%unitdia
-      END DO
-
-
-      IF(lwp) THEN                   ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist : natadd'
-         WRITE(numout,*) '    frequency of outputs for additional arrays nwritedia = ', nwritedia
-         DO jl = 1, jp_cfc_2d
-            jn = jp_cfc0_2d + jl - 1
-            WRITE(numout,*) '   2d output field No : ',jn
-            WRITE(numout,*) '   short name         : ', TRIM(ctrc2d(jn))
-            WRITE(numout,*) '   long name          : ', TRIM(ctrc2l(jn))
-            WRITE(numout,*) '   unit               : ', TRIM(ctrc2u(jn))
-            WRITE(numout,*) ' '
-         END DO
-      ENDIF
-#endif
-
-   END SUBROUTINE trc_lsm_cfc
-   
-#else
-   !!----------------------------------------------------------------------
-   !!  Dummy module :                                                No CFC
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_lsm_cfc                      ! Empty routine
-   END  SUBROUTINE  trc_lsm_cfc
-#endif  
-
-   !!======================================================================
-END MODULE trclsm_cfc
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcnam_cfc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcnam_cfc.F90	(revision 2038)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcnam_cfc.F90	(revision 2038)
@@ -0,0 +1,132 @@
+MODULE trcnam_cfc
+   !!======================================================================
+   !!                         ***  MODULE trcnam_cfc  ***
+   !! TOP :   initialisation of some run parameters for CFC chemical model
+   !!======================================================================
+   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) from trcnam.cfc.h90
+   !!----------------------------------------------------------------------
+#if defined key_cfc
+   !!----------------------------------------------------------------------
+   !!   'key_cfc'                                               CFC tracers
+   !!----------------------------------------------------------------------
+   !! trc_nam_cfc      : CFC model initialisation
+   !!----------------------------------------------------------------------
+   USE oce_trc         ! Ocean variables
+   USE par_trc         ! TOP parameters
+   USE trc             ! TOP variables
+   USE trcsms_cfc      ! CFC specific variable
+   USE in_out_manager  ! I/O manager
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   trc_nam_cfc   ! called by trcnam.F90 module
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
+   !! $Id: trcnam_cfc.F90 1801 2010-01-22 09:36:07Z cetlod $ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+   SUBROUTINE trc_nam_cfc
+      !!-------------------------------------------------------------------
+      !!                  ***  ROUTINE trc_nam_cfc  ***
+      !!                 
+      !! ** Purpose :   Definition some run parameter for CFC model
+      !!
+      !! ** Method  :   Read the namcfc namelist and check the parameter 
+      !!       values called at the first timestep (nit000)
+      !!
+      !! ** input   :   Namelist namcfc
+      !!----------------------------------------------------------------------
+      INTEGER ::   numnatc
+#if defined key_diatrc && ! defined key_iomput
+      ! definition of additional diagnostic as a structure
+      INTEGER :: jl, jn
+      TYPE DIAG
+         CHARACTER(len = 20)  :: snamedia   !: short name
+         CHARACTER(len = 80 ) :: lnamedia   !: long name
+         CHARACTER(len = 20 ) :: unitdia    !: unit
+      END TYPE DIAG
+
+      TYPE(DIAG) , DIMENSION(jp_cfc_2d) :: cfcdia2d
+#endif
+      !!
+      NAMELIST/namcfcdate/ ndate_beg, nyear_res
+#if defined key_diatrc && ! defined key_iomput
+      NAMELIST/namcfcdia/nwritedia, cfcdia2d     ! additional diagnostics
+#endif
+      !!-------------------------------------------------------------------
+
+      ndate_beg = 300101            ! default namelist value
+      nyear_res = 1950
+
+      !                             ! Open namelist file
+      CALL ctl_opn( numnatc, 'namelist_cfc', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
+         
+      READ( numnatc , namcfcdate )     ! read namelist
+
+      IF(lwp) THEN                  ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' trc_nam: Read namdates, namelist for CFC chemical model'
+         WRITE(numout,*) ' ~~~~~~~'
+         WRITE(numout,*) '    initial calendar date (aammjj) for CFC  ndate_beg = ', ndate_beg
+         WRITE(numout,*) '    restoring time constant (year)          nyear_res = ', nyear_res
+      ENDIF
+      nyear_beg = ndate_beg / 10000
+      IF(lwp) WRITE(numout,*) '    initial year (aa)                       nyear_beg = ', nyear_beg
+      !
+#if defined key_diatrc && ! defined key_iomput
+
+      ! Namelist namcfcdia
+      ! -------------------
+      nwritedia = 10                   ! default values
+
+      DO jl = 1, jp_cfc_2d
+         jn = jp_cfc0_2d + jl - 1 
+         WRITE(ctrc2d(jn),'("2D_",I1)') jn                      ! short name
+         WRITE(ctrc2l(jn),'("2D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
+         ctrc2u(jn) = ' '                                       ! units
+      END DO
+
+      REWIND( numnatc )               ! read natrtd
+      READ  ( numnatc, namcfcdia )
+
+      DO jl = 1, jp_cfc_2d
+         jn = jp_cfc0_2d + jl - 1
+         ctrc2d(jn) = cfcdia2d(jl)%snamedia
+         ctrc2l(jn) = cfcdia2d(jl)%lnamedia
+         ctrc2u(jn) = cfcdia2d(jl)%unitdia
+      END DO
+
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : natadd'
+         WRITE(numout,*) '    frequency of outputs for additional arrays nwritedia = ', nwritedia
+         DO jl = 1, jp_cfc_2d
+            jn = jp_cfc0_2d + jl - 1
+            WRITE(numout,*) '   2d output field No : ',jn
+            WRITE(numout,*) '   short name         : ', TRIM(ctrc2d(jn))
+            WRITE(numout,*) '   long name          : ', TRIM(ctrc2l(jn))
+            WRITE(numout,*) '   unit               : ', TRIM(ctrc2u(jn))
+            WRITE(numout,*) ' '
+         END DO
+      ENDIF
+#endif
+
+   END SUBROUTINE trc_nam_cfc
+   
+#else
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                                No CFC
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE trc_nam_cfc                      ! Empty routine
+   END  SUBROUTINE  trc_nam_cfc
+#endif  
+
+   !!======================================================================
+END MODULE trcnam_cfc
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/CFC/trcsms_cfc.F90	(revision 2038)
@@ -18,6 +18,6 @@
    USE par_trc      ! TOP parameters
    USE trc          ! TOP variables
-   USE trdmld_trc_oce
-   USE trdmld_trc
+   USE trdmod_oce
+   USE trdmod_trc
    USE iom
 
@@ -32,4 +32,5 @@
    INTEGER , PUBLIC    ::   nyear_res      ! restoring time constant (year)
    INTEGER , PUBLIC    ::   nyear_beg      ! initial year (aa) 
+   INTEGER , PUBLIC    ::   npyear         ! Number of years read in CFC1112 file
    
    REAL(wp), PUBLIC, DIMENSION(jpyear,jphem, jp_cfc) ::   p_cfc    ! partial hemispheric pressure for CFC          
@@ -96,11 +97,10 @@
       ! Temporal interpolation
       ! ----------------------
-      iyear_beg = nyear + ( nyear_res - 1900 - nyear_beg  )
+      iyear_beg = nyear - 1900
       IF ( nmonth <= 6 ) THEN
-         iyear_beg = iyear_beg - 2 + nyear_beg
+         iyear_beg = iyear_beg - 1
          im1       =  6 - nmonth + 1
          im2       =  6 + nmonth - 1
       ELSE
-         iyear_beg = iyear_beg - 1 + nyear_beg
          im1       = 12 - nmonth + 7
          im2       =      nmonth - 7
@@ -156,5 +156,5 @@
                ! trn in pico-mol/l idem qtr; ak in en m/s
                qtr_cfc(ji,jj,jl) = -zak_cfc * ( trb(ji,jj,1,jn) - zca_cfc )   &
-#if defined key_off_degrad
+#if defined key_degrad
                   &                         * facvol(ji,jj,1)                           &
 #endif
@@ -173,5 +173,5 @@
       !                                                     !----------------!
 
-#if defined key_trc_diaadd 
+#if defined key_diatrc 
       ! Save diagnostics , just for CFC11
 # if ! defined key_iomput
@@ -187,5 +187,5 @@
           DO jn = jp_cfc0, jp_cfc1
             ztrcfc(:,:,:) = tra(:,:,:,jn)
-            CALL trd_mod_trc( ztrcfc, jn, jptrc_trd_sms, kt )   ! save trends
+            CALL trd_mod_trc( ztrcfc, jn, jptra_trd_sms, kt )   ! save trends
           END DO
       END IF
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/par_lobster.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/par_lobster.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/par_lobster.F90	(revision 2038)
@@ -20,15 +20,15 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_lobster     = .TRUE.    !: LOBSTER flag 
    INTEGER, PUBLIC, PARAMETER ::   jp_lobster     =  6        !: number of LOBSTER tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_lobster_2d  = 19        !: additional 2d output arrays ('key_trc_diaadd')
-   INTEGER, PUBLIC, PARAMETER ::   jp_lobster_3d  =  3        !: additional 3d output arrays ('key_trc_diaadd')
+   INTEGER, PUBLIC, PARAMETER ::   jp_lobster_2d  = 19        !: additional 2d output arrays ('key_diatrc')
+   INTEGER, PUBLIC, PARAMETER ::   jp_lobster_3d  =  3        !: additional 3d output arrays ('key_diatrc')
    INTEGER, PUBLIC, PARAMETER ::   jp_lobster_trd = 17       !: number of sms trends for LOBSTER
 
    ! assign an index in trc arrays for each LOBSTER prognostic variables
-   INTEGER, PUBLIC, PARAMETER ::   jpdet          =  1        !: detritus                    [mmoleN/m3]
-   INTEGER, PUBLIC, PARAMETER ::   jpzoo          =  2        !: zooplancton concentration   [mmoleN/m3]
-   INTEGER, PUBLIC, PARAMETER ::   jpphy          =  3        !: phytoplancton concentration [mmoleN/m3]
-   INTEGER, PUBLIC, PARAMETER ::   jpno3          =  4        !: nitrate concentration       [mmoleN/m3]
-   INTEGER, PUBLIC, PARAMETER ::   jpnh4          =  5        !: ammonium concentration      [mmoleN/m3]
-   INTEGER, PUBLIC, PARAMETER ::   jpdom          =  6        !: dissolved organic matter    [mmoleN/m3]
+   INTEGER, PUBLIC, PARAMETER ::   jp_lob_det     =  1        !: detritus                    [mmoleN/m3]
+   INTEGER, PUBLIC, PARAMETER ::   jp_lob_zoo     =  2        !: zooplancton concentration   [mmoleN/m3]
+   INTEGER, PUBLIC, PARAMETER ::   jp_lob_phy     =  3        !: phytoplancton concentration [mmoleN/m3]
+   INTEGER, PUBLIC, PARAMETER ::   jp_lob_no3     =  4        !: nitrate concentration       [mmoleN/m3]
+   INTEGER, PUBLIC, PARAMETER ::   jp_lob_nh4     =  5        !: ammonium concentration      [mmoleN/m3]
+   INTEGER, PUBLIC, PARAMETER ::   jp_lob_dom     =  6        !: dissolved organic matter    [mmoleN/m3]
 
    ! productive layer depth
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcbio.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcbio.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcbio.F90	(revision 2038)
@@ -20,6 +20,5 @@
    USE lbclnk          ! 
    USE prtctl_trc      ! Print control for debbuging
-   USE trdmld_trc
-   USE trdmld_trc_oce
+   USE trdmod_trc
    USE iom
    
@@ -57,5 +56,5 @@
       !!                                  source      sink
       !!        
-      !!              IF 'key_trc_diabio' defined , the biogeochemical trends
+      !!              IF 'key_diabio' defined , the biogeochemical trends
       !!              for passive tracers are saved for futher diagnostics.
       !!---------------------------------------------------------------------
@@ -71,12 +70,10 @@
       REAL(wp) ::   zfilpz, zfildz, zphya, zzooa, zno3a
       REAL(wp) ::   znh4a, zdeta, zdoma, zzoobod, zboddet, zdomaju
-#if defined key_trc_diaadd
+#if defined key_diatrc
       REAL(wp) ::   ze3t
 #endif
-#if defined key_trc_diaadd && defined key_iomput
+#if defined key_diatrc && defined key_iomput
       REAL(wp), DIMENSION(jpi,jpj,17)     :: zw2d
-# if defined key_trc_dia3d
       REAL(wp), DIMENSION(jpi,jpj,jpk,3) :: zw3d
-# endif
 #endif
       REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::   ztrbio
@@ -91,14 +88,12 @@
 
       fbod(:,:) = 0.e0
-#if defined key_trc_diaadd && ! defined key_iomput
+#if defined key_diatrc && ! defined key_iomput
       DO jl = jp_lob0_2d, jp_lob1_2d
          trc2d(:,:,jl) = 0.e0
       END DO 
 #endif
-#if defined key_trc_diaadd && defined key_iomput
+#if defined key_diatrc && defined key_iomput
       zw2d(:,:,:) = 0.e0
-# if defined key_trc_dia3d
       zw3d(:,:,:,:) = 0.e0
-# endif
 #endif
 
@@ -117,10 +112,10 @@
 
                ! negative trophic variables DO not contribute to the fluxes
-               zdet = MAX( 0.e0, trn(ji,jj,jk,jpdet) )
-               zzoo = MAX( 0.e0, trn(ji,jj,jk,jpzoo) )
-               zphy = MAX( 0.e0, trn(ji,jj,jk,jpphy) )
-               zno3 = MAX( 0.e0, trn(ji,jj,jk,jpno3) )
-               znh4 = MAX( 0.e0, trn(ji,jj,jk,jpnh4) )
-               zdom = MAX( 0.e0, trn(ji,jj,jk,jpdom) )
+               zdet = MAX( 0.e0, trn(ji,jj,jk,jp_lob_det) )
+               zzoo = MAX( 0.e0, trn(ji,jj,jk,jp_lob_zoo) )
+               zphy = MAX( 0.e0, trn(ji,jj,jk,jp_lob_phy) )
+               zno3 = MAX( 0.e0, trn(ji,jj,jk,jp_lob_no3) )
+               znh4 = MAX( 0.e0, trn(ji,jj,jk,jp_lob_nh4) )
+               zdom = MAX( 0.e0, trn(ji,jj,jk,jp_lob_dom) )
 
                ! Limitations
@@ -194,12 +189,12 @@
 
                ! tracer flux at totox-point added to the general trend
-               tra(ji,jj,jk,jpdet) = tra(ji,jj,jk,jpdet) + zdeta
-               tra(ji,jj,jk,jpzoo) = tra(ji,jj,jk,jpzoo) + zzooa
-               tra(ji,jj,jk,jpphy) = tra(ji,jj,jk,jpphy) + zphya
-               tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + zno3a
-               tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + znh4a
-               tra(ji,jj,jk,jpdom) = tra(ji,jj,jk,jpdom) + zdoma
-
-#if defined key_trc_diabio
+               tra(ji,jj,jk,jp_lob_det) = tra(ji,jj,jk,jp_lob_det) + zdeta
+               tra(ji,jj,jk,jp_lob_zoo) = tra(ji,jj,jk,jp_lob_zoo) + zzooa
+               tra(ji,jj,jk,jp_lob_phy) = tra(ji,jj,jk,jp_lob_phy) + zphya
+               tra(ji,jj,jk,jp_lob_no3) = tra(ji,jj,jk,jp_lob_no3) + zno3a
+               tra(ji,jj,jk,jp_lob_nh4) = tra(ji,jj,jk,jp_lob_nh4) + znh4a
+               tra(ji,jj,jk,jp_lob_dom) = tra(ji,jj,jk,jp_lob_dom) + zdoma
+
+#if defined key_diabio
                trbio(ji,jj,jk,jp_lob0_trd     ) = zno3phy
                trbio(ji,jj,jk,jp_lob0_trd +  1) = znh4phy
@@ -238,5 +233,5 @@
                 ENDIF
 
-#if defined key_trc_diaadd
+#if defined key_diatrc
                ! convert fluxes in per day
                ze3t = fse3t(ji,jj,jk) * 86400.
@@ -282,5 +277,5 @@
                zw2d(ji,jj,17) = zw2d(ji,jj,17) + zdetdom * ze3t
 #endif
-#if defined key_trc_dia3d 
+#if defined key_diatrc 
 # if ! defined key_iomput
                trc3d(ji,jj,jk,jp_lob0_3d    ) = zno3phy * 86400     
@@ -307,10 +302,10 @@
                !    trophic variables( det, zoo, phy, no3, nh4, dom)
                !       negative trophic variables DO not contribute to the fluxes
-               zdet = MAX( 0.e0, trn(ji,jj,jk,jpdet) )
-               zzoo = MAX( 0.e0, trn(ji,jj,jk,jpzoo) )
-               zphy = MAX( 0.e0, trn(ji,jj,jk,jpphy) )
-               zno3 = MAX( 0.e0, trn(ji,jj,jk,jpno3) )
-               znh4 = MAX( 0.e0, trn(ji,jj,jk,jpnh4) )
-               zdom = MAX( 0.e0, trn(ji,jj,jk,jpdom) )
+               zdet = MAX( 0.e0, trn(ji,jj,jk,jp_lob_det) )
+               zzoo = MAX( 0.e0, trn(ji,jj,jk,jp_lob_zoo) )
+               zphy = MAX( 0.e0, trn(ji,jj,jk,jp_lob_phy) )
+               zno3 = MAX( 0.e0, trn(ji,jj,jk,jp_lob_no3) )
+               znh4 = MAX( 0.e0, trn(ji,jj,jk,jp_lob_nh4) )
+               zdom = MAX( 0.e0, trn(ji,jj,jk,jp_lob_dom) )
 
                !    Limitations
@@ -363,12 +358,12 @@
 
                ! tracer flux at totox-point added to the general trend
-               tra(ji,jj,jk,jpdet) = tra(ji,jj,jk,jpdet) + zdeta
-               tra(ji,jj,jk,jpzoo) = tra(ji,jj,jk,jpzoo) + zzooa
-               tra(ji,jj,jk,jpphy) = tra(ji,jj,jk,jpphy) + zphya
-               tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + zno3a
-               tra(ji,jj,jk,jpnh4) = tra(ji,jj,jk,jpnh4) + znh4a
-               tra(ji,jj,jk,jpdom) = tra(ji,jj,jk,jpdom) + zdoma
+               tra(ji,jj,jk,jp_lob_det) = tra(ji,jj,jk,jp_lob_det) + zdeta
+               tra(ji,jj,jk,jp_lob_zoo) = tra(ji,jj,jk,jp_lob_zoo) + zzooa
+               tra(ji,jj,jk,jp_lob_phy) = tra(ji,jj,jk,jp_lob_phy) + zphya
+               tra(ji,jj,jk,jp_lob_no3) = tra(ji,jj,jk,jp_lob_no3) + zno3a
+               tra(ji,jj,jk,jp_lob_nh4) = tra(ji,jj,jk,jp_lob_nh4) + znh4a
+               tra(ji,jj,jk,jp_lob_dom) = tra(ji,jj,jk,jp_lob_dom) + zdoma
                !
-#if defined key_trc_diabio
+#if defined key_diabio
                trbio(ji,jj,jk,jp_lob0_trd     ) = zno3phy
                trbio(ji,jj,jk,jp_lob0_trd +  1) = znh4phy
@@ -406,5 +401,5 @@
                   !  trend number 17 in trcexp
                 ENDIF
-#if defined key_trc_diaadd && defined key_trc_dia3d
+#if defined key_diatrc
 # if ! defined key_iomput
                trc3d(ji,jj,jk,jp_lob0_3d    ) =  zno3phy * 86400     
@@ -421,5 +416,5 @@
       END DO
 
-#if defined key_trc_diaadd
+#if defined key_diatrc
       ! Lateral boundary conditions 
 # if ! defined key_iomput
@@ -452,5 +447,5 @@
 #endif
 
-#if defined key_trc_diaadd && defined key_trc_dia3d
+#if defined key_diatrc
       ! Lateral boundary conditions 
 # if ! defined key_iomput
@@ -469,5 +464,5 @@
 #endif
 
-#if defined key_trc_diabio
+#if defined key_diabio
       ! Lateral boundary conditions on trcbio
       DO jl = jp_lob0_trd, jp_lob1_trd
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcctl_lobster.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcctl_lobster.F90	(revision 2037)
+++ 	(revision )
@@ -1,113 +1,0 @@
-MODULE trcctl_lobster
-   !!======================================================================
-   !!                         ***  trcctl_lobster.F90  ***
-   !! TOP :                Control of LOBSTER biological model
-   !!======================================================================
-   !!----------------------------------------------------------------------
-   !! History :   1.0  !  2000-12 (E. Kestenare) assign a parameter to name individual tracers
-   !!----------------------------------------------------------------------
-
-#if defined key_lobster
-
-   USE oce_trc
-   USE trc
-
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC trc_ctl_lobster     ! called by ???
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_ctl_lobster
-      !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE trc_ctl_lobster  ***
-      !!
-      !! ** Purpose :   control the cpp options, namelist and files 
-      !!----------------------------------------------------------------------
-      INTEGER :: jl, jn
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' use LOBSTER biological model '
-
-      ! Check number of tracers
-      ! -----------------------
-      IF (jp_lobster /= 6) THEN 
-          IF (lwp) THEN 
-              WRITE (numout,*) ' ===>>>> : w a r n i n g '
-              WRITE (numout,*) ' =======   ============= '
-              WRITE (numout,*)                             &
-              &   ' STOP, change jp_lobster to 6 in '           &
-              &   ,'par_lobster.F90 '  
-          END IF 
-          STOP 'TRC_CTL'
-      END IF 
-
-      ! Check tracer names
-      ! ------------------
-      IF(   ctrcnm(jpdet) /= 'DET' .OR. ctrcnm(jpzoo) /= 'ZOO' .OR.   &
-         &  ctrcnm(jpphy) /= 'PHY' .OR. ctrcnm(jpno3) /= 'NO3' .OR.   &
-         &  ctrcnm(jpnh4) /= 'NH4' .OR. ctrcnm(jpdom) /= 'DOM' .OR.   & 
-         &  ctrcnl(jpdet) /= 'Detritus'                        .OR.   &
-         &  ctrcnl(jpzoo) /= 'Zooplankton concentration'       .OR.   &
-         &  ctrcnl(jpphy) /= 'Phytoplankton concentration'     .OR.   &
-         &  ctrcnl(jpno3) /= 'Nitrate concentration'           .OR.   &
-         &  ctrcnl(jpnh4) /= 'Ammonium concentration'          .OR.   &
-         &  ctrcnl(jpdom) /= 'Dissolved organic matter' ) THEN 
-         ctrcnm(jpdet)='DET'
-         ctrcnl(jpdet)='Detritus'
-         ctrcnm(jpzoo)='ZOO'
-         ctrcnl(jpzoo)='Zooplankton concentration'
-         ctrcnm(jpphy)='PHY'
-         ctrcnl(jpphy)='Phytoplankton concentration'
-         ctrcnm(jpno3)='NO3'
-         ctrcnl(jpno3)='Nitrate concentration'
-         ctrcnm(jpnh4)='NH4'
-         ctrcnl(jpnh4)='Ammonium concentration'
-         ctrcnm(jpdom)='DOM'
-         ctrcnl(jpdom)='Dissolved organic matter'          
-         IF(lwp) THEN
-            WRITE (numout,*) ' ===>>>> : w a r n i n g '
-            WRITE (numout,*) ' =======   ============= '
-            WRITE (numout,*) ' we force tracer names'
-            DO jl = 1, jp_lobster
-               jn = jp_lob0 + jl - 1
-               WRITE(numout,*) ' tracer nb: ',jn,' name = ',ctrcnm(jn), ctrcnl(jn)
-            END DO
-            WRITE(numout,*) ' '
-         ENDIF 
-      ENDIF 
-
-      ! Check tracer units
-      DO jl = 1, jp_lobster
-         jn = jp_lob0 + jl - 1
-         IF( ctrcun(jn) /= 'mmole-N/m3') THEN
-            ctrcun(jn) = 'mmole-N/m3'
-            IF(lwp) THEN
-               WRITE (numout,*) ' ===>>>> : w a r n i n g '
-               WRITE (numout,*) ' =======   ============= '
-               WRITE (numout,*) ' we force tracer unit'
-               WRITE(numout,*) ' tracer  ',ctrcnm(jn), 'UNIT= ',ctrcun(jn)
-            ENDIF 
-         ENDIF 
-      END DO              
-   END SUBROUTINE trc_ctl_lobster
-
-#else
-   !!----------------------------------------------------------------------
-   !!  Empty module :                                          No LOBSTER
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_ctl_lobster                 ! Dummy routine
-   END SUBROUTINE trc_ctl_lobster
-#endif
-
-   !!======================================================================
-END MODULE trcctl_lobster
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcexp.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcexp.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcexp.F90	(revision 2038)
@@ -21,6 +21,5 @@
    USE trctrp_lec
    USE prtctl_trc      ! Print control for debbuging
-   USE trdmld_trc
-   USE trdmld_trc_oce
+   USE trdmod_trc
    USE iom
 
@@ -75,5 +74,5 @@
       IF( l_trdtrc )THEN
          ALLOCATE( ztrbio(jpi,jpj,jpk) )
-         ztrbio(:,:,:) = tra(:,:,:,jpno3)
+         ztrbio(:,:,:) = tra(:,:,:,jp_lob_no3)
       ENDIF
 
@@ -82,5 +81,5 @@
             DO ji = fs_2, fs_jpim1
                ze3t = 1. / fse3t(ji,jj,jk)
-               tra(ji,jj,jk,jpno3) = tra(ji,jj,jk,jpno3) + ze3t * dmin3(ji,jj,jk) * fbod(ji,jj)
+               tra(ji,jj,jk,jp_lob_no3) = tra(ji,jj,jk,jp_lob_no3) + ze3t * dmin3(ji,jj,jk) * fbod(ji,jj)
             END DO
          END DO
@@ -96,7 +95,7 @@
          DO ji = fs_2, fs_jpim1
             ikbot = mbathy(ji,jj) - 1
-            tra(ji,jj,ikbot,jpno3) = tra(ji,jj,ikbot,jpno3) + sedlam * sedpocn(ji,jj) / fse3t(ji,jj,ikbot) 
+            tra(ji,jj,ikbot,jp_lob_no3) = tra(ji,jj,ikbot,jp_lob_no3) + sedlam * sedpocn(ji,jj) / fse3t(ji,jj,ikbot) 
             ! Deposition of organic matter in the sediment
-            zwork = vsed * trn(ji,jj,ikbot,jpdet)
+            zwork = vsed * trn(ji,jj,ikbot,jp_lob_det)
             sedpoca(ji,jj) = ( zwork + dminl(ji,jj) * fbod(ji,jj)   &
                &           - sedlam * sedpocn(ji,jj) - sedlostpoc * sedpocn(ji,jj) ) * rdt
@@ -107,5 +106,5 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1
-            tra(ji,jj,1,jpno3) = tra(ji,jj,1,jpno3) + zgeolpoc * cmask(ji,jj) / areacot / fse3t(ji,jj,1)
+            tra(ji,jj,1,jp_lob_no3) = tra(ji,jj,1,jp_lob_no3) + zgeolpoc * cmask(ji,jj) / areacot / fse3t(ji,jj,1)
          END DO
       END DO
@@ -114,5 +113,5 @@
  
       ! Oa & Ek: diagnostics depending on jpdia2d !          left as example
-#if defined key_trc_diaadd
+#if defined key_diatrc
 # if ! defined key_iomput
       trc2d(:,:,jp_lob0_2d + 18) = sedpocn(:,:)
@@ -124,7 +123,7 @@
       ! Leap-frog scheme (only in explicit case, otherwise the 
       ! ----------------  time stepping is already done in trczdf)
-      IF( l_trczdf_exp .AND. (ln_trcadv_cen2 .OR. ln_trcadv_tvd) ) THEN
-         zfact = 2. * rdttra(jk) * FLOAT( ndttrc ) 
-         IF( neuler == 0 .AND. kt == nittrc000 )   zfact = rdttra(jk) * FLOAT(ndttrc) 
+      IF( ln_trczdf_exp .AND. (ln_trcadv_cen2 .OR. ln_trcadv_tvd) ) THEN
+         zfact = 2. * rdttra(jk) * FLOAT( nn_dttrc ) 
+         IF( neuler == 0 .AND. kt == nittrc000 )   zfact = rdttra(jk) * FLOAT(nn_dttrc) 
          sedpoca(:,:) =  sedpocb(:,:) + zfact * sedpoca(:,:) 
       ENDIF
@@ -159,5 +158,5 @@
       !
       IF( l_trdtrc ) THEN
-         ztrbio(:,:,:) = tra(:,:,:,jpno3) - ztrbio(:,:,:)
+         ztrbio(:,:,:) = tra(:,:,:,jp_lob_no3) - ztrbio(:,:,:)
          jl = jp_lob0_trd + 16
          CALL trd_mod_trc( ztrbio, jl, kt )   ! handle the trend
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcini_lobster.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcini_lobster.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcini_lobster.F90	(revision 2038)
@@ -20,4 +20,6 @@
    USE oce_trc         ! ocean variables
    USE trc
+   USE lbclnk 
+   USE lib_mpp 
 
    IMPLICIT NONE
@@ -46,8 +48,11 @@
       !!----------------------------------------------------------------------
 
+      !  Control consitency
+      CALL trc_ctl_lobster
+
+
       IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) ' trc_ini_lobster :   LOBSTER biochemical model initialisation'
       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~~'
-
 
       ! initialization of fields for optical model
@@ -118,5 +123,5 @@
       ! Coastal mask 
       ! ------------   
-      cmask = 0.e0
+      cmask(:,:) = 0.e0
       DO ji = 2, jpi-1
          DO jj = 2, jpj-1
@@ -128,18 +133,16 @@
       END DO
 
-      cmask( 1 ,:) = cmask(jpi-1,:)
-      cmask(jpi,:) = cmask( 2   ,:)
-
-      !!gm BUG !!!!!   not valid in mpp and also not valid for north fold   !!!!!
+      CALL lbc_lnk( cmask, 'T', 1. )
 
       ! Coastal surface
       ! ---------------
       areacot = 0.e0
-      DO ji = 2, jpi-1
-         DO jj = 2, jpj-1
+      DO ji = 1, jpi
+         DO jj = 1, jpj
             areacot = areacot + e1t(ji,jj) * e2t(ji,jj) * cmask(ji,jj)
          END DO
       END DO
       !
+      IF( lk_mpp ) CALL mpp_sum( areacot )   ! sum over the global domain
 
       ! Initialization of tracer concentration in case of  no restart 
@@ -153,73 +156,73 @@
          
          DO jk = 1, 7
-            trn(:,:,jk,jpdet) = 0.016 * tmask(:,:,jk)
-            trn(:,:,jk,jpzoo) = 0.018 * tmask(:,:,jk)
-            trn(:,:,jk,jpphy) = 0.036 * tmask(:,:,jk) 
-            trn(:,:,jk,jpno3) = 1.e-5 * tmask(:,:,jk)
-            trn(:,:,jk,jpnh4) = 5.e-4 * tmask(:,:,jk)
-            trn(:,:,jk,jpdom) = 0.017 * tmask(:,:,jk)
-         END DO
-         
-         trn(:,:, 8,jpdet) = 0.020   * tmask(:,:, 8)
-         trn(:,:, 8,jpzoo) = 0.027   * tmask(:,:, 8)
-         trn(:,:, 8,jpphy) = 0.041   * tmask(:,:, 8)
-         trn(:,:, 8,jpno3) = 0.00022 * tmask(:,:, 8)
-         trn(:,:, 8,jpnh4) = 0.0033  * tmask(:,:, 8)
-         trn(:,:, 8,jpdom) = 0.021   * tmask(:,:, 8)
-         
-         trn(:,:, 9,jpdet) = 0.0556  * tmask(:,:, 9)
-         trn(:,:, 9,jpzoo) = 0.123   * tmask(:,:, 9)
-         trn(:,:, 9,jpphy) = 0.122   * tmask(:,:, 9)
-         trn(:,:, 9,jpno3) = 0.028   * tmask(:,:, 9)
-         trn(:,:, 9,jpnh4) = 0.024   * tmask(:,:, 9)
-         trn(:,:, 9,jpdom) = 0.06    * tmask(:,:, 9)
-         
-         trn(:,:,10,jpdet) = 0.025   * tmask(:,:,10)
-         trn(:,:,10,jpzoo) = 0.016   * tmask(:,:,10)
-         trn(:,:,10,jpphy) = 0.029   * tmask(:,:,10)
-         trn(:,:,10,jpno3) = 2.462   * tmask(:,:,10)
-         trn(:,:,10,jpnh4) = 0.04    * tmask(:,:,10)
-         trn(:,:,10,jpdom) = 0.022   * tmask(:,:,10)
-         
-         trn(:,:,11,jpdet) = 0.0057  * tmask(:,:,11)
-         trn(:,:,11,jpzoo) = 0.0005  * tmask(:,:,11)
-         trn(:,:,11,jpphy) = 0.0006  * tmask(:,:,11)
-         trn(:,:,11,jpno3) = 3.336   * tmask(:,:,11)
-         trn(:,:,11,jpnh4) = 0.005   * tmask(:,:,11)
-         trn(:,:,11,jpdom) = 0.004   * tmask(:,:,11)
-         
-         trn(:,:,12,jpdet) = 0.002   * tmask(:,:,12)
-         trn(:,:,12,jpzoo) = 1.e-6   * tmask(:,:,12)
-         trn(:,:,12,jpphy) = 5.e-6   * tmask(:,:,12)
-         trn(:,:,12,jpno3) = 4.24    * tmask(:,:,12)
-         trn(:,:,12,jpnh4) = 0.001   * tmask(:,:,12)
-         trn(:,:,12,jpdom) = 3.e-5   * tmask(:,:,12)
+            trn(:,:,jk,jp_lob_det) = 0.016 * tmask(:,:,jk)
+            trn(:,:,jk,jp_lob_zoo) = 0.018 * tmask(:,:,jk)
+            trn(:,:,jk,jp_lob_phy) = 0.036 * tmask(:,:,jk) 
+            trn(:,:,jk,jp_lob_no3) = 1.e-5 * tmask(:,:,jk)
+            trn(:,:,jk,jp_lob_nh4) = 5.e-4 * tmask(:,:,jk)
+            trn(:,:,jk,jp_lob_dom) = 0.017 * tmask(:,:,jk)
+         END DO
+         
+         trn(:,:, 8,jp_lob_det) = 0.020   * tmask(:,:, 8)
+         trn(:,:, 8,jp_lob_zoo) = 0.027   * tmask(:,:, 8)
+         trn(:,:, 8,jp_lob_phy) = 0.041   * tmask(:,:, 8)
+         trn(:,:, 8,jp_lob_no3) = 0.00022 * tmask(:,:, 8)
+         trn(:,:, 8,jp_lob_nh4) = 0.0033  * tmask(:,:, 8)
+         trn(:,:, 8,jp_lob_dom) = 0.021   * tmask(:,:, 8)
+         
+         trn(:,:, 9,jp_lob_det) = 0.0556  * tmask(:,:, 9)
+         trn(:,:, 9,jp_lob_zoo) = 0.123   * tmask(:,:, 9)
+         trn(:,:, 9,jp_lob_phy) = 0.122   * tmask(:,:, 9)
+         trn(:,:, 9,jp_lob_no3) = 0.028   * tmask(:,:, 9)
+         trn(:,:, 9,jp_lob_nh4) = 0.024   * tmask(:,:, 9)
+         trn(:,:, 9,jp_lob_dom) = 0.06    * tmask(:,:, 9)
+         
+         trn(:,:,10,jp_lob_det) = 0.025   * tmask(:,:,10)
+         trn(:,:,10,jp_lob_zoo) = 0.016   * tmask(:,:,10)
+         trn(:,:,10,jp_lob_phy) = 0.029   * tmask(:,:,10)
+         trn(:,:,10,jp_lob_no3) = 2.462   * tmask(:,:,10)
+         trn(:,:,10,jp_lob_nh4) = 0.04    * tmask(:,:,10)
+         trn(:,:,10,jp_lob_dom) = 0.022   * tmask(:,:,10)
+         
+         trn(:,:,11,jp_lob_det) = 0.0057  * tmask(:,:,11)
+         trn(:,:,11,jp_lob_zoo) = 0.0005  * tmask(:,:,11)
+         trn(:,:,11,jp_lob_phy) = 0.0006  * tmask(:,:,11)
+         trn(:,:,11,jp_lob_no3) = 3.336   * tmask(:,:,11)
+         trn(:,:,11,jp_lob_nh4) = 0.005   * tmask(:,:,11)
+         trn(:,:,11,jp_lob_dom) = 0.004   * tmask(:,:,11)
+         
+         trn(:,:,12,jp_lob_det) = 0.002   * tmask(:,:,12)
+         trn(:,:,12,jp_lob_zoo) = 1.e-6   * tmask(:,:,12)
+         trn(:,:,12,jp_lob_phy) = 5.e-6   * tmask(:,:,12)
+         trn(:,:,12,jp_lob_no3) = 4.24    * tmask(:,:,12)
+         trn(:,:,12,jp_lob_nh4) = 0.001   * tmask(:,:,12)
+         trn(:,:,12,jp_lob_dom) = 3.e-5   * tmask(:,:,12)
          
          DO jk=13,jpk
-            trn(:,:,jk,jpdet) = 0.e0
-            trn(:,:,jk,jpzoo) = 0.e0
-            trn(:,:,jk,jpphy) = 0.e0
-            trn(:,:,jk,jpnh4) = 0.e0
-            trn(:,:,jk,jpdom) = 0.e0
-         END DO
-         
-         trn(:,:,13,jpno3) = 5.31  * tmask(:,:,13)
-         trn(:,:,14,jpno3) = 6.73  * tmask(:,:,14)
-         trn(:,:,15,jpno3) = 8.32  * tmask(:,:,15)
-         trn(:,:,16,jpno3) = 10.13 * tmask(:,:,16)
-         trn(:,:,17,jpno3) = 11.95 * tmask(:,:,17)
-         trn(:,:,18,jpno3) = 13.57 * tmask(:,:,18)
-         trn(:,:,19,jpno3) = 15.08 * tmask(:,:,19)
-         trn(:,:,20,jpno3) = 16.41 * tmask(:,:,20)
-         trn(:,:,21,jpno3) = 17.47 * tmask(:,:,21)
-         trn(:,:,22,jpno3) = 18.29 * tmask(:,:,22)
-         trn(:,:,23,jpno3) = 18.88 * tmask(:,:,23)
-         trn(:,:,24,jpno3) = 19.30 * tmask(:,:,24)
-         trn(:,:,25,jpno3) = 19.68 * tmask(:,:,25)
-         trn(:,:,26,jpno3) = 19.91 * tmask(:,:,26)
-         trn(:,:,27,jpno3) = 19.99 * tmask(:,:,27)
-         trn(:,:,28,jpno3) = 20.01 * tmask(:,:,28)
-         trn(:,:,29,jpno3) = 20.01 * tmask(:,:,29)
-         trn(:,:,30,jpno3) = 20.01 * tmask(:,:,30)
+            trn(:,:,jk,jp_lob_det) = 0.e0
+            trn(:,:,jk,jp_lob_zoo) = 0.e0
+            trn(:,:,jk,jp_lob_phy) = 0.e0
+            trn(:,:,jk,jp_lob_nh4) = 0.e0
+            trn(:,:,jk,jp_lob_dom) = 0.e0
+         END DO
+         
+         trn(:,:,13,jp_lob_no3) = 5.31  * tmask(:,:,13)
+         trn(:,:,14,jp_lob_no3) = 6.73  * tmask(:,:,14)
+         trn(:,:,15,jp_lob_no3) = 8.32  * tmask(:,:,15)
+         trn(:,:,16,jp_lob_no3) = 10.13 * tmask(:,:,16)
+         trn(:,:,17,jp_lob_no3) = 11.95 * tmask(:,:,17)
+         trn(:,:,18,jp_lob_no3) = 13.57 * tmask(:,:,18)
+         trn(:,:,19,jp_lob_no3) = 15.08 * tmask(:,:,19)
+         trn(:,:,20,jp_lob_no3) = 16.41 * tmask(:,:,20)
+         trn(:,:,21,jp_lob_no3) = 17.47 * tmask(:,:,21)
+         trn(:,:,22,jp_lob_no3) = 18.29 * tmask(:,:,22)
+         trn(:,:,23,jp_lob_no3) = 18.88 * tmask(:,:,23)
+         trn(:,:,24,jp_lob_no3) = 19.30 * tmask(:,:,24)
+         trn(:,:,25,jp_lob_no3) = 19.68 * tmask(:,:,25)
+         trn(:,:,26,jp_lob_no3) = 19.91 * tmask(:,:,26)
+         trn(:,:,27,jp_lob_no3) = 19.99 * tmask(:,:,27)
+         trn(:,:,28,jp_lob_no3) = 20.01 * tmask(:,:,28)
+         trn(:,:,29,jp_lob_no3) = 20.01 * tmask(:,:,29)
+         trn(:,:,30,jp_lob_no3) = 20.01 * tmask(:,:,30)
 
 # elif defined key_gyre
@@ -227,16 +230,16 @@
          ! ----------------------
          ! here:  init NO3=f(density) by asklod AS Kremeur 2005-07
-         trn(:,:,:,jpdet) = 0.1 * tmask(:,:,:)
-         trn(:,:,:,jpzoo) = 0.1 * tmask(:,:,:)
-         trn(:,:,:,jpnh4) = 0.1 * tmask(:,:,:)
-         trn(:,:,:,jpphy) = 0.1 * tmask(:,:,:)
-         trn(:,:,:,jpdom) = 1.0 * tmask(:,:,:)
+         trn(:,:,:,jp_lob_det) = 0.1 * tmask(:,:,:)
+         trn(:,:,:,jp_lob_zoo) = 0.1 * tmask(:,:,:)
+         trn(:,:,:,jp_lob_nh4) = 0.1 * tmask(:,:,:)
+         trn(:,:,:,jp_lob_phy) = 0.1 * tmask(:,:,:)
+         trn(:,:,:,jp_lob_dom) = 1.0 * tmask(:,:,:)
          DO jk = 1, jpk
             DO jj = 1, jpj
                DO ji = 1, jpi
                   IF( rhd(ji,jj,jk) <= 24.5e-3 ) THEN
-                     trn(ji,jj,jk,jpno3) = 2. * tmask(ji,jj,jk)
+                     trn(ji,jj,jk,jp_lob_no3) = 2. * tmask(ji,jj,jk)
                   ELSE
-                     trn(ji,jj,jk,jpno3) = ( 15.55 * ( rhd(ji,jj,jk) * 1000. ) - 380.11 ) * tmask(ji,jj,jk)
+                     trn(ji,jj,jk,jp_lob_no3) = ( 15.55 * ( rhd(ji,jj,jk) * 1000. ) - 380.11 ) * tmask(ji,jj,jk)
                   ENDIF
                END DO
@@ -259,4 +262,78 @@
    END SUBROUTINE trc_ini_lobster
 
+   SUBROUTINE trc_ctl_lobster
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ctl_lobster  ***
+      !!
+      !! ** Purpose :   control the cpp options, namelist and files 
+      !!----------------------------------------------------------------------
+      INTEGER :: jl, jn
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' use LOBSTER biological model '
+
+      ! Check number of tracers
+      ! -----------------------
+      IF (jp_lobster /= 6) THEN
+          IF (lwp) THEN
+              WRITE (numout,*) ' ===>>>> : w a r n i n g '
+              WRITE (numout,*) ' =======   ============= '
+              WRITE (numout,*)                             &
+              &   ' STOP, change jp_lobster to 6 in '           &
+              &   ,'par_lobster.F90 '
+          END IF
+          STOP 'TRC_CTL'
+      END IF
+      ! Check tracer names
+      ! ------------------
+      IF(   ctrcnm(jp_lob_det) /= 'DET' .OR. ctrcnm(jp_lob_zoo) /= 'ZOO' .OR.   &
+         &  ctrcnm(jp_lob_phy) /= 'PHY' .OR. ctrcnm(jp_lob_no3) /= 'NO3' .OR.   &
+         &  ctrcnm(jp_lob_nh4) /= 'NH4' .OR. ctrcnm(jp_lob_dom) /= 'DOM' .OR.   &
+         &  ctrcnl(jp_lob_det) /= 'Detritus'                        .OR.   &
+         &  ctrcnl(jp_lob_zoo) /= 'Zooplankton concentration'       .OR.   &
+         &  ctrcnl(jp_lob_phy) /= 'Phytoplankton concentration'     .OR.   &
+         &  ctrcnl(jp_lob_no3) /= 'Nitrate concentration'           .OR.   &
+         &  ctrcnl(jp_lob_nh4) /= 'Ammonium concentration'          .OR.   &
+         &  ctrcnl(jp_lob_dom) /= 'Dissolved organic matter' ) THEN
+         ctrcnm(jp_lob_det)='DET'
+         ctrcnl(jp_lob_det)='Detritus'
+         ctrcnm(jp_lob_zoo)='ZOO'
+         ctrcnl(jp_lob_zoo)='Zooplankton concentration'
+         ctrcnm(jp_lob_phy)='PHY'
+         ctrcnl(jp_lob_phy)='Phytoplankton concentration'
+         ctrcnm(jp_lob_no3)='NO3'
+         ctrcnl(jp_lob_no3)='Nitrate concentration'
+         ctrcnm(jp_lob_nh4)='NH4'
+         ctrcnl(jp_lob_nh4)='Ammonium concentration'
+         ctrcnm(jp_lob_dom)='DOM'
+         ctrcnl(jp_lob_dom)='Dissolved organic matter'
+         IF(lwp) THEN
+            WRITE (numout,*) ' ===>>>> : w a r n i n g '
+            WRITE (numout,*) ' =======   ============= '
+            WRITE (numout,*) ' we force tracer names'
+            DO jl = 1, jp_lobster
+               jn = jp_lob0 + jl - 1
+               WRITE(numout,*) ' tracer nb: ',jn,' name = ',ctrcnm(jn), ctrcnl(jn)
+            END DO
+            WRITE(numout,*) ' '
+         ENDIF
+      ENDIF
+
+      ! Check tracer units
+      DO jl = 1, jp_lobster
+         jn = jp_lob0 + jl - 1
+         IF( ctrcun(jn) /= 'mmole-N/m3') THEN
+            ctrcun(jn) = 'mmole-N/m3'
+            IF(lwp) THEN
+               WRITE (numout,*) ' ===>>>> : w a r n i n g '
+               WRITE (numout,*) ' =======   ============= '
+               WRITE (numout,*) ' we force tracer unit'
+               WRITE(numout,*) ' tracer  ',ctrcnm(jn), 'UNIT= ',ctrcun(jn)
+            ENDIF
+         ENDIF
+      END DO
+
+   END SUBROUTINE trc_ctl_lobster
+
 #else
    !!----------------------------------------------------------------------
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trclsm_lobster.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trclsm_lobster.F90	(revision 2037)
+++ 	(revision )
@@ -1,393 +1,0 @@
-MODULE trclsm_lobster
-   !!======================================================================
-   !!                      ***  MODULE trclsm_lobster  ***
-   !! TOP :   initialisation of some run parameters for LOBSTER bio-model
-   !!======================================================================
-   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) from trclsm.lobster1.h90
-   !!----------------------------------------------------------------------
-#if defined key_lobster
-   !!----------------------------------------------------------------------
-   !!   'key_lobster'   :                                 LOBSTER bio-model
-   !!----------------------------------------------------------------------
-   !! trc_lsm_lobster      : LOBSTER model namelist read
-   !!----------------------------------------------------------------------
-   USE oce_trc         ! Ocean variables
-   USE par_trc         ! TOP parameters
-   USE trc             ! TOP variables
-   USE sms_lobster     ! sms trends
-   USE in_out_manager  ! I/O manager
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC   trc_lsm_lobster   ! called by trclsm.F90 module
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_lsm_lobster
-      !!----------------------------------------------------------------------
-      !!                     ***  trc_lsm_lobster  ***  
-      !!
-      !! ** Purpose :   read LOBSTER namelist
-      !!
-      !! ** input   :   file 'namelist.trc.sms' containing the following
-      !!             namelist: natbio, natopt, and natdbi ("key_trc_diabio")
-      !!----------------------------------------------------------------------
-      INTEGER ::   numnatl
-      !!
-#if defined key_trc_diaadd && ! defined key_iomput
-      INTEGER :: jl, jn
-      ! definition of additional diagnostic as a structure
-      TYPE DIAG
-         CHARACTER(len = 20)  :: snamedia   !: short name
-         CHARACTER(len = 80 ) :: lnamedia   !: long name
-         CHARACTER(len = 20 ) :: unitdia    !: unit
-      END TYPE DIAG
-
-      TYPE(DIAG) , DIMENSION(jp_lobster_2d) :: lobdia2d
-      TYPE(DIAG) , DIMENSION(jp_lobster_3d) :: lobdia3d
-#endif
-#if defined key_trc_diabio || defined key_trdmld_trc
-      INTEGER :: js, jd
-      ! definition of additional diagnostic as a structure
-      TYPE DIABIO
-         CHARACTER(len = 20)  :: snamebio   !: short name
-         CHARACTER(len = 80 ) :: lnamebio   !: long name
-         CHARACTER(len = 20 ) :: unitbio    !: unit
-      END TYPE DIABIO
-
-      TYPE(DIABIO) , DIMENSION(jp_lobster_trd) :: lobdiabio
-#endif
-
-      NAMELIST/namlobphy/ apmin, tmumax, rgamma, fphylab, tmmaxp, tmminp, &
-         &                rcchl, aki, toptp 
-      NAMELIST/namlobnut/ anmin, akno3, aknh4, taunn, psinut
-      NAMELIST/namlobzoo/ azmin, eggzoo, rgz, rppz, taus, aks, rpnaz,     &
-         &                rdnaz, tauzn, fzoolab, fdbod, tmmaxz, tmminz
-      NAMELIST/namlobdet/ admin, taudn, fdetlab, vsed
-      NAMELIST/namlobdom/ taudomn
-      NAMELIST/namlobsed/ sedlam, sedlostpoc
-      NAMELIST/namlobrat/ redf, reddom, slopet, tmaxr, tminr, xhr,        &
-         &                filmax, toptgz, tmaxgz, anumin, afdmin
-
-      NAMELIST/namlobopt/ xkg0, xkr0, xkgp, xkrp, xlg, xlr, rpig
-#if defined key_trc_diaadd && ! defined key_iomput
-      NAMELIST/namlobdia/nwritedia, lobdia3d, lobdia2d     ! additional diagnostics
-#endif
-#if defined key_trc_diabio || defined key_trdmld_trc
-      NAMELIST/namlobdbi/nwritebio, lobdiabio
-#endif
-      !!----------------------------------------------------------------------
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' trc_lsm_lobster : read LOBSTER namelists'
-      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~~'
-
-      !                               ! Open the namelist file
-      !                               ! ----------------------
-      CALL ctl_opn( numnatl, 'namelist_lobster', 'OLD', 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. )
-
-      ! namlobphy : parameters for phytoplankton
-      apmin   = 0. 
-      tmumax  = 0. 
-      rgamma  = 0. 
-      fphylab = 0.  
-      tmmaxp  = 0.
-      tmminp  = 0.
-      rcchl   = 0. 
-      aki     = 0. 
-      toptp   = 0. 
-
-      REWIND( numnatl )
-      READ  ( numnatl, namlobphy )
-
-      IF(lwp) THEN
-          WRITE(numout,*) ' Namelist namlobphy'
-          WRITE(numout,*) '    minimum phytoplancton concentration                  apmin     =', apmin
-          WRITE(numout,*) '    phyto max growth rate                                tmumax    =', 86400 * tmumax, ' d'
-          WRITE(numout,*) '    phytoplankton exudation fraction                     rgamma    =', rgamma
-          WRITE(numout,*) '    NH4 fraction of phytoplankton exsudation             fphylab   =', fphylab
-          WRITE(numout,*) '    maximal phyto mortality rate                         tmmaxp    =', 86400 * tmmaxp
-          WRITE(numout,*) '    minimal phyto mortality rate                         tmminp    =', 86400 * tmminp
-          WRITE(numout,*) '    carbone/chlorophyl ratio                             rcchl     =', rcchl
-          WRITE(numout,*) '    light hlaf saturation constant                       aki       =', aki
-          WRITE(numout,*) '    optimal photosynthesis temperature                   toptp     =', toptp
-          WRITE(numout,*) ' '
-      ENDIF
-
-      ! namlobnut : parameters for nutrients
-      anmin  = 0.
-      psinut = 0.
-      akno3  = 0.
-      aknh4  = 0.
-      taunn  = 0.
-
-      REWIND( numnatl )
-      READ  ( numnatl, namlobnut )
-      IF(lwp) THEN
-          WRITE(numout,*) ' Namelist namlobnut'
-          WRITE(numout,*) '    minimum nutrients     concentration                  anmin     =', anmin
-          WRITE(numout,*) '    half-saturation nutrient for no3 uptake              akno3     =', akno3
-          WRITE(numout,*) '    half-saturation nutrient for nh4 uptake              aknh4     =', aknh4
-          WRITE(numout,*) '    nitrification rate                                   taunn     =', taunn
-          WRITE(numout,*) '    inhibition of no3 uptake by nh4                      psinut    =', psinut
-          WRITE(numout,*) ' '
-      ENDIF
-
-      ! namlobzoo : parameters for zooplankton
-      azmin   = 0.
-      rgz     = 0.
-      rppz    = 0.
-      taus    = 0.
-      aks     = 0.
-      rpnaz   = 0.
-      rdnaz   = 0.
-      eggzoo  = 0.
-      tauzn   = 0.
-      tmmaxz  = 0.
-      tmminz  = 0.
-      fzoolab = 0.
-      fdbod   = 0.
-
-      REWIND( numnatl )
-      READ  ( numnatl, namlobzoo )
-
-      IF(lwp) THEN
-          WRITE(numout,*) ' Namelist namlobzoo'
-          WRITE(numout,*) '    minimum zooplancton   concentration                  azmin     =', azmin
-          WRITE(numout,*) '    minimum  for zoo concentration                       eggzoo    =', eggzoo
-          WRITE(numout,*) '    widtht of zoo temperature FUNCTION                   rgz       =', rgz
-          WRITE(numout,*) '    zoo preference for phyto                             rppz      =', rppz
-          WRITE(numout,*) '    maximal zoo grazing rate                             taus      =', 86400 * taus, ' d'
-          WRITE(numout,*) '    half saturation constant for zoo food                aks       =', aks
-          WRITE(numout,*) '    non-assimilated phyto by zoo                         rpnaz     =', rpnaz
-          WRITE(numout,*) '    non-assimilated detritus by zoo                      rdnaz     =', rdnaz
-          WRITE(numout,*) '    zoo specific excretion rate                          tauzn     =', 86400 * tauzn
-          WRITE(numout,*) '    maximal zoo mortality rate                           tmmaxz    =', 86400 * tmmaxz
-          WRITE(numout,*) '    minimal zoo mortality rate                           tmminz    =', 86400 * tmminz
-          WRITE(numout,*) '    NH4 fraction of zooplankton excretion                fzoolab   =', fzoolab
-          WRITE(numout,*) '    Zooplankton mortality fraction that goes to detritus fdbod     =', fdbod
-          WRITE(numout,*) ' '
-      ENDIF
-
-      ! namlobdet : parameters for detritus
-      admin   = 0.
-      taudn   = 0.
-      vsed    = 0.
-      fdetlab = 0.
-
-      REWIND( numnatl )
-      READ  ( numnatl, namlobdet )
-
-      IF(lwp) THEN
-          WRITE(numout,*) ' Namelist namlobdet'
-          WRITE(numout,*) '    minimum detritus      concentration                  admin     =', admin
-          WRITE(numout,*) '    detrital breakdown rate                              taudn     =', 86400 * taudn , ' d'
-          WRITE(numout,*) '    detritus sedimentation speed                         vsed      =', 86400 * vsed  , ' d'
-          WRITE(numout,*) '    NH4 fraction of detritus dissolution                 fdetlab   =', fdetlab
-          WRITE(numout,*) ' '
-      ENDIF
-
-      ! namlobdom : parameters for DOM
-      taudomn = 0.
-
-      REWIND( numnatl ) 
-      READ  ( numnatl, namlobdom )
-
-      IF(lwp) THEN
-          WRITE(numout,*) ' Namelist namlobdom'
-          WRITE(numout,*) '    dom remineralisation rate                            taudomn   =', taudomn
-          WRITE(numout,*) ' '
-      ENDIF
-
-      ! namlobsed : parameters from aphotic layers to sediment
-      sedlam     = 0.
-      sedlostpoc = 0.
-
-      REWIND( numnatl )
-      READ  ( numnatl, namlobsed )
-
-      IF(lwp) THEN
-          WRITE(numout,*) ' Namelist namlobsed'
-          WRITE(numout,*) '    time coeff of POC in sediments                       sedlam    =', sedlam
-          WRITE(numout,*) '    Sediment geol loss for POC                           sedlostpoc=', sedlostpoc
-          WRITE(numout,*) ' '
-      ENDIF
-
-      ! namlobrat : general coefficient
-      redf   = 0.
-      reddom = 0.
-      slopet = 0.
-      tmaxr  = 1./(     4.*rday)*0.
-      tminr  = 1./(24.*30.*rday)*0.
-      xhr    = 0.
-      filmax = 0.
-      toptgz = 0.
-      tmaxgz = 0.
-      anumin = 0.
-      afdmin = 0.
-
-      REWIND( numnatl )
-      READ  ( numnatl, namlobrat )
-
-      IF(lwp) THEN
-          WRITE(numout,*) ' Namelist namlobrat'
-          WRITE(numout,*) '    redfield ratio  c:n for phyto                        redf      =', redf 
-          WRITE(numout,*) '    redfield ratio  c:n for DOM                          reddom    =', reddom 
-          WRITE(numout,*) '    van t hoff coefficient                               slopet    =', slopet
-          WRITE(numout,*) '    maximum damping for d z or p                         tmaxr     =', tmaxr
-          WRITE(numout,*) '    damping-remineralisation rate                        tminr     =', tminr
-          WRITE(numout,*) '    coeff for martin''s remineralistion                  xhr       =', xhr
-          WRITE(numout,*) '    maximal mass clearance rate for zoo                  filmax    =', filmax
-          WRITE(numout,*) '    optimal temperature for zoo growth                   toptgz    =', toptgz
-          WRITE(numout,*) '    maximal temperature for zoo growth                   tmaxgz    =', tmaxgz
-          WRITE(numout,*) '    nutrient threshold for phyto mort                    anumin    =', anumin
-          WRITE(numout,*) '    food threshold for zoo mort                          afdmin    =', afdmin
-          WRITE(numout,*) ' '
-      ENDIF
-
-
-      ! namlobopt : optical parameters
-      xkg0  = 0. 
-      xkr0  = 0.
-      xkgp  = 0.
-      xkrp  = 0.
-      xlg   = 0.
-      xlr   = 0.
-      rpig  = 0.
-
-      REWIND( numnatl )
-      READ  ( numnatl, namlobopt )
-
-      IF(lwp) THEN                         
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist namlobopt'
-         WRITE(numout,*) '    green   water absorption coeff                       xkg0  = ', xkg0
-         WRITE(numout,*) '    red water absorption coeff                           xkr0  = ', xkr0
-         WRITE(numout,*) '    pigment red absorption coeff                         xkrp  = ', xkrp
-         WRITE(numout,*) '    pigment green absorption coeff                       xkgp  = ', xkgp
-         WRITE(numout,*) '    green chl exposant                                   xlg   = ', xlg
-         WRITE(numout,*) '    red   chl exposant                                   xlr   = ', xlr
-         WRITE(numout,*) '    chla/chla+phea ratio                                 rpig  = ', rpig
-         WRITE(numout,*) ' '
-      ENDIF
-
-#if defined key_trc_diaadd && ! defined key_iomput
-
-      ! Namelist namlobdia
-      ! -------------------
-      nwritedia = 10                   ! default values
-
-      DO jl = 1, jp_lobster_2d
-         jn = jp_lob0_2d + jl - 1
-         WRITE(ctrc2d(jn),'("2D_",I1)') jn                      ! short name
-         WRITE(ctrc2l(jn),'("2D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
-         ctrc2u(jn) = ' '                                       ! units
-      END DO
-      !                                 ! 3D output arrays
-      DO jl = 1, jp_lobster_3d
-         jn = jp_lob0_3d + jl - 1
-         WRITE(ctrc3d(jn),'("3D_",I1)') jn                      ! short name
-         WRITE(ctrc3l(jn),'("3D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
-         ctrc3u(jn) = ' '                                       ! units
-      END DO
-
-      REWIND( numnatl )               ! read natrtd
-      READ  ( numnatl, namlobdia )
-
-      DO jl = 1, jp_lobster_2d
-         jn = jp_lob0_2d + jl - 1
-         ctrc2d(jn) = lobdia2d(jl)%snamedia
-         ctrc2l(jn) = lobdia2d(jl)%lnamedia
-         ctrc2u(jn) = lobdia2d(jl)%unitdia
-      END DO
-
-      DO jl = 1, jp_lobster_3d
-         jn = jp_lob0_3d + jl - 1
-         ctrc3d(jn) = lobdia3d(jl)%snamedia
-         ctrc3l(jn) = lobdia3d(jl)%lnamedia
-         ctrc3u(jn) = lobdia3d(jl)%unitdia
-      END DO
-
-      IF(lwp) THEN                   ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist : natadd'
-         WRITE(numout,*) '    frequency of outputs for additional arrays nwritedia = ', nwritedia
-         DO jl = 1, jp_lobster_3d
-            jn = jp_lob0_3d + jl - 1
-            WRITE(numout,*) '   3d output field No : ',jn
-            WRITE(numout,*) '   short name         : ', TRIM(ctrc3d(jn))
-            WRITE(numout,*) '   long name          : ', TRIM(ctrc3l(jn))
-            WRITE(numout,*) '   unit               : ', TRIM(ctrc3u(jn))
-            WRITE(numout,*) ' '
-         END DO
-
-         DO jl = 1, jp_lobster_2d
-            jn = jp_lob0_2d + jl - 1
-            WRITE(numout,*) '   2d output field No : ',jn
-            WRITE(numout,*) '   short name         : ', TRIM(ctrc2d(jn))
-            WRITE(numout,*) '   long name          : ', TRIM(ctrc2l(jn))
-            WRITE(numout,*) '   unit               : ', TRIM(ctrc2u(jn))
-            WRITE(numout,*) ' '
-         END DO
-      ENDIF
-#endif
-
-#if defined key_trc_diabio || defined key_trdmld_trc
-      ! namlobdbi : bio diagnostics
-      nwritebio = 10                     ! default values
-
-      DO js = 1, jp_lobster_trd
-         jd = jp_lob0_trd + js - 1
-         IF(     jd <  10 ) THEN   ;   WRITE (ctrbio(jd),'("BIO_",I1)') jd      ! short name
-         ELSEIF (jd < 100 ) THEN   ;   WRITE (ctrbio(jd),'("BIO_",I2)') jd   
-         ELSE                      ;   WRITE (ctrbio(jd),'("BIO_",I3)') jd
-         ENDIF
-         WRITE(ctrbil(jd),'("BIOLOGICAL TREND NUMBER ",I2)') jd                 ! long name
-         ctrbiu(jd) = 'mmoleN/m3/s '                                            ! units
-      END DO
-
-      REWIND( numnatl )
-      READ  ( numnatl, namlobdbi ) 
- 
-      DO js = 1, jp_lobster_trd
-         jd = jp_lob0_trd + js - 1
-         ctrbio(jd) = lobdiabio(js)%snamebio
-         ctrbil(jd) = lobdiabio(js)%lnamebio
-         ctrbiu(jd) = lobdiabio(js)%unitbio
-      END DO
-
-      IF(lwp) THEN                   ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist : namlobdbi'
-         WRITE(numout,*) '    frequency of outputs for biological trends nwritebio = ', nwritebio
-         DO js = 1, jp_lobster_trd
-            jd = jp_lob0_trd + js - 1
-            WRITE(numout,*) '   biological trend No : ',jd
-            WRITE(numout,*) '   short name         : ', TRIM(ctrbio(jd))
-            WRITE(numout,*) '   long name          : ', TRIM(ctrbil(jd))
-            WRITE(numout,*) '   unit               : ', TRIM(ctrbiu(jd))
-            WRITE(numout,*) ' '
-         END DO
-      END IF
-#endif
-      !
-   END SUBROUTINE trc_lsm_lobster
-   
-#else
-   !!----------------------------------------------------------------------
-   !!  Dummy module :                                            No LOBSTER
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_lsm_lobster                      ! Empty routine
-   END  SUBROUTINE  trc_lsm_lobster
-#endif  
-
-   !!======================================================================
-END MODULE trclsm_lobster
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcnam_lobster.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcnam_lobster.F90	(revision 2038)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcnam_lobster.F90	(revision 2038)
@@ -0,0 +1,393 @@
+MODULE trcnam_lobster
+   !!======================================================================
+   !!                      ***  MODULE trcnam_lobster  ***
+   !! TOP :   initialisation of some run parameters for LOBSTER bio-model
+   !!======================================================================
+   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) from trcnam.lobster1.h90
+   !!----------------------------------------------------------------------
+#if defined key_lobster
+   !!----------------------------------------------------------------------
+   !!   'key_lobster'   :                                 LOBSTER bio-model
+   !!----------------------------------------------------------------------
+   !! trc_nam_lobster      : LOBSTER model namelist read
+   !!----------------------------------------------------------------------
+   USE oce_trc         ! Ocean variables
+   USE par_trc         ! TOP parameters
+   USE trc             ! TOP variables
+   USE sms_lobster     ! sms trends
+   USE in_out_manager  ! I/O manager
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   trc_nam_lobster   ! called by trcnam.F90 module
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
+   !! $Id: trcnam_lobster.F90 1581 2009-08-05 14:53:12Z smasson $ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+   SUBROUTINE trc_nam_lobster
+      !!----------------------------------------------------------------------
+      !!                     ***  trc_nam_lobster  ***  
+      !!
+      !! ** Purpose :   read LOBSTER namelist
+      !!
+      !! ** input   :   file 'namelist.trc.sms' containing the following
+      !!             namelist: natbio, natopt, and natdbi ("key_diabio")
+      !!----------------------------------------------------------------------
+      INTEGER ::   numnatl
+      !!
+#if defined key_diatrc && ! defined key_iomput
+      INTEGER :: jl, jn
+      ! definition of additional diagnostic as a structure
+      TYPE DIAG
+         CHARACTER(len = 20)  :: snamedia   !: short name
+         CHARACTER(len = 80 ) :: lnamedia   !: long name
+         CHARACTER(len = 20 ) :: unitdia    !: unit
+      END TYPE DIAG
+
+      TYPE(DIAG) , DIMENSION(jp_lobster_2d) :: lobdia2d
+      TYPE(DIAG) , DIMENSION(jp_lobster_3d) :: lobdia3d
+#endif
+#if defined key_diabio || defined key_trdmld_trc
+      INTEGER :: js, jd
+      ! definition of additional diagnostic as a structure
+      TYPE DIABIO
+         CHARACTER(len = 20)  :: snamebio   !: short name
+         CHARACTER(len = 80 ) :: lnamebio   !: long name
+         CHARACTER(len = 20 ) :: unitbio    !: unit
+      END TYPE DIABIO
+
+      TYPE(DIABIO) , DIMENSION(jp_lobster_trd) :: lobdiabio
+#endif
+
+      NAMELIST/namlobphy/ apmin, tmumax, rgamma, fphylab, tmmaxp, tmminp, &
+         &                rcchl, aki, toptp 
+      NAMELIST/namlobnut/ anmin, akno3, aknh4, taunn, psinut
+      NAMELIST/namlobzoo/ azmin, eggzoo, rgz, rppz, taus, aks, rpnaz,     &
+         &                rdnaz, tauzn, fzoolab, fdbod, tmmaxz, tmminz
+      NAMELIST/namlobdet/ admin, taudn, fdetlab, vsed
+      NAMELIST/namlobdom/ taudomn
+      NAMELIST/namlobsed/ sedlam, sedlostpoc
+      NAMELIST/namlobrat/ redf, reddom, slopet, tmaxr, tminr, xhr,        &
+         &                filmax, toptgz, tmaxgz, anumin, afdmin
+
+      NAMELIST/namlobopt/ xkg0, xkr0, xkgp, xkrp, xlg, xlr, rpig
+#if defined key_diatrc && ! defined key_iomput
+      NAMELIST/namlobdia/nwritedia, lobdia3d, lobdia2d     ! additional diagnostics
+#endif
+#if defined key_diabio || defined key_trdmld_trc
+      NAMELIST/namlobdbi/nwritebio, lobdiabio
+#endif
+      !!----------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' trc_nam_lobster : read LOBSTER namelists'
+      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~~'
+
+      !                               ! Open the namelist file
+      !                               ! ----------------------
+      CALL ctl_opn( numnatl, 'namelist_lobster', 'OLD', 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. )
+
+      ! namlobphy : parameters for phytoplankton
+      apmin   = 0. 
+      tmumax  = 0. 
+      rgamma  = 0. 
+      fphylab = 0.  
+      tmmaxp  = 0.
+      tmminp  = 0.
+      rcchl   = 0. 
+      aki     = 0. 
+      toptp   = 0. 
+
+      REWIND( numnatl )
+      READ  ( numnatl, namlobphy )
+
+      IF(lwp) THEN
+          WRITE(numout,*) ' Namelist namlobphy'
+          WRITE(numout,*) '    minimum phytoplancton concentration                  apmin     =', apmin
+          WRITE(numout,*) '    phyto max growth rate                                tmumax    =', 86400 * tmumax, ' d'
+          WRITE(numout,*) '    phytoplankton exudation fraction                     rgamma    =', rgamma
+          WRITE(numout,*) '    NH4 fraction of phytoplankton exsudation             fphylab   =', fphylab
+          WRITE(numout,*) '    maximal phyto mortality rate                         tmmaxp    =', 86400 * tmmaxp
+          WRITE(numout,*) '    minimal phyto mortality rate                         tmminp    =', 86400 * tmminp
+          WRITE(numout,*) '    carbone/chlorophyl ratio                             rcchl     =', rcchl
+          WRITE(numout,*) '    light hlaf saturation constant                       aki       =', aki
+          WRITE(numout,*) '    optimal photosynthesis temperature                   toptp     =', toptp
+          WRITE(numout,*) ' '
+      ENDIF
+
+      ! namlobnut : parameters for nutrients
+      anmin  = 0.
+      psinut = 0.
+      akno3  = 0.
+      aknh4  = 0.
+      taunn  = 0.
+
+      REWIND( numnatl )
+      READ  ( numnatl, namlobnut )
+      IF(lwp) THEN
+          WRITE(numout,*) ' Namelist namlobnut'
+          WRITE(numout,*) '    minimum nutrients     concentration                  anmin     =', anmin
+          WRITE(numout,*) '    half-saturation nutrient for no3 uptake              akno3     =', akno3
+          WRITE(numout,*) '    half-saturation nutrient for nh4 uptake              aknh4     =', aknh4
+          WRITE(numout,*) '    nitrification rate                                   taunn     =', taunn
+          WRITE(numout,*) '    inhibition of no3 uptake by nh4                      psinut    =', psinut
+          WRITE(numout,*) ' '
+      ENDIF
+
+      ! namlobzoo : parameters for zooplankton
+      azmin   = 0.
+      rgz     = 0.
+      rppz    = 0.
+      taus    = 0.
+      aks     = 0.
+      rpnaz   = 0.
+      rdnaz   = 0.
+      eggzoo  = 0.
+      tauzn   = 0.
+      tmmaxz  = 0.
+      tmminz  = 0.
+      fzoolab = 0.
+      fdbod   = 0.
+
+      REWIND( numnatl )
+      READ  ( numnatl, namlobzoo )
+
+      IF(lwp) THEN
+          WRITE(numout,*) ' Namelist namlobzoo'
+          WRITE(numout,*) '    minimum zooplancton   concentration                  azmin     =', azmin
+          WRITE(numout,*) '    minimum  for zoo concentration                       eggzoo    =', eggzoo
+          WRITE(numout,*) '    widtht of zoo temperature FUNCTION                   rgz       =', rgz
+          WRITE(numout,*) '    zoo preference for phyto                             rppz      =', rppz
+          WRITE(numout,*) '    maximal zoo grazing rate                             taus      =', 86400 * taus, ' d'
+          WRITE(numout,*) '    half saturation constant for zoo food                aks       =', aks
+          WRITE(numout,*) '    non-assimilated phyto by zoo                         rpnaz     =', rpnaz
+          WRITE(numout,*) '    non-assimilated detritus by zoo                      rdnaz     =', rdnaz
+          WRITE(numout,*) '    zoo specific excretion rate                          tauzn     =', 86400 * tauzn
+          WRITE(numout,*) '    maximal zoo mortality rate                           tmmaxz    =', 86400 * tmmaxz
+          WRITE(numout,*) '    minimal zoo mortality rate                           tmminz    =', 86400 * tmminz
+          WRITE(numout,*) '    NH4 fraction of zooplankton excretion                fzoolab   =', fzoolab
+          WRITE(numout,*) '    Zooplankton mortality fraction that goes to detritus fdbod     =', fdbod
+          WRITE(numout,*) ' '
+      ENDIF
+
+      ! namlobdet : parameters for detritus
+      admin   = 0.
+      taudn   = 0.
+      vsed    = 0.
+      fdetlab = 0.
+
+      REWIND( numnatl )
+      READ  ( numnatl, namlobdet )
+
+      IF(lwp) THEN
+          WRITE(numout,*) ' Namelist namlobdet'
+          WRITE(numout,*) '    minimum detritus      concentration                  admin     =', admin
+          WRITE(numout,*) '    detrital breakdown rate                              taudn     =', 86400 * taudn , ' d'
+          WRITE(numout,*) '    detritus sedimentation speed                         vsed      =', 86400 * vsed  , ' d'
+          WRITE(numout,*) '    NH4 fraction of detritus dissolution                 fdetlab   =', fdetlab
+          WRITE(numout,*) ' '
+      ENDIF
+
+      ! namlobdom : parameters for DOM
+      taudomn = 0.
+
+      REWIND( numnatl ) 
+      READ  ( numnatl, namlobdom )
+
+      IF(lwp) THEN
+          WRITE(numout,*) ' Namelist namlobdom'
+          WRITE(numout,*) '    dom remineralisation rate                            taudomn   =', taudomn
+          WRITE(numout,*) ' '
+      ENDIF
+
+      ! namlobsed : parameters from aphotic layers to sediment
+      sedlam     = 0.
+      sedlostpoc = 0.
+
+      REWIND( numnatl )
+      READ  ( numnatl, namlobsed )
+
+      IF(lwp) THEN
+          WRITE(numout,*) ' Namelist namlobsed'
+          WRITE(numout,*) '    time coeff of POC in sediments                       sedlam    =', sedlam
+          WRITE(numout,*) '    Sediment geol loss for POC                           sedlostpoc=', sedlostpoc
+          WRITE(numout,*) ' '
+      ENDIF
+
+      ! namlobrat : general coefficient
+      redf   = 0.
+      reddom = 0.
+      slopet = 0.
+      tmaxr  = 1./(     4.*rday)*0.
+      tminr  = 1./(24.*30.*rday)*0.
+      xhr    = 0.
+      filmax = 0.
+      toptgz = 0.
+      tmaxgz = 0.
+      anumin = 0.
+      afdmin = 0.
+
+      REWIND( numnatl )
+      READ  ( numnatl, namlobrat )
+
+      IF(lwp) THEN
+          WRITE(numout,*) ' Namelist namlobrat'
+          WRITE(numout,*) '    redfield ratio  c:n for phyto                        redf      =', redf 
+          WRITE(numout,*) '    redfield ratio  c:n for DOM                          reddom    =', reddom 
+          WRITE(numout,*) '    van t hoff coefficient                               slopet    =', slopet
+          WRITE(numout,*) '    maximum damping for d z or p                         tmaxr     =', tmaxr
+          WRITE(numout,*) '    damping-remineralisation rate                        tminr     =', tminr
+          WRITE(numout,*) '    coeff for martin''s remineralistion                  xhr       =', xhr
+          WRITE(numout,*) '    maximal mass clearance rate for zoo                  filmax    =', filmax
+          WRITE(numout,*) '    optimal temperature for zoo growth                   toptgz    =', toptgz
+          WRITE(numout,*) '    maximal temperature for zoo growth                   tmaxgz    =', tmaxgz
+          WRITE(numout,*) '    nutrient threshold for phyto mort                    anumin    =', anumin
+          WRITE(numout,*) '    food threshold for zoo mort                          afdmin    =', afdmin
+          WRITE(numout,*) ' '
+      ENDIF
+
+
+      ! namlobopt : optical parameters
+      xkg0  = 0. 
+      xkr0  = 0.
+      xkgp  = 0.
+      xkrp  = 0.
+      xlg   = 0.
+      xlr   = 0.
+      rpig  = 0.
+
+      REWIND( numnatl )
+      READ  ( numnatl, namlobopt )
+
+      IF(lwp) THEN                         
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist namlobopt'
+         WRITE(numout,*) '    green   water absorption coeff                       xkg0  = ', xkg0
+         WRITE(numout,*) '    red water absorption coeff                           xkr0  = ', xkr0
+         WRITE(numout,*) '    pigment red absorption coeff                         xkrp  = ', xkrp
+         WRITE(numout,*) '    pigment green absorption coeff                       xkgp  = ', xkgp
+         WRITE(numout,*) '    green chl exposant                                   xlg   = ', xlg
+         WRITE(numout,*) '    red   chl exposant                                   xlr   = ', xlr
+         WRITE(numout,*) '    chla/chla+phea ratio                                 rpig  = ', rpig
+         WRITE(numout,*) ' '
+      ENDIF
+
+#if defined key_diatrc && ! defined key_iomput
+
+      ! Namelist namlobdia
+      ! -------------------
+      nwritedia = 10                   ! default values
+
+      DO jl = 1, jp_lobster_2d
+         jn = jp_lob0_2d + jl - 1
+         WRITE(ctrc2d(jn),'("2D_",I1)') jn                      ! short name
+         WRITE(ctrc2l(jn),'("2D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
+         ctrc2u(jn) = ' '                                       ! units
+      END DO
+      !                                 ! 3D output arrays
+      DO jl = 1, jp_lobster_3d
+         jn = jp_lob0_3d + jl - 1
+         WRITE(ctrc3d(jn),'("3D_",I1)') jn                      ! short name
+         WRITE(ctrc3l(jn),'("3D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
+         ctrc3u(jn) = ' '                                       ! units
+      END DO
+
+      REWIND( numnatl )               ! read natrtd
+      READ  ( numnatl, namlobdia )
+
+      DO jl = 1, jp_lobster_2d
+         jn = jp_lob0_2d + jl - 1
+         ctrc2d(jn) = lobdia2d(jl)%snamedia
+         ctrc2l(jn) = lobdia2d(jl)%lnamedia
+         ctrc2u(jn) = lobdia2d(jl)%unitdia
+      END DO
+
+      DO jl = 1, jp_lobster_3d
+         jn = jp_lob0_3d + jl - 1
+         ctrc3d(jn) = lobdia3d(jl)%snamedia
+         ctrc3l(jn) = lobdia3d(jl)%lnamedia
+         ctrc3u(jn) = lobdia3d(jl)%unitdia
+      END DO
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : natadd'
+         WRITE(numout,*) '    frequency of outputs for additional arrays nwritedia = ', nwritedia
+         DO jl = 1, jp_lobster_3d
+            jn = jp_lob0_3d + jl - 1
+            WRITE(numout,*) '   3d output field No : ',jn
+            WRITE(numout,*) '   short name         : ', TRIM(ctrc3d(jn))
+            WRITE(numout,*) '   long name          : ', TRIM(ctrc3l(jn))
+            WRITE(numout,*) '   unit               : ', TRIM(ctrc3u(jn))
+            WRITE(numout,*) ' '
+         END DO
+
+         DO jl = 1, jp_lobster_2d
+            jn = jp_lob0_2d + jl - 1
+            WRITE(numout,*) '   2d output field No : ',jn
+            WRITE(numout,*) '   short name         : ', TRIM(ctrc2d(jn))
+            WRITE(numout,*) '   long name          : ', TRIM(ctrc2l(jn))
+            WRITE(numout,*) '   unit               : ', TRIM(ctrc2u(jn))
+            WRITE(numout,*) ' '
+         END DO
+      ENDIF
+#endif
+
+#if defined key_diabio || defined key_trdmld_trc
+      ! namlobdbi : bio diagnostics
+      nwritebio = 10                     ! default values
+
+      DO js = 1, jp_lobster_trd
+         jd = jp_lob0_trd + js - 1
+         IF(     jd <  10 ) THEN   ;   WRITE (ctrbio(jd),'("BIO_",I1)') jd      ! short name
+         ELSEIF (jd < 100 ) THEN   ;   WRITE (ctrbio(jd),'("BIO_",I2)') jd   
+         ELSE                      ;   WRITE (ctrbio(jd),'("BIO_",I3)') jd
+         ENDIF
+         WRITE(ctrbil(jd),'("BIOLOGICAL TREND NUMBER ",I2)') jd                 ! long name
+         ctrbiu(jd) = 'mmoleN/m3/s '                                            ! units
+      END DO
+
+      REWIND( numnatl )
+      READ  ( numnatl, namlobdbi ) 
+ 
+      DO js = 1, jp_lobster_trd
+         jd = jp_lob0_trd + js - 1
+         ctrbio(jd) = lobdiabio(js)%snamebio
+         ctrbil(jd) = lobdiabio(js)%lnamebio
+         ctrbiu(jd) = lobdiabio(js)%unitbio
+      END DO
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : namlobdbi'
+         WRITE(numout,*) '    frequency of outputs for biological trends nwritebio = ', nwritebio
+         DO js = 1, jp_lobster_trd
+            jd = jp_lob0_trd + js - 1
+            WRITE(numout,*) '   biological trend No : ',jd
+            WRITE(numout,*) '   short name         : ', TRIM(ctrbio(jd))
+            WRITE(numout,*) '   long name          : ', TRIM(ctrbil(jd))
+            WRITE(numout,*) '   unit               : ', TRIM(ctrbiu(jd))
+            WRITE(numout,*) ' '
+         END DO
+      END IF
+#endif
+      !
+   END SUBROUTINE trc_nam_lobster
+   
+#else
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                            No LOBSTER
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE trc_nam_lobster                      ! Empty routine
+   END  SUBROUTINE  trc_nam_lobster
+#endif  
+
+   !!======================================================================
+END MODULE trcnam_lobster
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcopt.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcopt.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcopt.F90	(revision 2038)
@@ -78,6 +78,4 @@
       zparg  (:,:,1) = zpar0m(:,:) * 0.5
 
-!!gm optimisation : introduce zcoef and LOG computed once for all
-
       !                                          ! Photosynthetically Available Radiation (PAR)
       zcoef = 12 * redf / rcchl / rpig           ! --------------------------------------
@@ -85,8 +83,5 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-!!gm           zpig = MAX( TINY(0.), trn(ji,jj,jk-1,jpphy) ) * zcoef
-!!gm           zkr  = xkr0 + xkrp * EXP( xlr * LOG(zpig) )
-!!gm           zkg  = xkg0 + xkgp * EXP( xlg * LOG(zpig) )
-               zpig = LOG(  MAX( TINY(0.), trn(ji,jj,jk-1,jpphy) ) * zcoef  )
+               zpig = LOG(  MAX( TINY(0.), trn(ji,jj,jk-1,jp_lob_phy) ) * zcoef  )
                zkr  = xkr0 + xkrp * EXP( xlr * zpig )
                zkg  = xkg0 + xkgp * EXP( xlg * zpig )
@@ -96,13 +91,10 @@
         END DO
       END DO
-!!gm optimisation : suppress one division
       DO jk = 1, jpkm1                                ! mean par at t-levels
          DO jj = 1, jpj
             DO ji = 1, jpi
-               zpig = LOG(  MAX( TINY(0.), trn(ji,jj,jk,jpphy) ) * zcoef  )
+               zpig = LOG(  MAX( TINY(0.), trn(ji,jj,jk,jp_lob_phy) ) * zcoef  )
                zkr  = xkr0 + xkrp * EXP( xlr * zpig )
                zkg  = xkg0 + xkgp * EXP( xlg * zpig )
-!!gm           zparr(ji,jj,jk) = zparr(ji,jj,jk) / zkr / fse3t(ji,jj,jk) * ( 1 - EXP( -zkr * fse3t(ji,jj,jk) ) )
-!!gm           zparg(ji,jj,jk) = zparg(ji,jj,jk) / zkg / fse3t(ji,jj,jk) * ( 1 - EXP( -zkg * fse3t(ji,jj,jk) ) )
                zparr(ji,jj,jk) = zparr(ji,jj,jk) / ( zkr * fse3t(ji,jj,jk) ) * ( 1 - EXP( -zkr * fse3t(ji,jj,jk) ) )
                zparg(ji,jj,jk) = zparg(ji,jj,jk) / ( zkg * fse3t(ji,jj,jk) ) * ( 1 - EXP( -zkg * fse3t(ji,jj,jk) ) )
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcrst_lobster.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcrst_lobster.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcrst_lobster.F90	(revision 2038)
@@ -43,6 +43,6 @@
       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
 
-      CALL iom_get( knum, jpdom_autoglo, 'SEDB'//ctrcnm(jpdet), sedpocb(:,:) ) 
-      CALL iom_get( knum, jpdom_autoglo, 'SEDN'//ctrcnm(jpdet), sedpocn(:,:) ) 
+      CALL iom_get( knum, jpdom_autoglo, 'SEDB'//ctrcnm(jp_lob_det), sedpocb(:,:) ) 
+      CALL iom_get( knum, jpdom_autoglo, 'SEDN'//ctrcnm(jp_lob_det), sedpocn(:,:) ) 
 
    END SUBROUTINE trc_rst_read_lobster
@@ -64,6 +64,6 @@
       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
 
-      CALL iom_rstput( kt, kitrst, knum, 'SEDB'//ctrcnm(jpdet), sedpocb(:,:) )
-      CALL iom_rstput( kt, kitrst, knum, 'SEDN'//ctrcnm(jpdet), sedpocn(:,:) )
+      CALL iom_rstput( kt, kitrst, knum, 'SEDB'//ctrcnm(jp_lob_det), sedpocb(:,:) )
+      CALL iom_rstput( kt, kitrst, knum, 'SEDN'//ctrcnm(jp_lob_det), sedpocn(:,:) )
 
    END SUBROUTINE trc_rst_wri_lobster
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcsed.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcsed.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcsed.F90	(revision 2038)
@@ -18,6 +18,5 @@
    USE sms_lobster
    USE lbclnk
-   USE trdmld_trc
-   USE trdmld_trc_oce
+   USE trdmod_trc
    USE iom
    USE prtctl_trc      ! Print control for debbuging
@@ -53,5 +52,5 @@
       !!                             tra = tra + dz(trn wn)
       !!        
-      !!              IF 'key_trc_diabio' is defined, the now vertical advection
+      !!              IF 'key_diabio' is defined, the now vertical advection
       !!              trend of passive tracers is saved for futher diagnostics.
       !!---------------------------------------------------------------------
@@ -61,5 +60,5 @@
       REAL(wp) ::   ztra
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zwork
-#if defined key_trc_diaadd && defined key_iomput
+#if defined key_diatrc && defined key_iomput
       REAL(wp), DIMENSION(jpi,jpj) ::  zw2d
 #endif
@@ -77,9 +76,9 @@
       ! --------------------------------------------
 
-      ! for detritus sedimentation only - jpdet
+      ! for detritus sedimentation only - jp_lob_det
       zwork(:,:,1  ) = 0.e0      ! surface value set to zero
       zwork(:,:,jpk) = 0.e0      ! bottom value  set to zero
 
-#if defined key_trc_diaadd && defined key_iomput
+#if defined key_diatrc && defined key_iomput
       zw2d(:,:) = 0.
 # endif
@@ -87,10 +86,10 @@
       IF( l_trdtrc )THEN
          ALLOCATE( ztrbio(jpi,jpj,jpk) )
-         ztrbio(:,:,:) = tra(:,:,:,jpdet)
+         ztrbio(:,:,:) = tra(:,:,:,jp_lob_det)
       ENDIF
 
       ! tracer flux at w-point: we use -vsed (downward flux)  with simplification : no e1*e2
       DO jk = 2, jpkm1
-         zwork(:,:,jk) = -vsed * trn(:,:,jk-1,jpdet)
+         zwork(:,:,jk) = -vsed * trn(:,:,jk-1,jp_lob_det)
       END DO
 
@@ -100,9 +99,9 @@
             DO ji = 1,jpi
                ztra  = - ( zwork(ji,jj,jk) - zwork(ji,jj,jk+1) ) / fse3t(ji,jj,jk)
-               tra(ji,jj,jk,jpdet) = tra(ji,jj,jk,jpdet) + ztra
-#if defined key_trc_diabio
+               tra(ji,jj,jk,jp_lob_det) = tra(ji,jj,jk,jp_lob_det) + ztra
+#if defined key_diabio
                trbio(ji,jj,jk,jp_lob0_trd + 7) = ztra
 #endif
-#if defined key_trc_diaadd
+#if defined key_diatrc
 # if ! defined key_iomput
                trc2d(ji,jj,jp_lob0_2d + 7) = trc2d(ji,jj,jp_lob0_2d + 7) + ztra * fse3t(ji,jj,jk) * 86400.
@@ -115,9 +114,9 @@
       END DO
 
-#if defined key_trc_diabio
+#if defined key_diabio
       jl = jp_lob0_trd + 7
       CALL lbc_lnk (trbio(:,:,1,jl), 'T', 1. )    ! Lateral boundary conditions on trcbio
 #endif
-#if defined key_trc_diaadd
+#if defined key_diatrc
 # if ! defined key_iomput
       jl = jp_lob0_2d + 7
@@ -131,5 +130,5 @@
 
       IF( l_trdtrc ) THEN
-         ztrbio(:,:,:) = tra(:,:,:,jpdet) - ztrbio(:,:,:)
+         ztrbio(:,:,:) = tra(:,:,:,jp_lob_det) - ztrbio(:,:,:)
          jl = jp_lob0_trd + 7
          CALL trd_mod_trc( ztrbio, jl, kt )   ! handle the trend
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcsms_lobster.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcsms_lobster.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/LOBSTER/trcsms_lobster.F90	(revision 2038)
@@ -19,5 +19,6 @@
    USE trcsed
    USE trcexp
-   USE trdmld_trc_oce
+   USE trdmod_oce
+   USE trdmod_trc
    USE trdmld_trc
 
@@ -50,9 +51,6 @@
 
       CALL trc_opt( kt )      ! optical model
-
       CALL trc_bio( kt )      ! biological model
-
       CALL trc_sed( kt )      ! sedimentation model
-
       CALL trc_exp( kt )      ! export
 
@@ -60,5 +58,5 @@
           DO jn = jp_lob0, jp_lob1
             ztrlob(:,:,:) = tra(:,:,:,jn)
-            CALL trd_mod_trc( ztrlob, jn, jptrc_trd_sms, kt )   ! save trends
+            CALL trd_mod_trc( ztrlob, jn, jptra_trd_sms, kt )   ! save trends
           END DO
       END IF
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/par_my_trc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/par_my_trc.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/par_my_trc.F90	(revision 2038)
@@ -44,6 +44,6 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_my_trc     = .TRUE.   !: PTS flag 
    INTEGER, PUBLIC, PARAMETER ::   jp_my_trc     =  2       !: number of PTS tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_my_trc_2d  =  0       !: additional 2d output arrays ('key_trc_diaadd')
-   INTEGER, PUBLIC, PARAMETER ::   jp_my_trc_3d  =  0       !: additional 3d output arrays ('key_trc_diaadd')
+   INTEGER, PUBLIC, PARAMETER ::   jp_my_trc_2d  =  0       !: additional 2d output arrays ('key_diatrc')
+   INTEGER, PUBLIC, PARAMETER ::   jp_my_trc_3d  =  0       !: additional 3d output arrays ('key_diatrc')
    INTEGER, PUBLIC, PARAMETER ::   jp_my_trc_trd =  0       !: number of sms trends for MY_TRC
 
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcctl_my_trc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcctl_my_trc.F90	(revision 2037)
+++ 	(revision )
@@ -1,62 +1,0 @@
-MODULE trcctl_my_trc
-   !!======================================================================
-   !!                         ***  trcctl_my_trc.F90  ***
-   !! TOP :                Control of MY_TRC biogeochemical model
-   !!======================================================================
-   !!----------------------------------------------------------------------
-   !! History :   1.0  !  2000-12 (C. Ethe) assign a parameter to name individual tracers
-   !!----------------------------------------------------------------------
-
-#if defined key_my_trc
-
-   USE oce_trc
-   USE trc
-
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC trc_ctl_my_trc     ! called by ???
-
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_ctl_my_trc
-      !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE trc_ctl_pisces  ***
-      !!
-      !! ** Purpose :   control the cpp options, namelist and files 
-      !!----------------------------------------------------------------------
-
-      INTEGER :: jl, jn
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' use COLOR tracer '
-
-      DO jn = 1, jp_my_trc
-         jn = jp_myt0 + jl - 1
-         WRITE(ctrcnm(jn),'(a,i2.2)') 'CLR',jn
-         ctrcnl(jn)='Color concentration'
-         ctrcun(jn)='N/A'
-      END DO
-
-
-   END SUBROUTINE trc_ctl_my_trc
-
-#else
-   !!----------------------------------------------------------------------
-   !!  Empty module :                                            No PISCES
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_ctl_my_trc               ! Dummy routine
-   END SUBROUTINE trc_ctl_my_trc
-#endif
-
-   !!======================================================================
-END MODULE trcctl_my_trc
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcini_my_trc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcini_my_trc.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcini_my_trc.F90	(revision 2038)
@@ -37,5 +37,7 @@
       !! ** Method  : - Read the namcfc namelist and check the parameter values
       !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
+
+      !  Control consitency
+      CALL trc_ctl_my_trc
 
       IF(lwp) WRITE(numout,*)
@@ -48,4 +50,26 @@
    END SUBROUTINE trc_ini_my_trc
    
+   SUBROUTINE trc_ctl_my_trc
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ctl_pisces  ***
+      !!
+      !! ** Purpose :   control the cpp options, namelist and files 
+      !!----------------------------------------------------------------------
+
+      INTEGER :: jl, jn
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' use COLOR tracer '
+
+      DO jl = 1, jp_my_trc
+         jn = jp_myt0 + jl - 1
+         WRITE(ctrcnm(jn),'(a,i2.2)') 'CLR',jn
+         ctrcnl(jn)='Color concentration'
+         ctrcun(jn)='N/A'
+      END DO
+
+
+   END SUBROUTINE trc_ctl_my_trc
+
 #else
    !!----------------------------------------------------------------------
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trclsm_my_trc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trclsm_my_trc.F90	(revision 2037)
+++ 	(revision )
@@ -1,58 +1,0 @@
-MODULE trclsm_my_trc
-   !!======================================================================
-   !!                      ***  MODULE trclsm_my_trc  ***
-   !! TOP :   initialisation of some run parameters for LOBSTER bio-model
-   !!======================================================================
-   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) Original code
-   !!----------------------------------------------------------------------
-#if defined key_my_trc
-   !!----------------------------------------------------------------------
-   !!   'key_my_trc'   :                                       MY_TRC model
-   !!----------------------------------------------------------------------
-   !! trc_lsm_my_trc      : MY_TRC model initialisation
-   !!----------------------------------------------------------------------
-   USE oce_trc         ! Ocean variables
-   USE par_trc         ! TOP parameters
-   USE trc             ! TOP variables
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC   trc_lsm_my_trc   ! called by trclsm.F90 module
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_lsm_my_trc
-      !!----------------------------------------------------------------------
-      !!                     ***  trc_lsm_my_trc  ***  
-      !!
-      !! ** Purpose :   read MY_TRC namelist
-      !!
-      !! ** input   :   file 'namelist.trc.sms' containing the following
-      !!             namelist: natbio, natopt, and natdbi ("key_trc_diabio")
-      !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
-      !
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' trc_lsm_my_trc : read MY_TRC namelists'
-      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~~'
-      !
-   END SUBROUTINE trc_lsm_my_trc
-   
-#else
-   !!----------------------------------------------------------------------
-   !!  Dummy module :                                             No MY_TRC
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_lsm_my_trc                      ! Empty routine
-   END  SUBROUTINE  trc_lsm_my_trc
-#endif  
-
-   !!======================================================================
-END MODULE trclsm_my_trc
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcnam_my_trc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcnam_my_trc.F90	(revision 2038)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcnam_my_trc.F90	(revision 2038)
@@ -0,0 +1,55 @@
+MODULE trcnam_my_trc
+   !!======================================================================
+   !!                      ***  MODULE trcnam_my_trc  ***
+   !! TOP :   initialisation of some run parameters for LOBSTER bio-model
+   !!======================================================================
+   !! History :   2.0  !  2007-12  (C. Ethe, G. Madec) Original code
+   !!----------------------------------------------------------------------
+#if defined key_my_trc
+   !!----------------------------------------------------------------------
+   !!   'key_my_trc'   :                                       MY_TRC model
+   !!----------------------------------------------------------------------
+   !! trc_nam_my_trc      : MY_TRC model initialisation
+   !!----------------------------------------------------------------------
+   USE oce_trc         ! Ocean variables
+   USE par_trc         ! TOP parameters
+   USE trc             ! TOP variables
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   trc_nam_my_trc   ! called by trcnam.F90 module
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
+   !! $Id: trcnam_my_trc.F90 1162 2008-07-02 09:33:33Z cetlod $ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+   SUBROUTINE trc_nam_my_trc
+      !!----------------------------------------------------------------------
+      !!                     ***  trc_nam_my_trc  ***  
+      !!
+      !! ** Purpose :   read MY_TRC namelist
+      !!
+      !!----------------------------------------------------------------------
+      !
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' trc_nam_my_trc : read MY_TRC namelists'
+      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~~'
+      !
+   END SUBROUTINE trc_nam_my_trc
+   
+#else
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                             No MY_TRC
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE trc_nam_my_trc                      ! Empty routine
+   END  SUBROUTINE  trc_nam_my_trc
+#endif  
+
+   !!======================================================================
+END MODULE trcnam_my_trc
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90	(revision 2038)
@@ -15,6 +15,6 @@
    USE oce_trc         ! Ocean variables
    USE trc             ! TOP variables
-   USE trdmld_trc_oce
-   USE trdmld_trc
+   USE trdmod_oce
+   USE trdmod_trc
 
    IMPLICIT NONE
@@ -64,5 +64,5 @@
           DO jn = jp_myt0, jp_myt1
             ztrmyt(:,:,:) = tra(:,:,:,jn)
-            CALL trd_mod_trc( ztrmyt, jn, jptrc_trd_sms, kt )   ! save trends
+            CALL trd_mod_trc( ztrmyt, jn, jptra_trd_sms, kt )   ! save trends
           END DO
       END IF
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zflx.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zflx.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zflx.F90	(revision 2038)
@@ -75,5 +75,5 @@
       REAL(wp) ::   zph, zah2, zbot, zdic, zalk, zsch_o2, zalka, zsch_co2
       REAL(wp), DIMENSION(jpi,jpj) ::   zkgco2, zkgo2, zh2co3
-#if defined key_trc_diaadd && defined key_iomput
+#if defined key_diatrc && defined key_iomput
       REAL(wp), DIMENSION(jpi,jpj) ::  zcflx, zoflx, zkg, zdpco2, zdpo2
 #endif
@@ -138,5 +138,5 @@
             ! Compute the piston velocity for O2 and CO2
             zkgwan = 0.3 * zws  + 2.5 * ( 0.5246 + 0.016256 * ztc + 0.00049946  * ztc2 )
-# if defined key_off_degrad
+# if defined key_degrad
             zkgwan = zkgwan * xconv * ( 1.- fr_i(ji,jj) ) * tmask(ji,jj,1) * facvol(ji,jj,1)
 #else
@@ -169,5 +169,5 @@
             tra(ji,jj,1,jpoxy) = tra(ji,jj,1,jpoxy) + ( zfld16 - zflu16 ) / fse3t(ji,jj,1)
 
-#if defined key_trc_diaadd 
+#if defined key_diatrc 
             ! Save diagnostics
 #  if ! defined key_iomput
@@ -228,5 +228,5 @@
       ENDIF
 
-# if defined key_trc_diaadd && defined key_iomput
+# if defined key_diatrc && defined key_iomput
       CALL iom_put( "Cflx" , zcflx  )
       CALL iom_put( "Oflx" , zoflx  )
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zlys.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zlys.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zlys.F90	(revision 2038)
@@ -65,5 +65,5 @@
       REAL(wp) ::   zomegaca, zexcess, zexcess0
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zco3
-#if defined key_trc_dia3d && defined key_iomput
+#if defined key_diatrc && defined key_iomput
       REAL(wp) ::   zrfact2
       REAL(wp), DIMENSION(jpi,jpj,jpk) :: zcaldiss
@@ -76,5 +76,5 @@
       zco3(:,:,:) = 0.
 
-# if defined key_trc_dia3d && defined key_iomput
+# if defined key_diatrc && defined key_iomput
       zcaldiss(:,:,:) = 0.
 # endif
@@ -146,5 +146,5 @@
                !       (ACCORDING TO THIS FORMULATION ALSO SOME PARTICULATE
                !       CACO3 GETS DISSOLVED EVEN IN THE CASE OF OVERSATURATION)
-# if defined key_off_degrad
+# if defined key_degrad
               zdispot = kdca * zexcess * trn(ji,jj,jk,jpcal) * facvol(ji,jj,jk)
 # else
@@ -160,5 +160,5 @@
               tra(ji,jj,jk,jpdic) = tra(ji,jj,jk,jpdic) +      zremco3
 
-# if defined key_trc_dia3d && defined key_iomput
+# if defined key_diatrc && defined key_iomput
               zcaldiss(ji,jj,jk) = zremco3  ! calcite dissolution
 # endif
@@ -167,5 +167,5 @@
       END DO
 
-# if defined key_trc_diaadd &&  defined key_trc_dia3d
+# if defined key_diatrc
 #  if ! defined key_iomput
       trc3d(:,:,:,jp_pcs0_3d    ) = hi  (:,:,:)          * tmask(:,:,:)
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zmeso.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zmeso.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zmeso.F90	(revision 2038)
@@ -74,5 +74,5 @@
       REAL(wp),DIMENSION(jpi,jpj,jpk) :: zgrazfff,zgrazffe
       CHARACTER (len=25) :: charout
-#if defined key_trc_diaadd && defined key_trc_dia3d && defined key_iomput
+#if defined key_diatrc && defined key_iomput
       REAL(wp) :: zrfact2
 #endif
@@ -102,5 +102,5 @@
 
                zcompam = MAX( ( trn(ji,jj,jk,jpmes) - 1.e-9 ), 0.e0 )
-# if defined key_off_degrad
+# if defined key_degrad
                zfact   = zstep * tgfunc(ji,jj,jk) * zcompam * facvol(ji,jj,jk)
 # else
@@ -140,5 +140,5 @@
 
                zgraze2 = grazrat2 * zstep * Tgfunc2(ji,jj,jk) * zdenom    &
-# if defined key_off_degrad
+# if defined key_degrad
                   &     * facvol(ji,jj,jk)          &
 # endif
@@ -168,5 +168,5 @@
 !    ----------------------------------
 # if ! defined key_kriest
-#   if ! defined key_off_degrad
+#   if ! defined key_degrad
                zgrazffe(ji,jj,jk) = grazflux * zstep * wsbio4(ji,jj,jk)          &
                   &                 * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jpgoc) * trn(ji,jj,jk,jpmes)
@@ -181,5 +181,5 @@
 !!               zgrazffe(ji,jj,jk) = 0.5 * 1.3e-2 / 5.5e-7 * 0.3 * zstep * wsbio3(ji,jj,jk)     &
 !!                  &     * tgfunc(ji,jj,jk) * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpmes)    &
-#  if defined key_off_degrad
+#  if defined key_degrad
 !!                  &     * facvol(ji,jj,jk)          &
 #  endif
@@ -187,5 +187,5 @@
 !!--------------------------- KRIEST3 -------------------------------------------
 
-#  if ! defined key_off_degrad
+#  if ! defined key_degrad
               zgrazffe(ji,jj,jk) = grazflux * zstep * wsbio3(ji,jj,jk)     &
                   &                * tgfunc2(ji,jj,jk) * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpmes)
@@ -202,5 +202,5 @@
       END DO
       
-#if defined key_trc_dia3d
+#if defined key_diatrc
       ! Total grazing ( grazing by microzoo is already computed in p4zmicro ) 
       grazing(:,:,:) = grazing(:,:,:) + (  zgrazd  (:,:,:) + zgrazz  (:,:,:) + zgrazn(:,:,:) &
@@ -281,5 +281,5 @@
 
                zprcaca = xfracal(ji,jj,jk) * unass2 * zgrazn(ji,jj,jk)
-#if defined key_trc_dia3d
+#if defined key_diatrc
                prodcal(ji,jj,jk) = prodcal(ji,jj,jk) + zprcaca  ! prodcal=prodcal(nanophy)+prodcal(microzoo)+prodcal(mesozoo)
 #endif
@@ -314,5 +314,5 @@
       END DO
       !
-#if defined key_trc_diaadd && defined key_trc_dia3d && defined key_iomput
+#if defined key_diatrc && defined key_iomput
       zrfact2 = 1.e3 * rfact2r
       ! Total grazing of phyto by zoo
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zmicro.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zmicro.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zmicro.F90	(revision 2038)
@@ -84,5 +84,5 @@
       zgrazpf(:,:,:) = 0.
 
-#if defined key_trc_dia3d
+#if defined key_diatrc
       grazing(:,:,:) = 0.  !: Initialisation of  grazing
 #endif
@@ -95,5 +95,5 @@
 
                zcompaz = MAX( ( trn(ji,jj,jk,jpzoo) - 1.e-9 ), 0.e0 )
-# if defined key_off_degrad
+# if defined key_degrad
                zfact   = zstep * tgfunc(ji,jj,jk) * zcompaz *facvol(ji,jj,jk)
 # else
@@ -132,5 +132,5 @@
 
                zgraze = grazrat * zstep * tgfunc(ji,jj,jk)     &
-# if defined key_off_degrad
+# if defined key_degrad
                   &      * facvol(ji,jj,jk)         &
 # endif
@@ -155,5 +155,5 @@
       END DO
       
-#if defined key_trc_dia3d
+#if defined key_diatrc
       ! Grazing by microzooplankton
       grazing(:,:,:) = grazing(:,:,:) + zgrazp(:,:,:) + zgrazm(:,:,:) + zgrazsd(:,:,:) 
@@ -220,5 +220,5 @@
                  &     - (1.-unass) * zgrazmf(ji,jj,jk)
                zprcaca = xfracal(ji,jj,jk) * unass * zgrazp(ji,jj,jk)
-#if defined key_trc_dia3d
+#if defined key_diatrc
                prodcal(ji,jj,jk) = prodcal(ji,jj,jk) + zprcaca  ! prodcal=prodcal(nanophy)+prodcal(microzoo)+prodcal(mesozoo)
 #endif
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zmort.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zmort.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zmort.F90	(revision 2038)
@@ -89,5 +89,5 @@
 
 
-#if defined key_trc_dia3d
+#if defined key_diatrc
      prodcal(:,:,:) = 0.  !: Initialisation of calcite production variable
 #endif
@@ -103,5 +103,5 @@
 !     -----------------------------------------------------------------
                zrespp = wchl * 1.e6 * zstep * xdiss(ji,jj,jk)   &
-# if defined key_off_degrad
+# if defined key_degrad
                   &        * facvol(ji,jj,jk)     &
 # endif
@@ -113,5 +113,5 @@
 !     ----------------------------------------------------------
                ztortp = mprat * zstep * trn(ji,jj,jk,jpphy)          &
-# if defined key_off_degrad
+# if defined key_degrad
                   &          * facvol(ji,jj,jk)     &
 # endif
@@ -130,5 +130,5 @@
                tra(ji,jj,jk,jpnfe) = tra(ji,jj,jk,jpnfe) - zmortp * zfactfe
                zprcaca = xfracal(ji,jj,jk) * zmortp
-#if defined key_trc_dia3d
+#if defined key_diatrc
                prodcal(ji,jj,jk) = prodcal(ji,jj,jk) + zprcaca  ! prodcal=prodcal(nanophy)+prodcal(microzoo)+prodcal(mesozoo)
 #endif
@@ -192,5 +192,5 @@
 
                zrespp2  = 1.e6 * zstep * (  wchl + wchld * ( 1.- xlimdia(ji,jj,jk) )  )    &
-# if defined key_off_degrad
+# if defined key_degrad
                   &       * facvol(ji,jj,jk)       &
 # endif
@@ -201,5 +201,5 @@
 !     ------------------------
                ztortp2  = mprat2 * zstep * trn(ji,jj,jk,jpdia)     &
-# if defined key_off_degrad
+# if defined key_degrad
                   &        * facvol(ji,jj,jk)       &
 # endif
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zopt.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zopt.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zopt.F90	(revision 2038)
@@ -16,5 +16,4 @@
    USE trc            ! tracer variables
    USE oce_trc        ! tracer-ocean share variables
-   USE trc_oce        ! ocean-tracer share variables
    USE sms_pisces     ! Source Minus Sink of PISCES
    USE iom
@@ -227,5 +226,5 @@
       END DO
 
-#if defined key_trc_diaadd
+#if defined key_diatrc
 # if ! defined key_iomput
       ! save for outputs
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zprod.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zprod.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zprod.F90	(revision 2038)
@@ -79,5 +79,5 @@
       REAL(wp) ::   zpislopen  , zpislope2n
       REAL(wp) ::   zrum, zcodel, zargu, zvol
-#if defined key_trc_diaadd && defined key_trc_dia3d
+#if defined key_diatrc
       REAL(wp) ::   zrfact2
 #endif
@@ -109,5 +109,5 @@
       ! Computation of the optimal production
 
-# if defined key_off_degrad
+# if defined key_degrad
       prmax(:,:,:) = 0.6 / rday * tgfunc(:,:,:) * facvol(:,:,:)
 # else
@@ -335,5 +335,5 @@
           DO ji = 1, jpi
              zvol = cvol(ji,jj,jk)
-#if defined key_off_degrad
+#if defined key_degrad
              zvol = zvol * facvol(ji,jj,jk)
 #endif
@@ -353,5 +353,5 @@
       ENDIF
 
-#if defined key_trc_diaadd && defined key_trc_dia3d && ! defined key_iomput
+#if defined key_diatrc && ! defined key_iomput
       !   Supplementary diagnostics
       zrfact2 = 1.e3 * rfact2r
@@ -367,5 +367,5 @@
 #endif
 
-#if defined key_trc_diaadd && defined key_trc_dia3d && defined key_iomput
+#if defined key_diatrc && defined key_iomput
       zrfact2 = 1.e3 * rfact2r
       IF ( jnt == nrdttrc ) then
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zrem.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zrem.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zrem.F90	(revision 2038)
@@ -136,5 +136,5 @@
 !     ----------------------------------------------------------------
                zremik = xremik * xstep / 1.e-6 * xlimbac(ji,jj,jk)         &
-# if defined key_off_degrad
+# if defined key_degrad
                   &            * facvol(ji,jj,jk)              &
 # endif
@@ -172,5 +172,5 @@
 !    ----------------------------------------------------------
                zonitr  = nitrif * xstep * trn(ji,jj,jk,jpnh4) / ( 1.+ emoy(ji,jj,jk) )     &
-# if defined key_off_degrad
+# if defined key_degrad
                   &      * facvol(ji,jj,jk)              &
 # endif
@@ -234,5 +234,5 @@
 !    -------------------------------------------------------------
                zremip = xremip * xstep * tgfunc(ji,jj,jk)   &
-# if defined key_off_degrad
+# if defined key_degrad
                   &            * facvol(ji,jj,jk)              &
 # endif
@@ -289,5 +289,5 @@
                zsatur2 = zsatur * ( 1. + tn(ji,jj,jk) / 400.)**4
                znusil  = 0.225  * ( 1. + tn(ji,jj,jk) / 15.) * zsatur + 0.775 * zsatur2**9
-#    if defined key_off_degrad
+#    if defined key_degrad
                zsiremin = xsirem * xstep * znusil * facvol(ji,jj,jk)
 # else
@@ -350,5 +350,5 @@
 #endif
 
-# if defined key_off_degrad
+# if defined key_degrad
                zscave = zfeequi * zlam1b * xstep  * facvol(ji,jj,jk)
 # else
@@ -374,5 +374,5 @@
 #endif
 
-# if defined key_off_degrad
+# if defined key_degrad
                zaggdfe = zlam1b * xstep * 0.5 * ( trn(ji,jj,jk,jpfer) - zfeequi ) * facvol(ji,jj,jk)
 # else
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zsed.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zsed.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zsed.F90	(revision 2038)
@@ -93,5 +93,5 @@
       REAL(wp), DIMENSION(jpi,jpj)     ::   zsidep
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   znitrpot, zirondep
-#if defined key_diaadd || defined key_trc_dia3d 
+#if defined key_diatrc 
       REAL(wp) :: zrfact2
 # if defined key_iomput
@@ -286,5 +286,5 @@
                IF( zlim <= 0.2 )   zlim = 0.01
                znitrpot(ji,jj,jk) = MAX( 0.e0, ( 0.6 * tgfunc(ji,jj,jk) - 2.15 ) / rday )   &
-# if defined key_off_degrad
+# if defined key_degrad
                &                  * facvol(ji,jj,jk)   &
 # endif
@@ -325,5 +325,5 @@
       END DO
 
-#if defined key_trc_diaadd || defined key_trc_dia3d
+#if defined key_diatrc
       zrfact2 = 1.e+3 * rfact2r
 #  if  ! defined key_iomput
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zsink.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zsink.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/p4zsink.F90	(revision 2038)
@@ -97,5 +97,5 @@
       REAL(wp) :: zdiv , zdiv1, zdiv2, zdiv3, zdiv4, zdiv5
       REAL(wp) :: zval1, zval2, zval3, zval4
-#if defined key_trc_diaadd
+#if defined key_diatrc
       REAL(wp) :: zrfact2
       INTEGER  :: ik1
@@ -207,5 +207,5 @@
                      &            * (zfm*xkr_mass_max**2-xkr_mass_min**2)                  &
                      &            * (zeps-1.)**2/(zdiv2*zdiv3))            &
-# if defined key_off_degrad
+# if defined key_degrad
                      &                 *facvol(ji,jj,jk)       &
 # endif
@@ -219,5 +219,5 @@
                      &                    -zfm*xkr_mass_max**3*(1.+3.*((zeps-1.)/           &
                      &                    (zeps-2.)+(zeps-1.)/zdiv3)+(zeps-1.)/zdiv1))      &
-#    if defined key_off_degrad
+#    if defined key_degrad
                      &                 *facvol(ji,jj,jk)             &
 #    endif
@@ -225,5 +225,5 @@
 
                   zagg3 = (  0.163*trn(ji,jj,jk,jpnum)**2*zfm**2*8. * xkr_mass_max**3   &
-#    if defined key_off_degrad
+#    if defined key_degrad
                      &                 *facvol(ji,jj,jk)             &
 #    endif
@@ -242,5 +242,5 @@
                      &                 ((zfm*zfm*xkr_mass_max**2*zsm-xkr_mass_min**2)     &
                      &                 *xkr_eta)/(zdiv*zdiv3*zdiv5) )                     &
-# if defined key_off_degrad
+# if defined key_degrad
                      &                 *facvol(ji,jj,jk)        &
 # endif
@@ -252,5 +252,5 @@
                      &                 /zdiv3-(xkr_mass_min**2-zfm*zsm*xkr_mass_max**2)    &
                      &                 /zdiv)                   &
-# if defined key_off_degrad
+# if defined key_degrad
                      &                 *facvol(ji,jj,jk)        &
 # endif
@@ -266,5 +266,5 @@
                   zaggdoc = ( 0.4 * trn(ji,jj,jk,jpdoc)               &
                      &        + 1018.  * trn(ji,jj,jk,jppoc)  ) * xstep    &
-# if defined key_off_degrad
+# if defined key_degrad
                      &        * facvol(ji,jj,jk)                              &
 # endif
@@ -281,5 +281,5 @@
       END DO
 
-#if defined key_trc_diaadd
+#if defined key_diatrc
       zrfact2 = 1.e3 * rfact2r
       ik1 = iksed + 1
@@ -474,5 +474,5 @@
       REAL(wp) ::   zagg , zaggfe, zaggdoc, zaggdoc2
       REAL(wp) ::   zfact, zwsmax
-#if defined key_trc_dia3d
+#if defined key_diatrc
       REAL(wp) ::   zrfact2
       INTEGER  ::   ik1
@@ -552,5 +552,5 @@
                zfact = xstep * xdiss(ji,jj,jk)
                !  Part I : Coagulation dependent on turbulence
-# if defined key_off_degrad
+# if defined key_degrad
                zagg1 = 940.* zfact * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jppoc) * facvol(ji,jj,jk)
                zagg2 = 1.054e4 * zfact * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpgoc) * facvol(ji,jj,jk)
@@ -563,5 +563,5 @@
 
                !  Aggregation of small into large particles
-# if defined key_off_degrad
+# if defined key_degrad
                zagg3 = 0.66 * xstep * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jpgoc) * facvol(ji,jj,jk)
                zagg4 = 0.e0 * xstep * trn(ji,jj,jk,jppoc) * trn(ji,jj,jk,jppoc) * facvol(ji,jj,jk)
@@ -574,5 +574,5 @@
 
                ! Aggregation of DOC to small particles
-#if defined key_off_degrad
+#if defined key_degrad
                zaggdoc = ( 80.* trn(ji,jj,jk,jpdoc) + 698. * trn(ji,jj,jk,jppoc) )       &
                   &      * facvol(ji,jj,jk)  * zfact * trn(ji,jj,jk,jpdoc)
@@ -595,5 +595,5 @@
       END DO
 
-#if defined key_trc_diaadd
+#if defined key_diatrc
       zrfact2 = 1.e3 * rfact2r
       ik1  = iksed + 1
@@ -651,5 +651,5 @@
 
       DO jk = 1, jpkm1
-# if defined key_off_degrad
+# if defined key_degrad
          zwsink2(:,:,jk+1) = -pwsink(:,:,jk) / rday * tmask(:,:,jk+1) * facvol(:,:,jk)
 # else
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/par_pisces.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/par_pisces.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/par_pisces.F90	(revision 2038)
@@ -30,6 +30,6 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_kriest     = .TRUE.  !: Kriest flag 
    INTEGER, PUBLIC, PARAMETER ::   jp_pisces     =  23     !: number of passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_2d  =  13     !: additional 2d output ('key_trc_diaadd')
-   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_3d  =  18     !: additional 3d output ('key_trc_diaadd')
+   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_2d  =  13     !: additional 2d output ('key_diatrc')
+   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_3d  =  18     !: additional 3d output ('key_diatrc')
    INTEGER, PUBLIC, PARAMETER ::   jp_pisces_trd =   1     !: number of sms trends for PISCES
 
@@ -68,6 +68,6 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_kriest     = .FALSE. !: Kriest flag 
    INTEGER, PUBLIC, PARAMETER ::   jp_pisces     = 24      !: number of PISCES passive tracers
-   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_2d  = 13      !: additional 2d output ('key_trc_diaadd')
-   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_3d  = 11      !: additional 3d output ('key_trc_diaadd')
+   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_2d  = 13      !: additional 2d output ('key_diatrc')
+   INTEGER, PUBLIC, PARAMETER ::   jp_pisces_3d  = 11      !: additional 3d output ('key_diatrc')
    INTEGER, PUBLIC, PARAMETER ::   jp_pisces_trd =  1      !: number of sms trends for PISCES
 
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/sms_pisces.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/sms_pisces.F90	(revision 2038)
@@ -62,5 +62,5 @@
    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   xlimbac    !: ??
    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   xdiss      !: ??
-#if defined key_trc_dia3d
+#if defined key_diatrc
    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   prodcal    !: Calcite production
    REAL(wp), DIMENSION(jpi,jpj,jpk) ::   grazing    !: Total zooplankton grazing
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcctl_pisces.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcctl_pisces.F90	(revision 2037)
+++ 	(revision )
@@ -1,69 +1,0 @@
-MODULE trcctl_pisces
-   !!======================================================================
-   !!                         ***  trcctl_pisces.F90  ***
-   !! TOP :                Control of PISCES biogeochemical model
-   !!======================================================================
-   !!----------------------------------------------------------------------
-   !! History :   1.0  !  2000-12 (C. Ethe) assign a parameter to name individual tracers
-   !!----------------------------------------------------------------------
-
-#if defined key_pisces
-
-   USE oce_trc
-   USE trc
-
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC trc_ctl_pisces     ! called by ???
-
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_ctl_pisces
-      !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE trc_ctl_pisces  ***
-      !!
-      !! ** Purpose :   control the cpp options, namelist and files 
-      !!----------------------------------------------------------------------
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' use PISCES biological model '
-
-   ! Check number of tracers
-   ! -----------------------
-#if  defined key_kriest
-      IF( jp_pisces /= 23) THEN 
-#else
-      IF( jp_pisces /= 24) THEN
-#endif
-          IF (lwp) THEN 
-              WRITE (numout,*) ' ===>>>> : w a r n i n g '
-              WRITE (numout,*) ' =======   ============= '
-              WRITE (numout,*)                               &
-              &   ' STOP, change jp_pisces',               & 
-              &   ' in par_pisces.F90'  
-          END IF 
-          STOP 'TRC_CTL'
-      END IF 
-
-   END SUBROUTINE trc_ctl_pisces
-
-#else
-   !!----------------------------------------------------------------------
-   !!  Empty module :                                            No PISCES
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_ctl_pisces                 ! Dummy routine
-   END SUBROUTINE trc_ctl_pisces
-#endif
-
-   !!======================================================================
-END MODULE trcctl_pisces
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcini_pisces.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcini_pisces.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcini_pisces.F90	(revision 2038)
@@ -55,11 +55,14 @@
 
 
+      !  Control consitency
+      CALL trc_ctl_pisces
+
+
       IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) ' trc_ini_pisces :   PISCES biochemical model initialisation'
       IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
 
-
       !                                            ! Time-step
-      rfact   = rdttra(1) * float(ndttrc)          ! ---------
+      rfact   = rdttra(1) * float(nn_dttrc)          ! ---------
       rfactr  = 1. / rfact
       rfact2  = rfact / float(nrdttrc)
@@ -128,5 +131,34 @@
       !
    END SUBROUTINE trc_ini_pisces
-   
+ 
+   SUBROUTINE trc_ctl_pisces
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ctl_pisces  ***
+      !!
+      !! ** Purpose :   control the cpp options, namelist and files 
+      !!----------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' use PISCES biological model '
+
+   ! Check number of tracers
+   ! -----------------------
+#if  defined key_kriest
+      IF( jp_pisces /= 23) THEN
+#else
+      IF( jp_pisces /= 24) THEN
+#endif
+          IF (lwp) THEN
+              WRITE (numout,*) ' ===>>>> : w a r n i n g '
+              WRITE (numout,*) ' =======   ============= '
+              WRITE (numout,*)                               &
+              &   ' STOP, change jp_pisces',               &
+              &   ' in par_pisces.F90'
+          END IF
+          STOP 'TRC_CTL'
+      END IF
+
+   END SUBROUTINE trc_ctl_pisces
+  
 #else
    !!----------------------------------------------------------------------
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trclsm_pisces.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trclsm_pisces.F90	(revision 2037)
+++ 	(revision )
@@ -1,207 +1,0 @@
-MODULE trclsm_pisces
-   !!======================================================================
-   !!                      ***  MODULE trclsm_lobster  ***
-   !! TOP :   initialisation of some run parameters for PISCES bio-model
-   !!======================================================================
-   !! History :    -   !  1999-10 (M.A. Foujols, M. Levy) original code
-   !!              -   !  2000-01 (L. Bopp) hamocc3, p3zd
-   !!             1.0  !  2003-08 (C. Ethe)  module F90
-   !!             2.0  !  2007-12  (C. Ethe, G. Madec) from trclsm.pisces.h90
-   !!----------------------------------------------------------------------
-#if defined key_pisces
-   !!----------------------------------------------------------------------
-   !!   'key_pisces'   :                                   PISCES bio-model
-   !!----------------------------------------------------------------------
-   !! trc_lsm_pisces       : PISCES model namelist read
-   !!----------------------------------------------------------------------
-   USE oce_trc         ! Ocean variables
-   USE par_trc         ! TOP parameters
-   USE trc             ! TOP variables
-   USE sms_pisces      ! sms trends
-   USE in_out_manager  ! I/O manager
-
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC   trc_lsm_pisces   ! called by trclsm.F90 module
-
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_lsm_pisces
-      !!----------------------------------------------------------------------
-      !!                     ***  trc_lsm_pisces  ***  
-      !!
-      !! ** Purpose :   read PISCES namelist
-      !!
-      !! ** input   :   file 'namelist.trc.sms' containing the following
-      !!             namelist: natext, natbio, natsms
-      !!                       natkriest ("key_kriest")
-      !!----------------------------------------------------------------------
-      !!
-#if defined key_trc_diaadd && ! defined key_iomput
-      INTEGER ::  jl, jn
-      ! definition of additional diagnostic as a structure
-      TYPE DIAG
-         CHARACTER(len = 20)  :: snamedia   !: short name
-         CHARACTER(len = 80 ) :: lnamedia   !: long name
-         CHARACTER(len = 20 ) :: unitdia    !: unit
-      END TYPE DIAG
-
-      TYPE(DIAG) , DIMENSION(jp_pisces_2d) :: pisdia2d
-      TYPE(DIAG) , DIMENSION(jp_pisces_3d) :: pisdia3d
-#endif
-
-      NAMELIST/nampisbio/ part, nrdttrc, wsbio, xkmort, ferat3, wsbio2
-#if defined key_kriest
-      NAMELIST/nampiskrp/ xkr_eta, xkr_zeta, xkr_mass_min, xkr_mass_max
-#endif
-#if defined key_trc_diaadd && ! defined key_iomput
-      NAMELIST/nampisdia/ nwritedia, pisdia3d, pisdia2d     ! additional diagnostics
-#endif
-      NAMELIST/nampisdmp/ ln_pisdmp, ln_pisclo
-
-      !!----------------------------------------------------------------------
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' trc_lsm_pisces : read PISCES namelists'
-      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
-
-
-      !                               ! Open the namelist file
-      !                               ! ----------------------
-      CALL ctl_opn( numnat, 'namelist_pisces', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
-
-      REWIND( numnat )                    
-      READ  ( numnat, nampisbio )
-
-      IF(lwp) THEN                         ! control print
-         WRITE(numout,*) ' Namelist : nampisbio'
-         WRITE(numout,*) '    part of calcite not dissolved in guts     part      =', part
-         WRITE(numout,*) '    frequence pour la biologie                nrdttrc   =', nrdttrc
-         WRITE(numout,*) '    POC sinking speed                         wsbio     =', wsbio
-         WRITE(numout,*) '    half saturation constant for mortality    xkmort    =', xkmort
-         WRITE(numout,*) '    Fe/C in zooplankton                       ferat3    =', ferat3
-         WRITE(numout,*) '    Big particles sinking speed               wsbio2    =', wsbio2
-      ENDIF
-
-#if defined key_kriest
-
-      !                               ! nampiskrp : kriest parameters
-      !                               ! -----------------------------
-      xkr_eta      = 0.62        
-      xkr_zeta     = 1.62        
-      xkr_mass_min = 0.0002     
-      xkr_mass_max = 1.      
-
-      REWIND( numnat )                     ! read natkriest
-      READ  ( numnat, nampiskrp )
-
-      IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist : nampiskrp'
-         WRITE(numout,*) '    Sinking  exponent                        xkr_eta      = ', xkr_eta
-         WRITE(numout,*) '    N content exponent                       xkr_zeta     = ', xkr_zeta
-         WRITE(numout,*) '    Minimum mass for Aggregates              xkr_mass_min = ', xkr_mass_min
-         WRITE(numout,*) '    Maximum mass for Aggregates              xkr_mass_max = ', xkr_mass_max
-         WRITE(numout,*)
-     ENDIF
-
-
-     ! Computation of some variables
-     xkr_massp = 5.7E-6 * 7.6 * xkr_mass_min**xkr_zeta
-
-#endif
-      !
-#if defined key_trc_diaadd && ! defined key_iomput
-
-      ! Namelist namlobdia
-      ! -------------------
-      nwritedia = 10                   ! default values
-
-      DO jl = 1, jp_pisces_2d
-         jn = jp_pcs0_2d + jl - 1
-         WRITE(ctrc2d(jn),'("2D_",I1)') jn                      ! short name
-         WRITE(ctrc2l(jn),'("2D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
-         ctrc2u(jn) = ' '                                       ! units
-      END DO
-      !                                 ! 3D output arrays
-      DO jl = 1, jp_pisces_3d
-         jn = jp_pcs0_3d + jl - 1
-         WRITE(ctrc3d(jn),'("3D_",I1)') jn                      ! short name
-         WRITE(ctrc3l(jn),'("3D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
-         ctrc3u(jn) = ' '                                       ! units
-      END DO
-
-      REWIND( numnat )               ! read natrtd
-      READ  ( numnat, nampisdia )
-
-      DO jl = 1, jp_pisces_2d
-         jn = jp_pcs0_2d + jl - 1
-         ctrc2d(jn) = pisdia2d(jl)%snamedia
-         ctrc2l(jn) = pisdia2d(jl)%lnamedia
-         ctrc2u(jn) = pisdia2d(jl)%unitdia
-      END DO
-
-      DO jl = 1, jp_pisces_3d
-         jn = jp_pcs0_3d + jl - 1
-         ctrc3d(jn) = pisdia3d(jl)%snamedia
-         ctrc3l(jn) = pisdia3d(jl)%lnamedia
-         ctrc3u(jn) = pisdia3d(jl)%unitdia
-      END DO
-
-      IF(lwp) THEN                   ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist : natadd'
-         WRITE(numout,*) '    frequency of outputs for additional arrays nwritedia = ', nwritedia
-         DO jl = 1, jp_pisces_3d
-            jn = jp_pcs0_3d + jl - 1
-            WRITE(numout,*) '   3d output field No : ',jn
-            WRITE(numout,*) '   short name         : ', TRIM(ctrc3d(jn))
-            WRITE(numout,*) '   long name          : ', TRIM(ctrc3l(jn))
-            WRITE(numout,*) '   unit               : ', TRIM(ctrc3u(jn))
-            WRITE(numout,*) ' '
-         END DO
-
-         DO jl = 1, jp_pisces_2d
-            jn = jp_pcs0_2d + jl - 1
-            WRITE(numout,*) '   2d output field No : ',jn
-            WRITE(numout,*) '   short name         : ', TRIM(ctrc2d(jn))
-            WRITE(numout,*) '   long name          : ', TRIM(ctrc2l(jn))
-            WRITE(numout,*) '   unit               : ', TRIM(ctrc2u(jn))
-            WRITE(numout,*) ' '
-         END DO
-      ENDIF
-#endif
-
-      REWIND( numnat )
-      READ  ( numnat, nampisdmp )
-
-      IF(lwp) THEN                         ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist : nampisdmp'
-         WRITE(numout,*) '    Relaxation of tracer to glodap mean value            ln_pisdmp      =', ln_pisdmp
-         WRITE(numout,*) '    Restoring of tracer to initial value  on closed seas  ln_pisclo      =', ln_pisclo
-         WRITE(numout,*) ' '
-      ENDIF
-
-   END SUBROUTINE trc_lsm_pisces
-
-#else
-   !!----------------------------------------------------------------------
-   !!  Dummy module :                                   No PISCES bio-model
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_lsm_pisces                      ! Empty routine
-   END  SUBROUTINE  trc_lsm_pisces
-#endif  
-
-   !!======================================================================
-END MODULE trclsm_pisces
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90	(revision 2038)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90	(revision 2038)
@@ -0,0 +1,207 @@
+MODULE trcnam_pisces
+   !!======================================================================
+   !!                      ***  MODULE trcnam_lobster  ***
+   !! TOP :   initialisation of some run parameters for PISCES bio-model
+   !!======================================================================
+   !! History :    -   !  1999-10 (M.A. Foujols, M. Levy) original code
+   !!              -   !  2000-01 (L. Bopp) hamocc3, p3zd
+   !!             1.0  !  2003-08 (C. Ethe)  module F90
+   !!             2.0  !  2007-12  (C. Ethe, G. Madec) from trcnam.pisces.h90
+   !!----------------------------------------------------------------------
+#if defined key_pisces
+   !!----------------------------------------------------------------------
+   !!   'key_pisces'   :                                   PISCES bio-model
+   !!----------------------------------------------------------------------
+   !! trc_nam_pisces       : PISCES model namelist read
+   !!----------------------------------------------------------------------
+   USE oce_trc         ! Ocean variables
+   USE par_trc         ! TOP parameters
+   USE trc             ! TOP variables
+   USE sms_pisces      ! sms trends
+   USE in_out_manager  ! I/O manager
+
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   trc_nam_pisces   ! called by trcnam.F90 module
+
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
+   !! $Id: trcnam_pisces.F90 1801 2010-01-22 09:36:07Z cetlod $ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+   SUBROUTINE trc_nam_pisces
+      !!----------------------------------------------------------------------
+      !!                     ***  trc_nam_pisces  ***  
+      !!
+      !! ** Purpose :   read PISCES namelist
+      !!
+      !! ** input   :   file 'namelist.trc.sms' containing the following
+      !!             namelist: natext, natbio, natsms
+      !!                       natkriest ("key_kriest")
+      !!----------------------------------------------------------------------
+      !!
+#if defined key_diatrc && ! defined key_iomput
+      INTEGER ::  jl, jn
+      ! definition of additional diagnostic as a structure
+      TYPE DIAG
+         CHARACTER(len = 20)  :: snamedia   !: short name
+         CHARACTER(len = 80 ) :: lnamedia   !: long name
+         CHARACTER(len = 20 ) :: unitdia    !: unit
+      END TYPE DIAG
+
+      TYPE(DIAG) , DIMENSION(jp_pisces_2d) :: pisdia2d
+      TYPE(DIAG) , DIMENSION(jp_pisces_3d) :: pisdia3d
+#endif
+
+      NAMELIST/nampisbio/ part, nrdttrc, wsbio, xkmort, ferat3, wsbio2
+#if defined key_kriest
+      NAMELIST/nampiskrp/ xkr_eta, xkr_zeta, xkr_mass_min, xkr_mass_max
+#endif
+#if defined key_diatrc && ! defined key_iomput
+      NAMELIST/nampisdia/ nwritedia, pisdia3d, pisdia2d     ! additional diagnostics
+#endif
+      NAMELIST/nampisdmp/ ln_pisdmp, ln_pisclo
+
+      !!----------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' trc_nam_pisces : read PISCES namelists'
+      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~'
+
+
+      !                               ! Open the namelist file
+      !                               ! ----------------------
+      CALL ctl_opn( numnat, 'namelist_pisces', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
+
+      REWIND( numnat )                    
+      READ  ( numnat, nampisbio )
+
+      IF(lwp) THEN                         ! control print
+         WRITE(numout,*) ' Namelist : nampisbio'
+         WRITE(numout,*) '    part of calcite not dissolved in guts     part      =', part
+         WRITE(numout,*) '    frequence pour la biologie                nrdttrc   =', nrdttrc
+         WRITE(numout,*) '    POC sinking speed                         wsbio     =', wsbio
+         WRITE(numout,*) '    half saturation constant for mortality    xkmort    =', xkmort
+         WRITE(numout,*) '    Fe/C in zooplankton                       ferat3    =', ferat3
+         WRITE(numout,*) '    Big particles sinking speed               wsbio2    =', wsbio2
+      ENDIF
+
+#if defined key_kriest
+
+      !                               ! nampiskrp : kriest parameters
+      !                               ! -----------------------------
+      xkr_eta      = 0.62        
+      xkr_zeta     = 1.62        
+      xkr_mass_min = 0.0002     
+      xkr_mass_max = 1.      
+
+      REWIND( numnat )                     ! read natkriest
+      READ  ( numnat, nampiskrp )
+
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : nampiskrp'
+         WRITE(numout,*) '    Sinking  exponent                        xkr_eta      = ', xkr_eta
+         WRITE(numout,*) '    N content exponent                       xkr_zeta     = ', xkr_zeta
+         WRITE(numout,*) '    Minimum mass for Aggregates              xkr_mass_min = ', xkr_mass_min
+         WRITE(numout,*) '    Maximum mass for Aggregates              xkr_mass_max = ', xkr_mass_max
+         WRITE(numout,*)
+     ENDIF
+
+
+     ! Computation of some variables
+     xkr_massp = 5.7E-6 * 7.6 * xkr_mass_min**xkr_zeta
+
+#endif
+      !
+#if defined key_diatrc && ! defined key_iomput
+
+      ! Namelist namlobdia
+      ! -------------------
+      nwritedia = 10                   ! default values
+
+      DO jl = 1, jp_pisces_2d
+         jn = jp_pcs0_2d + jl - 1
+         WRITE(ctrc2d(jn),'("2D_",I1)') jn                      ! short name
+         WRITE(ctrc2l(jn),'("2D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
+         ctrc2u(jn) = ' '                                       ! units
+      END DO
+      !                                 ! 3D output arrays
+      DO jl = 1, jp_pisces_3d
+         jn = jp_pcs0_3d + jl - 1
+         WRITE(ctrc3d(jn),'("3D_",I1)') jn                      ! short name
+         WRITE(ctrc3l(jn),'("3D DIAGNOSTIC NUMBER ",I2)') jn    ! long name
+         ctrc3u(jn) = ' '                                       ! units
+      END DO
+
+      REWIND( numnat )               ! read natrtd
+      READ  ( numnat, nampisdia )
+
+      DO jl = 1, jp_pisces_2d
+         jn = jp_pcs0_2d + jl - 1
+         ctrc2d(jn) = pisdia2d(jl)%snamedia
+         ctrc2l(jn) = pisdia2d(jl)%lnamedia
+         ctrc2u(jn) = pisdia2d(jl)%unitdia
+      END DO
+
+      DO jl = 1, jp_pisces_3d
+         jn = jp_pcs0_3d + jl - 1
+         ctrc3d(jn) = pisdia3d(jl)%snamedia
+         ctrc3l(jn) = pisdia3d(jl)%lnamedia
+         ctrc3u(jn) = pisdia3d(jl)%unitdia
+      END DO
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : natadd'
+         WRITE(numout,*) '    frequency of outputs for additional arrays nwritedia = ', nwritedia
+         DO jl = 1, jp_pisces_3d
+            jn = jp_pcs0_3d + jl - 1
+            WRITE(numout,*) '   3d output field No : ',jn
+            WRITE(numout,*) '   short name         : ', TRIM(ctrc3d(jn))
+            WRITE(numout,*) '   long name          : ', TRIM(ctrc3l(jn))
+            WRITE(numout,*) '   unit               : ', TRIM(ctrc3u(jn))
+            WRITE(numout,*) ' '
+         END DO
+
+         DO jl = 1, jp_pisces_2d
+            jn = jp_pcs0_2d + jl - 1
+            WRITE(numout,*) '   2d output field No : ',jn
+            WRITE(numout,*) '   short name         : ', TRIM(ctrc2d(jn))
+            WRITE(numout,*) '   long name          : ', TRIM(ctrc2l(jn))
+            WRITE(numout,*) '   unit               : ', TRIM(ctrc2u(jn))
+            WRITE(numout,*) ' '
+         END DO
+      ENDIF
+#endif
+
+      REWIND( numnat )
+      READ  ( numnat, nampisdmp )
+
+      IF(lwp) THEN                         ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : nampisdmp'
+         WRITE(numout,*) '    Relaxation of tracer to glodap mean value            ln_pisdmp      =', ln_pisdmp
+         WRITE(numout,*) '    Restoring of tracer to initial value  on closed seas  ln_pisclo      =', ln_pisclo
+         WRITE(numout,*) ' '
+      ENDIF
+
+   END SUBROUTINE trc_nam_pisces
+
+#else
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                   No PISCES bio-model
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE trc_nam_pisces                      ! Empty routine
+   END  SUBROUTINE  trc_nam_pisces
+#endif  
+
+   !!======================================================================
+END MODULE trcnam_pisces
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcrst_pisces.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcrst_pisces.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcrst_pisces.F90	(revision 2038)
@@ -130,5 +130,5 @@
                DO ji = 1, jpi
                   zvol = cvol(ji,jj,jk)
-#  if defined key_off_degrad
+#  if defined key_degrad
                   zvol = zvol * facvol(ji,jj,jk)
 #  endif
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90	(revision 2038)
@@ -26,6 +26,6 @@
    USE p4zflx          ! 
 
-   USE trdmld_trc_oce
-   USE trdmld_trc
+   USE trdmod_oce
+   USE trdmod_trc
 
    USE sedmodel
@@ -94,5 +94,5 @@
           DO jn = jp_pcs0, jp_pcs1
             ztrpis(:,:,:) = tra(:,:,:,jn)
-            CALL trd_mod_trc( ztrpis, jn, jptrc_trd_sms, kt )   ! save trends
+            CALL trd_mod_trc( ztrpis, jn, jptra_trd_sms, kt )   ! save trends
           END DO
       END IF
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/oce_trc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/oce_trc.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/oce_trc.F90	(revision 2038)
@@ -32,4 +32,6 @@
    USE par_oce , ONLY :   jpkdta   =>   jpkdta     !: number of levels            > or = jpk
    USE par_oce , ONLY :   lk_esopa =>   lk_esopa   !: flag to activate the all option
+   USE par_oce , ONLY :   jp_tem   =>   jp_tem     !: indice for temperature
+   USE par_oce , ONLY :   jp_sal   =>   jp_sal     !: indice for salinity
 
    !* IO manager *
@@ -112,13 +114,13 @@
    USE dom_oce , ONLY :   ln_zco     =>  ln_zco      !: z-coordinate flag
    USE dom_oce , ONLY :   lk_zco     =>  lk_zco      !: z-coordinate flag (1D or 3D arrays)
-   USE dom_oce , ONLY :   hbatt      =>   hbatt      !: ocean depth at the vertical of  t-point (m)
-   USE dom_oce , ONLY :   hbatu      =>   hbatu      !: ocean depth at the vertical of  u-point (m)
-   USE dom_oce , ONLY :   hbatv      =>   hbatv      !: ocean depth at the vertical of w-point (m)
-   USE dom_oce , ONLY :   gsigt      =>   gsigt      !: model level depth coefficient at T-levels
-   USE dom_oce , ONLY :   gsigw      =>   gsigw      !: model level depth coefficient at W-levels
-   USE dom_oce , ONLY :   gsi3w      =>   gsi3w      !: model level depth coef at w-levels (defined as the sum of e3w)
-   USE dom_oce , ONLY :   esigt      =>   esigt      !: vertical scale factor coef. at t-levels
-   USE dom_oce , ONLY :   esigw      =>   esigw      !: vertical scale factor coef. at w-levels
-   USE dom_oce , ONLY :   lk_vvl     => lk_vvl       !: variable grid flag
+   USE dom_oce , ONLY :   hbatt      =>  hbatt      !: ocean depth at the vertical of  t-point (m)
+   USE dom_oce , ONLY :   hbatu      =>  hbatu      !: ocean depth at the vertical of  u-point (m)
+   USE dom_oce , ONLY :   hbatv      =>  hbatv      !: ocean depth at the vertical of w-point (m)
+   USE dom_oce , ONLY :   gsigt      =>  gsigt      !: model level depth coefficient at T-levels
+   USE dom_oce , ONLY :   gsigw      =>  gsigw      !: model level depth coefficient at W-levels
+   USE dom_oce , ONLY :   gsi3w      =>  gsi3w      !: model level depth coef at w-levels (defined as the sum of e3w)
+   USE dom_oce , ONLY :   esigt      =>  esigt      !: vertical scale factor coef. at t-levels
+   USE dom_oce , ONLY :   esigw      =>  esigw      !: vertical scale factor coef. at w-levels
+   USE dom_oce , ONLY :   lk_vvl     =>  lk_vvl       !: variable grid flag
 
    !* masks, bathymetry *
@@ -129,5 +131,5 @@
    USE dom_oce , ONLY :   vmask      =>   vmask      !: land/ocean mask at v-points 
    USE dom_oce , ONLY :   fmask      =>   fmask      !: land/ocean mask at f-points 
-# if defined key_off_degrad
+# if defined key_degrad
    USE dom_oce , ONLY :   facvol     =>   facvol     !: volume factor for degradation
 # endif
@@ -166,8 +168,12 @@
    USE oce , ONLY :   tn      =>    tn      !: pot. temperature (celsius)
    USE oce , ONLY :   sn      =>    sn      !: salinity (psu)
+   USE oce , ONLY :   tsn     =>    tsn     !: 4D array contaning ( tn, sn )
+   USE oce , ONLY :   tsb     =>    tsb     !: 4D array contaning ( tb, sb )
+   USE oce , ONLY :   tsa     =>    tsa     !: 4D array contaning ( ta, sa )
    USE oce , ONLY :   rhop    =>    rhop    !: potential volumic mass (kg m-3) 
    USE oce , ONLY :   rhd     =>    rhd     !: in situ density anomalie rhd=(rho-rau0)/rau0 (no units)
    USE oce , ONLY :   hdivn   =>    hdivn   !: horizontal divergence (1/s)
-#if defined key_off_tra
+   USE oce , ONLY :   l_traldf_rot => l_traldf_rot  !: rotated laplacian operator for lateral diffusion
+#if defined key_offline
    USE oce , ONLY :   gtu     =>    gtu     !: t-, s- and rd horizontal gradient at u- and
    USE oce , ONLY :   gsu     =>    gsu     !: v-points at bottom ocean level
@@ -196,13 +202,5 @@
    USE sbcrnf  , ONLY :   rnfmsk_z   =>    rnfmsk_z   !: mixed adv scheme in runoffs vicinity (vert.)
 
-   !* bottom boundary layer *
-# if   defined key_trabbl_dif   ||   defined key_trabbl_adv
-# if ! defined key_off_tra 
-   USE trabbl , ONLY :   atrbbl   =>   rn_ahtbbl     !: lateral coeff. for bottom boundary layer scheme (m2/s)
-# else 
-   USE trabbl, ONLY :   bblx   => bblx         !: ???
-   USE trabbl, ONLY :   bbly   => bbly         !: ???
-#  endif
-# endif
+   USE trc_oce
 
    !* lateral diffusivity (tracers) *
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/par_trc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/par_trc.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/par_trc.F90	(revision 2038)
@@ -40,35 +40,4 @@
    LOGICAL, PUBLIC, PARAMETER ::   lk_trc_c1d   = .FALSE.  !: 1D pass. tracer configuration flag
 # endif
-   ! Passive tracers : size for TRP trends diagnotics (used if 'key_trc_diatrd' defined)
-# if defined key_trc_diatrd
-   ! Passive tracers : size for TRP trends diagnotics (used if 'key_trc_diatrd' defined)
-   INTEGER, PARAMETER ::   jptrc_xad     =  1   !: x- horizontal advection
-   INTEGER, PARAMETER ::   jptrc_yad     =  2   !: y- horizontal advection
-   INTEGER, PARAMETER ::   jptrc_zad     =  3   !: z- vertical   advection
-   INTEGER, PARAMETER ::   jptrc_xdf     =  4   !: lateral       diffusion
-   INTEGER, PARAMETER ::   jptrc_ydf     =  5   !: lateral       diffusion
-   INTEGER, PARAMETER ::   jptrc_zdf     =  6   !: vertical diffusion (Kz)
-   INTEGER, PARAMETER ::   jptrc_sbc     =  7   !: surface boundary condition
-#if ! defined key_trcldf_eiv && ! defined key_trcdmp
-   INTEGER, PARAMETER ::   jpdiatrc      =  7  !: trends: 3*(advection + diffusion       ) + sbc
-#endif
-#if defined key_trcldf_eiv && defined key_trcdmp
-   INTEGER, PARAMETER ::   jptrc_xei     =  8   !: x- horiz. EIV advection
-   INTEGER, PARAMETER ::   jptrc_yei     =  9   !: y- horiz. EIV advection
-   INTEGER, PARAMETER ::   jptrc_zei     = 10   !: z- vert.  EIV advection
-   INTEGER, PARAMETER ::   jptrc_dmp     = 11   !: damping
-   INTEGER, PARAMETER ::   jpdiatrc      = 11   !: trends: 3*(advection + diffusion + eiv ) + sbc + damping
-#endif
-#if defined key_trcldf_eiv && ! defined key_trcdmp
-   INTEGER, PARAMETER ::   jptrc_xei     =  8   !: x- horiz. EIV advection
-   INTEGER, PARAMETER ::   jptrc_yei     =  9   !: y- horiz. EIV advection
-   INTEGER, PARAMETER ::   jptrc_zei     = 10   !: z- vert.  EIV advection
-   INTEGER, PARAMETER ::   jpdiatrc      = 10   !: trends: 3*(advection + diffusion + eiv ) + sbc 
-#endif
-#if ! defined key_trcldf_eiv && defined key_trcdmp
-   INTEGER, PARAMETER ::   jptrc_dmp     =  8   !: damping
-   INTEGER, PARAMETER ::   jpdiatrc      =  8   !: trends: 3*(advection + diffusion       ) + sbc + damping
-#endif
-#endif
 
    REAL(wp), PUBLIC  :: rtrn  = 1.e-15      !: truncation value     
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trc.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trc.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trc.F90	(revision 2038)
@@ -34,6 +34,5 @@
    INTEGER, PUBLIC                   ::   numnat   !: the number of the passive tracer NAMELIST
    LOGICAL, PUBLIC, DIMENSION(jptra) ::   lutini   !:  initialisation from FILE or not (NAMELIST)
-   LOGICAL, PUBLIC, DIMENSION(jptra) ::   lutsav   !:  logical for saving tracer or not
-   INTEGER, PUBLIC, DIMENSION(jptra) ::   nutini   !: FORTRAN LOGICAL UNIT for initialisation file
+   LOGICAL, PUBLIC, DIMENSION(jptra) ::   lutsav   !:  save the tracer or not
 
    !! passive tracers fields (before,now,after)
@@ -47,14 +46,24 @@
    REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) ::   trb   !: traceur concentration for before time step
 
+   !! isopycnal scheme for passive tracers
+   !! ------------------------------------  
+   REAL(wp), PUBLIC ::   ahtrb0     !: background diffusivity coefficient for passive tracer (m2/s)
+
+#if ! defined key_zco
+   !! interpolated gradient
+   !!--------------------------------------------------  
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jptra) ::   gtru   !: horizontal gradient at u-points at bottom ocean level
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jptra) ::   gtrv   !: horizontal gradient at v-points at bottom ocean level
+#endif
    
    !! passive tracers restart (input and output)
    !! ------------------------------------------  
-   INTEGER , PUBLIC  ::  ndttrc     !: frequency of step on passive tracers
-   INTEGER , PUBLIC  ::  nittrc000  !: first time step of passive tracers model
-   LOGICAL , PUBLIC  ::  ln_rsttr     !: boolean term for restart i/o for passive tracers (namelist)
-   LOGICAL , PUBLIC  ::  lrst_trc   !: logical to control the trc restart write
-   INTEGER , PUBLIC  ::  nutwrs     !: output FILE for passive tracers restart
-   INTEGER , PUBLIC  ::  nutrst     !: logical unit for restart FILE for passive tracers
-   INTEGER , PUBLIC  ::  nrsttr     !: control of the time step ( 0 or 1 ) for pass. tr.
+   INTEGER , PUBLIC  ::  nn_dttrc      !: frequency of step on passive tracers
+   INTEGER , PUBLIC  ::  nittrc000     !: first time step of passive tracers model
+   LOGICAL , PUBLIC  ::  ln_rsttr      !: boolean term for restart i/o for passive tracers (namelist)
+   LOGICAL , PUBLIC  ::  lrst_trc      !: logical to control the trc restart write
+   INTEGER , PUBLIC  ::  nutwrs        !: output FILE for passive tracers restart
+   INTEGER , PUBLIC  ::  nutrst        !: logical unit for restart FILE for passive tracers
+   INTEGER , PUBLIC  ::  nn_rsttr      !: control of the time step ( 0 or 1 ) for pass. tr.
    CHARACTER(len=50) ::  cn_trcrst_in  !: suffix of pass. tracer restart name (input)
    CHARACTER(len=50) ::  cn_trcrst_out !: suffix of pass. tracer restart name (output)
@@ -62,7 +71,7 @@
    !! information for outputs
    !! --------------------------------------------------
-   INTEGER , PUBLIC ::   nwritetrc   !: time step frequency for concentration outputs (namelist)
+   INTEGER , PUBLIC ::   nn_writetrc   !: time step frequency for concentration outputs (namelist)
    
-# if defined key_trc_diaadd && ! defined key_iomput
+# if defined key_diatrc && ! defined key_iomput
    !! additional 2D/3D outputs namelist
    !! --------------------------------------------------
@@ -80,5 +89,5 @@
 # endif
 
-#if defined key_trc_diabio || defined key_trdmld_trc
+#if defined key_diabio || defined key_trdmld_trc
    CHARACTER(len=8),  DIMENSION(jpdiabio) ::   ctrbio   !: biological trends name      (NAMELIST)
    CHARACTER(len=20), DIMENSION(jpdiabio) ::   ctrbiu   !: biological trends unit      (NAMELIST)
@@ -86,5 +95,5 @@
    INTEGER ::   nwritebio   !: time step frequency for biological outputs (NAMELIST)
 #endif
-# if defined key_trc_diabio
+# if defined key_diabio
    !! Biological trends
    !! -----------------
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcctl.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcctl.F90	(revision 2037)
+++ 	(revision )
@@ -1,120 +1,0 @@
-MODULE trcctl
-   !!======================================================================
-   !!                         ***  MODULE trcctl  ***
-   !! TOP :   control the cpp options, files and namelist values of a run
-   !!======================================================================
-   !! History :   1.0  !  2005-03 (O. Aumont, A. El Moussaoui) original code
-   !!----------------------------------------------------------------------
-#if defined key_top
-   !!----------------------------------------------------------------------
-   !!   'key_top'                                                TOP models
-   !!----------------------------------------------------------------------
-   !!   trc_ctl    : control the cpp options, files and namelist values
-   !!----------------------------------------------------------------------
-   USE oce_trc
-   USE trc
-   USE trctrp_ctl
-   USE trcctl_lobster
-   USE trcctl_pisces
-   USE trcctl_cfc
-   USE trcctl_c14b
-   USE trcctl_my_trc
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC trc_ctl      ! called by ???
-
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_ctl
-      !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE trc_ctl  ***
-      !!
-      !! ** Purpose :   control the cpp options, namelist and files 
-      !!              we use IF/ENDIF inside #IF defined option-cpp
-      !!              FILE name must not exceed 21 characters
-      !!----------------------------------------------------------------------
-      INTEGER ::   istop, jn
-      !!----------------------------------------------------------------------
-
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) ' trc_ctl :   passive tracer option'
-      IF(lwp) WRITE(numout,*) ' ~~~~~~~'
-
-      istop = 0      ! initialise to zero
-
-      ! restart for passive tracer (input)
-      IF( ln_rsttr ) THEN
-         IF(lwp) WRITE(numout,*) '       READ a restart FILE for passive tracer'
-         IF(lwp) WRITE(numout,*) ' '
-      ELSE
-         IF(lwp) WRITE(numout,*) '       no restart FILE'
-         IF(lwp) WRITE(numout,*)
-         DO jn = 1, jptra
-            IF( lutini(jn) ) THEN      ! OPEN input FILE only IF lutini(jn) is true
-               IF(lwp) WRITE(numout,*)  &
-                  '       READ an initial FILE  for passive tracer number :', jn, ' traceur : ', ctrcnm(jn) 
-            END IF
-         END DO
-      ENDIF
-
-      ! transport scheme option
-      CALL trc_trp_ctl
-
-      ! SMS model
-      IF(lwp) WRITE(numout,*) '  '
-      IF(lwp) WRITE(numout,*) '       Source/Sink model option'
-      IF(lwp) WRITE(numout,*) '  '
-
-      IF( lk_lobster ) THEN   ;   CALL trc_ctl_lobster      ! LOBSTER bio-model
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          LOBSTER not used'
-      ENDIF
-
-      IF( lk_pisces  ) THEN   ;   CALL trc_ctl_pisces      ! PISCES  bio-model
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          PISCES not used'
-      ENDIF
-
-      IF( lk_cfc     ) THEN   ;   CALL trc_ctl_cfc         ! CFC     tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          CFC not used'
-      ENDIF
-
-      IF( lk_c14b    ) THEN   ;   CALL trc_ctl_c14b        ! C14 bomb   tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          C14b not used'
-      ENDIF
-
-
-      IF( lk_my_trc  ) THEN   ;   CALL trc_ctl_my_trc      ! MY_TRC  tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          MY_TRC not used'
-      ENDIF
-
-
-      ! E r r o r  control
-      ! ------------------
-      IF( istop > 0  ) THEN
-         IF(lwp)WRITE(numout,*)
-         IF(lwp)WRITE(numout,*) istop,' E R R O R found : we stop'
-         IF(lwp)WRITE(numout,*) '  **************************'
-         IF(lwp)WRITE(numout,*)
-         STOP 'trcctl'
-      ENDIF
-      !
-   END SUBROUTINE trc_ctl
-
-#else
-   !!----------------------------------------------------------------------
-   !!  Empty module :                                     No passive tracer
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_ctl                      ! Dummy routine
-   END SUBROUTINE trc_ctl
-#endif
-
-   !!======================================================================
-END MODULE trcctl
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcdia.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcdia.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcdia.F90	(revision 2038)
@@ -17,5 +17,4 @@
    !! trc_dia     : main routine of output passive tracer
    !! trcdit_wr   : outputs of concentration fields
-   !! trcdid_wr   : outputs of dvection-diffusion trends
    !! trcdii_wr   : outputs of additional 2D/3D diagnostics
    !! trcdib_wr   : outputs of biological fields
@@ -24,7 +23,5 @@
    USE oce_trc
    USE trc
-   USE trp_trc
    USE par_trc
-   USE trdmld_trc_oce, ONLY : luttrd
    USE dianam    ! build name of file (routine)
    USE in_out_manager  ! I/O manager
@@ -45,15 +42,10 @@
    INTEGER , DIMENSION (jpij*jpk) ::   ndext50   !: integer arrays for ocean 3D index
    INTEGER , DIMENSION (jpij)     ::   ndext51   !: integer arrays for ocean surface index
-# if defined key_trc_diaadd
+# if defined key_diatrc
    INTEGER  ::   nitd      !: id for additional array output file
    INTEGER  ::   ndepitd   !: id for depth mesh
    INTEGER  ::   nhoritd   !: id for horizontal mesh
 # endif
-# if defined key_trc_diatrd
-   INTEGER , DIMENSION (jptra) ::   nit6      !: id for additional array output file
-   INTEGER , DIMENSION (jptra) ::   ndepit6   !: id for depth mesh
-   INTEGER , DIMENSION (jptra) ::   nhorit6   !: id for horizontal mesh
-# endif
-# if defined key_trc_diabio
+# if defined key_diabio
    INTEGER  ::   nitb        !:         id.         for additional array output file
    INTEGER  ::   ndepitb   !:  id for depth mesh
@@ -82,5 +74,4 @@
       
       CALL trcdit_wr( kt, kindic )      ! outputs for tracer concentration
-      CALL trcdid_wr( kt, kindic )      ! outputs for dynamical trends
       CALL trcdii_wr( kt, kindic )      ! outputs for additional arrays
       CALL trcdib_wr( kt, kindic )      ! outputs for biological trends
@@ -111,5 +102,5 @@
       LOGICAL ::   ll_print = .FALSE.
       CHARACTER (len=40) :: clhstnam, clop
-#if defined key_off_tra
+#if defined key_offline
       INTEGER ::   inum = 11             ! temporary logical unit
 #endif
@@ -133,5 +124,5 @@
       ENDIF
 # if defined key_diainstant
-      zsto = nwritetrc * rdt
+      zsto = nn_writetrc * rdt
       clop = "inst("//TRIM(clop)//")"
 # else
@@ -139,5 +130,5 @@
       clop = "ave("//TRIM(clop)//")"
 # endif
-      zout = nwritetrc * zdt
+      zout = nn_writetrc * zdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -168,8 +159,8 @@
             &                    ' limit storage in depth = ', ipk
 
-#if defined key_off_tra
+#if defined key_offline
         ! WRITE root name in date.file for use by postpro
          IF(lwp) THEN
-            CALL dia_nam( clhstnam, nwritetrc,' ' )
+            CALL dia_nam( clhstnam, nn_writetrc,' ' )
             CALL ctlopn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', 1, numout, lwp, narea )
             WRITE(inum,*) clhstnam
@@ -179,5 +170,5 @@
 
          ! Define the NETCDF files for passive tracer concentration
-         CALL dia_nam( clhstnam, nwritetrc, 'ptrc_T' )
+         CALL dia_nam( clhstnam, nn_writetrc, 'ptrc_T' )
          IF(lwp)WRITE(numout,*)" Name of NETCDF file ", clhstnam
 
@@ -216,5 +207,5 @@
       ! ---------------------------------------
 
-      IF( lwp .AND. MOD( itmod, nwritetrc ) == 0 ) THEN
+      IF( lwp .AND. MOD( itmod, nn_writetrc ) == 0 ) THEN
          WRITE(numout,*) 'trcdit_wr : write NetCDF passive tracer concentrations at ', kt, 'time-step'
          WRITE(numout,*) '~~~~~~~~~ '
@@ -233,235 +224,5 @@
    END SUBROUTINE trcdit_wr
 
-# if defined key_trc_diatrd
-
-   SUBROUTINE trcdid_wr( kt, kindic )
-      !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE trcdid_wr  ***
-      !!
-      !! ** Purpose :   output of passive tracer : advection-diffusion trends
-      !!
-      !! ** Method  :   At the beginning of the first time step (nit000), define all
-      !!             the NETCDF files and fields for concentration of passive tracer
-      !!
-      !!        At each time step call histdef to compute the mean if necessary
-      !!        Each nwritetrd time step, output the instantaneous or mean fields
-      !!
-      !!        IF kindic <0, output of fields before the model interruption.
-      !!        IF kindic =0, time step loop
-      !!        IF kindic >0, output of fields before the time step loop
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt          ! ocean time-step
-      INTEGER, INTENT( in ) ::   kindic      ! indicator of abnormal termination
-      !!
-      LOGICAL ::   ll_print = .FALSE.
-      CHARACTER (len=40) ::   clhstnam, clop
-      CHARACTER (len=20) ::   cltra, cltrau
-      CHARACTER (len=80) ::   cltral
-      CHARACTER (len=10) ::   csuff
-      INTEGER  ::   jn, jl, ikn
-      INTEGER  ::   iimi, iima, ijmi, ijma, ipk, it, itmod
-      REAL(wp) ::   zsto, zout, zdt
-      !!----------------------------------------------------------------------
-
-      ! 0. Initialisation
-      ! -----------------
-      
-
-      ! local variable for debugging
-      ll_print = .FALSE.
-      ll_print = ll_print .AND. lwp
-      !
-      ! Define frequency of output and means
-      zdt = rdt
-      IF( ln_mskland )   THEN   ;   clop = "only(x)"   ! put 1.e+20 on land (very expensive!!)
-      ELSE                      ;   clop = "x"         ! no use of the mask value (require less cpu time)
-      ENDIF
-#  if defined key_diainstant
-      zsto = nwritetrd * rdt
-      clop = "inst("//TRIM(clop)//")"
-#  else
-      zsto = zdt
-      clop = "ave("//TRIM(clop)//")"
-#  endif
-      zout = nwritetrd * zdt
-
-      ! Define indices of the horizontal output zoom and vertical limit storage
-      iimi = 1      ;      iima = jpi
-      ijmi = 1      ;      ijma = jpj
-      ipk = jpk
-
-      ! define time axis
-      itmod = kt - nittrc000 + 1
-      it    = kt
-
-      ! Define the NETCDF files (one per tracer)
-      IF( ll_print ) WRITE(numout,*) 'trcdid kt=', kt, ' kindic ', kindic
-      
-      
-      IF( kt == nittrc000 ) THEN
-
-         DO jn = 1, jptra
-            !
-            IF( luttrd(jn) ) THEN      ! Define the file for dynamical trends - one per each tracer IF required
-
-               IF(lwp)WRITE(numout,*) ' indexes of zoom = ', iimi, iima, ijmi, ijma,  &
-                   &                   ' limit storage in depth = ', ipk
-               csuff='DY_'//ctrcnm(jn)
-               CALL dia_nam( clhstnam, nwritetrd, csuff )
-               IF(lwp)WRITE(numout,*)   " Name of NETCDF file for dynamical trends",   &
-                  &                     " of tracer number : ",clhstnam
-
-               CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,       &
-                  &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,   &
-                  &          nittrc000-ndttrc, zjulian, zdt, nhorit6(jn),  &
-                  &          nit6(jn) , domain_id=nidom )
-
-               ! Vertical grid for tracer trend - one per each tracer IF needed
-               CALL histvert( nit6(jn), 'deptht', 'Vertical T levels', 'm', ipk, gdept_0, ndepit6(jn) ) 
-             END IF
-          END DO
-
-          ! Declare all the output fields as NETCDF variables
-          DO jn = 1, jptra
-            IF( luttrd(jn) ) THEN
-                DO jl = 1, jpdiatrc
-                  IF( jl == jptrc_xad ) THEN
-                      ! short and long title for x advection for tracer
-                      WRITE (cltra,'("XAD_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("X advective trend for ",58a)') ctrcnl(jn)(1:58)
-                  END IF
-                  IF( jl == jptrc_yad ) THEN
-                      ! short and long title for y advection for tracer
-                      WRITE (cltra,'("YAD_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("Y advective trend for ",58a)') ctrcnl(jn)(1:58)
-                  END IF
-                  IF( jl == jptrc_zad ) THEN
-                      ! short and long title for Z advection for tracer
-                      WRITE (cltra,'("ZAD_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("Z advective trend for ",58a)') ctrcnl(jn)(1:58)
-                  END IF
-                  IF( jl == jptrc_xdf ) THEN
-                      ! short and long title for X diffusion for tracer
-                      WRITE (cltra,'("XDF_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("X diffusion trend for ",58a)') ctrcnl(jn)(1:58)
-                  END IF
-                  IF( jl == jptrc_ydf ) THEN
-                      ! short and long title for Y diffusion for tracer
-                      WRITE (cltra,'("YDF_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("Y diffusion trend for ",58a)') ctrcnl(jn)(1:58)
-                  END IF
-                  IF( jl == jptrc_zdf ) THEN
-                      ! short and long title for Z diffusion for tracer
-                      WRITE (cltra,'("ZDF_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("Z diffusion trend for ",58a)') ctrcnl(jn)(1:58)
-                  END IF
-# if defined key_trcldf_eiv
-                  IF( jl == jptrc_xei ) THEN
-                      ! short and long title for x gent velocity for tracer
-                      WRITE (cltra,'("XGV_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("X gent velocity trend for ",53a)') ctrcnl(jn)(1:53)
-                  END IF
-                  IF( jl == jptrc_yei ) THEN
-                      ! short and long title for y gent velocity for tracer
-                      WRITE (cltra,'("YGV_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("Y gent velocity trend for ",53a)') ctrcnl(jn)(1:53)
-                  END IF
-                  IF( jl == jptrc_zei ) THEN
-                      ! short and long title for Z gent velocity for tracer
-                      WRITE (cltra,'("ZGV_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("Z gent velocity trend for ",53a)') ctrcnl(jn)(1:53)
-                  END IF
-# endif
-# if defined key_trcdmp
-                  IF( jl == jptrc_dmp ) THEN
-                      ! last trends for tracer damping : short and long title
-                      WRITE (cltra,'("TDM_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("Tracer damping trend for ",55a)') ctrcnl(jn)(1:55)
-                  END IF
-# endif
-                  IF( jl == jptrc_sbc ) THEN
-                      ! last trends for tracer damping : short and long title
-                      WRITE (cltra,'("SBC_",16a)') ctrcnm(jn)
-                      WRITE (cltral,'("Surface boundary flux ",58a)') ctrcnl(jn)(1:55)
-                  END IF
-                      WRITE (cltral,'("Surface boundary flux ",58a)') ctrcnl(jn)(1:55)
-                  END IF
-                  CALL FLUSH( numout )
-                  cltrau = ctrcun(jn)      ! UNIT for tracer /trends
-                  CALL histdef( nit6(jn), cltra, cltral, cltrau, jpi,jpj,  &
-                     &          nhorit6(jn), ipk, 1, ipk,  ndepit6(jn), 32, clop ,  &
-                     &          zsto,zout )
-               END DO
-            END IF
-         END DO
-         ! CLOSE netcdf Files
-          DO jn = 1, jptra
-             IF( luttrd(jn) )   CALL histend( nit6(jn) )
-          END DO
-
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'End of NetCDF Initialization in trcdid'
-         IF(ll_print) CALL FLUSH(numout )
-         !
-      ENDIF
-
-      ! SOME diagnostics to DO first time
-
-      ! Start writing data
-      ! ---------------------
-
-      ! trends for tracer concentrations
-
-      IF( lwp .AND. MOD( itmod, nwritetrd ) == 0 ) THEN
-         WRITE(numout,*) 'trcdid_wr : write NetCDF dynamical trends at ', kt, 'time-step'
-         WRITE(numout,*) '~~~~~~ '
-      ENDIF
-
-      DO jn = 1, jptra
-         IF( luttrd(jn) ) THEN
-            ikn = ikeep(jn) 
-            DO jl = 1, jpdiatrc
-               ! short titles
-               IF( jl == jptrc_xad)   WRITE (cltra,'("XAD_",16a)') ctrcnm(jn)
-               IF( jl == jptrc_yad)   WRITE (cltra,'("YAD_",16a)') ctrcnm(jn)
-               IF( jl == jptrc_zad)   WRITE (cltra,'("ZAD_",16a)') ctrcnm(jn)
-               IF( jl == jptrc_xdf)   WRITE (cltra,'("XDF_",16a)') ctrcnm(jn)
-               IF( jl == jptrc_ydf)   WRITE (cltra,'("YDF_",16a)') ctrcnm(jn)
-               IF( jl == jptrc_zdf)   WRITE (cltra,'("ZDF_",16a)') ctrcnm(jn)
-# if defined key_trcldf_eiv
-               IF( jl == jptrc_xei)   WRITE (cltra,'("XGV_",16a)') ctrcnm(jn)
-               IF( jl == jptrc_yei)   WRITE (cltra,'("YGV_",16a)') ctrcnm(jn)
-               IF( jl == jptrc_zei)   WRITE (cltra,'("ZGV_",16a)') ctrcnm(jn)
-# endif
-# if defined key_trcdmp
-               IF( jl == jptrc_dmp )  WRITE (cltra,'("TDM_",16a)') ctrcnm(jn)
-# endif
-               IF( jl == jptrc_sbc )  WRITE (cltra,'("SBC_",16a)') ctrcnm(jn)
-               !
-               CALL histwrite(nit6(jn), cltra, it, trtrd(:,:,:,ikn,jl),ndimt50, ndext50)
-            END DO
-         END IF
-      END DO
-
-      ! Closing all files
-      ! -----------------
-      IF( kt == nitend .OR. kindic < 0 ) THEN
-         DO jn = 1, jptra
-            IF( luttrd(jn) )   CALL histclo( nit6(jn) )
-         END DO
-      ENDIF
-      !
-
-   END SUBROUTINE trcdid_wr
-
-# else
-
-   SUBROUTINE trcdid_wr( kt, kindic )                      ! Dummy routine
-      INTEGER, INTENT ( in ) ::   kt, kindic
-   END SUBROUTINE trcdid_wr
-
-# endif
-
-#if defined key_trc_diaadd
+#if defined key_diatrc
 
    SUBROUTINE trcdii_wr( kt, kindic )
@@ -506,5 +267,5 @@
       ENDIF
 #  if defined key_diainstant
-      zsto = nwritedia * zdt
+      zsto = nn_writedia * zdt
       clop = "inst("//TRIM(clop)//")"
 #  else
@@ -512,5 +273,5 @@
       clop = "ave("//TRIM(clop)//")"
 #  endif
-      zout = nwritedia * zdt
+      zout = nn_writedia * zdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -534,5 +295,5 @@
          ! Define the T grid file for tracer auxiliary files
 
-         CALL dia_nam( clhstnam, nwritedia, 'diad_T' )
+         CALL dia_nam( clhstnam, nn_writedia, 'diad_T' )
          IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam
 
@@ -581,5 +342,5 @@
       ! ---------------------
 
-      IF( lwp .AND. MOD( itmod, nwritedia ) == 0 ) THEN
+      IF( lwp .AND. MOD( itmod, nn_writedia ) == 0 ) THEN
          WRITE(numout,*) 'trcdii_wr : write NetCDF additional arrays at ', kt, 'time-step'
          WRITE(numout,*) '~~~~~~ '
@@ -613,5 +374,5 @@
 # endif
 
-# if defined key_trc_diabio
+# if defined key_diabio
 
    SUBROUTINE trcdib_wr( kt, kindic )
@@ -658,5 +419,5 @@
       ENDIF
 #        if defined key_diainstant
-      zsto = nwritebio * zdt
+      zsto = nn_writebio * zdt
       clop = "inst("//TRIM(clop)//")"
 #        else
@@ -664,5 +425,5 @@
       clop = "ave("//TRIM(clop)//")"
 #        endif
-      zout = nwritebio * zdt
+      zout = nn_writebio * zdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -684,5 +445,5 @@
          ! Define the NETCDF files for biological trends
 
-         CALL dia_nam(clhstnam,nwritebio,'biolog')
+         CALL dia_nam(clhstnam,nn_writebio,'biolog')
          IF(lwp)WRITE(numout,*) " Name of NETCDF file for biological trends ", clhstnam
          ! Horizontal grid : glamt and gphit
@@ -716,5 +477,5 @@
 
       ! biological trends
-      IF( lwp .AND. MOD( itmod, nwritebio ) == 0 ) THEN
+      IF( lwp .AND. MOD( itmod, nn_writebio ) == 0 ) THEN
          WRITE(numout,*) 'trcdit_wr : write NetCDF biological trends at ', kt, 'time-step'
          WRITE(numout,*) '~~~~~~ '
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcini.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcini.F90	(revision 2038)
@@ -18,8 +18,6 @@
    USE oce_trc
    USE trc
-   USE trp_trc
    USE trcrst
-   USE trcctl
-   USE trclec
+   USE trcnam          ! Namelist read
    USE trcini_cfc      ! CFC      initialisation
    USE trcini_lobster  ! LOBSTER  initialisation
@@ -28,8 +26,8 @@
    USE trcini_my_trc   ! MY_TRC   initialisation
    USE trcdta   
-#if defined key_off_tra 
+#if defined key_offline
    USE daymod
 #endif
-   USE zpshde_trc      ! partial step: hor. derivative 
+   USE zpshde          ! partial step: hor. derivative   (zps_hde_trc routine)
    USE in_out_manager  ! I/O manager
    USE prtctl_trc      ! Print control passive tracers (prt_ctl_trc_init routine)
@@ -78,14 +76,24 @@
 
       ! total volume of the ocean
-#if ! defined key_off_degrad
+#if ! defined key_degrad
       areatot = SUM( cvol(:,:,:) )
 #else
-      areatot = SUM( cvol(:,:,:) * facvol(:,:,:) ) ! degrad option: reduction by facvol
+      areatot = SUM( cvol(:,:,:) * facvol(:,:,:) )  ! degrad option: reduction by facvol
 #endif
-      IF( lk_mpp )   CALL mpp_sum( areatot )     ! sum over the global domain  
+      IF( lk_mpp )   CALL mpp_sum( areatot )        ! sum over the global domain  
 
-                                  CALL trc_lec      ! READ passive tracers namelists
+                                  CALL trc_nam      ! read passive tracers namelists
 
-                                  CALL trc_ctl      ! control consistency between parameters, cpp key
+      ! restart for passive tracer (input)
+      IF( ln_rsttr ) THEN
+         IF(lwp) WRITE(numout,*) '       read a restart file for passive tracer : ', cn_trcrst_in
+         IF(lwp) WRITE(numout,*) ' '
+      ELSE
+         IF(lwp) WRITE(numout,*)
+         DO jn = 1, jptra
+            IF( lwp .AND. lutini(jn) )  &                  ! open input FILE only IF lutini(jn) is true
+            &  WRITE(numout,*) '        read an initial file  for passive tracer number :', jn, ' traceur : ', ctrcnm(jn) 
+         END DO
+      ENDIF
 
       IF( lk_lobster ) THEN   ;   CALL trc_ini_lobster      ! LOBSTER bio-model
@@ -110,5 +118,5 @@
 
       IF( .NOT. ln_rsttr ) THEN 
-#if defined key_off_tra
+#if defined key_offline
          CALL day_init      ! calendar
 #endif
@@ -130,5 +138,5 @@
       
       IF( ln_zps .AND. .NOT. lk_trc_c1d )   &              ! Partial steps: before horizontal gradient of passive
-      &                     CALL zps_hde_trc( nittrc000, trb, gtru, gtrv )       ! tracers at the bottom ocean level
+      &                     CALL zps_hde_trc( nittrc000, jptra, trb, gtru, gtrv )       ! tracers at the bottom ocean level
 
 
@@ -136,5 +144,5 @@
       trai = 0.e0
       DO jn = 1, jptra
-#if ! defined key_off_degrad
+#if ! defined key_degrad
          trai = trai + SUM( trn(:,:,:,jn) * cvol(:,:,:) )
 #else
Index: anches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trclec.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trclec.F90	(revision 2037)
+++ 	(revision )
@@ -1,238 +1,0 @@
-MODULE trclec
-   !!======================================================================
-   !!                       ***  MODULE trclec  ***
-   !! TOP :   Read and print options for the passive tracer run (namelist)
-   !!======================================================================
-   !! History :    -   !  1996-11  (M.A. Foujols, M. Levy)  original code
-   !!              -   !  1998-04  (M.A Foujols, L. Bopp) ahtrb0 for isopycnal mixing
-   !!              -   !  1999-10  (M.A. Foujols, M. Levy) separation of sms
-   !!              -   !  2000-07  (A. Estublier) add TVD and MUSCL : Tests on ndttrc
-   !!              -   !  2000-11  (M.A Foujols, E Kestenare) trcrat, ahtrc0 and aeivtr0
-   !!              -   !  2001-01 (E Kestenare) suppress ndttrc=1 for CEN2 and TVD schemes
-   !!             1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90
-   !!----------------------------------------------------------------------
-#if defined key_top
-   !!----------------------------------------------------------------------
-   !!   'key_top'                                                TOP models
-   !!----------------------------------------------------------------------
-   !!   trc_lec    :  Read and print options for the passive tracer run (namelist)
-   !!----------------------------------------------------------------------
-   USE oce_trc
-   USE trc
-   USE trp_trc
-   USE trctrp_lec
-   USE trclsm_lobster    ! LOBSTER namelist
-   USE trclsm_pisces     ! PISCES namelist
-   USE trclsm_cfc        ! CFC SMS namelist
-   USE trclsm_c14b       ! C14 SMS namelist
-   USE trclsm_my_trc     ! MY_TRC SMS namelist
-   USE in_out_manager    ! I/O manager
-   USE trdmld_trc_oce
-
-   IMPLICIT NONE
-   PRIVATE 
-
-   PUBLIC trc_lec      ! called in ???
-
-   !! * Substitutions
-#  include "top_substitute.h90"
-   !!----------------------------------------------------------------------
-   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-   SUBROUTINE trc_lec
-      !!---------------------------------------------------------------------
-      !!                     ***  ROUTINE trc_lec  ***
-      !!
-      !! ** Purpose :   READ and PRINT options for the passive tracer run (namelist) 
-      !!
-      !! ** Method  : - read passive tracer namelist 
-      !!              - read namelist of each defined SMS model
-      !!                ( (LOBSTER, PISCES, CFC, MY_TRC )
-      !!---------------------------------------------------------------------
-      INTEGER ::  jn
-
-      ! Definition of a tracer as a structure
-      TYPE PTRACER
-         CHARACTER(len = 20)  :: sname  !: short name
-         CHARACTER(len = 80 ) :: lname  !: long name
-         CHARACTER(len = 20 ) :: unit   !: unit
-         LOGICAL              :: lini   !: read in a file or not
-         LOGICAL              :: lsav   !: ouput the tracer or not 
-      END TYPE PTRACER
-
-      TYPE(PTRACER) , DIMENSION(jptra) :: tracer
-
-      !!
-      NAMELIST/namtoptrc/ ndttrc, nwritetrc, ln_rsttr, nrsttr, &
-                          cn_trcrst_in, cn_trcrst_out, tracer
-#if defined key_trdmld_trc || defined key_trc_diatrd
-      NAMELIST/namtoptrd/ ntrd_trc, nctls_trc, ucf_trc, &
-                         ln_trdmld_trc_restart, ln_trdmld_trc_instant, &
-                         cn_trdrst_trc_in, cn_trdrst_trc_out, luttrd
-#endif
-
-      !!---------------------------------------------------------------------
-
-      IF(lwp) WRITE(numout,*) 'trc_lec : read the passive tracer namelists'
-      IF(lwp) WRITE(numout,*) '~~~~~~~'
-
-      CALL ctl_opn( numnat, 'namelist_top', 'OLD', 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. )
-
-      ! Namelist nattrc (files)
-      ! ----------------------------------------------
-      ndttrc    = 1                 ! default values
-      nwritetrc = 10      
-      ln_rsttr    = .FALSE.
-      nrsttr    =  0
-      cn_trcrst_in  = 'restart_trc'
-      cn_trcrst_out = 'restart_trc'
-      DO jn = 1, jptra
-         WRITE(ctrcnm(jn),'("TR_",I1)'           ) jn
-         WRITE(ctrcnl(jn),'("TRACER NUMBER ",I1)') jn
-         ctrcun(jn) = 'mmole/m3'
-         lutini(jn) = .FALSE. 
-         lutsav(jn) = .TRUE.
-      END DO
-
-      REWIND( numnat )               ! read nattrc
-      READ  ( numnat, namtoptrc )
-
-      !!Chris  computes the first time step of tracer model
-      nittrc000 = nit000 + ndttrc - 1
-
-      DO jn = 1, jptra
-         ctrcnm(jn) = tracer(jn)%sname
-         ctrcnl(jn) = tracer(jn)%lname
-         ctrcun(jn) = tracer(jn)%unit
-         lutini(jn) = tracer(jn)%lini
-         lutsav(jn) = tracer(jn)%lsav
-      END DO
-
-
-      IF(lwp) THEN                   ! control print
-         WRITE(numout,*)
-         WRITE(numout,*) ' Namelist : namtoptrc'
-         WRITE(numout,*) '    time step freq. for pass. trac. ndttrc             = ', ndttrc
-         WRITE(numout,*) '    1st time step for pass. trac. nittrc000            = ', nittrc000
-         WRITE(numout,*) '    frequency of outputs for passive tracers nwritetrc = ', nwritetrc  
-         WRITE(numout,*) '    restart LOGICAL for passive tr. ln_rsttr           = ', ln_rsttr
-         WRITE(numout,*) '    control of time step for p. tr. nrsttr             = ', nrsttr
-         WRITE(numout,*) ' '
-         DO jn = 1, jptra
-            WRITE(numout,*) '   tracer nb             : ', jn 
-            WRITE(numout,*) '   short name            : ', TRIM(ctrcnm(jn))
-            WRITE(numout,*) '   long name             : ', TRIM(ctrcnl(jn))
-            WRITE(numout,*) '   unit                  : ', TRIM(ctrcun(jn))
-            WRITE(numout,*) '   initial value in FILE : ', lutini(jn) 
-            WRITE(numout,*) '   output of tracer      : ', lutsav(jn)
-            WRITE(numout,*) ' '
-         END DO
-      ENDIF
-
-#if defined key_trdmld_trc || defined key_trc_diatrd
-
-      ! Namelist natrtd (transport trends)
-      ! ----------------------------------------------
-      ntrd_trc  = 20
-      nctls_trc =  6
-      ucf_trc   =  1.
-      ln_trdmld_trc_instant = .TRUE.
-      ln_trdmld_trc_restart =.FALSE.
-      cn_trdrst_trc_in  = "restart_mld_trc"
-      cn_trdrst_trc_out = "restart_mld_trc"
-      DO jn = 1, jptra
-         luttrd(jn) = .FALSE.
-      END DO
-
-      REWIND( numnat )               !  namelist namtoptrd : passive tracer trends diagnostic
-      READ  ( numnat, namtoptrd )
-
-#if defined key_trc_diatrd
-      nkeep    = 0
-      ikeep(:) = 0
-      DO jn = 1, jptra
-         IF( luttrd(jn) ) THEN 
-             nkeep     = nkeep + 1
-             ikeep(jn) = nkeep
-         END IF 
-      END DO
-      IF( nkeep > 0 ) THEN  
-        IF(.NOT. ALLOCATED( trtrd ) )   ALLOCATE( trtrd(jpi,jpj,jpk,nkeep,jpdiatrc) ) 
-        trtrd(:,:,:,:,:) = 0.e0
-      ENDIF 
-
-      nwritetrd = ntrd_trc
-#endif
-
-     IF(lwp) THEN
-         WRITE(numout,*)
-         WRITE(numout,*) ' trd_mld_trc_init : read namelist namtoptrd                        '
-         WRITE(numout,*) ' ~~~~~~~~~~~~~~~~                                               '
-         WRITE(numout,*) '   * frequency of trends diagnostics   ntrd_trc               = ', ntrd_trc
-         WRITE(numout,*) '   * control surface type              nctls_trc              = ', nctls_trc
-         WRITE(numout,*) '   * restart for ML diagnostics        ln_trdmld_trc_restart  = ', ln_trdmld_trc_restart
-         WRITE(numout,*) '   * flag to diagnose trends of                                 '
-         WRITE(numout,*) '     instantantaneous or mean ML T/S   ln_trdmld_trc_instant  = ', ln_trdmld_trc_instant
-         WRITE(numout,*) '   * unit conversion factor            ucf_trc                = ', ucf_trc
-#if defined key_trdmld_trc
-         DO jn = 1, jptra
-            WRITE(numout,*) '    keep dynamical trends for tracer number :', jn, luttrd(jn)
-         END DO
-#else
-         DO jn = 1, jptra
-            WRITE(numout,*) '    keep dynamical trends for tracer number :', jn, luttrd(jn), ikeep(jn)
-         END DO
-
-         WRITE(numout,*)
-         WRITE(numout,*) '    total = ', nkeep, ' tracers dyn trends saved'
-         WRITE(numout,*) '    size of trtrd = ', jpi*jpj*jpk*nkeep*jpdiatrc
-#endif
-      ENDIF
-
-#endif
-
-
-      ! namelist of transport
-      ! ---------------------
-      CALL trc_trp_lec
-
-      ! namelist of SMS
-      ! ---------------      
-      IF( lk_lobster ) THEN   ;   CALL trc_lsm_lobster      ! LOBSTER bio-model
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          LOBSTER not used'
-      ENDIF
-
-      IF( lk_pisces  ) THEN   ;   CALL trc_lsm_pisces      ! PISCES  bio-model
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          PISCES not used'
-      ENDIF
-
-      IF( lk_cfc     ) THEN   ;   CALL trc_lsm_cfc         ! CFC     tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          CFC not used'
-      ENDIF
-
-      IF( lk_c14b     ) THEN   ;   CALL trc_lsm_c14b         ! C14 bomb     tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          C14 not used'
-      ENDIF
-
-      IF( lk_my_trc  ) THEN   ;   CALL trc_lsm_my_trc      ! MY_TRC  tracers
-      ELSE                    ;   IF(lwp) WRITE(numout,*) '          MY_TRC not used'
-      ENDIF
-      !
-   END SUBROUTINE trc_lec
-
-#else
-   !!----------------------------------------------------------------------
-   !!  Dummy module :                                     No passive tracer
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE trc_lec                      ! Empty routine   
-   END SUBROUTINE trc_lec
-#endif
-
-   !!======================================================================
-END MODULE  trclec
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcnam.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcnam.F90	(revision 2038)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcnam.F90	(revision 2038)
@@ -0,0 +1,203 @@
+MODULE trcnam
+   !!======================================================================
+   !!                       ***  MODULE trcnam  ***
+   !! TOP :   Read and print options for the passive tracer run (namelist)
+   !!======================================================================
+   !! History :    -   !  1996-11  (M.A. Foujols, M. Levy)  original code
+   !!              -   !  1998-04  (M.A Foujols, L. Bopp) ahtrb0 for isopycnal mixing
+   !!              -   !  1999-10  (M.A. Foujols, M. Levy) separation of sms
+   !!              -   !  2000-07  (A. Estublier) add TVD and MUSCL : Tests on ndttrc
+   !!              -   !  2000-11  (M.A Foujols, E Kestenare) trcrat, ahtrc0 and aeivtr0
+   !!              -   !  2001-01 (E Kestenare) suppress ndttrc=1 for CEN2 and TVD schemes
+   !!             1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90
+   !!----------------------------------------------------------------------
+#if defined key_top
+   !!----------------------------------------------------------------------
+   !!   'key_top'                                                TOP models
+   !!----------------------------------------------------------------------
+   !!   trc_nam    :  Read and print options for the passive tracer run (namelist)
+   !!----------------------------------------------------------------------
+   USE oce_trc
+   USE trc
+   USE trcnam_trp        ! Transport namelist
+   USE trcnam_lobster    ! LOBSTER namelist
+   USE trcnam_pisces     ! PISCES namelist
+   USE trcnam_cfc        ! CFC SMS namelist
+   USE trcnam_c14b       ! C14 SMS namelist
+   USE trcnam_my_trc     ! MY_TRC SMS namelist
+   USE in_out_manager    ! I/O manager
+   USE trdmod_trc_oce
+
+   IMPLICIT NONE
+   PRIVATE 
+
+   PUBLIC trc_nam      ! called in trcini
+
+   !! * Substitutions
+#  include "top_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id: trclec.F90 1581 2009-08-05 14:53:12Z smasson $ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+CONTAINS
+
+   SUBROUTINE trc_nam
+      !!---------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_nam  ***
+      !!
+      !! ** Purpose :   READ and PRINT options for the passive tracer run (namelist) 
+      !!
+      !! ** Method  : - read passive tracer namelist 
+      !!              - read namelist of each defined SMS model
+      !!                ( (LOBSTER, PISCES, CFC, MY_TRC )
+      !!---------------------------------------------------------------------
+      INTEGER ::  jn
+
+      ! Definition of a tracer as a structure
+      TYPE PTRACER
+         CHARACTER(len = 20)  :: clsname  !: short name
+         CHARACTER(len = 80 ) :: cllname  !: long name
+         CHARACTER(len = 20 ) :: clunit   !: unit
+         LOGICAL              :: llinit   !: read in a file or not
+         LOGICAL              :: llsave   !: save the tracer or not
+      END TYPE PTRACER
+
+      TYPE(PTRACER) , DIMENSION(jptra) :: sn_tracer
+
+      !!
+      NAMELIST/namtrc/    nn_dttrc, nn_writetrc, ln_rsttr, nn_rsttr, &
+                          cn_trcrst_in, cn_trcrst_out, sn_tracer
+#if defined key_trdmld_trc  || defined key_trdtrc
+      NAMELIST/namtrc_trd/ nn_trd_trc, nn_ctls_trc, rn_ucf_trc, &
+                         ln_trdmld_trc_restart, ln_trdmld_trc_instant, &
+                         cn_trdrst_trc_in, cn_trdrst_trc_out, ln_trdtrc
+#endif
+
+      !!---------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*) 'trc_nam : read the passive tracer namelists'
+      IF(lwp) WRITE(numout,*) '~~~~~~~'
+
+      CALL ctl_opn( numnat, 'namelist_top', 'OLD', 'FORMATTED', 'SEQUENTIAL', 1, numout, .FALSE. )
+
+      ! Namelist nattrc (files)
+      ! ----------------------------------------------
+      nn_dttrc    = 1                 ! default values
+      nn_writetrc = 10      
+      ln_rsttr    = .FALSE.
+      nn_rsttr    =  0
+      cn_trcrst_in  = 'restart_trc'
+      cn_trcrst_out = 'restart_trc'
+      DO jn = 1, jptra
+         WRITE(ctrcnm(jn),'("TR_",I1)'           ) jn
+         WRITE(ctrcnl(jn),'("TRACER NUMBER ",I1)') jn
+         ctrcun(jn) = 'mmole/m3'
+         lutini(jn) = .FALSE. 
+         lutsav(jn) = .TRUE. 
+      END DO
+
+      REWIND( numnat )               ! read nattrc
+      READ  ( numnat, namtrc )
+
+      !!Chris  computes the first time step of tracer model
+      nittrc000 = nit000 + nn_dttrc - 1
+
+      DO jn = 1, jptra
+         ctrcnm(jn) = sn_tracer(jn)%clsname
+         ctrcnl(jn) = sn_tracer(jn)%cllname
+         ctrcun(jn) = sn_tracer(jn)%clunit
+         lutini(jn) = sn_tracer(jn)%llinit
+         lutsav(jn) = sn_tracer(jn)%llsave
+      END DO
+
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : namtrc'
+         WRITE(numout,*) '    time step freq. for pass. trac. nn_dttrc             = ', nn_dttrc
+         WRITE(numout,*) '    1st time step for pass. trac. nittrc000              = ', nittrc000
+         WRITE(numout,*) '    frequency of outputs for passive tracers nn_writetrc = ', nn_writetrc  
+         WRITE(numout,*) '    restart LOGICAL for passive tr. ln_rsttr             = ', ln_rsttr
+         WRITE(numout,*) '    control of time step for p. tr. nn_rsttr             = ', nn_rsttr
+         WRITE(numout,*) ' '
+         DO jn = 1, jptra
+            WRITE(numout,*) '   tracer nb             : ', jn 
+            WRITE(numout,*) '   short name            : ', TRIM(ctrcnm(jn))
+            WRITE(numout,*) '   long name             : ', TRIM(ctrcnl(jn))
+            WRITE(numout,*) '   unit                  : ', TRIM(ctrcun(jn))
+            WRITE(numout,*) '   initial value in FILE : ', lutini(jn) 
+            WRITE(numout,*) ' '
+         END DO
+      ENDIF
+
+#if defined key_trdmld_trc || defined key_trdtrc
+      nn_trd_trc  = 20
+      nn_ctls_trc =  9
+      rn_ucf_trc   =  1.
+      ln_trdmld_trc_instant = .TRUE.
+      ln_trdmld_trc_restart =.FALSE.
+      cn_trdrst_trc_in  = "restart_mld_trc"
+      cn_trdrst_trc_out = "restart_mld_trc"
+      ln_trdtrc(:) = .FALSE.
+
+      REWIND( numnat )               !  namelist namtoptrd : passive tracer trends diagnostic
+      READ  ( numnat, namtrc_trd )
+
+     IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) ' trd_mld_trc_init : read namelist namtrc_trd                    '
+         WRITE(numout,*) ' ~~~~~~~~~~~~~~~~                                               '
+         WRITE(numout,*) '   * frequency of trends diagnostics   nn_trd_trc             = ', nn_trd_trc
+         WRITE(numout,*) '   * control surface type              nn_ctls_trc            = ', nn_ctls_trc
+         WRITE(numout,*) '   * restart for ML diagnostics        ln_trdmld_trc_restart  = ', ln_trdmld_trc_restart
+         WRITE(numout,*) '   * flag to diagnose trends of                                 '
+         WRITE(numout,*) '     instantantaneous or mean ML T/S   ln_trdmld_trc_instant  = ', ln_trdmld_trc_instant
+         WRITE(numout,*) '   * unit conversion factor            rn_ucf_trc             = ', rn_ucf_trc
+         DO jn = 1, jptra
+            IF( ln_trdtrc(jn) ) WRITE(numout,*) '    compute ML trends for tracer number :', jn
+         END DO
+      ENDIF
+#endif
+
+      ! namelist of transport
+      ! ---------------------
+      CALL trc_nam_trp
+
+
+      ! namelist of SMS
+      ! ---------------      
+      IF( lk_lobster ) THEN   ;   CALL trc_nam_lobster      ! LOBSTER bio-model
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          LOBSTER not used'
+      ENDIF
+
+      IF( lk_pisces  ) THEN   ;   CALL trc_nam_pisces      ! PISCES  bio-model
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          PISCES not used'
+      ENDIF
+
+      IF( lk_cfc     ) THEN   ;   CALL trc_nam_cfc         ! CFC     tracers
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          CFC not used'
+      ENDIF
+
+      IF( lk_c14b     ) THEN   ;   CALL trc_nam_c14b         ! C14 bomb     tracers
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          C14 not used'
+      ENDIF
+
+      IF( lk_my_trc  ) THEN   ;   CALL trc_nam_my_trc      ! MY_TRC  tracers
+      ELSE                    ;   IF(lwp) WRITE(numout,*) '          MY_TRC not used'
+      ENDIF
+      !
+   END SUBROUTINE trc_nam
+
+#else
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                     No passive tracer
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE trc_nam                      ! Empty routine   
+   END SUBROUTINE trc_nam
+#endif
+
+   !!======================================================================
+END MODULE  trcnam
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcrst.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcrst.F90	(revision 2038)
@@ -25,5 +25,5 @@
    USE oce_trc
    USE trc
-   USE trctrp_lec
+   USE trcnam_trp
    USE lib_mpp
    USE iom
@@ -33,5 +33,5 @@
    USE trcrst_c14b     ! C14 bomb restart
    USE trcrst_my_trc   ! MY_TRC   restart
-#if defined key_off_tra
+#if defined key_offline
     USE daymod
 #endif
@@ -67,5 +67,5 @@
       !!----------------------------------------------------------------------
       !
-# if ! defined key_off_tra
+# if ! defined key_offline
       IF( kt == nit000 ) lrst_trc = .FALSE. 
 # else
@@ -82,7 +82,7 @@
 # endif
      ! to get better performances with NetCDF format:
-     ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*ndttrc + 1)
-     ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*ndttrc + 1
-     IF( kt == nitrst - 2*ndttrc + 1 .OR. nstock == ndttrc .OR. ( kt == nitend - ndttrc + 1 .AND. .NOT. lrst_trc ) ) THEN
+     ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1)
+     ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1
+     IF( kt == nitrst - 2*nn_dttrc + 1 .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc + 1 .AND. .NOT. lrst_trc ) ) THEN
          ! beware of the format used to write kt (default is i8.8, that should be large enough)
          IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst
@@ -222,6 +222,6 @@
       !!
       !!   According to namelist parameter nrstdt,
-      !!       nrsttr = 0  no control on the date (nittrc000 is  arbitrary).
-      !!       nrsttr = 1  we verify that nit000 is equal to the last
+      !!       nn_rsttr = 0  no control on the date (nittrc000 is  arbitrary).
+      !!       nn_rsttr = 1  we verify that nit000 is equal to the last
       !!                   time step of previous run + 1.
       !!       In both those options, the  exact duration of the experiment
@@ -230,5 +230,5 @@
       !!       This is valid is the time step has remained constant.
       !!
-      !!       nrsttr = 2  the duration of the experiment in days (adatrj)
+      !!       nn_rsttr = 2  the duration of the experiment in days (adatrj)
       !!                    has been stored in the restart file.
       !!----------------------------------------------------------------------
@@ -237,5 +237,5 @@
       !
       REAL(wp) ::  zkt
-#if defined key_off_tra
+#if defined key_offline
       REAL(wp) ::  zndastp
 #endif
@@ -250,18 +250,18 @@
             WRITE(numout,*) '   previous time-step                               : ', NINT( zkt )
             WRITE(numout,*) ' *** restart option'
-            SELECT CASE ( nrsttr )
-            CASE ( 0 )   ;   WRITE(numout,*) ' nrsttr = 0 : no control of nittrc000'
-            CASE ( 1 )   ;   WRITE(numout,*) ' nrsttr = 1 : no control the date at nit000 (use ndate0 read in the namelist)'
-            CASE ( 2 )   ;   WRITE(numout,*) ' nrsttr = 2 : calendar parameters read in restart'
+            SELECT CASE ( nn_rsttr )
+            CASE ( 0 )   ;   WRITE(numout,*) ' nn_rsttr = 0 : no control of nittrc000'
+            CASE ( 1 )   ;   WRITE(numout,*) ' nn_rsttr = 1 : no control the date at nit000 (use ndate0 read in the namelist)'
+            CASE ( 2 )   ;   WRITE(numout,*) ' nn_rsttr = 2 : calendar parameters read in restart'
             END SELECT
             WRITE(numout,*)
          ENDIF
          ! Control of date 
-         IF( nittrc000  - NINT( zkt ) /= 1 .AND.  nrsttr /= 0 )                                  &
+         IF( nittrc000  - NINT( zkt ) /= 1 .AND.  nn_rsttr /= 0 )                                  &
             &   CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart',                 &
-            &                  ' verify the restart file or rerun with nrsttr = 0 (namelist)' )
-#if defined key_off_tra
+            &                  ' verify the restart file or rerun with nn_rsttr = 0 (namelist)' )
+#if defined key_offline
          ! define ndastp and adatrj
-         IF ( nrsttr == 2 ) THEN
+         IF ( nn_rsttr == 2 ) THEN
             CALL iom_get( numrtr, 'ndastp', zndastp ) 
             ndastp = NINT( zndastp )
@@ -329,5 +329,5 @@
                DO ji = 1, jpi
                   zvol = cvol(ji,jj,jk)
-#  if defined key_off_degrad
+#  if defined key_degrad
                   zvol = zvol * facvol(ji,jj,jk)
 #  endif
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcsms.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcsms.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcsms.F90	(revision 2038)
@@ -48,5 +48,5 @@
       !!---------------------------------------------------------------------
 
-      IF ( MOD(kt,ndttrc) /= 0) RETURN      ! this ROUTINE is called only every ndttrc time step
+      IF ( MOD( kt, nn_dttrc) /= 0 ) RETURN      ! this ROUTINE is called only every ndttrc time step
 
       IF( lk_lobster )   CALL trc_sms_lobster( kt )    ! main program of LOBSTER
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcstp.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcstp.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcstp.F90	(revision 2038)
@@ -10,5 +10,5 @@
    !! * Modules used
    USE oce_trc          ! ocean dynamics and active tracers variables
-   USE trp_trc
+   USE trc
    USE trctrp           ! passive tracers transport
    USE trcsms           ! passive tracers sources and sinks
@@ -17,5 +17,5 @@
    USE trcwri
    USE trcrst
-   USE trdmld_trc_oce
+   USE trdmod_trc_oce
    USE trdmld_trc
    USE iom
@@ -52,6 +52,6 @@
       CHARACTER (len=25)    ::  charout
 
-      ! this ROUTINE is called only every ndttrc time step
-      IF( MOD( kt , ndttrc ) /= 0 ) RETURN
+      ! this ROUTINE is called only every nn_dttrc time step
+      IF( MOD( kt , nn_dttrc ) /= 0 ) RETURN
 
       IF(ln_ctl) THEN
@@ -59,4 +59,6 @@
          CALL prt_ctl_trc_info(charout)
       ENDIF
+
+      tra(:,:,:,:) = 0.
 
       IF( kt == nittrc000 .AND. lk_trdmld_trc  )  &
Index: /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcwri.F90
===================================================================
--- /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcwri.F90	(revision 2037)
+++ /branches/DEV_r2006_merge_TRA_TRC/NEMO/TOP_SRC/trcwri.F90	(revision 2038)
@@ -5,5 +5,4 @@
    !!====================================================================================
    !! History :   1.0  !  2009-05 (C. Ethe)  Original code
-   !!                  !  2010-03 (C. Ethe, R. Seferian ) Add the tracer transport trends
    !!----------------------------------------------------------------------
 #if defined key_top &&  defined key_iomput
@@ -12,13 +11,10 @@
    !!----------------------------------------------------------------------
    !! trc_wri_trc   :  outputs of concentration fields
-   !! trc_wri_trd   :  outputs of transport trends
    !!----------------------------------------------------------------------
    USE dom_oce         ! ocean space and time domain variables
    USE oce_trc
-   USE trp_trc
    USE trc
-   USE trdmld_trc_oce, ONLY : luttrd
    USE iom
-#if defined key_off_tra
+#if defined key_offline
    USE oce_trc
    USE dianam
@@ -50,7 +46,6 @@
 
       !
-      CALL iom_setkt  ( kt + ndttrc - 1 )       ! set the passive tracer time step
+      CALL iom_setkt  ( kt + nn_dttrc - 1 )       ! set the passive tracer time step
       CALL trc_wri_trc( kt              )       ! outputs for tracer concentration
-      CALL trc_wri_trd( kt              )       ! outputs for dynamical trends
       CALL iom_setkt  ( kt              )       ! set the model time step
       !
@@ -65,6 +60,6 @@
       INTEGER, INTENT( in ) :: kt       ! ocean time-step
       INTEGER               :: jn
-      CHARACTER (len=20)    :: cltra, cltras
-#if defined key_off_tra
+      CHARACTER (len=20)    :: cltra
+#if defined key_offline
       CHARACTER (len=40) :: clhstnam
       INTEGER ::   inum = 11            ! temporary logical unit
@@ -72,9 +67,9 @@
       !!---------------------------------------------------------------------
  
-#if defined key_off_tra
+#if defined key_offline
       IF( kt == nittrc000 ) THEN
         ! WRITE root name in date.file for use by postpro
          IF(lwp) THEN
-            CALL dia_nam( clhstnam, nwritetrc,' ' )
+            CALL dia_nam( clhstnam, nn_writetrc,' ' )
             CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
             WRITE(inum,*) clhstnam
@@ -92,51 +87,4 @@
    END SUBROUTINE trc_wri_trc
 
-# if defined key_trc_diatrd
-
-   SUBROUTINE trc_wri_trd( kt )
-      !!----------------------------------------------------------------------
-      !!                     ***  ROUTINE trc_wri_trd  ***
-      !!
-      !! ** Purpose :   output of passive tracer : advection-diffusion trends
-      !!
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt          ! ocean time-step
-      !!
-      CHARACTER (len=3) ::   cltra
-      INTEGER  ::   jn, jl, ikn
-      !!----------------------------------------------------------------------
-
-      DO jn = 1, jptra
-         IF( luttrd(jn) ) THEN
-            ikn = ikeep(jn)
-            DO jl = 1, jpdiatrc
-               IF( jl == jptrc_xad ) WRITE (cltra,"(3a)") 'XAD' ! x advection for tracer
-               IF( jl == jptrc_yad ) WRITE (cltra,"(3a)") 'YAD'  ! y advection for tracer
-               IF( jl == jptrc_zad ) WRITE (cltra,"(3a)") 'ZAD'  ! z advection for tracer
-               IF( jl == jptrc_xdf ) WRITE (cltra,"(3a)") 'XDF'  ! x diffusion for tracer
-               IF( jl == jptrc_ydf ) WRITE (cltra,"(3a)") 'YDF'  ! y diffusion for tracer
-               IF( jl == jptrc_zdf ) WRITE (cltra,"(3a)") 'ZDF'  ! z diffusion for tracer
-# if defined key_trcldf_eiv
-               IF( jl == jptrc_xei ) WRITE (cltra,"(3a)") 'XGV'  ! x gent velocity for tracer
-               IF( jl == jptrc_yei ) WRITE (cltra,"(3a)") 'YGV'  ! y gent velocity for tracer
-               IF( jl == jptrc_zei ) WRITE (cltra,"(3a)") 'ZGV'  ! z gent velocity for tracer
-# endif
-# if defined key_trcdmp
-               IF( jl == jptrc_dmp ) WRITE (cltra,"(3a)") 'DMP'  ! damping
-# endif
-               IF( jl == jptrc_sbc ) WRITE (cltra,"(3a)") 'SBC'  ! surface boundary conditions
-               ! write the trends
-               CALL iom_put( cltra, trtrd(:,:,:,ikn,jl) )
-            END DO
-         END IF
-      END DO
-      !
-   END SUBROUTINE trc_wri_trd
-
-# else
-   SUBROUTINE trc_wri_trd( kt )                      ! Dummy routine
-      INTEGER, INTENT ( in ) ::   kt
-   END SUBROUTINE trc_wri_trd
-#endif
 #else
    !!----------------------------------------------------------------------
