Index: trunk/NEMO/TOP_SRC/initrc.F90
===================================================================
--- trunk/NEMO/TOP_SRC/initrc.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/initrc.F90	(revision 335)
@@ -1,64 +1,62 @@
 MODULE initrc
-   !!===========================================================================================
+   !!================================================
    !!
    !!                       *** MODULE initrc ***
    !! Initialisation the tracer model
-   !!===========================================================================================
-
-   !!----------------------------------------------------------------------
-   !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
-   !!----------------------------------------------------------------------
-
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      !! ==============
-      USE oce_trc
-      USE trc
-      USE trcrst
-      USE trcctl
-      USE trclec
-      USE trcdtr
-      USE trcini
-
-      IMPLICIT NONE
-      PRIVATE
-
-
-   !! * Accessibility
-   PUBLIC ini_trc
-
-CONTAINS
+   !!================================================
                                                                                                                             
 #if defined key_passivetrc
 
-SUBROUTINE ini_trc
-   !!---------------------------------------------------------------------
-   !!
-   !!                       ROUTINE ini_trc
-   !!                     ******************
-   !!
-   !!  PURPOSE :
-   !!  ---------
-   !!     initialize the tracer model
-   !!
-   !!   METHOD :
-   !!   -------
-   !!
-   !!
-   !!   History:
-   !!   -------
-   !!      original  : 91-03 ()
-   !!      additions : 92-01 (C. Levy)
-   !!     05-03 (O. Aumont and A. El Moussaoui) F90
-   !!----------------------------------------------------------------------
+   !!-------------------------------------------------------
+   !!  TOP 1.0,  LOCEAN-IPSL (2005)
+   !!-------------------------------------------------------
 
-   !!---------------------------------------------------------------------
-   !!  OPA.9, 03-2005
-   !!---------------------------------------------------------------------
+   !!--------------------------------------------------------------
+   !! * Modules used
+   !! ==============
+   USE oce_trc
+   USE trc
+   USE trcrst
+   USE trcctl
+   USE trclec
+   USE trcdtr
+   USE trcini
+   
+   IMPLICIT NONE
+   PRIVATE
+   
+   
+   !! * Accessibility
+   PUBLIC ini_trc
+   
+CONTAINS
+   
+   SUBROUTINE ini_trc
+      !!---------------------------------------------------------------------
+      !!
+      !!                       ROUTINE ini_trc
+      !!                     ******************
+      !!
+      !!  PURPOSE :
+      !!  ---------
+      !!     initialize the tracer model
+      !!
+      !!   METHOD :
+      !!   -------
+      !!
+      !!
+      !!   History:
+      !!   -------
+      !!      original  : 91-03 ()
+      !!      additions : 92-01 (C. Levy)
+      !!     05-03 (O. Aumont and A. El Moussaoui) F90
+      !!----------------------------------------------------------------------
 
-   !! 0.b PRINT the number of tracer
-   !! ------------------------------
+      !!---------------------------------------------------------------------
+      !!  OPA.9, 03-2005
+      !!---------------------------------------------------------------------
+
+      !! 0.b PRINT the number of tracer
+      !! ------------------------------
 
       IF(lwp) WRITE(numout,*) ' '
@@ -66,40 +64,45 @@
       IF(lwp) WRITE(numout,*) ' '
 
-   ! 1. READ passive tracers namelists
-   ! ---------------------------------
+      ! 1. READ passive tracers namelists
+      ! ---------------------------------
 
       CALL trc_lec
 
-   ! 2. control consistency between parameters, cpp key and namelists
-   ! ----------------------------------------------------------------
+      ! 2. control consistency between parameters, cpp key and namelists
+      ! ----------------------------------------------------------------
 
       CALL trc_ctl
 
-   ! 3. computes some initializations
-   ! --------------------------------
+      ! 3. computes some initializations
+      ! --------------------------------
 
       CALL trc_ini
 
-   ! 4. restart from a FILE (nutrst)
-   ! ----------------------
+      ! 4. restart from a FILE (nutrst)
+      ! ----------------------
 
-      IF(lrsttr) THEN
+      IF( lrsttr ) THEN
 
-          CALL trc_rst
+
+         CALL trc_rst
 
       ELSE
 
-   ! start from anything ELSE
+         ! start from anything ELSE
 
-          CALL trc_dtr
+         CALL trc_dtr
 
       ENDIF
 
-END SUBROUTINE ini_trc
+   END SUBROUTINE ini_trc
 
 #else
-SUBROUTINE ini_trc
-   ! no passive tracers
-END SUBROUTINE ini_trc
+   !!======================================================================
+   !!  Empty module : No passive tracer
+   !!======================================================================
+CONTAINS
+   SUBROUTINE ini_trc
+      
+   END SUBROUTINE ini_trc
 #endif
 
Index: trunk/NEMO/TOP_SRC/oce_trc.F90
===================================================================
--- trunk/NEMO/TOP_SRC/oce_trc.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/oce_trc.F90	(revision 335)
@@ -41,9 +41,16 @@
       nwrite   =>   nwrite,  & !: frequency of OUTPUT file
       nstock   =>   nstock,  & !: frequency of restart file
+      nprint   =>   nprint,  & !: level of print (0 no print)
       lwp      =>   lwp   ,  & !: boolean term for mpp output
-      ln_ctl   =>   ln_ctl ,  & !: = ln_ctl.AND.lwp (print control on the 1st proc)
-      nictle   =>   nictle ,  & !: = max i indice to make the control SUM
-      njctle   =>   njctle ,  & !: = max j indice to make the control SUM
+      ln_ctl   =>   ln_ctl,  & !: = ln_ctl.AND.lwp (print control on the 1st proc)
+      nictls   =>   nictls,  & !: Start i indice for the SUM control
+      nictle   =>   nictle,  & !: End   i indice for the SUM control
+      njctls   =>   njctls,  & !: Start j indice for the SUM control
+      njctle   =>   njctle,  & !: End   j indice for the SUM control
+      isplt    =>   isplt ,  & !: number of processors following i
+      jsplt    =>   jsplt ,  & !: number of processors following j
+      ijsplt   =>   ijsplt,  & !: nb of local domain = nb of processors
       numout   =>   numout     !: logical unit for output print
+
 
    !! run controm   
@@ -73,4 +80,6 @@
       nimpp    =>   nimpp ,  & !: i index for mpp-subdomain left bottom
       njmpp    =>   njmpp ,  & !: j index for mpp-subdomain left bottom
+      nproc    =>   nproc ,  & !: number for local processor
+      narea    =>   narea ,  & !: number for local area
       mig      =>   mig   ,  & !: local  ==> global  domain i-indice
       mjg      =>   mjg   ,  & !: local  ==> global  domain i-indice
@@ -79,5 +88,18 @@
       mj0      =>   mj0   ,  & !: global ==> local domain j-indice 
       mj1      =>   mj1        !: (mj0=1 and mj1=0 if the global indice is not in the local domain)
-      
+ 
+   USE dom_oce , ONLY :       & 
+      nimppt   => nimppt  ,  & !:i-indexes for each processor
+      njmppt   => njmppt  ,  & !:j-indexes for each processor
+      ibonit   => ibonit  ,  & !:i-processor neighbour existence
+      ibonjt   => ibonjt  ,  & !:j- processor neighbour existence 
+      nlcit    => nlcit   ,  & !:dimensions of every i-subdomain
+      nlcjt    => nlcjt   ,  & !:dimensions of every j-subdomain
+      nldit    => nldit   ,  & !:first indoor index for each i-domain 
+      nleit    => nleit   ,  & !:last indoor index for each i-domain 
+      nldjt    => nldjt   ,  & !:first indoor index for each j-domain 
+      nlejt    => nlejt        !:last indoor index for each j-domain 
+
+    
       !! horizontal curvilinear coordinate and scale factors
    USE dom_oce , ONLY :            &    
@@ -198,5 +220,11 @@
       tn      =>    tn    ,  & !: pot. temperature (celsius)
       sn      =>    sn    ,  & !: salinity (psu)
-      rhop    =>    rhop       !: potential volumic mass (kg m-3) 
+      rhop    =>    rhop  ,  & !: potential volumic mass (kg m-3) 
+      rhd     =>    rhd        !: in situ density anomalie rhd=(rho-rau0)/rau0 (no units)
+
+#if defined key_trc_diatrd
+   USE oce , ONLY :          &
+      hdivn   =>    hdivn      !: horizontal divergence (1/s)
+#endif
 
 #if defined key_flx_bulk_monthly || defined key_flx_bulk_daily
@@ -214,4 +242,9 @@
    USE trabbl , ONLY :           &      
       atrbbl   =>   atrbbl     !: lateral coeff. for bottom boundary layer scheme (m2/s)
+#  if defined key_off_tra
+   USE trabbl, ONLY :            &
+      bblx   => bblx,       &
+      bbly   => bbly
+#  endif
 #endif
 
@@ -262,5 +295,6 @@
    USE zdfmxl , ONLY :             &    
       hmld    =>   hmld   ,  & !: mixing layer depth (turbocline)
-      hmlp    =>   hmlp        !: mixed layer depth  (rho=rho0+zdcrit) (m)
+      hmlp    =>   hmlp   ,  & !: mixed layer depth  (rho=rho0+zdcrit) (m)
+      hmlpt   =>   hmlpt       !: mixed layer depth at t-points (m)
 
    USE ldfslp , ONLY :              & 
Index: trunk/NEMO/TOP_SRC/par_trc_trp.F90
===================================================================
--- trunk/NEMO/TOP_SRC/par_trc_trp.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/par_trc_trp.F90	(revision 335)
@@ -8,6 +8,4 @@
    !!----------------------------------------------------------------------
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
 #if defined key_passivetrc
@@ -23,89 +21,22 @@
    !! jpdia3d : additional 3d output
 
-#if defined key_trc_npzd
-   !!---------------------------------------------------------------------
-   !!   'key_trc_npzd'   :                    NPZD Source Minus Sink model
-   !!---------------------------------------------------------------------
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 4
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1
-#endif
-#elif defined key_trc_lobster1
+#if defined key_trc_lobster1
    !!---------------------------------------------------------------------
    !!   'key_trc_lobster1'   :            LOBSTER1 Source Minus Sink model
    !!---------------------------------------------------------------------
    INTEGER, PUBLIC, PARAMETER :: jptra   = 6
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 18
+#  if defined key_trc_diaadd
+   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 19
    INTEGER, PUBLIC, PARAMETER :: jpdia3d = 3
-#endif
-#elif defined key_trc_hamocc3
-#  if defined key_trc_p3zd
-#       if defined key_trc_biohamocc13
+#  endif
+#elif defined key_cfc
    !!---------------------------------------------------------------------
-   !!   'key_trc_p3zd && key_trc_biohamocc13' P3ZD Source Minus Sink model
+   !!   'key_cfc'   :                      CFC Source Minus Sink model
    !!---------------------------------------------------------------------
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 11
-#if defined key_trc_diaadd
+   INTEGER, PUBLIC, PARAMETER :: jptra   = 2
+#  if defined key_trc_diaadd
    INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1
    INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1
-#endif
-   !!---------------------------------------------------------------------
-   !!   'key_trc_p3zd'   :                    P3ZD Source Minus Sink model
-   !!---------------------------------------------------------------------
-#       else
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 10
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1
-#       endif
-#   else
-   !!---------------------------------------------------------------------
-   !!  'key_trc_hamocc3 && key_trc_biohamocc13' HAMMOCC Source Minus Sink model
-   !!---------------------------------------------------------------------
-#       if defined key_trc_biohamocc13
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 8
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1
-#endif
-#       else
-   !!---------------------------------------------------------------------
-   !!  'key_trc_hamocc3 ' HAMMOCC Source Minus Sink model
-   !!---------------------------------------------------------------------
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 7
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1
-#endif
-#       endif
-#   endif
-#elif defined key_cfc
-   !!---------------------------------------------------------------------
-   !!   'key_trc_cfc'   :                      CFC Source Minus Sink model
-   !!---------------------------------------------------------------------
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 2
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1
-#endif
-#elif defined key_gosac
-   !!---------------------------------------------------------------------
-   !!   'key_trc_gosac'   :                  GOSAC Source Minus Sink model
-   !!---------------------------------------------------------------------
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 2
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1
-#endif
-#elif defined key_trc_age
-   !!---------------------------------------------------------------------
-   !!   'key_trc_age'   :                    AGE Source Minus Sink model
-   !!---------------------------------------------------------------------
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 2
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1
-#endif
+#  endif
 #elif defined key_trc_pisces
    !!---------------------------------------------------------------------
@@ -113,8 +44,8 @@
    !!---------------------------------------------------------------------
    INTEGER, PUBLIC, PARAMETER :: jptra   = 24
-#if defined key_trc_diaadd
+#  if defined key_trc_diaadd
    INTEGER, PUBLIC, PARAMETER :: jpdia2d = 13
    INTEGER, PUBLIC, PARAMETER :: jpdia3d = 11
-#endif
+#  endif
 #else
    !!---------------------------------------------------------------------
Index: trunk/NEMO/TOP_SRC/trc.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trc.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trc.F90	(revision 335)
@@ -11,6 +11,4 @@
    !!----------------------------------------------------------------------
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
 #if defined key_passivetrc
@@ -193,8 +191,4 @@
 #endif
 
-   !! Contral/debugging
-   !! -----------------
-   REAL(wp), PUBLIC, DIMENSION(jptra) ::  & 
-      tra_ctl         !!: sum of tra trend
 #else
    !!======================================================================
Index: trunk/NEMO/TOP_SRC/trcctl.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trcctl.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trcctl.F90	(revision 335)
@@ -10,61 +10,58 @@
    !!=========================================================================
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      !! ==============
-      USE oce_trc
-      USE trc
-      USE sms
-      USE trctrp_ctl
+#if defined key_passivetrc
+   !!----------------------------------------------------------------------
+   !! * Modules used
+   !! ==============
+   USE oce_trc
+   USE trc
+   USE sms
+   USE trctrp_ctl
 
-     IMPLICIT NONE
-     PRIVATE
+   IMPLICIT NONE
+   PRIVATE
 
-    !! * Accessibility
-    PUBLIC trc_ctl
+   !! * Accessibility
+   PUBLIC trc_ctl
 
 CONTAINS
 
-#if defined key_passivetrc
+   SUBROUTINE trc_ctl
+      !!===========================================================================================
+      !!
+      !!
+      !!                       ROUTINE trcctl
+      !!                     ******************
+      !!
+      !!      we use IF/ENDIF inside #IF defined option-cpp
+      !!      FILE name must not exceed 21 characters
+      !!      
+      !!===========================================================================================
+      
+      !!----------------------------------------------------------------------
+      !! local declarations
+      !! ==================
+      INTEGER  :: istop, jn
+      
+      !!---------------------------------------------------------------------
+      !!  OPA.9    03/2005  
+      !!---------------------------------------------------------------------
 
-SUBROUTINE trc_ctl
-   !!===========================================================================================
-   !!
-   !!
-   !!                       ROUTINE trcctl
-   !!                     ******************
-   !!
-   !!      we use IF/ENDIF inside #IF defined option-cpp
-   !!      FILE name must not exceed 21 characters
-   !!      
-   !!===========================================================================================
-     
-   !!----------------------------------------------------------------------
-   !! local declarations
-   !! ==================
-   INTEGER  :: istop, jn
-
-!!!---------------------------------------------------------------------
-!!!  OPA.9    03/2005  
-!!!---------------------------------------------------------------------
-
-! 0. Parameter
-! ------------
+      ! 0. Parameter
+      ! ------------
       istop = 0
 
-! 1. LOGICAL UNIT initialization for specifi! files for passive tracer
-! --------------------------------------------------------------------
-!     nutwrs : OUTPUT for passive tracer restart UNIT (always used)
-!     nutrst : restart FILE  INPUT  UNIT (lrsttr=.TRUE.)
-!     nutini(jptra) : UNIT for initial FILE for tracer
+      ! 1. LOGICAL UNIT initialization for specifi! files for passive tracer
+      ! --------------------------------------------------------------------
+      !     nutwrs : OUTPUT for passive tracer restart UNIT (always used)
+      !     nutrst : restart FILE  INPUT  UNIT (lrsttr=.TRUE.)
+      !     nutini(jptra) : UNIT for initial FILE for tracer
 
       nutwrs = 72
       nutrst = 73
 
