Index: trunk/NEMO/NST_SRC/agrif_top_interp.F90
===================================================================
--- trunk/NEMO/NST_SRC/agrif_top_interp.F90	(revision 1270)
+++ trunk/NEMO/NST_SRC/agrif_top_interp.F90	(revision 1271)
@@ -6,6 +6,5 @@
    USE sol_oce
    USE agrif_oce
-   USE trcstp
-   USE sms
+   USE trc
 
    IMPLICIT NONE
@@ -22,5 +21,5 @@
    CONTAINS
 
-   SUBROUTINE Agrif_trc( kt )
+   SUBROUTINE Agrif_trc
       !!---------------------------------------------
       !!   *** ROUTINE Agrif_trc ***
@@ -29,6 +28,4 @@
 #  include "vectopt_loop_substitute.h90"
       
-      INTEGER, INTENT(in) :: kt
-
       INTEGER :: ji,jj,jk,jn
       REAL(wp) :: zrhox
Index: trunk/NEMO/NST_SRC/agrif_top_sponge.F90
===================================================================
--- trunk/NEMO/NST_SRC/agrif_top_sponge.F90	(revision 1271)
+++ trunk/NEMO/NST_SRC/agrif_top_sponge.F90	(revision 1271)
@@ -0,0 +1,183 @@
+#define SPONGE_TOP
+
+Module agrif_top_sponge
+#if defined key_agrif && defined key_top
+   USE par_oce
+   USE oce
+   USE dom_oce
+   USE in_out_manager
+   USE agrif_oce
+   USE trc
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC Agrif_Sponge_Trc, interptrn
+
+   !!----------------------------------------------------------------------
+   !!   OPA 9.0 , LOCEAN-IPSL (2006)
+   !! $Id: agrif_opa_sponge.F90 1156 2008-06-26 16:06:45Z rblod $
+   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+
+   CONTAINS
+
+   SUBROUTINE Agrif_Sponge_Trc
+      !!---------------------------------------------
+      !!   *** ROUTINE Agrif_Sponge_Trc ***
+      !!---------------------------------------------
+#include "domzgr_substitute.h90"
+
+      INTEGER :: ji,jj,jk,jl
+      INTEGER :: spongearea
+      REAL(wp) :: timecoeff
+      REAL(wp) :: ztra, zabe1, zabe2, zbtr
+      REAL(wp), DIMENSION(jpi,jpj) :: localviscsponge
+      REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) :: trbdiff
+      REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) :: ztru ,ztrv
+      REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) ::  ztab
+
+#if defined SPONGE_TOP
+
+      timecoeff = REAL(Agrif_NbStepint(),wp)/Agrif_rhot()
+
+      Agrif_SpecialValue=0.
+      Agrif_UseSpecialValue = .TRUE.
+      ztab = 0.e0
+      CALL Agrif_Bc_Variable(ztab, tra,calledweight=timecoeff,procname=interptrn)
+      Agrif_UseSpecialValue = .FALSE.
+
+      trbdiff(:,:,:,:) = trb(:,:,:,:) - ztab(:,:,:,:)
+
+      spongearea = 2 + 2 * Agrif_irhox()
+
+      localviscsponge = 0.
+      
+      IF (.NOT. spongedoneT) THEN
+         spe1ur(:,:) = 0.
+         spe2vr(:,:) = 0.
+
+      IF ((nbondi == -1).OR.(nbondi == 2)) THEN
+         DO ji = 2, spongearea
+            localviscsponge(ji,:) = visc_tra * (spongearea-ji)/real(spongearea-2)
+         ENDDO
+	 
+	 spe1ur(2:spongearea-1,:)=0.5 * (localviscsponge(2:spongearea-1,:) + localviscsponge(3:spongearea,:)) &
+	       * e2u(2:spongearea-1,:) / e1u(2:spongearea-1,:)
+
+         spe2vr(2:spongearea,1:jpjm1) = 0.5 * (localviscsponge(2:spongearea,1:jpjm1) + &
+	          localviscsponge(2:spongearea,2:jpj)) &
+	        * e1v(2:spongearea,1:jpjm1) / e2v(2:spongearea,1:jpjm1)
+      ENDIF
+
+      IF ((nbondi == 1).OR.(nbondi == 2)) THEN
+         DO ji = nlci-spongearea + 1,nlci-1
+            localviscsponge(ji,:) = visc_tra * (ji - (nlci-spongearea+1))/real(spongearea-2)
+         ENDDO
+	 
+	 spe1ur(nlci-spongearea + 1:nlci-2,:)=0.5 * (localviscsponge(nlci-spongearea + 1:nlci-2,:) + &
+	        localviscsponge(nlci-spongearea + 2:nlci-1,:)) &
+	       * e2u(nlci-spongearea + 1:nlci-2,:) / e1u(nlci-spongearea + 1:nlci-2,:)
+
+         spe2vr(nlci-spongearea + 1:nlci-1,1:jpjm1) = 0.5 * (localviscsponge(nlci-spongearea + 1:nlci-1,1:jpjm1) &
+	           + localviscsponge(nlci-spongearea + 1:nlci-1,2:jpj)) &
+	        * e1v(nlci-spongearea + 1:nlci-1,1:jpjm1) / e2v(nlci-spongearea + 1:nlci-1,1:jpjm1)
+      ENDIF
+
+
+      IF ((nbondj == -1).OR.(nbondj == 2)) THEN
+         DO jj = 2, spongearea
+            localviscsponge(:,jj) = visc_tra * (spongearea-jj)/real(spongearea-2)
+         ENDDO
+	 
+	 spe1ur(1:jpim1,2:spongearea)=0.5 * (localviscsponge(1:jpim1,2:spongearea) + &
+	        localviscsponge(2:jpi,2:spongearea)) &
+	       * e2u(1:jpim1,2:spongearea) / e1u(1:jpim1,2:spongearea)
+
+         spe2vr(:,2:spongearea-1) = 0.5 * (localviscsponge(:,2:spongearea-1) + &
+	          localviscsponge(:,3:spongearea)) &
+	        * e1v(:,2:spongearea-1) / e2v(:,2:spongearea-1)
+      ENDIF
+
+      IF ((nbondj == 1).OR.(nbondj == 2)) THEN
+         DO jj = nlcj-spongearea + 1,nlcj-1
+            localviscsponge(:,jj) = visc_tra * (jj - (nlcj-spongearea+1))/real(spongearea-2)
+         ENDDO
+	 
+	 spe1ur(1:jpim1,nlcj-spongearea + 1:nlcj-1)=0.5 * (localviscsponge(1:jpim1,nlcj-spongearea + 1:nlcj-1) + &
+	         localviscsponge(2:jpi,nlcj-spongearea + 1:nlcj-1)) &
+	       * e2u(1:jpim1,nlcj-spongearea + 1:nlcj-1) / e1u(1:jpim1,nlcj-spongearea + 1:nlcj-1)
+
+         spe2vr(:,nlcj-spongearea + 1:nlcj-2) = 0.5 * (localviscsponge(:,nlcj-spongearea + 1:nlcj-2) + &
+	         localviscsponge(:,nlcj-spongearea + 2:nlcj-1)) &
+	        * e1v(:,nlcj-spongearea + 1:nlcj-2) / e2v(:,nlcj-spongearea + 1:nlcj-2)
+      ENDIF
+      
+         spbtr2(:,:) = 1. / ( e1t(:,:) * e2t(:,:))
+
+         spongedoneT = .TRUE.
+      ENDIF
+
+      DO jl = 1, jptra
+      DO jk = 1, jpkm1
+         DO jj = 1, jpjm1
+            DO ji = 1, jpim1
+#if defined key_zco
+               zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj)
+               zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj)
+#else
+               zabe1 = umask(ji,jj,jk) * spe1ur(ji,jj) * fse3u(ji,jj,jk)
+               zabe2 = vmask(ji,jj,jk) * spe2vr(ji,jj) * fse3v(ji,jj,jk)
+#endif
+               ztru(ji,jj,jk,jl) = zabe1 * ( trbdiff(ji+1,jj  ,jk,jl) - trbdiff(ji,jj,jk,jl) )
+               ztrv(ji,jj,jk,jl) = zabe2 * ( trbdiff(ji  ,jj+1,jk,jl) - trbdiff(ji,jj,jk,jl) )
+            ENDDO
+         ENDDO
+
+         DO jj = 2,jpjm1
+            DO ji = 2,jpim1
+#if defined key_zco
+               zbtr = spbtr2(ji,jj)
+#else
+               zbtr = spbtr2(ji,jj) / fse3t(ji,jj,jk)
+#endif
+               ! horizontal diffusive trends
+               ztra = zbtr * (  ztru(ji,jj,jk,jl) - ztru(ji-1,jj,jk,jl)   &
+                  &          + ztrv(ji,jj,jk,jl) - ztrv(ji,jj-1,jk,jl)  )
+               ! add it to the general tracer trends
+               tra(ji,jj,jk,jl) = (tra(ji,jj,jk,jl) + ztra)
+            END DO
+         END DO
+
+      ENDDO
+      ENDDO
+
+#endif
+
+   END SUBROUTINE Agrif_Sponge_Trc
+
+   SUBROUTINE interptrn(tabres,i1,i2,j1,j2,k1,k2,l1,l2)
+      !!---------------------------------------------
+      !!   *** ROUTINE interptn ***
+      !!---------------------------------------------
+#  include "domzgr_substitute.h90"       
+      
+      INTEGER, INTENT(in) :: i1,i2,j1,j2,k1,k2,l1,l2
+      REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2,l1:l2), INTENT(inout) :: tabres
+
+      tabres(i1:i2,j1:j2,k1:k2,l1:l2) = trn(i1:i2,j1:j2,k1:k2,l1:l2)
+
+   END SUBROUTINE interptrn
+
+#else
+CONTAINS
+
+   SUBROUTINE agrif_top_sponge_empty
+      !!---------------------------------------------
+      !!   *** ROUTINE agrif_top_sponge_empty ***
+      !!---------------------------------------------
+      WRITE(*,*)  'agrif_top_sponge : You should not have seen this print! error?'
+   END SUBROUTINE agrif_top_sponge_empty
+#endif
+
+END MODULE agrif_top_sponge
Index: trunk/NEMO/NST_SRC/agrif_top_update.F90
===================================================================
--- trunk/NEMO/NST_SRC/agrif_top_update.F90	(revision 1270)
+++ trunk/NEMO/NST_SRC/agrif_top_update.F90	(revision 1271)
@@ -8,6 +8,5 @@
    USE dom_oce
    USE agrif_oce
