Index: trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
===================================================================
--- trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 2524)
+++ trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 2528)
@@ -5,4 +5,5 @@
    !!======================================================================
    !! History :   1.0  !  2004-03 (C. Ethe) Original code
+   !!             3.3  !  2010-07 (C. Ethe) Merge TRA-TRC
    !!----------------------------------------------------------------------
 #if defined key_top
@@ -13,33 +14,17 @@
    !!----------------------------------------------------------------------
    USE oce_trc         ! ocean dynamics and active tracers variables
-   USE trp_trc         ! ocean passive tracers variables 
-   USE trctrp_lec      ! passive tracers transport parameters
-   USE prtctl_trc      ! Print control for debbuging
-
+   USE trc             ! ocean passive tracers variables 
+   USE trcnam_trp      ! passive tracers transport namelist variables
+   USE trabbl          ! bottom boundary layer               (trc_bbl routine)
    USE trcbbl          ! bottom boundary layer               (trc_bbl routine)
+   USE zdfkpp          ! KPP non-local tracer fluxes         (trc_kpp routine)
    USE trcdmp          ! internal damping                    (trc_dmp routine)
-
-   USE trcldf_bilapg   ! lateral mixing               (trc_ldf_bilapg routine)
-   USE trcldf_bilap    ! lateral mixing                (trc_ldf_bilap routine)
-   USE trcldf_iso      ! lateral mixing                  (trc_ldf_iso routine)
-   USE trcldf_iso_zps  ! lateral mixing              (trc_ldf_iso_zps routine)
-   USE trcldf_lap      ! lateral mixing                  (trc_ldf_lap routine)
- 
+   USE trcldf          ! lateral mixing                      (trc_ldf routine)
+   USE trcadv          ! advection                           (trc_adv routine)
+   USE trczdf          ! vertical diffusion                  (trc_zdf routine)
    USE trcnxt          ! time-stepping                       (trc_nxt routine)
    USE trcrad          ! positivity                          (trc_rad routine)
-
-   USE trcadv_cen2     ! 2nd order centered advection   (trc_adv_cen2 routine)
-   USE trcadv_muscl    ! MUSCL advection               (trc_adv_muscl routine)
-   USE trcadv_muscl2   ! MUSCL2 advection             (trc_adv_muscl2 routine)
-   USE trcadv_tvd      ! TVD advection                   (trc_adv_tvd routine)
-   USE trcadv_smolar   ! SMOLAR advection             (trc_adv_smolar routine)
-
-   USE trczdf_exp      ! vertical diffusion              (trc_zdf_exp routine)
-   USE trczdf_imp      ! vertical diffusion              (trc_zdf_exp routine)
-   USE trczdf_iso      ! vertical diffusion              (trc_zdf_exp routine)
-   USE trczdf_iso_vopt ! vertical diffusion              (trc_zdf_exp routine)
    USE trcsbc          ! surface boundary condition          (trc_sbc routine)
-
-   USE zpshde_trc      ! partial step: hor. derivative   (zps_hde_trc routine)
+   USE zpshde          ! partial step: hor. derivative       (zps_hde routine)
 
 #if defined key_agrif
@@ -55,12 +40,12 @@
 #  include "top_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/TOP 1.0 , LOCEAN-IPSL (2005) 
+   !! NEMO/TOP 3.3 , NEMO Consortium (2010)
    !! $Id$ 
-   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
 
 CONTAINS
 
-   SUBROUTINE trc_trp( kt )
+   SUBROUTINE trc_trp( kstp )
       !!----------------------------------------------------------------------
       !!                     ***  ROUTINE trc_trp  ***
@@ -71,60 +56,33 @@
       !!              - Update the passive tracers
       !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::  kt  ! ocean time-step index
-      !!
-      CHARACTER (len=25) :: charout
+      INTEGER, INTENT( in ) ::  kstp  ! ocean time-step index
       !! ---------------------------------------------------------------------