-! 2. restart for passive tracer (input)
-! -----------------------------
+      ! 2. restart for passive tracer (input)
+      ! -----------------------------
 
       IF(lwp) WRITE(numout,*) ' '
@@ -78,51 +75,50 @@
 
       IF(lrsttr) THEN
-          IF(lwp) WRITE(numout,*) ' READ a restart FILE for passive tracer'
-          IF(lwp) WRITE(numout,*) ' '
+         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,*) ' '
+         IF(lwp) WRITE(numout,*) ' no restart FILE'
+         IF(lwp) WRITE(numout,*) ' '
 
-! 3. OPEN FILES for initial tracer value
-! --------------------------------------
-          DO jn=1,jptra
+         ! 3. OPEN FILES for initial tracer value
+         ! --------------------------------------
+         DO jn=1,jptra
 
-! OPEN input FILE only IF lutini(jn) is true
-! ------------------------------------------
+            ! OPEN input FILE only IF lutini(jn) is true
+            ! ------------------------------------------
             IF (lutini(jn)) THEN  
 
-! prepare input FILE name a
-! -------------------------                        
-                IF(lwp) WRITE(numout,*)                          &
-                        ' READ an initial FILE :',               &
-                        ' for passive tracer number :',jn        &
-                        ,' traceur : ',ctrcnm(jn) 
-                IF(lwp) WRITE(numout,*) ' '
-            END IF 
-          END DO   
+               ! prepare input FILE name a
+               ! -------------------------                        
+               IF(lwp) WRITE(numout,*)  &
+                  ' READ an initial FILE  for passive tracer number :',jn        &
+                  ,' traceur : ',ctrcnm(jn) 
+               IF(lwp) WRITE(numout,*) ' '
+            END IF
+         END DO
       ENDIF
 
-! 4. Don't USE non penetrative convective mixing option
-!     it's not implemented for passive tracer
-! -----------------------------------------------------
+      ! 4. Don't USE non penetrative convective mixing option
+      !     it's not implemented for passive tracer
+      ! -----------------------------------------------------
 
       IF( ln_zdfnpc) THEN
-        IF(lwp) WRITE (numout,*) ' ===>>>> : w a r n i n g '
-        IF(lwp) WRITE (numout,*) ' =======   ============= '
-        IF(lwp) WRITE (numout,*) ' STOP, this sheme is not implemented'
-        IF(lwp) WRITE (numout,*) ' in passive tracer model:'
-        IF(lwp) WRITE (numout,*) ' non penetrative convect. mixing scheme'
-        istop = istop + 1
+         IF(lwp) WRITE (numout,*) ' ===>>>> : w a r n i n g '
+         IF(lwp) WRITE (numout,*) ' =======   ============= '
+         IF(lwp) WRITE (numout,*) ' STOP, this sheme is not implemented'
+         IF(lwp) WRITE (numout,*) ' in passive tracer model:'
+         IF(lwp) WRITE (numout,*) ' non penetrative convect. mixing scheme'
+         istop = istop + 1
       ENDIF
 
-! 5. transport scheme option
-! --------------------------
+      ! 5. transport scheme option
+      ! --------------------------
 
       IF(lwp) WRITE(numout,*) '  '
       CALL trc_trp_ctl
-      IF(lwp) WRITE(numout,*) '  '
 
-! 6. SMS model
-! ---------------------------------------------
+
+      ! 6. SMS model
+      ! ---------------------------------------------
 
       IF(lwp) WRITE(numout,*) '  '
@@ -130,16 +126,11 @@
       IF(lwp) WRITE(numout,*) '  '
 
-#if defined key_trc_npzd
-      #include "trcctl.npzd.h90" 
-#elif defined key_trc_lobster1
-      #include "trcctl.lobster1.h90"
+
+#if defined key_trc_lobster1
+#   include "trcctl.lobster1.h90"
 #elif defined key_trc_pisces
-      #include "trcctl.pisces.h90"
-#elif defined key_trc_hamocc3
-#   if defined key_trc_p3zd
-      #include "trcctl.p3zd.h90"
-#   else
-      #include "trcctl.hamocc3.h90"
-#   endif
+#   include "trcctl.pisces.h90"
+#elif defined key_cfc
+#   include "trcctl.cfc.h90"
 #else
 
@@ -148,25 +139,26 @@
 #endif
 
-! E r r o r  control
-! ------------------
+      ! 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'
+         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 
+   END SUBROUTINE trc_ctl
 
 #else
+   !!======================================================================
+   !!  Empty module : No passive tracer
+   !!======================================================================
+CONTAINS
+   SUBROUTINE trc_ctl
 
-SUBROUTINE trc_ctl
-  !!==============
-         ! no passive tracers
-  !!==============
-END SUBROUTINE trc_ctl
-
+   END SUBROUTINE trc_ctl
+   
 #endif
 
Index: trunk/NEMO/TOP_SRC/trcdia.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trcdia.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trcdia.F90	(revision 335)
@@ -7,10 +7,9 @@
    !!==========================================================================
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      !! ==============
+#if defined key_passivetrc
+   !!----------------------------------------------------------------------
+   !! * Modules used
+ 
    USE trcdit
 
@@ -25,14 +24,14 @@
 CONTAINS
 
-SUBROUTINE trc_dia(kt,kindic)  
-   !!===========================================================================================
-   !!
-   !!                       ROUTINE trcdii_wr
-   !!===========================================================================================
+   SUBROUTINE trc_dia(kt,kindic)  
+      !!===========================================================================================
+      !!
+      !!                       ROUTINE trcdii_wr
+      !!===========================================================================================
 
-       INTEGER, INTENT( in ) :: kt, kindic
+      INTEGER, INTENT( in ) :: kt, kindic
 
-   ! outputs for tracer concentration
-   ! -------------------------------- 
+      ! outputs for tracer concentration
+      ! -------------------------------- 
 
       CALL trcdit_wr(kt,kindic)
@@ -40,6 +39,6 @@
 #if defined key_trc_diatrd
 
-   ! outputs for dynamical trends
-   ! ----------------------------
+      ! outputs for dynamical trends
+      ! ----------------------------
 
       CALL trcdid_wr(kt,kindic)
@@ -48,6 +47,6 @@
 #if defined key_trc_diaadd
 
-   ! outputs for additional arrays
-   ! -----------------------------
+      ! outputs for additional arrays
+      ! -----------------------------
 
       CALL trcdii_wr(kt,kindic)
@@ -56,6 +55,6 @@
 #if defined key_trc_diabio
 
-   ! outputs for biological trends
-   ! -----------------------------
+      ! outputs for biological trends
+      ! -----------------------------
 
       CALL trcdib_wr(kt,kindic)
@@ -63,5 +62,15 @@
 #endif
 
-      END SUBROUTINE trc_dia
+   END SUBROUTINE trc_dia
 
-END MODULE trcdia 
+#else
+   !!======================================================================
+   !!  Empty module : No passive tracer
+   !!======================================================================
+CONTAINS
+   SUBROUTINE trc_dia
+      
+   END SUBROUTINE trc_dia   
+#endif
+
+END MODULE trcdia
Index: trunk/NEMO/TOP_SRC/trcdit.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trcdit.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trcdit.F90	(revision 335)
@@ -1,12 +1,8 @@
 MODULE trcdit
-
    !!----------------------------------------------------------------------
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      !! ==============
+   !! * Modules used
+   !! ==============
    USE oce_trc
    USE trc
@@ -49,5 +45,5 @@
       nitb     ,   &  !!:  id for additional array output FILE
       ndepitb  ,   &  !!:  id for depth mesh
-      nhoritb  ,   &  !!:  id for horizontal mesh
+      nhoritb         !!:  id for horizontal mesh
 #    endif
 
@@ -447,5 +443,5 @@
                   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,
+                  &   nhorit6(jn), ipk, 1, ipk,  ndepit6(jn), 32, clop ,  &
                   &   zsto,zout)
                 END DO
@@ -809,9 +805,10 @@
       !! Modules used
       USE ioipsl
+      USE sms
 
       !! * Arguments
       INTEGER, INTENT( in ) ::   kt,kindic         ! ocean time-step
 
-      INTEGER :: ji, jj, jk, jn, jl
+      INTEGER :: ji, jj, jk, jn
       LOGICAL :: ll_print = .FALSE.
 
@@ -821,5 +818,4 @@
 
       REAL(wp) :: zsto, zout, zdt
-      REAL(wp) :: zsec
       INTEGER  :: iimi, iima, ijmi, ijma, ipk, it
 
@@ -848,4 +844,5 @@
 
       ! Define indices of the horizontal output zoom and vertical limit storage      iimi = 1      ;      iima = jpi
+      iimi = 1      ;      iima = jpi
       ijmi = 1      ;      ijma = jpj
       ipk = jpk
@@ -895,5 +892,5 @@
 ! SOME diagnostics to DO first time
 
-#        if defined key_trc_npzd || defined key_trc_lobster1
+#  if defined key_trc_lobster1
 
 ! initial total nitrogen
@@ -947,9 +944,8 @@
       DO jn=1,jpdiabio
          cltra=ctrbio(jn)  ! short title for biological diagnostic
-         CALL histwrite(nitb, cltra, zt, trbio(:,:,:,jn), ndimt50,   &
-         &    ndext50)
+         CALL histwrite(nitb, cltra, kt, trbio(:,:,:,jn), ndimt50,ndext50)
       END DO
 
-#     if defined key_trc_npzd || defined key_trc_lobster1
+#  if  defined key_trc_lobster1
 
       IF( MOD(kt-nit000+1,nwritebio) == 0) THEN
Index: trunk/NEMO/TOP_SRC/trcdta.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trcdta.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trcdta.F90	(revision 335)
@@ -5,6 +5,4 @@
    !!=====================================================================
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
 
@@ -16,8 +14,8 @@
    !!----------------------------------------------------------------------
    !! * Modules used
-      USE oce_trc
-      USE trc
-      USE par_sms
-      USE lib_print
+   USE oce_trc
+   USE trc
+   USE par_sms
+   USE lib_print
 
    IMPLICIT NONE
@@ -51,31 +49,31 @@
    !!   Default case                                            NetCDF file
    !!----------------------------------------------------------------------
-
+   
    SUBROUTINE dta_trc( kt )
-!!----------------------------------------------------------------------
-!!                   ***  ROUTINE dta_trc  ***
-!!
-!! ** Purpose :   Reads passive tracer data (Levitus monthly data)
-!!
-!! ** Method  :   Read on unit numtr the interpolated tracer concentra-
-!!      tion onto the global grid. Data begin at january. 
-!!      The value is centered at the middle of month. 
-!!      In the opa model, kt=1 agree with january 1. 
-!!      At each time step, a linear interpolation is applied between 
-!!      two monthly values.
-!!
-!! History :
-!!   8.2  !  02-04  (O. Aumont)  Original code
-!!   9.0  !  04-03  (C. Ethe)    
-!!   9.0  !  05-03  (O. Aumont and A. El Moussaoui) F90
-!!----------------------------------------------------------------------
-!! * Modules used
+      !!----------------------------------------------------------------------
+      !!                   ***  ROUTINE dta_trc  ***
+      !!
+      !! ** Purpose :   Reads passive tracer data (Levitus monthly data)
+      !!
+      !! ** Method  :   Read on unit numtr the interpolated tracer concentra-
+      !!      tion onto the global grid. Data begin at january. 
+      !!      The value is centered at the middle of month. 
+      !!      In the opa model, kt=1 agree with january 1. 
+      !!      At each time step, a linear interpolation is applied between 
+      !!      two monthly values.
+      !!
+      !! History :
+      !!   8.2  !  02-04  (O. Aumont)  Original code
+      !!   9.0  !  04-03  (C. Ethe)    
+      !!   9.0  !  05-03  (O. Aumont and A. El Moussaoui) F90
+      !!----------------------------------------------------------------------
+      !! * Modules used
       USE ioipsl
 
-!! * Arguments
+      !! * Arguments
       !! * Arguments
       INTEGER, INTENT( in ) ::   kt     ! ocean time-step
 
-!! * Local declarations
+      !! * Local declarations
       INTEGER :: ji, jj, jn, jl 
       INTEGER, PARAMETER ::  &
@@ -90,160 +88,160 @@
       REAL(wp), DIMENSION (jpk) ::  zlev
       REAL(wp) :: zdate0, zxy, zl
-!!----------------------------------------------------------------------
+      !!----------------------------------------------------------------------
 
       DO jn = 1, jptra
 