-   USE trcstp
-   USE sms
+   USE trc
 
    IMPLICIT NONE
Index: trunk/NEMO/NST_SRC/agrif_user.F90
===================================================================
--- trunk/NEMO/NST_SRC/agrif_user.F90	(revision 1270)
+++ trunk/NEMO/NST_SRC/agrif_user.F90	(revision 1271)
@@ -62,5 +62,7 @@
       USE dom_oce
       USE opa
-      USE sms
+#if defined key_top
+      USE trc
+#endif
 #if defined key_tradmp   ||   defined key_esopa
       USE tradmp
@@ -76,4 +78,5 @@
       USE agrif_top_update
       USE agrif_top_interp
+      USE agrif_top_sponge
 
       IMPLICIT NONE
@@ -153,6 +156,6 @@
 
 #if defined key_top
+      Call Agrif_Set_raf(trn,(/'x','y','N','N'/))
       Call Agrif_Set_raf(trb,(/'x','y','N','N'/))
-      Call Agrif_Set_raf(trn,(/'x','y','N','N'/))
       Call Agrif_Set_raf(tra,(/'x','y','N','N'/))
 #endif
@@ -241,5 +244,5 @@
 #if defined key_top
       Call Agrif_Bc_variable(tabtrtemp,trn,calledweight=1.)
