Index: /trunk/NEMO/OPA_SRC/TRA/traldf_iso_zps.F90
===================================================================
--- /trunk/NEMO/OPA_SRC/TRA/traldf_iso_zps.F90	(revision 62)
+++ /trunk/NEMO/OPA_SRC/TRA/traldf_iso_zps.F90	(revision 63)
@@ -14,10 +14,11 @@
    USE oce             ! ocean dynamics and active tracers
    USE dom_oce         ! ocean space and time domain
-   USE ldftra_oce     ! ocean active tracers: lateral physics
-   USE trdtra_oce     ! ocean active tracers: trend
+   USE ldftra_oce      ! ocean active tracers: lateral physics
+   USE trdtra_oce      ! ocean active tracers: trend
    USE zdf_oce         ! ocean vertical physics
    USE in_out_manager  ! I/O manager
    USE ldfslp          ! iso-neutral slopes
-   USE lbclnk
+   USE ptr             ! poleward transport diagnostics
+
 
    IMPLICIT NONE
@@ -90,14 +91,21 @@
       REAL(wp) ::   &
          zabe1, zabe2, zcof1, zcof2,   &  ! temporary scalars
-         zmsku, zmskv, zbtr, zta, zsa, &
-         zcg1, zcg2, zuwk, zvwk,       &
-         zuwk1, zvwk1,                 &
+         zmsku, zmskv, zbtr, zta, zsa, &  !    "           "
          ztagu, ztagv, zsagu, zsagv
-      REAL(wp), DIMENSION(jpi,jpj) ::   &
-         zdkt , zdk1t, zftug, zftvg,   &  ! temporary workspace
-         zdks , zdk1s, zfsug, zfsvg       !    "           "
+#if defined key_traldf_eiv 
+      REAL(wp) ::   &
+         zcg1, zcg2, zuwk, zvwk,       & ! temporary scalars
+         zuwk1, zvwk1                    !    "           "
+#endif
+      REAL(wp), DIMENSION(jpi,jpj) ::   & ! temporary workspace
+         zdkt , zdk1t, zdks , zdk1s       !    "           "
+         
+#if defined key_traldf_eiv 
+      REAL(wp), DIMENSION(jpi,jpj) ::   &  ! temporary workspace
+         zftug, zftvg, zfsug, zfsvg        !     "        "     
+#endif
       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   & 
-         zftv, zgtbu, zgtbv,           &  ! temporary workspace
-         zfsv, zgsbu, zgsbv               !    "           "
+         zftv, zgtbu, zgtbv,                &  ! temporary workspace
+         zfsv, zgsbu, zgsbv                    !    "           "
       !!----------------------------------------------------------------------
 
@@ -192,7 +200,8 @@
          END DO
 
-         !                              ! ---------------------------------------!
-         IF( lk_traldf_eiv ) THEN       ! Eddy induced vertical advective fluxes !
-            !                           ! ---------------------------------------!
+#if defined key_traldf_eiv
+                                        ! ---------------------------------------!
+                                        ! Eddy induced vertical advective fluxes !
+                                        ! ---------------------------------------!
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
@@ -220,5 +229,5 @@
                END DO
             END DO
-         ENDIF
+#endif
 
          ! II.4 Second derivative (divergence) and add to the general trend
@@ -238,6 +247,5 @@
             END DO
          END DO
-#if defined key_trdtra || defined key_trdmld
-         IF( lk_traldf_eiv ) THEN
+#if defined key_trdtra || defined key_trdmld && key_traldf_eiv
          DO jj = 2 , jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
@@ -255,5 +263,4 @@
             END DO
          END DO
-         ENDIF
 #endif
          !                                          ! ===============
@@ -261,5 +268,5 @@
       !                                             ! ===============
 
-      IF( l_ctl .AND. lwp ) THEN         ! print mean trends (used for debugging)
+      IF( l_ctl ) THEN         ! print mean trends (used for debugging)
          zta = SUM( ta(2:jpim1,2:jpjm1,1:jpkm1) * tmask(2:jpim1,2:jpjm1,1:jpkm1) )
          zsa = SUM( sa(2:jpim1,2:jpjm1,1:jpkm1) * tmask(2:jpim1,2:jpjm1,1:jpkm1) )
@@ -273,9 +280,9 @@
       IF( MOD( kt, nf_ptr ) == 0 ) THEN
          ! "zonal" mean lateral diffusive heat and salt transports
-         pht_ldf(:,:) = prt_vj( zftv(:,:,:) )
-         pst_ldf(:,:) = prt_vj( zfsv(:,:,:) )
+         pht_ldf(:) = prt_vj( zftv(:,:,:) )
+         pst_ldf(:) = prt_vj( zfsv(:,:,:) )
          ! "zonal" mean lateral eddy induced velocity heat and salt transports
-         pht_eiv(:,:) = prt_vj( zftv(:,:,:) )
-         pst_eiv(:,:) = prt_vj( zfsv(:,:,:) )
+         pht_eiv(:) = prt_vj( zftv(:,:,:) )
+         pst_eiv(:) = prt_vj( zfsv(:,:,:) )
       ENDIF
 #endif