-        IF( lutini(jn) ) THEN 
-
-          IF ( kt == nit000 ) THEN
-!! 3D tracer data
-            IF(lwp)WRITE(numout,*)
-            IF(lwp)WRITE(numout,*) ' trcdta: reading tracer' 
-            IF(lwp)WRITE(numout,*) ' data file ', jn
-            IF(lwp)WRITE(numout,*)
-            nlectr(jn) = 0
-          ENDIF
-! Initialization
-        iman = jpmois
-        i15  = nday/16
-        imois = nmonth + i15 -1
-        IF( imois == 0 ) imois = iman
-        itime = jpmois
-        ipi = jpiglo
-        ipj = jpjglo
-
-! First call kt=nit000
-! --------------------
-
-        IF ( kt == nit000 .AND. nlectr(jn) == 0 ) THEN
-          ntrc1(jn) = 0
-          IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' Tracer monthly fields' 
-            WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~'
-            WRITE(numout,*) ' NetCDF FORMAT'
-            WRITE(numout,*)
-          ENDIF
-
-! open file 
-
-          clname(jn) = 'LEVITUS_'//ctrcnm(jn)
-          CALL flinopen(TRIM(clname(jn)),mig(1),nlci,mjg(1),nlcj,    &
-                        .FALSE.,ipi,ipj,ipk,zlon,zlat,zlev,itime,    &
-                        istep,zdate0,rdt,numtr(jn)               )
-
-! title, dimensions and tests
-          IF( itime /= jpmois ) THEN
+         IF( lutini(jn) ) THEN 
+
+            IF ( kt == nit000 ) THEN
+               !! 3D tracer data
+               IF(lwp)WRITE(numout,*)
+               IF(lwp)WRITE(numout,*) ' trcdta: reading tracer' 
+               IF(lwp)WRITE(numout,*) ' data file ', jn
+               IF(lwp)WRITE(numout,*)
+               nlectr(jn) = 0
+            ENDIF
+            ! Initialization
+            iman = jpmois
+            i15  = nday/16
+            imois = nmonth + i15 -1
+            IF( imois == 0 ) imois = iman
+            itime = jpmois
+            ipi = jpiglo
+            ipj = jpjglo
+
+            ! First call kt=nit000
+            ! --------------------
+
+            IF ( kt == nit000 .AND. nlectr(jn) == 0 ) THEN
+               ntrc1(jn) = 0
+               IF(lwp) THEN
+                  WRITE(numout,*)
+                  WRITE(numout,*) ' Tracer monthly fields' 
+                  WRITE(numout,*) ' ~~~~~~~~~~~~~~~~~~~~~'
+                  WRITE(numout,*) ' NetCDF FORMAT'
+                  WRITE(numout,*)
+               ENDIF
+
+               ! open file 
+
+               clname(jn) = 'LEVITUS_'//ctrcnm(jn)
+               CALL flinopen(TRIM(clname(jn)),mig(1),nlci,mjg(1),nlcj,    &
+                  .FALSE.,ipi,ipj,ipk,zlon,zlat,zlev,itime,    &
+                  istep,zdate0,rdt,numtr(jn)               )
+
+               ! title, dimensions and tests
+               IF( itime /= jpmois ) THEN
+                  IF(lwp) THEN
+                     WRITE(numout,*) ' '
+                     WRITE(numout,*) 'problem with time coordinates'
+                     WRITE(numout,*) ' itime ',itime,' jpmois ',jpmois
+                  ENDIF
+                  STOP 'trc_dta'
+               ENDIF
+
+               IF( ipi /= jpidta .OR. ipj /= jpjdta .OR. ipk /= jpk ) THEN
+                  IF(lwp) THEN
+                     WRITE(numout,*) ' '
+                     WRITE(numout,*) 'problem with dimensions'
+                     WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta
+                     WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta
+                     WRITE(numout,*) ' ipk ',ipk,' jpk ',jpk
+                  ENDIF
+                  STOP 'trc_dta'
+               ENDIF
+               IF(lwp)WRITE(numout,*) itime,istep,zdate0,rdt,numtr(jn)
+               trdta(:,:,:,jn) = 0.
+
+            ENDIF
+
+
+            ! Read montly file
+            IF( ( kt == nit000 .AND. nlectr(jn) == 0)   & 
+               .OR. imois /= ntrc1(jn) ) THEN
+               nlectr(jn) = 1
+
+               ! Calendar computation
+
+               ! ntrc1 number of the first file record used in the simulation
+               ! ntrc2 number of the last  file record
+
+               ntrc1(jn) = imois
+               ntrc2(jn) = ntrc1(jn) + 1
+               ntrc1(jn) = MOD( ntrc1(jn), iman )
+               IF ( ntrc1(jn) == 0 ) ntrc1(jn) = iman
+               ntrc2(jn) = MOD( ntrc2(jn), iman )
+               IF ( ntrc2(jn) == 0 ) ntrc2(jn) = iman
+               IF(lwp) WRITE(numout,*) 'first record file used ntrc1 ', ntrc1(jn) 
+               IF(lwp) WRITE(numout,*) 'last  record file used ntrc2 ', ntrc2(jn)
+
+               ! Read montly passive tracer data Levitus 
+
+               CALL flinget( numtr(jn),ctrcnm(jn),jpidta,jpjdta,jpk,    &
+                  jpmois,ntrc1(jn),ntrc1(jn),mig(1),nlci,mjg(1),nlcj,  &
+                  tracdta(1:nlci,1:nlcj,1:jpk,jn,1)                  )
+
+               CALL flinget( numtr(jn),ctrcnm(jn),jpidta,jpjdta,jpk,     &
+                  jpmois,ntrc2(jn),ntrc2(jn),mig(1),nlci,mjg(1),nlcj,   &
+                  tracdta(1:nlci,1:nlcj,1:jpk,jn,2)                  )
+
+               IF(lwp) THEN
+                  WRITE(numout,*)
+                  WRITE(numout,*) ' read tracer data ', ctrcnm(jn),' ok'
+                  WRITE(numout,*)
+               ENDIF
+
+               ! Apply Mask
+               DO jl = 1, 2
+                  tracdta(:,:,:  ,jn,jl) = tracdta(:,:,:,jn,jl) * tmask(:,:,:) 
+                  tracdta(:,:,jpk,jn,jl) = 0.
+                  IF( lk_zps ) THEN                ! z-coord. with partial steps
+                     DO jj = 1, jpj                ! interpolation of temperature at the last level
+                        DO ji = 1, jpi
+                           ik = mbathy(ji,jj) - 1
+                           IF( ik > 2 ) THEN
+                              zl = ( gdept(ik) - fsdept(ji,jj,ik) ) / ( gdept(ik) - gdept(ik-1) )
+                              tracdta(ji,jj,ik,jn,jl) = (1.-zl) * tracdta(ji,jj,ik,jn,jl) + zl * tracdta(ji,jj,ik-1,jn,jl)
+                           ENDIF
+                        END DO
+                     END DO
+                  ENDIF
+
+               END DO
+
+            ENDIF
+
             IF(lwp) THEN
-              WRITE(numout,*) ' '
-              WRITE(numout,*) 'problem with time coordinates'
-              WRITE(numout,*) ' itime ',itime,' jpmois ',jpmois
-            ENDIF
-            STOP 'trc_dta'
-          ENDIF
-
-          IF( ipi /= jpidta .OR. ipj /= jpjdta .OR. ipk /= jpk ) THEN
-            IF(lwp) THEN
-              WRITE(numout,*) ' '
-              WRITE(numout,*) 'problem with dimensions'
-              WRITE(numout,*) ' ipi ',ipi,' jpidta ',jpidta
-              WRITE(numout,*) ' ipj ',ipj,' jpjdta ',jpjdta
-              WRITE(numout,*) ' ipk ',ipk,' jpk ',jpk
-            ENDIF
-            STOP 'trc_dta'
-          ENDIF
-          IF(lwp)WRITE(numout,*) itime,istep,zdate0,rdt,numtr(jn)
-          trdta(:,:,:,jn) = 0.
-
-        ENDIF
-
-
-! Read montly file
-        IF( ( kt == nit000 .AND. nlectr(jn) == 0)   & 
-              .OR. imois /= ntrc1(jn) ) THEN
-           nlectr(jn) = 1
-
-! Calendar computation
-
-! ntrc1 number of the first file record used in the simulation
-! ntrc2 number of the last  file record
-
-          ntrc1(jn) = imois
-          ntrc2(jn) = ntrc1(jn) + 1
-          ntrc1(jn) = MOD( ntrc1(jn), iman )
-          IF ( ntrc1(jn) == 0 ) ntrc1(jn) = iman
-          ntrc2(jn) = MOD( ntrc2(jn), iman )
-          IF ( ntrc2(jn) == 0 ) ntrc2(jn) = iman
-          IF(lwp) WRITE(numout,*) 'first record file used ntrc1 ', ntrc1(jn) 
-          IF(lwp) WRITE(numout,*) 'last  record file used ntrc2 ', ntrc2(jn)
-
-! Read montly passive tracer data Levitus 
-
-          CALL flinget( numtr(jn),ctrcnm(jn),jpidta,jpjdta,jpk,    &
-               jpmois,ntrc1(jn),ntrc1(jn),mig(1),nlci,mjg(1),nlcj,  &
-               tracdta(1:nlci,1:nlcj,1:jpk,jn,1)                  )
-
-          CALL flinget( numtr(jn),ctrcnm(jn),jpidta,jpjdta,jpk,     &
-               jpmois,ntrc2(jn),ntrc2(jn),mig(1),nlci,mjg(1),nlcj,   &
-               tracdta(1:nlci,1:nlcj,1:jpk,jn,2)                  )
-
-          IF(lwp) THEN
-            WRITE(numout,*)
-            WRITE(numout,*) ' read tracer data ', ctrcnm(jn),' ok'
-            WRITE(numout,*)
-          ENDIF
-
-! Apply Mask
-          DO jl = 1, 2
-            tracdta(:,:,:  ,jn,jl) = tracdta(:,:,:,jn,jl) * tmask(:,:,:) 
-            tracdta(:,:,jpk,jn,jl) = 0.
-            IF( lk_zps ) THEN                ! z-coord. with partial steps
-               DO jj = 1, jpj                ! interpolation of temperature at the last level
-                  DO ji = 1, jpi
-                     ik = mbathy(ji,jj) - 1
-                     IF( ik > 2 ) THEN
-                        zl = ( gdept(ik) - fsdept(ji,jj,ik) ) / ( gdept(ik) - gdept(ik-1) )
-                        tracdta(ji,jj,ik,jn,jl) = (1.-zl) * tracdta(ji,jj,ik,jn,jl) + zl * tracdta(ji,jj,ik-1,jn,jl)
-                     ENDIF
-                  END DO
-               END DO
-            ENDIF
-
-          END DO
-
-        ENDIF
-
-        IF(lwp) THEN
-          WRITE(numout,*) ctrcnm(jn), 'Levitus month ', ntrc1(jn),   &
-                          ntrc2(jn)
-          WRITE(numout,*)
-          WRITE(numout,*) ' Levitus month = ', ntrc1(jn),   &
+               WRITE(numout,*) ctrcnm(jn), 'Levitus month ', ntrc1(jn),   &
+                  ntrc2(jn)
+               WRITE(numout,*)
+               WRITE(numout,*) ' Levitus month = ', ntrc1(jn),   &
                   '  level = 1'
-          CALL prihre( tracdta(1,1,1,jn,1), jpi, jpj, 1, jpi, 20, 1   &
+               CALL prihre( tracdta(1,1,1,jn,1), jpi, jpj, 1, jpi, 20, 1   &
                   ,jpj, 20, 1., numout )
-          WRITE(numout,*) ' Levitus month = ', ntrc1(jn),    &
+               WRITE(numout,*) ' Levitus month = ', ntrc1(jn),    &
                   '  level = ',jpk/2
-          CALL prihre( tracdta(1,1,jpk/2,jn,1), jpi, jpj, 1, jpi,    &
+               CALL prihre( tracdta(1,1,jpk/2,jn,1), jpi, jpj, 1, jpi,    &
                   20, 1, jpj, 20, 1., numout )
-          WRITE(numout,*) ' Levitus month = ',ntrc1(jn)     &
+               WRITE(numout,*) ' Levitus month = ',ntrc1(jn)     &
                   ,'  level = ',jpkm1
-          CALL prihre( tracdta(1,1,jpkm1,jn,1), jpi, jpj, 1, jpi,     &
+               CALL prihre( tracdta(1,1,jpkm1,jn,1), jpi, jpj, 1, jpi,     &
                   20, 1, jpj, 20, 1., numout )
-        ENDIF 
-
-! At every time step compute temperature data
-
-        zxy = FLOAT( nday + 15 - 30 * i15 ) / 30.
-        trdta(:,:,:,jn)=  ( 1. - zxy ) * tracdta(:,:,:,jn,1)    &
-                       +       zxy   * tracdta(:,:,:,jn,2) 
-   
-        IF( jn == jpno3) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 7.6E-6
-        IF( jn == jpdic) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6
-        IF( jn == jptal) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6
-        IF( jn == jpoxy) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 44.6E-6
-        IF( jn == jpsil) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6
-
-
-      ENDIF
+            ENDIF
+
+            ! At every time step compute temperature data
+
+            zxy = FLOAT( nday + 15 - 30 * i15 ) / 30.
+            trdta(:,:,:,jn)=  ( 1. - zxy ) * tracdta(:,:,:,jn,1)    &
+               +       zxy   * tracdta(:,:,:,jn,2) 
+
+            IF( jn == jpno3) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 7.6E-6
+            IF( jn == jpdic) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6
+            IF( jn == jptal) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6
+            IF( jn == jpoxy) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 44.6E-6
+            IF( jn == jpsil) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 1.E-6
+
+
+         ENDIF
 
       END DO
Index: trunk/NEMO/TOP_SRC/trcdtr.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trcdtr.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trcdtr.F90	(revision 335)
@@ -61,8 +61,8 @@
 !! ================== 
       INTEGER :: ji,jj,jk,jn 
+#if defined key_trc_pisces
       REAL(wp) :: alka0,oxyg0,calc0,bioma0,    &
-                   silic1,po4,no3,                 &
-                   caralk,bicarb,                  &
-                   ztraa, ztrab, ztran
+                  silic1,po4,no3,caralk,bicarb
+#endif
 !!---------------------------------------------------------------------
 !!  OPA.9 
@@ -76,133 +76,7 @@
       IF(lwp) WRITE(numout,*) ' '
 
-#if defined key_trc_hamocc3
-      sco2   = 2.15e-3
-      alka0  = 2.45e-3
-      oxyg0  = 2.e-4
-      po4    = 2.1e-6/po4r
-      bioma0 = 1.e-8
-      silic1 = 85.e-6
-      calc0  = 1.e-5
-
-      trn(:,:,:,jpdic) = sco2
-      trn(:,:,:,jptal) = alka0
-      trn(:,:,:,jpoxy) = oxyg0
-      trn(:,:,:,jppo4) = po4
-      trn(:,:,:,jppoc) = bioma0
-      trn(:,:,:,jpsil) = silic1
-      trn(:,:,:,jpcal) = calc0
-#if defined key_trc_p3zd
-      trn(:,:,:,jpphy) = bioma0
-      trn(:,:,:,jpzoo) = bioma0
-      trn(:,:,:,jpdoc) = bioma0
-#endif
-
-      DO jk = 1, jpk
-        DO jj = 1, jpj
-          DO ji = 1, jpi
-            caralk = trn(ji,jj,jk,jptal)-
-     &                 bor/(1.+1.E-7/akb3(ji,jj,jk))
-           co3(ji,jj,jk) = caralk-trn(ji,jj,jk,jpdic)
-           bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk)
-           hi(ji,jj,jk) = ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk)
-          ENDDO
-        ENDDO
-      ENDDO
-
-      h2co3(:,:) = 1.e-5
-
-!!  initialize Silicate and Calcite in sediments
-!!  --------------------------------------------
-
-      sedcal = 0.
-      sedsil = 0.
-
-      IF(lwp) WRITE(numout,*) 'Initialization of P3ZD tracers done'
-      IF(lwp) WRITE(numout,*) '-----------------------------------'
-
-#elif defined key_cfc
+
+#if defined key_cfc
       trn(:,:,:,:)=0.0
-#elif defined key_gosac
-      trn(:,:,:,1)=1895.*1.e-6*1028.*tmask(:,:,:)
-      trn(:,:,:,2)=0.9*1895.*1.e-6*1028.*tmask(:,:,:)
-
-#elif defined key_trc_age
-      trn(:,:,:,1)=1.
-      trn(:,:,:,2)=0. 
-
-#elif defined key_trc_lobster1 && (defined key_eel_r6 || defined key_eel_r2)
-! analytical initialisation used in Levy et al. (2001)
-      
-      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)=0.0005*tmask(:,:,jk)
-        trn(:,:,jk,jpdom)=0.017*tmask(:,:,jk)
-      END DO
-
-      trn(:,:,8,jpdet)=0.020*tmask(:,:,1)
-      trn(:,:,8,jpzoo)=0.027*tmask(:,:,1)
-      trn(:,:,8,jpphy)=0.041*tmask(:,:,1)
-      trn(:,:,8,jpno3)=0.00022*tmask(:,:,1)
-      trn(:,:,8,jpnh4)=0.0033*tmask(:,:,1)
-      trn(:,:,8,jpdom)=0.021*tmask(:,:,1)
-
-      trn(:,:,9,jpdet)=0.0556*tmask(:,:,1)
-      trn(:,:,9,jpzoo)=0.123*tmask(:,:,1)
-      trn(:,:,9,jpphy)=0.122*tmask(:,:,1)
-      trn(:,:,9,jpno3)=0.028*tmask(:,:,1)
-      trn(:,:,9,jpnh4)=0.024*tmask(:,:,1)
-      trn(:,:,9,jpdom)=0.06*tmask(:,:,1)
-
-      trn(:,:,10,jpdet)=0.025*tmask(:,:,1)
-      trn(:,:,10,jpzoo)=0.016*tmask(:,:,1)
-      trn(:,:,10,jpphy)=0.029*tmask(:,:,1)
-      trn(:,:,10,jpno3)=2.462*tmask(:,:,1)
-      trn(:,:,10,jpnh4)=0.04*tmask(:,:,1)
-      trn(:,:,10,jpdom)=0.022*tmask(:,:,1)
-
-      trn(:,:,11,jpdet)=0.0057*tmask(:,:,1)
-      trn(:,:,11,jpzoo)=0.0005*tmask(:,:,1)
-      trn(:,:,11,jpphy)=0.0006*tmask(:,:,1)
-      trn(:,:,11,jpno3)=3.336*tmask(:,:,1)
-      trn(:,:,11,jpnh4)=0.005*tmask(:,:,1)
-      trn(:,:,11,jpdom)=0.004*tmask(:,:,1)
-
-      trn(:,:,12,jpdet)=0.002*tmask(:,:,1)
-      trn(:,:,12,jpzoo)=1.e-6*tmask(:,:,1)
-      trn(:,:,12,jpphy)=5.e-6*tmask(:,:,1)
-      trn(:,:,12,jpno3)=4.24*tmask(:,:,1)
-      trn(:,:,12,jpnh4)=0.001*tmask(:,:,1)
-      trn(:,:,12,jpdom)=3.e-5*tmask(:,:,1)
-
-      DO jk=13,jpk
-        trn(:,:,jk,jpdet)=0.0
-        trn(:,:,jk,jpzoo)=0.0
-        trn(:,:,jk,jpphy)=0.0
-        trn(:,:,jk,jpnh4)=0.0
-        trn(:,:,jk,jpdom)=0.0
-      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)
-
 #elif defined key_trc_pisces
 