-      Call Agrif_Bc_variable(tabtrtemp,tra,calledweight=1.)
+      Call Agrif_Bc_variable(tabtrtemp,tra,calledweight=1.,procname=interptrn)
 #endif
       Agrif_UseSpecialValue = .FALSE.
@@ -292,7 +295,16 @@
             ENDIF
          ENDIF
+#if defined key_top
+        ! Check passive tracer cell
+        IF( ndttrc .ne. 1 ) THEN
+           WRITE(*,*) 'ndttrc should be equal to 1'
+        ENDIF
+#endif
 
       ENDIF
 
+#if defined key_top
+      CALL Agrif_Update_trc(0)
+#endif
       CALL Agrif_Update_tra(0)
       CALL Agrif_Update_dyn(0)
Index: trunk/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- trunk/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 1270)
+++ trunk/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 1271)
@@ -229,4 +229,6 @@
                umask(ji,jj,jk) = tmask(ji,jj  ,jk) * tmask(ji+1,jj  ,jk)
                vmask(ji,jj,jk) = tmask(ji,jj  ,jk) * tmask(ji  ,jj+1,jk)
+            END DO
+            DO ji = 1, jpim1 
                fmask(ji,jj,jk) = tmask(ji,jj  ,jk) * tmask(ji+1,jj  ,jk)   &
                   &            * tmask(ji,jj+1,jk) * tmask(ji+1,jj+1,jk)