-
-                               CALL trc_sbc( kt )            ! surface boundary condition
-# if defined key_trcbbc
-!!gm bug : this should be control during the initialisation phase, not here!
-       CALL ctl_stop( '  Bottom heat flux not yet implemented with passive tracer         ' &
-           &          '  Check in trc_trp routine ' )
-# endif 
-      !                                                      ! bottom boundary condition
-      IF( lk_trcbbl_dif    )   CALL trc_bbl_dif( kt )            ! diffusive bottom boundary layer scheme
-      IF( lk_trcbbl_adv    )   CALL trc_bbl_adv( kt )            ! advective (and/or diffusive) bottom boundary layer scheme
-
-      IF( lk_trcdmp        )   CALL trc_dmp( kt )            ! internal damping trends
-
-      !                                                      ! horizontal & vertical advection
-      IF( ln_trcadv_cen2   )   CALL trc_adv_cen2  ( kt )         ! 2nd order centered scheme
-      IF( ln_trcadv_muscl  )   CALL trc_adv_muscl ( kt )         ! MUSCL scheme
-      IF( ln_trcadv_muscl2 )   CALL trc_adv_muscl2( kt )         ! MUSCL2 scheme
-      IF( ln_trcadv_tvd    )   CALL trc_adv_tvd   ( kt )         ! TVD scheme
-      IF( ln_trcadv_smolar )   CALL trc_adv_smolar( kt )         ! SMOLARKIEWICZ scheme
-
- 
-      IF( n_cla == 1   ) THEN
-!!gm bug : this should be control during the initialisation phase, not here!
-         WRITE(ctmp1,*) ' Cross Land Advection not yet implemented with passive tracer n_cla = ',n_cla
-         CALL ctl_stop( ctmp1 )
-      ENDIF
-
-      !                                                      ! lateral mixing 
-      IF( l_trcldf_bilapg  )   CALL trc_ldf_bilapg ( kt )        ! s-coord. horizontal bilaplacian
-      IF( l_trcldf_bilap   )   CALL trc_ldf_bilap  ( kt )        ! iso-level bilaplacian 
-      IF( l_trcldf_iso     )   CALL trc_ldf_iso    ( kt )        ! iso-neutral laplacian 
-      IF( l_trcldf_iso_zps )   CALL trc_ldf_iso_zps( kt )        ! partial step iso-neutral laplacian
-      IF( l_trcldf_lap     )   CALL trc_ldf_lap    ( kt )        ! iso-level laplacian
-
+      IF( .NOT. lk_c1d ) THEN
+         !
+                                CALL trc_sbc( kstp )            ! surface boundary condition
+         IF( lk_trabbl )        CALL trc_bbl( kstp )            ! advective (and/or diffusive) bottom boundary layer scheme
+         IF( lk_trcdmp )        CALL trc_dmp( kstp )            ! internal damping trends
+                                CALL trc_adv( kstp )            ! horizontal & vertical advection 
+                                CALL trc_ldf( kstp )            ! lateral mixing
+         IF( .NOT. lk_offline .AND. lk_zdfkpp )    &
+            &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes
 #if defined key_agrif
-      IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc               ! tracers sponge
+         IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc           ! tracers sponge
 #endif
- 
-      !                                                      ! vertical diffusion
-      IF( l_trczdf_exp     )   CALL trc_zdf_exp     ( kt )       ! explicit time stepping (time splitting scheme)
-      IF( l_trczdf_imp     )   CALL trc_zdf_imp     ( kt )       ! implicit time stepping (euler backward)
-      IF( l_trczdf_iso     )   CALL trc_zdf_iso     ( kt )       ! isopycnal
-      IF( l_trczdf_iso_vo  )   CALL trc_zdf_iso_vopt( kt )       ! vector opt. isopycnal
-
-                               CALL trc_nxt( kt )            ! tracer fields at next time step
-     
-      IF( ln_trcrad )          CALL trc_rad( kt )            ! Correct artificial negative concentrations
-      !                                                      ! especially useful when isopycnal mixing is used
-      !                                                      
-
-      IF( ln_zps .AND. .NOT. lk_trc_c1d )   &              ! Partial steps: now horizontal gradient of passive
-         &                     CALL zps_hde_trc( kt, trb, gtru, gtrv )       ! tracers at the bottom ocean level
+                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields
+                                CALL trc_nxt( kstp )            ! tracer fields at next time step     
+         IF( ln_trcrad )        CALL trc_rad( kstp )            ! Correct artificial negative concentrations
+         IF( ln_zps    )        CALL zps_hde( kstp, jptra, trn, gtru, gtrv )  ! Partial steps: now horizontal gradient of passive
+                                                                ! tracers at the bottom ocean level
+         !
+      ELSE                                               ! 1D vertical configuration
+                                CALL trc_sbc( kstp )            ! surface boundary condition
+         IF( .NOT. lk_offline .AND. lk_zdfkpp )    &
+            &                   CALL trc_kpp( kstp )            ! KPP non-local tracer fluxes
+                                CALL trc_zdf( kstp )            ! vertical mixing and after tracer fields
+                                CALL trc_nxt( kstp )            ! tracer fields at next time step     
+          IF( ln_trcrad )       CALL trc_rad( kstp )            ! Correct artificial negative concentrations
+         !
+      END IF
       !
    END SUBROUTINE trc_trp