@@ -265,11 +139,105 @@
       xksi(:,:)=2.E-6
 
-!! initialize Silicate and Calcite in sediments
-!! --------------------------------------------
+!! initialize Silicate and Calcite and POC in sediments
+!! ---------------------------------------------------
       sedcal(:,:) = 0.
       sedsil(:,:) = 0.
+      sedpoc(:,:) = 0.
 
       IF(lwp) WRITE(numout,*) 'Initialization of PISCES tracers done'
       IF(lwp) WRITE(numout,*) ' '
+
+#elif defined key_trc_lobster1 && ( defined key_eel_r6 || defined key_eel_r2 )
+! analytical initialisation used in Levy et al. (2001)
+      
+      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)=0.0005*tmask(:,:,jk)
+        trn(:,:,jk,jpdom)=0.017*tmask(:,:,jk)
+      END DO
+
+      trn(:,:,8,jpdet)=0.020*tmask(:,:,1)
+      trn(:,:,8,jpzoo)=0.027*tmask(:,:,1)
+      trn(:,:,8,jpphy)=0.041*tmask(:,:,1)
+      trn(:,:,8,jpno3)=0.00022*tmask(:,:,1)
+      trn(:,:,8,jpnh4)=0.0033*tmask(:,:,1)
+      trn(:,:,8,jpdom)=0.021*tmask(:,:,1)
+
+      trn(:,:,9,jpdet)=0.0556*tmask(:,:,1)
+      trn(:,:,9,jpzoo)=0.123*tmask(:,:,1)
+      trn(:,:,9,jpphy)=0.122*tmask(:,:,1)
+      trn(:,:,9,jpno3)=0.028*tmask(:,:,1)
+      trn(:,:,9,jpnh4)=0.024*tmask(:,:,1)
+      trn(:,:,9,jpdom)=0.06*tmask(:,:,1)
+
+      trn(:,:,10,jpdet)=0.025*tmask(:,:,1)
+      trn(:,:,10,jpzoo)=0.016*tmask(:,:,1)
+      trn(:,:,10,jpphy)=0.029*tmask(:,:,1)
+      trn(:,:,10,jpno3)=2.462*tmask(:,:,1)
+      trn(:,:,10,jpnh4)=0.04*tmask(:,:,1)
+      trn(:,:,10,jpdom)=0.022*tmask(:,:,1)
+
+      trn(:,:,11,jpdet)=0.0057*tmask(:,:,1)
+      trn(:,:,11,jpzoo)=0.0005*tmask(:,:,1)
+      trn(:,:,11,jpphy)=0.0006*tmask(:,:,1)
+      trn(:,:,11,jpno3)=3.336*tmask(:,:,1)
+      trn(:,:,11,jpnh4)=0.005*tmask(:,:,1)
+      trn(:,:,11,jpdom)=0.004*tmask(:,:,1)
+
+      trn(:,:,12,jpdet)=0.002*tmask(:,:,1)
+      trn(:,:,12,jpzoo)=1.e-6*tmask(:,:,1)
+      trn(:,:,12,jpphy)=5.e-6*tmask(:,:,1)
+      trn(:,:,12,jpno3)=4.24*tmask(:,:,1)
+      trn(:,:,12,jpnh4)=0.001*tmask(:,:,1)
+      trn(:,:,12,jpdom)=3.e-5*tmask(:,:,1)
+
+      DO jk=13,jpk
+        trn(:,:,jk,jpdet)=0.0
+        trn(:,:,jk,jpzoo)=0.0
+        trn(:,:,jk,jpphy)=0.0
+        trn(:,:,jk,jpnh4)=0.0
+        trn(:,:,jk,jpdom)=0.0
+      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)
+
+#elif defined key_trc_lobster1 && defined key_gyre
+! 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.*tmask(:,:,:)
+      DO  jk=1,jpk
+         DO  jj=1,jpj
+            DO  ji=1,jpi
+               IF (rhd(ji,jj,jk).LE.24.5e-3) THEN
+                  trn(ji,jj,jk,jpno3)=2.*tmask(ji,jj,jk)
+               ELSE
+                  trn(ji,jj,jk,jpno3)=(13.24*(rhd(ji,jj,jk)*1000)-324.4)*tmask(ji,jj,jk)
+               ENDIF
+            END DO
+         END DO
+      END DO
 
 #else
@@ -298,24 +266,12 @@
       trb(:,:,:,:) = trn(:,:,:,:)
 
-      IF(lwp) WRITE(numout,*)  ' '
-      DO jn = 1, jptra
-         IF( ln_ctl .AND. lwp ) THEN ! print mean trends (used for debugging)
-            ztraa = SUM( tra(1:nictle,1:njctle,1:jpk,jn) *   &
-                tmask(1:nictle,1:njctle,1:jpk) )
-            ztrab = SUM( trb(1:nictle,1:njctle,1:jpk,jn) *     &
-                tmask(1:nictle,1:njctle,1:jpk) )
-            ztran = SUM( trn(1:nictle,1:njctle,1:jpk,jn) *    &
-                tmask(1:nictle,1:njctle,1:jpk) )
-            WRITE(numout,*) ' trcdtr  - ',ctrcnm(jn),   &
-                ' : ', ztraa, '  ', ztrab, '  ', ztran
-         ENDIF
-      END DO
-
+#if defined key_trc_lobster1
 !!  initialize the POC in sediments
-#  if defined key_trc_npzd || defined key_trc_lobster1 || defined key_trc_hamocc3 || defined key_trc_pisces
-
-      sedpoc(:,:) = 0.
-
-#  endif
+
+      sedpocb(:,:) = 0.
+      sedpocn(:,:) = 0.
+      sedpoca(:,:) = 0.
+#endif
+      
  END SUBROUTINE trc_dtr 
 
Index: trunk/NEMO/TOP_SRC/trcini.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trcini.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trcini.F90	(revision 335)
@@ -1,132 +1,123 @@
 MODULE trcini
    !!==========================================================================
-   !!
-   !!                       *** MODULE trcini ***
-   !!
-   !! Initialization for passive tracer (for restart or not)  
-   !!     
-   !!=========================================================================
-   !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
+   !!                       *** MODULE trcini ***  
+   !! Ocean passive tracers:  Manage the passive tracer initialization 
+   !!=========================================================================   
+#if defined key_passivetrc
    !!----------------------------------------------------------------------
-                                                                                                                      
-      !! * Modules used
-      !! ==============
-      USE ioipsl
-      USE oce_trc
-      USE trc
-      USE sms
-      USE lib_mpp
+   !!   trc_ini : Initialization for passive tracer
+   !!----------------------------------------------------------------------
+   !! * Modules used
+   USE ioipsl
+   USE oce_trc
+   USE trc
+   USE sms
+   USE lib_mpp
+   USE lbclnk
 
-     IMPLICIT NONE
-     PRIVATE
+   IMPLICIT NONE
+   PRIVATE
 
-    !! * Accessibility
-    PUBLIC trc_ini
+   !! * Accessibility
+   PUBLIC trc_ini
+
+#if defined key_trc_lobster1
+   !!----------------------------------------------------------------------
+   !!   'key_trc_lobster1'                        LOBSTER1 biological model  
+   !!----------------------------------------------------------------------
+#  include "trcini.lobster1.h90"
+
+#elif defined key_trc_pisces
+   !!----------------------------------------------------------------------
+   !!   'key_trc_pisces'                            PISCES biological model                  
+   !!----------------------------------------------------------------------
+#  include "trcini.pisces.h90"
+
+#elif defined key_cfc
+   !!----------------------------------------------------------------------
+   !!   'key_cfc  '                                          CFC model                  
+   !!----------------------------------------------------------------------
+#  include "trcini.cfc.h90"
+
+#else
+   !!----------------------------------------------------------------------
+   !!   Default option                               
+   !!----------------------------------------------------------------------
 
 CONTAINS
 
-#if defined key_passivetrc
+   SUBROUTINE trc_ini
+      !!---------------------------------------------------------------------
+      !!                    ***  ROUTINE trc_ini  ***
+      !!              
+      !! ** Purpose : Initialization for passive tracer
+      !!              for restart or not
+      !!
+      !! History :
+      !!        !  00-04  O. Aumont, M.A. Foujols HAMOCC3 and P3ZD
+      !!   8.5  !  05-03  O.Aumont and A.El Moussaoui  F90
+      !!   9.0  !  05-10  C. Ethe  Modularity
+      !!----------------------------------------------------------------------
+      !! * local declarations
+      INTEGER ::                   & 
+         ji ,jj ,jk ,jn, jl        ! dummy loop indices  
+      !!---------------------------------------------------------------------
 
- SUBROUTINE trc_ini
-!!---------------------------------------------------------------------
-!!                       ROUTINE trcini
-!!                     ******************
-!!  PURPOSE :
-!!  ---------
-!!     initialization for passive tracer
-!!     for restart or not
-!!
-!!   WORKSPACE :
-!!   ---------
-!!      ji jj jk
-!!
-!!   History:
-!!   --------
-!!                 04/00 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD
-!!                 03/05  O.Aumont and A.El Moussaoui  F90
-!!----------------------------------------------------------------------
-!!----------------------------------------------------------------------
-!! local declarations
-!! ==================
 
-      INTEGER :: ji,jj,jk,jn,jl
-
-!!----------------------------------------------------------------------
-!! statement functions
-!! ===================
-
-#include "passivetrc_substitute.h90"
-
-!!---------------------------------------------------------------------
-!!  OPA.9   
-!!---------------------------------------------------------------------
-
-#    if defined key_trc_npzd
-#    include "trcini.npzd.h90"
-#    elif defined key_trc_lobster1
-#    include "trcini.lobster1.h90"
-#    elif defined key_trc_hamocc3
-#    include "trcini.hamocc3.h90"
-#    elif defined key_trc_pisces
-#    include "trcini.pisces.h90"
-#    else
-
-! Specific initialization to do
-!!-----------------------------
-#    endif
-
-!! 1. initialization of passives tracers field
-!! -------------------------------------------
-      DO jn=1,jptra
-              trn(:,:,:,jn)=0.e0
-              tra(:,:,:,jn)=0.e0
+      !! 1. initialization of passives tracers field
+      !! -------------------------------------------
+      DO jn = 1, jptra
+         trn(:,:,:,jn)=0.e0
+         tra(:,:,:,jn)=0.e0
       END DO
 
 #if defined key_trc_diaadd
-!! initialization of output 2d and 3d arrays
+      !! initialization of output 2d and 3d arrays
 
-      DO jn=1,jpdia2d
-            trc2d(:,:,jn)=0.e0
+      DO jn = 1, jpdia2d
+         trc2d(:,:,jn)=0.e0
       END DO
-      DO jn=1,jpdia3d
-              trc3d(:,:,:,jn)=0.e0
+
+      DO jn = 1, jpdia3d
+         trc3d(:,:,:,jn)=0.e0
       END DO
 #endif
 
 #if defined key_trc_diabio
-   !! initialization of biological trends
+      !! initialization of biological trends
       DO jn=1,jpdiabio
-              trbio(ji,jj,jk,jn)=0.e0
+         trbio(:,:,:,jn) = 0.e0
       END DO
 #endif
 
 #if defined key_trc_diatrd
-   !! initialization of tracer trends
-      DO jl=1,jpdiatrc
-        DO jn=1,jptra
-                trtrd(:,:,:,jn,jl)=0.e0
-        END DO
+      !! initialization of tracer trends
+      DO jl = 1, jpdiatrc
+         DO jn = 1, jptra
+            trtrd(:,:,:,jn,jl) = 0.e0
+         END DO
       END DO
 #endif      
-      
-      IF(lwp) THEN
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' trcini: generic initialisation done '
-          WRITE(numout,*) ' '
+
+      IF( lwp ) THEN
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' trcini: generic initialisation done '
+         WRITE(numout,*) ' '
       ENDIF
 
-END SUBROUTINE trc_ini
-
-#else
-
-SUBROUTINE trc_ini
-
-   !! no passive tracers
-   !!===================
-END SUBROUTINE trc_ini
+   END SUBROUTINE trc_ini
 
 #endif
 
+#else
+   !!----------------------------------------------------------------------
+   !!   Dummy module :                      NO passive tracer
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE trc_ini              ! Empty routine
+
+   END SUBROUTINE trc_ini
+#endif
+
+   !!======================================================================
 END MODULE trcini
Index: trunk/NEMO/TOP_SRC/trclec.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trclec.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trclec.F90	(revision 335)
@@ -7,69 +7,60 @@
    !!=========================================================================
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
-
-      !! * Modules used
-      !! ==============
-      USE oce_trc
-      USE trc
-      USE trctrp_lec
-      USE trclsm
-
-     IMPLICIT NONE
-     PRIVATE 
-
-    !! * Accessibility
-    PUBLIC trc_lec
+#if defined key_passivetrc
+   !! * Modules used
+   !! ==============
+   USE oce_trc
+   USE trc
+   USE trctrp_lec
+   USE trclsm
+
+   IMPLICIT NONE
+   PRIVATE 
+
+   !! * Accessibility
+   PUBLIC trc_lec
+
+#include "passivetrc_substitute.h90"
 
 CONTAINS
 
-#if defined key_passivetrc
-
-SUBROUTINE trc_lec
-!!---------------------------------------------------------------------
-!!                       ROUTINE trclec
-!!                     ******************
-!!  PURPOSE :
-!!  ---------
-!!     READ and PRINT options for the passive tracer run (namelist)
-!!
-!!   History:
-!!   --------
-!!      original  : 96-11 (M.A. Foujols, M. Levy) passive tracer
-!!      modification : 98-04 (M.A Foujols, L. Bopp) ahtrb0 for isopycnal
-!!                                                  diffusion
-!!      modification : 99-10(M.A. Foujols, M. Levy) separation of sms
-!!      additions : 00-05(A. Estublier) TVD Limiter Scheme : Tests 
-!!                                      on ndttrc
-!!      additions : 00-06(A. Estublier) MUSCL Scheme : Tests 
-!!                                      on ndttrc
-!!      additions : 00-07(A. Estublier) PPM Scheme : Tests on ndttrc
-!!      modification : 00-11 (M.A Foujols, E Kestenare) trcrat, ahtrc0 and aeivtr0
-!!      modification : 01-01 (E Kestenare) suppress ndttrc=1 
-!!                                         for Arakawa and TVD schemes
-!!     O.Aumont and A.El Moussaoui 03/05 F90
-!!----------------------------------------------------------------------
-
-!! local declarations
-!! ==================
+   SUBROUTINE trc_lec
+      !!---------------------------------------------------------------------
+      !!                       ROUTINE trclec
+      !!                     ******************
+      !!  PURPOSE :
+      !!  ---------
+      !!     READ and PRINT options for the passive tracer run (namelist)
+      !!
+      !!   History:
+      !!   --------
+      !!      original  : 96-11 (M.A. Foujols, M. Levy) passive tracer
+      !!      modification : 98-04 (M.A Foujols, L. Bopp) ahtrb0 for isopycnal
+      !!                                                  diffusion
+      !!      modification : 99-10(M.A. Foujols, M. Levy) separation of sms
+      !!      additions : 00-05(A. Estublier) TVD Limiter Scheme : Tests 
+      !!                                      on ndttrc
+      !!      additions : 00-06(A. Estublier) MUSCL Scheme : Tests 
+      !!                                      on ndttrc
+      !!      additions : 00-07(A. Estublier) PPM Scheme : Tests on ndttrc
+      !!      modification : 00-11 (M.A Foujols, E Kestenare) trcrat, ahtrc0 and aeivtr0
+      !!      modification : 01-01 (E Kestenare) suppress ndttrc=1 
+      !!                                         for Arakawa and TVD schemes
+      !!     O.Aumont and A.El Moussaoui 03/05 F90
+      !!----------------------------------------------------------------------
+
+      !! local declarations
+      !! ==================
 
       INTEGER ::  ji
       CHARACTER (len=32) :: clname
 