Index: trunk/NEMO/OPA_SRC/IOM/iom_ioipsl.F90
===================================================================
--- trunk/NEMO/OPA_SRC/IOM/iom_ioipsl.F90	(revision 1270)
+++ trunk/NEMO/OPA_SRC/IOM/iom_ioipsl.F90	(revision 1271)
@@ -287,14 +287,14 @@
       !! ** Purpose : read the time axis cdvar in the file 
       !!--------------------------------------------------------------------
-      INTEGER                         , INTENT(in)           ::   kt       ! ocean time-step
-      INTEGER                         , INTENT(in)           ::   kwrite   ! writing time-step
-      INTEGER                         , INTENT(in)           ::   kiomid   ! Identifier of the file 
-      CHARACTER(len=*)                , INTENT(in)           ::   cdvar    ! variable name
-      INTEGER                         , INTENT(in)           ::   kvid     ! variable id
-      INTEGER                         , INTENT(in), OPTIONAL ::   ktype    ! variable type (default R8)
-      REAL(wp)                        , INTENT(in), OPTIONAL ::   pv_r0d   ! written Od field
-      REAL(wp), DIMENSION(        jpk), INTENT(in), OPTIONAL ::   pv_r1d   ! written 1d field
-      REAL(wp), DIMENSION(jpi,jpj    ), INTENT(in), OPTIONAL ::   pv_r2d   ! written 2d field
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   pv_r3d   ! written 3d field
+      INTEGER                     , INTENT(in)           ::   kt       ! ocean time-step
+      INTEGER                     , INTENT(in)           ::   kwrite   ! writing time-step
+      INTEGER                     , INTENT(in)           ::   kiomid   ! Identifier of the file 
+      CHARACTER(len=*)            , INTENT(in)           ::   cdvar    ! variable name
+      INTEGER                     , INTENT(in)           ::   kvid     ! variable id
+      INTEGER                     , INTENT(in), OPTIONAL ::   ktype    ! variable type (default R8)
+      REAL(wp)                    , INTENT(in), OPTIONAL ::   pv_r0d   ! written Od field
+      REAL(wp), DIMENSION(      :), INTENT(in), OPTIONAL ::   pv_r1d   ! written 1d field
+      REAL(wp), DIMENSION(:, :   ), INTENT(in), OPTIONAL ::   pv_r2d   ! written 2d field
+      REAL(wp), DIMENSION(:, :, :), INTENT(in), OPTIONAL ::   pv_r3d   ! written 3d field
       !
       INTEGER               :: idims                ! number of dimension
Index: trunk/NEMO/OPA_SRC/IOM/iom_nf90.F90
===================================================================
--- trunk/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 1270)
+++ trunk/NEMO/OPA_SRC/IOM/iom_nf90.F90	(revision 1271)
@@ -313,14 +313,14 @@
       !! ** Purpose : read the time axis cdvar in the file 
       !!--------------------------------------------------------------------
-      INTEGER                         , INTENT(in)           ::   kt       ! ocean time-step
-      INTEGER                         , INTENT(in)           ::   kwrite   ! writing time-step
-      INTEGER                         , INTENT(in)           ::   kiomid   ! Identifier of the file 
-      CHARACTER(len=*)                , INTENT(in)           ::   cdvar    ! variable name
-      INTEGER                         , INTENT(in)           ::   kvid     ! variable id
-      INTEGER                         , INTENT(in), OPTIONAL ::   ktype    ! variable type (default R8)
-      REAL(wp)                        , INTENT(in), OPTIONAL ::   pv_r0d   ! written Od field
-      REAL(wp), DIMENSION(        jpk), INTENT(in), OPTIONAL ::   pv_r1d   ! written 1d field
-      REAL(wp), DIMENSION(jpi,jpj    ), INTENT(in), OPTIONAL ::   pv_r2d   ! written 2d field
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   pv_r3d   ! written 3d field
+      INTEGER                     , INTENT(in)           ::   kt       ! ocean time-step
+      INTEGER                     , INTENT(in)           ::   kwrite   ! writing time-step
+      INTEGER                     , INTENT(in)           ::   kiomid   ! Identifier of the file 
+      CHARACTER(len=*)            , INTENT(in)           ::   cdvar    ! variable name
+      INTEGER                     , INTENT(in)           ::   kvid     ! variable id
+      INTEGER                     , INTENT(in), OPTIONAL ::   ktype    ! variable type (default R8)
+      REAL(wp)                    , INTENT(in), OPTIONAL ::   pv_r0d   ! written Od field
+      REAL(wp), DIMENSION(      :), INTENT(in), OPTIONAL ::   pv_r1d   ! written 1d field
+      REAL(wp), DIMENSION(:, :   ), INTENT(in), OPTIONAL ::   pv_r2d   ! written 2d field
+      REAL(wp), DIMENSION(:, :, :), INTENT(in), OPTIONAL ::   pv_r3d   ! written 3d field
       !
       INTEGER               :: idims                ! number of dimension
