Index: anches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/LDF/ldfeiv_vis.F90
===================================================================
--- /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/LDF/ldfeiv_vis.F90	(revision 2176)
+++ 	(revision )
@@ -1,565 +1,0 @@
-MODULE ldfeiv_vis
-   !!======================================================================
-   !!                     ***  MODULE  ldfeiv_vis  ***
-   !! Ocean physics:  variable eddy induced velocity coefficients
-   !!======================================================================
-#if   defined key_traldf_eiv   &&   defined key_traldf_c2d
-   !!----------------------------------------------------------------------
-   !!   'key_traldf_eiv'      and                     eddy induced velocity
-   !!   'key_traldf_c2d'                    2D tracer lateral  mixing coef.
-   !!----------------------------------------------------------------------
-   !!   ldf_eiv      : compute the eddy induced velocity coefficients
-   !!----------------------------------------------------------------------
-   !! * Modules used
-   USE oce             ! ocean dynamics and tracers
-   USE dom_oce         ! ocean space and time domain
-   USE sbc_oce         ! surface boundary condition: ocean
-   USE sbcrnf          ! river runoffs
-   USE ldftra_oce      ! ocean tracer   lateral physics
-   USE phycst          ! physical constants
-   USE ldfslp          ! iso-neutral slopes
-   USE in_out_manager  ! I/O manager
-   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE prtctl          ! Print control
-
-   IMPLICIT NONE
-   PRIVATE
-
-   !! * Routine accessibility
-   PUBLIC ldf_eiv_vis          ! routine called by step.F90
-   !!----------------------------------------------------------------------
-   !!  OPA 9.0 , LOCEAN-IPSL (2005)
-   !! $Id: ldfeiv.F90 1146 2008-06-25 11:42:56Z rblod $
-   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
-   !!----------------------------------------------------------------------
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-#  include "vectopt_loop_substitute.h90"
-   !!----------------------------------------------------------------------
-
-CONTAINS
-
-# if defined key_mpp_omp
-   !!----------------------------------------------------------------------
-   !!   'key_mpp_omp' :                  OpenMP /  NEC autotasking (j-slab)
-   !!----------------------------------------------------------------------
-
-   SUBROUTINE ldf_eiv_vis( kt )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE ldf_eiv  ***
-      !!
-      !! ** Purpose :   Compute the eddy induced velocity coefficient from the
-      !!      growth rate of baroclinic instability.
-      !!
-      !! ** Method :
-      !!
-      !! ** Action :   uslp(),   : i- and j-slopes of neutral surfaces
-      !!               vslp()      at u- and v-points, resp.
-      !!               wslpi(),  : i- and j-slopes of neutral surfaces
-      !!               wslpj()     at w-points.
-      !!
-      !! History :
-      !!   8.1  !  99-03  (G. Madec, A. Jouzeau)  Original code
-      !!   8.5  !  02-06  (G. Madec)  Free form, F90
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt     ! ocean time-step inedx
-
-      !! * Local declarations
-      INTEGER ::   ji, jj, jk, zgap, znsend     ! dummy loop indices
-      REAL(wp) ::   &
-         zfw, ze3w, zn2, zf20,       &  ! temporary scalars
-         zaht, zaht_min, &
-         ztmin1max, zan,zas,zaw,zae,  &
-         zlscale
-      REAL(wp), DIMENSION(jpi,jpj) ::   &
-         zn, zah, zhw, zross, zana, zasa, zawa, zaea, ztmin1, &
-         zindn, zinds, zinde, zindw, znstot, zewtot   ! workspace
-      !!----------------------------------------------------------------------
-
-      IF( kt == nit000 ) THEN
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'ldf_eiv_vis : eddy induced velocity coefficients'
-         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~   NEC autotasking / OpenMP : j-slab'
-      ENDIF
-
-      ztmin1max=3.5e-06
-
-      IF ( .NOT. ln_traldf_grif) THEN
-         wslp2(:,:,:)=wslpi(:,:,:) * wslpi(:,:,:) + wslpj(:,:,:) * wslpj(:,:,:)
-      END IF
-
-      !                                                ! ===============
-      DO jj = 2, jpjm1                                 !  Vertical slab
-         !                                             ! ===============
-
-         ! 0. Local initialization
-         ! -----------------------
-         zn   (:,jj) = 0.e0
-         zhw  (:,jj) = 5.e0
-         zah  (:,jj) = 0.e0
-         zross(:,jj) = 0.e0
-
-         ! 1. Compute lateral diffusive coefficient
-         ! ----------------------------------------
-
-!CDIR NOVERRCHK
-         DO jk = 11,27
-!CDIR NOVERRCHK
-            DO ji = 2, jpim1
-               ! Take the max of N^2 and zero then take the vertical sum
-               ! of the square root of the resulting N^2 ( required to compute
-               ! internal Rossby radius Ro = .5 * sum_jpk(N) / f
-               zn2 = MAX( rn2(ji,jj,jk), 0.e0 )
-               ze3w = fse3w(ji,jj,jk) * tmask(ji,jj,jk)
-               zn(ji,jj) = zn(ji,jj) + SQRT( zn2 ) * fse3w(ji,jj,jk)
-               ! Compute elements required for the inverse time scale of baroclinic
-               ! eddies using the isopycnal slopes calculated in ldfslp.F :
-               ! T^-1 = sqrt(m_jpk(N^2*(r1^2+r2^2)*e3w))
-               zah(ji,jj) = zah(ji,jj) + zn2 * wslp2(ji,jj,jk) * ze3w
-               zhw(ji,jj) = zhw(ji,jj) + ze3w
-            END DO
-         END DO
-
-!CDIR NOVERRCHK
-         DO ji = 2, jpim1
-              IF (zhw(ji,jj) > 0) THEN
-               ztmin1(ji,jj)=SQRT( zah(ji,jj) / zhw(ji,jj) )
-             ELSE
-               ztmin1(ji,jj)=0.0
-             ENDIF
-         ENDDO
-      ENDDO
-
-      zindn(:,:)=0.0
-      zinds(:,:)=0.0
-      zindw(:,:)=0.0
-      zinde(:,:)=0.0
-      zana(:,:)=0.0
-      zasa(:,:)=0.0
-      zawa(:,:)=0.0
-      zaea(:,:)=0.0
-
-      DO jj = 2, jpjm1
-         DO ji = 2, jpim1
-             IF ( ztmin1(ji,jj) > ztmin1max ) THEN
-               zan=e2t(ji,jj)/2
-               DO zgap=1,MIN(15,nlcj-1-jj)
-                 IF (ztmin1(ji,jj+zgap) < ztmin1max ) GOTO 100
-                 zan=zan+e2t(ji,jj+zgap)
-               ENDDO
-               IF (zgap == nlcj-jj) zindn(ji,jj)=1
-       100     zas=e2t(ji,jj)/2
-               DO zgap=1,MIN(15,jj-2)
-                 IF (ztmin1(ji,jj-zgap) < ztmin1max ) GOTO 200
-                 zas=zas+e2t(ji,jj-zgap)
-               ENDDO
-               IF (zgap == jj-1) zinds(ji,jj)=1
-       200     zaw=e1t(ji,jj)/2
-               DO zgap=1,MIN(15,ji-2)
-                 IF (ztmin1(ji-zgap,jj) < ztmin1max ) GOTO 300
-                 zaw=zaw+e1t(ji-zgap,jj)
-               ENDDO
-               IF (zgap == ji-1) zindw(ji,jj)=1
-       300     zae=e1t(ji,jj)/2
-               DO zgap=1,MIN(15,nlci-1-ji)
-                 IF (ztmin1(ji+zgap,jj) < ztmin1max ) GOTO 400
-                 zae=zae+e1t(ji+zgap,jj)
-               ENDDO
-               IF (zgap == nlci-ji) zinde(ji,jj)=1
-       400     zana(ji,jj)=zan
-               zasa(ji,jj)=zas
-               zawa(ji,jj)=zaw
-               zaea(ji,jj)=zae
-             ENDIF
-         ENDDO
-       ENDDO
-
-       znsend=nlcj-1
-       ! This code deals with the case of T-pivot at the North fold to ensure the
-       ! correct elements of znstot are set before calling lbc_lnk
-       IF (jperio == 3 .OR. jperio == 4) THEN
-          IF (nproc >= jpnij-jpni) THEN
-             znsend=nlcj-2
-          ENDIF
-       ENDIF
-
-       znstot(:,znsend)=zana(:,znsend)+zasa(:,znsend)
-       znstot(:,2)=zana(:,2)+zasa(:,2)
-       zewtot(nlci-1,:)=zawa(nlci-1,:)+zaea(nlci-1,:)
-       zewtot(2,:)=zawa(2,:)+zaea(2,:)
-
-       CALL lbc_lnk( znstot, 'T', 1. )
-       CALL lbc_lnk( zewtot, 'T', 1. )
-
-       DO jj = 2, jpjm1
-!CDIR NOVERRCHK
-          DO ji = 2, jpim1
-               zana(ji,jj)=zana(ji,jj)+zindn(ji,jj)*znstot(ji,nlcj)
-               zasa(ji,jj)=zasa(ji,jj)+zinds(ji,jj)*znstot(ji,1)
-               zawa(ji,jj)=zawa(ji,jj)+zindw(ji,jj)*zewtot(1,jj)
-               zaea(ji,jj)=zaea(ji,jj)+zinde(ji,jj)*zewtot(nlci,jj)
-
-               zana(ji,jj)=MIN(zana(ji,jj),10*e2t(ji,jj))
-               zasa(ji,jj)=MIN(zasa(ji,jj),10*e2t(ji,jj))
-               zawa(ji,jj)=MIN(zawa(ji,jj),10*e1t(ji,jj))
-               zaea(ji,jj)=MIN(zaea(ji,jj),10*e1t(ji,jj))
-
-               znstot(ji,jj)=zana(ji,jj)+zasa(ji,jj)
-               zewtot(ji,jj)=zawa(ji,jj)+zaea(ji,jj)
-
-               IF ( znstot(ji,jj) == 0) THEN
-                 zlscale=0
-               ELSE
-                 IF ( znstot(ji,jj) < zewtot(ji,jj) ) THEN
-                   zlscale=(MIN(zana(ji,jj),zasa(ji,jj))/MAX(zana(ji,jj),zasa(ji,jj)))*znstot(ji,jj)
-                 ELSE
-                   zlscale=(MIN(zaea(ji,jj),zawa(ji,jj))/MAX(zaea(ji,jj),zawa(ji,jj)))*zewtot(ji,jj)
-                 ENDIF
-               ENDIF
-
-               zlscale=MAX(e2t(ji,jj),zlscale)
-               zlscale=MAX(e1t(ji,jj),zlscale)
-
-               aeiw(ji,jj) = 0.015 * (zlscale**2) * SQRT( zah(ji,jj) / zhw(ji,jj) ) * tmask(ji,jj,1)
-               aeiw(ji,jj) = MIN (aeiw(ji,jj),2000.0)
-               aeiw(ji,jj) = MAX (aeiw(ji,jj),150.0)*tmask(ji,jj,1)
-         END DO
-
-         ! ORCA R05: Take the minimum between aeiw  and 1000m2/s
-         IF( cp_cfg == "orca" .AND. jp_cfg == 05 ) THEN   ! ORCA R05
-            DO ji = 2, jpim1
-               aeiw(ji,jj) = MIN( aeiw(ji,jj), 1000. )
-            END DO
-         ENDIF
-         !                                             ! ===============
-      END DO                                           !   End of slab
-      !                                                ! ===============
-
-      !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,synchro,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
-
-      ! lateral boundary condition on aeiw
-      CALL lbc_lnk( aeiw, 'W', 1. )
-
-      ! Average the diffusive coefficient at u- v- points
-      DO jj = 2, jpjm1
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-            aeiu(ji,jj) = .5 * (aeiw(ji,jj) + aeiw(ji+1,jj  ))
-            aeiv(ji,jj) = .5 * (aeiw(ji,jj) + aeiw(ji  ,jj+1))
-         END DO
-      END DO
-      !,,,,,,,,,,,,,,,,,,,,,,,,,,,,,synchro,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
-
-      ! lateral boundary condition on aeiu, aeiv
-      CALL lbc_lnk( aeiu, 'U', 1. )
-      CALL lbc_lnk( aeiv, 'V', 1. )
-
-      IF(ln_ctl)   THEN
-         CALL prt_ctl(tab2d_1=aeiu, clinfo1=' eiv  - u: ', ovlap=1)
-         CALL prt_ctl(tab2d_1=aeiv, clinfo1=' eiv  - v: ', ovlap=1)
-      ENDIF
-
-      ! ORCA R05: add a space variation on aht (=aeiv except at the equator and river mouth)
-      IF( cp_cfg == "orca" .AND. jp_cfg == 05 ) THEN
-         zf20     = 2. * omega * SIN( rad * 20. )
-         zaht_min = 100.                              ! minimum value for aht
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               zaht      = ( 1. -  MIN( 1., ABS( ff(ji,jj) / zf20 ) ) ) * ( aht0 - zaht_min )  &
-                  &      + aht0 * upsrnfh(ji,jj)                          ! enhanced near river mouths
-               ahtu(ji,jj) = MAX( zaht_min, aeiu(ji,jj) ) + zaht
-               ahtv(ji,jj) = MAX( zaht_min, aeiv(ji,jj) ) + zaht
-               ahtw(ji,jj) = MAX( zaht_min, aeiw(ji,jj) ) + zaht
-            END DO
-         END DO
-         IF(ln_ctl) THEN
-            CALL prt_ctl(tab2d_1=ahtu, clinfo1=' aht  - u: ', ovlap=1)
-            CALL prt_ctl(tab2d_1=ahtv, clinfo1=' aht  - v: ', ovlap=1)
-            CALL prt_ctl(tab2d_1=ahtw, clinfo1=' aht  - w: ', ovlap=1)
-         ENDIF
-      ENDIF
-
-      IF( aeiv0 == 0.e0 ) THEN
-         aeiu(:,:) = 0.e0
-         aeiv(:,:) = 0.e0
-         aeiw(:,:) = 0.e0
-      ENDIF
-
-   END SUBROUTINE ldf_eiv_vis
-
-# else
-   !!----------------------------------------------------------------------
-   !!   Default key                                             k-j-i loops
-   !!----------------------------------------------------------------------
-
-   SUBROUTINE ldf_eiv_vis( kt )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE ldf_eiv_vis  ***
-      !!
-      !! ** Purpose :   Compute the eddy induced velocity coefficient from the
-      !!      growth rate of baroclinic instability.
-      !!
-      !! ** Method :
-      !!
-      !! ** Action : - uslp(),  : i- and j-slopes of neutral surfaces
-      !!             - vslp()      at u- and v-points, resp.
-      !!             - wslpi(),  : i- and j-slopes of neutral surfaces
-      !!             - wslpj()     at w-points.
-      !!
-      !! History :
-      !!   8.1  !  99-03  (G. Madec, A. Jouzeau)  Original code
-      !!   8.5  !  02-06  (G. Madec)  Free form, F90
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      INTEGER, INTENT( in ) ::   kt     ! ocean time-step inedx
-
-      !! * Local declarations
-      INTEGER ::   ji, jj, jk, zgap, znsend         ! dummy loop indices
-      REAL(wp) ::   &
-         zfw, ze3w, zn2, zf20,       &  ! temporary scalars
-         zaht, zaht_min, &
-         ztmin1max, zan,zas,zaw,zae,  &
-         zlscale
-      REAL(wp), DIMENSION(jpi,jpj) ::   &
-         zn, zah, zhw, zross, zana, zasa, zawa, zaea, ztmin1, &
-         zindn, zinds, zinde, zindw, znstot, zewtot   ! workspace
-      !!----------------------------------------------------------------------
-
-      IF( kt == nit000 ) THEN
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'ldf_eiv_vis : eddy induced velocity coefficients'
-         IF(lwp) WRITE(numout,*) '~~~~~~~'
-      ENDIF
-
-      ! 0. Local initialization
-      ! -----------------------
-      zn   (:,:) = 0.e0
-      zhw  (:,:) = 5.e0
-      zah  (:,:) = 0.e0
-      zross(:,:) = 0.e0
-
-      ztmin1max=3.5e-06
-
-      IF ( .NOT. ln_traldf_grif) THEN
-         wslp2(:,:,:)=wslpi(:,:,:) * wslpi(:,:,:) + wslpj(:,:,:) * wslpj(:,:,:)
-      END IF
-
-      ! 1. Compute lateral diffusive coefficient
-      ! ----------------------------------------
-
-      DO jk = 11, 27
-#  if defined key_vectopt_loop
-!CDIR NOVERRCHK
-         DO ji = 1, jpij   ! vector opt.
-            ! Take the max of N^2 and zero then take the vertical sum
-            ! of the square root of the resulting N^2 ( required to compute
-            ! internal Rossby radius Ro = .5 * sum_jpk(N) / f
-            zn2 = MAX( rn2(ji,1,jk), 0.e0 )
-            zn(ji,1) = zn(ji,1) + SQRT( zn2 ) * fse3w(ji,1,jk)
-            ! Compute elements required for the inverse time scale of baroclinic
-            ! eddies using the isopycnal slopes calculated in ldfslp.F :
-            ! T^-1 = sqrt(m_jpk(N^2*(r1^2+r2^2)*e3w))
-            ze3w = fse3w(ji,1,jk) * tmask(ji,1,jk)
-            zah(ji,1) = zah(ji,1) + zn2 * wslp2(ji,1,jk) * ze3w
-            zhw(ji,1) = zhw(ji,1) + ze3w
-         END DO
-#  else
-         DO jj = 2, jpjm1
-!CDIR NOVERRCHK
-            DO ji = 2, jpim1
-               ! Take the max of N^2 and zero then take the vertical sum
-               ! of the square root of the resulting N^2 ( required to compute
-               ! internal Rossby radius Ro = .5 * sum_jpk(N) / f
-               zn2 = MAX( rn2(ji,jj,jk), 0.e0 )
-               zn(ji,jj) = zn(ji,jj) + SQRT( zn2 ) * fse3w(ji,jj,jk)
-               ! Compute elements required for the inverse time scale of baroclinic
-               ! eddies using the isopycnal slopes calculated in ldfslp.F :
-               ! T^-1 = sqrt(m_jpk(N^2*(r1^2+r2^2)*e3w))
-               ze3w = fse3w(ji,jj,jk) * tmask(ji,jj,jk)
-               zah(ji,jj) = zah(ji,jj) + zn2 * wslp2(ji,jj,jk) * ze3w
-               zhw(ji,jj) = zhw(ji,jj) + ze3w
-            END DO
-         END DO
-#  endif
-      END DO
-
-      zindn(:,:)=0.0
-      zinds(:,:)=0.0
-      zindw(:,:)=0.0
-      zinde(:,:)=0.0
-      zana(:,:)=0.0
-      zasa(:,:)=0.0
-      zawa(:,:)=0.0
-      zaea(:,:)=0.0
-
-      DO jj = 2, jpjm1
-!CDIR NOVERRCHK
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-             ! Need to calculate  zlscale2 by searching E-W and N-S
-             IF (zhw(ji,jj) > 0) THEN
-               ztmin1(ji,jj)=SQRT( zah(ji,jj) / zhw(ji,jj) )
-             ELSE
-               ztmin1(ji,jj)=0.0
-             ENDIF
-         ENDDO
-      ENDDO
-
-      DO jj = 2, jpjm1
-         DO ji = 2, jpim1
-             IF ( ztmin1(ji,jj) > ztmin1max ) THEN
-               zan=e2t(ji,jj)/2
-               DO zgap=1,MIN(15,nlcj-1-jj)
-                 IF (ztmin1(ji,jj+zgap) < ztmin1max ) GOTO 100
-                 zan=zan+e2t(ji,jj+zgap)
-               ENDDO
-               IF (zgap == nlcj-jj) zindn(ji,jj)=1
-       100     zas=e2t(ji,jj)/2
-               DO zgap=1,MIN(15,jj-2)
-                 IF (ztmin1(ji,jj-zgap) < ztmin1max ) GOTO 200
-                 zas=zas+e2t(ji,jj-zgap)
-               ENDDO
-               IF (zgap == jj-1) zinds(ji,jj)=1
-       200     zaw=e1t(ji,jj)/2
-               DO zgap=1,MIN(15,ji-2)
-                 IF (ztmin1(ji-zgap,jj) < ztmin1max ) GOTO 300
-                 zaw=zaw+e1t(ji-zgap,jj)
-               ENDDO
-               IF (zgap == ji-1) zindw(ji,jj)=1
-       300     zae=e1t(ji,jj)/2
-               DO zgap=1,MIN(15,nlci-1-ji)
-                 IF (ztmin1(ji+zgap,jj) < ztmin1max ) GOTO 400
-                 zae=zae+e1t(ji+zgap,jj)
-               ENDDO
-               IF (zgap == nlci-ji) zinde(ji,jj)=1
-       400     zana(ji,jj)=zan
-               zasa(ji,jj)=zas
-               zawa(ji,jj)=zaw
-               zaea(ji,jj)=zae
-             ENDIF
-         ENDDO
-       ENDDO
-
-       znsend=nlcj-1
-       ! This code deals with the case of T-pivot at the North fold to ensure the
-       ! correct elements of znstot are set before calling lbc_lnk
-       IF (jperio == 3 .OR. jperio == 4) THEN
-          IF (nproc >= jpnij-jpni) THEN
-             znsend=nlcj-2
-          ENDIF
-       ENDIF
-
-       znstot(:,znsend)=zana(:,znsend)+zasa(:,znsend)
-       znstot(:,2)=zana(:,2)+zasa(:,2)
-       zewtot(nlci-1,:)=zawa(nlci-1,:)+zaea(nlci-1,:)
-       zewtot(2,:)=zawa(2,:)+zaea(2,:)
-
-       CALL lbc_lnk( znstot, 'T', 1. )
-       CALL lbc_lnk( zewtot, 'T', 1. )
-
-       DO jj = 2, jpjm1
-!CDIR NOVERRCHK
-!          DO ji = fs_2, fs_jpim1   ! vector opt.
-           DO ji = fs_2, jpim1
-               zana(ji,jj)=zana(ji,jj)+zindn(ji,jj)*znstot(ji,nlcj)
-               zasa(ji,jj)=zasa(ji,jj)+zinds(ji,jj)*znstot(ji,1)
-               zawa(ji,jj)=zawa(ji,jj)+zindw(ji,jj)*zewtot(1,jj)
-               zaea(ji,jj)=zaea(ji,jj)+zinde(ji,jj)*zewtot(nlci,jj)
-
-               zana(ji,jj)=MIN(zana(ji,jj),10*e2t(ji,jj))
-               zasa(ji,jj)=MIN(zasa(ji,jj),10*e2t(ji,jj))
-               zawa(ji,jj)=MIN(zawa(ji,jj),10*e1t(ji,jj))
-               zaea(ji,jj)=MIN(zaea(ji,jj),10*e1t(ji,jj))
-
-               znstot(ji,jj)=zana(ji,jj)+zasa(ji,jj)
-               zewtot(ji,jj)=zawa(ji,jj)+zaea(ji,jj)
-
-               IF ( znstot(ji,jj) == 0) THEN
-                 zlscale=0
-               ELSE
-                 IF ( znstot(ji,jj) < zewtot(ji,jj) ) THEN
-                   zlscale=(MIN(zana(ji,jj),zasa(ji,jj))/MAX(zana(ji,jj),zasa(ji,jj)))*znstot(ji,jj)
-                 ELSE
-                   zlscale=(MIN(zaea(ji,jj),zawa(ji,jj))/MAX(zaea(ji,jj),zawa(ji,jj)))*zewtot(ji,jj)
-                 ENDIF
-               ENDIF
-
-               zlscale=MAX(e2t(ji,jj),zlscale)
-               zlscale=MAX(e1t(ji,jj),zlscale)
-
-               aeiw(ji,jj) = 0.015 * (zlscale**2) * SQRT( zah(ji,jj) / zhw(ji,jj) ) * tmask(ji,jj,1)
-               aeiw(ji,jj) = MIN (aeiw(ji,jj),2000.0)
-               aeiw(ji,jj) = MAX (aeiw(ji,jj),150.0)*tmask(ji,jj,1)
-         END DO
-      END DO
-
-      ! ORCA R05: Take the minimum between aeiw  and aeiv0
-      IF( cp_cfg == "orca" .AND. jp_cfg == 05 ) THEN
-         DO jj = 2, jpjm1
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               aeiw(ji,jj) = MIN( aeiw(ji,jj), aeiv0 )
-            END DO
-         END DO
-      ENDIF
-
-      ! lateral boundary condition on aeiw
-      CALL lbc_lnk( aeiw, 'W', 1. )
-
-      ! Average the diffusive coefficient at u- v- points
-      DO jj = 2, jpjm1
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-            aeiu(ji,jj) = .5 * ( aeiw(ji,jj) + aeiw(ji+1,jj  ) )
-            aeiv(ji,jj) = .5 * ( aeiw(ji,jj) + aeiw(ji  ,jj+1) )
-         END DO
-      END DO
-
-      ! lateral boundary condition on aeiu, aeiv
-      CALL lbc_lnk( aeiu, 'U', 1. )
-      CALL lbc_lnk( aeiv, 'V', 1. )
-
-      IF(ln_ctl)   THEN
-         CALL prt_ctl(tab2d_1=aeiu, clinfo1=' eiv  - u: ', ovlap=1)
-         CALL prt_ctl(tab2d_1=aeiv, clinfo1=' eiv  - v: ', ovlap=1)
-      ENDIF
-
-      ! ORCA R05: add a space variation on aht (=aeiv except at the equator and river mouth)
-      IF( cp_cfg == "orca" .AND. jp_cfg == 05 ) THEN
-         zf20     = 2. * omega * SIN( rad * 20. )
-         zaht_min = 100.                              ! minimum value for aht
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               zaht      = ( 1. -  MIN( 1., ABS( ff(ji,jj) / zf20 ) ) ) * ( aht0 - zaht_min )  &
-                  &      + aht0 * rnfmsk(ji,jj)                          ! enhanced near river mouths
-               ahtu(ji,jj) = MAX( MAX( zaht_min, aeiu(ji,jj) ) + zaht, aht0 )
-               ahtv(ji,jj) = MAX( MAX( zaht_min, aeiv(ji,jj) ) + zaht, aht0 )
-               ahtw(ji,jj) = MAX( MAX( zaht_min, aeiw(ji,jj) ) + zaht, aht0 )
-            END DO
-         END DO
-         IF(ln_ctl) THEN
-            CALL prt_ctl(tab2d_1=ahtu, clinfo1=' aht  - u: ', ovlap=1)
-            CALL prt_ctl(tab2d_1=ahtv, clinfo1=' aht  - v: ', ovlap=1)
-            CALL prt_ctl(tab2d_1=ahtw, clinfo1=' aht  - w: ', ovlap=1)
-         ENDIF
-      ENDIF
-
-      IF( aeiv0 == 0.e0 ) THEN
-         aeiu(:,:) = 0.e0
-         aeiv(:,:) = 0.e0
-         aeiw(:,:) = 0.e0
-      ENDIF
-
-   END SUBROUTINE ldf_eiv_vis
-
-# endif
-
-#else
-   !!----------------------------------------------------------------------
-   !!   Default option                                         Dummy module
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE ldf_eiv_vis( kt )       ! Empty routine
-      WRITE(*,*) 'ldf_eiv_vis: You should not have seen this print! error?', kt
-   END SUBROUTINE ldf_eiv_vis
-#endif
-
-   !!======================================================================
-END MODULE ldfeiv_vis
Index: /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/LDF/ldftra.F90
===================================================================
--- /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 2176)
+++ /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 2177)
@@ -67,5 +67,5 @@
       NAMELIST/namtra_ldf/ ln_traldf_lap  , ln_traldf_bilap,                  &
          &                 ln_traldf_level, ln_traldf_hor  , ln_traldf_iso,   &
-         &                 ln_traldf_vis,   ln_traldf_grif ,                  &
+         &                 ln_traldf_grif ,                                   &
          &                 rn_aht_0       , rn_ahtb_0      , rn_aeiv_0,       &
          &                 rn_slpmax
@@ -85,5 +85,4 @@
          WRITE(numout,*) '      laplacian operator            ln_traldf_lap   = ', ln_traldf_lap
          WRITE(numout,*) '      bilaplacian operator          ln_traldf_bilap = ', ln_traldf_bilap
-         WRITE(numout,*) '      visbeck     operator          ln_traldf_vis   = ', ln_traldf_vis   
          WRITE(numout,*) '      griffies    operator          ln_traldf_grif  = ', ln_traldf_grif 
          WRITE(numout,*) '      lateral eddy diffusivity      rn_aht_0        = ', rn_aht_0
Index: /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/LDF/ldftra_oce.F90
===================================================================
--- /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/LDF/ldftra_oce.F90	(revision 2176)
+++ /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/LDF/ldftra_oce.F90	(revision 2177)
@@ -21,5 +21,4 @@
    LOGICAL , PUBLIC ::   ln_traldf_iso   = .TRUE.    !: iso-neutral direction
    LOGICAL , PUBLIC ::   ln_traldf_grif  = .TRUE.    !: griffies skew flux
-   LOGICAL , PUBLIC ::   ln_traldf_vis   = .FALSE.   !: griffies skew flux
    REAL(wp), PUBLIC ::   rn_aht_0        = 2000._wp  !: lateral eddy diffusivity (m2/s)
    REAL(wp), PUBLIC ::   rn_ahtb_0       =    0._wp  !: lateral background eddy diffusivity (m2/s)
Index: /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/TRA/traldf.F90
===================================================================
--- /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/TRA/traldf.F90	(revision 2176)
+++ /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/TRA/traldf.F90	(revision 2177)
@@ -154,5 +154,4 @@
          WRITE(numout,*) '      iso-neutral                 ln_traldf_iso   = ', ln_traldf_iso
          WRITE(numout,*) '          iso-neutral (Griffies)      ln_traldf_grif  = ', ln_traldf_grif
-         WRITE(numout,*) '          Visbeck scheme for aeiv     ln_traldf_vis   = ', ln_traldf_vis
       ENDIF
 
Index: /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/step.F90	(revision 2176)
+++ /branches/DEV_r1924_nocs_latphys/NEMO/OPA_SRC/step.F90	(revision 2177)
@@ -85,5 +85,4 @@
    USE ldfslp          ! iso-neutral slopes               (ldf_slp routine)
    USE ldfeiv          ! eddy induced velocity coef.      (ldf_eiv routine)
-   USE ldfeiv_vis      ! eddy induced velocity coef.  (ldf_eiv_vis routine)
 
    USE zdftmx          ! tide-induced vertical mixing     (zdf_tmx routine)
@@ -243,11 +242,5 @@
       ENDIF
 #if defined key_traldf_c2d
-      IF( lk_traldf_eiv )  THEN                                  ! eddy induced velocity coefficient
-         IF ( ln_traldf_vis )   THEN
-            CALL ldf_eiv_vis( kstp )
-         ELSE
-            CALL ldf_eiv( kstp )
-         ENDIF
-      ENDIF
+      IF( lk_traldf_eiv )   CALL ldf_eiv( kstp )      ! eddy induced velocity coefficient
 #  endif
 