-!!----------------------------------------------------------------------
-!! statement functions
-!! ===================
-
-#include "passivetrc_substitute.h90"
-
-!!
-!!---------------------------------------------------------------------
-!!  OPA.90   03/2005 
-!!---------------------------------------------------------------------
-
-!! 0. initializations
-!! ------------------
+      !!---------------------------------------------------------------------
+      !!  OPA.90   03/2005 
+      !!---------------------------------------------------------------------
+
+      !! 0. initializations
+      !! ------------------
 
       namelist/nattrc/nwritetrc,lrsttr,nrsttr, ctrcnm,ctrcnl,ctrcun,lutini     !general   
@@ -83,15 +74,15 @@
 #if defined key_trc_diaadd
       namelist/natadd/ctrc3d,ctrc3l,ctrc2d,ctrc2l, ctrc3u, ctrc2u,     &
-                      nwriteadd                             !additional diagnostics
-#endif
-
-      IF(lwp) THEN
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' ROUTINE trclec'
-          WRITE(numout,*) ' **************'
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' namelist for passive tracer'
-          WRITE(numout,*) ' ***************************'
-          WRITE(numout,*) ' '
+         nwriteadd                             !additional diagnostics
+#endif
+
+      IF(lwp) THEN
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' ROUTINE trclec'
+         WRITE(numout,*) ' **************'
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' namelist for passive tracer'
+         WRITE(numout,*) ' ***************************'
+         WRITE(numout,*) ' '
       ENDIF
 
@@ -102,7 +93,7 @@
       OPEN( numnat, FILE= clname, FORM='formatted', STATUS = 'old')
 
-!! 1., 2. & 3. initialization with namelist files
-!! ----------------------------------------------
-!! 1.0 namelist nattrc :
+      !! 1., 2. & 3. initialization with namelist files
+      !! ----------------------------------------------
+      !! 1.0 namelist nattrc :
 
       nwritetrc = 10
@@ -111,8 +102,8 @@
 
       DO ji=1,jptra
-        WRITE (ctrcnm(ji),'("TR_",I1)') ji
-        WRITE (ctrcnl(ji),'("TRACER NUMBER ",I1)') ji
-        ctrcun(ji)='mmole/m3'
-        lutini(ji)=.FALSE. 
+         WRITE (ctrcnm(ji),'("TR_",I1)') ji
+         WRITE (ctrcnl(ji),'("TRACER NUMBER ",I1)') ji
+         ctrcun(ji)='mmole/m3'
+         lutini(ji)=.FALSE. 
       END DO
 
@@ -122,35 +113,35 @@
 
       IF(lwp) THEN
-          WRITE(numout,*) ' '
-          WRITE(numout,*) 'nattrc'
-          WRITE(numout,*) ' '
-          WRITE(numout,*)          &
-              ' frequency of outputs for passive tracers nwritetrc = '    &
-              ,nwritetrc  
-          WRITE(numout,*) ' restart LOGICAL for passive tr. lrsttr = ',   &
-     &         lrsttr
-          WRITE(numout,*) ' control of time step for p. tr. nrsttr = ',   & 
-     &         nrsttr
-          DO ji=1,jptra
+         WRITE(numout,*) ' '
+         WRITE(numout,*) 'nattrc'
+         WRITE(numout,*) ' '
+         WRITE(numout,*)          &
+            ' frequency of outputs for passive tracers nwritetrc = '    &
+            ,nwritetrc  
+         WRITE(numout,*) ' restart LOGICAL for passive tr. lrsttr = ',   &
+            &         lrsttr
+         WRITE(numout,*) ' control of time step for p. tr. nrsttr = ',   & 
+            &         nrsttr
+         DO ji=1,jptra
             WRITE(numout,*) ' tracer nb: ',ji,' name = ',ctrcnm(ji)       & 
-     &           ,ctrcnl(ji) 
+               &           ,ctrcnl(ji) 
             WRITE(numout,*) ' in unit = ',ctrcun(ji)
             WRITE(numout,*) ' initial value in FILE : ',lutini(ji) 
             WRITE(numout,*) ' '
-          END DO
-          WRITE(numout,*) ' '
+         END DO
+         WRITE(numout,*) ' '
       ENDIF
 
 #if defined key_trc_diatrd
 
-!! 1.2 namelist nattrd : passive tracers dynamical trends
+      !! 1.2 namelist nattrd : passive tracers dynamical trends
 
       nwritetrd=10
 
-!! default : no dynamical trend recording
-!! --------------------------------------
+      !! default : no dynamical trend recording
+      !! --------------------------------------
       DO ji=1,jptra
-        luttrd(ji) = .FALSE.
-      END DO 
+         luttrd(ji) = .FALSE.
+      END DO
 
       REWIND(numnat)
@@ -158,19 +149,19 @@
 
       IF(lwp) THEN
-          WRITE(numout,*) 'natrtd'
-          WRITE(numout,*) ' '
-          WRITE(numout,*)                        &
-             ' frequency of outputs for dynamical trends nwritetrd = '   &
-             ,nwritetrd
-          DO ji=1,jptra
+         WRITE(numout,*) 'natrtd'
+         WRITE(numout,*) ' '
+         WRITE(numout,*)                        &
+            ' frequency of outputs for dynamical trends nwritetrd = '   &
+            ,nwritetrd
+         DO ji=1,jptra
             WRITE(numout,*)                      &
                ' keep dynamical trends for tracer number :',ji          &
                ,luttrd(ji)   
-          END DO 
-      ENDIF
-#endif
-
-!!1.3 namelist natadd : passive tracers diagnostics
-!!-------------------------------------------------
+         END DO
+      ENDIF
+#endif
+
+      !!1.3 namelist natadd : passive tracers diagnostics
+      !!-------------------------------------------------
 
 #if defined key_trc_diaadd
@@ -178,20 +169,20 @@
       nwriteadd = 10
 
-!! default value for 3D output arrays : short and long name, units
+      !! default value for 3D output arrays : short and long name, units
 
       DO ji=1,jpdia3d
-        WRITE (ctrc3d(ji),'("3D_",I1)') ji
-        WRITE (ctrc3l(ji),'("3D DIAGNOSTIC NUMBER ",I2)') ji
-        ctrc3u(ji)=' '
-      END DO 
-
-
-!! default value for 2D output arrays : short and long name, units
-!! ---------------------------------------------------------------
+         WRITE (ctrc3d(ji),'("3D_",I1)') ji
+         WRITE (ctrc3l(ji),'("3D DIAGNOSTIC NUMBER ",I2)') ji
+         ctrc3u(ji)=' '
+      END DO
+
+
+      !! default value for 2D output arrays : short and long name, units
+      !! ---------------------------------------------------------------
       DO ji=1,jpdia2d
-        WRITE (ctrc2d(ji),'("2D_",I1)') ji
-        WRITE (ctrc2l(ji),'("2D DIAGNOSTIC NUMBER ",I2)') ji
-        ctrc2u(ji)=' '
-      END DO 
+         WRITE (ctrc2d(ji),'("2D_",I1)') ji
+         WRITE (ctrc2l(ji),'("2D DIAGNOSTIC NUMBER ",I2)') ji
+         ctrc2u(ji)=' '
+      END DO
 
       REWIND(numnat)
@@ -199,28 +190,28 @@
 
       IF(lwp) THEN
-          WRITE(numout,*) ' natadd'
-          WRITE(numout,*) ' '
-          WRITE(numout,*)                          &
-             ' frequency of outputs for additional arrays nwriteadd = '   &
-             ,nwriteadd
-          DO ji=1,jpdia3d
+         WRITE(numout,*) ' natadd'
+         WRITE(numout,*) ' '
+         WRITE(numout,*)                          &
+            ' frequency of outputs for additional arrays nwriteadd = '   &
+            ,nwriteadd
+         DO ji=1,jpdia3d
             WRITE(numout,*)                     &
                'name of 3d output field number :',ji,' : ',ctrc3d(ji)  
             WRITE(numout,*) ctrc3l(ji)  
             WRITE(numout,*) ' in unit = ',ctrc3u(ji)
-          END DO 
-          WRITE(numout,*) ' '
-          DO ji=1,jpdia2d
+         END DO
+         WRITE(numout,*) ' '
+         DO ji=1,jpdia2d
             WRITE(numout,*)                    &
                'name of 2d output field number :',ji,' : ',ctrc2d(ji)  
             WRITE(numout,*) ctrc2l(ji)  
             WRITE(numout,*) ' in unit = ',ctrc2u(ji)
-          END DO 
-          WRITE(numout,*) ' '
-      ENDIF
-#endif
-
-!! 1.1 namelist natnum :
-!! ---------------------
+         END DO
+         WRITE(numout,*) ' '
+      ENDIF
+#endif
+
+      !! 1.1 namelist natnum :
+      !! ---------------------
       rsc=1.
       rtrn=1.e-15
@@ -236,39 +227,41 @@
 
       IF(lwp) THEN
-          WRITE(numout,*) ' '
-          WRITE(numout,*) 'natnum'
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' tuning coefficient              rsc     = ',    &
-             rsc
-          WRITE(numout,*) ' truncation value                rtrn    = ',    &
-             rtrn
-          WRITE(numout,*) ' number of corrective phase      ncortrc = ',    &
-             ncortrc
-          WRITE(numout,*) ' time step freq. for pass. trac. ndttrc  = ',    &
-             ndttrc
-          WRITE(numout,*) ' 1st time step for pass. trac. nittrc000 = ',    &
-             nittrc000
-          WRITE(numout,*) ' computes or not crossterms    crosster  = ',    &
-             crosster
-      ENDIF
-
-
-!! namelist of transport
-!! ---------------------
+         WRITE(numout,*) ' '
+         WRITE(numout,*) 'natnum'
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' tuning coefficient              rsc     = ',    &
+            rsc
+         WRITE(numout,*) ' truncation value                rtrn    = ',    &
+            rtrn
+         WRITE(numout,*) ' number of corrective phase      ncortrc = ',    &
+            ncortrc
+         WRITE(numout,*) ' time step freq. for pass. trac. ndttrc  = ',    &
+            ndttrc
+         WRITE(numout,*) ' 1st time step for pass. trac. nittrc000 = ',    &
+            nittrc000
+         WRITE(numout,*) ' computes or not crossterms    crosster  = ',    &
+            crosster
+      ENDIF
+
+
+      !! namelist of transport
+      !! ---------------------
       CALL trc_trp_lec
 
-!! namelist of SMS
-!! ---------------      
+      !! namelist of SMS
+      !! ---------------      
       CALL trc_lsm
 
-END SUBROUTINE trc_lec 
+   END SUBROUTINE trc_lec
 
 #else
-
-SUBROUTINE trc_lec
-  !!==============
-     !! no passive tracers
-  !!==============
-END SUBROUTINE trc_lec
+   !!======================================================================
+   !!  Empty module : No passive tracer
+   !!======================================================================
+CONTAINS
+
+   SUBROUTINE trc_lec
+
+   END SUBROUTINE trc_lec
 
 #endif
Index: trunk/NEMO/TOP_SRC/trclsm.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trclsm.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trclsm.F90	(revision 335)
@@ -1,4 +1,4 @@
 MODULE trclsm
-   !!=======================================================================================
+   !!===============================================================
    !!
    !!                       *** MODULE trclsm ****
@@ -6,66 +6,54 @@
    !!  READS specific NAMELIST for sms terms
    !!
-   !!=======================================================================================
+   !!=================================================================
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
+   !!-----------------------------------------------------------------
+#if defined key_passivetrc
+   !!-------------------------------------------------------------
+   !! * Modules used
+   !! ==============
+   USE oce_trc
+   USE trc
+   USE sms
+
+
+   IMPLICIT NONE                             
+   PRIVATE
+
+   !! * Accessibility
+   PUBLIC trc_lsm
+
+
+#if defined key_trc_lobster1
    !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      !! ==============
-      USE oce_trc
-      USE trc
-      USE sms
+   !!   'key_trc_lobster1'                        LOBSTER1 biological model  
+   !!----------------------------------------------------------------------
+#  include "trclsm.lobster1.h90"
 
-                                                                                                                      
-      IMPLICIT NONE                             
-      PRIVATE
+#elif defined key_trc_pisces
+   !!----------------------------------------------------------------------
+   !!   'key_trc_pisces'                            PISCES biological model                  
+   !!----------------------------------------------------------------------
+#  include "trclsm.pisces.h90"
 
-  !! * Accessibility
-   PUBLIC trc_lsm
+#elif defined key_cfc
+   !!----------------------------------------------------------------------
+   !!   'key_cfc  '                                          CFC model                  
+   !!----------------------------------------------------------------------
+#  include "trclsm.cfc.h90"
+
+   !!----------------------------------------------------------------------
+   !!   Default option                               
+   !!----------------------------------------------------------------------
+# endif
+
+#else
 
 CONTAINS
 
-#if defined key_passivetrc
-
-SUBROUTINE trc_lsm
-!!---------------------------------------------------------------------
-!!
-!!                       ROUTINE trclsm
-!!                     ******************
-!!  PURPOSE :
-!!  ---------
-!!     READS specific NAMELIST for sms terms 
-!!
-!!   History:
-!!   --------
-!!      original  : 99-10 (M.A. Foujols, M. Levy) passive tracer
-!!                  00-04 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD
-!!                  02-05 (O. Aumont) AGE TRACER
-!!     03/2005  O. Aumont and A. El Moussaoui  F90
-!!----------------------------------------------------------------------
-
-#    if defined key_trc_npzd
-#    include "trclsm.npzd.h90"
-#    elif defined key_trc_lobster1
-#    include "trclsm.lobster1.h90"
-#    elif defined key_trc_hamocc3
-#    include "trclsm.hamocc3.h90"
-#    elif defined key_trc_age
-#    include "trclsm.age.h90"
-#    elif defined key_trc_pisces
-#    include "trclsm.pisces.h90"
-#    else
-!!      user can define here his own sms namelist
-#    endif
-
-END  SUBROUTINE  trc_lsm
-
-#else
-
-SUBROUTINE trc_lsm
-!!================
-   !! no passive tracers
-END  SUBROUTINE  trc_lsm
+   SUBROUTINE trc_lsm
+      !!================
+      !! no passive tracers
+   END  SUBROUTINE  trc_lsm
 
 #endif  
Index: trunk/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trcrst.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trcrst.F90	(revision 335)
@@ -1,4 +1,4 @@
 MODULE trcrst
-   !!===========================================================================================
+   !!======================================================================
    !!
    !!                       *** MODULE trcrst ***
@@ -6,28 +6,27 @@
    !!   Read the restart files for passive tracers
    !!
-   !!===========================================================================================
+   !!======================================================================
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      !! ==============
-      USE oce_trc
-      USE trc
-      USE sms
-      USE trctrp_lec   
-                                                                                                                            
-      IMPLICIT NONE
-      PRIVATE
-
+#if defined key_passivetrc   
+   !!----------------------------------------------------------------------
+   !! * Modules used
+   !! ==============
+   USE oce_trc
+   USE trc
+   USE sms
+   USE trctrp_lec   
+   
+   IMPLICIT NONE
+   PRIVATE
+   
    !! * Accessibility
    PUBLIC trc_rst
    PUBLIC trc_wri
-
+   
    !! * Module variables
    CHARACTER (len=48) ::   &
       trestart = 'initial.trc.nc'   ! restart file name
-
+   
 CONTAINS
 
@@ -37,65 +36,63 @@
    !!----------------------------------------------------------------------
 #include "trcrst_fdir.h90"