Index: trunk/NEMO/TOP_SRC/DUMMY/agrif_top_sponge.F90
===================================================================
--- trunk/NEMO/TOP_SRC/DUMMY/agrif_top_sponge.F90	(revision 1271)
+++ trunk/NEMO/TOP_SRC/DUMMY/agrif_top_sponge.F90	(revision 1271)
@@ -0,0 +1,15 @@
+MODULE agrif_top_sponge
+   !!======================================================================
+   !!                       ***  MODULE agrif_top_sponge  ***
+   !!  Dummy module
+   !!======================================================================
+
+   !!----------------------------------------------------------------------
+   !!   Dummy module                                     NO agrif use
+   !!----------------------------------------------------------------------
+   !!----------------------------------------------------------------------
+   !!  OPA 9.0 , LOCEAN-IPSL (2005) 
+   !! $Id: agrif_opa_sponge.F90 1152 2008-06-26 14:11:13Z rblod $ 
+   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
+   !!----------------------------------------------------------------------
+END MODULE agrif_top_sponge
Index: trunk/NEMO/TOP_SRC/PISCES/p4zopt.F90
===================================================================
--- trunk/NEMO/TOP_SRC/PISCES/p4zopt.F90	(revision 1270)
+++ trunk/NEMO/TOP_SRC/PISCES/p4zopt.F90	(revision 1271)
@@ -280,9 +280,11 @@
       INTEGER :: numlight
       REAL(wp) ::   ztoto
+      CHARACTER(LEN=20) :: clname
 
       !  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',   &
+      clname = 'kRGB61.txt' 
+      CALL ctlopn( numlight, clname, 'OLD', 'FORMATTED', 'SEQUENTIAL',   &
          &           1, numout, .TRUE., 1 )
 
Index: trunk/NEMO/TOP_SRC/TRP/trcbbl.F90
===================================================================
--- trunk/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 1270)
+++ trunk/NEMO/TOP_SRC/TRP/trcbbl.F90	(revision 1271)
@@ -100,5 +100,5 @@
       !!     Beckmann, A., and R. Doscher, 1997, J. Phys.Oceanogr., 581-591.
       !!----------------------------------------------------------------------
-      USE oce_trc, ONLY :   ztrtrd => ua                      ! use ua as 3D workspace   
+      USE oce, ONLY :   ztrtrd => ua                      ! use ua as 3D workspace   
       !!
       INTEGER, INTENT( in ) ::   kt                         ! ocean time-step
Index: trunk/NEMO/TOP_SRC/TRP/trcnxt.F90
===================================================================
--- trunk/NEMO/TOP_SRC/TRP/trcnxt.F90	(revision 1270)
+++ trunk/NEMO/TOP_SRC/TRP/trcnxt.F90	(revision 1271)
@@ -70,7 +70,7 @@
       !! ** Action  : - update trb, trn
       !!----------------------------------------------------------------------
+      USE oce, ONLY :   ztrtrd => ua    ! use ua as 3D workspace 
       !! * Arguments
-      USE oce_trc, ONLY : ztrtrd => ua      ! use ua as a 3D workspace
-      INTEGER, INTENT( in ) ::   kt         ! ocean time-step index
+      INTEGER, INTENT( in ) ::   kt     ! ocean time-step index
       !! * Local declarations
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
@@ -83,5 +83,4 @@
          WRITE(numout,*) 'trc_nxt : time stepping on passive tracers'
       ENDIF
-
 
       DO jn = 1, jptra
@@ -113,6 +112,6 @@
       END DO                                           !   End of slab
       !                                                ! ===============
-      ! Update tracers 
-      CALL Agrif_trc( kt )
+      ! Interp tracers on boundaries (coarse => fine)
+      CALL Agrif_trc
       !                                                ! ===============
       DO jn = 1, jptra                                 ! Horizontal slab
