Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms.F90	(revision 763)
@@ -1,19 +1,19 @@
 MODULE par_sms
-   !!---------------------------------------------------------------------
-   !!
-   !!                         PARAMETER SMS
-   !!                       *******************************
-   !!
-   !!  purpose :
-   !!  ---------
-   !!     INCLUDE PARAMETER FILE for SMS  models
-   !!
-   !!
+   !!======================================================================
+   !!                         ***  MODULE par_sms  ***
+   !! TOP :   parameters of passive tracers
+   !!======================================================================
+   !! History :   1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90
    !!----------------------------------------------------------------------
-   !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+#if defined key_passivetrc
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
    !!----------------------------------------------------------------------
    USE par_trc_trp
+
    IMPLICIT NONE
 
@@ -32,13 +32,14 @@
 #elif defined key_cfc
    !!----------------------------------------------------------------------
-   !!   'key_cfc  '                                          CFC model                  
+   !!   'key_cfc  '                                      CFC chemical model                  
    !!----------------------------------------------------------------------
 #  include "par_sms_cfc.h90"
 
 #else
-   !!  purpose :
-   !!  ---------
-   !!     No SMS  models
+   !!----------------------------------------------------------------------
+   !!  Empty module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 #endif
 
+   !!======================================================================
 END MODULE par_sms
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms_cfc.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms_cfc.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms_cfc.h90	(revision 763)
@@ -5,14 +5,12 @@
 
    !!----------------------------------------------------------------------
-   !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
-   INTEGER , PARAMETER :: &
-      jpyear = 100,       & ! temporal parameter 
-      jphem  = 2            ! hemispheric parameter
+   INTEGER, PARAMETER ::   jpyear = 100   ! temporal parameter 
+   INTEGER, PARAMETER ::   jphem  = 2     ! hemispheric parameter
 
-   INTEGER, PARAMETER ::  & 
-      jp11 = 1,           & ! CFC-11
-      jp12 = 2              ! CFC-12
+   INTEGER, PARAMETER ::   jp11   = 1     ! CFC-11
+   INTEGER, PARAMETER ::   jp12   = 2     ! CFC-12
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms_lobster1.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms_lobster1.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms_lobster1.h90	(revision 763)
@@ -1,46 +1,27 @@
-!!---------------------------------------------------------------------
-!!
-!!                         PARAMETER passivetrc.lobster1
-!!                       ********************************
-!!
-!!  purpose :
-!!  ---------
-!!     INCLUDE PARAMETER FILE for passive tracer LOBSTER1 model
-!!
-!!  modifications:  
-!!  --------------
-!!     00-12 (E. Kestenare): 
-!!            assign a parameter to name individual tracers
-!!
-!! productive layer depth
-!! ----------------------
-!!       jpkb   : first vertical layers where biology is active
-!!       jpkbm1 : jpkb - 1
-!!
-!!----------------------------------------------------------------------
-!!  TOP 1.0,  LOCEAN-IPSL (2005)
-!! $Header$
-!! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
-!!----------------------------------------------------------------------
+   !!---------------------------------------------------------------------
+   !!                     ***  par_sms_lobster1.h90  ***  
+   !! TOP :   CFC Source Minus Sink parameter for LOBSTER
+   !!---------------------------------------------------------------------
+   !! History :    -   !  1999-06  (M. Levy)  original code
+   !!              -   !  2000-12  (E. Kestenare) assign a parameter to name individual tracers
+   !!             1.0  !  2005-03  (C. Ethe) F90
+   !!----------------------------------------------------------------------
 
-      INTEGER jpkb,jpkbm1
-      PARAMETER (jpkb = 12,jpkbm1 = 11)
-!!
-!! number of biological trends
-!! ---------------------------
-!!
-      INTEGER jpdiabio
-      PARAMETER (jpdiabio = 15)
-!!
-!!    NOW ASSIGN A PARAMETER TO NAME INDIVIDUAL TRACERS
-!!
-!!    JPDET : detritus (mmoleN/m3)
-!!    JPZOO : zooplancton concentration (mmoleN/m3)
-!!    JPPHY : phytoplancton concentration (mmoleN/m3)
-!!    JPNO3 : nitrate concentration (mmoleN/m3)
-!!    JPNH4 : ammonium concentration (mmoleN/m3)
-!!    JPDOM : dissolved organic matter (mmoleN/m3)
-!!
-      INTEGER jpdet,jpzoo,jpphy,jpno3,jpnh4,jpdom
-      PARAMETER (jpdet=1,jpzoo=2,jpphy=3,jpno3=4,jpnh4=5,jpdom=6)
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
+   INTEGER, PARAMETER ::   jpkb     = 12        !: top jk layers where biology is active
+   INTEGER, PARAMETER ::   jpkbm1   = jpkb - 1  !:
+
+   INTEGER, PARAMETER ::   jpdiabio = 15        !: number of biological trends
+      
+   INTEGER, PARAMETER ::   jpdet    = 1         !: detritus                    [mmoleN/m3]
+   INTEGER, PARAMETER ::   jpzoo    = 2         !: zooplancton concentration   [mmoleN/m3]
+   INTEGER, PARAMETER ::   jpphy    = 3         !: phytoplancton concentration [mmoleN/m3]
+   INTEGER, PARAMETER ::   jpno3    = 4         !: nitrate concentration       [mmoleN/m3]
+   INTEGER, PARAMETER ::   jpnh4    = 5         !: ammonium concentration      [mmoleN/m3]
+   INTEGER, PARAMETER ::   jpdom    = 6         !: dissolved organic matter    [mmoleN/m3]
+
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms_pisces.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms_pisces.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/par_sms_pisces.h90	(revision 763)
@@ -4,44 +4,55 @@
    !!======================================================================
 
-   INTEGER, PARAMETER ::  jpdiabio = 1
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
-   !! WARNING: BE CAREFUL ABOUT THE ORDER WHEN READING THE RESTART FILE
-   !!
-   INTEGER, PARAMETER :: &
-      jpdic = 1  ,  &  ! dissolved inoganic carbon concentration 
-      jptal = 2  ,  &  ! total alkalinity 
-      jpoxy = 3  ,  &  ! oxygen carbon concentration 
-      jpcal = 4  ,  &  ! calcite  concentration 
-      jppo4 = 5  ,  &  ! phosphate concentration 
-      jppoc = 6  ,  &  ! small particulate organic phosphate concentration
-      jpsil = 7  ,  &  ! silicate concentration
-      jpphy = 8  ,  &  ! phytoplancton concentration 
-      jpzoo = 9  ,  &  ! zooplancton concentration
-      jpdoc = 10 ,  &  ! dissolved organic carbon concentration 
-      jpdia = 11 ,  &  ! Diatoms Concentration
-      jpmes = 12 ,  &  ! Mesozooplankton Concentration
-      jpbsi = 13 ,  &  ! (big) Silicate Concentration
-      jpfer = 14 ,  &  ! Iron Concentration
+   INTEGER, PARAMETER ::   jpdiabio = 1   !: number of biological trends
+
+   ! WARNING: BE CAREFUL ABOUT THE ORDER WHEN READING THE RESTART FILE
+
+   INTEGER, PARAMETER ::   jpdic =  1     !: dissolved inoganic carbon concentration 
+   INTEGER, PARAMETER ::   jptal =  2     !: total alkalinity 
+   INTEGER, PARAMETER ::   jpoxy =  3     !: oxygen carbon concentration 
+   INTEGER, PARAMETER ::   jpcal =  4     !: calcite  concentration 
+   INTEGER, PARAMETER ::   jppo4 =  5     !: phosphate concentration 
+   INTEGER, PARAMETER ::   jppoc =  6     !: small particulate organic phosphate concentration
+   INTEGER, PARAMETER ::   jpsil =  7     !: silicate concentration
+   INTEGER, PARAMETER ::   jpphy =  8     !: phytoplancton concentration 
+   INTEGER, PARAMETER ::   jpzoo =  9     !: zooplancton concentration
+   INTEGER, PARAMETER ::   jpdoc = 10     !: dissolved organic carbon concentration 
+   INTEGER, PARAMETER ::   jpdia = 11     !: Diatoms Concentration
+   INTEGER, PARAMETER ::   jpmes = 12     !: Mesozooplankton Concentration
+   INTEGER, PARAMETER ::   jpbsi = 13     !: (big) Silicate Concentration
+   INTEGER, PARAMETER ::   jpfer = 14     !: Iron Concentration
 #if ! defined key_trc_kriest
-      jpbfe = 15 ,  &  ! Big iron particles Concentration
-      jpgoc = 16 ,  &  ! big particulate organic phosphate concentration
-      jpsfe = 17 ,  &  ! Small iron particles Concentration
-      jpdfe = 18 ,  &  ! Diatoms iron Concentration
-      jpdsi = 19 ,  &  ! Diatoms Silicate Concentration
-      jpnfe = 20 ,  &  ! Nano iron Concentration
-      jpnch = 21 ,  &  ! Nano Chlorophyll Concentration
-      jpdch = 22 ,  &  ! Diatoms Chlorophyll Concentration
-      jpno3 = 23 ,  &  ! Nitrates Concentration
-      jpnh4 = 24       ! Ammonium Concentration
+   !!----------------------------------------------------------------------
+   !!   Default                                             Standard PISCES
+   !!----------------------------------------------------------------------
+   INTEGER, PARAMETER ::   jpbfe = 15     !: Big iron particles Concentration
+   INTEGER, PARAMETER ::   jpgoc = 16     !: big particulate organic phosphate concentration
+   INTEGER, PARAMETER ::   jpsfe = 17     !: Small iron particles Concentration
+   INTEGER, PARAMETER ::   jpdfe = 18     !: Diatoms iron Concentration
+   INTEGER, PARAMETER ::   jpdsi = 19     !: Diatoms Silicate Concentration
+   INTEGER, PARAMETER ::   jpnfe = 20     !: Nano iron Concentration
+   INTEGER, PARAMETER ::   jpnch = 21     !: Nano Chlorophyll Concentration
+   INTEGER, PARAMETER ::   jpdch = 22     !: Diatoms Chlorophyll Concentration
+   INTEGER, PARAMETER ::   jpno3 = 23     !: Nitrates Concentration
+   INTEGER, PARAMETER ::   jpnh4 = 24     !: Ammonium Concentration
 #else
-      jpnum = 15 ,  &  ! Big iron particles Concentration
-      jpsfe = 16 ,  &  ! number of particulate organic phosphate concentration
-      jpdfe = 17 ,  &  ! Diatoms iron Concentration
-      jpdsi = 18 ,  &  ! Diatoms Silicate Concentration
-      jpnfe = 19 ,  &  ! Nano iron Concentration
-      jpnch = 20 ,  &  ! Nano Chlorophyll Concentration
-      jpdch = 21 ,  &  ! Diatoms Chlorophyll Concentration
-      jpno3 = 22 ,  &  ! Nitrates Concentration
-      jpnh4 = 23       ! Ammonium Concentration
+   !!----------------------------------------------------------------------
+   !!   'key_trc_kriest'                                    PISCES + kriest
+   !!----------------------------------------------------------------------
+   INTEGER, PARAMETER ::   jpnum = 15     !: Big iron particles Concentration
+   INTEGER, PARAMETER ::   jpsfe = 16     !: number of particulate organic phosphate concentration
+   INTEGER, PARAMETER ::   jpdfe = 17     !: Diatoms iron Concentration
+   INTEGER, PARAMETER ::   jpdsi = 18     !: Diatoms Silicate Concentration
+   INTEGER, PARAMETER ::   jpnfe = 19     !: Nano iron Concentration
+   INTEGER, PARAMETER ::   jpnch = 20     !: Nano Chlorophyll Concentration
+   INTEGER, PARAMETER ::   jpdch = 21     !: Diatoms Chlorophyll Concentration
+   INTEGER, PARAMETER ::   jpno3 = 22     !: Nitrates Concentration
+   INTEGER, PARAMETER ::   jpnh4 = 23     !: Ammonium Concentration
 #endif
 
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms.F90	(revision 763)
@@ -4,14 +4,15 @@
    !! passive tracers :   set the passive tracers variables
    !!======================================================================
-   !! History :
-   !!   9.0  !  04-03  (C. Ethe)  Free form and module
+   !! History :    -   !  2004-03  (C. Ethe)  Free form and module
    !!----------------------------------------------------------------------
-   !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
    !!----------------------------------------------------------------------
-   !! * Modules used
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 #if defined key_passivetrc
-
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
    USE par_oce
    USE par_trc
@@ -19,8 +20,7 @@
 
    IMPLICIT NONE
-
    PUBLIC
 
-#if defined key_trc_lobster1
+# if defined key_trc_lobster1
    !!----------------------------------------------------------------------
    !!   'key_trc_lobster1'                        LOBSTER1 biological model  
@@ -28,5 +28,5 @@
 #  include "sms_lobster1.h90"
 
-#elif defined key_trc_pisces
+# elif defined key_trc_pisces
    !!----------------------------------------------------------------------
    !!   'key_trc_pisces'                            PISCES biological model                  
@@ -34,17 +34,18 @@
 #  include "sms_pisces.h90"
 
-#elif defined key_cfc
+# elif defined key_cfc
    !!----------------------------------------------------------------------
-   !!   'key_cfc  '                                          CFC model                  
+   !!   'key_cfc  '                                      CFC chemical model                  
    !!----------------------------------------------------------------------
 #  include "sms_cfc.h90"
 
+# endif
+
+#else
+   !!----------------------------------------------------------------------
+   !!  Empty module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 #endif
 
-#else
    !!======================================================================
-   !!  Empty module : No passive tracer 
-   !!======================================================================
-#endif
-
 END MODULE sms
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms_cfc.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms_cfc.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms_cfc.h90	(revision 763)
@@ -1,32 +1,21 @@
-   !!---------------------------------------------------------------------
+   !!----------------------------------------------------------------------
    !!                     ***  sms_cfc.h90  ***  
-   !!                    CFC Source Minus Sink model
-   !!---------------------------------------------------------------------
+   !! TOP :   CFC Source Minus Sink valiables
+   !!----------------------------------------------------------------------
 
    !!----------------------------------------------------------------------
-   !!  TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
    !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
-    INTEGER, PUBLIC :: &
-       ndate_beg,     & ! initial calendar date (aammjj) for CFC
-       nyear_res,     & ! restoring time constant (year)
-       nyear_beg        ! initial year (aa) 
+   INTEGER , PUBLIC ::   ndate_beg    ! initial calendar date (aammjj) for CFC
+   INTEGER , PUBLIC ::   nyear_res    ! restoring time constant (year)
+   INTEGER , PUBLIC ::   nyear_beg    ! initial year (aa) 
    
-    REAL(wp), PUBLIC, DIMENSION(jpi,jpj)  ::  &
-       xphem            ! spatial interpolation factor for patm
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)             ::   xphem    ! spatial interpolation factor for patm
+   REAL(wp), PUBLIC, DIMENSION(jpyear,jphem, jptra) ::   p_cfc    ! partial hemispheric pressure for CFC          
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj      ,jptra) ::   pp_cfc   ! temporal interpolation of atmospheric concentrations 
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj      ,jptra) ::   qtr      ! input function
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj      ,jptra) ::   qint     ! flux function
 
-
-    REAL(wp), PUBLIC, DIMENSION(jpyear,jphem, jptra)  ::  &   
-       p_cfc            ! partial hemispheric pressure for CFC          
-
- 
-    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jptra) ::  &  
-       pp_cfc           ! temporal interpolation of atmospheric concentrations 
-
-
-    REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jptra) ::  &  
-       qtr,          & ! input function
-       qint            ! flux function
-
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms_lobster1.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms_lobster1.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms_lobster1.h90	(revision 763)
@@ -1,160 +1,117 @@
-!!--------------------------------------------------------------------
-!!
-!!                         COMMON passivetrc.lobster1.h
-!!                      *******************************
-!!
-!!  purpose :
-!!  ---------
-!!     INCLUDE COMMON FILE for LOBSTER1 biological model (IF key_trc_lobster1)
-!!
-!!  modifications :
-!!   -------------
-!!      original    : 99-09 (M. Levy) 
-!!      additions   : 00-12 (O. Aumont, E. Kestenare): 
-!!                           add sediment parameters
-!!
-!!---------------------------------------------------------------------
-!!  TOP 1.0 , LOCEAN-IPSL (2005) 
+   !!----------------------------------------------------------------------
+   !!                     ***  sms_lobster1.h90  ***  
+   !! TOP :   LOBSTER 1 Source Minus Sink valiables
+   !!----------------------------------------------------------------------
+   !! History :    -   !  1999-09 (M. Levy)  original code
+   !!              -   !  2000-12 (O. Aumont, E. Kestenare) add sediment 
+   !!             1.0  !  2005-10 (C. Ethe) F90
+   !!             1.0  !  2005-03  (A-S Kremeur) add fphylab, fzoolab, fdetlab, fdbod
+   !!              -   !  2005-06  (A-S Kremeur) add sedpocb, sedpocn, sedpoca
+   !!             2.0  !  2007-04  (C. Deltel, G. Madec) Free form and modules
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
    !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-!!---------------------------------------------------------------------
-!!
-!!
-!!----------------------------------------------------------------------
-!!
-!!  biological parameters
-!! --------------------------------------------
-!!
-!!      apmin     : minimum phytoplancton concentration (NAMELIST)
-!!      azmin     : minimum zooplancton concentration (NAMELIST)
-!!      anmin     : minimum nutrients concentration (NAMELIST)
-!!      admin     : minimum detritus concentration (NAMELIST)
-!!      redf      : redfield ratio c:n (NAMELIST)
-!!      reddom    : redfield ratio c:n for DOM
-!!      slopet    : van t hoff coefficient (NAMELIST)
-!!      toptp     : optimal photosynthesis temperature (NAMELIST)
-!!      aknut     : half-saturation nutrient (NAMELIST)
-!!      akno3     : half-saturation for nitrate (NAMELIST)
-!!      aknh4     : half-saturation for ammonium (NAMELIST)
-!!      psinut    : inhibition of nitrate uptake by ammonium (NAMELIST)
-!!      rgamma    : phytoplankton exudation fraction (NAMELIST)
-!!      toptgz    : optimal temperature for zooplankton growth (NAMELIST)
-!!      tmaxgz    : maximal temperature for zooplankton growth (NAMELIST) 
-!!      rgz       : widtht of zooplankton temperature FUNCTION (NAMELIST)
-!!      rppz      : zooplankton nominal preference for phytoplancton
-!!                  food, (NAMELIST)
-!!      taus      : maximum specific zooplankton grazing rate (NAMELIST)
-!!      aks       : half saturation constant for total zooplankton
-!! grazing (NAMELIST)
-!!      filmax    : maximum mass clearance rate for zooplankton (NAMELIST)
-!!      rpnaz     : non-assimilated phytoplankton by zooplancton (NAMELIST) 
-!!      rdnaz     : non-assimilated detritus by zooplankton (NAMELIST) 
-!!      eggzoo    : minimum for zooplankton concentration (NAMELIST)
-!!      tauzn     : zooplancton specific excretion rate (NAMELIST)
-!!      tmmaxp    : maximal phytoplancton mortality rate (NAMELIST)
-!!      tmminp    : minimal phytoplancton mortality rate (NAMELIST)
-!!      tmmaxz    : maximal zooplankton mortality rate (NAMELIST)
-!!      tmminz    : minimal zooplankton mortality rate (NAMELIST)
-!!      anumin    : nutrient threshold for phytoplankton mortality (NAMELIST)
-!!      afdmin    : food threshold for zooplankton mortality (NAMELIST)
-!!      taudn     : detrital breakdown rate (NAMELIST)
-!!      vsed      : sedimentation speed (NAMELIST)
-!!      tmumax    : maximal phytoplankton growth rate (NAMELIST)
-!!      aki       : light photosynthesis half saturation constant (NAMELIST)
-!!
-!!      tmaxr     : maximum coefficient for passive tracer damping (NAMELIST)
-!!      tminr     : minimum coefficient for passive tracer damping (NAMELIST)
-!!      remdmp()  : damping coefficient of passive tracers (depth dependant)
-!!      fdoml     : fraction of exsudation that goes to nh4 (should be labile dom)
-!!      taunn     : nitrification rate
-!!      taudomn   : slow remineralization rate of semi-labile dom to nh4
-!!      xhr       : coeff for Martin's remineralistion profile
-!!
-!!      added by asklod AS Kremeur 2005-03:
-!!      fphylab   : NH4 fraction of phytoplankton excretion
-!!      fzoolab   : NH4 fraction of zooplankton excretion
-!!      fdetlab   : NH4 fraction of detritus dissolution
-!!      fdbod     : zooplankton mortality fraction that goes to detritus
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
-      REAL apmin,azmin,anmin,admin,  &
-                    redf,reddom,slopet,toptp,aknut,psinut,akno3,aknh4,rcchl,  &
-                     rgamma,toptgz,tmaxgz,rgz,  &
-                     rppz,taus,aks,filmax,rpnaz,rdnaz,eggzoo,tauzn,  &
-                     tmmaxp,tmminp,tmmaxz,tmminz,anumin,afdmin,taudn,  &
-                     vsed,tmumax,aki,  &
-                     tmaxr,tminr,fdoml,taunn,taudomn,xhr,  &
-                     fphylab,fzoolab,fdetlab,fdbod
-      REAL remdmp(jpk,jptra)
+   !!  biological parameters
+   !! ----------------------
+   REAL(wp) ::   apmin    !: minimum phytoplancton concentration              (NAMELIST)
+   REAL(wp) ::   azmin    !: minimum zooplancton concentration                (NAMELIST)
+   REAL(wp) ::   anmin    !: minimum nutrients concentration                  (NAMELIST)
+   REAL(wp) ::   admin    !: minimum detritus concentration                   (NAMELIST)
+   REAL(wp) ::   redf     !: redfield ratio c:n                               (NAMELIST)
+   REAL(wp) ::   reddom   !: redfield ratio c:n for DOM                       
+   REAL(wp) ::   slopet   !: van t hoff coefficient                           (NAMELIST)
+   REAL(wp) ::   toptp    !: optimal photosynthesis temperature               (NAMELIST) 
+   REAL(wp) ::   aknut    !: half-saturation nutrient                         (NAMELIST)
+   REAL(wp) ::   psinut   !: inhibition of nitrate uptake by ammonium         (NAMELIST)
+   REAL(wp) ::   akno3    !: half-saturation for nitrate                      (NAMELIST)
+   REAL(wp) ::   aknh4    !: half-saturation for ammonium                     (NAMELIST)
+   REAL(wp) ::   rcchl    !: ???                                              
+   REAL(wp) ::   rgamma   !: phytoplankton exudation fraction                 (NAMELIST)
+   REAL(wp) ::   toptgz   !: optimal temperature for zooplankton growth       (NAMELIST)
+   REAL(wp) ::   tmaxgz   !: maximal temperature for zooplankton growth       (NAMELIST) 
+   REAL(wp) ::   rgz      !: widtht of zooplankton temperature FUNCTION       (NAMELIST)
+   REAL(wp) ::   rppz     !: zooplankton nominal preference for phytoplancton food (NAMELIST)
+   REAL(wp) ::   taus     !: maximum specific zooplankton grazing rate        (NAMELIST)
+   REAL(wp) ::   aks      !: half saturation constant for total zooplankton grazing (NAMELIST)
+   REAL(wp) ::   filmax   !: maximum mass clearance rate for zooplankton      (NAMELIST)
+   REAL(wp) ::   rpnaz    !: non-assimilated phytoplankton by zooplancton     (NAMELIST)
+   REAL(wp) ::   rdnaz    !: non-assimilated detritus by zooplankton          (NAMELIST) 
+   REAL(wp) ::   eggzoo   !: minimum for zooplankton concentration            (NAMELIST)
+   REAL(wp) ::   tauzn    !: zooplancton specific excretion rate              (NAMELIST)
+   REAL(wp) ::   tmmaxp   !: maximal phytoplancton mortality rate             (NAMELIST)
+   REAL(wp) ::   tmminp   !: minimal phytoplancton mortality rate             (NAMELIST)
+   REAL(wp) ::   tmmaxz   !: maximal zooplankton mortality rate               (NAMELIST)
+   REAL(wp) ::   tmminz   !: minimal zooplankton mortality rate               (NAMELIST)
+   REAL(wp) ::   anumin   !: nutrient threshold for phytoplankton mortality   (NAMELIST)
+   REAL(wp) ::   afdmin   !: food threshold for zooplankton mortality         (NAMELIST)
+   REAL(wp) ::   taudn    !: detrital breakdown rate                          (NAMELIST)
+   REAL(wp) ::   vsed     !: sedimentation speed                              (NAMELIST)
+   REAL(wp) ::   tmumax   !: maximal phytoplankton growth rate                (NAMELIST)
+   REAL(wp) ::   aki      !: light photosynthesis half saturation constant    (NAMELIST)
+   REAL(wp) ::   tmaxr    !: maximum coefficient for passive tracer damping   (NAMELIST)
+   REAL(wp) ::   tminr    !: minimum coefficient for passive tracer damping   (NAMELIST)
+   REAL(wp) ::   fdoml    !: fraction of exsudation that goes to nh4 (should be labile dom)
+   REAL(wp) ::   taunn    !: nitrification rate
+   REAL(wp) ::   taudomn  !: slow remineralization rate of semi-labile dom to nh4
+   REAL(wp) ::   xhr      !: coeff for Martin's remineralistion profile
+   REAL(wp) ::   fphylab  !: NH4 fraction of phytoplankton excretion
+   REAL(wp) ::   fzoolab  !: NH4 fraction of zooplankton excretion
+   REAL(wp) ::   fdetlab  !: NH4 fraction of detritus dissolution
+   REAL(wp) ::   fdbod    !: zooplankton mortality fraction that goes to detritus
 
-!!
-!!
-#    if defined key_trc_diabio
-!!
-!!----------------------------------------------------------------------
-!!
-!!  biological trends 
-!! ------------------------------------------------------------------
-!!
-!!      ctrbio    : biological trends name (NAMELIST)
-!!      ctrbil    : biological trends long name (NAMELIST)
-!!      ctrbiu    : biological trends unit (NAMELIST)
-!!      trbio()   : biological trends
-!!
-      CHARACTER*8 ctrbio(jpdiabio)
-      CHARACTER*20 ctrbiu(jpdiabio)
-      CHARACTER*80 ctrbil(jpdiabio)
-      REAL trbio(jpi,jpj,jpk,jpdiabio)
+   REAL(wp), DIMENSION(jpk,jptra) ::   remdmp   !: depth dependant damping coefficient of passive tracers 
+   
 
-!!
-!!    netcdf files and index COMMON biological trends files
-!!
-!!      nwritebio: time step frequency for biological outputs (NAMELIST)
-! asklod 10-2005: oubli de cette partie dans l update:
-!!      nitb     : id for additional array output FILE
-!!      ndepitb  : id for depth mesh
-!!      nhoritb  : id for horizontal mesh
-!!
-      INTEGER nwritebio,nitb,ndepitb,nhoritb
+# if defined key_trc_diabio
 
-#    endif 
+   !! Biological trends 
+   !! -----------------
+   CHARACTER(len=8),  DIMENSION(jpdiabio) ::   ctrbio   !: biological trends name      (NAMELIST)
+   CHARACTER(len=20), DIMENSION(jpdiabio) ::   ctrbiu   !: biological trends unit      (NAMELIST)
+   CHARACTER(len=80), DIMENSION(jpdiabio) ::   ctrbil   !: biological trends long name (NAMELIST)
+   REAL(wp), DIMENSION(jpi,jpj,jpk,jpdiabio) :: trbio   !: biological trends
 
-!!----------------------------------------------------------------------
-!!
-!!  optical parameters
-!! -----------------------------------
-!!
-!!      xze       : euphotic layer depth
-!!      xpar      : par (photosynthetic available radiation)
-!!      xkr0      : water coefficient absorption in red (NAMELIST)
-!!      xkg0      : water coefficient absorption in green (NAMELIST)
-!!      xkrp      : pigment coefficient absorption in red (NAMELIST)
-!!      xkgp      : pigment coefficient absorption in green (NAMELIST)
-!!      xlr       : exposant for pigment absorption in red (NAMELIST)
-!!      xlg       : exposant for pigment absorption in green (NAMELIST)
-!!      rpig      : chla/chla+phea ratio (NAMELIST)
-!!
-      REAL xkr0,xkg0,xkrp,xkgp,xlr,xlg,rpig
+   !! Netcdf output parameters
+   !! ------------------------
+   INTEGER ::   nwritebio   !: time step frequency for biological outputs (NAMELIST)
+   INTEGER ::   nitb        !:         id.         for additional array output file
+   INTEGER ::   ndepitb     !:         id.         for depth mesh
+   INTEGER ::   nhoritb     !:         id.         for horizontal mesh
 
-      REAL xze(jpi,jpj)
-      REAL xpar(jpi,jpj,jpk)
+# endif 
 
-!!----------------------------------------------------------------------
-!!
-!!  sediment parameters
-!! --------------------------------------
-!!
-!!      sedlam : time coefficient of POC remineralization in sediments
-!!      dmin3  : fraction of sinking POC released at each level
-!!      dminl  : fraction of sinking POC released in sediments
-!! asklod add sedpocb, sedpocn, sedpoca 17 06 2005
-!!      sedpocb : mass of POC in sediments
-!!      sedpocn : mass of POC in sediments
-!!      sedpoca : mass of POC in sediments
-!!      fbod   : rapid sinking particles
-!!
-!!
-      REAL sedlam,sedlostpoc
-      REAL dmin3(jpi,jpj,jpk), dminl(jpi,jpj)
-      REAL sedpoca(jpi,jpj),sedpocb(jpi,jpj),sedpocn(jpi,jpj)
-      REAL fbod(jpi,jpj),cmask(jpi,jpj),areacot
+   !! Optical parameters                                
+   !! ------------------                                
+   REAL(wp) ::   xkr0       !: water coefficient absorption in red      (NAMELIST)
+   REAL(wp) ::   xkg0       !: water coefficient absorption in green    (NAMELIST)
+   REAL(wp) ::   xkrp       !: pigment coefficient absorption in red    (NAMELIST)
+   REAL(wp) ::   xkgp       !: pigment coefficient absorption in green  (NAMELIST)
+   REAL(wp) ::   xlr        !: exposant for pigment absorption in red   (NAMELIST)
+   REAL(wp) ::   xlg        !: exposant for pigment absorption in green (NAMELIST)
+   REAL(wp) ::   rpig       !: chla/chla+phea ratio                     (NAMELIST)
+                                                        
+   INTEGER , DIMENSION(jpi,jpj)     ::   neln    !: number of levels in the euphotic layer
+   REAL(wp), DIMENSION(jpi,jpj)     ::   xze     !: euphotic layer depth
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   xpar    !: par (photosynthetic available radiation)
 
+   !! Sediment parameters                               
+   !! -------------------                               
+   REAL(wp) ::   sedlam       !: time coefficient of POC remineralization in sediments
+   REAL(wp) ::   sedlostpoc   !: ???
+   REAL(wp) ::   areacot      !: ???
+                                                        
+   REAL(wp), DIMENSION(jpi,jpj)     ::   dminl   !: fraction of sinking POC released in sediments
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   dmin3   !: fraction of sinking POC released at each level
+                                                        
+   REAL(wp), DIMENSION(jpi,jpj) ::   sedpocb     !: mass of POC in sediments
+   REAL(wp), DIMENSION(jpi,jpj) ::   sedpocn     !: mass of POC in sediments
+   REAL(wp), DIMENSION(jpi,jpj) ::   sedpoca     !: mass of POC in sediments
+                                                        
+   REAL(wp), DIMENSION(jpi,jpj) ::   fbod        !: rapid sinking particles
+   REAL(wp), DIMENSION(jpi,jpj) ::   cmask       !: ???
+
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms_pisces.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms_pisces.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/sms_pisces.h90	(revision 763)
@@ -1,249 +1,152 @@
-!!---------------------------------------------------------------------
-!!
-!!                         COMMON passivetrc.pisces.h
-!!                       ******************************
-!!
-!!  purpose :
-!!  ---------
-!!     INCLUDE COMMON FILE for PISCES biological model
-!!
-!!  modifications :
-!!   -------------
-!!      original    : 00-02 (O. Aumont)
-!!
-!!
-#if defined key_trc_pisces
-!!
-!!----------------------------------------------------------------------
-!!
-!! Variable for chemistry of the CO2 cycle
-!!
-!! ---------------------------------------------------------------------
-!!
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &
-         akb3, ak13, ak23, aksp, akw3, &
-         akp13, akp23, akp33, aksi3, aks3, akf3, &
-         hi, borat
+   !!----------------------------------------------------------------------
+   !!                     ***  sms_pisces.h90  ***  
+   !! TOP :   PISCES Source Minus Sink valiables
+   !!----------------------------------------------------------------------
+   !! History :   1.0  !  2000-02 (O. Aumont) original code
+   !!----------------------------------------------------------------------
 
-      REAL :: &
-         atcco2, atcox
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
-!!
-!!----------------------------------------------------------------------
-!!
-!!  Variable for chemistry of the CO2 cycle
-!!
-!! ---------------------------------------------------------------------
-!!
-      REAL(wp), DIMENSION(10)  :: &
-         devk1, devk2, devk3, devk4, devk5     
-   
-      REAL(wp) :: & 
-         akcc1, akcc2, akcc3, akcc4,akcc5, akcc6, akcc7, akcc8, akcc9 , &
-         bor1, bor2, c00, c01, c02, c03, c04, c05, c10, c11, &
-         c12, c13, c20, c21, c22, c23, cb0, cb1, cb2, cb3, &
-         cb4, cb5, cb6, cb7, cb8, cb9, cb10, cb11, c14, &
-         cw3, cw4, cw5, cw6, cw0, cw1, cw2, ox0, ox1, ox2, ox3, ox4,ox5, &
-         salchl, rgas, oxyco, ca0, ca1, ca2, ca3, ca4, ca5, ca6, &
-         cp10, cp11, cp12, cp13, cp14, cp15, cp16, cp20, cp21, &
-         cp22, cp23, cp24, cp25, cp26, cp30, cp31, cp32, cp33, &
-         cp34, cp35, cs10, cs11, cs12, cs13, cs14, cs15, cs16, &
-         cs17, cs18, cs19, cs20, cs21, &
-         st1, st2, ft1, ft2, ks0, ks1, ks2, ks3, ks4, ks5, &
-         ks6, ks7, ks8, ks9, ks10, ks11, ks12, kf0, kf1, &
-         kf2, kf3, kf4
+   !!----------------------------------------------------------------------
+   !! Variable for chemistry of the CO2 cycle
+   !! ---------------------------------------------------------------------
+   REAL(wp) ::   atcco2, atcox
+   !
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   akb3, ak13, ak23, aksp, akw3             !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   akp13, akp23, akp33, aksi3, aks3, akf3   !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   hi, borat                                !: ???
 
-      REAL(wp), DIMENSION(jpi,jpj,3) :: &
-         chemc
+   !!----------------------------------------------------------------------
+   !!  Variable for chemistry of the CO2 cycle
+   !! ---------------------------------------------------------------------
+   REAL(wp), DIMENSION(10) ::   devk1, devk2, devk3, devk4, devk5     
+   !
+   REAL(wp) ::   akcc1, akcc2, akcc3, akcc4,akcc5, akcc6, akcc7, akcc8, akcc9     !: ???
+   REAL(wp) ::   bor1, bor2, c00, c01, c02, c03, c04, c05, c10, c11               !: ???
+   REAL(wp) ::   c12, c13, c20, c21, c22, c23, cb0, cb1, cb2, cb3                 !: ???
+   REAL(wp) ::   cb4, cb5, cb6, cb7, cb8, cb9, cb10, cb11, c14                    !: ???
+   REAL(wp) ::   cw3, cw4, cw5, cw6, cw0, cw1, cw2, ox0, ox1, ox2, ox3, ox4,ox5   !: ???
+   REAL(wp) ::   salchl, rgas, oxyco, ca0, ca1, ca2, ca3, ca4, ca5, ca6           !: ???
+   REAL(wp) ::   cp10, cp11, cp12, cp13, cp14, cp15, cp16, cp20, cp21             !: ???
+   REAL(wp) ::   cp22, cp23, cp24, cp25, cp26, cp30, cp31, cp32, cp33             !: ???
+   REAL(wp) ::   cp34, cp35, cs10, cs11, cs12, cs13, cs14, cs15, cs16             !: ???
+   REAL(wp) ::   cs17, cs18, cs19, cs20, cs21                                     !: ???
+   REAL(wp) ::   st1, st2, ft1, ft2, ks0, ks1, ks2, ks3, ks4, ks5                 !: ???
+   REAL(wp) ::   ks6, ks7, ks8, ks9, ks10, ks11, ks12, kf0, kf1                   !: ???
+   REAL(wp) ::   kf2, kf3, kf4
+   !
+   REAL(wp), DIMENSION(jpi,jpj,3) ::   chemc   !: ???
 
-!!
-!!----------------------------------------------------------------------
-!!
-!!  Variable for chemistry of Fe and SIO3
-!!
-!! ---------------------------------------------------------------------
-!!
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &
-         sio3eq, fekeq
+   !!----------------------------------------------------------------------
+   !!  Variable for chemistry of Fe and SIO3
+   !! ---------------------------------------------------------------------
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   sio3eq   !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   fekeq    !: ???
 
-!!
-!!----------------------------------------------------------------------
-!!
-!!  Time variables
-!!
-!! ---------------------------------------------------------------------
-!!
-
-      INTEGER :: &
-         iabsyr, nrdttrc, ndayflxtr
-
-      REAL(wp) :: &
-         tspyr, absyr, xtvit , &
-         rfact, rfactr, rfact2, rfact2r
+   !!----------------------------------------------------------------------
+   !!  Time variables
+   !! ---------------------------------------------------------------------
+   INTEGER  ::   iabsyr, nrdttrc, ndayflxtr       !: ???
+   REAL(wp) ::   tspyr, absyr, xtvit              !: ???
+   REAL(wp) ::   rfact, rfactr, rfact2, rfact2r   !: ???
 
 
-!!
-!!----------------------------------------------------------------------
-!!
-!!  Gas exchange
-!!
-!! ---------------------------------------------------------------------
-!!
-      REAL(wp), DIMENSION(jpi,jpj) :: & 
-         strn
-!!---------------------------------------
-!!
-!!  Biological parameters 
-!!
-!! --------------------------------------
-!! 
-      INTEGER :: &
-         jkopt
+   !!----------------------------------------------------------------------
+   !!  Gas exchange
+   !! ---------------------------------------------------------------------
+   REAL(wp), DIMENSION(jpi,jpj) ::   strn         !: ???
+   
+   !!---------------------------------------
+   !!  Biological parameters 
+   !! --------------------------------------
+   INTEGER ::   jkopt    !: ???
+   !
+   REAL(wp) ::   caco3r, kdca, nca, part, rno3, o2ut, po4r               !: ???
+   REAL(wp) ::   sco2, dispo0, conc0,sumdepsi,rivalkinput,sedfeinput     !: ???
+   REAL(wp) ::   calcon, rivpo4input,nitdepinput,oxymin,spocri           !: ???
+   REAL(wp) ::   nitrif,rdenit,o2nit,concnnh4,concdnh4                   !: ???
+   REAL(wp) ::   pislope,excret,wsbio,resrat,mprat,wchl,wchld            !: ???
+   REAL(wp) ::   mzrat,grazrat,xprefc,xprefp,unass,xkgraz,xkmort         !: ???
+   REAL(wp) ::   xksi1,xksi2,sicmax,xremik,xremip,xkdoc1                 !: ???
+   REAL(wp) ::   xkdoc2,grosip,resrat2,excret2,mprat2,mzrat2,xprefz      !: ???
+   REAL(wp) ::   xkgraz2,grazrat2,xlam1,conc1,conc2,conc3                !: ???
+   REAL(wp) ::   unass2,xprefpoc,epsher,epsher2,pislope2,mpratm          !: ???
+   REAL(wp) ::   sigma1, sigma2, zprefc, zprefp, zprefd, wchl2, ferat3   !: ???
+   REAL(wp) ::   xsirem, fecnm, fecdm, chlcnm, chlcdm                    !: ???
 
-      REAL(wp) :: &
-         caco3r, kdca, nca, part, rno3, o2ut, po4r,  &
-         sco2, dispo0, conc0,sumdepsi,rivalkinput,sedfeinput, &
-         calcon, rivpo4input,nitdepinput,oxymin,spocri, &
-         nitrif,rdenit,o2nit,concnnh4,concdnh4, &
-         pislope,excret,wsbio,resrat,mprat,wchl,wchld, &
-         mzrat,grazrat,xprefc,xprefp,unass,xkgraz,xkmort, &
-         xksi1,xksi2,sicmax,xremik,xremip,xkdoc1, &
-         xkdoc2,grosip,resrat2,excret2,mprat2,mzrat2,xprefz, &
-         xkgraz2,grazrat2,xlam1,conc1,conc2,conc3, &
-         unass2,xprefpoc,epsher,epsher2,pislope2,mpratm, &
-         sigma1, sigma2, zprefc, zprefp, zprefd, wchl2, ferat3, &
-         xsirem, fecnm, fecdm, chlcnm, chlcdm
+   !!---------------------------------------------
+   !!  Biological fluxes for light
+   !!---------------------------------------------
+   REAL(wp), DIMENSION(3,61)        ::   xkrgb                 !: ???
+   REAL(wp), DIMENSION(jpi,jpj)     ::   zmeu                  !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   etot, etot3, emoy     !: ???
 
+!!----------------------------------------------------------
+!!  Biological fluxes for primary production
+!!----------------------------------------------------------
+   REAL(wp), DIMENSION(jpi,jpj) ::   xksimax, xksi
+   !
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   prmax, tgfunc, tgfunc2                       !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   prcaca, prorca, prorca2, prorca3             !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   prorca4, prorca5, prorca6, prorca7           !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   pronew, pronew2, proreg, proreg2             !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   xnanono3, xdiatno3, xnanonh4, xdiatnh4       !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   xlimphy, xlimdia, concdfe, concnfe, znegtr   !: ???
 
+   !!------------------------------------------
+   !! Sinks for phytoplankton
+   !!------------------------------------------
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   tortp, tortnf, tortnch            !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   respp, respp2, respnch, respdch   !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   tortp2, tortdf, tortdch, tortds   !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   respds, respdf, respnf            !: ???
 
-!!
-!!---------------------------------------------
-!!
-!!  Biological fluxes for light
-!!
-!!---------------------------------------------
-!!
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &
-         etot, etot3, emoy
+   !!------------------------------------
+   !!  SMS for zooplankton
+   !!-------------------------------------
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   respz, tortz, grazp, grazpf                   !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   grazpch, grazm, grazmf, grazsd                !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   grazsf, grazss, grazsch, grarem               !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   grafer,respz2,tortz2,grazd, grazz,grazn       !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   grazpoc,graznf, graznch, grazs, grazf         !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   grazdch, grazpof, grarem2, grafer2, grapoc2   !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   grapoc, grazffe, grazfff                      !: ???
 
-      REAL(wp), DIMENSION(jpi,jpj) :: &
-         zmeu
+   !!---------------------------------------------
+   !!  SMS for the organic matter
+   !!---------------------------------------------
+   REAL(wp) ::   wsbio2
+   !
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   xagg, xaggfe, zdiss, xaggdoc, xaggdfe, xbactfer   !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   xscave, olimi, orem, orem2, ofer, ofer2           !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   osil, xaggdoc2, nitrfac, xlimbac                  !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   wsbio4, wsbio3, wscal                             !: ???
 
-      REAL(wp), DIMENSION(3,61) :: & 
-         xkrgb
-
-
-!!
-!!----------------------------------------------------------
-!!
-!!  Biological fluxes for primary production
-!!
-!!----------------------------------------------------------
-!!
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &
-         prmax, tgfunc, tgfunc2, &
-         prcaca, prorca, prorca2, prorca3, &
-         prorca4, prorca5, prorca6, prorca7, &
-         pronew, pronew2, proreg, proreg2, &
-         xnanono3, xdiatno3, xnanonh4, xdiatnh4, &
-         xlimphy, xlimdia, concdfe, concnfe, znegtr
-
-      REAL(wp), DIMENSION(jpi,jpj) :: &      
-         xksimax, xksi
-
-
-
-!!
-!!------------------------------------------
-!!
-!! Sinks for phytoplankton
-!!
-!!------------------------------------------
-!!
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &      
-         tortp, tortnf, tortnch, &
-         respp, respp2, respnch, respdch, &
-         tortp2, tortdf, tortdch, tortds, &
-         respds, respdf, respnf
-
-
-!!
-!!------------------------------------
-!!
-!!  SMS for zooplankton
-!!
-!!-------------------------------------
-!!
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &   
-         respz, tortz, grazp, grazpf, &
-         grazpch, grazm, grazmf, grazsd, &
-         grazsf, grazss, grazsch, grarem, &
-         grafer,respz2,tortz2,grazd, grazz,grazn, &
-         grazpoc,graznf, graznch, grazs, grazf, &
-         grazdch, grazpof, grarem2, grafer2, grapoc2, &
-         grapoc, grazffe, grazfff
-
-
-!!
-!!---------------------------------------------
-!!
-!!  SMS for the organic matter
-!!
-!!---------------------------------------------
-!!
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &   
-         xagg, xaggfe, zdiss, xaggdoc, xaggdfe, xbactfer, &
-         xscave, olimi, orem, orem2, ofer, ofer2, &
-         osil, xaggdoc2, nitrfac, xlimbac, & 
-         wsbio4, wsbio3, wscal
-
-      REAL(wp) :: &
-         wsbio2
-
-
- 
-!!
-!!---------------------------------------------------------
-!!
-!! External sources of nutrients in ocean
-!!
-!!---------------------------------------------------------
-!!
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: &         
-         onitr, denitr, ironsed
-
-      REAL(wp), DIMENSION(jpi,jpj) :: & 
-         dust, cotdep, nitdep, rivinp
-
-      REAL(wp), DIMENSION(jpi,jpj,12) ::  &  
-         dustmo
-
-      REAL(wp) :: &
-         areacot
-
-      LOGICAL :: &
-         bdustfer, briver, bndepo, bsedinput
-
-
+   !!---------------------------------------------------------
+   !! External sources of nutrients in ocean
+   !!---------------------------------------------------------
+   LOGICAL ::   bdustfer, briver, bndepo, bsedinput   !: ???
+   !
+   REAL(wp) ::   areacot                              !: ???
+   !
+   REAL(wp), DIMENSION(jpi,jpj)     ::   dust, cotdep, nitdep, rivinp   !: ???
+   REAL(wp), DIMENSION(jpi,jpj,12)  ::   dustmo                         !: ???
+   REAL(wp), DIMENSION(jpi,jpj,jpk) ::   onitr, denitr, ironsed         !: ???
 
 #if defined key_trc_kriest
-!!
-!!---------------------------------------------------------
-!!
-!!  Kriest parameter for aggregation
-!!
-!!---------------------------------------------------------
-!!
-      REAL(wp) :: &
-         xkr_eta, xkr_zeta, xkr_sfact, xkr_stick,  &
-         xkr_mass_min, xkr_mass_max, xkr_massp, xkr_frac, &
-         xkr_dnano, xkr_ddiat, xkr_dmeso, xkr_daggr, &
-         xkr_nnano, xkr_ndiat, xkr_nmeso, xkr_naggr, &
-         xkr_wsbio_min, xkr_wsbio_max
-      
-      REAL(wp), DIMENSION(jpk) :: &
-         xnumm
+   !!---------------------------------------------------------
+   !!  Kriest parameter for aggregation
+   !!---------------------------------------------------------
+   REAL(wp) ::   xkr_eta, xkr_zeta, xkr_sfact, xkr_stick            !: ???
+   REAL(wp) ::   xkr_mass_min, xkr_mass_max, xkr_massp, xkr_frac    !: ???
+   REAL(wp) ::   xkr_dnano, xkr_ddiat, xkr_dmeso, xkr_daggr         !: ???
+   REAL(wp) ::   xkr_nnano, xkr_ndiat, xkr_nmeso, xkr_naggr         !: ???
+   REAL(wp) ::   xkr_wsbio_min, xkr_wsbio_max
+   !  
+   REAL(wp), DIMENSION(jpk) ::   xnumm      !: ???
 #endif
 
-#endif
-
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcctl.cfc.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcctl.cfc.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcctl.cfc.h90	(revision 763)
@@ -1,9 +1,15 @@
-! $Id$
-!!!
-!!! Modifications:
-!!! --------------
-!!!    05-10 (C. Ethe): 
-!!!           assign a parameter to name individual tracers
-!!!
+   !!======================================================================
+   !!                         ***  trcctl.cfc.h90  ***
+   !! TOP :   Control of CFC chemical model
+   !!======================================================================
+   !!----------------------------------------------------------------------
+   !! History :   1.0  !  2005-10 (C. Ethe) assign a parameter to name individual tracers
+   !!----------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
 
       IF(lwp) THEN
@@ -12,9 +18,8 @@
       ENDIF
 
-! Check number of tracers
-! -----------------------
-     
-      IF (jptra .GT. 2) THEN 
-          IF (lwp) THEN 
+      ! Check number of tracers
+      ! -----------------------   
+      IF( jptra > 2) THEN 
+          IF(lwp) THEN 
               WRITE (numout,*) ' ===>>>> : w a r n i n g '
               WRITE (numout,*) ' =======   ============= '
@@ -25,35 +30,35 @@
       END IF 
 
-! Check tracer names
-! ------------------
-      IF ( jptra == 1 ) THEN
+      ! Check tracer names
+      ! ------------------
+      IF( jptra == 1 ) THEN
          IF ( jp11 == 1 ) THEN
             IF ( ctrcnm(jp11) /= 'CFC11') THEN
-               ctrcnm(jp11)='CFC11'
-               ctrcnl(jp11)='Chlorofuorocarbone 11 concentration'
+               ctrcnm(jp11) = 'CFC11'
+               ctrcnl(jp11) = 'Chlorofuorocarbone 11 concentration'
             ENDIF
          ENDIF
-         IF ( jp12 == 1 ) THEN
+         IF( jp12 == 1 ) THEN
             IF ( ctrcnm(jp12) /= 'CFC12') THEN
-               ctrcnm(jp12)='CFC12'
-               ctrcnl(jp12)='Chlorofuorocarbone 12 concentration'
+               ctrcnm(jp12) = 'CFC12'
+               ctrcnl(jp12) = 'Chlorofuorocarbone 12 concentration'
             ENDIF
          ENDIF
       ENDIF
 
-      IF ( jptra == 2 ) THEN
+      IF( jptra == 2 ) THEN
          IF ( ctrcnm(jp11) /= 'CFC11' .OR. ctrcnm(jp12) /= 'CFC12' ) THEN 
-            ctrcnm(jp11)='CFC11'
-            ctrcnl(jp11)='Chlorofuorocarbone 11 concentration'
-            ctrcnm(jp12)='CFC12'
-            ctrcnl(jp12)='Chlorofuorocarbone 12 concentration' 
+            ctrcnm(jp11) = 'CFC11'
+            ctrcnl(jp11) = 'Chlorofuorocarbone 11 concentration'
+            ctrcnm(jp12) = 'CFC12'
+            ctrcnl(jp12) = 'Chlorofuorocarbone 12 concentration' 
          ENDIF
       ENDIF
 
-      IF (lwp) THEN
+      IF(lwp) THEN
          WRITE (numout,*) ' ===>>>> : w a r n i n g '
          WRITE (numout,*) ' =======   ============= '
          WRITE (numout,*) ' we force tracer names'
-         DO jn=1,jptra
+         DO jn = 1, jptra
             WRITE(numout,*) ' tracer nb: ',jn,' name = ',ctrcnm(jn), ctrcnl(jn)
          END DO
@@ -62,16 +67,16 @@
 
 
-! Check tracer units
-
-      DO jn=1,jptra
-        IF (ctrcun(jn) /= 'mole/m3') THEN
-            ctrcun(jn)='mole/m3'
-            IF (lwp) THEN
-                WRITE (numout,*) ' ===>>>> : w a r n i n g '
-                WRITE (numout,*) ' =======   ============= '
-                WRITE (numout,*) ' we force tracer unit'
-                WRITE(numout,*) ' tracer  ',ctrcnm(jn), 'UNIT= ',ctrcun(jn)
-                WRITE(numout,*) ' '
+      ! Check tracer units
+      ! ------------------
+      DO jn = 1, jptra
+        IF( ctrcun(jn) /= 'mole/m3' ) THEN
+            ctrcun(jn) = 'mole/m3'
+            IF(lwp) THEN
+               WRITE (numout,*) ' ===>>>> : w a r n i n g '
+               WRITE (numout,*) ' =======   ============= '
+               WRITE (numout,*) ' we force tracer unit'
+               WRITE(numout,*) ' tracer  ',ctrcnm(jn), 'UNIT= ',ctrcun(jn)
+               WRITE(numout,*) ' '
             ENDIF 
-        ENDIF 
+         ENDIF 
       END DO              
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcctl.lobster1.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcctl.lobster1.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcctl.lobster1.h90	(revision 763)
@@ -1,22 +1,20 @@
-!!----------------------------------------------------------------------
-!!  TOP 1.0,  LOCEAN-IPSL (2005)
-!! $Header$
-!! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
-!!----------------------------------------------------------------------
-!!!
-!!! Modifications:
-!!! --------------
-!!!    00-12 (E. Kestenare): 
-!!!           assign a parameter to name individual tracers
-!!!
+   !!======================================================================
+   !!                         ***  trcctl.lobster1.h90  ***
+   !! TOP :   Control of LOBSTER 1 biological model
+   !!======================================================================
+   !!----------------------------------------------------------------------
+   !! History :   1.0  !  2000-12 (E. Kestenare) assign a parameter to name individual tracers
+   !!----------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
-#if defined key_trc_lobster1
-      IF(lwp) THEN
-          WRITE(numout,*) ' use LOBSTER1 biological model '
-          WRITE(numout,*) ' '
-      ENDIF
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' use LOBSTER1 biological model '
 
-! Check number of tracers
-! -----------------------
+      ! Check number of tracers
+      ! -----------------------
       IF (jptra /= 6) THEN 
           IF (lwp) THEN 
@@ -30,51 +28,48 @@
       END IF 
 
-! Check tracer names
-! ------------------
-      IF (    ctrcnm(jpdet) /= 'DET' .OR. ctrcnm(jpzoo) /= 'ZOO'     &
-         & .OR. ctrcnm(jpphy) /= 'PHY' .OR. ctrcnm(jpno3) /= 'NO3'   &
-         & .OR. ctrcnm(jpnh4) /= 'NH4' .OR. ctrcnm(jpdom) /= 'DOM'   & 
-         & .OR. ctrcnl(jpdet) /= 'Detritus'                          &
-         & .OR. ctrcnl(jpzoo) /= 'Zooplankton concentration'         &
-         & .OR. ctrcnl(jpphy) /= 'Phytoplankton concentration'       &
-         & .OR. ctrcnl(jpno3) /= 'Nitrate concentration'             &
-         & .OR. ctrcnl(jpnh4) /= 'Ammonium concentration'            &
-         & .OR. ctrcnl(jpdom) /= 'Dissolved organic matter' ) THEN 
-          ctrcnm(jpdet)='DET'
-          ctrcnl(jpdet)='Detritus'
-          ctrcnm(jpzoo)='ZOO'
-          ctrcnl(jpzoo)='Zooplankton concentration'
-          ctrcnm(jpphy)='PHY'
-          ctrcnl(jpphy)='Phytoplankton concentration'
-          ctrcnm(jpno3)='NO3'
-          ctrcnl(jpno3)='Nitrate concentration'
-          ctrcnm(jpnh4)='NH4'
-          ctrcnl(jpnh4)='Ammonium concentration'
-          ctrcnm(jpdom)='DOM'
-          ctrcnl(jpdom)='Dissolved organic matter'          
-          IF (lwp) THEN
-              WRITE (numout,*) ' ===>>>> : w a r n i n g '
-              WRITE (numout,*) ' =======   ============= '
-              WRITE (numout,*) ' we force tracer names'
-              DO jn=1,jptra
-                WRITE(numout,*) ' tracer nb: ',jn,' name = ',ctrcnm(jn), ctrcnl(jn)
-              END DO
-              WRITE(numout,*) ' '
-          ENDIF 
+      ! Check tracer names
+      ! ------------------
+      IF(   ctrcnm(jpdet) /= 'DET' .OR. ctrcnm(jpzoo) /= 'ZOO' .OR.   &
+         &  ctrcnm(jpphy) /= 'PHY' .OR. ctrcnm(jpno3) /= 'NO3' .OR.   &
+         &  ctrcnm(jpnh4) /= 'NH4' .OR. ctrcnm(jpdom) /= 'DOM' .OR.   & 
+         &  ctrcnl(jpdet) /= 'Detritus'                        .OR.   &
+         &  ctrcnl(jpzoo) /= 'Zooplankton concentration'       .OR.   &
+         &  ctrcnl(jpphy) /= 'Phytoplankton concentration'     .OR.   &
+         &  ctrcnl(jpno3) /= 'Nitrate concentration'           .OR.   &
+         &  ctrcnl(jpnh4) /= 'Ammonium concentration'          .OR.   &
+         &  ctrcnl(jpdom) /= 'Dissolved organic matter' ) THEN 
+         ctrcnm(jpdet)='DET'
+         ctrcnl(jpdet)='Detritus'
+         ctrcnm(jpzoo)='ZOO'
+         ctrcnl(jpzoo)='Zooplankton concentration'
+         ctrcnm(jpphy)='PHY'
+         ctrcnl(jpphy)='Phytoplankton concentration'
+         ctrcnm(jpno3)='NO3'
+         ctrcnl(jpno3)='Nitrate concentration'
+         ctrcnm(jpnh4)='NH4'
+         ctrcnl(jpnh4)='Ammonium concentration'
+         ctrcnm(jpdom)='DOM'
+         ctrcnl(jpdom)='Dissolved organic matter'          
+         IF(lwp) THEN
+            WRITE (numout,*) ' ===>>>> : w a r n i n g '
+            WRITE (numout,*) ' =======   ============= '
+            WRITE (numout,*) ' we force tracer names'
+            DO jn = 1, jptra
+               WRITE(numout,*) ' tracer nb: ',jn,' name = ',ctrcnm(jn), ctrcnl(jn)
+            END DO
+            WRITE(numout,*) ' '
+         ENDIF 
       ENDIF 
 
-! Check tracer units
-
-      DO jn=1,jptra
-        IF (ctrcun(jn) /= 'mmole-N/m3') THEN
+      ! Check tracer units
+      DO jn = 1, jptra
+         IF( ctrcun(jn) /= 'mmole-N/m3') THEN
             ctrcun(jn)='mmole-N/m3'
-            IF (lwp) THEN
-                WRITE (numout,*) ' ===>>>> : w a r n i n g '
-                WRITE (numout,*) ' =======   ============= '
-                WRITE (numout,*) ' we force tracer unit'
-                WRITE(numout,*) ' tracer  ',ctrcnm(jn), 'UNIT= ',ctrcun(jn)
-                WRITE(numout,*) ' '
+            IF(lwp) THEN
+               WRITE (numout,*) ' ===>>>> : w a r n i n g '
+               WRITE (numout,*) ' =======   ============= '
+               WRITE (numout,*) ' we force tracer unit'
+               WRITE(numout,*) ' tracer  ',ctrcnm(jn), 'UNIT= ',ctrcun(jn)
             ENDIF 
-        ENDIF 
+         ENDIF 
       END DO              
-#endif
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcctl.pisces.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcctl.pisces.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcctl.pisces.h90	(revision 763)
@@ -1,19 +1,24 @@
+   !!======================================================================
+   !!                         ***  trcctl.cfc.h90  ***
+   !! TOP :   Control of CFC chemical model
+   !!======================================================================
+   !!----------------------------------------------------------------------
+   !! History :   1.0  !  2005-10 (C. Ethe) assign a parameter to name individual tracers
+   !!----------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
-   !!----------------------------------------------------------------------
-   !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-#if defined key_trc_pisces
+      IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) ' use PISCES biological model '
-      IF(lwp) WRITE(numout,*) ' '
 
    ! Check number of tracers
    ! -----------------------
-
 #if  defined key_trc_kriest
-      IF (jptra /= 23) THEN 
+      IF( jptra /= 23) THEN 
 #else
-      IF (jptra /= 24) THEN
+      IF( jptra /= 24) THEN
 #endif
           IF (lwp) THEN 
@@ -26,3 +31,3 @@
           STOP 'TRC_CTL'
       END IF 
-#endif
+      
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcfreons.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcfreons.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcfreons.F90	(revision 763)
@@ -1,12 +1,17 @@
 MODULE trcfreons
-   !!==============================================================
-   !!                  ***  MODULE trcfreons  ***
-   !!  Passive tracer : CFC main model
-   !!==============================================================
+   !!======================================================================
+   !!                      ***  MODULE trcfreons  ***
+   !! TOP : CFC main model
+   !!======================================================================
+   !! History :    -   !  1999-10  (JC. Dutay)  original code
+   !!             1.0  !  2004-03 (C. Ethe) free form + modularity
+   !!----------------------------------------------------------------------
 #if defined key_cfc
-   !!--------------------------------------------------------------
-   !!   'key_cfc'                                         CFC model
-   !!--------------------------------------------------------------
-   !! * Modules used   
+   !!----------------------------------------------------------------------
+   !!   'key_cfc'                                        CFC chemical model
+   !!----------------------------------------------------------------------
+   !!   trc_freons     :  compute and add CFC suface forcing to CFC trends
+   !!   trc_freons_cst :  sets constants for CFC surface forcing computation
+   !!----------------------------------------------------------------------
    USE daymod
    USE sms
@@ -14,32 +19,25 @@
    USE trc
 
-
    IMPLICIT NONE
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC trc_freons        
-
-   !! * Module variables
-   REAL(wp), DIMENSION(jptra) :: & ! coefficient for solubility of CFC11 in  mol/l/atm
-      soa1, soa2, soa3, soa4, &
-      sob1, sob2, sob3
-
-   REAL(wp), DIMENSION(jptra) :: & ! coefficients for schmidt number in degre Celcius
-      sca1, sca2, sca3, sca4
-
-   REAL(wp) ::              & ! coefficients for conversion
-      xconv1 = 1.0       ,  & ! conversion from to 
-      xconv2 = 0.01/3600.,  & ! conversion from cm/h to m/s: 
-      xconv3 = 1.0e+3    ,  & ! conversion from mol/l/atm to mol/m3/atm
-      xconv4 = 1.0e-12        ! conversion from mol/m3/atm to mol/m3/pptv 
+   PUBLIC   trc_freons       ! called in ???    
+
+   REAL(wp), DIMENSION(jptra) ::   soa1, soa2, soa3, soa4   ! coefficient for solubility of CFC [mol/l/atm]
+   REAL(wp), DIMENSION(jptra) ::   sob1, sob2, sob3         !    "               "
+   REAL(wp), DIMENSION(jptra) ::   sca1, sca2, sca3, sca4   ! coefficients for schmidt number in degre Celcius
+      
+   !                          ! coefficients for conversion
+   REAL(wp) ::   xconv1 = 1.0          ! conversion from to 
+   REAL(wp) ::   xconv2 = 0.01/3600.   ! conversion from cm/h to m/s: 
+   REAL(wp) ::   xconv3 = 1.0e+3       ! conversion from mol/l/atm to mol/m3/atm
+   REAL(wp) ::   xconv4 = 1.0e-12      ! conversion from mol/m3/atm to mol/m3/pptv 
 
    !! * Substitutions
 #  include "passivetrc_substitute.h90"
-
-   !!----------------------------------------------------------------------
-   !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -62,38 +60,20 @@
       !!          - the input function is in pico-mol/m3/s and the
       !!            freons concentration in pico-mol/m3
-      !!
-      !! History :
-      !!   8.1  !  99-10  (JC. Dutay)  original code
-      !!   9.0  !  04-03  (C. Ethe)  free form + modularity
       !!----------------------------------------------------------------------
-      !! * Arguments
       INTEGER, INTENT( in ) ::   kt    ! ocean time-step index
-
-      !! * Local declarations
-      INTEGER ::  &
-         ji, jj, jn, jm
-
-      INTEGER ::   &
-         iyear_beg, iyear_end, &
-         imonth, im1, im2
-
-      REAL(wp) :: &
-         ztap, zdtap, &
-         zt1, zt2, zt3, zv2
-
-      REAL(wp), DIMENSION(jphem,jptra)   ::  &   
-         zpatm       ! atmospheric function
-
-      REAL(wp) ::  & 
-         zsol,     & ! solubility
-         zsch        ! schmidt number 
-
+      !!
+      INTEGER ::   ji, jj, jn, jm
+      INTEGER ::   iyear_beg, iyear_end
+      INTEGER ::   imonth, im1, im2
+
+      REAL(wp) ::   ztap, zdtap        
+      REAL(wp) ::   zt1, zt2, zt3, zv2
+      REAL(wp) ::   zsol   ! solubility
+      REAL(wp) ::   zsch   ! schmidt number 
       
-      REAL(wp), DIMENSION(jpi,jpj,jptra)   ::  & 
-         zca_cfc,  & ! concentration
-         zak_cfc     ! transfert coefficients
-
+      REAL(wp), DIMENSION(jphem,jptra) ::   zpatm       ! atmospheric function
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   zca_cfc   ! concentration
+      REAL(wp), DIMENSION(jpi,jpj,jptra) ::   zak_cfc   ! transfert coefficients
       !!----------------------------------------------------------------------
-
 
       IF( kt == nittrc000 )   CALL trc_freons_cst
@@ -117,6 +97,4 @@
 
 
-
-
       !  Temporal and spatial interpolation at time k
       ! --------------------------------------------------
@@ -125,15 +103,11 @@
             zpatm(jm,jn) = (  p_cfc(iyear_beg, jm, jn) * FLOAT (im1)  &
                &           +  p_cfc(iyear_end, jm, jn) * FLOAT (im2) ) / 12.
-         ENDDO
-      END DO
-
-      DO jn = 1, jptra
-         DO jj = 1, jpj 
-            DO ji = 1, jpi
-               pp_cfc(ji,jj,jn) =     xphem(ji,jj)   * zpatm(1,jn)  &
-                  &           + ( 1.- xphem(ji,jj) ) * zpatm(2,jn)
-            END DO
-         END DO
-      ENDDO
+         END DO
+      END DO
+
+      DO jn = 1, jptra
+         pp_cfc(:,:,jn) =       xphem(:,:)   * zpatm(1,jn)   &
+            &           + ( 1.- xphem(:,:) ) * zpatm(2,jn)
+      END DO
 
 
@@ -160,5 +134,5 @@
             END DO
          END DO
-      ENDDO
+      END DO
 
   
@@ -181,5 +155,5 @@
             END DO
          END DO
-      ENDDO
+      END DO
 
 
@@ -199,5 +173,5 @@
             END DO
          END DO
-      ENDDO
+      END DO
 
 
@@ -212,5 +186,5 @@
             END DO
          END DO
-      ENDDO
+      END DO
 
       ! --------------------------------------------
@@ -223,8 +197,8 @@
             END DO
          END DO
-      ENDDO
-
-
+      END DO
+      !
    END SUBROUTINE trc_freons
+
 
    SUBROUTINE trc_freons_cst
@@ -232,18 +206,8 @@
       !!                     ***  trc_freons_cst  ***  
       !!
-      !!   Purpose : sets constants for CFC model
-      !!  ---------
-      !!
-      !!
-      !! History :
-      !!   8.2  !  04-06  (JC. Dutay)  original code
-      !!   9.0  !  05-10  (C. Ethe) Modularity 
+      !! ** Purpose : sets constants for CFC model
       !!---------------------------------------------------------------------
-      !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-      !!----------------------------------------------------------------
-      !! Local declarations
-      INTEGER :: jn
+      INTEGER ::   jn
+      !!---------------------------------------------------------------------
 
       DO jn = 1, jptra
@@ -290,10 +254,11 @@
          WRITE(numout,*) 'coefficient for schmidt of tracer',ctrcnm(jn)
          WRITE(numout,*) sca1(jn), sca2(jn),sca3(jn), sca4(jn)
-      ENDDO
-
+      END DO
+      !
    END SUBROUTINE trc_freons_cst
+   
 #else
    !!----------------------------------------------------------------------
-   !!   Default option                                         Dummy module
+   !!   Dummy module                                           No CFC model
    !!----------------------------------------------------------------------
 CONTAINS
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcini.cfc.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcini.cfc.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcini.cfc.h90	(revision 763)
@@ -1,47 +1,40 @@
+   !!======================================================================
+   !!                         ***  trcini.cfc.h90  ***
+   !! TOP :   Initialisation of CFC chemical model
+   !!======================================================================
+   !! History :    -   !  2004-06  (JC. Dutay) Original code
+   !!             1.0  !  2005-03  (O. Aumont, A. El Moussaoui) F90
+   !!              -   !  2005-10  (C. Ethe) Modularity
    !!----------------------------------------------------------------------
-   !!                    ***  trcini.cfc.h90 ***
+
+   CHARACTER (len=34) ::   clname = 'cfc1112.atm' ! ???
+
+   INTEGER  ::   inum                   ! unit number
+   REAL(wp) ::   ylats = -10.           ! 10 degrees south
+   REAL(wp) ::   ylatn =  10.           ! 10 degrees north
+
    !!----------------------------------------------------------------------
-   !! * Module variables
-   INTEGER  ::  &
-      inum                   ! unit number
-   CHARACTER (len=34) :: &
-      clname = 'cfc1112.atm' ! ???
-   REAL(wp) ::  &
-      ylats = -10.,    &     ! 10 degrees south
-      ylatn =  10.           ! 10 degrees north
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
 
    SUBROUTINE trc_ini
-      !!---------------------------------------------------------------------
+      !!----------------------------------------------------------------------
       !!                     ***  trcini.cfc.h90  ***  
       !!
-      !!   Purpose : special initialization for cfc model
-      !!  ---------
-      !!
-      !!
-      !! History :
-      !!   8.2  !  04-06  (JC. Dutay)  original code
-      !!   8.5  !  05-03  (O. Aumont and A. El Moussaoui F90
-      !!   9.0  !  05-10  (C. Ethe) Modularity 
-      !!---------------------------------------------------------------------
-      !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-      !!---------------------------------------------------------------------
-      !! Local declarations
-      INTEGER  :: ji, jj, jn, jl, jm
-      REAL(wp) :: zyy,  zyd
+      !! ** Purpose : special initialization for cfc model
+      !!----------------------------------------------------------------------
+      INTEGER  ::   ji, jj, jn, jl, jm
+      REAL(wp) ::   zyy,  zyd
+      !!----------------------------------------------------------------------
 
-   
-      !
       ! Initialization of boundaries conditions
       ! --------------------------------------- 
-
-      pp_cfc(:,:,:) = 0.0
-      qtr  (:,:,:) = 0.0
-      xphem(:,:  ) = 0.0
-
- 
+      pp_cfc(:,:,:) = 0.e0
+      qtr   (:,:,:) = 0.e0
+      xphem (:,:)   = 0.e0
       DO jn = 1, jptra
          DO jm = 1, jphem
@@ -50,5 +43,5 @@
             END DO
          END DO
-      ENDDO
+      END DO
       
       
@@ -61,14 +54,9 @@
          ENDIF
          DO jn = 1, jptra
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  qint(ji,jj,jn) = 0.
-               END DO
-            END DO
-         ENDDO
+            qint(:,:,jn) = 0.e0
+         END DO
       ENDIF
 
 
-      !
       !   READ CFC partial pressure atmospheric value :
       !     p11(year,nt) = PCFC11  in northern (1) and southern (2) hemisphere 
@@ -127,13 +115,10 @@
       DO jj = 1 , jpj
          DO ji = 1 , jpi
-            IF( gphit(ji,jj) .GE. ylatn ) THEN
-               xphem(ji,jj) = 1.
-            ELSE IF (gphit(ji,jj) .LE. ylats) THEN
-               xphem(ji,jj) = 0.
-            ELSE 
-               xphem(ji,jj) = ( gphit(ji,jj) - ylats) / zyd
+            IF(     gphit(ji,jj) >= ylatn ) THEN   ;   xphem(ji,jj) = 1.e0
+            ELSEIF( gphit(ji,jj) <= ylats ) THEN   ;   xphem(ji,jj) = 0.e0
+            ELSE                                   ;   xphem(ji,jj) = ( gphit(ji,jj) - ylats) / zyd
             ENDIF
          END DO
       END DO
-
+      !
    END SUBROUTINE trc_ini
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcini.lobster1.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcini.lobster1.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcini.lobster1.h90	(revision 763)
@@ -1,44 +1,44 @@
+   !!======================================================================
+   !!                         ***  trcini.lobster1.h90  ***
+   !! TOP :   Initialisation of LOBSTER 1 biological model
+   !!======================================================================
+   !! History :    -   !  1999-09  (M. Levy) Original code
+   !!              -   !  2000-12  (0. Aumont, E. Kestenare) add sediment 
+   !!             1.0  !  2004-03  (C. Ethe) Modularity
+   !!              -   !  2005-03  (O. Aumont, A. El Moussaoui) F90
    !!----------------------------------------------------------------------
-   !!                    ***  trcini.lobster1.h90 ***
-   !!----------------------------------------------------------------------
+
 #  include "domzgr_substitute.h90"
 #  include "passivetrc_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
 CONTAINS
 
    SUBROUTINE trc_ini
-      !!---------------------------------------------------------------------
+      !!----------------------------------------------------------------------
       !!                    ***  ROUTINE trc_ini  ***
-      !!  purpose :
-      !!  ---------
-      !!     specific initialisation for lobster1 model
-      !!
-      !!   History :
-      !!   --------
-      !!      original    : 99-09 (M. Levy) 
-      !!      additions   : 00-12 (0. Aumont, E. Kestenare)
-      !!                           add sediment computations
-      !!    03-05 : O. Aumont and A. El Moussaoui F90  
+      !! ** purpose :   specific initialisation for lobster1 model
       !!----------------------------------------------------------------------
-      !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+      INTEGER  ::   ji, jj, jk, jn
+      REAL(wp) ::   zdm0(jpi,jpj,jpk), zrro(jpi,jpj), zfluo, zfluu
+      REAL(wp) ::   ztest, zfluo, zfluu
+      REAL(wp), DIMENSION(jpi,jpj) ::   zrro
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zdm0
       !!----------------------------------------------------------------------
-      !! local declarations
-      !! ==================
-      INTEGER ji,jj,jk,jn
-      REAL zdm0(jpi,jpj,jpk),zrro(jpi,jpj),zfluo,zfluu
-      REAL ztest
 
-      !! 1. initialization of fields for optical model
-      !! --------------------------------------------
+      ! initialization of fields for optical model
+      ! --------------------------------------------
+      xze (:,:)   = 5.e0
+      xpar(:,:,:) = 0.e0
 
-      xze(:,:)=5.
-      xpar(:,:,:)=0.
+      ! initialization for passive tracer remineralisation-damping  array
+      ! -----------------------------------------------------------------
 
-      !! 2. initialization for passive tracer remineralisation-damping  array
-      !! -------------------------------------------------------------------------
-
-      DO jn=1,jptra
-         remdmp(:,jn)=tminr
+      DO jn = 1, jptra
+         remdmp(:,jn) = tminr
       END DO
 
@@ -49,80 +49,76 @@
       ENDIF
 
-      !! 3. initialization of biological variables
-      !! ------------------------------------------
+      ! initialization of biological variables
+      ! ------------------------------------------
 
-      !! Calculate vertical distribution of newly formed biogenic poc
-      !! in the water column in the case of max. possible bottom depth
-      !! ------------------------------------------------------------
+      ! Calculate vertical distribution of newly formed biogenic poc
+      ! in the water column in the case of max. possible bottom depth
+      ! ------------------------------------------------------------
 
-      zdm0   = 0.
-      zrro = 1.
+      zdm0   = 0.e0
+      zrro = 1.e0
       DO jk = jpkb,jpkm1
          DO jj =1, jpj
             DO ji =1, jpi
-               zfluo = (fsdepw(ji,jj,jk)/fsdepw(ji,jj,jpkb))**xhr 
-               zfluu = (fsdepw(ji,jj,jk+1)/fsdepw(ji,jj,jpkb))**xhr
-               IF (zfluo.GT.1.) zfluo = 1.
-               zdm0(ji,jj,jk) = zfluo-zfluu
-               IF (jk.LE.jpkb-1) zdm0(ji,jj,jk)=0.
-               zrro(ji,jj) = zrro(ji,jj)-zdm0(ji,jj,jk)
-            ENDDO
-         ENDDO
-      ENDDO
-!!!
+               zfluo = ( fsdepw(ji,jj,jk  ) / fsdepw(ji,jj,jpkb) )**xhr 
+               zfluu = ( fsdepw(ji,jj,jk+1) / fsdepw(ji,jj,jpkb) )**xhr
+               IF( zfluo.GT.1. )   zfluo = 1.e0
+               zdm0(ji,jj,jk) = zfluo - zfluu
+               IF( jk <= jpkb-1 )   zdm0(ji,jj,jk) = 0.e0
+               zrro(ji,jj) = zrro(ji,jj) - zdm0(ji,jj,jk)
+            END DO
+         END DO
+      END DO
 
       zdm0(:,:,jpk) = zrro(:,:)
 
-      !! Calculate vertical distribution of newly formed biogenic poc
-      !! in the water column with realistic topography (first "dry" layer
-      !! contains total fraction, which has passed to the upper layers)
-      !! ----------------------------------------------------------------------
-
+      ! Calculate vertical distribution of newly formed biogenic poc
+      ! in the water column with realistic topography (first "dry" layer
+      ! contains total fraction, which has passed to the upper layers)
+      ! ----------------------------------------------------------------------
       dminl = 0.
       dmin3 = zdm0
+      DO jk = 1, jpk
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               IF( tmask(ji,jj,jk) == 0. ) THEN
+                  dminl(ji,jj) = dminl(ji,jj) + dmin3(ji,jj,jk)
+                  dmin3(ji,jj,jk) = 0.e0
+               ENDIF
+            END DO
+         END DO
+      END DO
 
-      DO jk = 1,jpk
-         DO jj = 1,jpj
-            DO ji = 1,jpi
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            IF( tmask(ji,jj,1) == 0 )   dmin3(ji,jj,1) = 0.e0
+         END DO
+      END DO
 
-               IF(tmask(ji,jj,jk) == 0) THEN
-                  dminl(ji,jj) = dminl(ji,jj)+dmin3(ji,jj,jk)
-                  dmin3(ji,jj,jk) = 0.0
-               ENDIF
-
-            ENDDO
-         ENDDO
-      ENDDO
-
-      DO jj = 1,jpj
-         DO ji = 1,jpi
-            IF (tmask(ji,jj,1) == 0) dmin3(ji,jj,1) = 0.
-         ENDDO
-      ENDDO
-
-      !! CALCUL DU MASK DE COTE
-      !! ----------------------   
-      cmask=0.
-      do ji=2,jpi-1
-         do jj=2,jpj-1
+      ! Coastal mask 
+      ! ------------   
+      cmask = 0.e0
+      DO ji = 2, jpi-1
+         DO jj = 2, jpj-1
             if (tmask(ji,jj,1) == 1) then
                ztest=tmask(ji+1,jj,1)*tmask(ji-1,jj,1)*tmask(ji,jj+1,1)*tmask(ji,jj-1,1)
                IF (ztest == 0) cmask(ji,jj) = 1.
             endif
-         end do
-      end do
+         END DO
+      END DO
 
-      cmask(1,:)=cmask(jpi-1,:)
-      cmask(jpi,:)=cmask(2,:)
+      cmask( 1 ,:) = cmask(jpi-1,:)
+      cmask(jpi,:) = cmask( 2   ,:)
 
+      !!gm BUG !!!!!   not valid in mpp and also not valid for north fold   !!!!!
 
-      !! CALCUL DE LA SURFACE COTIERE
-      !! ----------------------------
-      areacot=0.
-      do ji=2,jpi-1
-         do jj=2,jpj-1
-            areacot=areacot+e1t(ji,jj)*e2t(ji,jj)*cmask(ji,jj)
-         end do
-      end do
-
+      ! Coastal surface
+      ! ---------------
+      areacot = 0.e0
+      DO ji = 2, jpi-1
+         DO jj = 2, jpj-1
+            areacot = areacot + e1t(ji,jj) * e2t(ji,jj) * cmask(ji,jj)
+         END DO
+      END DO
+      !
    END SUBROUTINE trc_ini
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcini.pisces.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcini.pisces.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trcini.pisces.h90	(revision 763)
@@ -1,103 +1,82 @@
+   !!======================================================================
+   !!                         ***  trcini.pisces.h90  ***
+   !! TOP :   Initialisation of PISCES biological model
+   !!======================================================================
+   !! History :    -   !  1988-07  (E. Maier-Reiner) Original code
+   !!              -   !  1999-10  (O. Aumont, C. Le Quere)
+   !!              -   !  2002     (O. Aumont)  PISCES
+   !!             1.0  !  2005-03  (O. Aumont, A. El Moussaoui) F90
    !!----------------------------------------------------------------------
-   !!                    ***  trcini.pisces.h90 ***
-   !!----------------------------------------------------------------------
+
 #  include "domzgr_substitute.h90"
 #  include "passivetrc_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
 CONTAINS
 
    SUBROUTINE trc_ini
-      !!-----------------------------------------------------------------
+      !!----------------------------------------------------------------------
+      !!                   ***  ROUTINE trc_ini ***
       !!
-      !!                   ***  ROUTINE trc_ini ***
-      !!                     
+      !! ** Purpose :   Initialisation of PISCES biological and chemical variables
+      !!----------------------------------------------------------------------
+      USE iom
       !!
-      !!  Purpose :
-      !!  ---------
-      !!     Initialisation of PISCES biological and chemical variables
-      !!
-      !!   INPUT :
-      !!   -----
-      !!      common
-      !!              all the common defined in opa 
-      !!
-      !!
-      !!   OUTPUT :                   : no
-      !!   ------
-      !!
-      !!   EXTERNAL :
-      !!   ----------
-      !!         p4zche
-      !!
-      !!   MODIFICATIONS:
-      !!   --------------
-      !!      original  : 1988-07  E. MAIER-REIMER      MPI HAMBURG
-      !!      additions : 1999-10  O. Aumont and C. Le Quere
-      !!      additions : 2002     O. Aumont (PISCES)
-      !!     03-2005 O. Aumont and A. El Moussaoui F90
-      !!----------------------------------------------------------------------
-      !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-      !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/SMS/trcini.pisces.h90,v 1.9 2007/10/12 09:35:04 opalod Exp $ 
-      !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-      !!----------------------------------------------------------------------
-      !!Module used
-      USE iom
-
-      !! local declarations
-      !! ==================
       INTEGER :: ji,jj,jk
       INTEGER :: ichl,iband,jm
       INTEGER , PARAMETER :: jpmois = 12, jpan   = 1 
 
+      REAL(wp) :: zcoef
       REAL(wp) :: ztoto,expide,denitide,ztra,zmaskt
       REAL(wp) , DIMENSION (jpi,jpj) :: riverdoc,river,ndepo
       REAL(wp) , DIMENSION (jpi,jpj,jpk) :: cmask
 
-      INTEGER :: numriv,numdust,numbath,numdep
+      INTEGER :: numriv, numdust, numbath, numdep
       INTEGER :: numlight 
 
 #if defined key_trc_kriest
-      REAL(wp) ::  &
-         znum, zdiv, &
-         zws,zwr, zwl,wmax, xnummax, &
-         zmin, zmax, zl, zr, xacc
-
-      INTEGER :: jn, kiter
+      INTEGER  ::   jn, kiter
+      REAL(wp) ::   znum, zdiv
+      REAL(wp) ::   zws,zwr, zwl,wmax, xnummax, &
+      REAL(wp) ::   zmin, zmax, zl, zr, xacc
 #endif
-
-      !! 1. initialization
-      !! -----------------
-
-      !! computation of the record length for direct access FILE
-      !! this length depend of 512 for the t3d machine
-      !!
-      rfact = rdttra(1) * float(ndttrc)
-      rfactr = 1./rfact
-      IF(lwp) WRITE(numout,*) ' Tracer time step=',rfact,' rdt=',rdt
-      rfact2= rfact / float(nrdttrc)
-      rfact2r = 1./rfact2
-      IF(lwp) write(numout,*) ' Biology time step=',rfact2
-
-
-      !!    INITIALISE DUST INPUT FROM ATMOSPHERE
-      !!    -------------------------------------
-
-      IF ( bdustfer ) THEN
-         IF(lwp) WRITE(numout,*) ' Initialize dust input from atmosphere '
+      !!----------------------------------------------------------------------
+
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' trc_ini :   PISCES biological and chemical initialisation'
+      IF(lwp) WRITE(numout,*) ' ~~~~~~~'
+
+
+      !                                            ! Time-step
+      rfact   = rdttra(1) * float(ndttrc)          ! ---------
+      rfactr  = 1. / rfact
+      rfact2  = rfact / float(nrdttrc)
+      rfact2r = 1. / rfact2
+
+      IF(lwp) WRITE(numout,*) '    Tracer  time step=', rfact, ' rdt = ', rdt
+      IF(lwp) write(numout,*) '    Biology time step=', rfact2
+
+
+      !                                            ! Dust input from the atmosphere
+      IF( bdustfer ) THEN                          ! ------------------------------
+         IF(lwp) WRITE(numout,*) '    Initialize dust input from atmosphere '
          CALL iom_open ( 'dust.orca.nc', numdust )
          DO jm = 1, jpmois
-            CALL iom_get  ( numdust, jpdom_data, 'dust', dustmo(:,:,jm), jm )
-         ENDDO
+            CALL iom_get( numdust, jpdom_data, 'dust', dustmo(:,:,jm), jm )
+         END DO
          CALL iom_close( numdust )
       ELSE
-         dustmo(:,:,:) = 0.
+         dustmo(:,:,:) = 0.e0
       ENDIF
 
 
-
-      !!    INITIALISE THE NUTRIENT INPUT BY RIVERS
-      !!    ---------------------------------------
-
-      IF ( briver ) THEN
-         IF(lwp) WRITE(numout,*) ' Initialize the nutrient input by rivers '
+      !                                            ! Nutrient input from rivers
+      IF( briver ) THEN                            ! --------------------------
+         IF(lwp) WRITE(numout,*) '    Initialize the nutrient input by rivers from river.orca.nc file'
          CALL iom_open ( 'river.orca.nc', numriv )
          CALL iom_get  ( numriv, jpdom_data, 'riverdic', river   (:,:), jpan )
@@ -105,38 +84,33 @@
          CALL iom_close( numriv )
       ELSE
-         river   (:,:) = 0.
-         riverdoc(:,:) = 0.
+         river   (:,:) = 0.e0
+         riverdoc(:,:) = 0.e0
       endif
 
-      !!    INITIALISE THE N INPUT BY DUST
-      !!  ---------------------------------------
-
-      IF ( bndepo ) THEN
-         IF(lwp) WRITE(numout,*) ' Initialize the nutrient input by dust '
+      !                                            ! Nutrient input from dust
+      IF( bndepo ) THEN                            ! ------------------------
+         IF(lwp) WRITE(numout,*) '    Initialize the nutrient input by dust from ndeposition.orca.nc'
          CALL iom_open ( 'ndeposition.orca.nc', numdep )
          CALL iom_get  ( numdep, jpdom_data, 'ndep', ndepo(:,:), jpan )
          CALL iom_close( numdep )
       ELSE
-         ndepo(:,:) = 0.
+         ndepo(:,:) = 0.e0
       ENDIF
 
-      !!    Computation of the coastal mask.
-      !!    Computation of an island mask to enhance coastal supply of iron
-      !!    ---------------------------------------------------------------
-
-      IF ( bsedinput ) THEN
-         IF(lwp) WRITE(numout,*) '  Computation of an island mask to enhance coastal supply of iron '
+      !                                            ! Coastal and island masks
+      IF( bsedinput ) THEN                         ! ------------------------
+         IF(lwp) WRITE(numout,*) '    Computation of an island mask to enhance coastal supply of iron '
+         IF(lwp) WRITE(numout,*) '       from bathy.orca.nc file '
          CALL iom_open ( 'bathy.orca.nc', numbath )
          CALL iom_get  ( numbath, jpdom_data, 'bathy', cmask(:,:,:), jpan )
-
+         CALL iom_close( numbath )
+         !
          DO jk = 1, 5
             DO jj = 2, jpjm1
                DO ji = 2, jpim1
-                  IF ( tmask(ji,jj,jk) /= 0. ) THEN
+                  IF( tmask(ji,jj,jk) /= 0. ) THEN
                      zmaskt = tmask(ji+1,jj,jk) * tmask(ji-1,jj,jk) * tmask(ji,jj+1,jk)    &
-                        &          * tmask(ji,jj-1,jk) * tmask(ji,jj,jk+1)
-                     IF ( zmaskt == 0. ) THEN
-                        cmask(ji,jj,jk ) = 0.1
-                     ENDIF
+                        &                       * tmask(ji,jj-1,jk) * tmask(ji,jj,jk+1)
+                     IF( zmaskt == 0. )   cmask(ji,jj,jk ) = 0.1
                   ENDIF
                END DO
@@ -151,42 +125,33 @@
                END DO
             END DO
-         END DO
-         
-         CALL iom_close( numbath )
+         END DO    
       ELSE
-         cmask(:,:,:) = 0.
+         cmask(:,:,:) = 0.e0
       ENDIF
 
-      ! Lateral boundary conditions on ( avt, en )   (sign unchanged)
-      CALL lbc_lnk( cmask , 'T', 1. )
-
-      !!     Computation of the total atmospheric supply of Si
-      !!     -------------------------------------------------
-
-      sumdepsi = 0.
+      CALL lbc_lnk( cmask , 'T', 1. )      ! Lateral boundary conditions on cmask   (sign unchanged)
+
+
+      !                                            ! total atmospheric supply of Si
+      !                                            ! ------------------------------
+      sumdepsi = 0.e0
       DO jm = 1, jpmois
          DO jj = 2, jpjm1
             DO ji = 2, jpim1
-               sumdepsi = sumdepsi + dustmo(ji,jj,jm)/(12.*rmoss)*8.8        &
-                  *0.075/28.1*e1t(ji,jj)*e2t(ji,jj)*tmask(ji,jj,1)*tmask_i(ji,jj)
+               sumdepsi = sumdepsi + dustmo(ji,jj,jm) / (12.*rmoss) * 8.8        &
+                  &     * 0.075/28.1 * e1t(ji,jj) * e2t(ji,jj) * tmask(ji,jj,1) * tmask_i(ji,jj)
             END DO
          END DO
       END DO
-
       IF( lk_mpp )   CALL mpp_sum( sumdepsi )  ! sum over the global domain
 
-      !!    COMPUTATION OF THE N/P RELEASE DUE TO COASTAL RIVERS
-      !!    COMPUTATION OF THE Si RELEASE DUE TO COASTAL RIVERS 
-      !!    ---------------------------------------------------
-
-      DO jj=1,jpj
-         DO ji=1,jpi
-            cotdep(ji,jj)=river(ji,jj)*1E9/(12.*raass                          &
-               *e1t(ji,jj)*e2t(ji,jj)*fse3t(ji,jj,1)+rtrn)*tmask(ji,jj,1)
-            rivinp(ji,jj)=(river(ji,jj)+riverdoc(ji,jj))*1E9                   &
-               /(31.6*raass*e1t(ji,jj)*e2t(ji,jj)*fse3t(ji,jj,1)+rtrn)   &
-               *tmask(ji,jj,1)
-            nitdep(ji,jj)=7.6*ndepo(ji,jj)*tmask(ji,jj,1)/(14E6*raass          &
-               *fse3t(ji,jj,1)+rtrn)
+      !                                            ! N/P and Si releases due to coastal rivers
+      !                                            ! -----------------------------------------
+      DO jj = 1, jpj
+         DO ji = 1, jpi
+            zcoef = raass * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,1)
+            cotdep(ji,jj) =  river(ji,jj)                  *1E9 / ( 12. * zcoef + rtrn ) * tmask(ji,jj,1)
+            rivinp(ji,jj) = (river(ji,jj)+riverdoc(ji,jj)) *1E9 / ( 31.6* zcoef + rtrn ) * tmask(ji,jj,1)
+            nitdep(ji,jj) = 7.6 * ndepo(ji,jj)                  / ( 14E6*raass*fse3t(ji,jj,1) + rtrn ) * tmask(ji,jj,1)
          END DO
       END DO
@@ -194,18 +159,15 @@
       CALL lbc_lnk( cotdep , 'T', 1. )  ;  CALL lbc_lnk( rivinp , 'T', 1. )  ;  CALL lbc_lnk( nitdep , 'T', 1. )
 
-      rivpo4input=0.
-      rivalkinput=0.
-      nitdepinput=0.
-      DO jj=2,jpjm1
-         DO ji=2,jpim1
-            rivpo4input=rivpo4input+rivinp(ji,jj)*(e1t(ji,jj)*e2t(ji,jj)    &
-               *fse3t(ji,jj,1))*tmask(ji,jj,1)*tmask_i(ji,jj)*raass
-            rivalkinput=rivalkinput+cotdep(ji,jj)*(e1t(ji,jj)*e2t(ji,jj)    &
-               *fse3t(ji,jj,1))*tmask(ji,jj,1)*tmask_i(ji,jj)*raass
-            nitdepinput=nitdepinput+nitdep(ji,jj)*(e1t(ji,jj)*e2t(ji,jj)    &
-               *fse3t(ji,jj,1))*tmask(ji,jj,1)*tmask_i(ji,jj)*raass
+      rivpo4input=0.e0
+      rivalkinput=0.e0
+      nitdepinput=0.e0
+      DO jj = 2 , jpjm1
+         DO ji = 2, jpim1
+            zcoef = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,1)) * tmask(ji,jj,1) * tmask_i(ji,jj) * raass
+            rivpo4input = rivpo4input + rivinp(ji,jj) * zcoef
+            rivalkinput = rivalkinput + cotdep(ji,jj) * zcoef
+            nitdepinput = nitdepinput + nitdep(ji,jj) * zcoef
          END DO
       END DO
-
       IF( lk_mpp ) THEN
          CALL mpp_sum( rivpo4input )  ! sum over the global domain
@@ -215,14 +177,11 @@
 
 
-      !!    Coastal supply of iron
-      !!    ----------------------
-
-      DO jk=1,jpkm1
-         ironsed(:,:,jk)=sedfeinput*cmask(:,:,jk)         &
-            /(fse3t(:,:,jk)*rjjss)
+      !                                            !    Coastal supply of iron
+      !                                            ! -------------------------
+      DO jk = 1, jpkm1
+         ironsed(:,:,jk) = sedfeinput * cmask(:,:,jk) / ( fse3t(:,:,jk) * rjjss )
       END DO
-
-      ! Lateral boundary conditions on ( ironsed )   (sign unchanged)
-      CALL lbc_lnk( ironsed , 'T', 1. )
+      CALL lbc_lnk( ironsed , 'T', 1. )      ! Lateral boundary conditions on ( ironsed )   (sign unchanged)
+
 
 
@@ -233,12 +192,11 @@
       !  Bissection Method
       !--------------------------------------------------------------------
-      WRITE(numout,*)'  '
-      WRITE(numout,*)'Compute maximum number of particles in aggregates'
-      WRITE(numout,*)'  '
+      WRITE(numout,*)
+      WRITE(numout,*)'    kriest : Compute maximum number of particles in aggregates'
             
-      xacc     = 0.001
+      xacc     =  0.001
       kiter    = 50
-      zmin     = 1.10
-      zmax     = xkr_mass_max/xkr_mass_min
+      zmin     =  1.10
+      zmax     = xkr_mass_max / xkr_mass_min
       xkr_frac = zmax
 
@@ -262,7 +220,7 @@
 
 iflag:  DO jn = 1, kiter               
-           IF( zwl == 0. ) THEN
+           IF( zwl == 0.e0 ) THEN
               xnummax = zl
-           ELSE IF ( zwr == 0. ) THEN
+           ELSE IF ( zwr == 0.e0 ) THEN
               xnummax = zr
            ELSE
@@ -297,323 +255,290 @@
            ENDIF
                     
-        ENDDO iflag
+        END DO iflag
                
         xnumm(jk) = xnummax
-        WRITE(numout,*) 'jk = ',jk,' wmax = ',wmax,' xnum max = ',xnumm(jk)
+        WRITE(numout,*) '       jk = ', jk, ' wmax = ', wmax,' xnum max = ', xnumm(jk)
         
      END DO
 
-     WRITE(numout,*) '------------------------------------'
 #endif
 
-      !!----------------------------------------------------------------------
-      !!
-      !! Initialize biological variables 
-      !!
-      !!----------------------------------------------------------------------
-      !! Set biological ratios
-      !! ---------------------
-
-      rno3   = (16.+2.)/122.
-      po4r   = 1./122.
-      o2nit  = 32./122.
-      rdenit = 97.6/16.
-      o2ut   = 140./122.
-
-      !!----------------------------------------------------------------------
-      !!
-      !! Initialize chemical variables 
-      !!
-      !!----------------------------------------------------------------------
-
-      !! set pre-industrial atmospheric [co2] (ppm) and o2/n2 ratio
-      !! ----------------------------------------------------------
-
+      !----------------------------------------------------------------------
+      ! Initialize biological variables 
+      !----------------------------------------------------------------------
+      ! Set biological ratios
+      ! ---------------------
+      rno3   = (16.+2.) / 122.
+      po4r   =   1.e0   / 122.
+      o2nit  =  32.     / 122.
+      rdenit =  97.6    /  16.
+      o2ut   = 140.     / 122.
+
+      !----------------------------------------------------------------------
+      ! Initialize chemical variables 
+      !----------------------------------------------------------------------
+
+      ! set pre-industrial atmospheric [co2] (ppm) and o2/n2 ratio
+      ! ----------------------------------------------------------
       atcox = 0.20946
 
-      !! Set lower/upper limits for temperature and salinity
-      !! ---------------------------------------------------
-
-      salchl = 1./1.80655
-      calcon = 1.03E-2
-
-
-
-      !! Set coefficients for apparent solubility equilibrium of calcite
-      !! Millero et al. 1995 from Mucci 1983
-      !! --------------------------------------------------------------
+      ! Set lower/upper limits for temperature and salinity
+      ! ---------------------------------------------------
+      salchl = 1.e0 / 1.80655
+      calcon = 1.03e-2
+
+      ! Set coefficients for apparent solubility equilibrium of calcite
+      ! Millero et al. 1995 from Mucci 1983
+      ! --------------------------------------------------------------
       akcc1 = -171.9065
-      akcc2 = -0.077993
+      akcc2 =   -0.077993
       akcc3 = 2839.319
-      akcc4 = 71.595
-      akcc5 = -0.77712
-      akcc6 = 0.0028426
-      akcc7 = 178.34
-      akcc8 = -0.07711
-      akcc9 = 0.0041249
-
-
-
-      !! Set coefficients for seawater pressure correction
-      !! -------------------------------------------------
+      akcc4 =   71.595
+      akcc5 =   -0.77712
+      akcc6 =    0.0028426
+      akcc7 =  178.34
+      akcc8 =   -0.07711
+      akcc9 =    0.0041249
+
+      ! Set coefficients for seawater pressure correction
+      ! -------------------------------------------------
       devk1(1) = -25.5
-      devk2(1) = 0.1271
-      devk3(1) = 0.
-      devk4(1) = -3.08E-3
-      devk5(1) = 0.0877E-3
-      !!
+      devk2(1) =   0.1271
+      devk3(1) =   0.e0
+      devk4(1) =  -3.08E-3
+      devk5(1) =   0.0877E-3
+      !
       devk1(2) = -15.82
-      devk2(2) = -0.0219
-      devk3(2) = 0.
-      devk4(2) = 1.13E-3
-      devk5(2) = -0.1475E-3
-      !!
+      devk2(2) =  -0.0219
+      devk3(2) =   0.e0
+      devk4(2) =   1.13E-3
+      devk5(2) =  -0.1475E-3
+      !
       devk1(3) = -29.48
-      devk2(3) = 0.1622
-      devk3(3) = 2.608E-3
-      devk4(3) = -2.84E-3
-      devk5(3) = 0.
-      !!
+      devk2(3) =   0.1622
+      devk3(3) =   2.608E-3
+      devk4(3) =  -2.84E-3
+      devk5(3) =   0.e0
+      !
       devk1(4) = -14.51
-      devk2(4) = 0.1211
-      devk3(4) = -0.321E-3
-      devk4(4) = -2.67E-3
-      devk5(4) = 0.0427E-3
-      !!
+      devk2(4) =   0.1211
+      devk3(4) =  -0.321E-3
+      devk4(4) =  -2.67E-3
+      devk5(4) =   0.0427E-3
+      !
       devk1(5) = -23.12
-      devk2(5) = 0.1758
-      devk3(5) = -2.647E-3
-      devk4(5) = -5.15E-3
-      devk5(5) = 0.09E-3
-      !!
+      devk2(5) =   0.1758
+      devk3(5) =  -2.647E-3
+      devk4(5) =  -5.15E-3
+      devk5(5) =   0.09E-3
+      !
       devk1(6) = -26.57
-      devk2(6) = 0.2020
-      devk3(6) = -3.042E-3
-      devk4(6) = -4.08E-3
-      devk5(6) = 0.0714E-3
-      !!
+      devk2(6) =   0.2020
+      devk3(6) =  -3.042E-3
+      devk4(6) =  -4.08E-3
+      devk5(6) =   0.0714E-3
+      !
       devk1(7) = -25.60
-      devk2(7) = 0.2324
-      devk3(7) = -3.6246E-3
-      devk4(7) = -5.13E-3
-      devk5(7) = 0.0794E-3
-      !!
-      !! For calcite with Edmond and Gieske 1970
-      !!     devkst = 0.23
-      !!     devks  = 35.4
-      !! Millero 95 takes this depth dependance for calcite
+      devk2(7) =   0.2324
+      devk3(7) =  -3.6246E-3
+      devk4(7) =  -5.13E-3
+      devk5(7) =   0.0794E-3
+      !
+      ! For calcite with Edmond and Gieske 1970
+      !     devkst = 0.23
+      !     devks  = 35.4
+      ! Millero 95 takes this depth dependance for calcite
       devk1(8) = -48.76
-      devk2(8) = 0.5304
-      devk3(8) = 0.
+      devk2(8) =   0.5304
+      devk3(8) =   0.e0
       devk4(8) = -11.76E-3
-      devk5(8) = 0.3692E-3
-      !!
-      !! Coefficients for sulfate and fluoride
+      devk5(8) =   0.3692E-3
+      !
+      ! Coefficients for sulfate and fluoride
       devk1(9) = -18.03
-      devk2(9) = 0.0466
-      devk3(9) = 0.316E-3
-      devk4(9) = -4.53E-3
-      devk5(9) = 0.09E-3
+      devk2(9) =   0.0466
+      devk3(9) =   0.316e-3
+      devk4(9) =  -4.53e-3
+      devk5(9) =   0.09e-3
 
       devk1(10) = -9.78
       devk2(10) = -0.0090
-      devk3(10) = -0.942E-3
-      devk4(10) = -3.91E-3
-      devk5(10) = 0.054E-3
-
-
-      !! Set universal gas constants
-      !! ---------------------------
-
-      rgas = 83.143
-      oxyco = 1./22.4144
-
-      !! Set boron constants
-      !! -------------------
-
+      devk3(10) = -0.942e-3
+      devk4(10) = -3.91e-3
+      devk5(10) =  0.054e-3
+
+
+      ! Set universal gas constants
+      ! ---------------------------
+      rgas  = 83.143
+      oxyco =  1.e0 / 22.4144
+
+      ! Set boron constants
+      ! -------------------
       bor1 = 0.00023
-      bor2 = 1./10.82
-
-      !! Set volumetric solubility constants for co2 in ml/l (Weiss, 1974)
-      !! -----------------------------------------------------------------
-
+      bor2 = 1.e0 / 10.82
+
+      ! Set volumetric solubility constants for co2 in ml/l (Weiss, 1974)
+      ! -----------------------------------------------------------------
       c00 = -60.2409
-      c01 = 93.4517
-      c02 = 23.3585
-      c03 = 0.023517
-      c04 = -0.023656
-      c05 = 0.0047036
-
+      c01 =  93.4517
+      c02 =  23.3585
+      c03 =   0.023517
+      c04 =  -0.023656
+      c05 =   0.0047036
+      !
       ca0 = -162.8301
-      ca1 = 218.2968
-      ca2 = 90.9241
-      ca3 = -1.47696
-      ca4 = 0.025695
-      ca5 = -0.025225
-      ca6 = 0.0049867
-
-      !! Set coeff. for 1. dissoc. of carbonic acid (Edmond and Gieskes, 1970)
-      !! ---------------------------------------------------------------------
-
+      ca1 =  218.2968
+      ca2 =   90.9241
+      ca3 =   -1.47696
+      ca4 =    0.025695
+      ca5 =   -0.025225
+      ca6 =    0.0049867
+
+      ! Set coeff. for 1. dissoc. of carbonic acid (Edmond and Gieskes, 1970)
+      ! ---------------------------------------------------------------------
       c10 = -3670.7
-      c11 =  62.008
-      c12 = -9.7944
-      c13 = 0.0118
-      c14 = -0.000116
-
-      !! Set coeff. for 2. dissoc. of carbonic acid (Edmond and Gieskes, 1970)
-      !! ---------------------------------------------------------------------
-
+      c11 =    62.008
+      c12 =    -9.7944
+      c13 =     0.0118
+      c14 =    -0.000116
+
+      ! Set coeff. for 2. dissoc. of carbonic acid (Edmond and Gieskes, 1970)
+      ! ---------------------------------------------------------------------
       c20 = -1394.7
-      c21 = -4.777
-      c22 = 0.0184
-      c23 = -0.000118
-
-      !! Set constants for calculate concentrations for sulfate and fluoride
-      !! sulfates (Morris & Riley 1966)
-      !!----------------------------------------------------------------------
-
+      c21 =    -4.777
+      c22 =     0.0184
+      c23 =    -0.000118
+
+      ! Set constants for calculate concentrations for sulfate and fluoride
+      ! sulfates (Morris & Riley 1966)
+      !----------------------------------------------------------------------
       st1 = 0.14
-      st2 = 1./96.062
-
-      !! fluoride
-      !!------------
-
+      st2 = 1.e0 / 96.062
+
+      ! fluoride
+      ! --------
       ft1 = 0.000067
-      ft2 = 1./18.9984
-
-      !! sulfates (Dickson 1990 change to mol:kg soln, idem OCMIP)
-      !!----------------------------------------------------------
-
-      ks0  = 141.328
-      ks1  = -4276.1
-      ks2  = -23.093
-      ks3  = -13856
-      ks4  = 324.57
-      ks5  = -47.986
-      ks6  = 35474
-      ks7  = -771.54
-      ks8  = 114.723
-      ks9  = -2698
-      ks10 = 1776
-      ks11 = 1.
-      ks12 = -0.001005
-
-      !! fluorides (Dickson & Riley 1979 change to mol/kg soln)
-      !!-------------------------------------------------------
-      kf0 = -12.641
+      ft2 = 1.e0 / 18.9984
+
+      ! sulfates (Dickson 1990 change to mol:kg soln, idem OCMIP)
+      !----------------------------------------------------------
+      ks0  =    141.328
+      ks1  =  -4276.1
+      ks2  =    -23.093
+      ks3  = -13856.
+      ks4  =    324.57
+      ks5  =    -47.986
+      ks6  =  35474.
+      ks7  =   -771.54
+      ks8  =    114.723
+      ks9  =  -2698.
+      ks10 =   1776.
+      ks11 =      1.
+      ks12 =     -0.001005
+
+      ! fluorides (Dickson & Riley 1979 change to mol/kg soln)
+      !-------------------------------------------------------
+      kf0 =  -12.641
       kf1 = 1590.2
-      kf2 = 1.525
-      kf3 = 1.0
-      kf4 = -0.001005
-
-      !!
-      !! Set coeff. for 1. dissoc. of boric acid (Edmond and Gieskes, 1970)
-      !! ------------------------------------------------------------------
-
+      kf2 =    1.525
+      kf3 =    1.0
+      kf4 =   -0.001005
+
+      ! Set coeff. for 1. dissoc. of boric acid (Edmond and Gieskes, 1970)
+      ! ------------------------------------------------------------------
       cb0  = -8966.90
       cb1  = -2890.53
-      cb2  = -77.942
-      cb3  = 1.728
-      cb4  = -0.0996
-      cb5  = 148.0248
-      cb6  = 137.1942
-      cb7  = 1.62142
-      cb8  = -24.4344
-      cb9  = -25.085
-      cb10 = -0.2474
-      cb11 = 0.053105
-
-
-      !! Set coeff. for dissoc. of water (Dickson and Riley, 1979, 
-      !!   eq. 7, coefficient cw2 corrected from 0.9415 to 0.09415 
-      !!   after pers. commun. to B. Bacastow, 1988)
-      !! ---------------------------------------------------------
-
+      cb2  =   -77.942
+      cb3  =     1.728
+      cb4  =    -0.0996
+      cb5  =   148.0248
+      cb6  =   137.1942
+      cb7  =     1.62142
+      cb8  =   -24.4344
+      cb9  =   -25.085
+      cb10 =    -0.2474
+      cb11 =     0.053105
+
+      ! Set coeff. for dissoc. of water (Dickson and Riley, 1979, 
+      !   eq. 7, coefficient cw2 corrected from 0.9415 to 0.09415 
+      !   after pers. commun. to B. Bacastow, 1988)
+      ! ---------------------------------------------------------
       cw0 = -13847.26
-      cw1 = 148.9652
-      cw2 = -23.6521
-      cw3 = 118.67
-      cw4 = -5.977
-      cw5 = 1.0495
-      cw6 = -0.01615
-
-
-      !! Set coeff. for dissoc. of phosphate (Millero (1974)
-      !! ---------------------------------------------------
-      
-      cp10 = 115.54
+      cw1 =    148.9652
+      cw2 =    -23.6521
+      cw3 =    118.67
+      cw4 =     -5.977
+      cw5 =      1.0495
+      cw6 =     -0.01615
+
+      ! Set coeff. for dissoc. of phosphate (Millero (1974)
+      ! ---------------------------------------------------
+      cp10 =   115.54
       cp11 = -4576.752
-      cp12 = -18.453
-      cp13 = -106.736
-      cp14 = 0.69171
-      cp15 = -0.65643
-      cp16 = -0.01844
-
-      cp20 = 172.1033
+      cp12 =   -18.453
+      cp13 =  -106.736
+      cp14 =     0.69171
+      cp15 =    -0.65643
+      cp16 =    -0.01844
+      !
+      cp20 =   172.1033
       cp21 = -8814.715
-      cp22 = -27.927
-      cp23 = -160.340
-      cp24 = 1.3566
-      cp25 = 0.37335
-      cp26 = -0.05778
-
-
-      cp30 = -18.126
+      cp22 =   -27.927
+      cp23 =  -160.340
+      cp24 =     1.3566
+      cp25 =     0.37335
+      cp26 =    -0.05778
+      !
+      cp30 =   -18.126
       cp31 = -3070.75
-      cp32 = 17.27039
-      cp33 = 2.81197
-      cp34 = -44.99486
-      cp35 = -0.09984
-
-
-      !! Set coeff. for dissoc. of phosphate (Millero (1974)
-      !! ---------------------------------------------------
-      
-      cs10 = 117.385
+      cp32 =    17.27039
+      cp33 =     2.81197
+      cp34 =   -44.99486
+      cp35 =    -0.09984
+
+      ! Set coeff. for dissoc. of phosphate (Millero (1974)
+      ! ---------------------------------------------------
+      cs10 =   117.385
       cs11 = -8904.2
-      cs12 = -19.334
-      cs13 = -458.79
-      cs14 =  3.5913
-      cs15 = 188.74
-      cs16 = -1.5998
-      cs17 = -12.1652
-      cs18 = 0.07871
-      cs19 = 0.
-      cs20 = 1.
-      cs21 = -0.001005
-
-
-      !! Set volumetric solubility constants for o2 in ml/l (Weiss, 1970)
-      !! ----------------------------------------------------------------
-
+      cs12 =   -19.334
+      cs13 =  -458.79
+      cs14 =     3.5913
+      cs15 =   188.74
+      cs16 =    -1.5998
+      cs17 =   -12.1652
+      cs18 =     0.07871
+      cs19 =     0.e0
+      cs20 =     1.e0
+      cs21 =    -0.001005
+
+
+      ! Set volumetric solubility constants for o2 in ml/l (Weiss, 1970)
+      ! ----------------------------------------------------------------
       ox0 = -58.3877
-      ox1 = 85.8079
-      ox2 = 23.8439
-      ox3 = -0.034892
-      ox4 = 0.015568
-      ox5 = -0.0019387
-
-      !!  FROM THE NEW BIOOPTIC MODEL PROPOSED JM ANDRE, WE READ HERE
-      !!  A PRECOMPUTED ARRAY CORRESPONDING TO THE ATTENUATION COEFFICIENT
+      ox1 =  85.8079
+      ox2 =  23.8439
+      ox3 =  -0.034892
+      ox4 =   0.015568
+      ox5 =  -0.0019387
+
+      !  FROM THE NEW BIOOPTIC MODEL PROPOSED JM ANDRE, WE READ HERE
+      !  A PRECOMPUTED ARRAY CORRESPONDING TO THE ATTENUATION COEFFICIENT
 
       CALL ctlopn( numlight, 'kRGB61.txt', 'OLD', 'FORMATTED', 'SEQUENTIAL',   &
          &           1, numout, .TRUE., 1 )
       DO ichl = 1,61
-         READ(numlight,*) ztoto,(xkrgb(iband,ichl),iband = 1,3)
+         READ(numlight,*) ztoto, ( xkrgb(iband,ichl), iband = 1,3 )
       END DO
       CLOSE(numlight)
 
 
-      !!  Call p4zche to initialize the chemical constants
-      !!  ------------------------------------------------
-
-      CALL p4zche
-      !!
-      !!  Initialize a counter for the computation of chemistry
-      !!
-      ndayflxtr=0
+      CALL p4zche        ! initialize the chemical constants
+
+
+      ndayflxtr = 0      !  Initialize a counter for the computation of chemistry
+
 
       IF(lwp) WRITE(numout,*) ' Initialisation of PISCES done'
-
+      !
    END SUBROUTINE trc_ini
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trclsm.cfc.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trclsm.cfc.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trclsm.cfc.h90	(revision 763)
@@ -1,10 +1,20 @@
    !!----------------------------------------------------------------------
-   !!                    ***  trclsm.cfc.h90 ***
+   !!                     ***  trclsm.cfc.h90  ***  
+   !! TOP :   Definition some run parameter for CFC chemical model
    !!----------------------------------------------------------------------
+   !! History :   1.0  !  2003-08 (C. Ethe)  Original code
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id $ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
 CONTAINS
 
    SUBROUTINE trc_lsm
       !!-------------------------------------------------------------------
-      !!                  ***  ROUTINE trc_lsm ***
+      !!                  ***  ROUTINE trc_lsm  ***
       !!                 
       !! ** Purpose :   Definition some run parameter for CFC model
@@ -14,48 +24,29 @@
       !!
       !! ** input   :   Namelist namcfc
+      !!----------------------------------------------------------------------
+      CHARACTER (len=32) ::   clname = 'namelist.trc.sms'
+      INTEGER ::   numnat
       !!
-      !! history :
-      !!   2.0  !  03-08 (C. Ethe)  Original code
-      !!----------------------------------------------------------------------
-      !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-      !!----------------------------------------------------------------------
-
-      CHARACTER (len=32) ::  &
-         clname = 'namelist.trc.sms'
-      INTEGER ::  &
-         numnat
-
-      NAMELIST/namdates/ndate_beg, nyear_res
+      NAMELIST/namdates/ ndate_beg, nyear_res
       !!-------------------------------------------------------------------
 
-      ndate_beg = 300101
+      ndate_beg = 300101            ! default namelist value
       nyear_res = 1950
 
-      IF(lwp) THEN
-         WRITE(numout,*) ' '
-         WRITE(numout,*) ' Namelist for CFC model'
-         WRITE(numout,*) ' ***********************'
-         WRITE(numout,*) ' '
-      ENDIF
-
+      !                             ! Open namelist file
       CALL ctlopn( numnat, clname, 'OLD', 'FORMATTED', 'SEQUENTIAL',   &
          &           1, numout, .FALSE., 1 )
-      READ( numnat , namdates )
+         
+      READ( numnat , namdates )     ! read namelist
 
-      IF(lwp) THEN
+      IF(lwp) THEN                  ! control print
          WRITE(numout,*)
-         WRITE(numout,*) ' trc_lsm: Namelist parameter'
-         WRITE(numout,*) ' ~~~~~~~~~~~~~~'
-         WRITE(numout,*) '  initial calendar date (aammjj) for CFC  ndate_beg = ', ndate_beg
-         WRITE(numout,*) '  restoring time constant (year)          nyear_res = ', nyear_res
+         WRITE(numout,*) ' trc_lsm: Read namdates, namelist for CFC chemical model'
+         WRITE(numout,*) ' ~~~~~~~'
+         WRITE(numout,*) '    initial calendar date (aammjj) for CFC  ndate_beg = ', ndate_beg
+         WRITE(numout,*) '    restoring time constant (year)          nyear_res = ', nyear_res
       ENDIF
       nyear_beg = ndate_beg / 10000
-      IF(lwp) THEN
-         WRITE(numout,*) '  initial year (aa)                       nyear_beg = ', nyear_beg
-         WRITE(numout,*) ' '
-      ENDIF
-
+      IF(lwp) WRITE(numout,*) '    initial year (aa)                       nyear_beg = ', nyear_beg
+      !
    END SUBROUTINE trc_lsm
-
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trclsm.lobster1.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trclsm.lobster1.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trclsm.lobster1.h90	(revision 763)
@@ -1,69 +1,58 @@
-!!----------------------------------------------------------------------
-!!                    ***  trclsm.lobster1.h90 ***
-!!----------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !!                     ***  trclsm.lobster1.h90  ***  
+   !! TOP :   Definition some run parameter for LOBSTER biological model
+   !!----------------------------------------------------------------------
+   !! History :    -  !  1999-10 (M.A. Foujols, M. Levy) original code
+   !!              -  !  2000-12 (O. Aumont, E. Kestenare) add sediments
+   !!             1.0 !  2003-08 (C. Ethe)  Original code
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id $ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
 CONTAINS
 
    SUBROUTINE trc_lsm
       !!----------------------------------------------------------------------
-      !!                        trclsm.lobster1.h
-      !!                     **********************
+      !!                     ***  trc_lsm  ***  
       !!
-      !!  PURPOSE :
-      !!  ---------
-      !!     READS the specific NAMELIST for LOBSTER1 model
+      !! ** Purpose :   read LOBSTER namelist
       !!
-      !!   WORKSPACE :                : no
-      !!   ---------
+      !! ** input   :   file 'namelist.trc.sms' containing the following
+      !!             namelist: natbio, natopt, and natdbi ("key_trc_diabio")
+      !!----------------------------------------------------------------------
+      CHARACTER (len=32) :: clname
       !!
-      !!   MODIFICATIONS:
-      !!   --------------
-      !!      original  : 99-10 (M.A. Foujols, M. Levy) passive tracer
-      !!      additions : 00-12 (O. Aumont, E. Kestenare) add sediments
-      !! ----------------------------------------------------------------------
-      !! local declarations
-      !! ==================
-      CHARACTER (len=32) :: clname
-
-      !!---------------------------------------------------------------------
-      !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-      !!---------------------------------------------------------------------
-
-      ! 0. initializations
-      ! ------------------
-     NAMELIST/natbio/apmin,azmin,anmin,admin,   &
-      &   redf,reddom,slopet,toptp,psinut,akno3,aknh4,rcchl,        &
-      &   rgamma,toptgz,tmaxgz,rgz,             &
-      &   rppz,taus,aks,filmax,rpnaz,rdnaz,eggzoo,tauzn,   &
-      &   tmmaxp,tmminp,tmmaxz,tmminz,anumin,afdmin,taudn,   &
-      &   vsed,tmumax,aki,tmaxr,tminr, taunn, taudomn,xhr,   &
-      &   sedlam, sedlostpoc,  &
-      &    fphylab,fzoolab,fdetlab,fdbod
-      NAMELIST/natopt/xkg0,xkr0,xkgp,xkrp,xlg,xlr,rpig
+      NAMELIST/natbio/ apmin, azmin, anmin, admin,                       &
+         &   redf, reddom, slopet, toptp, psinut, akno3, aknh4, rcchl,   &
+         &   rgamma, toptgz, tmaxgz, rgz,                                &
+         &   rppz, taus, aks, filmax, rpnaz, rdnaz, eggzoo, tauzn,       &
+         &   tmmaxp, tmminp, tmmaxz, tmminz, anumin, afdmin, taudn,      &
+         &   vsed, tmumax, aki, tmaxr, tminr, taunn, taudomn, xhr,       &
+         &   sedlam, sedlostpoc,                                         &
+         &   fphylab, fzoolab, fdetlab, fdbod
+      NAMELIST/natopt/ xkg0, xkr0, xkgp, xkrp, xlg, xlr, rpig
 #if defined key_trc_diabio
       INTEGER :: ji
       NAMELIST/natdbi/ctrbio,ctrbil,ctrbiu,nwritebio
 #endif
-
-      IF(lwp) THEN
-         WRITE(numout,*) ' '
-         WRITE(numout,*) ' ROUTINE trclsm'
-         WRITE(numout,*) ' **************'
-         WRITE(numout,*) ' '
-         WRITE(numout,*) ' namelist for lobster1 model'
-         WRITE(numout,*) ' ***************************'
-         WRITE(numout,*) ' '
-      ENDIF
-
-
+      !!----------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' trc_lsm : read LOBSTER 1 namelists'
+      IF(lwp) WRITE(numout,*) ' ~~~~~~~'
+
+      !                               ! Open the namelist file
+      !                               ! ----------------------
       clname ='namelist.trc.sms'
       CALL ctlopn( numnat, clname, 'OLD', 'FORMATTED', 'SEQUENTIAL',   &
          &           1, numout, .FALSE., 1 )
 
-      ! 1.4 namelist natbio : biological parameters
-      ! -------------------------------------------
-
-      apmin = 0.
+      !                               ! natbio : biological parameters
+      !                               ! ------------------------------
+      apmin = 0.                           ! default values
       azmin = 0.
       anmin = 0.
@@ -111,110 +100,58 @@
       fdbod = 0.
 
-      READ(numnat,natbio)
+      REWIND( numnat )                     ! read natbio
+      READ  ( numnat, natbio )
 
       IF(lwp) THEN
-          WRITE(numout,*) 'natbio'
-          WRITE(numout,*) ' '
-          WRITE(numout,*)     &
-          &   ' minimum phytoplancton concentration  apmin =', apmin
-          WRITE(numout,*)     &
-          &   ' minimum zooplancton   concentration  azmin =', azmin
-          WRITE(numout,*)     &
-          &   ' minimum nutrients     concentration  anmin =', anmin
-          WRITE(numout,*)     &
-          &   ' minimum detritus      concentration  admin =', admin
-          WRITE(numout,*)     &
-          &   ' redfield ratio  c:n                   redf =', redf
-          WRITE(numout,*)     &
-          &   ' van t hoff coefficient              slopet =', slopet
-          WRITE(numout,*)     &
-          &   ' optimal photosynthesis temperature   toptp =', toptp
-          WRITE(numout,*)     &
-          &   ' inhibition of no3 uptake by nh4      psinut =', psinut
-          WRITE(numout,*)     &
-          &   ' half-saturation nutrient for no3 uptake   akno3 =', akno3
-          WRITE(numout,*)     &
-          &   ' half-saturation nutrient for nh4 uptake   aknh4 =', aknh4
-          WRITE(numout,*)     &
-          &   ' carbone/chlorophyl ratio             rcchl =', rcchl
-          WRITE(numout,*)     &
-          &   ' phytoplankton exudation fraction    rgamma =', rgamma
-          WRITE(numout,*)     &
-          &   ' optimal temperature for zoo growth  toptgz =', toptgz
-          WRITE(numout,*)     &
-          &   ' maximal temperature for zoo growth  tmaxgz =', tmaxgz
-          WRITE(numout,*)     &
-          &   ' widtht of zoo temperature FUNCTION     rgz =', rgz
-          WRITE(numout,*)     &
-          &   ' zoo preference for phyto              rppz =', rppz
-          WRITE(numout,*)     &
-          &   ' maximal zoo grazing rate              taus =',86400*taus
-          WRITE(numout,*)     &
-          &   ' half saturation constant for zoo food  aks =', aks
-          WRITE(numout,*)     &
-          &   ' maximal mass clearance rate for zoo filmax =', filmax
-          WRITE(numout,*)     &
-          &   ' non-assimilated phyto by zoo         rpnaz =', rpnaz
-          WRITE(numout,*)     &
-          &   ' non-assimilated detritus by zoo      rdnaz =', rdnaz
-          WRITE(numout,*)     &
-          &   ' minimum  for zoo concentration      eggzoo =', eggzoo
-          WRITE(numout,*)     &
-          &   ' zoo specific excretion rate          tauzn =',86400   &
-          &   *tauzn
-          WRITE(numout,*)     &
-          &   ' maximal phyto mortality rate        tmmaxp =',86400   &
-          &   *tmmaxp
-          WRITE(numout,*)     &
-          &   ' minimal phyto mortality rate        tmminp =',86400   &
-          &   *tmminp
-          WRITE(numout,*)     &
-          &   ' maximal zoo mortality rate          tmmaxz =',86400   &
-          &   *tmmaxz
-          WRITE(numout,*)     &
-          &   ' minimal zoo mortality rate          tmminz =',86400   &
-          &   *tmminz
-          WRITE(numout,*)     &
-          &   ' nutrient threshold for phyto mort   anumin =', anumin
-          WRITE(numout,*)     &
-          &   ' food threshold for zoo mort         afdmin =', afdmin
-          WRITE(numout,*)     &
-          &   ' detrital breakdown rate              taudn =',86400   &
-          &   *taudn
-          WRITE(numout,*)     &
-          &   ' detritus sedimentation speed          vsed =',86400*vsed
-          WRITE(numout,*)     &
-          &   ' phyto max growth rate               tmumax =',86400   &
-          &   *tmumax
-          WRITE(numout,*)     &
-          &   ' light hlaf saturation constant         aki =', aki
-          WRITE(numout,*)     &
-          &   ' maximum damping for d z or p         tmaxr =', tmaxr
-          WRITE(numout,*)     &
-          &   ' damping-remineralisation rate        tminr =', tminr
-          WRITE(numout,*)     & 
-          &   ' nitrification rate                   taunn =', taunn
-          WRITE(numout,*)     & 
-          &   ' dom remineralisation rate          taudomn =', taudomn
-          WRITE(numout,*)     & 
-          &   ' coeff for martin''s remineralistion    xhr =', xhr
-          WRITE(numout,*)     & 
-          &   ' time coeff of POC in sediments      sedlam =', sedlam
-          WRITE(numout,*)     &
-          &   ' Sediment geol loss for POC  sedlostpoc =', sedlostpoc
-          WRITE(numout,*)     &
-          & ' NH4 fraction of phytoplankton exsudation fphylab =', fphylab
-          WRITE(numout,*)     &
-          & ' NH4 fraction of zooplankton excretion fzoolab =', fzoolab
-          WRITE(numout,*)     &
-          & ' NH4 fraction of detritus dissolution  fdetlab =', fdetlab
-          WRITE(numout,*)     &
-          & ' Zooplankton mortality fraction that goes to detritus fdbod =', fdbod
+          WRITE(numout,*) ' Namelist natbio'
+          WRITE(numout,*) '    minimum phytoplancton concentration                  apmin     =', apmin
+          WRITE(numout,*) '    minimum zooplancton   concentration                  azmin     =', azmin
+          WRITE(numout,*) '    minimum nutrients     concentration                  anmin     =', anmin
+          WRITE(numout,*) '    minimum detritus      concentration                  admin     =', admin
+          WRITE(numout,*) '    redfield ratio  c:n                                  redf      =', redf
+          WRITE(numout,*) '    van t hoff coefficient                               slopet    =', slopet
+          WRITE(numout,*) '    optimal photosynthesis temperature                   toptp     =', toptp
+          WRITE(numout,*) '    inhibition of no3 uptake by nh4                      psinut    =', psinut
+          WRITE(numout,*) '    half-saturation nutrient for no3 uptake              akno3     =', akno3
+          WRITE(numout,*) '    half-saturation nutrient for nh4 uptake              aknh4     =', aknh4
+          WRITE(numout,*) '    carbone/chlorophyl ratio                             rcchl     =', rcchl
+          WRITE(numout,*) '    phytoplankton exudation fraction                     rgamma    =', rgamma
+          WRITE(numout,*) '    optimal temperature for zoo growth                   toptgz    =', toptgz
+          WRITE(numout,*) '    maximal temperature for zoo growth                   tmaxgz    =', tmaxgz
+          WRITE(numout,*) '    widtht of zoo temperature FUNCTION                   rgz       =', rgz
+          WRITE(numout,*) '    zoo preference for phyto                             rppz      =', rppz
+          WRITE(numout,*) '    maximal zoo grazing rate                             taus      =', 86400 * taus, ' d'
+          WRITE(numout,*) '    half saturation constant for zoo food                aks       =', aks
+          WRITE(numout,*) '    maximal mass clearance rate for zoo                  filmax    =', filmax
+          WRITE(numout,*) '    non-assimilated phyto by zoo                         rpnaz     =', rpnaz
+          WRITE(numout,*) '    non-assimilated detritus by zoo                      rdnaz     =', rdnaz
+          WRITE(numout,*) '    minimum  for zoo concentration                       eggzoo    =', eggzoo
+          WRITE(numout,*) '    zoo specific excretion rate                          tauzn     =', 86400 * tauzn
+          WRITE(numout,*) '    maximal phyto mortality rate                         tmmaxp    =', 86400 * tmmaxp
+          WRITE(numout,*) '    minimal phyto mortality rate                         tmminp    =', 86400 * tmminp
+          WRITE(numout,*) '    maximal zoo mortality rate                           tmmaxz    =', 86400 * tmmaxz
+          WRITE(numout,*) '    minimal zoo mortality rate                           tmminz    =', 86400 * tmminz
+          WRITE(numout,*) '    nutrient threshold for phyto mort                    anumin    =', anumin
+          WRITE(numout,*) '    food threshold for zoo mort                          afdmin    =', afdmin
+          WRITE(numout,*) '    detrital breakdown rate                              taudn     =', 86400 * taudn , ' d'
+          WRITE(numout,*) '    detritus sedimentation speed                         vsed      =', 86400 * vsed  , ' d'
+          WRITE(numout,*) '    phyto max growth rate                                tmumax    =', 86400 * tmumax, ' d'
+          WRITE(numout,*) '    light hlaf saturation constant                       aki       =', aki
+          WRITE(numout,*) '    maximum damping for d z or p                         tmaxr     =', tmaxr
+          WRITE(numout,*) '    damping-remineralisation rate                        tminr     =', tminr
+          WRITE(numout,*) '    nitrification rate                                   taunn     =', taunn
+          WRITE(numout,*) '    dom remineralisation rate                            taudomn   =', taudomn
+          WRITE(numout,*) '    coeff for martin''s remineralistion                  xhr       =', xhr
+          WRITE(numout,*) '    time coeff of POC in sediments                       sedlam    =', sedlam
+          WRITE(numout,*) '    Sediment geol loss for POC                           sedlostpoc=', sedlostpoc
+          WRITE(numout,*) '    NH4 fraction of phytoplankton exsudation             fphylab   =', fphylab
+          WRITE(numout,*) '    NH4 fraction of zooplankton excretion                fzoolab   =', fzoolab
+          WRITE(numout,*) '    NH4 fraction of detritus dissolution                 fdetlab   =', fdetlab
+          WRITE(numout,*) '    Zooplankton mortality fraction that goes to detritus fdbod     =', fdbod
       ENDIF
 
-      ! 1.5 namelist natopt : parameters for optic
-      ! ------------------------------------------
-
-      xkg0  = 0.
+      !                               ! natopt : optical parameters
+      !                               ! ---------------------------
+      xkg0  = 0.                           ! default values
       xkr0  = 0.
       xkgp  = 0.
@@ -224,57 +161,45 @@
       rpig  = 0.
 
-      READ(numnat,natopt)
+      REWIND( numnat )                     ! read natopt
+      READ  ( numnat, natopt )       
+
+      IF(lwp) THEN                         ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist natopt'
+         WRITE(numout,*) '    green   water absorption coeff                       xkg0  = ', xkg0
+         WRITE(numout,*) '    red water absorption coeff                           xkr0  = ', xkr0
+         WRITE(numout,*) '    pigment red absorption coeff                         xkrp  = ', xkrp
+         WRITE(numout,*) '    pigment green absorption coeff                       xkgp  = ', xkgp
+         WRITE(numout,*) '    green chl exposant                                   xlg   = ', xlg
+         WRITE(numout,*) '    red   chl exposant                                   xlr   = ', xlr
+         WRITE(numout,*) '    chla/chla+phea ratio                                 rpig  = ', rpig
+      ENDIF
+
+#if defined key_trc_diabio
+
+      !                               ! natdbi : bio diagnostics
+      !                               ! ------------------------
+      nwritebio = 10                     ! default values
+      DO ji = 1, jpdiabio
+         IF(     ji <  10 ) THEN   ;   WRITE (ctrbio(ji),'("BIO_",I1)') ji      ! short name
+         ELSEIF (ji < 100 ) THEN   ;   WRITE (ctrbio(ji),'("BIO_",I2)') ji   
+         ELSE                      ;   WRITE (ctrbio(ji),'("BIO_",I3)') ji
+         ENDIF
+         WRITE(ctrbil(ji),'("BIOLOGICAL TREND NUMBER ",I2)') ji                 ! long name
+         ctrbiu(ji) = 'mmoleN/m3/s '                                            ! units
+      END DO
+
+      REWIND( numnat )                     ! read natdbi
+      READ  ( numnat, natdbi )  
 
       IF(lwp) THEN
-         WRITE(numout,*) 'natopt'
-         WRITE(numout,*) ' '
-         WRITE(numout,*) ' green   water absorption coeff  xkg0  = ',xkg0
-         WRITE(numout,*) ' red water absorption coeff      xkr0  = ',xkr0
-         WRITE(numout,*) ' pigment red absorption coeff    xkrp  = ',xkrp
-         WRITE(numout,*) ' pigment green absorption coeff  xkgp  = ',xkgp
-         WRITE(numout,*) ' green chl exposant              xlg   = ',xlg
-         WRITE(numout,*) ' red   chl exposant              xlr   = ',xlr
-         WRITE(numout,*) ' chla/chla+phea ratio            rpig  = ',rpig
-         WRITE(numout,*) ' '
-
-      ENDIF
-
-#if defined key_trc_diabio
-
-      ! NAMELIST : natdbi 
-
-      ! default name for biological trends : short and long name, units
-
-      DO ji=1,jpdiabio
-         IF (ji < 10) THEN 
-            WRITE (ctrbio(ji),'("BIO_",I1)') ji
-         ELSE IF (ji < 100) THEN
-            WRITE (ctrbio(ji),'("BIO_",I2)') ji
-         ELSE
-            WRITE (ctrbio(ji),'("BIO_",I3)') ji
-         ENDIF
-         WRITE (ctrbil(ji),'("BIOLOGICAL TREND NUMBER ",I2)') ji
-         ctrbiu(ji)='mmoleN/m3/s '
-      END DO
-
-      nwritebio = 10
-
-      READ(numnat,natdbi)
-
-      IF(lwp) THEN
-         WRITE(numout,*) 'natdbi'
-         WRITE(numout,*) ' '
-         WRITE(numout,*)      &
-            &   ' frequency of outputs for biological outputs = '    &
-            &   ,nwritebio
-         WRITE(numout,*) ' '
-         DO ji=1,jpdiabio
-            WRITE(numout,*)     &
-               &   'name of biological trend number :',ji,' : ',ctrbio(ji)  
-            WRITE(numout,*) ctrbil(ji)  
-            WRITE(numout,*) ' in unit = ',ctrbiu(ji)
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist natdbi'
+         WRITE(numout,*) '    frequency of outputs for biological outputs  nwritebio = ', nwritebio
+         DO ji = 1, jpdiabio
+            WRITE(numout,*) '     name of biological trend No :',ji,' : ',ctrbio(ji), ctrbil(ji), ' in ', ctrbiu(ji)
          END DO
       END IF
 #endif
-
+      !
    END SUBROUTINE trc_lsm
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trclsm.pisces.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trclsm.pisces.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trclsm.pisces.h90	(revision 763)
@@ -1,256 +1,189 @@
-!!----------------------------------------------------------------------
-!!                    ***  trclsm.pisces.h90 ***
-!!----------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !!                     ***  trclsm.pisces.h90  ***  
+   !! TOP :   Definition some run parameter for PISCES biological model
+   !!----------------------------------------------------------------------
+   !! History :    -  !  1999-10 (M.A. Foujols, M. Levy) original code
+   !!              -  !  2000-01 (L. Bopp) hamocc3, p3zd
+   !!             1.0 !  2003-08 (C. Ethe)  module F90
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id $ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
 CONTAINS
 
    SUBROUTINE trc_lsm
       !!----------------------------------------------------------------------
+      !!                     ***  trc_lsm  ***  
       !!
-      !!                       trclsm.pisces.h
-      !!                       ****************
+      !! ** Purpose :   read PISCES namelist
       !!
-      !!  PURPOSE :
-      !!  ---------
-      !!     READs and PRINT options for PISCES namelist
+      !! ** input   :   file 'namelist.trc.sms' containing the following
+      !!             namelist: natext, natbio, natsms
+      !!                       natkriest ("key_trc_kriest")
+      !!----------------------------------------------------------------------
+      CHARACTER (len=32) ::   clname
       !!
-      !!   MODIFICATIONS:
-      !!   --------------
-      !!      original  : 99-10 (M.A. Foujols, M. Levy) passive tracer
-      !!      addition  : 00-01 (L. Bopp) hamocc3,p3zd
-      !!     
-      !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
-      !! local declarations
-      !! ==================
-      CHARACTER (len=32) clname
-
-      !!---------------------------------------------------------------------
-      !!  TOP 1.0 , LOCEAN-IPSL (2005) 
-   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/SMS/trclsm.pisces.h90,v 1.7 2007/10/17 14:50:13 opalod Exp $ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-      !!---------------------------------------------------------------------
-
-      ! 0. initializations
-      ! ------------------
-      !
       NAMELIST/natext/ atcco2
-      NAMELIST/natbio/caco3r, kdca, nca, part,                       &
-         &          dispo0,conc0,oxymin,grosip, nrdttrc,              &
-         &          pislope, excret,wsbio,wchl,wchld,resrat,mprat,mzrat,   &
-         &          grazrat,xprefc,xprefp,unass,xkgraz,xkmort,xksi1, &
-         &          xksi2,xremip,xremik,xsirem,xkdoc1,xkdoc2, &
-         &          excret2,resrat2,mprat2,mpratm,mzrat2,grazrat2,   &
-         &          xprefz,xprefpoc,unass2,xkgraz2,xlam1,      &
-         &          ferat3,conc1,conc2,conc3,concnnh4,concdnh4,      &
-         &          nitrif,epsher,epsher2,pislope2,wsbio2,sigma1,    &
-         &          sigma2, zprefc, zprefp, zprefd,fecnm,fecdm,      &
-         &          chlcnm,chlcdm, sedfeinput
+      NAMELIST/natbio/ caco3r, kdca, nca, part,                               &
+         &             dispo0,conc0,oxymin,grosip, nrdttrc,                   &
+         &             pislope, excret,wsbio,wchl,wchld,resrat,mprat,mzrat,   &
+         &             grazrat,xprefc,xprefp,unass,xkgraz,xkmort,xksi1,       &
+         &             xksi2,xremip,xremik,xsirem,xkdoc1,xkdoc2,              &
+         &             excret2,resrat2,mprat2,mpratm,mzrat2,grazrat2,         &
+         &             xprefz, xprefpoc, unass2, xkgraz2, xlam1,              &
+         &             ferat3,conc1,conc2,conc3,concnnh4,concdnh4,            &
+         &             nitrif,epsher,epsher2,pislope2,wsbio2,sigma1,          &
+         &             sigma2, zprefc, zprefp, zprefd,fecnm,fecdm,            &
+         &             chlcnm,chlcdm, sedfeinput
       NAMELIST/natsms/bdustfer, briver, bndepo, bsedinput
 #if defined key_trc_kriest
-      NAMELIST/natkriest/xkr_eta,xkr_zeta,xkr_sfact,xkr_mass_min,xkr_mass_max,&
-         &               xkr_dnano,xkr_ddiat,xkr_dmeso,xkr_daggr,xkr_stick
+      NAMELIST/natkriest/ xkr_eta  , xkr_zeta , xkr_sfact, xkr_mass_min, xkr_mass_max,   &
+         &                xkr_dnano, xkr_ddiat, xkr_dmeso, xkr_daggr   , xkr_stick
 #endif
-
-      ! initialize the number of LOGICAL UNIT used
-      ! ------------------------------------------
-
-      IF(lwp) THEN
-         WRITE(numout,*) ' '
-         WRITE(numout,*) ' ROUTINE trclec'
-         WRITE(numout,*) ' **************'
-         WRITE(numout,*) ' '
-         WRITE(numout,*) ' namelist for PISCES model'
-         WRITE(numout,*) ' ***********************'
-         WRITE(numout,*) ' '
-      ENDIF
-
+      !!----------------------------------------------------------------------
+
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' trc_lsm : read PISCES namelists'
+      IF(lwp) WRITE(numout,*) ' ~~~~~~~'
+
+
+      !                               ! Open the namelist file
+      !                               ! ----------------------
       clname ='namelist.trc.sms'
       CALL ctlopn( numnat, clname, 'OLD', 'FORMATTED', 'SEQUENTIAL',   &
          &           1, numout, .FALSE., 1 )
 
-      ! 1 Namelist natext :
-      ! -------------------
-      READ(numnat,natext)
-
+      !                               ! natext : Atmospheric parameters
+      !                               ! -------------------- ----------
+      REWIND( numnat )                     ! read natext
+      READ  ( numnat, natext )
+
+      IF(lwp) THEN                         ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : natext'
+         WRITE(numout,*) '    atmospheric pCO2                         atcco2 = ',atcco2
+      ENDIF
+
+
+      !                               ! natbio : biological parameters
+      !                               ! ------------------------------
+      REWIND( numnat )                     ! read natbio
+      READ  ( numnat, natbio )
+
+      IF(lwp) THEN                         ! control print
+         WRITE(numout,*) ' Namelist : natbio'
+         WRITE(numout,*) '    mean rainratio                            caco3r    =', caco3r
+         WRITE(numout,*) '    diss. rate constant calcite (per month)   kdca      =', kdca
+         WRITE(numout,*) '    order of reaction for calcite dissolution nca       =', nca
+         WRITE(numout,*) '    part of calcite not dissolved in guts     part      =', part
+         WRITE(numout,*) '    mean Si/C ratio                           grosip    =', grosip
+         WRITE(numout,*) '    Calcite dissolution half saturation       dispo0    =', dispo0
+         WRITE(numout,*) '    Phosphate half saturation                 conc0     =', conc0
+         WRITE(numout,*) '    frequence pour la biologie                nrdttrc   =', nrdttrc
+         WRITE(numout,*) '    P-I slope                                 pislope   =', pislope
+         WRITE(numout,*) '    excretion ratio of phytoplankton          excret    =', excret
+         WRITE(numout,*) '    POC sinking speed                         wsbio     =', wsbio
+         WRITE(numout,*) '    quadratic mortality of phytoplankton      wchl      =', wchl
+         WRITE(numout,*) '    maximum quadratic mortality of diatoms    wchld     =', wchld
+         WRITE(numout,*) '    exsudation rate of zooplankton            resrat    =', resrat
+         WRITE(numout,*) '    phytoplankton mortality rate              mprat     =', mprat
+         WRITE(numout,*) '    zooplankton mortality rate                mzrat     =', mzrat
+         WRITE(numout,*) '    zoo preference for phyto                  xprefc    =', xprefc
+         WRITE(numout,*) '    zoo preference for POC                    xprefp    =', xprefp
+         WRITE(numout,*) '    maximal zoo grazing rate                  grazrat   =', grazrat
+         WRITE(numout,*) '    non assimilated fraction of phyto by zoo  unass     =', unass
+         WRITE(numout,*) '    half sturation constant for grazing       xkgraz    =', xkgraz
+         WRITE(numout,*) '    half saturation constant for mortality    xkmort    =', xkmort
+         WRITE(numout,*) '    half saturation constant for Si uptake    xksi1     =', xksi1
+         WRITE(numout,*) '    half saturation constant for Si/C         xksi2     =', xksi2
+         WRITE(numout,*) '    remineralisation rate of POC              xremip    =', xremip
+         WRITE(numout,*) '    remineralization rate of DOC              xremik    =', xremik
+         WRITE(numout,*) '    remineralization rate of Si               xsirem    =', xsirem 
+         WRITE(numout,*) '    1st half-sat. of DOC remineralization     xkdoc1    =', xkdoc1
+         WRITE(numout,*) '    2nd half-sat. of DOC remineralization     xkdoc2    =', xkdoc2
+         WRITE(numout,*) '    excretion ratio of diatoms                excret2   =', excret2
+         WRITE(numout,*) '    exsudation rate of mesozooplankton        resrat2   =', resrat2
+         WRITE(numout,*) '    Diatoms mortality rate                    mprat2    =', mprat2
+         WRITE(numout,*) '    Phytoplankton minimum mortality rate      mpratm    =', mpratm
+         WRITE(numout,*) '    mesozooplankton mortality rate            mzrat2    =', mzrat2
+         WRITE(numout,*) '    zoo preference for zoo                    xprefz    =', xprefz
+         WRITE(numout,*) '    zoo preference for poc                    xprefpoc  =', xprefpoc
+         WRITE(numout,*) '    maximal mesozoo grazing rate              grazrat2  =', grazrat2
+         WRITE(numout,*) '    non assimilated fraction of P by mesozoo  unass2    =', unass2
+         WRITE(numout,*) '    Efficicency of Mesozoo growth             epsher2   =', epsher2 
+         WRITE(numout,*) '    Efficiency of microzoo growth             epsher    =', epsher
+         WRITE(numout,*) '    half sturation constant for grazing 2     xkgraz2   =', xkgraz2
+         WRITE(numout,*) '    Maximum aggregation rate for diatoms      wchld     =', wchld
+         WRITE(numout,*) '    scavenging rate of Iron                   xlam1     =', xlam1
+         WRITE(numout,*) '    Fe/C in zooplankton                       ferat3    =', ferat3
+         WRITE(numout,*) '    Phosphate half saturation for diatoms     conc1     =', conc1
+         WRITE(numout,*) '    Iron half saturation for phyto            conc2     =', conc2
+         WRITE(numout,*) '    Iron half saturation for diatoms          conc3     =', conc3
+         WRITE(numout,*) '    NH4 half saturation for phyto             concnnh4  =', concnnh4
+         WRITE(numout,*) '    NH4 half saturation for diatoms           concdnh4  =', concdnh4
+         WRITE(numout,*) '    NH4 nitrification rate                    nitrif    =', nitrif
+         WRITE(numout,*) '    P-I slope  for diatoms                    pislope2  =', pislope2
+         WRITE(numout,*) '    Big particles sinking speed               wsbio2    =', wsbio2
+         WRITE(numout,*) '    Fraction of microzoo excretion as DOM     sigma1    =', sigma1
+         WRITE(numout,*) '    Fraction of mesozoo excretion as DOM      sigma2    =', sigma2
+         WRITE(numout,*) '    Microzoo preference for POM               zprefc    =', zprefc
+         WRITE(numout,*) '    Microzoo preference for Nanophyto         zprefp    =', zprefp
+         WRITE(numout,*) '    Microzoo preference for Diatoms           zprefd    =', zprefd
+         WRITE(numout,*) '    Minimum Chl/C in nanophytoplankton        chlcnm    =', chlcnm
+         WRITE(numout,*) '    Minimum Chl/C in diatoms                  chlcdm    =', chlcdm
+         WRITE(numout,*) '    Maximum Fe/C in nanophytoplankton         fecnm     =', fecnm
+         WRITE(numout,*) '    Minimum Fe/C in diatoms                   fecdm     =', fecdm
+         WRITE(numout,*) '    Coastal release of Iron                   sedfeinput=', sedfeinput
+      ENDIF
+
+      !                               ! natsms : SMS parameters
+      !                               ! -----------------------
+      REWIND( numnat )                     ! read natsms
+      READ  ( numnat, natsms )
       IF(lwp) THEN
          WRITE(numout,*) ' '
-         WRITE(numout,*) 'natext'
-         WRITE(numout,*) ' '
-         WRITE(numout,*) 'atmospheric pCO2= ',atcco2
-         WRITE(numout,*) ' '
+         WRITE(numout,*) ' Namelist : natsms'
+         WRITE(numout,*) '    Dust input from the atmosphere           bdustfer  = ', bdustfer
+         WRITE(numout,*) '    River input of nutrients                 briver    = ', briver
+         WRITE(numout,*) '    Atmospheric deposition of N              bndepo    = ', bndepo
+         WRITE(numout,*) '    Fe input from sediments                  bsedinput = ', bsedinput
       ENDIF
 
-
-      READ(numnat,natbio)
+#if defined key_trc_kriest
+
+      !                               ! natkriest : kriest parameters
+      !                               ! -----------------------------
+      REWIND( numnat )                     ! read natkriest
+      READ  ( numnat, natkriest )
+
       IF(lwp) THEN
-         WRITE(numout,*) 'natbio'
-         WRITE(numout,*) ' '
-         WRITE(numout,*)      &
-            &   ' mean rainratio                             =', caco3r
-         WRITE(numout,*)      &
-            &   ' diss. rate constant calcite (per month)    =', kdca
-         WRITE(numout,*)      &
-            &   ' order of reaction for calcite dissolution  =', nca
-         WRITE(numout,*)      &
-            &   ' part of calcite not dissolved in guts      =', part
-         WRITE(numout,*)      &
-            &   ' mean Si/C ratio                            =', grosip
-         WRITE(numout,*)      &
-            &   ' Calcite dissolution half saturation        =', dispo0
-         WRITE(numout,*)      &
-            &   ' Phosphate half saturation                  =', conc0
-         WRITE(numout,*)      &
-            &   ' frequence pour la biologie                 =', nrdttrc
-         WRITE(numout,*)      &
-            &   ' P-I slope                                  =', pislope
-         WRITE(numout,*)      &
-            &   ' excretion ratio of phytoplankton           =', excret
-         WRITE(numout,*)      &
-            &   ' POC sinking speed                          =', wsbio
-         WRITE(numout,*)      &
-            &   ' quadratic mortality of phytoplankton       =', wchl
-         WRITE(numout,*)      &
-            &   ' maximum quadratic mortality of diatoms     =', wchld
-         WRITE(numout,*)      &
-            &   ' exsudation rate of zooplankton             =', resrat
-         WRITE(numout,*)      &
-            &   ' phytoplankton mortality rate               =', mprat
-         WRITE(numout,*)      &
-            &   ' zooplankton mortality rate                 =', mzrat
-         WRITE(numout,*)      &
-            &   ' zoo preference for phyto                   =', xprefc
-         WRITE(numout,*)      &
-            &   ' zoo preference for POC                     =', xprefp
-         WRITE(numout,*)      &
-            &   ' maximal zoo grazing rate                   =', grazrat
-         WRITE(numout,*)      &
-            &   ' non assimilated fraction of phyto by zoo   =', unass
-         WRITE(numout,*)      &
-            &   ' half sturation constant for grazing        =', xkgraz
-         WRITE(numout,*)      &
-            &   ' half saturation constant for mortality     =', xkmort
-         WRITE(numout,*)      &
-            &   ' half saturation constant for Si uptake     =', xksi1
-         WRITE(numout,*)      &
-            &   ' half saturation constant for Si/C          =', xksi2
-         WRITE(numout,*)      &
-            &   ' remineralisation rate of POC               =', xremip
-         WRITE(numout,*)      &
-            &   ' remineralization rate of DOC               =', xremik
-         WRITE(numout,*)      & 
-            &   ' remineralization rate of Si                =', xsirem 
-         WRITE(numout,*)      &
-            &   ' 1st half-sat. of DOC remineralization      =', xkdoc1
-         WRITE(numout,*)      &
-            &   ' 2nd half-sat. of DOC remineralization      =', xkdoc2
-         WRITE(numout,*)      &
-            &   ' excretion ratio of diatoms                 =', excret2
-         WRITE(numout,*)      &
-            &   ' exsudation rate of mesozooplankton         =', resrat2
-         WRITE(numout,*)      &
-            &   ' Diatoms mortality rate                     =', mprat2
-         WRITE(numout,*)      &
-            &   ' Phytoplankton minimum mortality rate       =', mpratm
-         WRITE(numout,*)      &
-            &   ' mesozooplankton mortality rate             =', mzrat2
-         WRITE(numout,*)      &
-            &   ' zoo preference for zoo                     =', xprefz
-         WRITE(numout,*)      &
-            &   ' zoo preference for poc                   =', xprefpoc
-         WRITE(numout,*)      &
-            &   ' maximal mesozoo grazing rate               =', grazrat2
-         WRITE(numout,*)      &
-            &   ' non assimilated fraction of P by mesozoo   =', unass2
-         WRITE(numout,*)      &
-            &   ' Efficicency of Mesozoo growth              =', epsher2 
-         WRITE(numout,*)      &
-            &   ' Efficiency of microzoo growth              =', epsher
-         WRITE(numout,*)      &
-            &   ' half sturation constant for grazing 2      =', xkgraz2
-         WRITE(numout,*)      &
-            &   ' Maximum aggregation rate for diatoms       =', wchld
-         WRITE(numout,*)      &
-            &   ' scavenging rate of Iron                    =', xlam1
-         WRITE(numout,*)      &
-            &   ' Fe/C in zooplankton                        =', ferat3
-         WRITE(numout,*)      &
-            &   ' Phosphate half saturation for diatoms      =', conc1
-         WRITE(numout,*)      &
-            &   ' Iron half saturation for phyto             =', conc2
-         WRITE(numout,*)      &
-            &   ' Iron half saturation for diatoms           =', conc3
-         WRITE(numout,*)      &
-            &   ' NH4 half saturation for phyto              =', concnnh4
-         WRITE(numout,*)      &
-            &   ' NH4 half saturation for diatoms            =', concdnh4
-         WRITE(numout,*)      &
-            &   ' NH4 nitrification rate                     =', nitrif
-         WRITE(numout,*)      &
-            &   ' P-I slope  for diatoms                     =', pislope2
-         WRITE(numout,*)      &
-            &   ' Big particles sinking speed                =', wsbio2
-         WRITE(numout,*)      &
-            &   ' Fraction of microzoo excretion as DOM      =', sigma1
-         WRITE(numout,*)      &
-            &   ' Fraction of mesozoo excretion as DOM       =', sigma2
-         WRITE(numout,*)      &
-            &   ' Microzoo preference for POM                =', zprefc
-         WRITE(numout,*)      &
-            &   ' Microzoo preference for Nanophyto          =', zprefp
-         WRITE(numout,*)      &
-            &   ' Microzoo preference for Diatoms          =', zprefd
-         WRITE(numout,*)      &
-            &   ' Minimum Chl/C in nanophytoplankton         =', chlcnm
-         WRITE(numout,*)      &
-            &   ' Minimum Chl/C in diatoms                   =', chlcdm
-         WRITE(numout,*)      &
-            &   ' Maximum Fe/C in nanophytoplankton          =', fecnm
-         WRITE(numout,*)      &
-            &   ' Minimum Fe/C in diatoms                    =', fecdm
-         WRITE(numout,*)      &
-            &   ' Coastal release of Iron                 =', sedfeinput
-      ENDIF
-
-      READ(numnat,natsms)
-      IF(lwp) THEN
-         WRITE(numout,*) ' '
-         WRITE(numout,*) 'natsms'
-         WRITE(numout,*) ' '
-         WRITE(numout,*) 'Dust input from the atmosphere : ', bdustfer
-         WRITE(numout,*) ' '
-         WRITE(numout,*) 'River input of nutrients : ', briver
-         WRITE(numout,*) ' '
-         WRITE(numout,*) 'Atmospheric deposition of N : ', bndepo
-         WRITE(numout,*) ' '
-         WRITE(numout,*) 'Fe input from sediments : ', bsedinput
-         WRITE(numout,*) ' '
-      ENDIF
-
-#if defined key_trc_kriest
-
-      READ(numnat,natkriest)
-      IF(lwp) THEN
-         WRITE(numout,*) ' '
-         WRITE(numout,*) 'natkriest'
-         WRITE(numout,*) ' '
-         WRITE(numout,*) 'Sinking  exponent                    xkr_eta       = ', xkr_eta 
-         WRITE(numout,*) 'N content exponent                   xkr_zeta      = ', xkr_zeta
-         WRITE(numout,*) 'Sinking factor                       xkr_sfact     = ', xkr_sfact
-         WRITE(numout,*) 'Stickiness                           xkr_stick     = ', xkr_stick
-         WRITE(numout,*) 'Minimum mass for Aggregates          xkr_mass_min  = ', xkr_mass_min
-         WRITE(numout,*) 'Maximum mass for Aggregates          xkr_mass_max  = ', xkr_mass_max
-         WRITE(numout,*) 'Size of particles in nano pool       xkr_dnano     = ', xkr_dnano
-         WRITE(numout,*) 'Size of particles in diatoms pool    xkr_ddiat     = ', xkr_ddiat
-         WRITE(numout,*) 'Size of particles in mesozoo pool    xkr_dmeso     = ', xkr_dmeso
-         WRITE(numout,*) 'Size of particles in aggregates pool xkr_daggr     = ', xkr_daggr
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : natkriest'
+         WRITE(numout,*) '    Sinking  exponent                        xkr_eta      = ', xkr_eta 
+         WRITE(numout,*) '    N content exponent                       xkr_zeta     = ', xkr_zeta
+         WRITE(numout,*) '    Sinking factor                           xkr_sfact    = ', xkr_sfact
+         WRITE(numout,*) '    Stickiness                               xkr_stick    = ', xkr_stick
+         WRITE(numout,*) '    Minimum mass for Aggregates              xkr_mass_min = ', xkr_mass_min
+         WRITE(numout,*) '    Maximum mass for Aggregates              xkr_mass_max = ', xkr_mass_max
+         WRITE(numout,*) '    Size of particles in nano pool           xkr_dnano    = ', xkr_dnano
+         WRITE(numout,*) '    Size of particles in diatoms pool        xkr_ddiat    = ', xkr_ddiat
+         WRITE(numout,*) '    Size of particles in mesozoo pool        xkr_dmeso    = ', xkr_dmeso
+         WRITE(numout,*) '    Size of particles in aggregates pool     xkr_daggr    = ', xkr_daggr
      ENDIF
 
 
      ! Computation of some variables
-     xkr_massp     = 5.7E-6 * 7.6 * xkr_mass_min**xkr_zeta
+     xkr_massp = 5.7E-6 * 7.6 * xkr_mass_min**xkr_zeta
+     
      ! max and min vertical particle speed
      xkr_wsbio_min = xkr_sfact * xkr_mass_min**xkr_eta
      xkr_wsbio_max = xkr_sfact * xkr_mass_max**xkr_eta
-     WRITE(numout,*) ' max and min vertical particle speed ',xkr_wsbio_min,xkr_wsbio_max
+     WRITE(numout,*) ' max and min vertical particle speed ', xkr_wsbio_min, xkr_wsbio_max
+     
      !
      !    effect of the sizes of the different living pools on particle numbers
@@ -267,6 +200,5 @@
      xkr_naggr = 1. / ( xkr_massp * xkr_daggr )
     
-
 #endif
-
+      !
    END SUBROUTINE trc_lsm
Index: /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trp_trc.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trp_trc.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/SMS/trp_trc.F90	(revision 763)
@@ -1,49 +1,47 @@
 MODULE trp_trc
+   !!======================================================================
+   !!                         ***  MODULE trp_trc  ***
+   !! TOP :   TOP parameters used in TRP
+   !!======================================================================
+   !! History :   1.0  !  2004-03 (C. Ethe) original code
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+#if defined key_passivetrc
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
 
-#if defined key_passivetrc
-   !!======================================================================
-   !! Module trp_trc
-   !!======================================================================
-   !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
+   !! passive tracers number
+   USE par_trc_trp , ONLY :   jptra    =>   jptra    !: number of passive tracers
+
+   !! passive tracers fields 
+   USE trc         , ONLY :   trai     =>   trai     !: initial total tracer
+   USE trc         , ONLY :   trb      =>   trb      !: tracer field (before)
+   USE trc         , ONLY :   tra      =>   tra      !: tracer field (now)
+   USE trc         , ONLY :   trn      =>   trn      !: tracer field (after)
+
+   !! time step
+   USE trc         , ONLY :   ndttrc   =>   ndttrc   !: frequency of step on passive tracers (NAMELIST)
+
+   !! non-centered advection scheme (smolarkiewicz)
+   USE trc         , ONLY :   rtrn     =>   rtrn     !: value for truncation (NAMELIST)
+   USE trc         , ONLY :   ctrcnm   =>   ctrcnm   !: value for truncation (NAMELIST)
+
+# if defined key_trc_diaadd
+   USE par_trc_trp , ONLY :   jpdia2d  =>  jpdia2d   !: number of 2D passive tracers diag
+   USE par_trc_trp , ONLY :   jpdia3d  =>  jpdia3d   !: number of 3D passive tracers diag
+   USE trc         , ONLY :   trc2d    =>   trc2d    !: additional 2D variable for ouputs
+   USE trc         , ONLY :   trc3d    =>   trc3d    !: additional 3D variable for ouputs
+# endif
+
+#else
    !!----------------------------------------------------------------------
-   !! passive tracers number
-   USE par_trc_trp , ONLY : &
-      jptra    =>   jptra       !!: number of passive tracers
-
-#if defined key_trc_diaadd
-   USE par_trc_trp , ONLY : &
-      jpdia2d  =>  jpdia2d , &  !!: number of passive tracers
-      jpdia3d  =>  jpdia3d
+   !!  Empty module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 #endif
 
-   !! passive tracers fields 
-   USE trc , ONLY :  &
-      trai   =>   trai , &  !!: initial total tracer
-      trb    =>   trb  , &  !!: tracer field (before)
-      tra    =>   tra  , &  !!: tracer field (now)
-      trn    =>   trn       !!: tracer field (after)
-
-#if defined key_trc_diaadd
-   USE trc , ONLY :  &
-      trc2d   =>   trc2d , &  !!: additional 2D variable for ouputs
-      trc3d   =>   trc3d      !!: additional 3D variable for ouputs
-#endif
-   !! time step
-   USE trc , ONLY :  &
-      ndttrc =>   ndttrc    !!: frequency of step on passive tracers (NAMELIST)
-
-   !! non-centered advection scheme (smolarkiewicz)
-   USE trc , ONLY : &
-      rtrn   =>   rtrn      !!: value for truncation (NAMELIST)
-
-   USE trc , ONLY : &
-      ctrcnm   =>   ctrcnm      !!: value for truncation (NAMELIST)
-#else
    !!======================================================================
-   !!  Empty module : No passive tracer 
-   !!======================================================================
-#endif
-
 END MODULE trp_trc
Index: /branches/dev_001_GM/NEMO/TOP_SRC/agrif_top_interp.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/agrif_top_interp.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/agrif_top_interp.F90	(revision 763)
@@ -1,15 +1,16 @@
 MODULE agrif_top_interp
    !!======================================================================
-   !!                       ***  MODULE agrif_top_interp  ***
-   !!  Dummy module
+   !!                   ***  MODULE agrif_top_interp  ***
+   !! TOP :   Dummy module when AGRIF is not used
    !!======================================================================
 
    !!----------------------------------------------------------------------
-   !!   Dummy module                                     NO agrif use
+   !!   Dummy module                                               NO AGRIF
    !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
+
+   !!======================================================================
 END MODULE agrif_top_interp
Index: /branches/dev_001_GM/NEMO/TOP_SRC/agrif_top_update.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/agrif_top_update.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/agrif_top_update.F90	(revision 763)
@@ -1,15 +1,16 @@
 MODULE agrif_top_update
    !!======================================================================
-   !!                       ***  MODULE agrif_top_update  ***
-   !!  Dummy module
+   !!                   ***  MODULE agrif_top_update  ***
+   !! TOP :   Dummy module when AGRIF is not used
    !!======================================================================
 
    !!----------------------------------------------------------------------
-   !!   Dummy module                                     NO agrif use
+   !!   Dummy module                                               NO AGRIF
    !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
+
+   !!======================================================================
 END MODULE agrif_top_update
Index: /branches/dev_001_GM/NEMO/TOP_SRC/initrc.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/initrc.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/initrc.F90	(revision 763)
@@ -1,20 +1,17 @@
 MODULE initrc
-   !!================================================
-   !!
-   !!                       *** MODULE initrc ***
-   !! Initialisation the tracer model
-   !!================================================
-                                                                                                                            
+   !!======================================================================
+   !!                         ***  MODULE initrc  ***
+   !! TOP :   Initialisation of passive tracers
+   !!======================================================================
+   !! History :    -   !  1991-03  ()  original code
+   !!             1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90
+   !!              -   !  2005-10 (C. Ethe) print control
+   !!----------------------------------------------------------------------
 #if defined key_passivetrc
-
-   !!-------------------------------------------------------
-   !!  TOP 1.0,  LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!-------------------------------------------------------
-
-   !!--------------------------------------------------------------
-   !! * Modules used
-   !! ==============
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !!   ini_trc    :  initialisation of passive tracers
+   !!----------------------------------------------------------------------
    USE oce_trc
    USE trc
@@ -29,10 +26,13 @@
    PRIVATE
    
-   
-   !! * Accessibility
-   PUBLIC ini_trc
+   PUBLIC   ini_trc   ! called by ???
 
     !! * Substitutions
 #  include "domzgr_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
   
 CONTAINS
@@ -40,136 +40,72 @@
    SUBROUTINE ini_trc
       !!---------------------------------------------------------------------
+      !!                     ***  ROUTINE ini_trc  ***
       !!
-      !!                       ROUTINE ini_trc
-      !!                     ******************
+      !! ** Purpose :   Initialization of the passive tracer fields 
       !!
-      !!  PURPOSE :
-      !!  ---------
-      !!     initialize the tracer model
-      !!
-      !!   METHOD :
-      !!   -------
-      !!
-      !!
-      !!   History:
-      !!   -------
-      !!      original  : 91-03 ()
-      !!      additions : 92-01 (C. Levy)
-      !!                  05-03 (O. Aumont and A. El Moussaoui) F90
-      !!                  05-10 (C. Ethe ) print control initialization 
-      !!----------------------------------------------------------------------
+      !! ** Method  : - read namelist
+      !!              - control the consistancy 
+      !!              - compute specific initialisations
+      !!              - set initial tracer fields (either read restart 
+      !!                or read data or analytical formulation
+      !!---------------------------------------------------------------------
+      INTEGER ::   ji, jj, jk, jn    ! dummy loop indices
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zbt   ! workspace: masked grid volume
+      !!---------------------------------------------------------------------
 
-      !!---------------------------------------------------------------------
-      !!  OPA.9, 03-2005
-      !!---------------------------------------------------------------------
-      INTEGER :: ji, jj, jk, jn    !: dummy loop indices
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'ini_trc : initial set up of the passive tracers'
+      IF(lwp) WRITE(numout,*) '~~~~~~~'
 
-      !! 0.b PRINT the number of tracer
-      !! ------------------------------
+      !                 ! masked grid volume
+      DO jk = 1, jpk
+         zbt(:,:,jk) = e1t(:,:) * e2t(:,:) * fse3t(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:)
+      END DO
+#if defined key_off_degrad
+      zbt(:,:,:) = zbt(:,:,:) * facvol(ji,jj,jk)      ! degrad option: reduction by facvol
+#endif
 
-      IF(lwp) WRITE(numout,*) ' '
-      IF(lwp) WRITE(numout,*) ' *** number of passive tracer jptra = ',jptra
-      IF(lwp) WRITE(numout,*) ' '
+      !                 ! total volume of the ocean
+      areatot = SUM( zbt(:,:,:) )
+      IF( lk_mpp )   CALL mpp_sum( areatot )     ! sum over the global domain  
 
-      ! 1. READ passive tracers namelists
-      ! ---------------------------------
+      CALL trc_lec      ! READ passive tracers namelists
 
-      CALL trc_lec
+      CALL trc_ctl      ! control consistency between parameters, cpp key and namelists
 
-      ! 2. control consistency between parameters, cpp key and namelists
-      ! ----------------------------------------------------------------
+      CALL trc_ini      ! computes some initializations
 
-      CALL trc_ctl
-
-      ! 3. computes some initializations
-      ! --------------------------------
-
-      CALL trc_ini
-
- 
-      ! 4. total volume of the ocean
-      !-----------------------------
-
-      areatot = 0.
-      DO jk = 1, jpk
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               areatot = areatot + tmask(ji,jj,jk) * tmask_i(ji,jj)  &
-#if defined key_off_degrad
-                  &                * facvol(ji,jj,jk)    &
-#endif
-                  &                * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) 
-            END DO
-         END DO
-      END DO
-      IF( lk_mpp ) THEN 
-         CALL mpp_sum(areatot)     ! sum over the global domain  
-      END IF
-
-      IF(lwp) WRITE(numout,*) ' '
-      IF (lwp) WRITE(numout,*) 'Total volume of ocean =',areatot
-      IF(lwp) WRITE(numout,*) ' '
-
-      ! 5. Initialization of tracers
-      ! -----------------------------
-
-      IF( lrsttr ) THEN
-
-         ! 5.1 restart from a file
-         !------------------------
-         CALL trc_rst_read
-
-      ELSE
-
-         !  5.2 analytical formulation or global data
-         !-------------------------------------
-         CALL trc_dtr
-
+      !                 ! set initial tracer values 
+      IF( lrsttr ) THEN   ;   CALL trc_rst_read      ! restart from a file
+      ELSE                ;   CALL trc_dtr           ! analytical formulation or from data
       ENDIF
 
+      !                 ! Computation content of all tracers
+      trai = 0.e0
+      DO jn = 1, jptra
+         trai = trai + SUM( trn(:,:,:,jn) * zbt(:,:,:) )
+      END DO      
+      IF( lk_mpp )   CALL mpp_sum( trai )     ! sum over the global domain  
 
-      ! 6. Computation integral of all tracers
-      !------------------
 
-      trai = 0.
-      DO jn = 1, jptra
-         DO jk = 1, jpk
-            DO jj = 1, jpj
-               DO ji = 1, jpi
-                  trai = trai + trn(ji,jj,jk,jn) * tmask(ji,jj,jk) * tmask_i(ji,jj)    &
-#if defined key_off_degrad
-                     &              * facvol(ji,jj,jk)   &
-#endif
+      !                 ! control print
+      IF(lwp) WRITE(numout,*) '          *** Total number of passive tracer jptra = ', jptra
+      IF(lwp) WRITE(numout,*) '          *** Total volume of ocean                = ', areatot
+      IF(lwp) WRITE(numout,*) '          *** Total inital content of all tracers  = ', trai
+      IF(lwp) WRITE(numout,*)
 
-                     &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
-               END DO
-            END DO
-         END DO
-      ENDDO
-      
-      IF( lk_mpp ) THEN 
-         CALL mpp_sum(trai)         ! sum over the global domain  
-      END IF
-
-      IF(lwp) WRITE(numout,*) ' '     
-      IF(lwp) WRITE(numout,*) 'Integral of all tracers over the full domain at initial time =',trai
-      IF(lwp) WRITE(numout,*) ' '
-
-      ! 6. Print control
-      !------------------
-
-      IF( ln_ctl )    CALL prt_ctl_trc_init
-
+      IF( ln_ctl )   CALL prt_ctl_trc_init      ! control print
+      !
    END SUBROUTINE ini_trc
 
-
 #else
-   !!======================================================================
-   !!  Empty module : No passive tracer
-   !!======================================================================
+   !!----------------------------------------------------------------------
+   !!  Empty module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE ini_trc      
+   SUBROUTINE ini_trc                      ! Dummy routine   
    END SUBROUTINE ini_trc
 #endif
 
+   !!======================================================================
 END MODULE initrc 
Index: /branches/dev_001_GM/NEMO/TOP_SRC/oce_trc.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/oce_trc.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/oce_trc.F90	(revision 763)
@@ -2,289 +2,238 @@
    !!======================================================================
    !!                      ***  MODULE  oce_trc  ***
-   !! Ocean passive tracer  :  share ocean-passive tracers variables
+   !! TOP :   variables shared between ocean and passive tracers
    !!======================================================================
-   !! History :
-   !!   9.0  !  04-03  (C. Ethe)  F90: Free form and module
-   !!----------------------------------------------------------------------
-   !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/oce_trc.F90,v 1.17 2007/05/28 02:55:05 opalod Exp $
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
-   !!----------------------------------------------------------------------
-   !! * Modules used
-   !! Domain characteristics
-   USE par_oce , ONLY :       &
-      cp_cfg   =>   cp_cfg,  & !: name of the configuration
-      jp_cfg   =>   jp_cfg,  & !: resolution of the configuration
-      jpiglo   =>   jpiglo,  & !: first  dimension of global domain --> i
-      jpjglo   =>   jpjglo,  & !: second dimension of global domain --> j
-      jpi      =>   jpi   ,  & !: first  dimension of grid --> i 
-      jpj      =>   jpj   ,  & !: second dimension of grid --> j  
-      jpk      =>   jpk   ,  & !: number of levels  
-      jpim1    =>   jpim1 ,  & !: jpi - 1
-      jpjm1    =>   jpjm1 ,  & !: jpj - 1 
-      jpkm1    =>   jpkm1 ,  & !: jpk - 1  
-      jpij     =>   jpij  ,  & !: jpi x jpj
-      jpidta   =>   jpidta,  & !: first horizontal dimension  > or = jpi
-      jpjdta   =>   jpjdta,  & !: second horizontal dimension > or = jpj
-      jpkdta   =>   jpkdta,  & !: number of levels            > or = jpk
-      lk_esopa =>   lk_esopa   !: flag to activate the all option
-
-
-   !! run controm   
-
-   USE in_out_manager
-      
-   USE dom_oce , ONLY :           &            
-      lzoom      => lzoom     ,  & !: zoom flag
-      lzoom_e    => lzoom_e   ,  & !: East  zoom type flag
-      lzoom_w    => lzoom_w   ,  & !: West  zoom type flag
-      lzoom_s    => lzoom_s   ,  & !: South zoom type flag
-      lzoom_n    => lzoom_n   ,  & !: North zoom type flag
-      lzoom_arct => lzoom_arct,  & !: ORCA    arctic zoom flag
-      lzoom_anta => lzoom_anta     !: ORCA antarctic zoom flag
-
-
-
-   USE dom_oce , ONLY :       & 
-      nperio   =>   nperio,  & !: type of lateral boundary condition       
-      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
-      mi0      =>   mi0   ,  & !: global ==> local domain i-indice 
-      mi1      =>   mi1   ,  & !: (mi0=1 and mi1=0 if the global indice is not in the local domain)
-      mj0      =>   mj0   ,  & !: global ==> local domain j-indice 
-      mj1      =>   mj1   ,  & !: (mj0=1 and mj1=0 if the global indice is not in the local domain)
-      nidom    =>   nidom
+   !! History :   1.0  !  2004-03  (C. Ethe)  original code
+   !!             2.0  !  2007-12 (C. Ethe, G. Madec)  rewritting
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 2.0,  LOCEAN-IPSL (2007)
+   !! $Header: $
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+#if defined key_passivetrc
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+
+   !* Domain size *
+   USE par_oce , ONLY :   cp_cfg   =>   cp_cfg     !: name of the configuration
+   USE par_oce , ONLY :   jp_cfg   =>   jp_cfg     !: resolution of the configuration
+   USE par_oce , ONLY :   jpiglo   =>   jpiglo     !: first  dimension of global domain --> i
+   USE par_oce , ONLY :   jpjglo   =>   jpjglo     !: second dimension of global domain --> j
+   USE par_oce , ONLY :   jpi      =>   jpi        !: first  dimension of grid --> i 
+   USE par_oce , ONLY :   jpj      =>   jpj        !: second dimension of grid --> j  
+   USE par_oce , ONLY :   jpk      =>   jpk        !: number of levels  
+   USE par_oce , ONLY :   jpim1    =>   jpim1      !: jpi - 1
+   USE par_oce , ONLY :   jpjm1    =>   jpjm1      !: jpj - 1 
+   USE par_oce , ONLY :   jpkm1    =>   jpkm1      !: jpk - 1  
+   USE par_oce , ONLY :   jpij     =>   jpij       !: jpi x jpj
+   USE par_oce , ONLY :   jpidta   =>   jpidta     !: first horizontal dimension  > or = jpi
+   USE par_oce , ONLY :   jpjdta   =>   jpjdta     !: second horizontal dimension > or = jpj
+   USE par_oce , ONLY :   jpkdta   =>   jpkdta     !: number of levels            > or = jpk
+   USE par_oce , ONLY :   lk_esopa =>   lk_esopa   !: flag to activate the all option
+
+   !* IO manager *
+   USE in_out_manager      ! use all the variables
+   !* physical constants *
+   USE phycst              ! use all the variables
+
+   !* model domain *
+   USE dom_oce , ONLY :   lzoom      => lzoom        !: zoom flag
+   USE dom_oce , ONLY :   lzoom_e    => lzoom_e      !: East  zoom type flag
+   USE dom_oce , ONLY :   lzoom_w    => lzoom_w      !: West  zoom type flag
+   USE dom_oce , ONLY :   lzoom_s    => lzoom_s      !: South zoom type flag
+   USE dom_oce , ONLY :   lzoom_n    => lzoom_n      !: North zoom type flag
+   USE dom_oce , ONLY :   lzoom_arct => lzoom_arct   !: ORCA    arctic zoom flag
+   USE dom_oce , ONLY :   lzoom_anta => lzoom_anta   !: ORCA antarctic zoom flag
+   USE dom_oce , ONLY :   nperio     =>   nperio     !: type of lateral boundary condition       
+   USE dom_oce , ONLY :   nimpp      =>   nimpp      !: i index for mpp-subdomain left bottom
+   USE dom_oce , ONLY :   njmpp      =>   njmpp      !: j index for mpp-subdomain left bottom
+   USE dom_oce , ONLY :   nproc      =>   nproc      !: number for local processor
+   USE dom_oce , ONLY :   narea      =>   narea      !: number for local area
+   USE dom_oce , ONLY :   mig        =>   mig        !: local  ==> global  domain i-indice
+   USE dom_oce , ONLY :   mjg        =>   mjg        !: local  ==> global  domain i-indice
+   USE dom_oce , ONLY :   mi0        =>   mi0        !: global ==> local domain i-indice 
+   USE dom_oce , ONLY :   mi1        =>   mi1        !: (mi0=1 and mi1=0 if the global indice is not in the local one)
+   USE dom_oce , ONLY :   mj0        =>   mj0        !: global ==> local domain j-indice 
+   USE dom_oce , ONLY :   mj1        =>   mj1        !: (mj0=1 and mj1=0 if the global indice is not in the local one)
+   USE dom_oce , ONLY :   nidom      =>   nidom
+   USE dom_oce , ONLY :   nimppt     => nimppt     !:i-indexes for each processor
+   USE dom_oce , ONLY :   njmppt     => njmppt       !:j-indexes for each processor
+   USE dom_oce , ONLY :   ibonit     => ibonit       !:i-processor neighbour existence
+   USE dom_oce , ONLY :   ibonjt     => ibonjt       !:j- processor neighbour existence 
+   USE dom_oce , ONLY :   nlci       => nlci         !:i- & j-dimensions of the local subdomain
+   USE dom_oce , ONLY :   nlcj       => nlcj         !:
+   USE dom_oce , ONLY :   nldi       => nldi         !:first and last indoor i- and j-indexes
+   USE dom_oce , ONLY :   nlei       => nlei         !:
+   USE dom_oce , ONLY :   nldj       => nldj         !:
+   USE dom_oce , ONLY :   nlej       => nlej         !:
+   USE dom_oce , ONLY :   nlcit      => nlcit        !:dimensions of every i-subdomain
+   USE dom_oce , ONLY :   nlcjt      => nlcjt        !:dimensions of every j-subdomain
+   USE dom_oce , ONLY :   nldit      => nldit        !:first indoor index for each i-domain 
+   USE dom_oce , ONLY :   nleit      => nleit        !:last indoor index for each i-domain 
+   USE dom_oce , ONLY :   nldjt      => nldjt        !:first indoor index for each j-domain 
+   USE dom_oce , ONLY :   nlejt      => nlejt        !:last indoor index for each j-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 
-      nlci     => nlci    ,  & !:i- & j-dimensions of the local subdomain
-      nlcj     => nlcj    ,  & !:
-      nldi     => nldi    ,  & !:first and last indoor i- and j-indexes
-      nlei     => nlei    ,  & !:
-      nldj     => nldj    ,  & !:
-      nlej     => nlej    ,  & !:
-      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 :            &    
-      glamt    =>   glamt ,  & !: longitude of t-point (degre)  
-      glamu    =>   glamu ,  & !: longitude of t-point (degre)  
-      glamv    =>   glamv ,  & !: longitude of t-point (degre)  
-      glamf    =>   glamf ,  & !: longitude of t-point (degre)  
-      gphit    =>   gphit ,  & !: latitude  of t-point (degre)   
-      gphiu    =>   gphiu ,  & !: latitude  of t-point (degre)   
-      gphiv    =>   gphiv ,  & !: latitude  of t-point (degre)   
-      gphif    =>   gphif ,  & !: latitude  of t-point (degre)   
-      e1t      =>   e1t   ,  & !: horizontal scale factors at t-point (m)  
-      e2t      =>   e2t   ,  & !: horizontal scale factors at t-point (m)   
-      e1u      =>   e1u   ,  & !: horizontal scale factors at u-point (m)
-      e2u      =>   e2u   ,  & !: horizontal scale factors at u-point (m)
-      e1v      =>   e1v   ,  & !: horizontal scale factors at v-point (m)
-      e2v      =>   e2v        !: horizontal scale factors at v-point (m)  
-
-   !! vertical coordinate and scale factors
-   USE dom_oce , ONLY :              &   
-      gdept_0    =>   gdept_0 ,  & !: reference depth of t-points (m)
-      e3t_0      =>   e3t_0   ,  & !: reference depth of t-points (m)  
-      e3w_0      =>   e3w_0   ,  & !: reference depth of w-points (m)
-      gdepw_0    =>   gdepw_0      !: reference depth of w-points (m)
-
-#if ! defined key_zco
-   USE dom_oce , ONLY :                &
-      gdep3w   =>  gdep3w  ,  & !: ???
-      gdept =>  gdept,  & !: depth of t-points (m)
-      gdepw =>  gdepw,  & !: depth of t-points (m)
-      e3t   =>  e3t  ,  & !: vertical scale factors at t-
-      e3u   =>  e3u  ,  & !: vertical scale factors at u-
-      e3v   =>  e3v  ,  & !: vertical scale factors v-
-      e3w   =>  e3w  ,  & !: w-points (m)
-      e3f   =>  e3f  ,  & !: f-points (m)
-      e3uw  =>  e3uw ,  & !: uw-points (m)
-      e3vw  =>  e3vw      !: vw-points (m)
+   !* horizontal mesh *
+   USE dom_oce , ONLY :   glamt      =>   glamt      !: longitude of t-point (degre)  
+   USE dom_oce , ONLY :   glamu      =>   glamu      !: longitude of t-point (degre)  
+   USE dom_oce , ONLY :   glamv      =>   glamv      !: longitude of t-point (degre)  
+   USE dom_oce , ONLY :   glamf      =>   glamf      !: longitude of t-point (degre)  
+   USE dom_oce , ONLY :   gphit      =>   gphit      !: latitude  of t-point (degre)   
+   USE dom_oce , ONLY :   gphiu      =>   gphiu      !: latitude  of t-point (degre)   
+   USE dom_oce , ONLY :   gphiv      =>   gphiv      !: latitude  of t-point (degre)   
+   USE dom_oce , ONLY :   gphif      =>   gphif      !: latitude  of t-point (degre)   
+   USE dom_oce , ONLY :   e1t        =>   e1t        !: horizontal scale factors at t-point (m)  
+   USE dom_oce , ONLY :   e2t        =>   e2t        !: horizontal scale factors at t-point (m)   
+   USE dom_oce , ONLY :   e1u        =>   e1u        !: horizontal scale factors at u-point (m)
+   USE dom_oce , ONLY :   e2u        =>   e2u        !: horizontal scale factors at u-point (m)
+   USE dom_oce , ONLY :   e1v        =>   e1v        !: horizontal scale factors at v-point (m)
+   USE dom_oce , ONLY :   e2v        =>   e2v        !: horizontal scale factors at v-point (m)  
+
+   !* vertical mesh *
+   USE dom_oce , ONLY :   gdept_0    =>   gdept_0    !: reference depth of t-points (m)
+   USE dom_oce , ONLY :   e3t_0      =>   e3t_0      !: reference depth of t-points (m)  
+   USE dom_oce , ONLY :   e3w_0      =>   e3w_0      !: reference depth of w-points (m)
+   USE dom_oce , ONLY :   gdepw_0    =>   gdepw_0    !: reference depth of w-points (m)
+# if ! defined key_zco
+   USE dom_oce , ONLY :   gdep3w     =>  gdep3w      !: ???
+   USE dom_oce , ONLY :   gdept      =>  gdept       !: depth of t-points (m)
+   USE dom_oce , ONLY :   gdepw      =>  gdepw       !: depth of t-points (m)
+   USE dom_oce , ONLY :   e3t        =>  e3t         !: vertical scale factors at t-
+   USE dom_oce , ONLY :   e3u        =>  e3u         !: vertical scale factors at u-
+   USE dom_oce , ONLY :   e3v        =>  e3v         !: vertical scale factors v-
+   USE dom_oce , ONLY :   e3w        =>  e3w         !: w-points (m)
+   USE dom_oce , ONLY :   e3f        =>  e3f         !: f-points (m)
+   USE dom_oce , ONLY :   e3uw       =>  e3uw        !: uw-points (m)
+   USE dom_oce , ONLY :   e3vw       =>  e3vw        !: vw-points (m)
+# endif
+   USE dom_oce , ONLY :   ln_zps     =>  ln_zps      !: partial steps flag
+   USE dom_oce , ONLY :   ln_sco     =>  ln_sco      !: s-coordinate flag
+   USE dom_oce , ONLY :   ln_zco     =>  ln_zco      !: z-coordinate flag
+   USE dom_oce , ONLY :   lk_zco     =>  lk_zco      !: z-coordinate flag (1D or 3D arrays)
+   USE dom_oce , ONLY :   hbatt     =>   hbatt       !: ocean depth at the vertical of  t-point (m)
+   USE dom_oce , ONLY :   hbatu     =>   hbatu       !: ocean depth at the vertical of  u-point (m)
+   USE dom_oce , ONLY :   hbatv     =>   hbatv       !: ocean depth at the vertical of w-point (m)
+   USE dom_oce , ONLY :   gsigt     =>   gsigt       !: model level depth coefficient at T-levels
+   USE dom_oce , ONLY :   gsigw     =>   gsigw       !: model level depth coefficient at W-levels
+   USE dom_oce , ONLY :   gsi3w     =>   gsi3w       !: model level depth coef at w-levels (defined as the sum of e3w)
+   USE dom_oce , ONLY :   esigt     =>   esigt       !: vertical scale factor coef. at t-levels
+   USE dom_oce , ONLY :   esigw     =>   esigw       !: vertical scale factor coef. at w-levels
+
+   !* masks, bathymetry *
+   USE dom_oce , ONLY :   mbathy    =>   mbathy      !: number of ocean level (=0,  & 1, ... , jpk-1) 
+   USE dom_oce , ONLY :   tmask_i   =>   tmask_i     !: Interior mask at t-points
+   USE dom_oce , ONLY :   tmask     =>   tmask       !: land/ocean mask at t-points
+   USE dom_oce , ONLY :   umask     =>   umask       !: land/ocean mask at u-points   
+   USE dom_oce , ONLY :   vmask     =>   vmask       !: land/ocean mask at v-points 
+   USE dom_oce , ONLY :   fmask     =>   fmask       !: land/ocean mask at f-points 
+# if defined key_off_degrad
+   USE dom_oce , ONLY :   facvol    =>   facvol      !: volume factor for degradation
+# endif
+
+   !* time domain *
+   USE dom_oce , ONLY :   neuler    =>   neuler      !: restart euler forward option (0=Euler)
+   USE dom_oce , ONLY :   rdt       =>   rdt         !: time step for the dynamics 
+   USE dom_oce , ONLY :   atfp      =>   atfp        !: asselin time filter parameter
+   USE dom_oce , ONLY :   atfp1     =>   atfp1       !: asselin time filter coeff. (atfp1= 1-2*atfp)
+   USE dom_oce , ONLY :   rdttra    =>   rdttra      !: vertical profile of tracer time step
+   USE daymod  , ONLY :   ndastp    =>   ndastp      !: time step date in year/month/day aammjj
+   USE daymod  , ONLY :   nday_year =>   nday_year   !: curent day counted from jan 1st of the current year
+   USE daymod  , ONLY :   nyear     =>   nyear       !: Current year
+   USE daymod  , ONLY :   nmonth    =>   nmonth      !: Current month
+   USE daymod  , ONLY :   nday      =>   nday        !: Current day
+
+   !* ocean fields: here now and after fields *
+   USE oce , ONLY :   ua      =>    ua      !: i-horizontal velocity (m s-1) 
+   USE oce , ONLY :   va      =>    va      !: j-horizontal velocity (m s-1)
+   USE oce , ONLY :   un      =>    un      !: i-horizontal velocity (m s-1) 
+   USE oce , ONLY :   vn      =>    vn      !: j-horizontal velocity (m s-1)
+   USE oce , ONLY :   wn      =>    wn      !: vertical velocity (m s-1)  
+   USE oce , ONLY :   tn      =>    tn      !: pot. temperature (celsius)
+   USE oce , ONLY :   sn      =>    sn      !: salinity (psu)
+   USE oce , ONLY :   rhop    =>    rhop    !: potential volumic mass (kg m-3) 
+   USE oce , ONLY :   rhd     =>    rhd     !: in situ density anomalie rhd=(rho-rau0)/rau0 (no units)
+# if defined key_trc_diatrd
+   USE oce , ONLY :   hdivn   =>    hdivn   !: horizontal divergence (1/s)
+# endif
+
+
+   USE lib_mpp , ONLY :   lk_mpp    =>  lk_mpp       !: Mpp flag
+
+   USE dynspg_oce , ONLY :   lk_dynspg_rl   =>  lk_dynspg_rl      !: rigid lid flag
+
+   USE dom_oce , ONLY :   n_cla     =>   n_cla         !: flag (0/1) for cross land advection 
+
+
+
+   !* surface fluxes *
+# if defined key_flx_bulk_monthly || defined key_flx_bulk_daily || defined key_flx_core
+   USE blk_oce, ONLY :   vatm       =>    vatm       !: wind speed at sea surface (m s-1)
+# endif
+   USE taumod , ONLY :   taux       =>    taux       !: i-surface stress component
+   USE taumod , ONLY :   tauy       =>    tauy       !: j-surface stress component
+   USE ocesbc , ONLY :   qt         =>    qt         !: total surface heat flux (w m-2)   
+   USE ocesbc , ONLY :   qsr        =>    qsr        !: penetrative solar radiation (w m-2)  
+   USE ocesbc , ONLY :   emp        =>    emp        !: evaporation minus precipitation (kg m-2 s-2) 
+   USE ocesbc , ONLY :   emps       =>    emps       !: evaporation minus precipitation (kg m-2 s-2)
+   USE traqsr , ONLY :   xsi1       =>   xsi1        !: first depth of extinction
+   USE traqsr , ONLY :   ln_qsr_sms =>  ln_qsr_sms   !: flag to use or not the biological fluxes for light
+   USE flxrnf , ONLY :   upsrnfh    =>   upsrnfh     !: mixed adv scheme in runoffs vicinity (hori.) 
+   USE flxrnf , ONLY :   upsrnfz    =>   upsrnfz     !: mixed adv scheme in runoffs vicinity (vert.)
+   USE flxrnf , ONLY :   upsadv     =>   upsadv      !: mixed adv scheme in straits vicinity (hori.)
+
+   !* freezing area *
+   USE ocfzpt , ONLY :   freeze      =>    freeze     !: ice mask (0 or 1)  
+   USE ocfzpt , ONLY :   fzptn       =>    fzptn      !: now freezing temperature at ocean surface  
+
+   !* bottom boundary layer *
+# if   defined key_trabbl_dif   ||   defined key_trabbl_adv
+   USE trabbl , ONLY :   atrbbl   =>   atrbbl     !: lateral coeff. for bottom boundary layer scheme (m2/s)
+#  if defined key_off_tra
+   USE trabbl, ONLY :   bblx   => bblx         !: ???
+   USE trabbl, ONLY :   bbly   => bbly         !: ???
+#  endif
+# endif
+
+   !* lateral diffusivity (tracers) *
+   USE ldftra_oce , ONLY :   aht0    =>   aht0     !: horizontal eddy diffusivity for tracers (m2/s)
+   USE ldftra_oce , ONLY :   ahtb0   =>   ahtb0    !: background eddy diffusivity for isopycnal diff. (m2/s)
+   USE ldftra_oce , ONLY :   ahtu    =>   ahtu     !: lateral diffusivity coef. at u-points 
+   USE ldftra_oce , ONLY :   ahtv    =>   ahtv     !: lateral diffusivity coef. at v-points 
+   USE ldftra_oce , ONLY :   ahtw    =>   ahtw     !: lateral diffusivity coef. at w-points 
+   USE ldftra_oce , ONLY :   ahtt    =>   ahtt     !: lateral diffusivity coef. at t-points
+   USE ldftra_oce , ONLY :   aeiv0   =>   aeiv0    !: eddy induced velocity coefficient (m2/s) 
+   USE ldftra_oce , ONLY :   aeiu    =>   aeiu     !: eddy induced velocity coef. at u-points (m2/s)   
+   USE ldftra_oce , ONLY :   aeiv    =>   aeiv     !: eddy induced velocity coef. at v-points (m2/s) 
+   USE ldftra_oce , ONLY :   aeiw    =>   aeiw     !: eddy induced velocity coef. at w-points (m2/s) 
+
+   !* vertical diffusion *
+   USE zdf_oce , ONLY :   avt        =>   avt         !: vert. diffusivity coef. at w-point for temp  
+   USE zdf_oce , ONLY :   avt0       =>   avt0        !: vertical eddy diffusivity for tracers (m2/s)
+   USE zdf_oce , ONLY :   ln_zdfnpc  =>   ln_zdfnpc   !: convection: non-penetrative convection flag
+# if defined key_zdfddm
+   USE zdfddm  , ONLY :   avs        =>    avs        !: salinity vertical diffusivity coeff. at w-point
+# endif
+
+   !* mixing & mixed layer depth *
+   USE zdfmxl , ONLY :   hmld        =>   hmld        !: mixing layer depth (turbocline)
+   USE zdfmxl , ONLY :   hmlp        =>   hmlp        !: mixed layer depth  (rho=rho0+zdcrit) (m)
+   USE zdfmxl , ONLY :   hmlpt       =>   hmlpt       !: mixed layer depth at t-points (m)
+
+   !* direction of lateral diffusion *
+   USE ldfslp , ONLY :   lk_ldfslp  =>  lk_ldfslp     !: slopes flag
+# if   defined key_ldfslp
+   USE ldfslp , ONLY :   uslp       =>   uslp         !: i-direction slope at u-, w-points
+   USE ldfslp , ONLY :   vslp       =>   vslp         !: j-direction slope at v-, w-points
+   USE ldfslp , ONLY :   wslpi      =>   wslpi        !: i-direction slope at u-, w-points
+   USE ldfslp , ONLY :   wslpj      =>   wslpj        !: j-direction slope at v-, w-points
+# endif
+
+#else
+   !!----------------------------------------------------------------------
+   !!  Empty module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 #endif
 
-   USE dom_oce ,   ONLY :            &      
-      ln_zps   =>  ln_zps ,  & !: partial steps flag
-      ln_sco   =>  ln_sco ,  & !: s-coordinate flag
-      ln_zco   =>  ln_zco ,  & !: z-coordinate flag
-      lk_zco   =>  lk_zco      !: z-coordinate flag (1D or 3D arrays)
-
-   USE lib_mpp ,   ONLY :            &     
-      lk_mpp   =>  lk_mpp      !: Mpp flag
-
-   USE dynspg_oce ,   ONLY :            &     
-      lk_dynspg_rl   =>  lk_dynspg_rl      !: rigid lid flag
-
-
-   USE dom_oce , ONLY :              &   
-      hbatt   =>   hbatt  ,  & !: ocean depth at the vertical of  t-point (m)
-      hbatu   =>   hbatu  ,  & !: ocean depth at the vertical of  u-point (m)
-      hbatv   =>   hbatv  ,  & !: ocean depth at the vertical of w-point (m)
-      gsigt   =>   gsigt  ,  & !: model level depth coefficient at t-,  & w-levelsvertical scale factors at u-
-      gsigw   =>   gsigw  ,  & !: model level depth coefficient at t-,  & w-levelsvertical scale factors v-
-      gsi3w   =>   gsi3w  ,  & !: model level depth coef at w-levels (defined as the sum of e3w)
-      esigt   =>   esigt  ,  & !: vertical scale factor coef. at t-levels
-      esigw   =>   esigw       !: vertical scale factor coef. at w-levels
-
-   !! masks, bathymetry
-   USE dom_oce , ONLY :             &    
-      mbathy   =>   mbathy,  & !: number of ocean level (=0,  & 1, ... , jpk-1) 
-      tmask_i  =>   tmask_i, & !: Interior mask at t-points
-      tmask    =>   tmask ,  & !: land/ocean mask at t-points
-      umask    =>   umask ,  & !: land/ocean mask at u-points   
-      vmask    =>   vmask ,  & !: land/ocean mask at v-points 
-      fmask    =>   fmask      !: land/ocean mask at f-points 
-
-#if defined key_off_degrad
-   USE dom_oce , ONLY :                 &
-      facvol   =>   facvol     !: volume factor for degradation
-#endif
-
-   USE dom_oce , ONLY :         &
-      n_cla   =>   n_cla       !: flag (0/1) for cross land advection 
-
-   !! time domain
-   USE dom_oce , ONLY :                 &
-      neuler   =>   neuler,  & !: restart euler forward option (0=Euler)
-      rdt      =>   rdt   ,  & !: time step for the dynamics 
-      atfp     =>   atfp  ,  & !: asselin time filter parameter
-      atfp1    =>   atfp1 ,  & !: asselin time filter coeff. (atfp1= 1-2*atfp)
-      rdttra   =>   rdttra     !: vertical profile of tracer time step
-
-   USE daymod , ONLY :                 &
-      ndastp    =>   ndastp,  &    !: time step date in year/month/day aammjj
-      nday_year =>   nday_year, &  !: curent day counted from jan 1st of the current year
-      nyear     =>   nyear,   &  !: Current year
-      nmonth    =>   nmonth,  &  !: Current month
-      nday      =>   nday        !: Current day
-
-   !! physical constants
-   USE phycst ,   ONLY :                &  
-      ra       =>   ra    ,  & !: earth radius
-      rpi      =>   rpi   ,  & !: pi
-      rday     =>   rday  ,  & !: day
-      rauw     =>   rauw  ,  & !: density of pure water kg/m3
-      ro0cpr   =>   ro0cpr,  & !: = 1. / ( rau0 * rcp )
-      rad      =>   rad   ,  & !: conversion coeff. from degre into radian
-      raass    =>   raass ,  & !: number of seconds in one year
-      rmoss    =>   rmoss ,  & !: number of seconds in one month
-      rjjss    =>   rjjss      !: number of seconds in one day
-
-   !! present fields (now)
-   USE oce , ONLY :            &     
-      ua      =>    ua    ,  & !: i-horizontal velocity (m s-1) 
-      va      =>    va    ,  & !: j-horizontal velocity (m s-1)
-      un      =>    un    ,  & !: i-horizontal velocity (m s-1) 
-      vn      =>    vn    ,  & !: j-horizontal velocity (m s-1)
-      wn      =>    wn    ,  & !: vertical velocity (m s-1)  
-      tn      =>    tn    ,  & !: pot. temperature (celsius)
-      sn      =>    sn    ,  & !: salinity (psu)
-      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 || defined key_flx_core
-   !! wind speed
-   USE blk_oce , ONLY :        &     
-      vatm    =>    vatm       !: wind speed at sea surface (m s-1)
-#endif
-
-   !! wind speed
-   USE taumod , ONLY :        &     
-      taux    =>    taux ,  &  !: i-surface stress component
-      tauy    =>    tauy       !: j-surface stress component
-
-#if   defined key_trabbl_dif   ||   defined key_trabbl_adv
-   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
-
-   !! lateral diffusivity (tracers)
-   USE ldftra_oce ,   ONLY :             &    
-      aht0    =>   aht0  ,  &  !: horizontal eddy diffusivity for tracers (m2/s)
-      ahtb0   =>   ahtb0 ,  &  !: background eddy diffusivity for isopycnal diff. (m2/s)
-      ahtu    =>   ahtu  ,  &  !: lateral diffusivity coef. at u-points 
-      ahtv    =>   ahtv  ,  &  !: lateral diffusivity coef. at v-points 
-      ahtw    =>   ahtw  ,  &  !: lateral diffusivity coef. at w-points 
-      ahtt    =>   ahtt  ,  &  !: lateral diffusivity coef. at t-points
-      aeiv0   =>   aeiv0 ,  &  !: eddy induced velocity coefficient (m2/s) 
-      aeiu    =>   aeiu  ,  &  !: eddy induced velocity coef. at u-points (m2/s)   
-      aeiv    =>   aeiv  ,  &  !: eddy induced velocity coef. at v-points (m2/s) 
-      aeiw    =>   aeiw        !: eddy induced velocity coef. at w-points (m2/s) 
-
-   !! vertical diffusion
-   USE zdf_oce , ONLY :      &    
-      avt            =>   avt          ,  & !: vert. diffusivity coef. at w-point for temp  
-      avt0           =>   avt0         ,  & !: vertical eddy diffusivity for tracers (m2/s)
-      ln_zdfnpc      =>   ln_zdfnpc         !: convection: non-penetrative convection flag
-
-
-#if defined key_zdfddm
-   USE zdfddm , ONLY :             &     
-      avs     =>    avs        !: salinity vertical diffusivity coeff. at w-point
-#endif
-
-   !! penetrative solar radiation
-   USE traqsr , ONLY :            &
-      xsi1        =>   xsi1    ,  & !: first depth of extinction
-      ln_qsr_sms  =>  ln_qsr_sms    !: flag to use or not the biological fluxes for light
-
-   !! surface fluxes
-   USE ocesbc , ONLY :             &   
-      qt      =>    qt    ,  & !: total surface heat flux (w m-2)   
-      qsr     =>    qsr   ,  & !: penetrative solar radiation (w m-2)  
-      emp     =>    emp   ,  & !: evaporation minus precipitation (kg m-2 s-2) 
-      emps    =>    emps       !: evaporation minus precipitation (kg m-2 s-2)
-
-   !! freezing area
-   USE ocfzpt , ONLY :            &      
-      freeze  =>    freeze,  & !: ice mask (0 or 1)  
-      fzptn   =>    fzptn      !: now freezing temperature at ocean surface  
-
-
-   !! mixing layer depth (turbocline)
-   USE zdfmxl , ONLY :             &    
-      hmld    =>   hmld   ,  & !: mixing layer depth (turbocline)
-      hmlp    =>   hmlp   ,  & !: mixed layer depth  (rho=rho0+zdcrit) (m)
-      hmlpt   =>   hmlpt       !: mixed layer depth at t-points (m)
-
-   USE ldfslp , ONLY :              & 
-      lk_ldfslp  =>  lk_ldfslp     !: slopes flag
-#if   defined key_ldfslp
-   !! direction of lateral diffusion (momentum  tracers) 
-   USE ldfslp , ONLY :              & 
-      uslp       =>   uslp    ,  & !: i-direction slope at u-, w-points
-      vslp       =>   vslp    ,  & !: j-direction slope at v-, w-points
-      wslpi      =>   wslpi   ,  & !: i-direction slope at u-, w-points
-      wslpj      =>   wslpj        !: j-direction slope at v-, w-points
-#endif
-
-   !! ocean forcings runoff
-   USE flxrnf , ONLY :              &   
-      upsrnfh =>   upsrnfh ,  & !: mixed adv scheme in runoffs vicinity (hori.) 
-      upsrnfz =>   upsrnfz ,  & !: mixed adv scheme in runoffs vicinity (vert.)
-      upsadv  =>   upsadv       !: mixed adv scheme in straits vicinity (hori.)
-
+   !!======================================================================
 END MODULE oce_trc
Index: /branches/dev_001_GM/NEMO/TOP_SRC/par_trc.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/par_trc.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/par_trc.F90	(revision 763)
@@ -2,19 +2,20 @@
    !!======================================================================
    !!                        ***  par_trc  ***
-   !! passive tracers :   set the passive tracers parameters
+   !! TOP :   set the passive tracers parameters
    !!======================================================================
-   !! History :
-   !!   8.2  !  96-01  (M. Levy)  Original code
-   !!        !  99-07  (M. Levy)  for LOBSTER1 or NPZD model
-   !!        !  00-04  (O. Aumont, M.A. Foujols)  HAMOCC3 and P3ZD
-   !!   9.0  !  04-03  (C. Ethe)  Free form and module
+   !! History :    -   !  1996-01  (M. Levy)  original code
+   !!              -   !  1999-07  (M. Levy)  for LOBSTER1 or NPZD model
+   !!              -   !  2000-04  (O. Aumont, M.A. Foujols)  HAMOCC3 and P3ZD
+   !!             1.0  !  2004-03  (C. Ethe) Free form and module
+   !!             2.0  !  2007-12  (C. Ethe, G. Madec)  rewritting
    !!----------------------------------------------------------------------
-   !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/par_trc.F90,v 1.6 2007/10/12 09:22:19 opalod Exp $
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
+   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-   !! * Modules used
 #if defined key_passivetrc
-
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
    USE par_trc_trp
 
@@ -22,29 +23,30 @@
    PUBLIC
 
+# if defined key_trc_diatrd
+   !!----------------------------------------------------------------------
+   !!   'key_trc_diatrd'                                  trend diagnostics
+   !!----------------------------------------------------------------------
+#  if defined key_trcldf_eiv
+#   if defined key_trcdmp
+   INTEGER, PARAMETER :: jpdiatrc = 11      !: trends: 3*(advection + diffusion + eiv ) + damping + sms
+#   else
+   INTEGER, PARAMETER :: jpdiatrc = 10      !: trends: 3*(advection + diffusion + eiv )           + sms
+#   endif
+#  else
+#   if defined key_trcdmp
+   INTEGER, PARAMETER :: jpdiatrc =  8      !: trends: 3*(advection + diffusion       ) + damping + sms
+#   else
+   INTEGER, PARAMETER :: jpdiatrc =  7      !: trends: 3*(advection + diffusion       ) + damping + sms
+#   endif
+#  endif
 
-#if defined key_trc_diatrd
-
-!! number of dynamical trends
-#  if defined key_trcldf_eiv
-!! we keep 3 more trends for eddy induced flux (gent velocity)
-#    if defined key_trcdmp
-   INTEGER , PARAMETER :: jpdiatrc = 11
-#    else
-   INTEGER , PARAMETER :: jpdiatrc = 10
-#    endif
-#  else
-#    if defined key_trcdmp
-   INTEGER , PARAMETER :: jpdiatrc = 8
-#    else
-   INTEGER , PARAMETER :: jpdiatrc = 7
-#    endif
-#  endif
 # endif
 
 #else
    !!======================================================================
-   !!  Empty module : No passive tracer 
+   !!  Empty module :                                     No passive tracer 
    !!======================================================================
 #endif
 
+   !!======================================================================
 END MODULE par_trc
Index: /branches/dev_001_GM/NEMO/TOP_SRC/par_trc_trp.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/par_trc_trp.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/par_trc_trp.F90	(revision 763)
@@ -2,76 +2,73 @@
    !!======================================================================
    !!                        ***  par_trc_trp  ***
-   !! passive tracers :   set the number of passive tracers
+   !! TOP :   set the number of passive tracers
    !!======================================================================
-   !! History :
-   !!   9.0  !  04-03  (C. Ethe)  Orignal
+   !! History :   1.0  !  2004-03  (C. Ethe)  Original cade
+   !!             2.0  !  04-03  (C. Ethe, G. Madec)  rewriting
    !!----------------------------------------------------------------------
-   !!  TOP 1.0,  LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! NEMO/TOP 1.0,  LOCEAN-IPSL (2005)
+   !! $Id$
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 #if defined key_passivetrc
-   !!---------------------------------------------------------------------
-   !!   'key_passivetrc'   :                               Passive tracer
-   !!---------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
 
    IMPLICIT NONE
    PUBLIC
    
-   !! jptra   : number of passive tracers
-   !! jpdia2d : additional 2d output
-   !! jpdia3d : additional 3d output
-
-#if defined key_trc_lobster1
+# if defined key_trc_lobster1
    !!---------------------------------------------------------------------
-   !!   'key_trc_lobster1'   :            LOBSTER1 Source Minus Sink model
+   !!   'key_trc_lobster1'   :                    LOBSTER biological model
    !!---------------------------------------------------------------------
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 6
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 19
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 3
-#endif
-#elif defined key_cfc
+   INTEGER, PUBLIC, PARAMETER ::   jptra   =  6   !: number of passive tracers
+#  if defined key_trc_diaadd
+   INTEGER, PUBLIC, PARAMETER ::   jpdia2d = 19   !: additional 2d output
+   INTEGER, PUBLIC, PARAMETER ::   jpdia3d =  3   !: additional 3d output
+#  endif
+# elif defined key_cfc
    !!---------------------------------------------------------------------
    !!   'key_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_trc_pisces
+   INTEGER, PUBLIC, PARAMETER ::   jptra   = 2   !: number of passive tracers
+#  if defined key_trc_diaadd
+   INTEGER, PUBLIC, PARAMETER ::   jpdia2d = 1   !: additional 2d output
+   INTEGER, PUBLIC, PARAMETER ::   jpdia3d = 1   !: additional 3d output
+#  endif
+# elif defined key_trc_pisces
    !!---------------------------------------------------------------------
    !!   'key_trc_pisces'   :                  PISCES Source Minus Sink model
    !!---------------------------------------------------------------------
-#if ! defined key_trc_kriest
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 24
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 13
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 11
+#  if ! defined key_trc_kriest
+   INTEGER, PUBLIC, PARAMETER ::   jptra   = 24   !: number of passive tracers
+#   if defined key_trc_diaadd
+   INTEGER, PUBLIC, PARAMETER ::   jpdia2d = 13   !: additional 2d output
+   INTEGER, PUBLIC, PARAMETER ::   jpdia3d = 11   !: additional 3d output
+#   endif
+#  else
+   INTEGER, PUBLIC, PARAMETER ::   jptra   = 23   !: number of passive tracers
+#   if defined key_trc_diaadd
+   INTEGER, PUBLIC, PARAMETER ::   jpdia2d = 13   !: additional 2d output
+   INTEGER, PUBLIC, PARAMETER ::   jpdia3d = 18   !: additional 3d output
+#   endif
 #  endif
-#else
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 23
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 13
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 18
-#  endif
-#endif
-#else
+# else
    !!---------------------------------------------------------------------
    !!   'default'   :          temperature and salinity as passive tracers
    !!---------------------------------------------------------------------
-   INTEGER, PUBLIC, PARAMETER :: jptra   = 2
-#if defined key_trc_diaadd
-   INTEGER, PUBLIC, PARAMETER :: jpdia2d = 1
-   INTEGER, PUBLIC, PARAMETER :: jpdia3d = 1
-#endif
+   INTEGER, PUBLIC, PARAMETER ::   jptra   = 2   !: number of passive tracers
+#  if defined key_trc_diaadd
+   INTEGER, PUBLIC, PARAMETER ::   jpdia2d = 1   !: additional 2d output
+   INTEGER, PUBLIC, PARAMETER ::   jpdia3d = 1   !: additional 3d output
+#  endif
+# endif
+
+#else
+   !!----------------------------------------------------------------------
+   !!  Empty module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 #endif
 
-#else
    !!======================================================================
-   !!  Empty module : No passive tracer 
-   !!======================================================================
-#endif
-
 END MODULE par_trc_trp
Index: /branches/dev_001_GM/NEMO/TOP_SRC/passivetrc_substitute.h90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/passivetrc_substitute.h90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/passivetrc_substitute.h90	(revision 763)
@@ -5,7 +5,9 @@
    !!              concerning passive tracer model 
    !!----------------------------------------------------------------------
-   !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header$
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
+   !! History :   1.0  !  2004-03 (C. Ethe) Original code
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2007) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
Index: /branches/dev_001_GM/NEMO/TOP_SRC/prtctl_trc.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/prtctl_trc.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/prtctl_trc.F90	(revision 763)
@@ -1,10 +1,19 @@
 MODULE prtctl_trc
-   !!==============================================================================
-   !!                       ***  MODULE prtctl   ***
-   !! Ocean system   : print all SUM trends for each processor domain
-   !!==============================================================================
+   !!======================================================================
+   !!                         ***  MODULE prtctl_trc  ***
+   !! TOP :   print all SUM trends for each processor domain
+   !!======================================================================
+   !! History :    -   !  2005-07  (C. Talandier) original code for OPA
+   !!             1.0  !  2005-10  (C. Ethe     ) adapted to passive tracer
+   !!----------------------------------------------------------------------
 #if defined key_passivetrc
-
-   USE par_trc_trp
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !!   prt_ctl_trc      :   control print in mpp for passive tracers
+   !!   prt_ctl_trc_info :   ???
+   !!   prt_ctl_trc_init :   ???
+   !!----------------------------------------------------------------------
+   USE par_trc_trp      ! ???
    USE oce_trc          ! ocean space and time domain variables
    USE in_out_manager   ! I/O manager
@@ -14,30 +23,26 @@
    PRIVATE
 
-   !! * Module declaration
-   INTEGER, DIMENSION(:), ALLOCATABLE :: numid_trc  ! logical unit 
-   INTEGER, DIMENSION(:), ALLOCATABLE, SAVE ::   &  !:
-      nlditl , nldjtl ,   &  !: first, last indoor index for each i-domain
-      nleitl , nlejtl ,   &  !: first, last indoor index for each j-domain
-      nimpptl, njmpptl,   &  !: i-, j-indexes for each processor
-      nlcitl , nlcjtl ,   &  !: dimensions of every subdomain
-      ibonitl, ibonjtl
-
-   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   &  !:
-      tra_ctl                   !: previous trend values
-
-   !! * Routine accessibility
+   INTEGER , DIMENSION(:), ALLOCATABLE ::   numid_trc          !: logical unit 
+   INTEGER , DIMENSION(:), ALLOCATABLE ::   nlditl , nldjtl    !: first, last indoor index for each i-domain
+   INTEGER , DIMENSION(:), ALLOCATABLE ::   nleitl , nlejtl    !: first, last indoor index for each j-domain
+   INTEGER , DIMENSION(:), ALLOCATABLE ::   nimpptl, njmpptl   !: i-, j-indexes for each processor
+   INTEGER , DIMENSION(:), ALLOCATABLE ::   nlcitl , nlcjtl    !: dimensions of every subdomain
+   INTEGER , DIMENSION(:), ALLOCATABLE ::   ibonitl, ibonjtl
+
+   REAL(wp), DIMENSION(:,:), ALLOCATABLE ::   tra_ctl         !: previous trend values
+
    PUBLIC prt_ctl_trc         ! called by all subroutines
    PUBLIC prt_ctl_trc_info    !
    PUBLIC prt_ctl_trc_init    ! called by opa.F90
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
 
-   SUBROUTINE prt_ctl_trc (tab4d, mask, clinfo, ovlap, kdim, clinfo2)
+   SUBROUTINE prt_ctl_trc( tab4d, mask, clinfo, ovlap, kdim, clinfo2 )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE prt_ctl  ***
@@ -61,33 +66,21 @@
       !!                name must be explicitly typed if used. For instance if the mask
       !!                array tmask(:,:,:) must be passed through the prt_ctl subroutine, 
-      !!                it must looks like: CALL prt_ctl(mask=tmask).
-      !!
-      !!                    tab4d   : 4D array
-      !!                    mask    : mask (3D) to apply to the tab4d array
-      !!                    clinfo  : information about the tab3d array
-      !!                    ovlap   : overlap value
-      !!                    kdim    : k- direction for 4D arrays 
-      !!
-      !! History :
-      !!   9.0  !  05-07  (C. Talandier) original code
-      !!        !  05-10  (C. Ethe     ) adapted to passive tracer
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      REAL(wp), DIMENSION(:,:,:,:), INTENT(in), OPTIONAL :: tab4d
-      REAL(wp), DIMENSION(:,:,:), INTENT(in), OPTIONAL :: mask
-      CHARACTER (len=*), DIMENSION(:), INTENT(in), OPTIONAL :: clinfo
-      CHARACTER (len=*), INTENT(in), OPTIONAL :: clinfo2
-      INTEGER, INTENT(in), OPTIONAL :: ovlap
-      INTEGER, INTENT(in), OPTIONAL :: kdim
-
-      !! * Local declarations
-      INTEGER  :: overlap, jn, js, sind, eind, kdir, j_id
-      REAL(wp) :: zsum, zvctl
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmask, ztab3d
-      CHARACTER (len=20), DIMENSION(jptra) :: cl
-      CHARACTER (len=10) :: cl2
-      !!----------------------------------------------------------------------
-
-      ! Arrays, scalars initialization 
+      !!                it must looks like: CALL prt_ctl( mask=tmask ).
+      !!----------------------------------------------------------------------
+      REAL(wp)         , DIMENSION(:,:,:,:), INTENT(in), OPTIONAL ::   tab4d     ! 4D array
+      REAL(wp)         , DIMENSION(:,:,:)  , INTENT(in), OPTIONAL ::   mask      ! 3D mask to apply to the tab4d array
+      CHARACTER (len=*), DIMENSION(:)      , INTENT(in), OPTIONAL ::   clinfo    ! information about the tab3d array
+      CHARACTER (len=*)                    , INTENT(in), OPTIONAL ::   clinfo2   ! ???
+      INTEGER                              , INTENT(in), OPTIONAL ::   ovlap     ! overlap value
+      INTEGER                              , INTENT(in), OPTIONAL ::   kdim      ! k- direction for 4D arrays
+      !!
+      INTEGER  ::   overlap, jn, js, sind, eind, kdir, j_id
+      REAL(wp) ::   zsum, zvctl
+      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zmask, ztab3d
+      CHARACTER (len=20), DIMENSION(jptra) ::   cl
+      CHARACTER (len=10) ::   cl2
+      !!----------------------------------------------------------------------
+
+      !                                      ! Arrays, scalars initialization 
       overlap       = 0
       kdir          = jpkm1
@@ -99,18 +92,15 @@
       zmask (:,:,:) = 1.e0
 
-      ! Control of optional arguments
-
-      IF( PRESENT(ovlap)   )  overlap       = ovlap
-      IF( PRESENT(kdim)    )  kdir          = kdim
-      IF( PRESENT(clinfo ) )  cl(:)         = clinfo(:)
-      IF( PRESENT(clinfo2) )  cl2           = clinfo2
-      IF( PRESENT(mask)    )  zmask (:,:,:) = mask(:,:,:)
-
-      IF( lk_mpp )   THEN
-         ! processor number
+      !                                      ! Control of optional arguments
+      IF( PRESENT(ovlap)   )   overlap       = ovlap
+      IF( PRESENT(kdim)    )   kdir          = kdim
+      IF( PRESENT(clinfo ) )   cl(:)         = clinfo(:)
+      IF( PRESENT(clinfo2) )   cl2           = clinfo2
+      IF( PRESENT(mask)    )   zmask (:,:,:) = mask(:,:,:)
+
+      IF( lk_mpp )   THEN      ! processor number
          sind = narea
          eind = narea
-      ELSE
-         ! processors total number
+      ELSE                     ! processors total number
          sind = 1
          eind = ijsplt
@@ -119,7 +109,7 @@
       ! Loop over each sub-domain, i.e. the total number of processors ijsplt
       DO js = sind, eind
-
+         !
          ! Set logical unit
-         j_id = numid_trc(js - narea + 1)
+         j_id = numid_trc( js - narea + 1 )
          ! Set indices for the SUM control
          IF( .NOT. lsp_area ) THEN
@@ -130,8 +120,8 @@
                njctle = nlejtl(js) + overlap * MIN( 1, nlcjtl(js) - nlejtl(js))
                ! Do not take into account the bound of the domain
-               IF( ibonitl(js) == -1 .OR. ibonitl(js) == 2 ) nictls = MAX(2, nictls)
-               IF( ibonitl(js) ==  1 .OR. ibonitl(js) == 2 ) nictle = MIN(nictle, nleitl(js) - 1)
-               IF( ibonjtl(js) == -1 .OR. ibonjtl(js) == 2 ) njctls = MAX(2, njctls)
-               IF( ibonjtl(js) ==  1 .OR. ibonjtl(js) == 2 ) njctle = MIN(njctle, nlejtl(js) - 1)
+               IF( ibonitl(js) == -1 .OR. ibonitl(js) == 2 )   nictls = MAX( 2, nictls )
+               IF( ibonitl(js) ==  1 .OR. ibonitl(js) == 2 )   nictle = MIN( nictle, nleitl(js) - 1 )
+               IF( ibonjtl(js) == -1 .OR. ibonjtl(js) == 2 )   njctls = MAX( 2, njctls )
+               IF( ibonjtl(js) ==  1 .OR. ibonjtl(js) == 2 )   njctle = MIN( njctle, nlejtl(js) - 1 )
             ELSE
                nictls = MAX( 1, nimpptl(js) + nlditl(js) - 1 - overlap )
@@ -140,59 +130,49 @@
                njctle = njmpptl(js) + nlejtl(js) - 1 + overlap * MIN( 1, nlcjtl(js) - nlejtl(js) ) 
                ! Do not take into account the bound of the domain
-               IF( ibonitl(js) == -1 .OR. ibonitl(js) == 2 ) nictls = MAX(2, nictls)
-               IF( ibonjtl(js) == -1 .OR. ibonjtl(js) == 2 ) njctls = MAX(2, njctls)
-               IF( ibonitl(js) ==  1 .OR. ibonitl(js) == 2 ) nictle = MIN(nictle, nimpptl(js) + nleitl(js) - 2)
-               IF( ibonjtl(js) ==  1 .OR. ibonjtl(js) == 2 ) njctle = MIN(njctle, njmpptl(js) + nlejtl(js) - 2)
+               IF( ibonitl(js) == -1 .OR. ibonitl(js) == 2 )   nictls = MAX( 2, nictls )
+               IF( ibonjtl(js) == -1 .OR. ibonjtl(js) == 2 )   njctls = MAX( 2, njctls )
+               IF( ibonitl(js) ==  1 .OR. ibonitl(js) == 2 )   nictle = MIN( nictle, nimpptl(js) + nleitl(js) - 2 )
+               IF( ibonjtl(js) ==  1 .OR. ibonjtl(js) == 2 )   njctle = MIN( njctle, njmpptl(js) + nlejtl(js) - 2 )
             ENDIF
          ENDIF
-         
+         !
          IF( PRESENT(clinfo2) ) THEN
             DO jn = 1, jptra
                zvctl  = tra_ctl(jn,js)
                ztab3d(:,:,:) = tab4d(:,:,:,jn)
-               zsum          = SUM( ztab3d(nictls:nictle,njctls:njctle,1:kdir) &
-                  &                 *zmask(nictls:nictle,njctls:njctle,1:kdir) )
+               zsum          = SUM( ztab3d(nictls:nictle,njctls:njctle,1:kdir)   &
+                  &                * zmask(nictls:nictle,njctls:njctle,1:kdir) )
                WRITE(j_id,FMT="(3x,a,' : ',D23.16)") cl(jn), zsum-zvctl
                tra_ctl(jn,js) = zsum
-            ENDDO
+            END DO
          ELSE
             DO jn = 1, jptra
                ztab3d(:,:,:) = tab4d(:,:,:,jn)
-               zsum          = SUM( ztab3d(nictls:nictle,njctls:njctle,1:kdir) &
-                  &               * zmask(nictls:nictle,njctls:njctle,1:kdir) )
+               zsum          = SUM( ztab3d(nictls:nictle,njctls:njctle,1:kdir)   &
+                  &               *  zmask(nictls:nictle,njctls:njctle,1:kdir) )
                WRITE(j_id,FMT="(3x,a,' : ',D23.16)") cl(jn), zsum
             END DO
          ENDIF
-         
-
-      ENDDO
-
+         !
+      END DO
+      !
    END SUBROUTINE prt_ctl_trc
 
-   SUBROUTINE prt_ctl_trc_info (clinfo)
+
+   SUBROUTINE prt_ctl_trc_info( clinfo )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE prt_ctl_trc_info  ***
       !!
       !! ** Purpose : - print information without any computation
-      !!
-      !! ** Action  : - input arguments
-      !!                    clinfo : information to print
-      !!
-      !! History :
-      !!   9.0  !  05-07  (C. Talandier) original code
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      CHARACTER (len=*), INTENT(in) ::   clinfo
-
-      !! * Local declarations
-      INTEGER ::  js, sind, eind, j_id
-      !!----------------------------------------------------------------------
-
-      IF( lk_mpp )   THEN
-         ! processor number
+      !!----------------------------------------------------------------------
+      CHARACTER (len=*), INTENT(in) ::   clinfo      ! information to print
+      !! 
+      INTEGER ::   js, sind, eind, j_id
+      !!----------------------------------------------------------------------
+
+      IF( lk_mpp ) THEN      ! processor number
          sind = narea
          eind = narea
-      ELSE
-         ! total number of processors
+      ELSE                   ! total number of processors
          sind = 1
          eind = ijsplt
@@ -202,10 +182,10 @@
       DO js = sind, eind
          j_id = numid_trc(js - narea + 1)
-         WRITE(j_id,*)clinfo
-      ENDDO
-
-
+         WRITE(j_id,*) clinfo
+      END DO
+      !
    END SUBROUTINE prt_ctl_trc_info
 
+
    SUBROUTINE prt_ctl_trc_init
       !!----------------------------------------------------------------------
@@ -213,11 +193,6 @@
       !!
       !! ** Purpose :   open ASCII files & compute indices
-      !!
-      !! History :
-      !!   9.0  !  05-07  (C. Talandier) original code
-      !!        !  05-10  (C. Ethe     ) adapted to passive tracer
-      !!----------------------------------------------------------------------
-      !! * Local declarations
-      INTEGER ::   js, sind, eind, j_id
+      !!----------------------------------------------------------------------
+      INTEGER            ::   js, sind, eind, j_id
       CHARACTER (len=31) :: clfile_out
       CHARACTER (len=27) :: clb_name
@@ -225,19 +200,18 @@
       !!----------------------------------------------------------------------
 
-      ! Allocate arrays
-      ALLOCATE(nlditl (ijsplt))
-      ALLOCATE(nldjtl (ijsplt))
-      ALLOCATE(nleitl (ijsplt))
-      ALLOCATE(nlejtl (ijsplt))
-      ALLOCATE(nimpptl(ijsplt))
-      ALLOCATE(njmpptl(ijsplt))
-      ALLOCATE(nlcitl (ijsplt))
-      ALLOCATE(nlcjtl (ijsplt))
-      ALLOCATE(tra_ctl(jptra,ijsplt))
-      ALLOCATE(ibonitl(ijsplt))
-      ALLOCATE(ibonjtl(ijsplt))
-
-      ! Initialization 
-      tra_ctl (:,:)=0.e0
+      !                             ! Allocate arrays
+      ALLOCATE( nlditl (ijsplt) )
+      ALLOCATE( nldjtl (ijsplt) )
+      ALLOCATE( nleitl (ijsplt) )
+      ALLOCATE( nlejtl (ijsplt) )
+      ALLOCATE( nimpptl(ijsplt) )
+      ALLOCATE( njmpptl(ijsplt) )
+      ALLOCATE( nlcitl (ijsplt) )
+      ALLOCATE( nlcjtl (ijsplt) )
+      ALLOCATE( tra_ctl(jptra,ijsplt) )
+      ALLOCATE( ibonitl(ijsplt) )
+      ALLOCATE( ibonjtl(ijsplt) )
+
+      tra_ctl(:,:) = 0.e0           ! Initialization to zero
 
       IF( lk_mpp ) THEN
@@ -264,10 +238,10 @@
          eind = ijsplt
          clb_name = "('mono.top.output_',I3.3)"
-         cl_run = 'MONO processor run '
+         cl_run   = 'MONO processor run '
          ! compute indices for each area as done in mpp_init subroutine
          CALL sub_dom
       ENDIF
 
-      ALLOCATE(numid_trc(eind-sind+1))
+      ALLOCATE( numid_trc(eind-sind+1) )
 
       DO js = sind, eind
@@ -278,11 +252,11 @@
          WRITE(j_id,*)
          WRITE(j_id,*) '                 L O D Y C - I P S L'
-         WRITE(j_id,*) '                     O P A model'
+         WRITE(j_id,*) '                       N E M 0 '
          WRITE(j_id,*) '            Ocean General Circulation Model'
-         WRITE(j_id,*) '               version OPA 9.0  (2005) '
+         WRITE(j_id,*) '               version TOP 1.0  (2005) '
          WRITE(j_id,*)
          WRITE(j_id,*) '                   PROC number: ', js
          WRITE(j_id,*)
-         WRITE(j_id,FMT="(19x,a20)")cl_run
+         WRITE(j_id,FMT="(19x,a20)") cl_run
 
          ! Print the SUM control indices
@@ -324,6 +298,6 @@
 9003     FORMAT(a20,i4.4,a17,i4.4)
 9004     FORMAT(a11,i4.4,a26,i4.4,a14)
-      ENDDO
-
+      END DO
+      !
    END SUBROUTINE prt_ctl_trc_init
 
@@ -358,28 +332,17 @@
       !!                    nbondil    : mark for "east-west local boundary"
       !!                    nbondjl    : mark for "north-south local boundary"
-      !!
-      !! History :
-      !!        !  94-11  (M. Guyon)  Original code
-      !!        !  95-04  (J. Escobar, M. Imbard)
-      !!        !  98-02  (M. Guyon)  FETI method
-      !!        !  98-05  (M. Imbard, J. Escobar, L. Colombet )  SHMEM and MPI versions
-      !!   8.5  !  02-08  (G. Madec)  F90 : free form
-      !!----------------------------------------------------------------------
-      !! * Local variables
+      !!----------------------------------------------------------------------
       INTEGER ::   ji, jj, js               ! dummy loop indices
-      INTEGER ::   &
-         ii, ij,                         &  ! temporary integers
-         irestil, irestjl,               &  !    "          "
-         ijpi  , ijpj, nlcil,            &  ! temporary logical unit
-         nlcjl , nbondil, nbondjl,       &
-         nrecil, nrecjl, nldil, nleil, nldjl, nlejl
-
-      INTEGER, DIMENSION(:,:), ALLOCATABLE ::   &
-         iimpptl, ijmpptl, ilcitl, ilcjtl       ! temporary workspace
+      INTEGER ::   ii, ij                   ! temporary integers
+      INTEGER ::   irestil, irestjl         !    "          "
+      INTEGER ::   ijpi  , ijpj, nlcil      ! temporary logical unit
+      INTEGER ::   nlcjl , nbondil, nbondjl
+      INTEGER ::   nrecil, nrecjl, nldil, nleil, nldjl, nlejl
       REAL(wp) ::   zidom, zjdom            ! temporary scalars
-      !!----------------------------------------------------------------------
-
-      !  1. Dimension arrays for subdomains
-      ! -----------------------------------
+      INTEGER, DIMENSION(:,:), ALLOCATABLE ::   iimpptl, ijmpptl, ilcitl, ilcjtl   ! temporary workspace
+      !!----------------------------------------------------------------------
+
+      ! Dimension arrays for subdomains
+      ! -------------------------------
       !  Computation of local domain sizes ilcitl() ilcjtl()
       !  These dimensions depend on global sizes isplt,jsplt and jpiglo,jpjglo
@@ -391,6 +354,6 @@
       ijpj = ( jpjglo-2*jprecj + (jsplt-1) ) / jsplt + 2*jprecj
 
-      ALLOCATE(ilcitl (isplt,jsplt))
-      ALLOCATE(ilcjtl (isplt,jsplt))
+      ALLOCATE( ilcitl (isplt,jsplt) )
+      ALLOCATE( ilcjtl (isplt,jsplt) )
 
       nrecil  = 2 * jpreci
@@ -429,9 +392,9 @@
       END DO
 
-      !  2. Index arrays for subdomains
-      ! -------------------------------
-
-      ALLOCATE(iimpptl(isplt,jsplt))
-      ALLOCATE(ijmpptl(isplt,jsplt))
+      ! Index arrays for subdomains
+      ! ---------------------------
+
+      ALLOCATE( iimpptl(isplt,jsplt) )
+      ALLOCATE( ijmpptl(isplt,jsplt) )
       
       iimpptl(:,:) = 1
@@ -454,6 +417,6 @@
       ENDIF
       
-      ! 3. Subdomain description
-      ! ------------------------
+      ! Subdomain description
+      ! ---------------------
 
       DO js = 1, ijsplt
@@ -492,18 +455,17 @@
       END DO
 
-      DEALLOCATE(iimpptl)
-      DEALLOCATE(ijmpptl)
-      DEALLOCATE(ilcitl)
-      DEALLOCATE(ilcjtl)
-
+      DEALLOCATE( iimpptl )
+      DEALLOCATE( ijmpptl )
+      DEALLOCATE( ilcitl )
+      DEALLOCATE( ilcjtl )
+      !
    END SUBROUTINE sub_dom
  
 #else
    !!----------------------------------------------------------------------
-   !!   Dummy module :                      NO passive tracer
+   !!   Dummy module :                                    NO passive tracer
    !!----------------------------------------------------------------------
 #endif
     
    !!======================================================================
-
 END MODULE prtctl_trc
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trc.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trc.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trc.F90	(revision 763)
@@ -4,206 +4,153 @@
    !! Passive tracers   :  module for tracers defined
    !!======================================================================
-   !! History :
-   !!   8.2  !  96-01  (M. Levy)  Original code
-   !!        !  99-07  (M. Levy)  for LOBSTER1 or NPZD model
-   !!        !  00-04  (O. Aumont, M.A. Foujols)  HAMOCC3 and P3ZD
-   !!   9.0  !  04-03  (C. Ethe)  Free form and module
+   !! History :    -   !  1996-01  (M. Levy)  Original code
+   !!              -   !  1999-07  (M. Levy)  for LOBSTER1 or NPZD model
+   !!              -   !  2000-04  (O. Aumont, M.A. Foujols)  HAMOCC3 and P3ZD
+   !!             1.0  !  2004-03  (C. Ethe)  Free form and module
    !!----------------------------------------------------------------------
-   !!  TOP 1.0,  LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-#if defined key_passivetrc
+# if defined key_passivetrc
    !!----------------------------------------------------------------------
-   !!   'key_passivetrc'   :                               Passive tracer
-   !!---------------------------------------------------------------------
-   !! * Modules used
+   !!   'key_passivetrc'   :                                Passive tracers
+   !!----------------------------------------------------------------------
    USE par_oce
    USE par_trc
+   
    IMPLICIT NONE
-
    PUBLIC
-
 
    !! passive tracers names and units (read in namelist)
    !! --------------------------------------------------
-   CHARACTER(len=12), PUBLIC, DIMENSION(jptra) :: &
-      ctrcnm  ,   &   !!: tracer name 
-      ctrcun          !!: tracer unit
-
-   CHARACTER(len=80), PUBLIC, DIMENSION(jptra) :: &
-      ctrcnl          !!: tracer long name 
+   CHARACTER(len=12), PUBLIC, DIMENSION(jptra) ::   ctrcnm     !: tracer name 
+   CHARACTER(len=12), PUBLIC, DIMENSION(jptra) ::   ctrcun     !: tracer unit
+   CHARACTER(len=80), PUBLIC, DIMENSION(jptra) ::   ctrcnl     !: tracer long name 
    
    
    !! parameters for the control of passive tracers
    !! --------------------------------------------------
-   INTEGER, PUBLIC ::  &
-      numnat          !!: the number of the passive tracer NAMELIST
-   
-   LOGICAL, PUBLIC, DIMENSION(jptra) ::   &
-      lutini          !!:  initialisation from FILE or not (NAMELIST)
-
-   INTEGER , PUBLIC, DIMENSION(jptra) :: &
-      nutini          !!: FORTRAN LOGICAL UNIT for initialisation file
+   INTEGER, PUBLIC                   ::   numnat   !: the number of the passive tracer NAMELIST
+   LOGICAL, PUBLIC, DIMENSION(jptra) ::   lutini   !:  initialisation from FILE or not (NAMELIST)
+   INTEGER, PUBLIC, DIMENSION(jptra) ::   nutini   !: FORTRAN LOGICAL UNIT for initialisation file
 
    !! passive tracers fields (before,now,after)
    !! --------------------------------------------------
-   REAL(wp), PUBLIC, SAVE  ::  &
-      trai    ,   &   !!: initial total tracer
-      areatot         !!: total volume 
+   REAL(wp), PUBLIC ::   trai       !: initial total tracer
+   REAL(wp), PUBLIC ::   areatot    !: total volume 
 
-   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) :: &
-      trn     ,   &   !!: traceur concentration for actual time step
-      tra     ,   &   !!: traceur concentration for next time step
-      trb             !!: traceur concentration for before time step
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) ::   trn   !: traceur concentration for actual time step
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) ::   tra   !: traceur concentration for next time step
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jptra) ::   trb   !: traceur concentration for before time step
 
 
    !! numerical parameter (NAMELIST)
    !! --------------------------------------------------
-   REAL(wp), PUBLIC  ::  &
-      rsc     ,   &   !!: tuning coefficient for anti-diffusion
-      rtrn            !!: value for truncation
+   REAL(wp), PUBLIC ::   rsc    !: tuning coefficient for anti-diffusion
+   REAL(wp), PUBLIC ::   rtrn   !: value for truncation
 
    !! namelist parameters
    !! --------------------------------------------------
-   INTEGER , PUBLIC  ::  & 
-      ncortrc ,   &   !!: number of corrective phases
-      ndttrc  ,   &   !!: frequency of step on passive tracers
-      nittrc000       !!: first time step of passive tracers model  
-
-   LOGICAL, PUBLIC  ::  & 
-      crosster        !!: logical if true computes crossterms
+   INTEGER , PUBLIC ::   ncortrc     !: number of corrective phases
+   INTEGER , PUBLIC ::   ndttrc      !: frequency of step on passive tracers
+   INTEGER , PUBLIC ::   nittrc000   !: first time step of passive tracers model  
+   LOGICAL , PUBLIC ::   crosster    !: logical if true computes crossterms
 
 
    !! isopycnal scheme for passive tracers
-   !! --------------------------------------------------  
-   REAL(wp), PUBLIC  ::  &
-      ahtrb0  ,   &   !!: background diffusivity coefficient for passive tracer (m2/s)
-      trcrat  ,   &   !!: ratio between passive and active tracer coeff for diffusion
-      ahtrc0  ,   &   !!: horizontal eddy diffusivity for passive tracers (m2/s)
-      aeivtr0         !!: eddy induced velocity coefficient (m2/s)
+   !! ------------------------------------  
+   REAL(wp), PUBLIC ::   ahtrb0     !: background diffusivity coefficient for passive tracer (m2/s)
+   REAL(wp), PUBLIC ::   trcrat     !: ratio between passive and active tracer coeff for diffusion
+   REAL(wp), PUBLIC ::   ahtrc0     !: horizontal eddy diffusivity for passive tracers (m2/s)
+   REAL(wp), PUBLIC ::   aeivtr0    !: eddy induced velocity coefficient (m2/s)
    
    
    !! passive tracers restart (input and output)
-   !! --------------------------------------------------  
-   LOGICAL, PUBLIC  ::  &
-      lrsttr          !!: boolean term for restart i/o for passive tracers (namelist)
-   
-   INTEGER , PUBLIC  ::  &
-      nutwrs  ,   &   !!: output FILE for passive tracers restart
-      nutrst  ,   &   !!: logical unit for restart FILE for passive tracers
-      nrsttr          !!: control of the time step ( 0 or 1 ) for pass. tr.
+   !! ------------------------------------------  
+   LOGICAL , PUBLIC ::   lrsttr     !: boolean term for restart i/o for passive tracers (namelist)
+   INTEGER , PUBLIC ::   nutwrs     !: output FILE for passive tracers restart
+   INTEGER , PUBLIC ::   nutrst     !: logical unit for restart FILE for passive tracers
+   INTEGER , PUBLIC ::   nrsttr     !: control of the time step ( 0 or 1 ) for pass. tr.
    
    
    !! interpolated gradient
    !!--------------------------------------------------  
-   REAL (wp), PUBLIC, DIMENSION (jpi,jpj,jptra) :: &
-      gtru    ,   &   !!: horizontal gradient at u-points at bottom ocean level
-      gtrv            !!: horizontal gradient at v-points at bottom ocean level
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jptra) ::   gtru   !: horizontal gradient at u-points at bottom ocean level
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jptra) ::   gtrv   !: horizontal gradient at v-points at bottom ocean level
 
    
-#if defined key_trcldf_eiv && defined key_diaeiv
+# if defined key_trcldf_eiv && defined key_diaeiv
    !! The three component of the eddy induced velocity
    !! --------------------------------------------------
-   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) :: &
-      u_trc_eiv,  &   !!: u-eiv (m/s)
-      v_trc_eiv,  &   !!: v-eiv (m/s)
-      w_trc_eiv       !!: w-eiv (m/s)
-#endif
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) ::   u_trc_eiv   !: u-eiv (m/s)
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) ::   v_trc_eiv   !: v-eiv (m/s)
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk) ::   w_trc_eiv   !: w-eiv (m/s)
+# endif
    
    
    !! information for outputs
    !! --------------------------------------------------
-   INTEGER , PUBLIC   ::  & 
-      nwritetrc       !!: time step frequency for concentration outputs (namelist)
+   INTEGER , PUBLIC ::   nwritetrc   !: time step frequency for concentration outputs (namelist)
    
-#if defined key_trc_diaadd
+# if defined key_trc_diaadd
    !! additional 2D/3D outputs namelist
    !! --------------------------------------------------
-   CHARACTER(len=8), PUBLIC, DIMENSION (jpdia2d) ::  & 
-      ctrc2d  ,   &   !!: 2d output field name
-      ctrc2u          !!: 2d output field unit
+   CHARACTER(len= 8), PUBLIC, DIMENSION (jpdia2d) ::   ctrc2d   !: 2d output field name
+   CHARACTER(len= 8), PUBLIC, DIMENSION (jpdia2d) ::   ctrc2u   !: 2d output field unit   
+   CHARACTER(len= 8), PUBLIC, DIMENSION (jpdia3d) ::   ctrc3d   !: 3d output field name
+   CHARACTER(len= 8), PUBLIC, DIMENSION (jpdia3d) ::   ctrc3u   !: 3d output field unit
+   CHARACTER(len=80), PUBLIC, DIMENSION (jpdia2d) ::   ctrc2l   !: 2d output field long name
+   CHARACTER(len=80), PUBLIC, DIMENSION (jpdia3d) ::   ctrc3l   !: 3d output field long name
    
-   CHARACTER(len=8), PUBLIC, DIMENSION (jpdia3d) ::  & 
-      ctrc3d ,    &   !!: 3d output field name
-      ctrc3u          !!: 3d output field unit
-   
-   CHARACTER(len=80), PUBLIC, DIMENSION (jpdia2d) ::  & 
-      ctrc2l          !!: 2d output field long name
-   
-   CHARACTER(len=80), PUBLIC, DIMENSION (jpdia3d) ::  & 
-      ctrc3l          !!: 3d output field long name
-   
-   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpdia2d) ::  &  
-      trc2d           !!:  additional 2d outputs  
-   
-   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jpdia3d) ::  &  
-      trc3d           !!:  additional 3d outputs  
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,    jpdia2d) ::   trc2d   !:  additional 2d outputs  
+   REAL(wp), PUBLIC, DIMENSION (jpi,jpj,jpk,jpdia3d) ::   trc3d   !:  additional 3d outputs  
    
    
    !! netcdf files and index common
    !! --------------------------------------------------
-   INTEGER , PUBLIC :: &
-      nwriteadd     !!: frequency of additional arrays outputs(namelist)
-#endif
+   INTEGER , PUBLIC ::   nwriteadd     !: frequency of additional arrays outputs(namelist)
+# endif
    
-#if defined key_trc_diatrd
+# if defined key_trc_diatrd
    
    !!  non conservative trends (biological, ...)
    !! --------------------------------------------------
-   LOGICAL, PUBLIC, DIMENSION (jptra)  ::  &  
-      luttrd          !!: large trends diagnostic to write or not (namelist)
+   LOGICAL, PUBLIC, DIMENSION (jptra) ::   luttrd   !: large trends diagnostic to write or not (namelist)
    
-   !!  dynamical trends
-   !!	trtrd()   : trends of the tracer equations
-   !!           1 : X advection
-   !!           2 : Y advection
-   !!           3 : Z advection
-   !!           4 : X diffusion
-   !!           5 : Y diffusion
-   !!           6 : Z diffusion
-   !!           7 : X gent velocity
-   !!           8 : Y gent velocity
-   !!           9 : Z gent velocity
+   !!  Advection-diffusion trends
    !! --------------------------------------------------
+   REAL(wp), PUBLIC, DIMENSION(:,:,:,:,:), ALLOCATABLE ::   trtrd   !: trends of the tracer equations
    
-   
-   REAL(wp), PUBLIC, DIMENSION(:,:,:,:,:), ALLOCATABLE, SAVE :: &
-      trtrd           !!: trends of the tracer equations
-   
-   INTEGER, PUBLIC, DIMENSION(jptra), SAVE :: ikeep ! indice of tracer for which dyn trends are stored
-   INTEGER, PUBLIC, SAVE                   :: nkeep ! number of tracers for which dyn trends are stored 
-                                                    ! (used to allocate trtrd buffer)
+   INTEGER, PUBLIC, DIMENSION(jptra) :: ikeep ! indice of tracer for which dyn trends are stored
+   INTEGER, PUBLIC                   :: nkeep ! number of tracers for which dyn trends are stored 
+   !                                          ! (used to allocate trtrd buffer)
 
    !! netcdf files and index common
    !! --------------------------------------------------
-   INTEGER , PUBLIC :: &
-      nwritetrd       !!: frequency of additional arrays outputs(namelist)
+   INTEGER , PUBLIC ::   nwritetrd   !: frequency of additional arrays outputs(namelist)
    
-#endif 
+# endif 
    
    !! passive tracers data read and at given time_step
    !! --------------------------------------------------
-#if defined key_dtatrc
-   
-   INTEGER , PUBLIC, DIMENSION(jptra) :: &
-      numtr          !!: logical unit for passive tracers data
-   
-#endif
+# if defined key_dtatrc
+   INTEGER , PUBLIC, DIMENSION(jptra) ::   numtr   !: logical unit for passive tracers data
+# endif
 
   !!  1D configuration
   !! --------------------------------------------------
-#if defined key_cfg_1d
+# if defined key_cfg_1d
       LOGICAL, PARAMETER ::   lk_trccfg_1d   = .TRUE.   !: 1D pass. tracer configuration flag
-#else   
+# else   
       LOGICAL, PARAMETER ::   lk_trccfg_1d   = .FALSE.  !: 1D pass. tracer configuration flag
+# endif
+
+#else
+   !!----------------------------------------------------------------------
+   !!  Empty module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 #endif
 
-
-#else
    !!======================================================================
-   !!  Empty module : No passive tracer 
-   !!======================================================================
-#endif
-
 END MODULE trc
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trcctl.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trcctl.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trcctl.F90	(revision 763)
@@ -1,20 +1,15 @@
 MODULE trcctl
-   !!==========================================================================
-   !!
-   !!                       *** MODULE trcctl ***
-   !!
-   !! Only for passive tracer
-   !! control the cpp options for the run and IF files are availables
-   !! control also consistancy between options and namelist values
-   !!  O.Aumont and A.El Moussaoui 03/05 F90 
-   !!=========================================================================
-   !!  TOP 1.0,  LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !!======================================================================
+   !!                         ***  MODULE trcctl  ***
+   !! TOP :   control the cpp options, files and namelist values of a run
+   !!======================================================================
+   !! History :   1.0  !  2005-03 (O. Aumont, A. El Moussaoui) original code
    !!----------------------------------------------------------------------
 #if defined key_passivetrc
    !!----------------------------------------------------------------------
-   !! * Modules used
-   !! ==============
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !!   trc_ctl    : control the cpp options, files and namelist values
+   !!----------------------------------------------------------------------
    USE oce_trc
    USE trc
@@ -25,76 +20,49 @@
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC trc_ctl
+   PUBLIC trc_ctl      ! called by ???
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
 
    SUBROUTINE trc_ctl
-      !!===========================================================================================
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_ctl  ***
       !!
-      !!
-      !!                       ROUTINE trcctl
-      !!                     ******************
-      !!
-      !!      we use IF/ENDIF inside #IF defined option-cpp
-      !!      FILE name must not exceed 21 characters
-      !!      
-      !!===========================================================================================
-      
+      !! ** Purpose :   control the cpp options, namelist and files 
+      !!              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  
-      !!---------------------------------------------------------------------
+      INTEGER ::   istop, jn
+      !!----------------------------------------------------------------------
 
-      ! 0. Parameter
-      ! ------------
-      istop = 0
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' trc_ctl :   passive tracer option'
+      IF(lwp) WRITE(numout,*) ' ~~~~~~~'
 
-      ! 1. restart for passive tracer (input)
-      ! -----------------------------
+      istop = 0      ! initialise to zero
 
-      IF(lwp) WRITE(numout,*) ' '
-      IF(lwp) WRITE(numout,*) ' *** PASSIVE TRACER MODEL OPTIONS'
-      IF(lwp) WRITE(numout,*) ' *** CONTROL'
-      IF(lwp) WRITE(numout,*) ' '
-
-      IF(lwp) WRITE(numout,*) ' '
-      IF(lwp) WRITE(numout,*) ' *** restart option for passive tracer'
-      IF(lwp) WRITE(numout,*) ' '
-
-      IF(lrsttr) THEN
-         IF(lwp) WRITE(numout,*) ' READ a restart FILE for passive tracer'
+      ! restart for passive tracer (input)
+      IF( lrsttr ) THEN
+         IF(lwp) WRITE(numout,*) '       READ a restart FILE for passive tracer'
          IF(lwp) WRITE(numout,*) ' '
       ELSE
-         IF(lwp) WRITE(numout,*) ' no restart FILE'
-         IF(lwp) WRITE(numout,*) ' '
-
-         ! 2. OPEN FILES for initial tracer value
-         ! --------------------------------------
-         DO jn=1,jptra
-
-            ! OPEN input FILE only IF lutini(jn) is true
-            ! ------------------------------------------
-            IF (lutini(jn)) THEN  
-
-               ! prepare input FILE name a
-               ! -------------------------                        
+         IF(lwp) WRITE(numout,*) '       no restart FILE'
+         IF(lwp) WRITE(numout,*)
+         DO jn = 1, jptra
+            IF( lutini(jn) ) THEN      ! OPEN input FILE only IF lutini(jn) is true
                IF(lwp) WRITE(numout,*)  &
-                  ' READ an initial FILE  for passive tracer number :',jn        &
-                  ,' traceur : ',ctrcnm(jn) 
-               IF(lwp) WRITE(numout,*) ' '
+                  '       READ an initial FILE  for passive tracer number :', jn, ' traceur : ', ctrcnm(jn) 
             END IF
          END DO
       ENDIF
 
-      ! 3. Don't USE non penetrative convective mixing option
-      !     it's not implemented for passive tracer
-      ! -----------------------------------------------------
-
-      IF( ln_zdfnpc) THEN
+      ! 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,*) ' =======   ============= '
@@ -105,54 +73,44 @@
       ENDIF
 
-      ! 4. transport scheme option
-      ! --------------------------
-
-      IF(lwp) WRITE(numout,*) '  '
+      ! transport scheme option
       CALL trc_trp_ctl
 
-
-      ! 5. SMS model
-      ! ---------------------------------------------
-
+      ! SMS model
       IF(lwp) WRITE(numout,*) '  '
-      IF(lwp) WRITE(numout,*) ' *** Source/Sink model option'
+      IF(lwp) WRITE(numout,*) '       Source/Sink model option'
       IF(lwp) WRITE(numout,*) '  '
 
-
-#if defined key_trc_lobster1
+# if defined key_trc_lobster1
 #   include "trcctl.lobster1.h90"
-#elif defined key_trc_pisces
+# elif defined key_trc_pisces
 #   include "trcctl.pisces.h90"
-#elif defined key_cfc
+# elif defined key_cfc
 #   include "trcctl.cfc.h90"
-#else
-
-      IF(lwp) WRITE (numout,*) ' No Source/Sink model '
-      IF(lwp) WRITE (numout,*) ' '
+# else
+      IF(lwp) WRITE (numout,*) '       No Source/Sink '
+      IF(lwp) WRITE (numout,*)
 #endif
 
       ! E r r o r  control
       ! ------------------
-
-      IF ( istop > 0  ) THEN
+      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,*) '  **************************'
          IF(lwp)WRITE(numout,*)
          STOP 'trcctl'
       ENDIF
-
+      !
    END SUBROUTINE trc_ctl
 
 #else
-   !!======================================================================
-   !!  Empty module : No passive tracer
-   !!======================================================================
+   !!----------------------------------------------------------------------
+   !!  Empty module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE trc_ctl
-
+   SUBROUTINE trc_ctl                      ! Dummy routine
    END SUBROUTINE trc_ctl
-   
 #endif
 
+   !!======================================================================
 END MODULE trcctl
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trcdia.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trcdia.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trcdia.F90	(revision 763)
@@ -1,17 +1,15 @@
 MODULE trcdia
-   !!==========================================================================
-   !!
+   !!======================================================================
    !!                       *** MODULE trcdia ***
-   !! Output  for tracer concentration  
-   !! O.Aumont and A.El Moussaoui 03/05 F90 
-   !!==========================================================================
-   !!  TOP 1.0,  LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !! TOP :   Output of passive tracers
+   !!======================================================================
+   !! History :   1.0  !  2005-03 (O. Aumont, A. El Moussaoui) original code
    !!----------------------------------------------------------------------
 #if defined key_passivetrc
    !!----------------------------------------------------------------------
-   !! * Modules used
- 
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !!   trc_dia    :  output passive tracer fields
+   !!----------------------------------------------------------------------
    USE trcdit
 
@@ -19,60 +17,48 @@
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC trc_dia
+   PUBLIC trc_dia      ! called by ???
 
-   !! * Module variables
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
 
-   SUBROUTINE trc_dia(kt,kindic)  
-      !!===========================================================================================
+   SUBROUTINE trc_dia( kt, kindic )  
+      !!---------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_dia  ***
       !!
-      !!                       ROUTINE trcdii_wr
-      !!===========================================================================================
+      !! ** Purpose :   output passive tracers fields 
+      !!---------------------------------------------------------------------
+      INTEGER, INTENT( in ) :: kt, kindic
+      !!---------------------------------------------------------------------
+      
+      CALL trcdit_wr( kt, kindic )      ! outputs for tracer concentration
 
-      INTEGER, INTENT( in ) :: kt, kindic
+# if defined key_trc_diatrd
+      CALL trcdid_wr( kt, kindic )      ! outputs for dynamical trends
+# endif
 
-      ! outputs for tracer concentration
-      ! -------------------------------- 
+# if defined key_trc_diaadd
+      CALL trcdii_wr( kt, kindic )      ! outputs for additional arrays
+# endif
 
-      CALL trcdit_wr(kt,kindic)
-
-#if defined key_trc_diatrd
-
-      ! outputs for dynamical trends
-      ! ----------------------------
-
-      CALL trcdid_wr(kt,kindic)
-
-#endif
-#if defined key_trc_diaadd
-
-      ! outputs for additional arrays
-      ! -----------------------------
-
-      CALL trcdii_wr(kt,kindic)
-
-#endif
-#if defined key_trc_diabio
-
-      ! outputs for biological trends
-      ! -----------------------------
-
-      CALL trcdib_wr(kt,kindic)
-
-#endif
-
+# if defined key_trc_diabio
+      CALL trcdib_wr( kt, kindic )      ! outputs for biological trends
+# endif
+      !
    END SUBROUTINE trc_dia
 
 #else
-   !!======================================================================
-   !!  Empty module : No passive tracer
-   !!======================================================================
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE trc_dia
-      
+   SUBROUTINE trc_dia                      ! Empty routine   
    END SUBROUTINE trc_dia   
 #endif
 
+   !!======================================================================
 END MODULE trcdia
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trcdit.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trcdit.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trcdit.F90	(revision 763)
@@ -1,10 +1,23 @@
 MODULE trcdit
+   !!======================================================================
+   !!                       *** MODULE trcdit ***
+   !! TOP :   Output of passive tracers
+   !! O.Aumont and A.El Moussaoui 03/05 F90 
+   !!======================================================================
+   !! History :    -   !  1995-01 (M. Levy)  Original code
+   !!              -   !  1998-01 (C. Levy) NETCDF format using ioipsl interface
+   !!              -   !  1999-01 (M.A. Foujols) adapted for passive tracer
+   !!              -   !  1999-09 (M.A. Foujols) split into three parts
+   !!             1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90
    !!----------------------------------------------------------------------
-   !!  TOP 1.0,  LOCEAN-IPSL (2005) 
-   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/trcdit.F90,v 1.9 2007/10/12 09:22:19 opalod Exp $ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+#if defined key_passivetrc
    !!----------------------------------------------------------------------
-   !! * Modules used
-   !! ==============
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !! trcdit_wr   :
+   !! trcdid_wr   :
+   !! trcdii_wr   :
+   !! trcdib_wr   : 
+   !!----------------------------------------------------------------------
    USE oce_trc
    USE trc
@@ -12,131 +25,92 @@
    USE in_out_manager  ! I/O manager
    USE lib_mpp
+   USE ioipsl
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC trcdit_wr
-   PUBLIC trcdid_wr
-   PUBLIC trcdii_wr
-   PUBLIC trcdib_wr
-
-   !! * Module variables
-   INTEGER            ::  &
-      nit5     ,  &   !!: id for tracer output file
-      ndepit5  ,  &   !!: id for depth mesh
-      nhorit5  ,  &   !!: id for horizontal mesh
-      ndimt50  ,  &   !!: number of ocean points in index array
-      ndimt51         !!: number of ocean points in index array
-   REAL(wp) :: zjulian
-   INTEGER , DIMENSION (jpij*jpk) ::  ndext50 !!: integer arrays for ocean 3D index
-   INTEGER , DIMENSION (jpij)     ::  ndext51 !!: integer arrays for ocean surface index
-#    if defined key_passivetrc && defined key_trc_diaadd
-   INTEGER            :: &
-      nitd     ,  &   !!: id for additional array output file
-      ndepitd  ,  &   !!: id for depth mesh
-      nhoritd         !!: id for horizontal mesh
-#    endif
-#    if defined key_passivetrc && defined key_trc_diatrd
-   INTEGER , DIMENSION (jptra)  :: &
-      nit6    ,   &   !!: id for additional array output file
-      ndepit6 ,   &   !!: id for depth mesh
-      nhorit6         !!: id for horizontal mesh
-#    endif
-#    if defined key_passivetrc && defined key_trc_diabio
-   INTEGER            :: &
-      nitb     ,   &  !!:  id for additional array output FILE
-      ndepitb  ,   &  !!:  id for depth mesh
-      nhoritb         !!:  id for horizontal mesh
-
-#    endif
-
+   PUBLIC trcdit_wr      ! caller in trcdia.F90
+   PUBLIC trcdid_wr      ! caller in trcdia.F90
+   PUBLIC trcdii_wr      ! caller in trcdia.F90
+   PUBLIC trcdib_wr      ! caller in trcdia.F90
+
+   INTEGER  ::   nit5      !: id for tracer output file
+   INTEGER  ::   ndepit5   !: id for depth mesh
+   INTEGER  ::   nhorit5   !: id for horizontal mesh
+   INTEGER  ::   ndimt50   !: number of ocean points in index array
+   INTEGER  ::   ndimt51   !: number of ocean points in index array
+   REAL(wp) ::   zjulian   !: ????   not DOCTOR !
+   INTEGER , DIMENSION (jpij*jpk) ::   ndext50   !: integer arrays for ocean 3D index
+   INTEGER , DIMENSION (jpij)     ::   ndext51   !: integer arrays for ocean surface index
+# if defined key_trc_diaadd
+   INTEGER  ::   nitd      !: id for additional array output file
+   INTEGER  ::   ndepitd   !: id for depth mesh
+   INTEGER  ::   nhoritd   !: id for horizontal mesh
+# endif
+# if defined key_trc_diatrd
+   INTEGER , DIMENSION (jptra) ::   nit6      !: id for additional array output file
+   INTEGER , DIMENSION (jptra) ::   ndepit6   !: id for depth mesh
+   INTEGER , DIMENSION (jptra) ::   nhorit6   !: id for horizontal mesh
+# endif
+# if defined key_trc_diabio
+   INTEGER  ::   ndepitb   !:  id for depth mesh
+   INTEGER  ::   nhoritb   !:  id for horizontal mesh
+# endif
 
    !! * Substitutions
 #  include "passivetrc_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
 
-#    if defined key_passivetrc
-
-      SUBROUTINE trcdit_wr(kt,kindic)
-   !!===========================================================================================
-   !!
-   !!                       ROUTINE trcdit_wr
-   !!===========================================================================================
-   !!
-   !! Purpose :
-   !!---------
-   !!          Standard output of passive tracer : concentration fields
-   !!
-   !!
-   !! Method :
-   !! -------
-   !!
-   !!        At the beginning of the first time step (nit000), define all
-   !!        the NETCDF files and fields for concentration of passive tracer
-   !!
-   !!        At each time step call histdef to compute the mean if necessary
-   !!        Each nwritetrc time step, output the instantaneous or mean fields
-   !!
-   !!        IF kindic <0, output of fields before the model interruption.
-   !!        IF kindic =0, time step loop
-   !!        IF kindic >0, output of fields before the time step loop
-   !!
-   !! Input :
-   !! -----
-   !!   argument
-   !!           kt              : time step
-   !!           kindic          : indicator of abnormal termination
-   !!
-   !! EXTERNAL :
-   !! --------
-   !! prihre, hist..., dianam
-   !!
-   !! History:
-   !! --------
-   !!   original  : 95-01  passive tracers  (M. Levy)
-   !!   additions : 98-01 (C. Levy) NETCDF format using ioipsl interface
-   !!   additions : 99-01 (M.A. Foujols) adapted for passive tracer
-   !!   additions : 99-09 (M.A. Foujols) split into three parts
-   !!   05-03 (O. Aumont and A. El Moussaoui) F90
-   !!==================================================================================================!
-
-      !! Modules used
-      USE ioipsl
-
-
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt,kindic         ! ocean time-step
-
-      !! * Local declarations
-      INTEGER :: jn
-      LOGICAL :: ll_print = .FALSE.
-
+      SUBROUTINE trcdit_wr( kt, kindic )
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trcdit_wr  ***
+      !!
+      !! ** Purpose :   Standard output of passive tracer : concentration fields
+      !!
+      !! ** Method  :   At the beginning of the first time step (nit000), define all
+      !!             the NETCDF files and fields for concentration of passive tracer
+      !!
+      !!        At each time step call histdef to compute the mean if necessary
+      !!        Each nwritetrc time step, output the instantaneous or mean fields
+      !!
+      !!        IF kindic <0, output of fields before the model interruption.
+      !!        IF kindic =0, time step loop
+      !!        IF kindic >0, output of fields before the time step loop
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT( in ) ::   kt          ! ocean time-step
+      INTEGER, INTENT( in ) ::   kindic      ! indicator of abnormal termination
+      !!
+      INTEGER ::   jn
+      LOGICAL ::   ll_print = .FALSE.
       CHARACTER (len=40) :: clhstnam, clop
       CHARACTER (len=20) :: cltra, cltrau
       CHARACTER (len=80) :: cltral
-
       REAL(wp) :: zsto, zout, zdt
       INTEGER  :: iimi, iima, ijmi, ijma, ipk, it
-!
-! 0. Initialisation
-! -----------------
-
-! local variable for debugging
-      ll_print = .FALSE.
+      !!----------------------------------------------------------------------
+
+      ! Initialisation
+      ! --------------
+
+      ! local variable for debugging
+      ll_print = .FALSE.                  ! change it to true for more control print
       ll_print = ll_print .AND. lwp
 
-! Define frequency of output and means
-
+      ! Define frequency of output and means
       zdt = rdt
-#        if defined key_diainstant
-      zsto=nwritetrc*rdt
-      clop='inst(only(x))'
-#        else
-      zsto=zdt
-      clop='ave(only(x))'
-#        endif
-      zout=nwritetrc*zdt
+# if defined key_diainstant
+      zsto = nwritetrc * rdt
+      clop = 'inst(only(x))'
+# else
+      zsto = zdt
+      clop = 'ave(only(x))'
+# endif
+      zout = nwritetrc * zdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -148,187 +122,128 @@
       it = kt - nittrc000 + 1
 
-! 1. Define NETCDF files and fields at beginning of first time step
-! -----------------------------------------------------------------
+      ! Define NETCDF files and fields at beginning of first time step
+      ! --------------------------------------------------------------
 
       IF(ll_print)WRITE(numout,*)'trcdit_wr kt=',kt,' kindic ',kindic
-      IF(kt == nittrc000) THEN
-
-! Compute julian date from starting date of the run
-
-         CALL ymds2ju(nyear,nmonth,nday,0.0,zjulian)
+      
+      IF( kt == nittrc000 ) THEN
+
+         ! Compute julian date from starting date of the run
+         CALL ymds2ju( nyear, nmonth, nday, 0.0, zjulian )
          IF(lwp)WRITE(numout,*)' '  
-         IF(lwp)WRITE(numout,*)' Date 0 used :',nittrc000     &
-       &     ,' YEAR ',nyear,' MONTH ',nmonth,' DAY ',nday   &
-       &     ,'Julian day : ',zjulian    
-         IF(lwp)WRITE(numout,*) ' indexes of zoom = ', iimi, iima, ijmi, ijma,  &
-                                 ' limit storage in depth = ', ipk
+         IF(lwp)WRITE(numout,*)' Date 0 used :', nittrc000                         &
+            &                 ,' YEAR ', nyear, ' MONTH ', nmonth, ' DAY ', nday   &
+            &                 ,'Julian day : ', zjulian    
+         IF(lwp) WRITE(numout,*) ' indexes of zoom = ', iimi, iima, ijmi, ijma,  &
+            &                    ' limit storage in depth = ', ipk
 
 
 ! Define the NETCDF files for passive tracer concentration
 
-         CALL dia_nam(clhstnam,nwritetrc,'ptrc_T')
-
+         CALL dia_nam( clhstnam, nwritetrc, 'ptrc_T' )
          IF(lwp)WRITE(numout,*)" Name of NETCDF file ", clhstnam
 ! Horizontal grid : glamt and gphit
- 
-         CALL histbeg(clhstnam, jpi, glamt, jpj, gphit,     &
-         &    iimi, iima-iimi+1, ijmi, ijma-ijmi+1,         & 
-         &    0, zjulian, zdt, nhorit5, nit5 , domain_id=nidom)
+         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,     &
+            &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,         & 
+            &          0, zjulian, zdt, nhorit5, nit5 , domain_id=nidom)
 ! Vertical grid for tracer : gdept
-         CALL histvert(nit5, 'deptht', 'Vertical T levels', &
-         &    'm', ipk, gdept_0, ndepit5)
+         CALL histvert( nit5, 'deptht', 'Vertical T levels', &
+            &            'm', ipk, gdept_0, ndepit5)
 
 ! Index of ocean points in 3D and 2D (surface)
-         CALL wheneq(jpi*jpj*ipk,tmask,1,1.,ndext50,ndimt50)
-         CALL wheneq(jpi*jpj,tmask,1,1.,ndext51,ndimt51)
+         CALL wheneq( jpi*jpj*ipk,tmask,1,1.,ndext50,ndimt50 )
+         CALL wheneq( jpi*jpj,tmask,1,1.,ndext51,ndimt51 )
 
 ! Declare all the output fields as NETCDF variables
 
 ! tracer concentrations
-
-         DO jn=1,jptra
-           cltra=ctrcnm(jn)    ! short title for tracer
-           cltral=ctrcnl(jn)   ! long title for tracer
-           cltrau=ctrcun(jn)   ! UNIT for tracer
-           CALL histdef(nit5, cltra, cltral, cltrau, jpi, jpj, nhorit5,  &
-         &          ipk, 1, ipk,  ndepit5, 32, clop, zsto, zout) 
+         DO jn = 1, jptra
+           cltra  = ctrcnm(jn)   ! short title for tracer
+           cltral = ctrcnl(jn)   ! long title for tracer
+           cltrau = ctrcun(jn)   ! UNIT for tracer
+           CALL histdef( nit5, cltra, cltral, cltrau, jpi, jpj, nhorit5,  &
+         &               ipk, 1, ipk,  ndepit5, 32, clop, zsto, zout) 
          END DO           
 
-! CLOSE netcdf Files
-          
-         CALL histend(nit5)
-
+         ! end netcdf files header
+         CALL histend( nit5 )
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) 'End of NetCDF Initialization in trcdit_wr'
-         IF(ll_print) CALL FLUSH(numout )
-
-      ENDIF
-
-! 2. Start writing data
-! ---------------------
-
-! tracer concentrations
+         IF( ll_print )   CALL FLUSH(numout )
+
+      ENDIF
+
+      ! Start writing the tracer concentrations
+      ! ---------------------------------------
 
       IF( lwp .AND. MOD( kt, nwritetrc ) == 0 ) THEN
          WRITE(numout,*) 'trcdit_wr : write NetCDF passive tracer concentrations at ', kt, 'time-step'
-         WRITE(numout,*) '~~~~~~ '
-      ENDIF
-
-      DO jn=1,jptra
-         cltra=ctrcnm(jn) ! short title for tracer
-         CALL histwrite(nit5, cltra, it, trn(:,:,:,jn), ndimt50,   &
-      &          ndext50)
+         WRITE(numout,*) '~~~~~~~~~ '
+      ENDIF
+
+      DO jn = 1, jptra
+         cltra = ctrcnm(jn)      ! short title for tracer
+         CALL histwrite( nit5, cltra, it, trn(:,:,:,jn), ndimt50, ndext50 )
       END DO 
 
-! synchronise FILE
-
-      IF( MOD( kt, nwritetrc ) == 0 .OR. kindic < 0 ) THEN
-              CALL histsync(nit5)
-      ENDIF
-
-! 3. Closing all files
-! --------------------
-      IF( kt == nitend .OR. kindic < 0 ) THEN
-          CALL histclo(nit5)
-      ENDIF
-
-END SUBROUTINE trcdit_wr
-
-#    else
-
-! no passive tracers
-
-SUBROUTINE trcdit_wr(kt,kindic)
-     !!! no passive tracers
-     INTEGER, INTENT ( in ) :: kt, kindic
-     WRITE(*,*) 'trcdit_wr: You should not have seen this print! error?', kt, kindic
-END SUBROUTINE trcdit_wr
-
-#    endif
-
-#    if defined key_passivetrc && defined key_trc_diatrd
-
-      SUBROUTINE trcdid_wr(kt,kindic)
- !!===========================================================================================
-   !!
-   !!                       ROUTINE trcdid_wr
-   !!===========================================================================================
-   !!
-   !! Purpose :
-   !!---------
-   !!          output of opa: passive tracer dynamical trends
-   !!
-   !!
-   !! Method :
-   !! -------
-   !!
-   !!        At the beginning of the first time step (nit000), define all
-   !!        the NETCDF files and fields for dynamical trends of tracers
-   !!
-   !!        At each time step call histdef to compute the mean if necessary
-   !!        Each nwritetrd time step, output the instantaneous or mean fields
-   !!
-   !!        IF kindic <0, output of fields before the model interruption.
-   !!        IF kindic =0, time step loop
-   !!        IF kindic >0, output of fields before the time step loop
-   !!
-   !! Input :
-   !! -----
-   !!   argument
-   !!           kt              : time step
-   !!           kindic          : indicator of abnormal termination
-   !!
-   !! Output :
-   !! ------
-   !!   file
-   !!           "clhstnam" files : one for concentration
-   !!
-   !! History:
-   !! --------
-   !!   original  : 95-01  passive tracers  (M. Levy)
-   !!   additions : 98-01 (C. Levy) NETCDF format using ioipsl interface
-   !!   additions : 99-01 (M.A. Foujols) adapted for passive tracer
-   !!   additions : 99-09 (M.A. Foujols) split into three parts
-   !!   additions : 01-06 (Mehdi B, Elodie K): suppress initialization
-   !!                                          of nit6,nhorit6,ndepit6
-   !!   05-03 (O. Aumont and A. El Moussaoui) F90
-   !!==================================================================================================!
-
-      !! Modules used
-      USE ioipsl
-
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt,kindic         ! ocean time-step
-
-      INTEGER :: jn, jl
-      LOGICAL :: ll_print = .FALSE.
-
-      CHARACTER (len=40) :: clhstnam, clop
-      CHARACTER (len=20) :: cltra, cltrau
-      CHARACTER (len=80) :: cltral
-      CHARACTER (len=10) :: csuff
-
-      REAL(wp) :: zsto, zout, zdt
-      INTEGER :: iimi, iima, ijmi, ijma, ipk, it
-
-!
-! 0. Initialisation
-! -----------------
-
-! local variable for debugging
+      ! synchronise file
+      IF( MOD( kt, nwritetrc ) == 0 .OR. kindic < 0 )   CALL histsync( nit5 )
+
+
+      ! close the file 
+      ! --------------
+      IF( kt == nitend .OR. kindic < 0 )   CALL histclo( nit5 )
+      !
+   END SUBROUTINE trcdit_wr
+
+
+# if defined key_trc_diatrd
+
+   SUBROUTINE trcdid_wr( kt, kindic )
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trcdid_wr  ***
+      !!
+      !! ** Purpose :   output of passive tracer : advection-diffusion trends
+      !!
+      !! ** Method  :   At the beginning of the first time step (nit000), define all
+      !!             the NETCDF files and fields for concentration of passive tracer
+      !!
+      !!        At each time step call histdef to compute the mean if necessary
+      !!        Each nwritetrc time step, output the instantaneous or mean fields
+      !!
+      !!        IF kindic <0, output of fields before the model interruption.
+      !!        IF kindic =0, time step loop
+      !!        IF kindic >0, output of fields before the time step loop
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT( in ) ::   kt          ! ocean time-step
+      INTEGER, INTENT( in ) ::   kindic      ! indicator of abnormal termination
+      !!
+      LOGICAL ::   ll_print = .FALSE.
+      CHARACTER (len=40) ::   clhstnam, clop
+      CHARACTER (len=20) ::   cltra, cltrau
+      CHARACTER (len=80) ::   cltral
+      CHARACTER (len=10) ::   csuff
+      INTEGER  ::   jn, jl
+      INTEGER  ::   iimi, iima, ijmi, ijma, ipk, it
+      REAL(wp) ::   zsto, zout, zdt
+      !!----------------------------------------------------------------------
+
+      ! 0. Initialisation
+      ! -----------------
+
+      ! local variable for debugging
       ll_print = .FALSE.
       ll_print = ll_print .AND. lwp
-!
-! Define frequency of output and means
-!
+      !
+      ! Define frequency of output and means
       zdt = rdt
-#        if defined key_diainstant
-      zsto=nwritetrd*rdt
-      clop='inst(only(x))'
-#        else
-      zsto=zdt
-      clop='ave(only(x))'
-#        endif
-      zout=nwritetrd*zdt
+#  if defined key_diainstant
+      zsto = nwritetrd * rdt
+      clop = 'inst(only(x))'
+#  else
+      zsto = zdt
+      clop = 'ave(only(x))'
+#  endif
+      zout = nwritetrd * zdt
 
       ! Define indices of the horizontal output zoom and vertical limit storage
@@ -340,109 +255,104 @@
       it = kt - nittrc000 + 1
 
-! Define the NETCDF files (one per tracer)
-!
-      IF(ll_print)WRITE(numout,*)'trcdid kt=',kt,' kindic ',kindic
-      IF(kt == nittrc000) THEN
-
-          DO jn=1,jptra
-
-            IF (luttrd(jn)) THEN
-
-! Define the file for dynamical trends - one per each tracer IF required
-
-         IF(lwp)WRITE(numout,*) ' indexes of zoom = ', iimi, iima, ijmi, ijma,  &
-                                 ' limit storage in depth = ', ipk
-                csuff='DY_'//ctrcnm(jn)
-                CALL dia_nam(clhstnam,nwritetrd,csuff)
-                IF(lwp)WRITE(numout,*)     &
-                &      " Name of NETCDF file for dynamical trends",   &
-                &      " of tracer number : ",clhstnam
-
-                CALL histbeg(clhstnam, jpi, glamt, jpj, gphit,   &
-                &    iimi, iima-iimi+1, ijmi, ijma-ijmi+1,       &
-                &    0, zjulian, rdt, nhorit6(jn),               &
-                &    nit6(jn) , domain_id=nidom)
-
-! Vertical grid for tracer trend - one per each tracer IF needed
-                CALL histvert(nit6(jn), 'deptht', 'Vertical T levels',  &
-                &    'm', ipk, gdept_0, ndepit6(jn)) 
-
-
-            END IF
+      ! Define the NETCDF files (one per tracer)
+      IF( ll_print ) WRITE(numout,*) 'trcdid kt=', kt, ' kindic ', kindic
+      
+      
+      IF( kt == nittrc000 ) THEN
+
+         DO jn = 1, jptra
+            !
+            IF( luttrd(jn) ) THEN      ! Define the file for dynamical trends - one per each tracer IF required
+
+               IF(lwp)WRITE(numout,*) ' indexes of zoom = ', iimi, iima, ijmi, ijma,  &
+                   &                   ' limit storage in depth = ', ipk
+               csuff='DY_'//ctrcnm(jn)
+               CALL dia_nam( clhstnam, nwritetrd, csuff )
+               IF(lwp)WRITE(numout,*)   " Name of NETCDF file for dynamical trends",   &
+                  &                     " of tracer number : ",clhstnam
+
+               CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,       &
+                  &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,   &
+                  &          0, zjulian, rdt, nhorit6(jn),           &
+                  &          nit6(jn) , domain_id=nidom )
+
+               ! Vertical grid for tracer trend - one per each tracer IF needed
+               CALL histvert( nit6(jn), 'deptht', 'Vertical T levels',   &
+                  &           'm', ipk, gdept_0, ndepit6(jn) ) 
+             END IF
           END DO
 
-! Declare all the output fields as NETCDF variables
-
-
-! trends for tracer concentrations
-          DO jn=1,jptra
-            IF (luttrd(jn)) THEN
-                DO jl=1,jpdiatrc
-                  IF (jl.eq.1) THEN
-! short and long title for x advection for tracer
+          ! Declare all the output fields as NETCDF variables
+
+          ! trends for tracer concentrations
+          DO jn = 1, jptra
+            IF( luttrd(jn) ) THEN
+                DO jl = 1, jpdiatrc
+                  IF( jl == 1 ) THEN
+                      ! short and long title for x advection for tracer
                       WRITE (cltra,'("XAD_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("X advective trend for ",58a)')  &
-                      &      ctrcnl(jn)(1:58)
-                  END IF
-                  IF (jl.eq.2)  THEN
-! short and long title for y advection for tracer
+                         &      ctrcnl(jn)(1:58)
+                  END IF
+                  IF( jl == 2 ) THEN
+                      ! short and long title for y advection for tracer
                       WRITE (cltra,'("YAD_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("Y advective trend for ",58a)')  &
-                      &      ctrcnl(jn)(1:58)
-                  END IF
-                  IF (jl.eq.3)  THEN
-! short and long title for Z advection for tracer
+                         &      ctrcnl(jn)(1:58)
+                  END IF
+                  IF( jl == 3 ) THEN
+                      ! short and long title for Z advection for tracer
                       WRITE (cltra,'("ZAD_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("Z advective trend for ",58a)')  &
-                      &      ctrcnl(jn)(1:58)
-                  END IF
-                  IF (jl.eq.4)  THEN
-! short and long title for X diffusion for tracer
+                         &      ctrcnl(jn)(1:58)
+                  END IF
+                  IF( jl == 4 ) THEN
+                      ! short and long title for X diffusion for tracer
                       WRITE (cltra,'("XDF_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("X diffusion trend for ",58a)')  &
-                      &      ctrcnl(jn)(1:58)
-                  END IF
-                  IF (jl.eq.5)  THEN
-! short and long title for Y diffusion for tracer
+                         &      ctrcnl(jn)(1:58)
+                  END IF
+                  IF( jl == 5 ) THEN
+                      ! short and long title for Y diffusion for tracer
                       WRITE (cltra,'("YDF_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("Y diffusion trend for ",58a)')  &
-                      &      ctrcnl(jn)(1:58)
-                  END IF
-                  IF (jl.eq.6)  THEN
-! short and long title for Z diffusion for tracer
+                         &      ctrcnl(jn)(1:58)
+                  END IF
+                  IF( jl == 6 ) THEN
+                      ! short and long title for Z diffusion for tracer
                       WRITE (cltra,'("ZDF_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("Z diffusion trend for ",58a)')  &
-                      &      ctrcnl(jn)(1:58)
+                         &      ctrcnl(jn)(1:58)
                   END IF
 # if defined key_trc_ldfeiv
-                  IF (jl.eq.7) THEN
-! short and long title for x gent velocity for tracer
+                  IF( jl == 7 ) THEN
+                      ! short and long title for x gent velocity for tracer
                       WRITE (cltra,'("XGV_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("X gent velocity trend for ",53a)')  &
-                      &      ctrcnl(jn)(1:53)
-                  END IF
-                  IF (jl.eq.8)  THEN
-! short and long title for y gent velocity for tracer
+                         &      ctrcnl(jn)(1:53)
+                  END IF
+                  IF( jl == 8 ) THEN
+                      ! short and long title for y gent velocity for tracer
                       WRITE (cltra,'("YGV_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("Y gent velocity trend for ",53a)')  &
-                      &      ctrcnl(jn)(1:53)
-                  END IF
-                  IF (jl.eq.9)  THEN
-! short and long title for Z gent velocity for tracer
+                         &      ctrcnl(jn)(1:53)
+                  END IF
+                  IF( jl == 9 ) THEN
+                      ! short and long title for Z gent velocity for tracer
                       WRITE (cltra,'("ZGV_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("Z gent velocity trend for ",53a)')  &
-                      &      ctrcnl(jn)(1:53)
+                         &      ctrcnl(jn)(1:53)
                   END IF
 # endif
 # if defined key_trcdmp
-                  IF (jl.eq.jpdiatrc-1)  THEN
-! last trends for tracer damping : short and long title
+                  IF( jl == jpdiatrc - 1 ) THEN
+                      ! last trends for tracer damping : short and long title
                       WRITE (cltra,'("TDM_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("Tracer damping trend for ",55a)')  &
-                      &      ctrcnl(jn)(1:55)
-                  END IF
-# endif
-                  IF (jl.eq.jpdiatrc)  THEN
-! last trends for tracer damping : short and long title
+                         &      ctrcnl(jn)(1:55)
+                  END IF
+# endif
+                  IF( jl == jpdiatrc ) THEN
+                      ! last trends for tracer damping : short and long title
                       WRITE (cltra,'("SBC_",16a)') ctrcnm(jn)
                       WRITE (cltral,'("Surface boundary flux ",58a)')  &
@@ -450,17 +360,16 @@
                   END IF
 
-                  call flush(numout)
-                  cltrau=ctrcun(jn) ! UNIT for tracer /trends
-                  CALL histdef(nit6(jn), cltra, cltral, cltrau, jpi,jpj,  &
-                  &   nhorit6(jn), ipk, 1, ipk,  ndepit6(jn), 32, clop ,  &
-                  &   zsto,zout)
-                END DO
+                  CALL FLUSH( numout )
+                  cltrau = ctrcun(jn)      ! UNIT for tracer /trends
+                  CALL histdef( nit6(jn), cltra, cltral, cltrau, jpi,jpj,  &
+                     &          nhorit6(jn), ipk, 1, ipk,  ndepit6(jn), 32, clop ,  &
+                     &          zsto,zout )
+               END DO
             END IF
-          END DO
-
-! CLOSE netcdf Files
-
-          DO jn=1,jptra
-             IF (luttrd(jn)) CALL histend(nit6(jn))
+         END DO
+
+         ! CLOSE netcdf Files
+          DO jn = 1, jptra
+             IF( luttrd(jn) )   CALL histend( nit6(jn) )
           END DO
 
@@ -468,13 +377,13 @@
          IF(lwp) WRITE(numout,*) 'End of NetCDF Initialization in trcdid'
          IF(ll_print) CALL FLUSH(numout )
-
-      ENDIF
-
-! SOME diagnostics to DO first time
-
-! 2. Start writing data
-! ---------------------
-
-! trends for tracer concentrations
+         !
+      ENDIF
+
+      ! SOME diagnostics to DO first time
+
+      ! Start writing data
+      ! ---------------------
+
+      ! trends for tracer concentrations
 
       IF( lwp .AND. MOD( kt, nwritetrd ) == 0 ) THEN
@@ -483,171 +392,95 @@
       ENDIF
 
-          DO jn=1,jptra
-            IF (luttrd(jn)) THEN
-                DO jl=1,jpdiatrc
-                  IF (jl.eq.1) THEN
-! short title for x advection for tracer
-                      WRITE (cltra,'("XAD_",16a)') ctrcnm(jn)
-                  END IF
-                  IF (jl.eq.2)  THEN
-! short title for y advection for tracer
-                      WRITE (cltra,'("YAD_",16a)') ctrcnm(jn)
-                  END IF
-                  IF (jl.eq.3)  THEN
-! short title for z advection for tracer
-                      WRITE (cltra,'("ZAD_",16a)') ctrcnm(jn)
-                  END IF
-                  IF (jl.eq.4)  THEN
-! short title for x diffusion for tracer
-                      WRITE (cltra,'("XDF_",16a)') ctrcnm(jn)
-                  END IF
-                  IF (jl.eq.5)  THEN
-! short title for y diffusion for tracer
-                      WRITE (cltra,'("YDF_",16a)') ctrcnm(jn)
-                  END IF
-                  IF (jl.eq.6)  THEN
-! short title for z diffusion for tracer
-                      WRITE (cltra,'("ZDF_",16a)') ctrcnm(jn)
-                  END IF
+      DO jn = 1, jptra
+         IF( luttrd(jn) ) THEN
+            DO jl = 1, jpdiatrc
+               ! short titles 
+               IF( jl == 1)   WRITE (cltra,'("XAD_",16a)') ctrcnm(jn)      ! x advection for tracer
+               IF( jl == 2)   WRITE (cltra,'("YAD_",16a)') ctrcnm(jn)      ! z advection for tracer
+               IF( jl == 3)   WRITE (cltra,'("ZAD_",16a)') ctrcnm(jn)      ! z advection for tracer
+               IF( jl == 4)   WRITE (cltra,'("XDF_",16a)') ctrcnm(jn)      ! x diffusion for tracer
+               IF( jl == 5)   WRITE (cltra,'("YDF_",16a)') ctrcnm(jn)      ! y diffusion for tracer
+               IF( jl == 6)   WRITE (cltra,'("ZDF_",16a)') ctrcnm(jn)      ! z diffusion for tracer
 # if defined key_trcldf_eiv
-                  IF (jl.eq.7) THEN
-! short for x gent velocity for tracer
-                      WRITE (cltra,'("XGV_",16a)') ctrcnm(jn)
-                  END IF
-                  IF (jl.eq.8)  THEN
-! short for y gent velocity for tracer
-                      WRITE (cltra,'("YGV_",16a)') ctrcnm(jn)
-                  END IF
-                  IF (jl.eq.9)  THEN
-! short title for Z gent velocity for tracer
-                      WRITE (cltra,'("ZGV_",16a)') ctrcnm(jn)
-                  END IF
+               IF( jl == 7)   WRITE (cltra,'("XGV_",16a)') ctrcnm(jn)      ! x gent velocity for tracer
+               IF( jl == 8)   WRITE (cltra,'("YGV_",16a)') ctrcnm(jn)      ! y gent velocity for tracer
+               IF( jl == 9)   WRITE (cltra,'("ZGV_",16a)') ctrcnm(jn)      ! z gent velocity for tracer
 # endif
 # if defined key_trcdmp
-                  IF (jl.eq.jpdiatrc-1) THEN
-! short for x gent velocity for tracer
-                      WRITE (cltra,'("TDM_",16a)') ctrcnm(jn)
-                  END IF
-# endif
-                  IF (jl.eq.jpdiatrc) THEN
-! short for surface boundary conditions for tracer
-                      WRITE (cltra,'("SBC_",a)') ctrcnm(jn)
-                  END IF
-
-                  CALL histwrite(nit6(jn), cltra, it, trtrd(:,:,:,ikeep(jn),jl)  &
-                  &    ,ndimt50, ndext50)
-                END DO
-            END IF
-          END DO
-
-! synchronise FILE
-
+               IF( jl == jpdiatrc - 1 )   WRITE (cltra,'("TDM_",16a)') ctrcnm(jn)      ! damping
+# endif
+               IF( jl == jpdiatrc )   WRITE (cltra,'("SBC_",a)') ctrcnm(jn)      ! surface boundary conditions
+               !
+               CALL histwrite(nit6(jn), cltra, it, trtrd(:,:,:,ikeep(jn),jl)   &
+                  &          ,ndimt50, ndext50)
+            END DO
+         END IF
+      END DO
+
+      ! synchronise FILE
       IF( MOD( kt, nwritetrd ) == 0 .OR. kindic < 0 ) THEN
-          DO jn=1,jptra
-             IF (luttrd(jn)) CALL histsync(nit6(jn))
-          END DO
-      ENDIF
-
-! 3. Closing all files
-! --------------------
-
+         DO jn = 1, jptra
+            IF (luttrd(jn))   CALL histsync( nit6(jn) )
+         END DO
+      ENDIF
+
+      ! Closing all files
+      ! -----------------
       IF( kt == nitend .OR. kindic < 0 ) THEN
-          DO jn=1,jptra
-             IF (luttrd(jn)) CALL histclo(nit6(jn))
-          END DO
-      ENDIF
-
-END SUBROUTINE trcdid_wr
-
-#    else
-
-SUBROUTINE trcdid_wr(kt,kindic)
-     !!! no passive tracers
-     INTEGER, INTENT ( in ) :: kt, kindic
-     WRITE(*,*) 'trcdid_wr: You should not have seen this print! error?', kt, kindic
-END SUBROUTINE trcdid_wr
-
-#    endif
+         DO jn = 1, jptra
+            IF( luttrd(jn) )   CALL histclo( nit6(jn) )
+         END DO
+      ENDIF
+      !
+   END SUBROUTINE trcdid_wr
+
+# endif
 
 #    if defined key_passivetrc && defined key_trc_diaadd
 
-      SUBROUTINE trcdii_wr(kt,kindic)
-   !!===========================================================================================
-   !!
-   !!                       ROUTINE trcdii_wr
-   !!===========================================================================================
-   !!
-   !! Purpose :
-   !!---------
-   !!          output of passive tracer : additional 2D and 3D arrays
-   !!
-   !!
-   !! Method :
-   !! -------
-   !!
-   !!        At the beginning of the first time step (nit000), define all
-   !!        the NETCDF files and fields for additional arrays
-   !!
-   !!        At each time step call histdef to compute the mean if necessary
-   !!        Each nwritetrc time step, output the instantaneous or mean fields
-   !!
-   !!
-   !!        IF kindic <0, output of fields before the model interruption.
-   !!        IF kindic =0, time step loop
-   !!        IF kindic >0, output of fields before the time step loop
-   !!
-   !! Input :
-   !! -----
-   !!   argument
-   !!           kt              : time step
-   !!           kindic          : indicator of abnormal termination
-   !!
-   !! EXTERNAL :
-   !! --------
-   !! prihre, hist..., dianam
-   !!
-   !! History:
-   !! --------
-   !!   original  : 95-01  passive tracers  (M. Levy)
-   !!   additions : 98-01 (C. Levy) NETCDF format using ioipsl interface
-   !!   additions : 99-01 (M.A. Foujols) adapted for passive tracer
-   !!   additions : 99-09 (M.A. Foujols) split into three parts
-   !!   05-03 (O. Aumont and A. El Moussaoui) F90
-   !!==================================================================================================!
-
-      !! Modules used
-      USE ioipsl
-
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt,kindic         ! ocean time-step
-
-      INTEGER :: jn
-      LOGICAL :: ll_print = .FALSE.
-
-      CHARACTER (len=40) :: clhstnam, clop
-      CHARACTER (len=20) :: cltra, cltrau
-      CHARACTER (len=80) :: cltral
-
-      REAL(wp) :: zsto, zout, zdt
-      INTEGER :: iimi, iima, ijmi, ijma, ipk, it
-
-!
-! 0. Initialisation
-! -----------------
-
-! local variable for debugging
+   SUBROUTINE trcdii_wr( kt, kindic )
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trcdii_wr  ***
+      !!
+      !! ** Purpose :   output of passive tracer : additional 2D and 3D arrays
+      !!
+      !! ** Method  :   At the beginning of the first time step (nit000), define all
+      !!             the NETCDF files and fields for concentration of passive tracer
+      !!
+      !!        At each time step call histdef to compute the mean if necessary
+      !!        Each nwritetrc time step, output the instantaneous or mean fields
+      !!
+      !!        IF kindic <0, output of fields before the model interruption.
+      !!        IF kindic =0, time step loop
+      !!        IF kindic >0, output of fields before the time step loop
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT( in ) ::   kt          ! ocean time-step
+      INTEGER, INTENT( in ) ::   kindic      ! indicator of abnormal termination
+      !!
+      LOGICAL ::   ll_print = .FALSE.
+      CHARACTER (len=40) ::   clhstnam, clop
+      CHARACTER (len=20) ::   cltra, cltrau
+      CHARACTER (len=80) ::   cltral
+      INTEGER  ::   jn
+      INTEGER  ::   iimi, iima, ijmi, ijma, ipk, it
+      REAL(wp) ::   zsto, zout, zdt
+      !!----------------------------------------------------------------------
+
+      ! Initialisation
+      ! --------------
+
+      ! local variable for debugging
       ll_print = .FALSE.
       ll_print = ll_print .AND. lwp
-!
-! Define frequency of output and means
-!
+      !
+      ! Define frequency of output and means
       zdt = rdt
-#        if defined key_diainstant
+#  if defined key_diainstant
       zsto=nwriteadd*zdt
       clop='inst(only(x))'
-#        else
+#  else
       zsto=zdt
       clop='ave(only(x))'
-#        endif
+#  endif
       zout=nwriteadd*zdt
 
@@ -660,66 +493,62 @@
       it = kt - nittrc000 + 1
 
-! 1. Define NETCDF files and fields at beginning of first time step
-! -----------------------------------------------------------------
-
-      IF(ll_print)WRITE(numout,*)'trcdii_wr kt=',kt,' kindic ',kindic
-      IF(kt == nittrc000) THEN
-
-! Define the NETCDF files for additional arrays : 2D or 3D
-
-! Define the T grid file for tracer auxiliary files
-
-          CALL dia_nam(clhstnam,nwrite,'diad_T')
-          IF(lwp)WRITE(numout,*)" Name of NETCDF file ", clhstnam
-
-! Define a netcdf FILE for 2d and 3d arrays
-
-          CALL histbeg(clhstnam, jpi, glamt, jpj, gphit,     &
-          &    iimi, iima-iimi+1, ijmi, ijma-ijmi+1,         &
-          &    0, zjulian, zdt, nhoritd, nitd , domain_id=nidom)
-
-! Vertical grid for 2d and 3d arrays
-
-          CALL histvert(nitd, 'deptht', 'Vertical T levels', &
-          &    'm', ipk, gdept_0, ndepitd)
-
-
-! Declare all the output fields as NETCDF variables
-
-! more 3D horizontal arrays
-
-          DO jn=1,jpdia3d
-            cltra=ctrc3d(jn)    ! short title for 3D diagnostic
-            cltral=ctrc3l(jn)   ! long title for 3D diagnostic
-            cltrau=ctrc3u(jn)   ! UNIT for 3D diagnostic
-            CALL histdef(nitd, cltra, cltral, cltrau, jpi, jpj, nhoritd,  &
-            &    ipk, 1, ipk,  ndepitd, 32, clop, zsto, zout)
-          END DO
-
-
-! more 2D horizontal arrays
-
-          DO jn=1,jpdia2d
+      ! 1. Define NETCDF files and fields at beginning of first time step
+      ! -----------------------------------------------------------------
+
+      IF( ll_print ) WRITE(numout,*) 'trcdii_wr kt=', kt, ' kindic ', kindic
+
+      IF( kt == nittrc000 ) THEN
+
+         ! Define the NETCDF files for additional arrays : 2D or 3D
+
+         ! Define the T grid file for tracer auxiliary files
+
+         CALL dia_nam( clhstnam, nwrite, 'diad_T' )
+         IF(lwp) WRITE(numout,*) " Name of NETCDF file ", clhstnam
+
+         ! Define a netcdf FILE for 2d and 3d arrays
+
+         CALL histbeg( clhstnam, jpi, glamt, jpj, gphit,             &
+            &          iimi, iima-iimi+1, ijmi, ijma-ijmi+1,         &
+            &          0, zjulian, zdt, nhoritd, nitd , domain_id=nidom )
+
+         ! Vertical grid for 2d and 3d arrays
+
+         CALL histvert( nitd, 'deptht', 'Vertical T levels',   &
+            &           'm', ipk, gdept_0, ndepitd)
+
+         ! Declare all the output fields as NETCDF variables
+
+         ! more 3D horizontal arrays
+         DO jn = 1, jpdia3d
+            cltra  = ctrc3d(jn)   ! short title for 3D diagnostic
+            cltral = ctrc3l(jn)   ! long title for 3D diagnostic
+            cltrau = ctrc3u(jn)   ! UNIT for 3D diagnostic
+            CALL histdef( nitd, cltra, cltral, cltrau, jpi, jpj, nhoritd,   &
+               &          ipk, 1, ipk,  ndepitd, 32, clop, zsto, zout )
+         END DO
+
+         ! more 2D horizontal arrays
+         DO jn = 1, jpdia2d
             cltra=ctrc2d(jn)    ! short title for 2D diagnostic
             cltral=ctrc2l(jn)   ! long title for 2D diagnostic
             cltrau=ctrc2u(jn)   ! UNIT for 2D diagnostic
-            CALL histdef(nitd, cltra, cltral, cltrau, jpi, jpj, nhoritd,  &
-            &    1, 1, 1,  -99, 32, clop, zsto, zout)
-          END DO
-
-! TODO: more 2D vertical sections arrays : I or J indice fixed
-
-! CLOSE netcdf Files
-
-          CALL histend(nitd)
+            CALL histdef( nitd, cltra, cltral, cltrau, jpi, jpj, nhoritd,  &
+               &          1, 1, 1,  -99, 32, clop, zsto, zout )
+         END DO
+
+         ! TODO: more 2D vertical sections arrays : I or J indice fixed
+
+         ! CLOSE netcdf Files
+         CALL histend( nitd )
 
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) 'End of NetCDF Initialization in trcdii_wr'
-         IF(ll_print) CALL FLUSH(numout )
-
-      ENDIF
-
-! 2. Start writing data
-! ---------------------
+         IF( ll_print )   CALL FLUSH(numout )
+         !
+      ENDIF
+
+      ! 2. Start writing data
+      ! ---------------------
 
       IF( lwp .AND. MOD( kt, nwriteadd ) == 0 ) THEN
@@ -728,120 +557,69 @@
       ENDIF
 
-! more 3D horizontal arrays
-
-          DO jn=1,jpdia3d
-            cltra=ctrc3d(jn) ! short title for 3D diagnostic
-            CALL histwrite(nitd, cltra, it, trc3d(:,:,:,jn), ndimt50  &
-            &   ,ndext50)
-          END DO
-
-! more 2D horizontal arrays
-
-          DO jn=1,jpdia2d
-            cltra=ctrc2d(jn) ! short title for 2D diagnostic
-            CALL histwrite(nitd, cltra, it, trc2d(:,:,jn), ndimt51    &
+      ! more 3D horizontal arrays
+      DO jn = 1, jpdia3d
+         cltra = ctrc3d(jn)   ! short title for 3D diagnostic
+         CALL histwrite( nitd, cltra, it, trc3d(:,:,:,jn), ndimt50  &
+            &           ,ndext50)
+      END DO
+
+      ! more 2D horizontal arrays
+      DO jn = 1, jpdia2d
+         cltra = ctrc2d(jn)   ! short title for 2D diagnostic
+         CALL histwrite(nitd, cltra, it, trc2d(:,:,jn), ndimt51    &
             &   ,ndext51)
-          END DO
-
-! synchronise FILE
-
-      IF( MOD( kt, nwriteadd ) == 0 .OR. kindic < 0 ) THEN
-              CALL histsync(nitd)
-      ENDIF
-
-! 3. Closing all files
-! --------------------
-
-      IF( kt == nitend .OR. kindic < 0 ) THEN
-          CALL histclo(nitd)
-      ENDIF
-
+      END DO
+
+      ! synchronise FILE
+      IF( MOD( kt, nwriteadd ) == 0 .OR. kindic < 0 )   CALL histsync( nitd )
+
+      ! Closing all files
+      ! -----------------
+      IF( kt == nitend .OR. kindic < 0 )   CALL histclo(nitd)
+      !
 END SUBROUTINE trcdii_wr
 
-#    else
-
-SUBROUTINE trcdii_wr(kt,kindic)
-     !!! no passive tracers
-     INTEGER, INTENT ( in ) :: kt, kindic
-     WRITE(*,*) 'trcdii_wr: You should not have seen this print! error?', kt, kindic
-END SUBROUTINE trcdii_wr
-
-#    endif
-
-#    if defined key_passivetrc && defined key_trc_diabio
-
-      SUBROUTINE trcdib_wr(kt,kindic)
- !!===========================================================================================
-   !!
-   !!                       ROUTINE trcdib_wr
-   !!===========================================================================================
-   !!
-   !! Purpose :
-   !!---------
-   !!          Specific output of opa: biological fields
-   !!
-   !!
-   !! Method :
-   !! -------
-   !!
-   !!        At the beginning of the first time step (nit000), define all
-   !!        the NETCDF files and fields for biological fields
-   !!
-   !!        At each time step call histdef to compute the mean if necessary
-   !!        Each nwritetrd time step, output the instantaneous or mean fields
-   !!
-   !!        IF kindic <0, output of fields before the model interruption.
-   !!        IF kindic =0, time step loop
-   !!        IF kindic >0, output of fields before the time step loop
-   !!
-   !! Input :
-   !! -----
-   !!   argument
-   !!           kt              : time step
-   !!           kindic          : indicator of abnormal termination
-   !!
-   !! Output :
-   !! ------
-   !!   file
-   !!           "histname" files : at least one file for each grid
-   !!
-   !! History:
-   !! --------
-   !!   original  : 95-01  passive tracers  (M. Levy)
-   !!   additions : 98-01 (C. Levy) NETCDF format using ioipsl interface
-   !!   additions : 99-01 (M.A. Foujols) adapted for passive tracer
-   !!   additions : 99-09 (M.A. Foujols) split into three parts
-   !!   additions : 01-06 (E Kestenare) assign a parameter to name
-   !!                                          individual tracers
-   !!   additions : 05-03 (O. Aumont and A El Moussaoui) F90
-   !!==================================================================================================!
-
-      !! Modules used
-      USE ioipsl
+# endif
+
+# if defined key_trc_diabio
+
+   SUBROUTINE trcdib_wr( kt, kindic )
+      !!----------------------------------------------------------------------
+      !!                     ***  ROUTINE trcdib_wr  ***
+      !!
+      !! ** Purpose :   output of passive tracer : biological fields
+      !!
+      !! ** Method  :   At the beginning of the first time step (nit000), define all
+      !!             the NETCDF files and fields for concentration of passive tracer
+      !!
+      !!        At each time step call histdef to compute the mean if necessary
+      !!        Each nwritetrc time step, output the instantaneous or mean fields
+      !!
+      !!        IF kindic <0, output of fields before the model interruption.
+      !!        IF kindic =0, time step loop
+      !!        IF kindic >0, output of fields before the time step loop
+      !!----------------------------------------------------------------------
       USE sms
-
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt,kindic         ! ocean time-step
-
-      INTEGER :: ji, jj, jk, jn
-      LOGICAL :: ll_print = .FALSE.
-
-      CHARACTER (len=40) :: clhstnam, clop
-      CHARACTER (len=20) :: cltra, cltrau
-      CHARACTER (len=80) :: cltral
-
-      REAL(wp) :: zsto, zout, zdt
-      INTEGER  :: iimi, iima, ijmi, ijma, ipk, it
-
-!
-! 0. Initialisation
-! -----------------
-
-! local variable for debugging
+      !!
+      INTEGER, INTENT( in ) ::   kt          ! ocean time-step
+      INTEGER, INTENT( in ) ::   kindic      ! indicator of abnormal termination
+      !!
+      LOGICAL ::   ll_print = .FALSE.
+      CHARACTER (len=40) ::   clhstnam, clop
+      CHARACTER (len=20) ::   cltra, cltrau
+      CHARACTER (len=80) ::   cltral
+      INTEGER  ::   ji, jj, jk, jn
+      INTEGER  ::   iimi, iima, ijmi, ijma, ipk, it
+      REAL(wp) ::   zsto, zout, zdt
+      !!----------------------------------------------------------------------
+
+      ! Initialisation
+      ! --------------
+
+      ! local variable for debugging
       ll_print = .FALSE.
       ll_print = ll_print .AND. lwp
-!
-! Define frequency of output and means
-!
+
+      ! Define frequency of output and means
       zdt = rdt
 #        if defined key_diainstant
@@ -862,37 +640,34 @@
       it = kt - nittrc000 + 1
 
-! 1. Define NETCDF files and fields at beginning of first time step
-! -----------------------------------------------------------------
-
-      IF(ll_print)WRITE(numout,*)'trcdib_wr kt=',kt,' kindic ',kindic
-      IF(kt == nittrc000) THEN
-
-! Define the NETCDF files for biological trends
-
-          CALL dia_nam(clhstnam,nwrite,'biolog')
-          IF(lwp)WRITE(numout,*)        &
-          &      " Name of NETCDF file for biological trends ",clhstnam
-! Horizontal grid : glamt and gphit
-          CALL histbeg(clhstnam, jpi, glamt, jpj, gphit,      &
-          &    iimi, iima-iimi+1, ijmi, ijma-ijmi+1,          &
-          &    0, zjulian, rdt, nhoritb, nitb , domain_id=nidom)
-! Vertical grid for biological trends
-          CALL histvert(nitb, 'deptht', 'Vertical T levels',  &
-          &    'm', ipk, gdept_0, ndepitb)
-
-! Declare all the output fields as NETCDF variables
-
-! biological trends
-
-          DO jn=1,jpdiabio
-            cltra=ctrbio(jn)    ! short title for biological diagnostic
-            cltral=ctrbil(jn)   ! long title for biological diagnostic
-            cltrau=ctrbiu(jn)   ! UNIT for biological diagnostic
+      ! Define NETCDF files and fields at beginning of first time step
+      ! --------------------------------------------------------------
+
+      IF(ll_print) WRITE(numout,*)'trcdib_wr kt=',kt,' kindic ',kindic
+
+      IF( kt == nittrc000 ) THEN
+
+         ! Define the NETCDF files for biological trends
+
+         CALL dia_nam(clhstnam,nwrite,'biolog')
+         IF(lwp)WRITE(numout,*) " Name of NETCDF file for biological trends ", clhstnam
+         ! Horizontal grid : glamt and gphit
+         CALL histbeg(clhstnam, jpi, glamt, jpj, gphit,      &
+            &    iimi, iima-iimi+1, ijmi, ijma-ijmi+1,          &
+            &    0, zjulian, rdt, nhoritb, nitb , domain_id=nidom)
+         ! Vertical grid for biological trends
+         CALL histvert(nitb, 'deptht', 'Vertical T levels',  &
+            &    'm', ipk, gdept_0, ndepitb)
+
+         ! Declare all the output fields as NETCDF variables
+         ! biological trends
+         DO jn = 1, jpdiabio
+            cltra  = ctrbio(jn)   ! short title for biological diagnostic
+            cltral = ctrbil(jn)   ! long title for biological diagnostic
+            cltrau = ctrbiu(jn)   ! UNIT for biological diagnostic
             CALL histdef(nitb, cltra, cltral, cltrau, jpi, jpj, nhoritb,  &
-            &    ipk, 1, ipk,  ndepitb, 32, clop, zsto, zout)
-          END DO
-
-! CLOSE netcdf Files
-
+               &         ipk, 1, ipk,  ndepitb, 32, clop, zsto, zout)
+         END DO
+
+         ! CLOSE netcdf Files
           CALL histend(nitb)
 
@@ -900,12 +675,11 @@
          IF(lwp) WRITE(numout,*) 'End of NetCDF Initialization in trcdib_wr'
          IF(ll_print) CALL FLUSH(numout )
-
-     ENDIF
-
-! 2. Start writing data
-! ---------------------
-
-! biological trends
-
+         !
+      ENDIF
+
+      ! Start writing data
+      ! ------------------
+
+      ! biological trends
       IF( lwp .AND. MOD( kt, nwritebio ) == 0 ) THEN
          WRITE(numout,*) 'trcdit_wr : write NetCDF biological trends at ', kt, 'time-step'
@@ -913,33 +687,40 @@
       ENDIF
 
-
-      DO jn=1,jpdiabio
+      DO jn = 1, jpdiabio
          cltra=ctrbio(jn)  ! short title for biological diagnostic
          CALL histwrite(nitb, cltra, it, trbio(:,:,:,jn), ndimt50,ndext50)
       END DO
 
-! synchronise FILE
-
-      IF( MOD( kt, nwritebio ) == 0 .OR. kindic < 0 ) THEN
-              CALL histsync(nitb)
-      ENDIF
-
-! 3. Closing all files
-! --------------------
-      IF( kt == nitend .OR. kindic < 0 ) THEN
-          CALL histclo(nitb)
-      ENDIF
-
-END SUBROUTINE trcdib_wr
-
-#    else
-
-SUBROUTINE trcdib_wr(kt,kindic)
-     !!! no passive tracers
-     INTEGER, INTENT ( in ) :: kt, kindic
-     WRITE(*,*) 'trcdib_wr: You should not have seen this print! error?', kt, kindic
-END SUBROUTINE trcdib_wr
-
-#    endif
-
+      ! synchronise FILE
+      IF( MOD( kt, nwritebio ) == 0 .OR. kindic < 0 )   CALL histsync( nitb )
+
+      ! Closing all files
+      ! -----------------
+      IF( kt == nitend .OR. kindic < 0 )   CALL histclo( nitb )
+      !
+   END SUBROUTINE trcdib_wr
+
+#else
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                     No passive tracer
+   !!----------------------------------------------------------------------
+   SUBROUTINE trcdit_wr( kt, kindic )                      ! Dummy routine
+      INTEGER, INTENT ( in ) ::   kt, kindic
+      WRITE(*,*) 'trcdit_wr: You should not have seen this print! error?', kt, kindic
+   END SUBROUTINE trcdit_wr
+   SUBROUTINE trcdid_wr( kt, kindic )                      ! Dummy routine
+      INTEGER, INTENT ( in ) ::   kt, kindic
+      WRITE(*,*) 'trcdid_wr: You should not have seen this print! error?', kt, kindic
+   END SUBROUTINE trcdid_wr
+   SUBROUTINE trcdii_wr( kt, kindic )                      ! Dummy routine
+      INTEGER, INTENT ( in ) :: kt, kindic
+      WRITE(*,*) 'trcdii_wr: You should not have seen this print! error?', kt, kindic
+   END SUBROUTINE trcdii_wr
+   SUBROUTINE trcdib_wr( kt, kindic )                      ! Dummy routine
+      INTEGER, INTENT ( in ) ::   kt, kindic
+      WRITE(*,*) 'trcdib_wr: You should not have seen this print! error?', kt, kindic
+   END SUBROUTINE trcdib_wr
+#endif
+
+   !!======================================================================
 END MODULE trcdit
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trcdta.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trcdta.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trcdta.F90	(revision 763)
@@ -2,46 +2,40 @@
    !!======================================================================
    !!                     ***  MODULE  trcdta  ***
-   !! Ocean data  :  reads passive tracer data 
+   !! TOP :  reads passive tracer data 
    !!=====================================================================
-   !!  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 && defined key_dtatrc
-   !!----------------------------------------------------------------------
-   !!   'key_dtatrc'                           3D tracer data field
+   !! History :   1.0  !  2002-04  (O. Aumont)  original code
+   !!              -   !  2004-03  (C. Ethe)  module
+   !!              -   !  2005-03  (O. Aumont, A. El Moussaoui) F90
+   !!----------------------------------------------------------------------
+#if  defined key_passivetrc  &&  defined key_dtatrc
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'  and  'key_dtatrc'          3D passive tracer data
    !!----------------------------------------------------------------------
    !!   dta_trc      : read ocean passive tracer data
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce_trc
    USE trc
    USE par_sms
    USE lib_print
+   USE iom
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Routine accessibility
-   PUBLIC dta_trc   ! called by trcdtr.F90 and trcdmp.F90
-
-   !! * Shared module variables
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk,jptra) ::   &  !:
-      trdta             !: tracer data at given time-step
-
-   !! * Module variables
-   REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,2) ::   &
-      tracdta            ! tracer data at two consecutive times
-   INTEGER , DIMENSION(jptra) :: &
-      nlectr  ,   &    !!: switch for reading once
-      ntrc1   ,   &    !!: number of first month when reading 12 monthly value
-      ntrc2            !!: number of second month when reading 12 monthly value
+   PUBLIC dta_trc   ! called in trcdtr.F90 and trcdmp.F90
+
+   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk,jptra) ::   trdta   !: tracer data at given time-step
+
+   REAL(wp), DIMENSION(jpi,jpj,jpk,jptra,2) ::   tracdta            ! tracer data at two consecutive times
+   INTEGER , DIMENSION(jptra) ::   nlectr      !: switch for reading once
+   INTEGER , DIMENSION(jptra) ::   ntrc1       !: number of first month when reading 12 monthly value
+   INTEGER , DIMENSION(jptra) ::   ntrc2       !: number of second month when reading 12 monthly value
 
    !! * Substitutions
 #  include "passivetrc_substitute.h90"
-
-   !!----------------------------------------------------------------------
-   !!   OPA 9.0 , LODYC-IPSL  (2003)
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -64,25 +58,12 @@
       !!      At each time step, a linear interpolation is applied between 
       !!      two monthly values.
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT( in ) ::   kt     ! ocean time-step
       !!
-      !! 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 iom
-
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt     ! ocean time-step
-
-      !! * Local declarations
-      INTEGER :: ji, jj, jn, jl 
-      INTEGER, PARAMETER ::  &
-         jpmois  = 12        ! number of months
-
-      INTEGER ::   &
-         imois, iman, i15, ik  ! temporary integers 
-      CHARACTER (len=39) :: clname(jptra)
-      REAL(wp) :: zxy, zl
+      CHARACTER (len=39) ::   clname(jptra)
+      INTEGER, PARAMETER ::   jpmois  = 12        ! number of months
+      INTEGER ::   ji, jj, jn, jl 
+      INTEGER ::   imois, iman, i15, ik  ! temporary integers 
+      REAL(wp) ::   zxy, zl
       !!----------------------------------------------------------------------
 
@@ -113,14 +94,14 @@
                IF(lwp) WRITE(numout,*) ' trc_dta : Levitus tracer data monthly fields'
                ! open file 
-#if defined key_trc_pisces
+# if defined key_trc_pisces
                clname(jn) = 'LEVITUS_'//ctrcnm(jn)
-#else
+# else
                clname(jn) = ctrcnm(jn)
-#endif
+# endif
                CALL iom_open ( clname(jn), numtr(jn) )              
 
             ENDIF
 
-#if defined key_trc_pisces
+# if defined key_trc_pisces
             ! Read montly file
             IF( ( kt == nittrc000 .AND. nlectr(jn) == 0)  .OR. imois /= ntrc1(jn) ) THEN
@@ -162,5 +143,6 @@
                            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)
+                              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
@@ -173,40 +155,35 @@
 
             IF(lwp) THEN
-               WRITE(numout,*) ctrcnm(jn), 'Levitus month ', ntrc1(jn),   &
-                  ntrc2(jn)
+               WRITE(numout,*) ctrcnm(jn), 'Levitus month ', ntrc1(jn), ntrc2(jn)
                WRITE(numout,*)
-               WRITE(numout,*) ' Levitus month = ', ntrc1(jn),   &
-                  '  level = 1'
+               WRITE(numout,*) ' Levitus month = ', ntrc1(jn), '  level = 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),    &
-                  '  level = ',jpk/2
+                  &        ,jpj, 20, 1., numout )
+               WRITE(numout,*) ' Levitus month = ', ntrc1(jn), '  level = ',jpk/2
                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)     &
-                  ,'  level = ',jpkm1
+                  &         20, 1, jpj, 20, 1., numout )
+               WRITE(numout,*) ' Levitus month = ',ntrc1(jn),'  level = ',jpkm1
                CALL prihre( tracdta(1,1,jpkm1,jn,1), jpi, jpj, 1, jpi,     &
-                  20, 1, jpj, 20, 1., numout )
+                  &         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
-            IF( jn == jppo4) trdta(:,:,:,jn) = trdta(:,:,:,jn) * 122.E-6
+            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.0e-6
+            IF( jn == jptal )   trdta(:,:,:,jn) = trdta(:,:,:,jn) *   1.0e-6
+            IF( jn == jpoxy )   trdta(:,:,:,jn) = trdta(:,:,:,jn) *  44.6e-6
+            IF( jn == jpsil )   trdta(:,:,:,jn) = trdta(:,:,:,jn) *   1.0e-6
+            IF( jn == jppo4 )   trdta(:,:,:,jn) = trdta(:,:,:,jn) * 122.0e-6
 
             ! Close the file
             ! --------------
             
-            IF( kt == nitend )   CALL iom_close ( numtr(jn) )
-
-#else
+            IF( kt == nitend )   CALL iom_close( numtr(jn) )
+
+# else
             ! Read init file only
             IF( kt == nittrc000  ) THEN
@@ -215,16 +192,15 @@
                CALL iom_close ( numtr(jn) )
             ENDIF 
-#endif
-
-        ENDIF
-
-       END DO
-
+# endif
+
+         ENDIF
+
+      END DO
+      !
    END SUBROUTINE dta_trc
 
 #else
-
-   !!----------------------------------------------------------------------
-   !!   Default case                        NO 3D passive tracer data field
+   !!----------------------------------------------------------------------
+   !!   Dummy module                              NO 3D passive tracer data
    !!----------------------------------------------------------------------
 CONTAINS
@@ -232,6 +208,6 @@
       WRITE(*,*) 'dta_trc: You should not have seen this print! error?', kt
    END SUBROUTINE dta_trc
-
 #endif
 
+   !!======================================================================
 END MODULE trcdta
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trcdtr.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trcdtr.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trcdtr.F90	(revision 763)
@@ -1,92 +1,70 @@
 MODULE trcdtr
-   !!=======================================================================================
-   !!
-   !!                       *** MODULE trcdtr ***
-   !!
-   !!  Computes or READ initial DATA for passive tracer
-   !!
-   !!=======================================================================================
-   !!  TOP 1.0,  LOCEAN-IPSL (2005)
-   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/trcdtr.F90,v 1.8 2007/10/17 14:48:56 opalod Exp $
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
-   !!----------------------------------------------------------------------
-      !!----------------------------------------------------------------------
-      !! * Modules used
-      !! ==============
-      USE oce_trc
-      USE trc
-      USE sms
-      USE trcdta
-      USE lib_mpp
-
-      IMPLICIT NONE
-      PRIVATE
-  !! * Accessibility
-      PUBLIC trc_dtr
+   !!======================================================================
+   !!                         ***  MODULE trcdtr  ***
+   !! TOP :   computes or READ initial DATA for passive tracer
+   !!======================================================================
+   !! History :    -   !  1996-11  ()  original code
+   !!                  !  2000-12  (O. Aumont, E. Kestenare) add for POC in sediments
+   !!             1.0  !  2005-12  (O. Aumont, A. El Moussaoui) F90
+   !!----------------------------------------------------------------------
+#if defined key_passivetrc
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !!   trc_dtr    :  computes or READ initial DATA for passive tracer
+   !!----------------------------------------------------------------------
+   USE oce_trc
+   USE trc
+   USE sms
+   USE trcdta
+   USE lib_mpp
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC trc_dtr      ! called in ???
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
 
-#if defined key_passivetrc
-
-SUBROUTINE trc_dtr
-!!---------------------------------------------------------------------
-!!
-!!                       ROUTINE trci_dtr
-!!                     ******************
-!!  PURPOSE :
-!!  ---------
-!!     computes or READ initial DATA for passive tracer
-!!   -----
-!!      COMMON
-!!            /comdom/          : domain PARAMETER
-!!            /comcoo/          : orthogonal curvilinear coordinates
-!!                                and scale factors
-!!            /comask/          : masks, bathymetry
-!!   OUTPUT :
-!!   ------
-!!      COMMON
-!!            /cottrc/          : passive tracer field now and before
-!!
-!!
-!!   History:
-!!   --------
-!!      original  : 96-11
-!!      additions : 99-9
-!!                : 00-12 (O. Aumont, E. Kestenare) add for POC in sediments 
-!!                         add for POC in sediments  
-!!    03/05  O. Aumont and A. El Moussaoui  F90 
-!!----------------------------------------------------------------------
-!!----------------------------------------------------------------------
-!! local declarations
-!! ================== 
+   SUBROUTINE trc_dtr
+      !!---------------------------------------------------------------------
+      !!                     ***  ROUTINE trc_dtr  ***
+      !!
+      !! ** Purpose :   computes or READ initial DATA for passive tracer
+      !!
+      !! ** Method  : 
+      !!---------------------------------------------------------------------
       INTEGER :: ji,jj,jk,jn 
 #if defined key_trc_pisces
-      REAL(wp) :: alka0,oxyg0,calc0,bioma0,    &
-                  silic1,po4,no3,caralk,bicarb,co3
-#endif
-!!---------------------------------------------------------------------
-!!  OPA.9 
-!!---------------------------------------------------------------------
-!! 0. initialisations
-!! ------------------
-
-      IF(lwp) WRITE(numout,*) ' '
-      IF(lwp) WRITE(numout,*) ' *** trcdtr initialisation for '
-      IF(lwp) WRITE(numout,*) '     passive tracers'
-      IF(lwp) WRITE(numout,*) ' '
-
+      REAL(wp) ::   alka0, oxyg0, calc0, bioma0
+      REAL(wp) ::   silic1, po4, no3, caralk, bicarb, co3
+#endif
+      !!---------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'trc_dtr : initialisation of the passive tracers'
+      IF(lwp) WRITE(numout,*) '~~~~~~~'
 
 #if defined key_cfc
-      trn(:,:,:,:)=0.0
+      ! CFC initialisation
+      trn(:,:,:,:) = 0.e0
+      
 #elif defined key_trc_pisces
-
-      sco2   = 2.3e-3
-      alka0  = 2.39e-3
-      oxyg0  = 1.8e-4
-      po4    = 2.165e-6/po4r
-      bioma0 = 1.e-8
-      silic1 = 91.51e-6
-      calc0  = 1.e-6
-      no3    = 30.88E-6*7.6
+      ! PISCES initialisation
+      ! ---------------------
+      sco2   =  2.300e-3
+      alka0  =  2.390e-3
+      oxyg0  =  1.800e-4
+      po4    =  2.165e-6 / po4r
+      bioma0 =  1.000e-8
+      silic1 = 91.510e-6
+      calc0  =  1.000e-6
+      no3    = 30.880e-6 * 7.6
 
       trn(:,:,:,jpdic) = sco2
@@ -99,11 +77,11 @@
 #if ! defined key_trc_kriest
       trn(:,:,:,jpgoc) = bioma0
-      trn(:,:,:,jpbfe) = bioma0*5E-6
+      trn(:,:,:,jpbfe) = bioma0 * 5.e-6
 #else
-      trn(:,:,:,jpnum) = bioma0/(6.*xkr_massp)
+      trn(:,:,:,jpnum) = bioma0 / ( 6. *xkr_massp )
 #endif
       trn(:,:,:,jpsil) = silic1
-      trn(:,:,:,jpbsi) = bioma0*0.15
-      trn(:,:,:,jpdsi) = bioma0*5.E-6
+      trn(:,:,:,jpbsi) = bioma0 * 0.15
+      trn(:,:,:,jpdsi) = bioma0 * 5.e-6
       trn(:,:,:,jpphy) = bioma0
       trn(:,:,:,jpdia) = bioma0
@@ -111,35 +89,30 @@
       trn(:,:,:,jpmes) = bioma0
       trn(:,:,:,jpfer) = 0.6E-9
-      trn(:,:,:,jpsfe) = bioma0*5.E-6
-      trn(:,:,:,jpdfe) = bioma0*5.E-6
-      trn(:,:,:,jpnfe) = bioma0*5.E-6
-      trn(:,:,:,jpnch) = bioma0*12./55.
-      trn(:,:,:,jpdch) = bioma0*12./55.
+      trn(:,:,:,jpsfe) = bioma0 * 5.e-6
+      trn(:,:,:,jpdfe) = bioma0 * 5.e-6
+      trn(:,:,:,jpnfe) = bioma0 * 5.e-6
+      trn(:,:,:,jpnch) = bioma0 * 12. / 55.
+      trn(:,:,:,jpdch) = bioma0 * 12. / 55.
       trn(:,:,:,jpno3) = no3
       trn(:,:,:,jpnh4) = bioma0
 
-
-!!  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 = (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)             &  
-                *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9
-          ENDDO
-        ENDDO
-      ENDDO
-
-
-!!  initialize the half saturation constant for silicate
-!!  ----------------------------------------------------
-
-      xksi(:,:)=2.E-6
+      ! 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    = ( caralk - trn(ji,jj,jk,jpdic) ) *        tmask(ji,jj,jk)   &
+                  &   +                  0.5e-3          * ( 1. - tmask(ji,jj,jk) )
+               bicarb = (2.*trn(ji,jj,jk,jpdic)-caralk)
+               hi(ji,jj,jk) = ( ak23(ji,jj,jk) * bicarb / co3 ) *        tmask(ji,jj,jk)   &  
+                  &         +            1.e-9                  * ( 1. - tmask(ji,jj,jk) )
+          END DO
+        END DO
+      END DO
+
+      ! initialize the half saturation constant for silicate
+      ! ----------------------------------------------------
+      xksi(:,:) = 2.e-6
 
       IF(lwp) WRITE(numout,*) 'Initialization of PISCES tracers done'
@@ -147,91 +120,95 @@
 
 #elif defined key_trc_lobster1 && ( defined key_eel_r6 || defined key_eel_r2 )
-! analytical initialisation used in Levy et al. (2001)
+      ! LOBSTER initialisation for EEL
+      ! ----------------------
+      ! here: 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 = 1, 7
+         trn(:,:,jk,jpdet) = 0.016 * tmask(:,:,jk)
+         trn(:,:,jk,jpzoo) = 0.018 * tmask(:,:,jk)
+         trn(:,:,jk,jpphy) = 0.036 * tmask(:,:,jk)
+         trn(:,:,jk,jpno3) = 1.e-5 * tmask(:,:,jk)
+         trn(:,:,jk,jpnh4) = 5.e-4 * tmask(:,:,jk)
+         trn(:,:,jk,jpdom) = 0.017 * tmask(:,:,jk)
+      END DO
+
+      trn(:,:, 8,jpdet) = 0.020   * tmask(:,:, 8)
+      trn(:,:, 8,jpzoo) = 0.027   * tmask(:,:, 8)
+      trn(:,:, 8,jpphy) = 0.041   * tmask(:,:, 8)
+      trn(:,:, 8,jpno3) = 0.00022 * tmask(:,:, 8)
+      trn(:,:, 8,jpnh4) = 0.0033  * tmask(:,:, 8)
+      trn(:,:, 8,jpdom) = 0.021   * tmask(:,:, 8)
+
+      trn(:,:, 9,jpdet) = 0.0556  * tmask(:,:, 9)
+      trn(:,:, 9,jpzoo) = 0.123   * tmask(:,:, 9)
+      trn(:,:, 9,jpphy) = 0.122   * tmask(:,:, 9)
+      trn(:,:, 9,jpno3) = 0.028   * tmask(:,:, 9)
+      trn(:,:, 9,jpnh4) = 0.024   * tmask(:,:, 9)
+      trn(:,:, 9,jpdom) = 0.06    * tmask(:,:, 9)
+
+      trn(:,:,10,jpdet) = 0.025   * tmask(:,:,10)
+      trn(:,:,10,jpzoo) = 0.016   * tmask(:,:,10)
+      trn(:,:,10,jpphy) = 0.029   * tmask(:,:,10)
+      trn(:,:,10,jpno3) = 2.462   * tmask(:,:,10)
+      trn(:,:,10,jpnh4) = 0.04    * tmask(:,:,10)
+      trn(:,:,10,jpdom) = 0.022   * tmask(:,:,10)
+
+      trn(:,:,11,jpdet) = 0.0057  * tmask(:,:,11)
+      trn(:,:,11,jpzoo) = 0.0005  * tmask(:,:,11)
+      trn(:,:,11,jpphy) = 0.0006  * tmask(:,:,11)
+      trn(:,:,11,jpno3) = 3.336   * tmask(:,:,11)
+      trn(:,:,11,jpnh4) = 0.005   * tmask(:,:,11)
+      trn(:,:,11,jpdom) = 0.004   * tmask(:,:,11)
+
+      trn(:,:,12,jpdet) = 0.002   * tmask(:,:,12)
+      trn(:,:,12,jpzoo) = 1.e-6   * tmask(:,:,12)
+      trn(:,:,12,jpphy) = 5.e-6   * tmask(:,:,12)
+      trn(:,:,12,jpno3) = 4.24    * tmask(:,:,12)
+      trn(:,:,12,jpnh4) = 0.001   * tmask(:,:,12)
+      trn(:,:,12,jpdom) = 3.e-5   * tmask(:,:,12)
 
       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)
+        trn(:,:,jk,jpdet) = 0.e0
+        trn(:,:,jk,jpzoo) = 0.e0
+        trn(:,:,jk,jpphy) = 0.e0
+        trn(:,:,jk,jpnh4) = 0.e0
+        trn(:,:,jk,jpdom) = 0.e0
+      END DO
+
+      trn(:,:,13,jpno3) = 5.31  * tmask(:,:,13)
+      trn(:,:,14,jpno3) = 6.73  * tmask(:,:,14)
+      trn(:,:,15,jpno3) = 8.32  * tmask(:,:,15)
+      trn(:,:,16,jpno3) = 10.13 * tmask(:,:,16)
+      trn(:,:,17,jpno3) = 11.95 * tmask(:,:,17)
+      trn(:,:,18,jpno3) = 13.57 * tmask(:,:,18)
+      trn(:,:,19,jpno3) = 15.08 * tmask(:,:,19)
+      trn(:,:,20,jpno3) = 16.41 * tmask(:,:,20)
+      trn(:,:,21,jpno3) = 17.47 * tmask(:,:,21)
+      trn(:,:,22,jpno3) = 18.29 * tmask(:,:,22)
+      trn(:,:,23,jpno3) = 18.88 * tmask(:,:,23)
+      trn(:,:,24,jpno3) = 19.30 * tmask(:,:,24)
+      trn(:,:,25,jpno3) = 19.68 * tmask(:,:,25)
+      trn(:,:,26,jpno3) = 19.91 * tmask(:,:,26)
+      trn(:,:,27,jpno3) = 19.99 * tmask(:,:,27)
+      trn(:,:,28,jpno3) = 20.01 * tmask(:,:,28)
+      trn(:,:,29,jpno3) = 20.01 * tmask(:,:,29)
+      trn(:,:,30,jpno3) = 20.01 * tmask(:,:,30)
 
 #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)
+      ! LOBSTER initialisation for GYRE
+      ! ----------------------
+      ! here:  init NO3=f(density) by asklod AS Kremeur 2005-07
+      trn(:,:,:,jpdet) = 0.1 * tmask(:,:,:)
+      trn(:,:,:,jpzoo) = 0.1 * tmask(:,:,:)
+      trn(:,:,:,jpnh4) = 0.1 * tmask(:,:,:)
+      trn(:,:,:,jpphy) = 0.1 * tmask(:,:,:)
+      trn(:,:,:,jpdom) = 1.0 * tmask(:,:,:)
+      DO jk = 1, jpk
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               IF( rhd(ji,jj,jk) <= 24.5e-3 ) THEN
+                  trn(ji,jj,jk,jpno3) = 2. * tmask(ji,jj,jk)
                ELSE
-                  trn(ji,jj,jk,jpno3)=(15.55*(rhd(ji,jj,jk)*1000)-380.11)*tmask(ji,jj,jk)
+                  trn(ji,jj,jk,jpno3) = ( 15.55 * ( rhd(ji,jj,jk) * 1000. ) - 380.11 ) * tmask(ji,jj,jk)
                ENDIF
             END DO
@@ -240,46 +217,42 @@
 
 #else
- 
-!! general case
-      do jn = 1, jptra
-         trn(:,:,:,jn)=0.1*tmask(:,:,:)
-      enddo
+      ! Default case 
+      ! ------------
+      DO jn = 1, jptra
+         trn(:,:,:,jn) = 0.1 * tmask(:,:,:)
+      END DO
 
 #endif
 
 #if defined key_dtatrc
-!!   Initialization of tracer from a file
-!!   that may also be used for damping
+     ! Initialization of tracer from a file that may also be used for damping
       CALL dta_trc( nittrc000 )
-      DO  jk = 1, jptra
-        IF( lutini(jk) ) THEN 
-!! initialisation from file
-           trn(:,:,:,jk) = trdta(:,:,:,jk)*tmask(:,:,:)
-        ENDIF
-      END DO
-#endif
-
-!! before field :
-!! -------------
+      DO jn = 1, jptra
+        IF( lutini(jn) )   trn(:,:,:,jk) = trdta(:,:,:,jn) * tmask(:,:,:)   ! initialisation from file if required
+      END DO
+#endif
+
+      ! before field :
+      ! -------------
       trb(:,:,:,:) = trn(:,:,:,:)
 
 #if defined key_trc_lobster1
-!!  initialize the POC in sediments
-
-      sedpocb(:,:) = 0.
-      sedpocn(:,:) = 0.
-      sedpoca(:,:) = 0.
-#endif
-      
- END SUBROUTINE trc_dtr 
+      !  initialize the POC in sediments
+      sedpocb(:,:) = 0.e0
+      sedpocn(:,:) = 0.e0
+      sedpoca(:,:) = 0.e0
+#endif
+      !
+   END SUBROUTINE trc_dtr 
 
 #else
-
-SUBROUTINE  trc_dtr 
-!!======================
-   !! no passive tracers
-!!======================
-END SUBROUTINE  trc_dtr
-#endif
-
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                     No passive tracer
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE trc_dtr                      ! Empty routine   
+   END SUBROUTINE trc_dtr
+#endif
+
+   !!======================================================================
 END MODULE trcdtr
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trcini.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trcini.F90	(revision 763)
@@ -1,17 +1,17 @@
 MODULE trcini
-   !!==========================================================================
-   !!                       *** MODULE trcini ***  
-   !! Ocean passive tracers:  Manage the passive tracer initialization 
-   !!=========================================================================   
+   !!======================================================================
+   !!                         ***  MODULE trcini  ***
+   !! TOP :   Manage the passive tracer initialization
+   !!======================================================================
+   !! History :    -   !  2000-04  (O. Aumont, M.A. Foujols)  original code
+   !!             1.0  !  2005-03  (O. Aumont, A. El Moussaoui) F90
+   !!              -   !  2005-10  (C. Ethe) Module
+   !!----------------------------------------------------------------------
 #if defined key_passivetrc
    !!----------------------------------------------------------------------
-   !!   trc_ini : Initialization for passive tracer
+   !!   'key_passivetrc'                                    Passive tracers
    !!----------------------------------------------------------------------
+   !!   trc_ini :   Initialization for passive tracer
    !!----------------------------------------------------------------------
-   !!  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
@@ -23,8 +23,7 @@
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC trc_ini
+   PUBLIC   trc_ini   ! called by ???
 
-#if defined key_trc_lobster1
+# if defined key_trc_lobster1
    !!----------------------------------------------------------------------
    !!   'key_trc_lobster1'                        LOBSTER1 biological model  
@@ -32,5 +31,5 @@
 #  include "trcini.lobster1.h90"
 
-#elif defined key_trc_pisces
+# elif defined key_trc_pisces
    !!----------------------------------------------------------------------
    !!   'key_trc_pisces'                            PISCES biological model                  
@@ -38,5 +37,5 @@
 #  include "trcini.pisces.h90"
 
-#elif defined key_cfc
+# elif defined key_cfc
    !!----------------------------------------------------------------------
    !!   'key_cfc  '                                          CFC model                  
@@ -44,7 +43,12 @@
 #  include "trcini.cfc.h90"
 
-#else
+# else
    !!----------------------------------------------------------------------
    !!   Default option                               
+   !!----------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 2.0 , LOCEAN-IPSL (2007) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
@@ -52,65 +56,53 @@
 
    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  
-      !!---------------------------------------------------------------------
+      !! ** Purpose :   Initialization of all passive tracer to zero
+      !!              (default case)
+      !!-------------------------------------------------------------------
+      INTEGER ::   ji ,jj ,jk ,jn, jl        ! dummy loop indices  
+      !!-------------------------------------------------------------------
 
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'trc_ini : initial set up of the passive tracers'
+      IF(lwp) WRITE(numout,*) '~~~~~~~'
 
-      !! 1. initialization of passives tracers field
-      !! -------------------------------------------
+      ! initialization of passives tracers field
+      ! ----------------------------------------
       DO jn = 1, jptra
-         trn(:,:,:,jn)=0.e0
-         tra(:,:,:,jn)=0.e0
+         trn(:,:,:,jn) = 0.e0
+         tra(:,:,:,jn) = 0.e0
       END DO
 
-#if defined key_trc_diaadd
-      !! initialization of output 2d and 3d arrays
+#  if defined key_trc_diaadd
+      ! initialization of output 2d and 3d arrays
+      DO jn = 1, jpdia2d
+         trc2d(:,:,jn) = 0.e0
+      END DO
+      DO jn = 1, jpdia3d
+         trc3d(:,:,:,jn) = 0.e0
+      END DO
+#  endif
 
-      DO jn = 1, jpdia2d
-         trc2d(:,:,jn)=0.e0
-      END DO
-
-      DO jn = 1, jpdia3d
-         trc3d(:,:,:,jn)=0.e0
-      END DO
-#endif
-
-#if defined key_trc_diabio
-      !! initialization of biological trends
-      DO jn=1,jpdiabio
+#  if defined key_trc_diabio
+      ! initialization of biological trends
+      DO jn = 1, jpdiabio
          trbio(:,:,:,jn) = 0.e0
       END DO
-#endif
+#  endif
 
-#if defined key_trc_diatrd
-      !! initialization of tracer trends
+#  if defined key_trc_diatrd
+      ! initialization of tracer trends
       DO jl = 1, jpdiatrc
          DO jn = 1, jptra
-            IF (luttrd(jn)) trtrd(:,:,:,ikeep(jn),jl) = 0.e0
+            IF( luttrd(jn) )   trtrd(:,:,:,ikeep(jn),jl) = 0.e0
          END DO
       END DO
-#endif      
-
-      IF( lwp ) THEN
-         WRITE(numout,*) ' '
-         WRITE(numout,*) ' trcini: generic initialisation done '
-         WRITE(numout,*) ' '
-      ENDIF
-
+#  endif      
+      !
    END SUBROUTINE trc_ini
 
-#endif
+# endif
 
 #else
@@ -120,5 +112,4 @@
 CONTAINS
    SUBROUTINE trc_ini              ! Empty routine
-
    END SUBROUTINE trc_ini
 #endif
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trclec.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trclec.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trclec.F90	(revision 763)
@@ -1,16 +1,21 @@
 MODULE trclec
-   !!==========================================================================
-   !!
-   !!                       *** MODULE trclec ***
-   !! Read and print options for the passive tracer run (namelist)
-   !! O.Aumont and A.El Moussaoui 03/05 F90
-   !!=========================================================================
-   !!  TOP 1.0,  LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !!======================================================================
+   !!                       ***  MODULE trclec  ***
+   !! TOP :   Read and print options for the passive tracer run (namelist)
+   !!======================================================================
+   !! History :    -   !  1996-11  (M.A. Foujols, M. Levy)  original code
+   !!              -   !  1998-04  (M.A Foujols, L. Bopp) ahtrb0 for isopycnal mixing
+   !!              -   !  1999-10  (M.A. Foujols, M. Levy) separation of sms
+   !!              -   !  2000-07  (A. Estublier) add TVD and MUSCL : Tests on ndttrc
+   !!              -   !  2000-11  (M.A Foujols, E Kestenare) trcrat, ahtrc0 and aeivtr0
+   !!              -   !  2001-01 (E Kestenare) suppress ndttrc=1 for CEN2 and TVD schemes
+   !!             1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90
    !!----------------------------------------------------------------------
 #if defined key_passivetrc
-   !! * Modules used
-   !! ==============
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !!   trc_lec    :  Read and print options for the passive tracer run (namelist)
+   !!----------------------------------------------------------------------
    USE oce_trc
    USE trc
@@ -21,8 +26,13 @@
    PRIVATE 
 
-   !! * Accessibility
-   PUBLIC trc_lec
-
-#include "passivetrc_substitute.h90"
+   PUBLIC trc_lec      ! called in ???
+
+   !! * Substitutions
+#  include "passivetrc_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
@@ -30,255 +40,175 @@
    SUBROUTINE trc_lec
       !!---------------------------------------------------------------------
-      !!                       ROUTINE trclec
-      !!                     ******************
-      !!  PURPOSE :
-      !!  ---------
-      !!     READ and PRINT options for the passive tracer run (namelist)
+      !!                     ***  ROUTINE trc_lec  ***
       !!
-      !!   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
-      !! ==================
-
+      !! ** Purpose :   READ and PRINT options for the passive tracer run (namelist) 
+      !!
+      !! ** Method  : - read namelist
+      !!---------------------------------------------------------------------
       INTEGER ::  ji
       CHARACTER (len=32) :: clname
-
+      !!
+      NAMELIST/nattrc/ nwritetrc, lrsttr, nrsttr, ctrcnm, ctrcnl, ctrcun, lutini     ! general   
+      NAMELIST/natnum/ rsc, rtrn, ncortrc, ndttrc, crosster
+#if defined key_trc_diatrd
+      NAMELIST/natrtd/ luttrd, nwritetrd                                             ! dynamical trends
+#endif
+#if defined key_trc_diaadd
+      NAMELIST/natadd/ ctrc3d, ctrc3l, ctrc2d, ctrc2l, ctrc3u, ctrc2u, nwriteadd     ! additional diagnostics
+#endif
       !!---------------------------------------------------------------------
-      !!  OPA.90   03/2005 
-      !!---------------------------------------------------------------------
-
-      !! 0. initializations
-      !! ------------------
-
-      namelist/nattrc/nwritetrc,lrsttr,nrsttr, ctrcnm,ctrcnl,ctrcun,lutini     !general   
-
-      namelist/natnum/rsc,rtrn,ncortrc,ndttrc,crosster
-
-#if defined key_trc_diatrd
-      namelist/natrtd/luttrd,nwritetrd                      ! dynamical trends
-#endif
-
-#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,*) ' '
-      ENDIF
-
-      clname='namelist.passivetrc'
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'trc_lec : read the passive tracer namelists'
+      IF(lwp) WRITE(numout,*) '~~~~~~~'
+
+      clname = 'namelist.passivetrc'
       CALL ctlopn( numnat, clname, 'OLD', 'FORMATTED', 'SEQUENTIAL',   &
          &         1, numout, .FALSE., 1 )
 
 
-      !! 1., 2. & 3. initialization with namelist files
-      !! ----------------------------------------------
-      !! 1.0 namelist nattrc :
-
-      nwritetrc = 10
-      lrsttr=.FALSE.
-      nrsttr = 0
-
-      DO ji=1,jptra
-         WRITE (ctrcnm(ji),'("TR_",I1)') ji
-         WRITE (ctrcnl(ji),'("TRACER NUMBER ",I1)') ji
-         ctrcun(ji)='mmole/m3'
-         lutini(ji)=.FALSE. 
-      END DO
-
-
-      REWIND(numnat)
-      READ(numnat,nattrc)
-
-      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,*) ' tracer nb: ',ji,' name = ',ctrcnm(ji)       & 
-               &           ,ctrcnl(ji) 
-            WRITE(numout,*) ' in unit = ',ctrcun(ji)
-            WRITE(numout,*) ' initial value in FILE : ',lutini(ji) 
-            WRITE(numout,*) ' '
-         END DO
-         WRITE(numout,*) ' '
+      ! Namelist nattrc (files)
+      ! ----------------------------------------------
+      nwritetrc = 10                 ! default values
+      lrsttr    = .FALSE.
+      nrsttr    =  0
+      DO ji = 1, jptra
+         WRITE(ctrcnm(ji),'("TR_",I1)'           ) ji
+         WRITE(ctrcnl(ji),'("TRACER NUMBER ",I1)') ji
+         ctrcun(ji) = 'mmole/m3'
+         lutini(ji) = .FALSE. 
+      END DO
+
+      REWIND( numnat )               ! read nattrc
+      READ  ( numnat, nattrc )
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : nattrc'
+         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), ' in unit = ',ctrcun(ji)
+            WRITE(numout,*) '    initial value in FILE : ',lutini(ji) 
+         END DO
       ENDIF
 
 #if defined key_trc_diatrd
 
-      !! 1.2 namelist nattrd : passive tracers dynamical trends
-
-      nwritetrd=10
-
-      !! default : no dynamical trend recording
-      !! --------------------------------------
-      DO ji=1,jptra
+      ! Namelist natrtd (transport trends)
+      ! ----------------------------------------------
+      nwritetrd = 10                 ! default values (no dynamical trend recording)
+      DO ji = 1, jptra
          luttrd(ji) = .FALSE.
       END DO
 
-      REWIND(numnat)
-      READ(numnat,natrtd)
+      REWIND( numnat )               ! read natrtd
+      READ  ( numnat, natrtd )
 
       nkeep=0
       ikeep(:)=0
-      DO ji=1,jptra
-         IF (luttrd(ji)) THEN 
-             nkeep=nkeep+1
+      DO ji = 1, jptra
+         IF( luttrd(ji) ) THEN 
+             nkeep    = nkeep + 1
              ikeep(ji)=nkeep
          END IF 
       END DO
-      IF (nkeep.GT.0) THEN  
-        IF (.NOT. ALLOCATED(trtrd)) ALLOCATE(trtrd(jpi,jpj,jpk,nkeep,jpdiatrc)) 
-        trtrd(:,:,:,:,:)=0.0
+      IF( nkeep > 0 ) THEN  
+        IF(.NOT. ALLOCATED( trtrd ) )   ALLOCATE( trtrd(jpi,jpj,jpk,nkeep,jpdiatrc) ) 
+        trtrd(:,:,:,:,:) = 0.e0
       ENDIF 
-      IF(lwp) THEN
-         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), ikeep(ji)
-         END DO
-         WRITE(numout,*) 'total = ',nkeep,' tracers dyn trends saved'
-         WRITE(numout,*) 'size of trtrd = ',jpi*jpj*jpk*nkeep*jpdiatrc
-      ENDIF
-#endif
-
-      !!1.3 namelist natadd : passive tracers diagnostics
-      !!-------------------------------------------------
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : natrtd'
+         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), ikeep(ji)
+         END DO
+         WRITE(numout,*) '    total = ', nkeep, ' tracers dyn trends saved'
+         WRITE(numout,*) '    size of trtrd = ', jpi*jpj*jpk*nkeep*jpdiatrc
+      ENDIF
+#endif
 
 #if defined key_trc_diaadd
 
-      nwriteadd = 10
-
-      !! 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
-      !! ---------------------------------------------------------------
-      DO ji=1,jpdia2d
-         WRITE (ctrc2d(ji),'("2D_",I1)') ji
-         WRITE (ctrc2l(ji),'("2D DIAGNOSTIC NUMBER ",I2)') ji
-         ctrc2u(ji)=' '
-      END DO
-
-      REWIND(numnat)
-      READ(numnat,natadd)
-
-      IF(lwp) THEN
-         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
-            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 :
-      !! ---------------------
-      rsc=1.
-      rtrn=1.e-15
-      ncortrc=1
-      ndttrc=4
-      crosster=.FALSE.
-
-      REWIND(numnat)
-      READ(numnat,natnum)
-
-!!Chris  computes the first time step of tracer model
+      ! Namelist natrtd (transport trends)
+      ! ----------------------------------------------
+      nwriteadd = 10                 ! default values 
+      !                                 ! 3D output arrays
+      DO ji = 1, jpdia3d
+         WRITE(ctrc3d(ji),'("3D_",I1)') ji                      ! short name
+         WRITE(ctrc3l(ji),'("3D DIAGNOSTIC NUMBER ",I2)') ji    ! long name
+         ctrc3u(ji) = ' '                                       ! units 
+      END DO
+      !                                 ! 2D output arrays
+      DO ji = 1, jpdia2d
+         WRITE(ctrc2d(ji),'("2D_",I1)') ji                      ! short name
+         WRITE(ctrc2l(ji),'("2D DIAGNOSTIC NUMBER ",I2)') ji    ! long name
+         ctrc2u(ji) = ' '                                       ! units
+      END DO
+
+      REWIND( numnat )               ! read natrtd
+      READ  ( numnat, natadd )
+
+      IF(lwp) THEN                   ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : natadd'
+         WRITE(numout,*) '    frequency of outputs for additional arrays nwriteadd = ', nwriteadd
+         DO ji = 1, jpdia3d
+            WRITE(numout,*) '    3d output field No :',ji,' names ',ctrc3d(ji), ctrc3l(ji), ' in ', ctrc3u(ji)
+         END DO
+         DO ji = 1, jpdia2d
+            WRITE(numout,*) '    2d output field No :',ji,' names ',ctrc2d(ji), ctrc2l(ji), ' in ', ctrc2u(ji)
+         END DO
+      ENDIF
+#endif
+
+      !! Namelist natnum :
+      !! -----------------
+      rsc      = 1.                 ! default values
+      rtrn     = 1.e-15
+      ncortrc  = 1
+      ndttrc   = 4
+      crosster = .FALSE.
+
+      REWIND( numnat )              ! read natnum
+      READ  ( numnat, natnum )
+
+      !!Chris  computes the first time step of tracer model
       nittrc000 = nit000 + ndttrc - 1
 
-      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
-      !! ---------------------
+      IF(lwp) THEN                  ! control print
+         WRITE(numout,*)
+         WRITE(numout,*) ' Namelist : 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
 
 #else
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                     No passive tracer
+   !!----------------------------------------------------------------------
+CONTAINS
+   SUBROUTINE trc_lec                      ! Empty routine   
+   END SUBROUTINE trc_lec
+#endif
+
    !!======================================================================
-   !!  Empty module : No passive tracer
-   !!======================================================================
-CONTAINS
-
-   SUBROUTINE trc_lec
-
-   END SUBROUTINE trc_lec
-
-#endif
-
 END MODULE  trclec
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trclsm.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trclsm.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trclsm.F90	(revision 763)
@@ -1,29 +1,27 @@
 MODULE trclsm
-   !!===============================================================
-   !!
-   !!                       *** MODULE trclsm ****
-   !!
-   !!  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 
-   !!-----------------------------------------------------------------
+   !!======================================================================
+   !!                         ***  MODULE trclsm  ***
+   !! TOP :   reads specific namelist for passive tracer sms terms
+   !!======================================================================
+   !! History :   1.0  !  2004-03 (C. Ethe) Original code
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 #if defined key_passivetrc
-   !!-------------------------------------------------------------
-   !! * Modules used
-   !! ==============
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !!   trc_lsm   : eads specific namelist for sms terms
+   !!----------------------------------------------------------------------
    USE oce_trc
    USE trc
    USE sms
 
-
    IMPLICIT NONE                             
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC trc_lsm
-
+   PUBLIC   trc_lsm      ! calles in ???
 
 #if defined key_trc_lobster1
@@ -41,23 +39,19 @@
 #elif defined key_cfc
    !!----------------------------------------------------------------------
-   !!   'key_cfc  '                                          CFC model                  
+   !!   'key_cfc'                                                 CFC model                  
    !!----------------------------------------------------------------------
 #  include "trclsm.cfc.h90"
 
-   !!----------------------------------------------------------------------
-   !!   Default option                               
-   !!----------------------------------------------------------------------
 # endif
 
 #else
-
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 CONTAINS
-
-   SUBROUTINE trc_lsm
-      !!================
-      !! no passive tracers
+   SUBROUTINE trc_lsm                      ! Empty routine
    END  SUBROUTINE  trc_lsm
-
 #endif  
 
+   !!======================================================================
 END MODULE trclsm  
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trcrst.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trcrst.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trcrst.F90	(revision 763)
@@ -1,18 +1,17 @@
 MODULE trcrst
    !!======================================================================
-   !!
-   !!                       *** MODULE trcrst ***
-   !!
-   !!   Read the restart files for passive tracers
-   !!
+   !!                       ***  MODULE trcrst  ***
+   !! TOP :   create, write, read the restart files for passive tracers
    !!======================================================================
-   !!  TOP 1.0,  LOCEAN-IPSL (2005) 
-   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/TOP_SRC/trcrst.F90,v 1.11 2007/10/17 14:48:56 opalod Exp $ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
-   !!----------------------------------------------------------------------
-#if defined key_passivetrc   
-   !!----------------------------------------------------------------------
-   !! * Modules used
-   !! ==============
+   !! History :   1.0  !  2007-02 (C. Ethe) adaptation from the ocean
+   !!----------------------------------------------------------------------
+#if defined key_passivetrc
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !!   trc_rst_opn    : open  restart file
+   !!   trc_rst_read   : read  restart file
+   !!   trc_rst_wri    : write restart file
+   !!----------------------------------------------------------------------
    USE oce_trc
    USE trc
@@ -25,16 +24,18 @@
    PRIVATE
    
-   !! * Accessibility
-   PUBLIC trc_rst_opn
-   PUBLIC trc_rst_read
-   PUBLIC trc_rst_wri
-   
-   !! * Module variables
+   PUBLIC   trc_rst_opn       ! called by ???
+   PUBLIC   trc_rst_read      ! called by ???
+   PUBLIC   trc_rst_wri       ! called by ???
+   
    LOGICAL, PUBLIC ::   lrst_trc         !: logical to control the trc restart write 
    INTEGER, PUBLIC ::   numrtr, numrtw   !: logical unit for trc restart (read and write)
 
-
    !! * Substitutions
 #  include "passivetrc_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Id:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
    
 CONTAINS
@@ -52,10 +53,9 @@
       !!----------------------------------------------------------------------
       !
-
       IF( kt == nit000 )  THEN
          lrst_trc = .FALSE.
-#if defined key_off_tra
+# if defined key_off_tra
          nitrst = nitend  ! in online version, already done in rst_opn routine defined in restart.F90 module
-#endif
+# endif
       ENDIF
       
@@ -63,8 +63,6 @@
          ! beware if model runs less than 2*ndttrc time step
          ! beware of the format used to write kt (default is i8.8, that should be large enough)
-         IF( nitrst > 1.0e9 ) THEN   
-            WRITE(clkt,*) nitrst
-         ELSE
-            WRITE(clkt,'(i8.8)') nitrst
+         IF( nitrst > 1.0e9 ) THEN   ;   WRITE(clkt,*       ) nitrst
+         ELSE                        ;   WRITE(clkt,'(i8.8)') nitrst
          ENDIF
          ! create the file
@@ -80,69 +78,32 @@
 
    SUBROUTINE trc_rst_read 
-      !!===========================================================================================
+      !!----------------------------------------------------------------------
+      !!                    ***  trc_rst_opn  ***
       !!
-      !!                       ROUTINE trc_rst_read
-      !!                       *******************
-      !!
-      !!  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           
-      !!------------------------------------------------------------------------
-      INTEGER ::  ji, jj, jk, jn  
-      INTEGER ::  iarak0    
-      REAL(wp) :: zkt, zarak0
-      REAL(wp) :: caralk, bicarb, co3
-
-#if defined key_trc_pisces 
-#   if ! defined key_cfg_1d && ( defined key_orca_r4 || defined key_orca_r2 || defined key_orca_r05 || defined key_orca_r025 )
-      REAL(wp) ::  ztrasum
-#   endif
-#endif
-
-      !!---------------------------------------------------------------------
-      !!  OPA.9 03-2005  
-      !!---------------------------------------------------------------------
-      !! 0. initialisations
-      !!------------------
-
-
-      IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN
-         iarak0 = 1
-      ELSE
-         iarak0 = 0
-      ENDIF
-
-
-      IF(lwp) WRITE(numout,*) ' '
-      IF(lwp) WRITE(numout,*) ' *** trc_rst beginning of restart for'
-      IF(lwp) WRITE(numout,*) ' passive tracer'
-      IF(lwp) WRITE(numout,*) ' the present run :'
-      IF(lwp) WRITE(numout,*) '   with the time nit000 : ',nit000
-      IF(lwp) THEN
-         IF( iarak0 == 1 ) THEN
-            WRITE(numout,*) '   and before fields for Arakawa sheme '
-         ENDIF
-         WRITE(numout,*) ' '
+      !! ** purpose  :   read passive tracer fields in restart files
+      !!----------------------------------------------------------------------
+      INTEGER  ::   ji, jj, jk, jn  
+      INTEGER  ::   iarak0    
+      REAL(wp) ::   zkt, zarak0
+      REAL(wp) ::   caralk, bicarb, co3
+      REAL(wp) ::   ztrasum
+      !!----------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'trc_rst_read : read restart file of the passive tracers'
+      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~'
+
+      ztrasum = 0.e0
+      IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN   ;   iarak0 = 1
+      ELSE                                           ;   iarak0 = 0
+      ENDIF
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) ' the present run starts at the time step nit000 = ', nit000
+      IF(lwp .AND. iarak0 == 1 )   WRITE(numout,*) '   and needs previous fields for Arakawa sheme ??? '
       ENDIF
 
       ! Time domain : restart
       ! -------------------------
-
-      IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) ' *** passive tracer restart option'
@@ -168,147 +129,116 @@
       IF(lwp) WRITE(numout,*) '   time-step           : ', NINT( zkt    )
       IF(lwp) WRITE(numout,*) '   arakawa option      : ', NINT( zarak0 )
-      IF(lwp) WRITE(numout,*)
-
-
-      !! control of date
-      !! -------------------
-
-      IF( nittrc000 - NINT( zkt ) /= 1 .AND. nrsttr /= 0 )  &
-           & CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart', &
-           & ' verify the restart file or rerun with nrstdt = 0 (namelist)' )
-
-      !! Control of the scheme
-      !! ------------------------
-
-      IF( iarak0 /= NINT( zarak0 ) ) &
-           & CALL ctl_stop( ' ===>>>> : problem with advection scheme', &
-           & ' it must be the same type for both restart and previous run', &
-           & ' centered or euler '  )
-
-
-      !! ... READ prognostic variables and computes diagnostic variable
-      !! ---------------------------------------------------------------
-
+
+
+      IF( nittrc000 - NINT( zkt ) /= 1 .AND. nrsttr /= 0 )  &      ! control of date
+         &   CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart', &
+         &                  ' verify the restart file or rerun with nrstdt = 0 (namelist)' )
+
+      IF( iarak0 /= NINT( zarak0 ) )   &                           ! Control of the scheme
+         & CALL ctl_stop( ' ===>>>> : problem with advection scheme', &
+         & ' it must be the same type for both restart and previous run', &
+         & ' centered or euler '  )
+
+
+      ! READ prognostic variables and computes diagnostic variable
       DO jn = 1, jptra
-         CALL iom_get( numrtr, jpdom_local, 'TRN'//ctrcnm(jn), trn(:,:,:,jn)   ) 
+         CALL iom_get( numrtr, jpdom_local, 'TRN'//ctrcnm(jn), trn(:,:,:,jn) ) 
+         CALL iom_get( numrtr, jpdom_local, 'TRB'//ctrcnm(jn), trb(:,:,:,jn) ) 
       END DO
-
-      DO jn = 1, jptra
-         CALL iom_get( numrtr, jpdom_local, 'TRB'//ctrcnm(jn), trb(:,:,:,jn)   ) 
-      END DO
-
-#if defined key_trc_lobster1
+# if defined key_trc_lobster1
       CALL iom_get( numrtr, jpdom_local, 'SEDB'//ctrcnm(jpdet), sedpocb(:,:) ) 
       CALL iom_get( numrtr, jpdom_local, 'SEDN'//ctrcnm(jpdet), sedpocn(:,:) ) 
-
-#elif defined key_trc_pisces
+# elif defined key_trc_pisces
       CALL iom_get( numrtr, jpdom_local, 'Silicalim', xksi(:,:) ) 
       xksimax = xksi
-
-#elif defined key_cfc
+# elif defined key_cfc
       DO jn = 1, jptra
-         CALL iom_get( numrtr, jpdom_local, 'qint'//ctrcnm(jn),qint(:,:,jn)) 
+         CALL iom_get( numrtr, jpdom_local, 'qint'//ctrcnm(jn), qint(:,:,jn) ) 
+         CALL iom_get( numrtr, jpdom_local, 'qtr'//ctrcnm(jn) , qtr( :,:,jn) ) 
       END DO
-      DO jn = 1, jptra
-         CALL iom_get( numrtr, jpdom_local, 'qtr'//ctrcnm(jn) ,qtr( :,:,jn)) 
-      END DO
-#endif
-
-
-#if defined key_trc_pisces 
-
-#if ! defined key_cfg_1d && ( defined key_orca_r4 || defined key_orca_r2 || defined key_orca_r05 || defined key_orca_r025 ) 
-
-      ztrasum = 0.
-      DO jk = 1, jpk
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               ztrasum = ztrasum + trn(ji,jj,jk,jptal) * tmask(ji,jj,jk) * tmask_i(ji,jj)  &
-#if defined key_off_degrad
-                  &              * facvol(ji,jj,jk)   &
-#endif
-
-                  &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
-            END DO
-         END DO
-      END DO
-
-      IF( lk_mpp ) THEN 
-         CALL mpp_sum( ztrasum )     ! sum over the global domain  
-      END IF
-
-      WRITE(0,*) 'TALK moyen ', ztrasum/areatot*1E6
-      ztrasum = ztrasum/areatot*1E6
-      trn(:,:,:,jptal) = trn(:,:,:,jptal)*2391./ztrasum
-
-      ztrasum = 0.
-      DO jk = 1, jpk
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               ztrasum = ztrasum + trn(ji,jj,jk,jppo4) * tmask(ji,jj,jk) * tmask_i(ji,jj)  &
-#if defined key_off_degrad
-                  &              * facvol(ji,jj,jk)   &
-#endif
-
-                  &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
-            END DO
-         END DO
-      END DO
-
-      IF( lk_mpp ) THEN 
-         CALL mpp_sum( ztrasum )     ! sum over the global domain  
-      END IF
-
-
-      WRITE(0,*) 'PO4 moyen ', ztrasum/areatot*1E6/122.
-      ztrasum = ztrasum/areatot*1E6/122.
-      trn(:,:,:,jppo4) = trn(:,:,:,jppo4)*2.165/ztrasum
-
-      ztrasum = 0.
-      DO jk = 1, jpk
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               ztrasum = ztrasum + trn(ji,jj,jk,jpno3) * tmask(ji,jj,jk) * tmask_i(ji,jj)  &
-#if defined key_off_degrad
-                  &              * facvol(ji,jj,jk)   &
-#endif
-
-                  &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
-            END DO
-         END DO
-      END DO
-
-      IF( lk_mpp ) THEN 
-         CALL mpp_sum( ztrasum )     ! sum over the global domain  
-      END IF
-
-
-      WRITE(0,*) 'NO3 moyen ', ztrasum/areatot*1E6/7.6
-      ztrasum = ztrasum/areatot*1E6/7.6
-      trn(:,:,:,jpno3) = trn(:,:,:,jpno3)*30.9/ztrasum
-
-      ztrasum = 0.
-      DO jk = 1, jpk
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               ztrasum = ztrasum + trn(ji,jj,jk,jpsil) * tmask(ji,jj,jk) * tmask_i(ji,jj)   &
-#if defined key_off_degrad
-                  &              * facvol(ji,jj,jk)   &
-#endif
-
-                  &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
-            END DO
-         END DO
-      END DO
-
-      IF( lk_mpp ) THEN 
-         CALL mpp_sum( ztrasum )     ! sum over the global domain  
-      END IF
-
-      WRITE(0,*) 'SiO3 moyen ', ztrasum/areatot*1E6
-      ztrasum = ztrasum/areatot*1E6
-      trn(:,:,:,jpsil) = MIN( 400E-6,trn(:,:,:,jpsil)*91.51/ztrasum) 
-
-#endif
+# endif
+
+# if defined key_trc_pisces 
+      !                                                         ! --------------------------- !
+      IF( cp_cfg == "orca" .AND. .NOT. lk_trccfg_1d ) THEN      ! ORCA condiguration (not 1D) !
+         !                                                      ! --------------------------- !
+         !                                                      ! set total alkalinity, phosphate, NO3 & silicate
+         !                          ! total alkalinity
+         ztrasum = 0.e0             ! ----------------
+         DO jk = 1, jpk
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  ztrasum = ztrasum + trn(ji,jj,jk,jptal) * tmask(ji,jj,jk) * tmask_i(ji,jj)  &
+#  if defined key_off_degrad
+                     &              * facvol(ji,jj,jk)   &
+#  endif
+                     &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         IF( lk_mpp )   CALL mpp_sum( ztrasum )     ! sum over the global domain  
+
+         IF(lwp) WRITE(numout,*) 'TALK moyen ', ztrasum / areatot * 1.e6
+         ztrasum = ztrasum / areatot * 1.e6
+         trn(:,:,:,jptal) = trn(:,:,:,jptal) * 2391. / ztrasum
+
+         !                          ! phosphate
+         ztrasum = 0.e0             ! ---------
+         DO jk = 1, jpk
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  ztrasum = ztrasum + trn(ji,jj,jk,jppo4) * tmask(ji,jj,jk) * tmask_i(ji,jj)  &
+#  if defined key_off_degrad
+                     &              * facvol(ji,jj,jk)   &
+#  endif
+                     &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         IF( lk_mpp )   CALL mpp_sum( ztrasum )     ! sum over the global domain  
+
+         IF(lwp) WRITE(numout,*) 'PO4 moyen ', ztrasum/areatot*1E6/122.
+         ztrasum = ztrasum / areatot * 1.e6 / 122.
+         trn(:,:,:,jppo4) = trn(:,:,:,jppo4) * 2.165 / ztrasum
+
+         !                          ! NO3
+         ztrasum = 0.e0             ! ---
+         DO jk = 1, jpk
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  ztrasum = ztrasum + trn(ji,jj,jk,jpno3) * tmask(ji,jj,jk) * tmask_i(ji,jj)  &
+#  if defined key_off_degrad
+                     &              * facvol(ji,jj,jk)   &
+#  endif
+                     &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         IF( lk_mpp )   CALL mpp_sum( ztrasum )     ! sum over the global domain  
+
+         IF(lwp) WRITE(numout,*) 'NO3 moyen ', ztrasum / areatot*1.e6 / 7.6
+         ztrasum = ztrasum / areatot * 1.e6 / 7.6
+         trn(:,:,:,jpno3) = trn(:,:,:,jpno3) * 30.9 / ztrasum
+
+         !                          ! Silicate
+         ztrasum = 0.e0             ! --------
+         DO jk = 1, jpk
+            DO jj = 1, jpj
+               DO ji = 1, jpi
+                  ztrasum = ztrasum + trn(ji,jj,jk,jpsil) * tmask(ji,jj,jk) * tmask_i(ji,jj)   &
+#  if defined key_off_degrad
+                     &              * facvol(ji,jj,jk)   &
+#  endif
+                     &              * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         IF( lk_mpp )   CALL mpp_sum( ztrasum )     ! sum over the global domain  
+
+         IF(lwp) WRITE(numout,*) 'SiO3 moyen ', ztrasum / areatot * 1.e6
+         ztrasum = ztrasum / areatot * 1.e6
+         trn(:,:,:,jpsil) = MIN( 400.e-6,trn(:,:,:,jpsil) * 91.51 / ztrasum ) 
+         !
+      ENDIF
 
 !#if defined key_trc_kriest
@@ -319,98 +249,46 @@
 !      trn(:,:,:,jpnum) = trn(:,:,:,jppoc) / ( 6. * xkr_massp )
 !#endif
-      !!  Initialization of chemical variables of the carbon cycle
-      !!  --------------------------------------------------------
-      DO jk = 1,jpk
-         DO jj = 1,jpj
+      !!  Set hi (???) from  total alcalinity, borat (???), akb3 (???) and ak23 (???)
+      !!  ---------------------------------------------------------------------
+      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 = (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)     &
-                  &  *tmask(ji,jj,jk)+(1.-tmask(ji,jj,jk))*1.e-9
-            ENDDO
-         ENDDO
-      ENDDO
-#endif
+               caralk = trn(ji,jj,jk,jptal) - borat(ji,jj,jk) / ( 1. + 1.e-8 / ( rtrn + akb3(ji,jj,jk) ) )
+               co3    = ( caralk - trn(ji,jj,jk,jpdic) ) *       tmask(ji,jj,jk)   &
+                  &   +             0.5e-3               * ( 1.- tmask(ji,jj,jk) )
+               bicarb = 2.* trn(ji,jj,jk,jpdic) - caralk
+               hi(ji,jj,jk) = ( ak23(ji,jj,jk) * bicarb / co3 )   *       tmask(ji,jj,jk)
+                  &         +             1.0e-9                  * ( 1.- tmask(ji,jj,jk) )
+            END DO
+         END DO
+      END DO
+# endif
       trb(:,:,:,:) = trn(:,:,:,:)
 
       CALL iom_close( numrtr )
-
-
+      !
    END SUBROUTINE trc_rst_read
 
-   SUBROUTINE trc_rst_wri(kt)
-      !! ==================================================================================
+
+   SUBROUTINE trc_rst_wri( kt )
+      !!----------------------------------------------------------------------
+      !!                    ***  trc_rst_wri  ***
       !!
-      !!                       ROUTINE trc_rst_wri
-      !!                       ******************
+      !! ** purpose  :   write passive tracer fields in restart files
+      !!----------------------------------------------------------------------
+      INTEGER, INTENT( in ) ::    kt
       !!
-      !!  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,jn
-      !!
-      !!   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
-      !!========================================================================================!
-
-      !! * Arguments
-      !! -----------
-      INTEGER, INTENT( in ) :: kt
-
-      !! * local declarations
-      !! ====================
-
       INTEGER  :: ji,jj,jk,jn
       REAL(wp) :: zdiag_var, zdiag_varmin, zdiag_varmax, zdiag_tot
       REAL(wp) :: zder
-
-
-      !! 1. OUTPUT of restart fields (nutwrs)
-      !! ---------------------------
-
-      IF( MOD(kt,nstock) == 0 .OR. kt == nitend ) THEN
-
-         !! 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
+      !!----------------------------------------------------------------------
+
+      IF( MOD( kt, nstock ) == 0 .OR. kt == nitend ) THEN
+
+         ! 0. initialisations
+         ! ------------------
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'trc_wri : write the passive tracer restart file (NetCDF) ',   &
+            &                              'at it= ',kt,' date= ',ndastp
          IF(lwp) WRITE(numout,*) '~~~~~~~~~'
 
@@ -427,10 +305,6 @@
          ! prognostic variables
          ! --------------------
-
-         DO jn=1,jptra
+         DO jn = 1, jptra
             CALL iom_rstput( kt, nitrst, numrtw, 'TRN'//ctrcnm(jn), trn(:,:,:,jn) )
-         ENDDO
-
-         DO jn=1,jptra
             CALL iom_rstput( kt, nitrst, numrtw, 'TRB'//ctrcnm(jn), trb(:,:,:,jn) )
          END DO
@@ -443,48 +317,43 @@
 
 #elif defined key_cfc
-         DO jn=1,jptra
+         DO jn = 1, jptra
             CALL iom_rstput( kt, nitrst, numrtw, 'qint'//ctrcnm(jn), qint(:,:,jn) )
-         END DO
-         DO jn=1,jptra
             CALL iom_rstput( kt, nitrst, numrtw, 'qtr'//ctrcnm(jn) , qtr( :,:,jn) )
          END DO
 #endif
 
-         IF (lwp) WRITE(numout,*) '----TRACER STAT----'
-
-         zdiag_tot=0.
-         DO jn=1,jptra
-            zdiag_var=0.
-            zdiag_varmin=0.
-            zdiag_varmax=0.
-
-            DO ji=1, jpi
-               DO jj=1, jpj
-                  DO jk=1,jpk
-                     zdiag_var=zdiag_var+trn(ji,jj,jk,jn)*tmask(ji,jj,jk)*tmask_i(ji,jj)  &
+         IF(lwp) WRITE(numout,*) '----TRACER STAT----'
+
+         zdiag_tot = 0.e0
+         DO jn = 1, jptra
+            zdiag_var    = 0.e0
+            zdiag_varmin = 0.e0
+            zdiag_varmax = 0.e0
+            DO ji = 1, jpi
+               DO jj = 1, jpj
+                  DO jk = 1,jpk
+                     zdiag_var = zdiag_var + trn(ji,jj,jk,jn) * tmask(ji,jj,jk) * tmask_i(ji,jj)   &
 #if defined key_off_degrad
                         &   * facvol(ji,jj,jk)   &
 #endif
                         &   * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk)
-
                   END DO
                END DO
             END DO
 
-            zdiag_varmin=MINVAL(trn(:,:,:,jn), mask= ((tmask*SPREAD(tmask_i,DIM=3,NCOPIES=jpk).NE.0.)))
-            zdiag_varmax=MAXVAL(trn(:,:,:,jn), mask= ((tmask*SPREAD(tmask_i,DIM=3,NCOPIES=jpk).NE.0.)))
+            zdiag_varmin = MINVAL( trn(:,:,:,jn), mask= ((tmask*SPREAD(tmask_i,DIM=3,NCOPIES=jpk).NE.0.)) )
+            zdiag_varmax = MAXVAL( trn(:,:,:,jn), mask= ((tmask*SPREAD(tmask_i,DIM=3,NCOPIES=jpk).NE.0.)) )
 
             IF( lk_mpp ) THEN
-               CALL mpp_min(zdiag_varmin)      ! min over the global domain
-               CALL mpp_max(zdiag_varmax)      ! max over the global domain
-               CALL mpp_sum(zdiag_var)         ! sum over the global domain
+               CALL mpp_min( zdiag_varmin )      ! min over the global domain
+               CALL mpp_max( zdiag_varmax )      ! max over the global domain
+               CALL mpp_sum( zdiag_var    )      ! sum over the global domain
             END IF
 
-            zdiag_tot=zdiag_tot+zdiag_var
-            zdiag_var=zdiag_var/areatot
-
-            IF (lwp) WRITE(numout,*) 'MEAN NO ',jn,ctrcnm(jn),' =',zdiag_var,'MIN= '  &
-               ,zdiag_varmin,'MAX= ',zdiag_varmax
-
+            zdiag_tot = zdiag_tot + zdiag_var
+            zdiag_var = zdiag_var / areatot
+
+            IF(lwp) WRITE(numout,*) 'MEAN NO ', jn, ctrcnm(jn), ' =', zdiag_var,   &
+               &                    'MIN= ', zdiag_varmin, 'MAX= ', zdiag_varmax
          END DO
 
@@ -495,27 +364,22 @@
 
          CALL iom_close(numrtw)
-
-      ENDIF
-
+         !
+      ENDIF
+      !
    END SUBROUTINE trc_rst_wri
 
-
 #else
-   !!======================================================================
-   !!  Empty module : No passive tracer
-   !!======================================================================
+   !!----------------------------------------------------------------------
+   !!  Dummy module :                                     No passive tracer
+   !!----------------------------------------------------------------------
 CONTAINS
-
-   SUBROUTINE trc_rst_read
-      !! no passive tracers
+   SUBROUTINE trc_rst_read                      ! Empty routines
    END SUBROUTINE trc_rst_read
-
-   SUBROUTINE trc_rst_wri(kt)
-      !! no passive tracers
+   SUBROUTINE trc_rst_wri( kt )
       INTEGER, INTENT ( in ) :: kt
       WRITE(*,*) 'trc_rst_wri: You should not have seen this print! error?', kt
-   END SUBROUTINE trc_rst_wri
-   
+   END SUBROUTINE trc_rst_wri   
 #endif
-   
+
+   !!======================================================================
 END MODULE trcrst
Index: /branches/dev_001_GM/NEMO/TOP_SRC/trcsms.F90
===================================================================
--- /branches/dev_001_GM/NEMO/TOP_SRC/trcsms.F90	(revision 762)
+++ /branches/dev_001_GM/NEMO/TOP_SRC/trcsms.F90	(revision 763)
@@ -1,109 +1,62 @@
 MODULE trcsms
-   !!===========================================================================================
-   !!
-   !!                       *** MODULE trcsms ***
-   !!
-   !!  Time  loop of opa for passive tracer
-   !!
-   !!===========================================================================================
-   !!  TOP 1.0,  LOCEAN-IPSL (2005) 
-   !! $Header$ 
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !!======================================================================
+   !!                         ***  MODULE trcsms  ***
+   !! TOP :   Time loop of passive tracers sms
+   !!======================================================================
+   !! History :   1.0  !  2005-03 (O. Aumont, A. El Moussaoui) F90
    !!----------------------------------------------------------------------
-#if defined key_passivetrc   
-   !! * Modules used
-   !! ==============
+#if defined key_passivetrc
+   !!----------------------------------------------------------------------
+   !!   'key_passivetrc'                                    Passive tracers
+   !!----------------------------------------------------------------------
+   !!   trc_sms    :  Time loop of passive tracers sms
+   !!----------------------------------------------------------------------
    USE oce_trc
    USE trc
    USE trcfreons
-   USE prtctl_trc          ! Print control for debbuging
+   USE prtctl_trc           ! Print control for debbuging
 
    IMPLICIT NONE
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC trc_sms
+   PUBLIC      trc_sms      ! called in ???
+
+   !!----------------------------------------------------------------------
+   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! $Header:$ 
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 
 CONTAINS
 
    SUBROUTINE trc_sms( kt )
-      !!===========================================================================================
+      !!---------------------------------------------------------------------
+      !!                     ***  ROUTINE ini_trc  ***
       !!
-      !!                       ROUTINE trcsms
-      !!                     *****************
+      !! ** Purpose :   Managment of the time loop of passive tracers sms 
       !!
-      !!  PURPOSE :
-      !!  ---------
-      !!          time loop of opa for passive tracer
+      !! ** Method  : - ???
+      !! -------------------------------------------------------------------------------------
+      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index      
       !!
-      !!   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
-      !! -------------------------------------------------------------------------------------
+      CHARACTER (len=25) :: charout
+      !!---------------------------------------------------------------------
 
-      !! * Arguments
-      !! -----------
-      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index      
-
-      !! * Local variables
-      !! -----------------
-
-      CHARACTER (len=25) :: charout
-
-      !! this ROUTINE is called only every ndttrc time step
-      !! --------------------------------------------------
-
-      IF ( MOD(kt,ndttrc) /= 0) RETURN
-
-      !! this first routines are parallelized on vertical slab
-      !! ------------------------------------------------------
+      IF ( MOD(kt,ndttrc) /= 0) RETURN      ! this ROUTINE is called only every ndttrc time step
 
 #if defined key_trc_lobster1
 
-      !! tracers: optical model
-      !! ----------------------
+      ! LOBSTER biological model
+      ! ------------------------
 
-      CALL trcopt( kt)
+      CALL trcopt( kt )      ! optical model
 
       IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
          WRITE(charout, FMT="('OPT')")
          CALL prt_ctl_trc_info(charout)
-         CALL prt_ctl_trc(tab4d=tra, mask=tmask, clinfo=ctrcnm)
+         CALL prt_ctl_trc( tab4d=tra, mask=tmask, clinfo=ctrcnm )
       ENDIF
 
-      !! tracers: biological model
-      !! -------------------------
-
-      CALL trcbio( kt)
+      CALL trcbio( kt )      ! biological model
 
       IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
@@ -113,8 +66,6 @@
       ENDIF
 
-      !! tracers: sedimentation model
-      !! ----------------------------
+      CALL trcsed( kt )      ! sedimentation model
 
-      CALL trcsed(kt)
       IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
          WRITE(charout, FMT="('SED')")
@@ -123,5 +74,5 @@
       ENDIF
  
-      CALL trcexp(kt)
+      CALL trcexp( kt )      ! export
 
       IF(ln_ctl)   THEN  ! print mean trends (used for debugging)
@@ -133,40 +84,34 @@
 #elif defined key_trc_pisces
 
-      !! p4zprg: main PROGRAM for PISCES 
-      !! -------------------------------
-      CALL p4zprg(kt)
+      ! PISCES biological model
+      ! ------------------------
 
-      !! SMS to DO
+      CALL p4zprg(kt)      ! main program of PISCES 
+
+
+      !                    ! split in  SMS to be DONE here
 
 #elif defined key_cfc
 
-      !! CFC's code taken from K. Rodgers
+      ! CFC chemical model (code taken from K. Rodgers)
+      ! ------------------
 
-      !! This part is still experimental
-      !! -------------------------------
-
-      CALL trc_freons(kt)
+      CALL trc_freons( kt )      ! surface fluxes of CFC
 
 #endif
-
-
-
+      !
    END SUBROUTINE trc_sms
 
 #else
    !!======================================================================
-   !!  Empty module : No passive tracer
+   !!  Dummy module :                                     No passive tracer
    !!======================================================================
 CONTAINS
-
-   SUBROUTINE trc_sms( kt )
-
-      ! no passive tracers
+   SUBROUTINE trc_sms( kt )                   ! Empty routine
       INTEGER, INTENT( in ) ::   kt
       WRITE(*,*) 'trc_sms: You should not have seen this print! error?', kt
    END SUBROUTINE trc_sms
-
 #endif 
 
-
+   !!======================================================================
 END MODULE  trcsms