-
-#else
-    !!  USE ioipsl
-#if defined key_passivetrc    
-
-SUBROUTINE trc_rst 
-   !!===========================================================================================
-   !!
-   !!                       ROUTINE trc_rst
-   !!                     *******************
-   !!
-   !!  PURPOSE :
-   !!  ---------
-   !!     READ files for restart for passive tracer
-   !!
-   !!   METHOD :
-   !!   -------
-   !!      READ the previous fields on the FILE nutrst
-   !!      the first record indicates previous characterics
-   !!      after control with the present run, we READ :
-   !!      - prognostic variables on the second and more record
-   !!
-   !!   History:
-   !!   --------
-   !!  original  : 96-11
-   !!  00-05 (A. Estublier) TVD Limiter Scheme key_trc_tvd 
-   !!  00-12 (O. Aumont, E. Kestenare) read restart file for sediments 
-   !!  01-05 (O. Aumont, E. Kestenare) read restart file for calcite and silicate sediments 
-   !!  05-03 (O. Aumont and A. El Moussaoui) F90           
-   !!------------------------------------------------------------------------
-   !! * Modules used
+   
+#else 
+
+   SUBROUTINE trc_rst 
+      !!===========================================================================================
+      !!
+      !!                       ROUTINE trc_rst
+      !!                     *******************
+      !!
+      !!  PURPOSE :
+      !!  ---------
+      !!     READ files for restart for passive tracer
+      !!
+      !!   METHOD :
+      !!   -------
+      !!      READ the previous fields on the FILE nutrst
+      !!      the first record indicates previous characterics
+      !!      after control with the present run, we READ :
+      !!      - prognostic variables on the second and more record
+      !!
+      !!   History:
+      !!   --------
+      !!  original  : 96-11
+      !!  00-05 (A. Estublier) TVD Limiter Scheme key_trc_tvd 
+      !!  00-12 (O. Aumont, E. Kestenare) read restart file for sediments 
+      !!  01-05 (O. Aumont, E. Kestenare) read restart file for calcite and silicate sediments 
+      !!  05-03 (O. Aumont and A. El Moussaoui) F90           
+      !!------------------------------------------------------------------------
+      !! * Modules used
       USE ioipsl
 
 
-   !! local declarations
-   !! ==================
-    LOGICAL ::  llog       !!!
-    CHARACTER (len=32) :: clname1,clname2
-    CHARACTER (len=32) :: clname = 'restart.trc'
-    CHARACTER (len=12) :: clvnames(80)  
-
-    INTEGER :: ino1,jn,iarak0,iarak1,          &
-               ji, jj, jk,                   &
-               itime, ibvar
-    REAL(wp) :: caralk,bicarb,zdt,        &     
-                zdate0
-    REAL(wp) ::   zdept(jpk), zlamt(jpi,jpj), zphit(jpi,jpj)
-
-    REAL(wp), DIMENSION(3) :: zinfo
-
-    !!---------------------------------------------------------------------
-    !!  OPA.9 03-2005  
-    !!---------------------------------------------------------------------
-    !! 0. initialisations
-    !!------------------
+      !! local declarations
+      !! ==================
+      LOGICAL ::  llog       !!!
+      CHARACTER (len=32) :: clname1,clname2
+      CHARACTER (len=32) :: clname = 'restart.trc'
+      CHARACTER (len=12) :: clvnames(80)  
+
+      INTEGER :: ino1,jn,iarak0,iarak1,          &
+         ji, jj, jk,                   &
+         itime, ibvar
+      REAL(wp) :: caralk,bicarb,zdt,        &     
+         zdate0
+      REAL(wp) ::   zdept(jpk), zlamt(jpi,jpj), zphit(jpi,jpj)
+
+      REAL(wp), DIMENSION(3) :: zinfo
+
+      !!---------------------------------------------------------------------
+      !!  OPA.9 03-2005  
+      !!---------------------------------------------------------------------
+      !! 0. initialisations
+      !!------------------
 
 
       IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN
-          iarak0 = 1
+         iarak0 = 1
       ELSE
-          iarak0=0
+         iarak0=0
       ENDIF
 
@@ -108,8 +105,8 @@
       IF(lwp) WRITE(numout,*) '   with the time nit000 : ',nit000
       IF(lwp) THEN
-          IF(iarak0.eq.1) then
-              WRITE(numout,*) '   and before fields for Arakawa sheme '
-          ENDIF 
-          WRITE(numout,*) ' '
+         IF(iarak0.eq.1) then
+            WRITE(numout,*) '   and before fields for Arakawa sheme '
+         ENDIF
+         WRITE(numout,*) ' '
       ENDIF
 
@@ -133,8 +130,8 @@
 
 
-    !! 1. READ nutrst
-    !! --------------
-    !! ... first information
-    !! ---------------------
+      !! 1. READ nutrst
+      !! --------------
+      !! ... first information
+      !! ---------------------
       itime=0
       llog=.false.           !!!
@@ -143,5 +140,5 @@
       zdept(:)   = 0.e0
       CALL restini(clname,jpi,jpj,zlamt,zphit,jpk,zdept,clname         & 
-       &           ,itime,zdate0,zdt,nutrst)
+         &           ,itime,zdate0,zdt,nutrst)
 
       CALL ioget_vname(nutrst, ibvar, clvnames)
@@ -155,7 +152,7 @@
       IF(lwp) WRITE(numout,*) '   with the time it : ',nint(zinfo(2))
       IF(lwp) THEN
-          IF(iarak1.eq.1) then
-              WRITE(numout,*) '   and before fields for Arakawa sheme '
-          ENDIF 
+         IF(iarak1.eq.1) then
+            WRITE(numout,*) '   and before fields for Arakawa sheme '
+         ENDIF
       ENDIF
       IF(lwp) WRITE(numout,*) '   number of variables   : ', ibvar
@@ -164,152 +161,151 @@
       IF(lwp) WRITE(numout,*) ' '
 
-   !! 1.2 control of date
-   !! -------------------
+      !! 1.2 control of date
+      !! -------------------
 
       IF( nit000- NINT( zinfo(2) ) /= 1 .AND. nrsttr /= 0 ) THEN
-          IF(lwp) THEN
-              WRITE(numout,*) ' ===>>>> : problem with nit000 for the',    &  
-                  ' passive tracer restart'
-              WRITE(numout,*) ' =======                              ',    &    
-                  ' ======================'
-              WRITE(numout,*) ' we stop. verify the FILE'
-              WRITE(numout,*) ' or rerun with the value  0 for the'
-              WRITE(numout,*) ' control of time PARAMETER   nrstdt'
-              WRITE(numout,*) ' '
-          ENDIF
-          STOP 'trc_rst'       !!
-      ENDIF
-
-    !! 1.3 Control of the sheme
-    !! ------------------------
+         IF(lwp) THEN
+            WRITE(numout,*) ' ===>>>> : problem with nit000 for the',    &  
+               ' passive tracer restart'
+            WRITE(numout,*) ' =======                              ',    &    
+               ' ======================'
+            WRITE(numout,*) ' we stop. verify the FILE'
+            WRITE(numout,*) ' or rerun with the value  0 for the'
+            WRITE(numout,*) ' control of time PARAMETER   nrstdt'
+            WRITE(numout,*) ' '
+         ENDIF
+         STOP 'trc_rst'       !!
+      ENDIF
+
+      !! 1.3 Control of the sheme
+      !! ------------------------
 
       IF(iarak0.ne.iarak1) THEN
-          IF(lwp) THEN
-              WRITE(numout,*) ' ===>>>> : problem with the',       &   
-                 ' passive tracer restart file'
-              WRITE(numout,*) ' =======                              ',        & 
-                  ' ==========================='
-              WRITE(numout,*) ' we stop. verify the FILE'
-              WRITE(numout,*) ' before field required IF 1=',iarak0
-              WRITE(numout,*) ' before field present in file IF 1=',           & 
-                 iarak1
-              WRITE(numout,*) ' '
-          ENDIF
-          STOP 'trc_rst'       !!!!!    AVERIFIER AU NIV F90'
-      ENDIF
-
-
-    !! ... READ prognostic variables and computes diagnostic variable
-    !! ---------------------------------------------------------------
-
-       DO jn=1,jptra
+         IF(lwp) THEN
+            WRITE(numout,*) ' ===>>>> : problem with the',       &   
+               ' passive tracer restart file'
+            WRITE(numout,*) ' =======                              ',        & 
+               ' ==========================='
+            WRITE(numout,*) ' we stop. verify the FILE'
+            WRITE(numout,*) ' before field required IF 1=',iarak0
+            WRITE(numout,*) ' before field present in file IF 1=',           & 
+               iarak1
+            WRITE(numout,*) ' '
+         ENDIF
+         STOP 'trc_rst'       !!!!!    AVERIFIER AU NIV F90'
+      ENDIF
+
+
+      !! ... READ prognostic variables and computes diagnostic variable
+      !! ---------------------------------------------------------------
+
+      DO jn=1,jptra
          clname='TRN'//ctrcnm(jn)
          CALL restget(nutrst,clname,jpi,jpj,jpk,0,llog,trn(:,:,:,jn))
-       END DO
-
-       DO jn=1,jptra
+      END DO
+
+      DO jn=1,jptra
          clname='TRB'//ctrcnm(jn)
          CALL restget(nutrst,clname,jpi,jpj,jpk,0,llog,trb(:,:,:,jn))
-       END DO
-
-#if defined key_trc_hamocc3
-         clname='SED'//ctrcnm(jppoc)
-         clname1='SED'//ctrcnm(jpcal)
-         clname2='SED'//ctrcnm(jpsil)
-         CALL restget(nutrst,clname1,jpi,jpj,1,0,llog,sedcal(:,:))
-         CALL restget(nutrst,clname2,jpi,jpj,1,0,llog,sedsil(:,:))
-         CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpoc(:,:))
-#elif defined key_trc_npzd || defined key_trc_lobster1
-         clname='SED'//ctrcnm(jpdet)
-         CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpoc(:,:))
+      END DO
+
+
+#if defined key_trc_lobster1
+      clname='SEDB'//ctrcnm(jpdet)
+      clname1='SEDN'//ctrcnm(jpdet)
+      CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpocb(:,:))
+      CALL restget(nutrst,clname1,jpi,jpj,1,0,llog,sedpocn(:,:))
 #elif defined key_trc_pisces
-
-         clname='Silicalim'
-         CALL restget(nutrst,clname,jpi,jpj,1,0,llog,xksi)
-         xksimax=xksi
-
-         clname='SED'//ctrcnm(jppoc)
-         clname1='SED'//ctrcnm(jpcal)
-         clname2='SED'//ctrcnm(jpsil)
-         CALL restget(nutrst,clname1,jpi,jpj,1,0,llog,sedcal(:,:))
-         CALL restget(nutrst,clname2,jpi,jpj,1,0,llog,sedsil(:,:))
-         CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpoc(:,:))
+      clname='Silicalim'
+      CALL restget(nutrst,clname,jpi,jpj,1,0,llog,xksi)
+      xksimax=xksi
+
+      clname='SED'//ctrcnm(jppoc)
+      clname1='SED'//ctrcnm(jpcal)
+      clname2='SED'//ctrcnm(jpsil)
+      CALL restget(nutrst,clname1,jpi,jpj,1,0,llog,sedcal(:,:))
+      CALL restget(nutrst,clname2,jpi,jpj,1,0,llog,sedsil(:,:))
+      CALL restget(nutrst,clname,jpi,jpj,1,0,llog,sedpoc(:,:))
+
+#elif defined key_cfc
+      clname='qint'
+      CALL restget(nutrst,clname,jpi,jpj,jptra,0,llog,qint(:,:,:))
+      clname1='qtr'
+      CALL restget(nutrst,clname1,jpi,jpj,jptra,0,llog,qtr(:,:,:))         
 #endif
 
-#if defined key_trc_hamocc3 || defined key_trc_pisces 
-
-
-    !!  Initialization of chemical variables of the carbon cycle
-    !!  --------------------------------------------------------
-
-        DO jk = 1,jpk
-          DO jj = 1,jpj
+#if defined key_trc_pisces 
+      !!  Initialization of chemical variables of the carbon cycle
+      !!  --------------------------------------------------------
+
+      DO jk = 1,jpk
+         DO jj = 1,jpj
             DO ji = 1,jpi
-              caralk = trn(ji,jj,jk,jptal)-       &
-              &        borat(ji,jj,jk)/(1.+1.E-8/(rtrn+akb3(ji,jj,jk)))
-              co3(ji,jj,jk)=(caralk-trn(ji,jj,jk,jpdic))*tmask(ji,jj,jk)   &
-              &        +(1.-tmask(ji,jj,jk))*.5e-3
-              bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk)
-              hi(ji,jj,jk) = (ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk))     &
-              &  *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9
-              h2co3(ji,jj) = 1.e-5
+               caralk = trn(ji,jj,jk,jptal)-       &
+                  &        borat(ji,jj,jk)/(1.+1.E-8/(rtrn+akb3(ji,jj,jk)))
+               co3(ji,jj,jk)=(caralk-trn(ji,jj,jk,jpdic))*tmask(ji,jj,jk)   &
+                  &        +(1.-tmask(ji,jj,jk))*.5e-3
+               bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk)
+               hi(ji,jj,jk) = (ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk))     &
+                  &  *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9
+               h2co3(ji,jj) = 1.e-5
             ENDDO
-          ENDDO
-        ENDDO
+         ENDDO
+      ENDDO
 #endif
 
-END SUBROUTINE trc_rst
-
-SUBROUTINE trc_wri(kt)
-   !! ==================================================================================
-   !!
-   !!                       ROUTINE trc_wri
-   !!                     ******************
-   !!
-   !!  PURPOSE :
-   !!  ---------
-   !!     WRITE restart fields in nutwrs
-   !!   METHOD :
-   !!   -------
-   !!
-   !!   nutwrs FILE:
-   !!   each nstock time step , SAVE fields which are necessary for
-   !!   passive tracer restart
-   !!
-   !!
-   !!   INPUT :
-   !!   -----
-   !!      argument
-   !!              kt              : time step
-   !!      COMMON
-   !!            /cottrc/          : passive tracers fields (before,now
-   !!                                  ,after)
-   !!
-   !!   OUTPUT :
-   !!   ------
-   !!      FILE
-   !!           nutwrs          : standard restart fields OUTPUT
-   !!
-   !!   WORKSPACE :
-   !!   ---------
-   !!      ji,jj,jk,jl,ino0,it0,iarak0
-   !!
-   !!   History:
-   !!   --------
-   !!      original : 96-12
-   !!      addition : 99-12 (M.-A. Foujols) NetCDF FORMAT with ioipsl
-   !!      additions : 00-05 (A. Estublier)
-   !!                  TVD Limiter Scheme : key_trc_tvd
-   !!      additions : 01-01 (M.A Foujols, E. Kestenare) bug fix: restclo
-   !!      additions : 01-01 (O. Aumont, E. Kestenare)
-   !!                  write restart file for sediments
-   !!      additions : 01-05 (O. Aumont, E. Kestenare)
-   !!                  write restart file for calcite and silicate sediments
-   !!   05-03 (O. Aumont and A. El Moussaoui) F90
-   !!========================================================================================!
+   END SUBROUTINE trc_rst
+
+   SUBROUTINE trc_wri(kt)
+      !! ==================================================================================
+      !!
+      !!                       ROUTINE trc_wri
+      !!                     ******************
+      !!
+      !!  PURPOSE :
+      !!  ---------
+      !!     WRITE restart fields in nutwrs
+      !!   METHOD :
+      !!   -------
+      !!
+      !!   nutwrs FILE:
+      !!   each nstock time step , SAVE fields which are necessary for
+      !!   passive tracer restart
+      !!
+      !!
+      !!   INPUT :
+      !!   -----
+      !!      argument
+      !!              kt              : time step
+      !!      COMMON
+      !!            /cottrc/          : passive tracers fields (before,now
+      !!                                  ,after)
+      !!
+      !!   OUTPUT :
+      !!   ------
+      !!      FILE
+      !!           nutwrs          : standard restart fields OUTPUT
+      !!
+      !!   WORKSPACE :
+      !!   ---------
+      !!      ji,jj,jk,jl,ino0,it0,iarak0
+      !!
+      !!   History:
+      !!   --------
+      !!      original : 96-12
+      !!      addition : 99-12 (M.-A. Foujols) NetCDF FORMAT with ioipsl
+      !!      additions : 00-05 (A. Estublier)
+      !!                  TVD Limiter Scheme : key_trc_tvd
+      !!      additions : 01-01 (M.A Foujols, E. Kestenare) bug fix: restclo
+      !!      additions : 01-01 (O. Aumont, E. Kestenare)
+      !!                  write restart file for sediments
+      !!      additions : 01-05 (O. Aumont, E. Kestenare)
+      !!                  write restart file for calcite and silicate sediments
+      !!   05-03 (O. Aumont and A. El Moussaoui) F90
+      !!========================================================================================!
       !! * Modules used
       USE ioipsl
 