Index: trunk/NEMO/TOP_SRC/TRP/trctrp.F90
===================================================================
--- trunk/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 1270)
+++ trunk/NEMO/TOP_SRC/TRP/trctrp.F90	(revision 1271)
@@ -42,4 +42,8 @@
 
    USE zpshde_trc      ! partial step: hor. derivative   (zps_hde_trc routine)
+
+#if defined key_agrif
+   USE agrif_top_sponge ! Momemtum and tracers sponges
+#endif
 
    IMPLICIT NONE
@@ -104,4 +108,8 @@
       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 defined key_agrif
+      IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc               ! tracers sponge
+#endif
  
       !                                                      ! vertical diffusion
Index: trunk/NEMO/TOP_SRC/TRP/trczdf_exp.F90
===================================================================
--- trunk/NEMO/TOP_SRC/TRP/trczdf_exp.F90	(revision 1270)
+++ trunk/NEMO/TOP_SRC/TRP/trczdf_exp.F90	(revision 1271)
@@ -76,5 +76,5 @@
       !!
       !!---------------------------------------------------------------------
-      USE oce_trc, ONLY :   ztrtrd => ua    ! use ua as 3D workspace
+      USE oce, ONLY :   ztrtrd => ua    ! use ua as 3D workspace
       !! * Arguments
       INTEGER, INTENT( in ) ::   kt           ! ocean time-step index
Index: trunk/NEMO/TOP_SRC/TRP/trczdf_imp.F90
===================================================================
--- trunk/NEMO/TOP_SRC/TRP/trczdf_imp.F90	(revision 1270)
+++ trunk/NEMO/TOP_SRC/TRP/trczdf_imp.F90	(revision 1271)
@@ -75,7 +75,8 @@
       !!
       !!---------------------------------------------------------------------
-      USE oce_trc, ONLY : ztrtrd => ua      ! use ua as 3D workspace
       !!
       !! * Arguments
+      USE oce, ONLY :   ztrtrd => ua    ! use ua as 3D workspace 
+
       INTEGER, INTENT( in ) ::   kt           ! ocean time-step index
       INTEGER ::   ikst, ikenm2, ikstp1
Index: trunk/NEMO/TOP_SRC/TRP/trczdf_iso.F90
===================================================================
--- trunk/NEMO/TOP_SRC/TRP/trczdf_iso.F90	(revision 1270)
+++ trunk/NEMO/TOP_SRC/TRP/trczdf_iso.F90	(revision 1271)
@@ -118,5 +118,5 @@
       !!---------------------------------------------------------------------
       !! * Modules used
-      USE oce_trc , ONLY :    zavs => va, ztrtrd => ua
+      USE oce , ONLY :    zavs => va, ztrtrd => ua
 
       !! * Arguments
Index: trunk/NEMO/TOP_SRC/TRP/trczdf_iso_vopt.F90
===================================================================
--- trunk/NEMO/TOP_SRC/TRP/trczdf_iso_vopt.F90	(revision 1270)
+++ trunk/NEMO/TOP_SRC/TRP/trczdf_iso_vopt.F90	(revision 1271)
@@ -85,5 +85,5 @@
       ! -----------------------------------------------------
 
-      CALL trc_zdf_iso
+      CALL trc_zdf_iso( kt )
 
       IF( ln_ctl ) THEN    ! print mean trends (used for debugging)
@@ -151,5 +151,5 @@
       !!              - Save the trend in trtrd  ('key_trdmld_trc')
       !!---------------------------------------------------------------------
-      USE oce_trc, ONLY :   zwd   => ua,  &  ! ua, va used as
+      USE oce, ONLY :       zwd   => ua,  &  ! ua, va used as
                             zws   => va      ! workspace
       INTEGER, INTENT( in ) ::   kt          ! ocean time-step index
@@ -369,5 +369,5 @@
 
 
-   SUBROUTINE trc_zdf_iso
+   SUBROUTINE trc_zdf_iso ( kt )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE trc_zdf_iso  ***
@@ -408,6 +408,7 @@
       !!         Save in trtrd arrays the trends if 'key_trdmld_trc' defined
       !!---------------------------------------------------------------------
-      USE oce_trc, ONLY :   zwx => ua,  &  ! use ua, va as
+      USE oce, ONLY :   zwx => ua,  &  ! use ua, va as
                             zwy => va      ! workspace arrays
+      INTEGER, INTENT(in) :: kt
 
       INTEGER ::   ji, jj, jk, jn                ! dummy loop indices