-     !! * Arguments
+      !! * Arguments
       !! -----------
       INTEGER, INTENT( in ) :: kt
@@ -322,14 +318,14 @@
 
       INTEGER :: jn,   &
-                 ino0,it0,iarak0,     &
-                 ic,jc,ji,jj,jk,      &
-                 itime
+         ino0,it0,iarak0,     &
+         ic,jc,ji,jj,jk,      &
+         itime
 
       REAL(wp) :: zdate0, zinfo(3),zdiag_var,    &
-                  zdiag_varmin, zdiag_varmax
-
-
-   !! 1. OUTPUT of restart fields (nutwrs)
-   !! ---------------------------
+         zdiag_varmin, zdiag_varmax
+
+
+      !! 1. OUTPUT of restart fields (nutwrs)
+      !! ---------------------------
 
       IF( kt == nit000 ) THEN
@@ -342,55 +338,55 @@
       IF( MOD(kt,nstock) == 0 .OR. kt == nitend ) THEN
 
-   !! 0. initialisations
-   !! ------------------
+         !! 0. initialisations
+         !! ------------------
 
          IF(lwp) WRITE(numout,*) ' '
          IF(lwp) WRITE(numout,*) 'trc_wri : write the passive tracer restart file in NetCDF format ',   &
-                                              'at it= ',kt,' date= ',ndastp
+            'at it= ',kt,' date= ',ndastp
          IF(lwp) WRITE(numout,*) '~~~~~~~~~'
 
 
-          ino0 =no
-          it0  =kt
-#if defined key_trc_cen2 || defined key_trc_tvd
-          iarak0=1
-#else
-          iarak0=0
-#endif
-
-          zinfo(1)=FLOAT(ino0)
-          zinfo(2)=FLOAT(it0)
-          zinfo(3)=FLOAT(iarak0)
-
-   !! 1. WRITE in nutwrs
-   !! ------------------
-   !!... first information
-
-          INQUIRE (FILE=trestart,EXIST=clbon)
-          IF(clbon) THEN
-              OPEN(UNIT=nutwrs,FILE=trestart,STATUS='old')
-              CLOSE(nutwrs,STATUS='delete')
-          ENDIF
-
-          ic=1
-          DO jc=1,16
+         ino0 =no
+         it0  =kt
+         IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN
+            iarak0 = 1
+         ELSE
+            iarak0=0
+         ENDIF
+
+         zinfo(1)=FLOAT(ino0)
+         zinfo(2)=FLOAT(it0)
+         zinfo(3)=FLOAT(iarak0)
+
+         !! 1. WRITE in nutwrs
+         !! ------------------
+         !!... first information
+
+         INQUIRE (FILE=trestart,EXIST=clbon)
+         IF(clbon) THEN
+            OPEN(UNIT=nutwrs,FILE=trestart,STATUS='old')
+            CLOSE(nutwrs,STATUS='delete')
+         ENDIF
+
+         ic=1
+         DO jc=1,16
             IF(cexper(jc:jc) /= ' ') ic = jc
-          END DO
-          WRITE(cln,'("_",i2.2,i2.2,i2.2,"_restart.trc")') nyear, nmonth, nday
-          clname=cexper(1:ic)//cln
-          ic=1
-          DO jc=1,48
+         END DO
+         WRITE(cln,'("_",i2.2,i2.2,i2.2,"_restart.trc")') nyear, nmonth, nday
+         clname=cexper(1:ic)//cln
+         ic=1
+         DO jc=1,48
             IF(clname(jc:jc) /= ' ') ic=jc
-          END DO
-          trestart=clname(1:ic)//".nc"
-          itime=0
-          CALL ymds2ju(nyear,nmonth,nday,0.0,zdate0)
-          CALL restini('NONE',jpi,jpj,glamt,gphit,jpk,gdept,clname           &
-      &        ,itime,zdate0,rdt*nstock,nutwrs)
-
-          CALL restput(nutwrs,'info',1,1,3,0,zinfo)
-
-   ! prognostic variables
-   ! --------------------
+         END DO
+         trestart=clname(1:ic)//".nc"
+         itime=0
+         CALL ymds2ju(nyear,nmonth,nday,0.0,zdate0)
+         CALL restini('NONE',jpi,jpj,glamt,gphit,jpk,gdept,clname           &
+            &        ,itime,zdate0,rdt*nstock,nutwrs)
+
+         CALL restput(nutwrs,'info',1,1,3,0,zinfo)
+
+         ! prognostic variables
+         ! --------------------
 
          DO jn=1,jptra
@@ -398,84 +394,89 @@
             CALL restput(nutwrs,clname,jpi,jpj,jpk,0,trn(:,:,:,jn))
 
-         zdiag_var=0.
-         zdiag_varmin=0.
-         zdiag_varmax=0.
-         IF (lwp) WRITE(numout,*) '----TRACER STAT----'
-
-         DO ji=1,jpi
-            DO jj=1,jpj
-              DO jk=1,jpk
-
-              zdiag_var=zdiag_var+tmask(ji,jj,jk)*trn(ji,jj,jk,jn)
-
-              IF (tmask(ji,jj,jk).EQ.1.) THEN
-                  IF (zdiag_varmin.GT.trn(ji,jj,jk,jn))        &
-                     zdiag_varmin =  trn(ji,jj,jk,jn)
-                  IF (zdiag_varmax.LT.trn(ji,jj,jk,jn))        &
-                     zdiag_varmax =  trn(ji,jj,jk,jn)
-
-              ENDIF
-
-              END DO
+            zdiag_var=0.
+            zdiag_varmin=0.
+            zdiag_varmax=0.
+            IF (lwp) WRITE(numout,*) '----TRACER STAT----'
+
+            DO ji=1,jpi
+               DO jj=1,jpj
+                  DO jk=1,jpk
+
+                     zdiag_var=zdiag_var+tmask(ji,jj,jk)*trn(ji,jj,jk,jn)
+
+                     IF (tmask(ji,jj,jk).EQ.1.) THEN
+                        IF (zdiag_varmin.GT.trn(ji,jj,jk,jn))        &
+                           zdiag_varmin =  trn(ji,jj,jk,jn)
+                        IF (zdiag_varmax.LT.trn(ji,jj,jk,jn))        &
+                           zdiag_varmax =  trn(ji,jj,jk,jn)
+
+                     ENDIF
+
+                  END DO
+               END DO
             END DO
+
+
+            zdiag_var=zdiag_var/(jpi*jpj*jpk)
+
+            IF(lwp) WRITE(numout,*) 'MEAN NO ',jn,' =',zdiag_var,'MIN= '  &
+               ,zdiag_varmin,'MAX= ',zdiag_varmax
+
          END DO
 
-
-         zdiag_var=zdiag_var/(jpi*jpj*jpk)
-
-         IF(lwp) WRITE(numout,*) 'MEAN NO ',jn,' =',zdiag_var,'MIN= '  &
-             ,zdiag_varmin,'MAX= ',zdiag_varmax
-
-         END DO
-
-          DO jn=1,jptra
+         DO jn=1,jptra
             clname='TRB'//ctrcnm(jn)
             CALL restput(nutwrs,clname,jpi,jpj,jpk,0,trb(:,:,:,jn))
-          END DO
-
-#if defined key_trc_hamocc3
-             clname='SED'//ctrcnm(jppoc)
-             clname1='SED'//ctrcnm(jpcal)
-             clname2='SED'//ctrcnm(jpsil)
-             CALL restput(nutwrs,clname1,jpi,jpj,1,0,sedcal(:,:))
-             CALL restput(nutwrs,clname2,jpi,jpj,1,0,sedsil(:,:))
-             CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpoc(:,:))
-#elif defined key_trc_npzd || defined key_trc_lobster1
-             clname='SED'//ctrcnm(jpdet)
-             CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpoc(:,:))
+         END DO
+
+
+#if defined key_trc_lobster1
+         clname='SEDB'//ctrcnm(jpdet)
+         clname1='SEDN'//ctrcnm(jpdet)
+         CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpocb(:,:))
+         CALL restput(nutwrs,clname1,jpi,jpj,1,0,sedpocn(:,:))
 #elif defined key_trc_pisces
-             clname='SED'//ctrcnm(jppoc)
-             clname1='SED'//ctrcnm(jpcal)
-             clname2='SED'//ctrcnm(jpsil)
-             CALL restput(nutwrs,clname1,jpi,jpj,1,0,sedcal(:,:))
-             CALL restput(nutwrs,clname2,jpi,jpj,1,0,sedsil(:,:))
-             CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpoc(:,:))
-
-             clname='Silicalim'
-             CALL restput(nutwrs,clname,jpi,jpj,1,0,xksi(:,:))
+         clname='SED'//ctrcnm(jppoc)
+         clname1='SED'//ctrcnm(jpcal)
+         clname2='SED'//ctrcnm(jpsil)
+         CALL restput(nutwrs,clname1,jpi,jpj,1,0,sedcal(:,:))
+         CALL restput(nutwrs,clname2,jpi,jpj,1,0,sedsil(:,:))
+         CALL restput(nutwrs,clname,jpi,jpj,1,0,sedpoc(:,:))
+
+         clname='Silicalim'
+         CALL restput(nutwrs,clname,jpi,jpj,1,0,xksi(:,:))
+#elif defined key_cfc
+         clname='qint'
+         CALL restput(nutwrs,clname,jpi,jpj,jptra,0,qint(:,:,:))
+         clname1='qtr'
+         CALL restput(nutwrs,clname1,jpi,jpj,jptra,0,qtr(:,:,:))
 #endif
 
-          CALL restclo(nutwrs)
-
-      ENDIF
-
-END SUBROUTINE trc_wri
+
+         CALL restclo(nutwrs)
+
+      ENDIF
+
+   END SUBROUTINE trc_wri
+
+#endif
 
 #else
-
-SUBROUTINE trc_rst
-   !! no passive tracers
-END SUBROUTINE trc_rst
-
-SUBROUTINE trc_wri(kt)
-     !!! no passive tracers
-     INTEGER, INTENT ( in ) :: kt
+   !!======================================================================
+   !!  Empty module : No passive tracer
+   !!======================================================================
+CONTAINS
+
+   SUBROUTINE trc_rst
+      !! no passive tracers
+   END SUBROUTINE trc_rst
+
+   SUBROUTINE trc_wri(kt)
+      !! no passive tracers
+      INTEGER, INTENT ( in ) :: kt
       WRITE(*,*) 'trc_wri: You should not have seen this print! error?', kt
-END SUBROUTINE trc_wri
-
-#endif 
-
+   END SUBROUTINE trc_wri
+   
 #endif
-
-
-END MODULE trcrst  
+   
+END MODULE trcrst
Index: trunk/NEMO/TOP_SRC/trcrst_fdir.h90
===================================================================
--- trunk/NEMO/TOP_SRC/trcrst_fdir.h90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trcrst_fdir.h90	(revision 335)
@@ -1,24 +1,22 @@
-SUBROUTINE trc_rst
-   !!===========================================================================================
-   !!
-   !!                       ROUTINE trc_rst
-   !!                     *******************
-   !!
-   !!------------------------------------------------------------------------
-   !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
-   !!----------------------------------------------------------------------
-
+   SUBROUTINE trc_rst
+      !!===========================================================================================
+      !!
+      !!                       ROUTINE trc_rst
+      !!                     *******************
+      !!
+      !!------------------------------------------------------------------------
+      !!  TOP 1.0,  LOCEAN-IPSL (2005)
+      !!----------------------------------------------------------------------
+      
       !! * Local declarations
       INTEGER :: ino0,ino1,it0,it1,idast1,jn,iarak0,iarak1
       INTEGER ::   ibloc, ilglo
       INTEGER :: inum   ! temporary logical unit
-
+      REAL(wp),DIMENSION(jpi,jpj) :: zq
       ! open restart file
       ibloc = 4096
       ilglo = ibloc*((jpiglo*jpjglo*jpbyt-1 )/ibloc+1)
       CALL ctlopn(inum,'restarti.trc','OLD','UNFORMATTED','DIRECT',   &
-                  ilglo,numout,lwp,1)
+         ilglo,numout,lwp,1)
       ! restart options
       IF(nrsttr == 0) THEN
@@ -38,21 +36,21 @@
       it0  =nit000
 
-#if defined key_trc_cen2
-      iarak0=1
-#else
-      iarak0=0
-#endif
+      IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN
+         iarak0 = 1
+      ELSE
+         iarak0=0
+      ENDIF
 
       IF(lwp) THEN
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' *** trcrst beginning of restart for'
-          WRITE(numout,*) ' passive tracer'
-          WRITE(numout,*) ' the present run :'
-          WRITE(numout,*) '   number job is  : ',no
-          WRITE(numout,*) '   with the time nit000 : ',nit000
-          IF(iarak0.eq.1) then
-              WRITE(numout,*) '   and before fields for Arakawa sheme '
-          ENDIF 
-          WRITE(numout,*) ' '
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' *** trcrst beginning of restart for'
+         WRITE(numout,*) ' passive tracer'
+         WRITE(numout,*) ' the present run :'
+         WRITE(numout,*) '   number job is  : ',no
+         WRITE(numout,*) '   with the time nit000 : ',nit000
+         IF(iarak0.eq.1) then
+            WRITE(numout,*) '   and before fields for Arakawa sheme '
+         ENDIF
+         WRITE(numout,*) ' '
       ENDIF
 
@@ -65,12 +63,12 @@
 
       IF(lwp) THEN
-          WRITE(numout,*) ' '
-          WRITE(numout,*) ' READ nutrst with '
-          WRITE(numout,*) '   number job is  : ',ino1
-          WRITE(numout,*) '   with the time it : ',it1
-          IF(iarak1.eq.1) then
-              WRITE(numout,*) '   and before fields for Arakawa sheme '
-          ENDIF 
-          WRITE(numout,*) ' '
+         WRITE(numout,*) ' '
+         WRITE(numout,*) ' READ nutrst with '
+         WRITE(numout,*) '   number job is  : ',ino1
+         WRITE(numout,*) '   with the time it : ',it1
+         IF(iarak1.eq.1) then
+            WRITE(numout,*) '   and before fields for Arakawa sheme '
+         ENDIF
+         WRITE(numout,*) ' '
       ENDIF
 
@@ -78,15 +76,15 @@
 
       IF((it0-it1) /= 1 .AND. ABS(nrsttr) == 1) THEN
-          IF(lwp) THEN
-              WRITE(numout,*) ' ===>>>> : problem with nit000 for the',   &
-                 ' passive tracer restart'
-              WRITE(numout,*) ' =======                              ',   &
-                 ' ======================'
-              WRITE(numout,*) ' we stop. verify the FILE'
-              WRITE(numout,*) ' or rerun with the value  0 for the'
-              WRITE(numout,*) ' control of time PARAMETER   nrstdt'
-              WRITE(numout,*) ' '
-          ENDIF
-          STOP 'trc_rst'
+         IF(lwp) THEN
+            WRITE(numout,*) ' ===>>>> : problem with nit000 for the',   &
+               ' passive tracer restart'
+            WRITE(numout,*) ' =======                              ',   &
+               ' ======================'
+            WRITE(numout,*) ' we stop. verify the FILE'
+            WRITE(numout,*) ' or rerun with the value  0 for the'
+            WRITE(numout,*) ' control of time PARAMETER   nrstdt'
+            WRITE(numout,*) ' '
+         ENDIF
+         STOP 'trc_rst'
       ENDIF
 
@@ -94,16 +92,16 @@
 
       IF (iarak0 /= iarak1) THEN
-          IF(lwp) THEN
-              WRITE(numout,*) ' ===>>>> : problem with the',    &
-                 ' passive tracer restart file'
-              WRITE(numout,*) ' =======                              ',   &
-                 ' ==========================='
-              WRITE(numout,*) ' we stop. verify the FILE'
-              WRITE(numout,*) ' before field required IF 1=',iarak0
-              WRITE(numout,*) ' before field present in file IF 1=',    &
-                 iarak1
-              WRITE(numout,*) ' '
-          ENDIF
-          STOP 'trc_rst'
+         IF(lwp) THEN
+            WRITE(numout,*) ' ===>>>> : problem with the',    &
+               ' passive tracer restart file'
+            WRITE(numout,*) ' =======                              ',   &
+               ' ==========================='
+            WRITE(numout,*) ' we stop. verify the FILE'
+            WRITE(numout,*) ' before field required IF 1=',iarak0
+            WRITE(numout,*) ' before field present in file IF 1=',    &
+               iarak1
+            WRITE(numout,*) ' '
+         ENDIF
+         STOP 'trc_rst'
       ENDIF
 
@@ -112,17 +110,14 @@
 
       DO jn=1,jptra
-        CALL read3(inum,trn(1,1,1,jn), jn + 1 )
+         CALL read3(inum,trn(1,1,1,jn), jn + 1 )
       END DO
 
       DO jn=1,jptra
-        CALL read3(inum,trb(1,1,1,jn), jptra + jn + 1 )
+         CALL read3(inum,trb(1,1,1,jn), jptra + jn + 1 )
       END DO
 
-#if defined key_trc_hamocc3
-      CALL read2(inum,sedcal(:,:),jpk,2*jptra+2)
-      CALL read2(inum,sedsil(:,:),jpk,2*jptra+3)
-      CALL read2(inum,sedpoc(:,:),jpk,2*jptra+4)
-#elif defined key_trc_npzd || defined key_trc_lobster1
-      CALL read2(inum,sedpoc(:,:),jpk,2*jptra+2)
+#if defined key_trc_lobster1
+      CALL read2(inum,sedpocb(:,:),jpk,2*jptra+2)
+      CALL read2(inum,sedpocn(:,:),jpk,2*jptra+3)
 #elif defined key_trc_pisces
 
@@ -133,26 +128,34 @@
       CALL read2(inum,sedsil(:,:),jpk,2*jptra+4)
       CALL read2(inum,sedpoc(:,:),jpk,2*jptra+5)
+
+#elif defined key_cfc
+      DO jn=1,jptra
+         CALL read2(inum,zq(:,:),jpk,2*jptra+2)
+         qint(:,:,jn) = zq(:,:)
+         CALL read2(inum,zq(:,:),jpk,2*jptra+3)
+         qtr(:,:,jn)=zq(:,:)
+      ENDDO
 #endif
 
-#if defined key_trc_hamocc3 || defined key_trc_pisces
-
-
-    !!  Initialization of chemical variables of the carbon cycle
-    !!  --------------------------------------------------------
-
-        DO jk = 1,jpk
-          DO jj = 1,jpj
+#if  defined key_trc_pisces
+
+
+      !!  Initialization of chemical variables of the carbon cycle
+      !!  --------------------------------------------------------
+
+      DO jk = 1,jpk
+         DO jj = 1,jpj
             DO ji = 1,jpi
-              caralk = trn(ji,jj,jk,jptal)-       &
-              &        borat(ji,jj,jk)/(1.+1.E-8/(rtrn+akb3(ji,jj,jk)))
-              co3(ji,jj,jk)=(caralk-trn(ji,jj,jk,jpdic))*tmask(ji,jj,jk)   &
-              &        +(1.-tmask(ji,jj,jk))*.5e-3
-              bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk)
-              hi(ji,jj,jk) = (ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk))     &
-              &  *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9
-              h2co3(ji,jj) = 1.e-5
+               caralk = trn(ji,jj,jk,jptal)-       &
+                  &        borat(ji,jj,jk)/(1.+1.E-8/(rtrn+akb3(ji,jj,jk)))
+               co3(ji,jj,jk)=(caralk-trn(ji,jj,jk,jpdic))*tmask(ji,jj,jk)   &
+                  &        +(1.-tmask(ji,jj,jk))*.5e-3
+               bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk)
+               hi(ji,jj,jk) = (ak23(ji,jj,jk)*bicarb/co3(ji,jj,jk))     &
+                  &  *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9
+               h2co3(ji,jj) = 1.e-5
             ENDDO
-          ENDDO
-        ENDDO
+         ENDDO
+      ENDDO
 #endif
 
@@ -161,12 +164,12 @@
    END SUBROUTINE trc_rst
 
-SUBROUTINE trc_wri(kt)
-   !! ==================================================================================
-   !!
-   !!                       ROUTINE trc_wri
-   !!                     ******************
-   !!
-   !!========================================================================================!
-     !! * Arguments
+   SUBROUTINE trc_wri(kt)
+      !! ==================================================================================
+      !!
+      !!                       ROUTINE trc_wri
+      !!                     ******************
+      !!
+      !!========================================================================================!
+      !! * Arguments
       !! -----------
       INTEGER, INTENT( in ) :: kt
@@ -175,4 +178,5 @@
       INTEGER :: jn
       INTEGER :: ino0,it0,iarak0
+      REAL(wp),DIMENSION(jpi,jpj) :: zq
 
       IF( kt == nit000 ) THEN
@@ -190,20 +194,19 @@
          ! ------------------
 
-          IF(lwp) THEN
-              WRITE(numout,*) ' '
-              WRITE(numout,*)       &
-              &  ' trcwri: restart OUTPUT done in nutwrs = ',nutwrs    &
-              &  ,' at it= ',kt,' date= ',ndastp
-              WRITE(numout,*) ' -------'
-          ENDIF
-
-          ino0 =no
-          it0  =kt
-
-#if defined key_trc_cen2
-          iarak0=1
-#else
-          iarak0=0
-#endif
+         IF(lwp) THEN
+            WRITE(numout,*) ' '
+            WRITE(numout,*)       &
+               &  ' trcwri: restart OUTPUT done in nutwrs = ',nutwrs    &
+               &  ,' at it= ',kt,' date= ',ndastp
+            WRITE(numout,*) ' -------'
+         ENDIF
+
+         ino0 =no
+         it0  =kt
+         IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN
+            iarak0 = 1
+         ELSE
+            iarak0=0
+         ENDIF
 
          ! 1. Write in nutwrs
@@ -213,24 +216,28 @@
             ino0, it0, iarak0
 
-          DO jn=1,jptra
+         DO jn=1,jptra
             CALL write3(nutwrs,trn(1,1,1,jn), jn + 1 )
-          END DO
-
-          DO jn=1,jptra
+         END DO
+
+         DO jn=1,jptra
             CALL write3(nutwrs,trb(1,1,1,jn), jptra + jn + 1 )
-          END DO
-
-#if defined key_trc_hamocc3
-             CALL write2(nutwrs,sedcal,jpk,2*jptra+2)
-             CALL write2(nutwrs,sedsil,jpk,2*jptra+3)
-             CALL write2(nutwrs,sedpoc,jpk,2*jptra+4)
-#elif defined key_trc_npzd || defined key_trc_lobster1
-             CALL write2(nutwrs,sedpoc,jpk,2*jptra+2)
+         END DO
+
+#if defined key_trc_lobster1
+         CALL write2(nutwrs,sedpocb,jpk,2*jptra+2)
+         CALL write2(nutwrs,sedpocn,jpk,2*jptra+3)
 #elif defined key_trc_pisces
-             CALL write2(nutwrs,xksi,jpk,2*jptra+2)
-
-             CALL write2(nutwrs,sedcal,jpk,2*jptra+3)
-             CALL write2(nutwrs,sedsil,jpk,2*jptra+4)
-             CALL write2(nutwrs,sedpoc,jpk,2*jptra+5)
+         CALL write2(nutwrs,xksi,jpk,2*jptra+2)
+
+         CALL write2(nutwrs,sedcal,jpk,2*jptra+3)
+         CALL write2(nutwrs,sedsil,jpk,2*jptra+4)
+         CALL write2(nutwrs,sedpoc,jpk,2*jptra+5)
+#elif defined key_cfc
+         DO jn=1,jptra
+            zq(:,:)=qint(:,:,jn)
+            CALL write2(nutwrs,zq,jpk,2*jptra+2)
+            zq(:,:)=qtr(:,:,jn)
+            CALL write2(nutwrs,zq,jpk,2*jptra+3)
+         ENDDO
 #endif
       ENDIF
Index: trunk/NEMO/TOP_SRC/trcsms.F90
===================================================================
--- trunk/NEMO/TOP_SRC/trcsms.F90	(revision 334)
+++ trunk/NEMO/TOP_SRC/trcsms.F90	(revision 335)
@@ -8,160 +8,132 @@
    !!===========================================================================================
    !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
    !!----------------------------------------------------------------------
+#if defined key_passivetrc   
+   !! * Modules used
+   !! ==============
+   USE oce_trc
+   USE trc
+   USE trcfreons
 
-      !! * Modules used
-      !! ==============
-      USE oce_trc
-      USE trc
-
-      IMPLICIT NONE
-      PRIVATE
+   IMPLICIT NONE
+   PRIVATE
 
    !! * Accessibility
    PUBLIC trc_sms
 
-#if defined key_passivetrc
-
 CONTAINS
 
-SUBROUTINE trc_sms( kt )
-   !!===========================================================================================
-   !!
-   !!                       ROUTINE trcsms
-   !!                     *****************
-   !!
-   !!  PURPOSE :
-   !!  ---------
-   !!          time loop of opa for passive tracer
-   !!
-   !!   METHOD :
-   !!   -------
-   !!      compute the well/spring evolution
-   !!
-   !!   INPUT :
-   !!   -----
-   !!      argument
-   !!              ktask           : task identificator
-   !!              kt              : time step
-   !!      COMMON
-   !!            all the COMMON defined in opa
-   !!
-   !!
-   !!   OUTPUT :			: no
-   !!   ------
-   !!
-   !!   WORKSPACE :
-   !!   ---------
-   !!
-   !!   EXTERNAL :
-   !!   --------
-   !!      trcbio, trcsed, trcopt for NPZD or LOBSTER1 models
-   !!
-   !!      h3cprg for HAMOC3 and P3ZD models
-   !!
-   !!
-   !!   History:
-   !!   --------
-   !!      original  : 96-11
-   !!      additions : 99-07 (M. Levy)
-   !!                  04-00 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD
-   !!                  12-00 (O. Aumont, E. Kestenare) add trcexp for instantaneous export 
-   !!   05-03 (O. Aumont and A. El Moussaoui) F90
-   !! -------------------------------------------------------------------------------------
+   SUBROUTINE trc_sms( kt )
+      !!===========================================================================================
+      !!
+      !!                       ROUTINE trcsms
+      !!                     *****************
+      !!
+      !!  PURPOSE :
+      !!  ---------
+      !!          time loop of opa for passive tracer
+      !!
+      !!   METHOD :
+      !!   -------
+      !!      compute the well/spring evolution
+      !!
+      !!   INPUT :
+      !!   -----
+      !!      argument
+      !!              ktask           : task identificator
+      !!              kt              : time step
+      !!      COMMON
+      !!            all the COMMON defined in opa
+      !!
+      !!
+      !!   OUTPUT :			: no
+      !!   ------
+      !!
+      !!   WORKSPACE :
+      !!   ---------
+      !!
+      !!   EXTERNAL :
+      !!   --------
+      !!      trcbio, trcsed, trcopt for NPZD or LOBSTER1 models
+      !!
+      !!      h3cprg for HAMOC3 and P3ZD models
+      !!
+      !!
+      !!   History:
+      !!   --------
+      !!      original  : 96-11
+      !!      additions : 99-07 (M. Levy)
+      !!                  04-00 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD
+      !!                  12-00 (O. Aumont, E. Kestenare) add trcexp for instantaneous export 
+      !!   05-03 (O. Aumont and A. El Moussaoui) F90
+      !! -------------------------------------------------------------------------------------
 
-   !! * Arguments
-   !! -----------
+      !! * Arguments
+      !! -----------
       INTEGER, INTENT( in ) ::   kt      ! ocean time-step index      
 
-   !! this ROUTINE is called only every ndttrc time step
-   !! --------------------------------------------------
+      !! this ROUTINE is called only every ndttrc time step
+      !! --------------------------------------------------
 
       IF ( MOD(kt,ndttrc) /= 0) RETURN
 
-   !! this first routines are parallelized on vertical slab
-   !! ------------------------------------------------------
+      !! this first routines are parallelized on vertical slab
+      !! ------------------------------------------------------
 
-#if defined key_trc_npzd || defined key_trc_lobster1
+#if defined key_trc_lobster1
 
-   !! tracers: optical model
-   !! ----------------------
+      !! tracers: optical model
+      !! ----------------------
 
-       CALL trcopt( kt)
+      CALL trcopt( kt)
 
-   !! tracers: biological model
-   !! -------------------------
+      !! tracers: biological model
+      !! -------------------------
 
-       CALL trcbio( kt)
+      CALL trcbio( kt)
 
-   !! tracers: sedimentation model
-   !! ----------------------------
+      !! tracers: sedimentation model
+      !! ----------------------------
 
-       CALL trcsed(kt)
-       CALL trcexp
+      CALL trcsed(kt)
+      CALL trcexp(kt)
 
-#elif defined key_trc_hamocc3
 
-   !! h3cprg: main PROGRAM for HAMOCC3 or P3ZD models
-   !! -----------------------------------------------
-       CALL h3cprg(kt)
 
 #elif defined key_trc_pisces
 
-   !! p4zprg: main PROGRAM for PISCES 
-   !! -------------------------------
-       CALL p4zprg(kt)
-#else
+      !! p4zprg: main PROGRAM for PISCES 
+      !! -------------------------------
+      CALL p4zprg(kt)
 
-    !! SMS to DO
+      !! SMS to DO
 
-#if defined key_cfc
+#elif defined key_cfc
 
-   !! CFC's code taken from K. Rodgers
+      !! CFC's code taken from K. Rodgers
 
-   !! This part is still experimental
-   !! -------------------------------
+      !! This part is still experimental
+      !! -------------------------------
 
-       CALL trcfreons(kt)
-
-#elif defined key_gosac
-
-   !! C14 tracer modeled according to the OCMIP protocol
-   !! This part has not been really tested in this configuration
-
-   !! Compute the alkalinity
-
-          CALL alkal(kt)
-
-   !! Compute the radioactive decay
-
-          CALL decay
-
-   !! Tracers: surface flux
-
-          CALL dicgasflux(kt)
+      CALL trc_freons(kt)
 
 #endif
 
-#endif
 
-#if defined key_trc_age
 
-   !! Age Tracer 
-   
-          CALL trcage(kt)
-#endif
-
-END SUBROUTINE trc_sms
+   END SUBROUTINE trc_sms
 
 #else
+   !!======================================================================
+   !!  Empty module : No passive tracer
+   !!======================================================================
+CONTAINS
 
-SUBROUTINE trc_sms( kt )
+   SUBROUTINE trc_sms( kt )
 
-! no passive tracers
+      ! no passive tracers
       INTEGER, INTENT( in ) ::   kt
       WRITE(*,*) 'trc_sms: You should not have seen this print! error?', kt
-END SUBROUTINE trc_sms
+   END SUBROUTINE trc_sms
 
 #endif 
