Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 4616)
@@ -465,8 +465,8 @@
                      u_bkginc(ji,jj,jk) = u_bkginc(ji,jj,jk) + 0.2_wp * ( e1e2t(ji+1,jj) * hdiv(ji+1,jj)   &
                         &                                               - e1e2t(ji  ,jj) * hdiv(ji  ,jj) ) &
-                        &                                             / e1u(ji,jj) * umask(ji,jj,jk) 
+                        &                                             * r1_e1u(ji,jj) * umask(ji,jj,jk) 
                      v_bkginc(ji,jj,jk) = v_bkginc(ji,jj,jk) + 0.2_wp * ( e1e2t(ji,jj+1) * hdiv(ji,jj+1)   &
                         &                                               - e1e2t(ji,jj  ) * hdiv(ji,jj  ) ) &
-                        &                                             / e2v(ji,jj) * vmask(ji,jj,jk) 
+                        &                                             * r1_e2v(ji,jj) * vmask(ji,jj,jk) 
                   END DO
                END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 4616)
@@ -15,12 +15,14 @@
    !!   'key_dynspg_flt'                              filtered free surface
    !!----------------------------------------------------------------------
-   USE timing          ! Timing
    USE oce             ! ocean dynamics and tracers 
+   USE bdy_oce         ! ocean open boundary conditions
+   USE sbc_oce         ! ocean surface boundary conditions
    USE dom_oce         ! ocean space and time domain 
    USE phycst          ! physical constants
-   USE bdy_oce         ! ocean open boundary conditions
+   !
+   USE in_out_manager  ! I/O manager
    USE lib_mpp         ! for mppsum
-   USE in_out_manager  ! I/O manager
-   USE sbc_oce         ! ocean surface boundary conditions
+   USE timing          ! Timing
+   USE lib_fortran     ! Fortran routines library
 
    IMPLICIT NONE
@@ -32,5 +34,5 @@
 #  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$ 
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
@@ -90,6 +92,5 @@
       ! Calculate the cumulate surface Flux z_cflxemp (m3/s) over all the domain
       ! -----------------------------------------------------------------------
-      z_cflxemp = SUM ( ( emp(:,:)-rnf(:,:) ) * bdytmask(:,:) * e1t(:,:) * e2t(:,:) ) / rau0
-      IF( lk_mpp )   CALL mpp_sum( z_cflxemp )     ! sum over the global domain
+      z_cflxemp = glob_sum( ( emp(:,:)-rnf(:,:) ) * bdytmask(:,:) * e1e2t(:,:) ) / rau0
 
       ! Transport through the unstructured open boundary
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 4616)
@@ -189,7 +189,7 @@
       IF( dia_ar5_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dia_ar5_init : unable to allocate arrays' )
 
-      area(:,:) = e1t(:,:) * e2t(:,:) * tmask_i(:,:)
-
-      area_tot = SUM( area(:,:) )   ;   IF( lk_mpp )   CALL mpp_sum( area_tot )
+      area(:,:) = e1e2t(:,:) * tmask_i(:,:)
+
+      area_tot = glob_sum( area(:,:) )
 
       vol0        = 0._wp
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diafwb.F90	(revision 4616)
@@ -9,7 +9,6 @@
    !!----------------------------------------------------------------------
 #if ! defined key_coupled
- 
-   !!----------------------------------------------------------------------
-   !!   Only for ORCA2 ORCA1 and ORCA025
+   !!----------------------------------------------------------------------
+   !!   Only for ORCA2 ORCA1 and ORCA025 and not coupled case
    !!----------------------------------------------------------------------
    !!----------------------------------------------------------------------
@@ -21,6 +20,8 @@
    USE sbc_oce         ! ???
    USE zdf_oce         ! ocean vertical physics
+   !
    USE in_out_manager  ! I/O manager
    USE lib_mpp         ! distributed memory computing library
+   USE lib_fortran    ! Fortran utilities
    USE timing          ! preformance summary
 
@@ -44,5 +45,4 @@
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -77,12 +77,11 @@
          a_salb   = 0.e0 ! valeur de sal au debut de la simulation
          ! sshb used because diafwb called after tranxt (i.e. after the swap)
-         a_sshb = SUM( e1t(:,:) * e2t(:,:) * sshb(:,:) * tmask_i(:,:) )
-         IF( lk_mpp )   CALL mpp_sum( a_sshb )      ! sum over the global domain
+         a_sshb = glob_sum(  e1e2t(:,:) * sshb(:,:)  )     ! sum over the global domain
 
          DO jk = 1, jpkm1
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zwei  = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
-                  a_salb = a_salb + ( tsb(ji,jj,jk,jp_sal) - zsm0 ) * zwei
+                  zwei   = e1e2t(ji,jj) * fse3t(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
+                  a_salb = a_salb + zwei * ( tsb(ji,jj,jk,jp_sal) - zsm0 )
                END DO
             END DO
@@ -91,6 +90,5 @@
       ENDIF
       
-      a_fwf    = SUM( e1t(:,:) * e2t(:,:) * ( emp(:,:)-rnf(:,:) ) * tmask_i(:,:) ) 
-      IF( lk_mpp )   CALL mpp_sum( a_fwf    )       ! sum over the global domain
+      a_fwf = glob_sum(  e1e2t(:,:) * ( emp(:,:)-rnf(:,:) )  )    ! sum over the global domain
 
       IF( kt == nitend ) THEN
@@ -101,15 +99,13 @@
          zfwfnew = 0.e0
          ! Mean sea level at nitend
-         a_sshn = SUM( e1t(:,:) * e2t(:,:) * sshn(:,:) * tmask_i(:,:) )
-         IF( lk_mpp )   CALL mpp_sum( a_sshn )      ! sum over the global domain
-         zarea  = SUM( e1t(:,:) * e2t(:,:) *             tmask_i(:,:) )
-         IF( lk_mpp )   CALL mpp_sum( zarea  )      ! sum over the global domain
+         a_sshn = glob_sum( e1e2t(:,:) * sshn(:,:) )     ! sum over the global domain
+         zarea  = glob_sum( e1e2t(:,:) )                 ! sum over the global domain (tmask_i included)
          
          DO jk = 1, jpkm1   
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zwei  = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
-                  a_saln = a_saln + ( tsn(ji,jj,jk,jp_sal) - zsm0 ) * zwei
-                  zvol  = zvol  + zwei
+                  zwei  = e1e2t(ji,jj) * fse3t(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
+                  a_saln = a_saln + zwei * ( tsn(ji,jj,jk,jp_sal) - zsm0 )
+                  zvol   = zvol   + zwei
                END DO
             END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4616)
@@ -80,5 +80,5 @@
       CALL wrk_alloc( jpi, jpj, zsurf )
   
-      zsurf(:,:) = e1t(:,:) * e2t(:,:) * tmask(:,:,1) * tmask_i(:,:)      ! masked surface grid cell area
+      zsurf(:,:) = e1e2t(:,:) * tmask(:,:,1) * tmask_i(:,:)      ! masked surface grid cell area
       
       ! ------------------------- !
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 4616)
@@ -188,5 +188,4 @@
       CALL lbc_lnk( z2d, 'T', 1. )
       CALL iom_put( "sstgrad2",  z2d               )    ! square of module of sst gradient
-!CDIR NOVERRCHK
       z2d(:,:) = SQRT( z2d(:,:) )
       CALL iom_put( "sstgrad" ,  z2d               )    ! module of sst gradient
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 4616)
@@ -157,22 +157,23 @@
    !! horizontal curvilinear coordinate and scale factors
    !! ---------------------------------------------------------------------
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::  glamt, glamu   !: longitude of t-, u-, v- and f-points (degre)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::  glamv, glamf   !:
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::  gphit, gphiu   !: latitude  of t-, u-, v- and f-points (degre)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::  gphiv, gphif   !:
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:) ::  e1t, e2t       !: horizontal scale factors at t-point (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:) ::  e1u, e2u       !: horizontal scale factors at u-point (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:) ::  e1v, e2v       !: horizontal scale factors at v-point (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, TARGET, DIMENSION(:,:) ::  e1f, e2f       !: horizontal scale factors at f-point (m)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::  e1e2t          !: surface at t-point (m2)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::  ff             !: coriolis factor (2.*omega*sin(yphi) ) (s-1)
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   glamt , glamu, glamv , glamf    !: longitude at t, u, v, f-points [degree]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   gphit , gphiu, gphiv , gphif    !: latitude  at t, u, v, f-points [degree]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e1t   , e2t  , r1_e1t, r1_e2t   !: t-point horizontal scale factors    [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e1u   , e2u  , r1_e1u, r1_e2u   !: horizontal scale factors at u-point [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e1v   , e2v  , r1_e1v, r1_e2v   !: horizontal scale factors at v-point [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e1f   , e2f  , r1_e1f, r1_e2f   !: horizontal scale factors at f-point [m]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e1e2t , r1_e1e2t                !: associated metrics at t-point
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e1e2u , r1_e1e2u , e2_e1u       !: associated metrics at u-point
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e1e2v , r1_e1e2v , e1_e2v       !: associated metrics at v-point
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e1e2f , r1_e1e2f                !: associated metrics at f-point
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ff                              !: coriolis factor                   [1/s]
 
    !!----------------------------------------------------------------------
    !! vertical coordinate and scale factors
    !! ---------------------------------------------------------------------
-   !                                 !!* Namelist namzgr : vertical coordinate *
-   LOGICAL, PUBLIC ::   ln_zco        !: z-coordinate - full step
-   LOGICAL, PUBLIC ::   ln_zps        !: z-coordinate - partial step
-   LOGICAL, PUBLIC ::   ln_sco        !: s-coordinate or hybrid z-s coordinate
+   !                            !!* Namelist namzgr : vertical coordinate *
+   LOGICAL, PUBLIC ::   ln_zco   !: z-coordinate - full step
+   LOGICAL, PUBLIC ::   ln_zps   !: z-coordinate - partial step
+   LOGICAL, PUBLIC ::   ln_sco   !: s-coordinate or hybrid z-s coordinate
 
    !! All coordinates
@@ -214,10 +215,4 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ht_0           !: reference depth at t-       points (meters)
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hu_0 , hv_0    !: reference depth at u- and v-points (meters)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   re2u_e1u       !: scale factor coeffs at u points (e2u/e1u)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   re1v_e2v       !: scale factor coeffs at v points (e1v/e2v)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e12t , r1_e12t !: horizontal cell surface and inverse at t points
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e12u , r1_e12u !: horizontal cell surface and inverse at u points
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e12v , r1_e12v !: horizontal cell surface and inverse at v points
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e12f , r1_e12f !: horizontal cell surface and inverse at f points
 
    INTEGER, PUBLIC ::   nla10              !: deepest    W level Above  ~10m (nlb10 - 1)
@@ -334,11 +329,18 @@
          &      njmppt(jpnij) , ibonjt(jpnij) , nldit(jpnij) , nldjt(jpnij) ,     &
          &                                      nleit(jpnij) , nlejt(jpnij) ,     &
-         &      mi0(jpidta)   , mi1 (jpidta),  mj0(jpjdta)   , mj1 (jpjdta),      &
-         &      tpol(jpiglo)  , fpol(jpiglo)                               , STAT=ierr(2) )
-         !
-      ALLOCATE( glamt(jpi,jpj) , gphit(jpi,jpj) , e1t(jpi,jpj) , e2t(jpi,jpj) ,                      & 
-         &      glamu(jpi,jpj) , gphiu(jpi,jpj) , e1u(jpi,jpj) , e2u(jpi,jpj) ,                      &  
-         &      glamv(jpi,jpj) , gphiv(jpi,jpj) , e1v(jpi,jpj) , e2v(jpi,jpj) , e1e2t(jpi,jpj) ,     &  
-         &      glamf(jpi,jpj) , gphif(jpi,jpj) , e1f(jpi,jpj) , e2f(jpi,jpj) , ff   (jpi,jpj) , STAT=ierr(3) )     
+         &      mi0(jpidta)   , mi1 (jpidta),  mj0(jpjdta)   , mj1 (jpjdta) ,     &
+         &      tpol(jpiglo)  , fpol(jpiglo)                                , STAT=ierr(2) )
+         !
+      ALLOCATE( glamt(jpi,jpj) ,    glamu(jpi,jpj) ,  glamv(jpi,jpj) ,  glamf(jpi,jpj) ,     &
+         &      gphit(jpi,jpj) ,    gphiu(jpi,jpj) ,  gphiv(jpi,jpj) ,  gphif(jpi,jpj) ,     &
+         &       e1t (jpi,jpj) ,     e2t (jpi,jpj) , r1_e1t(jpi,jpj) , r1_e2t(jpi,jpj) ,     &
+         &       e1u (jpi,jpj) ,     e2u (jpi,jpj) , r1_e1u(jpi,jpj) , r1_e2u(jpi,jpj) ,     &
+         &       e1v (jpi,jpj) ,     e2v (jpi,jpj) , r1_e1v(jpi,jpj) , r1_e2v(jpi,jpj) ,     &
+         &       e1f (jpi,jpj) ,     e2f (jpi,jpj) , r1_e1f(jpi,jpj) , r1_e2f(jpi,jpj) ,     &
+         &      e1e2t(jpi,jpj) , r1_e1e2t(jpi,jpj)                                     ,     &
+         &      e1e2u(jpi,jpj) , r1_e1e2u(jpi,jpj) , e2_e1u(jpi,jpj)                   ,     &
+         &      e1e2v(jpi,jpj) , r1_e1e2v(jpi,jpj) , e1_e2v(jpi,jpj)                   ,     &
+         &      e1e2f(jpi,jpj) , r1_e1e2f(jpi,jpj)                                     ,     &
+         &        ff (jpi,jpj)                                                         , STAT=ierr(3) )
          !
       ALLOCATE( gdep3w_0(jpi,jpj,jpk) , e3v_0(jpi,jpj,jpk) , e3f_0 (jpi,jpj,jpk) ,                         &
@@ -361,10 +363,5 @@
          !
       ALLOCATE( hu      (jpi,jpj) , hur     (jpi,jpj) , hu_0(jpi,jpj) , ht_0  (jpi,jpj) ,     &
-         &      hv      (jpi,jpj) , hvr     (jpi,jpj) , hv_0(jpi,jpj) , ht    (jpi,jpj) ,     &
-         &      re2u_e1u(jpi,jpj) , re1v_e2v(jpi,jpj) ,                                       &
-         &      e12t    (jpi,jpj) , r1_e12t (jpi,jpj) ,                                       &
-         &      e12u    (jpi,jpj) , r1_e12u (jpi,jpj) ,                                       &
-         &      e12v    (jpi,jpj) , r1_e12v (jpi,jpj) ,                                       &
-         &      e12f    (jpi,jpj) , r1_e12f (jpi,jpj) ,                                   STAT=ierr(6)  )
+         &      hv      (jpi,jpj) , hvr     (jpi,jpj) , hv_0(jpi,jpj) , ht    (jpi,jpj) , STAT=ierr(6)  )
          !
       ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) ,                                     &
@@ -377,5 +374,5 @@
          &      scosrf(jpi,jpj) , scobot(jpi,jpj) ,     &
          &      hifv  (jpi,jpj) , hiff  (jpi,jpj) ,     &
-         &      hift  (jpi,jpj) , hifu  (jpi,jpj) , rx1 (jpi,jpj) , STAT=ierr(8) )
+         &      hift  (jpi,jpj) , hifu  (jpi,jpj) , rx1(jpi,jpj) , STAT=ierr(8) )
 
       ALLOCATE( mbathy(jpi,jpj) , bathy(jpi,jpj) ,                     &
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90	(revision 4616)
@@ -14,5 +14,5 @@
    !!                            use of parameters in par_CONFIG-Rxx.h90, not in namelist
    !!             -   ! 2004-05  (A. Koch-Larrouy) Add Gyre configuration 
-   !!            4.0  ! 2011-02  (G. Madec) add cell surface (e1e2t)
+   !!            3.7  ! 2014-032  (G. Madec) add cell surface and their inverse
    !!----------------------------------------------------------------------
 
@@ -35,5 +35,5 @@
 
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$ 
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -120,15 +120,14 @@
          WRITE(numout,*) '             meridional grid-spacing (meters)  ppe2_m   = ', ppe2_m  
       ENDIF
-
-
-      SELECT CASE( jphgr_msh )   ! type of horizontal mesh
-
-      CASE ( 0 )                     !  curvilinear coordinate on the sphere read in coordinate.nc file
-
+      !
+      SELECT CASE( jphgr_msh )   !  type of horizontal mesh  
+      !
+      CASE ( 0 )                     !==  read in coordinate.nc file  ==!
+         !
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          curvilinear coordinate on the sphere read in "coordinate" file'
-
+         !
          CALL hgr_read           ! Defaultl option  :   NetCDF file
-
+         !
          !                                                ! =====================
          IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration
@@ -155,9 +154,9 @@
             !
          ENDIF
-
-            !                                             ! =====================
+         !
+         !                                                ! =====================
          IF( cp_cfg == "orca" .AND. jp_cfg == 1 ) THEN    ! ORCA R1 configuration
             !                                             ! =====================
-
+            !
             ii0 = 281   ;   ii1 = 282        ! Gibraltar Strait (e2u = 20 km)
             ij0 = 200   ;   ij1 = 200   ;   e2u( mi0(ii0):mi1(ii1) , mj0(ij0):mj1(ij1) ) =  20.e3
@@ -199,13 +198,7 @@
             IF(lwp) WRITE(numout,*)
             IF(lwp) WRITE(numout,*) '             orca_r1: E Halmahera : e1v reduced to 50 km'
-
-            !
-
-            !
-            !
-            !
-            !
-         ENDIF
-
+            !
+         ENDIF
+         !
          !                                                ! ======================
          IF( cp_cfg == "orca" .AND. jp_cfg == 05 ) THEN   ! ORCA R05 configuration
@@ -248,6 +241,5 @@
             !
          ENDIF
-
-
+         !
          ! N.B. :  General case, lat and long function of both i and j indices:
          !     e1t(ji,jj) = ra * rad * SQRT(  ( cos( rad*gphit(ji,jj) ) * fsdila( zti, ztj ) )**2   &
@@ -268,18 +260,18 @@
          !     e2f(ji,jj) = ra * rad * SQRT(  ( cos( rad*gphif(ji,jj) ) * fsdjla( zfi, zfj ) )**2   &
          !                                  + (                           fsdjph( zfi, zfj ) )**2  )
-
-
-      CASE ( 1 )                     ! geographical mesh on the sphere with regular grid-spacing
-
+         !
+         !
+      CASE ( 1 )                     !==  geographical mesh on the sphere with regular (in degree) grid-spacing  ==!
+         !
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          geographical mesh on the sphere with regular grid-spacing'
          IF(lwp) WRITE(numout,*) '          given by ppe1_deg and ppe2_deg' 
-
+         !
          DO jj = 1, jpj
             DO ji = 1, jpi
-               zti = FLOAT( ji - 1 + nimpp - 1 )         ;   ztj = FLOAT( jj - 1 + njmpp - 1 )
-               zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zuj = FLOAT( jj - 1 + njmpp - 1 )
-               zvi = FLOAT( ji - 1 + nimpp - 1 )         ;   zvj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5
-               zfi = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zfj = FLOAT( jj - 1 + njmpp - 1 ) + 0.5
+               zti = REAL( ji - 1 + nimpp - 1 )         ;   ztj = REAL( jj - 1 + njmpp - 1 )
+               zui = REAL( ji - 1 + nimpp - 1 ) + 0.5   ;   zuj = REAL( jj - 1 + njmpp - 1 )
+               zvi = REAL( ji - 1 + nimpp - 1 )         ;   zvj = REAL( jj - 1 + njmpp - 1 ) + 0.5
+               zfi = REAL( ji - 1 + nimpp - 1 ) + 0.5   ;   zfj = REAL( jj - 1 + njmpp - 1 ) + 0.5
          ! Longitude
                glamt(ji,jj) = ppglam0 + ppe1_deg * zti
@@ -304,17 +296,16 @@
             END DO
          END DO
-
-
-      CASE ( 2:3 )                   ! f- or beta-plane with regular grid-spacing
-
+         !
+      CASE ( 2:3 )                   !==  f- or beta-plane with regular grid-spacing  ==!
+         !
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          f- or beta-plane with regular grid-spacing'
          IF(lwp) WRITE(numout,*) '          given by ppe1_m and ppe2_m' 
-
+         !
          ! Position coordinates (in kilometers)
          !                          ==========
          glam0 = 0.e0
          gphi0 = - ppe2_m * 1.e-3
-         
+         !
 #if defined key_agrif 
          IF ( cp_cfg == 'eel' .AND. jp_cfg == 6 ) THEN    ! for EEL6 configuration only
@@ -329,16 +320,16 @@
          DO jj = 1, jpj
             DO ji = 1, jpi
-               glamt(ji,jj) = glam0 + ppe1_m * 1.e-3 * ( FLOAT( ji - 1 + nimpp - 1 )       )
-               glamu(ji,jj) = glam0 + ppe1_m * 1.e-3 * ( FLOAT( ji - 1 + nimpp - 1 ) + 0.5 )
+               glamt(ji,jj) = glam0 + ppe1_m * 1.e-3 * ( REAL( ji - 1 + nimpp - 1 )       )
+               glamu(ji,jj) = glam0 + ppe1_m * 1.e-3 * ( REAL( ji - 1 + nimpp - 1 ) + 0.5 )
                glamv(ji,jj) = glamt(ji,jj)
                glamf(ji,jj) = glamu(ji,jj)
-   
-               gphit(ji,jj) = gphi0 + ppe2_m * 1.e-3 * ( FLOAT( jj - 1 + njmpp - 1 )       )
+               !
+               gphit(ji,jj) = gphi0 + ppe2_m * 1.e-3 * ( REAL( jj - 1 + njmpp - 1 )       )
                gphiu(ji,jj) = gphit(ji,jj)
-               gphiv(ji,jj) = gphi0 + ppe2_m * 1.e-3 * ( FLOAT( jj - 1 + njmpp - 1 ) + 0.5 )
+               gphiv(ji,jj) = gphi0 + ppe2_m * 1.e-3 * ( REAL( jj - 1 + njmpp - 1 ) + 0.5 )
                gphif(ji,jj) = gphiv(ji,jj)
             END DO
          END DO
-
+         !
          ! Horizontal scale factors (in meters)
          !                              ======
@@ -347,12 +338,12 @@
          e1v(:,:) = ppe1_m      ;      e2v(:,:) = ppe2_m
          e1f(:,:) = ppe1_m      ;      e2f(:,:) = ppe2_m
-
-      CASE ( 4 )                     ! geographical mesh on the sphere, isotropic MERCATOR type
-
+         !
+      CASE ( 4 )                     !==  geographical mesh on the sphere, isotropic MERCATOR type  ==!
+         !
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          geographical mesh on the sphere, MERCATOR type'
          IF(lwp) WRITE(numout,*) '          longitudinal/latitudinal spacing given by ppe1_deg'
          IF ( ppgphi0 == -90 ) CALL ctl_stop( ' Mercator grid cannot start at south pole !!!! ' )
-
+         !
          !  Find index corresponding to the equator, given the grid spacing e1_deg
          !  and the (approximate) southern latitude ppgphi0.
@@ -362,13 +353,13 @@
          ijeq = ABS( 180./rpi * LOG( COS( zarg ) / SIN( zarg ) ) / ppe1_deg )
          IF(  ppgphi0 > 0 )  ijeq = -ijeq
-
+         !
          IF(lwp) WRITE(numout,*) '          Index of the equator on the MERCATOR grid:', ijeq
-
+         !
          DO jj = 1, jpj
             DO ji = 1, jpi
-               zti = FLOAT( ji - 1 + nimpp - 1 )         ;   ztj = FLOAT( jj - ijeq + njmpp - 1 )
-               zui = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zuj = FLOAT( jj - ijeq + njmpp - 1 )
-               zvi = FLOAT( ji - 1 + nimpp - 1 )         ;   zvj = FLOAT( jj - ijeq + njmpp - 1 ) + 0.5
-               zfi = FLOAT( ji - 1 + nimpp - 1 ) + 0.5   ;   zfj = FLOAT( jj - ijeq + njmpp - 1 ) + 0.5
+               zti = REAL( ji - 1 + nimpp - 1 )         ;   ztj = REAL( jj - ijeq + njmpp - 1 )
+               zui = REAL( ji - 1 + nimpp - 1 ) + 0.5   ;   zuj = REAL( jj - ijeq + njmpp - 1 )
+               zvi = REAL( ji - 1 + nimpp - 1 )         ;   zvj = REAL( jj - ijeq + njmpp - 1 ) + 0.5
+               zfi = REAL( ji - 1 + nimpp - 1 ) + 0.5   ;   zfj = REAL( jj - ijeq + njmpp - 1 ) + 0.5
          ! Longitude
                glamt(ji,jj) = ppglam0 + ppe1_deg * zti
@@ -393,53 +384,53 @@
             END DO
          END DO
-
-      CASE ( 5 )                   ! beta-plane with regular grid-spacing and rotated domain (GYRE configuration)
-
+         !
+      CASE ( 5 )                   !==  beta-plane with regular grid-spacing and rotated domain ==! (GYRE configuration)
+         !
          IF(lwp) WRITE(numout,*)
          IF(lwp) WRITE(numout,*) '          beta-plane with regular grid-spacing and rotated domain (GYRE configuration)'
          IF(lwp) WRITE(numout,*) '          given by ppe1_m and ppe2_m'
-
+         !
          ! Position coordinates (in kilometers)
          !                          ==========
-
+         !
          ! angle 45deg and ze1=106.e+3 / jp_cfg forced -> zlam1 = -85deg, zphi1 = 29degN
-         zlam1 = -85
-         zphi1 = 29
+         zlam1 = -85._wp
+         zphi1 =  29._wp
          ! resolution in meters
-         ze1 = 106000. / FLOAT(jp_cfg)            
+         ze1 = 106000. / REAL( jp_cfg , wp )            
          ! benchmark: forced the resolution to be about 100 km
          IF( nbench /= 0 )   ze1 = 106000.e0     
-         zsin_alpha = - SQRT( 2. ) / 2.
-         zcos_alpha =   SQRT( 2. ) / 2.
+         zsin_alpha = - SQRT( 2._wp ) * 0.5_wp
+         zcos_alpha =   SQRT( 2._wp ) * 0.5_wp
          ze1deg = ze1 / (ra * rad)
-         IF( nbench /= 0 )   ze1deg = ze1deg / FLOAT(jp_cfg)        ! benchmark: keep the lat/+lon
-         !                                                          ! at the right jp_cfg resolution
-         glam0 = zlam1 + zcos_alpha * ze1deg * FLOAT( jpjglo-2 )
-         gphi0 = zphi1 + zsin_alpha * ze1deg * FLOAT( jpjglo-2 )
-
+         IF( nbench /= 0 )   ze1deg = ze1deg / REAL( jp_cfg , wp )   ! benchmark: keep the lat/+lon
+         !                                                           ! at the right jp_cfg resolution
+         glam0 = zlam1 + zcos_alpha * ze1deg * REAL( jpjglo-2 , wp )
+         gphi0 = zphi1 + zsin_alpha * ze1deg * REAL( jpjglo-2 , wp )
+         !
          IF( nprint==1 .AND. lwp )   THEN
             WRITE(numout,*) '          ze1', ze1, 'cosalpha', zcos_alpha, 'sinalpha', zsin_alpha
             WRITE(numout,*) '          ze1deg', ze1deg, 'glam0', glam0, 'gphi0', gphi0
          ENDIF
-
+         !
          DO jj = 1, jpj
-           DO ji = 1, jpi
-             zim1 = FLOAT( ji + nimpp - 1 ) - 1.   ;   zim05 = FLOAT( ji + nimpp - 1 ) - 1.5
-             zjm1 = FLOAT( jj + njmpp - 1 ) - 1.   ;   zjm05 = FLOAT( jj + njmpp - 1 ) - 1.5
-
-             glamf(ji,jj) = glam0 + zim1  * ze1deg * zcos_alpha + zjm1  * ze1deg * zsin_alpha
-             gphif(ji,jj) = gphi0 - zim1  * ze1deg * zsin_alpha + zjm1  * ze1deg * zcos_alpha
-
-             glamt(ji,jj) = glam0 + zim05 * ze1deg * zcos_alpha + zjm05 * ze1deg * zsin_alpha
-             gphit(ji,jj) = gphi0 - zim05 * ze1deg * zsin_alpha + zjm05 * ze1deg * zcos_alpha
-
-             glamu(ji,jj) = glam0 + zim1  * ze1deg * zcos_alpha + zjm05 * ze1deg * zsin_alpha
-             gphiu(ji,jj) = gphi0 - zim1  * ze1deg * zsin_alpha + zjm05 * ze1deg * zcos_alpha
-
-             glamv(ji,jj) = glam0 + zim05 * ze1deg * zcos_alpha + zjm1  * ze1deg * zsin_alpha
-             gphiv(ji,jj) = gphi0 - zim05 * ze1deg * zsin_alpha + zjm1  * ze1deg * zcos_alpha
-           END DO
-          END DO
-
+            DO ji = 1, jpi
+               zim1 = REAL( ji + nimpp - 1 ) - 1.   ;   zim05 = REAL( ji + nimpp - 1 ) - 1.5
+               zjm1 = REAL( jj + njmpp - 1 ) - 1.   ;   zjm05 = REAL( jj + njmpp - 1 ) - 1.5
+               !
+               glamf(ji,jj) = glam0 + zim1  * ze1deg * zcos_alpha + zjm1  * ze1deg * zsin_alpha
+               gphif(ji,jj) = gphi0 - zim1  * ze1deg * zsin_alpha + zjm1  * ze1deg * zcos_alpha
+               !
+               glamt(ji,jj) = glam0 + zim05 * ze1deg * zcos_alpha + zjm05 * ze1deg * zsin_alpha
+               gphit(ji,jj) = gphi0 - zim05 * ze1deg * zsin_alpha + zjm05 * ze1deg * zcos_alpha
+               !
+               glamu(ji,jj) = glam0 + zim1  * ze1deg * zcos_alpha + zjm05 * ze1deg * zsin_alpha
+               gphiu(ji,jj) = gphi0 - zim1  * ze1deg * zsin_alpha + zjm05 * ze1deg * zcos_alpha
+               !
+               glamv(ji,jj) = glam0 + zim05 * ze1deg * zcos_alpha + zjm1  * ze1deg * zsin_alpha
+               gphiv(ji,jj) = gphi0 - zim05 * ze1deg * zsin_alpha + zjm1  * ze1deg * zcos_alpha
+            END DO
+         END DO
+         !
          ! Horizontal scale factors (in meters)
          !                              ======
@@ -448,32 +439,34 @@
          e1v(:,:) =  ze1     ;      e2v(:,:) = ze1
          e1f(:,:) =  ze1     ;      e2f(:,:) = ze1
-
+         !
       CASE DEFAULT
          WRITE(ctmp1,*) '          bad flag value for jphgr_msh = ', jphgr_msh
          CALL ctl_stop( ctmp1 )
-
+         !
       END SELECT
       
-      ! T-cell surface
-      ! --------------
+      ! associated horizontal metrics
+      ! -----------------------------
+      !
+      r1_e1t (:,:) = 1._wp / e1t(:,:)   ;   r1_e2t (:,:) = 1._wp / e2t(:,:)
+      r1_e1u (:,:) = 1._wp / e1u(:,:)   ;   r1_e2u (:,:) = 1._wp / e2u(:,:)
+      r1_e1v (:,:) = 1._wp / e1v(:,:)   ;   r1_e2v (:,:) = 1._wp / e2v(:,:)
+      r1_e1f (:,:) = 1._wp / e1f(:,:)   ;   r1_e2f (:,:) = 1._wp / e2f(:,:)
+      !
       e1e2t(:,:) = e1t(:,:) * e2t(:,:)
-    
-      ! Useful shortcuts (JC: note the duplicated e2e2t array ! Need some cleaning)
-      ! ---------------------------------------------------------------------------
-      e12t    (:,:) = e1t(:,:) * e2t(:,:)
-      e12u    (:,:) = e1u(:,:) * e2u(:,:)
-      e12v    (:,:) = e1v(:,:) * e2v(:,:)
-      e12f    (:,:) = e1f(:,:) * e2f(:,:)
-      r1_e12t (:,:) = 1._wp    / e12t(:,:)
-      r1_e12u (:,:) = 1._wp    / e12u(:,:)
-      r1_e12v (:,:) = 1._wp    / e12v(:,:)
-      r1_e12f (:,:) = 1._wp    / e12f(:,:)
-      re2u_e1u(:,:) = e2u(:,:) / e1u(:,:)
-      re1v_e2v(:,:) = e1v(:,:) / e2v(:,:)
-
-      ! Control printing : Grid informations (if not restart)
-      ! ----------------
-
-      IF( lwp .AND. .NOT.ln_rstart ) THEN
+      e1e2u(:,:) = e1u(:,:) * e2u(:,:)
+      e1e2v(:,:) = e1v(:,:) * e2v(:,:)
+      e1e2f(:,:) = e1f(:,:) * e2f(:,:)
+      !   
+      r1_e1e2t (:,:) = 1._wp / e1e2t(:,:)
+      r1_e1e2u (:,:) = 1._wp / e1e2u(:,:)
+      r1_e1e2v (:,:) = 1._wp / e1e2v(:,:)
+      r1_e1e2f (:,:) = 1._wp / e1e2f(:,:)
+      !
+      e2_e1u(:,:) = e2u(:,:) / e1u(:,:)
+      e1_e2v(:,:) = e1v(:,:) / e2v(:,:)
+
+
+      IF( lwp .AND. .NOT.ln_rstart ) THEN      ! Control print : Grid informations (if not restart)
          WRITE(numout,*)
          WRITE(numout,*) '          longitude and e1 scale factors'
@@ -485,5 +478,5 @@
 9300     FORMAT( 1x, i4, f8.2,1x, f8.2,1x, f8.2,1x, f8.2, 1x,    &
             f19.10, 1x, f19.10, 1x, f19.10, 1x, f19.10 )
-         
+            !
          WRITE(numout,*)
          WRITE(numout,*) '          latitude and e2 scale factors'
@@ -495,17 +488,4 @@
       ENDIF
 
-      
-      IF( nprint == 1 .AND. lwp ) THEN
-         WRITE(numout,*) '          e1u e2u '
-         CALL prihre( e1u,jpi,jpj,jpi-5,jpi,1,jpj-5,jpj,1,0.,numout )
-         CALL prihre( e2u,jpi,jpj,jpi-5,jpi,1,jpj-5,jpj,1,0.,numout )
-         WRITE(numout,*) '          e1v e2v  '
-         CALL prihre( e1v,jpi,jpj,jpi-5,jpi,1,jpj-5,jpj,1,0.,numout )
-         CALL prihre( e2v,jpi,jpj,jpi-5,jpi,1,jpj-5,jpj,1,0.,numout )
-         WRITE(numout,*) '          e1f e2f  '
-         CALL prihre( e1f,jpi,jpj,jpi-5,jpi,1,jpj-5,jpj,1,0.,numout )
-         CALL prihre( e2f,jpi,jpj,jpi-5,jpi,1,jpj-5,jpj,1,0.,numout )
-      ENDIF
-
 
       ! ================= !
@@ -528,10 +508,10 @@
 
          zbeta   = 2. * omega * COS( rad * ppgphi0 ) / ra                       ! beta at latitude ppgphi0
-         zphi0   = ppgphi0 - FLOAT( jpjglo/2) * ppe2_m / ( ra * rad )           ! latitude of the first row F-points
+         zphi0   = ppgphi0 - REAL( jpjglo/2) * ppe2_m / ( ra * rad )           ! latitude of the first row F-points
          
 #if defined key_agrif
          IF ( cp_cfg == 'eel' .AND. jp_cfg == 6 ) THEN    ! for EEL6 configuration only
             IF( .NOT. Agrif_Root() ) THEN
-              zphi0 = ppgphi0 - FLOAT( Agrif_Parent(jpjglo)/2)*Agrif_Parent(ppe2_m) / (ra * rad)
+              zphi0 = ppgphi0 - REAL( Agrif_Parent(jpjglo)/2)*Agrif_Parent(ppe2_m) / (ra * rad)
             ENDIF
          ENDIF
@@ -584,5 +564,5 @@
 
       IF( nperio == 2 ) THEN
-         znorme = SQRT( SUM( gphiu(:,2) * gphiu(:,2) ) ) / FLOAT( jpi )
+         znorme = SQRT( SUM( gphiu(:,2) * gphiu(:,2) ) ) / REAL( jpi )
          IF( znorme > 1.e-13 ) CALL ctl_stop( ' ===>>>> : symmetrical condition: rerun with good equator line' )
       ENDIF
@@ -597,15 +577,12 @@
       !!              ***  ROUTINE hgr_read  ***
       !!
-      !! ** Purpose :   Read a coordinate file in NetCDF format 
-      !!
-      !! ** Method  :   The mesh file has been defined trough a analytical 
-      !!      or semi-analytical method. It is read in a NetCDF file. 
-      !!     
+      !! ** Purpose :   Read a coordinate file in NetCDF format using IOM
+      !!
       !!----------------------------------------------------------------------
       USE iom
-
+      !
       INTEGER ::   inum   ! temporary logical unit
       !!----------------------------------------------------------------------
-
+      !
       IF(lwp) THEN
          WRITE(numout,*)
@@ -613,30 +590,30 @@
          WRITE(numout,*) '~~~~~~~~      jpiglo = ', jpiglo, ' jpjglo = ', jpjglo, ' jpk = ', jpk
       ENDIF
-      
+      !
       CALL iom_open( 'coordinates', inum )
-      
+      !
       CALL iom_get( inum, jpdom_data, 'glamt', glamt )
       CALL iom_get( inum, jpdom_data, 'glamu', glamu )
       CALL iom_get( inum, jpdom_data, 'glamv', glamv )
       CALL iom_get( inum, jpdom_data, 'glamf', glamf )
-      
+      !
       CALL iom_get( inum, jpdom_data, 'gphit', gphit )
       CALL iom_get( inum, jpdom_data, 'gphiu', gphiu )
       CALL iom_get( inum, jpdom_data, 'gphiv', gphiv )
       CALL iom_get( inum, jpdom_data, 'gphif', gphif )
-      
+      !
       CALL iom_get( inum, jpdom_data, 'e1t', e1t )
       CALL iom_get( inum, jpdom_data, 'e1u', e1u )
       CALL iom_get( inum, jpdom_data, 'e1v', e1v )
       CALL iom_get( inum, jpdom_data, 'e1f', e1f )
-      
+      !
       CALL iom_get( inum, jpdom_data, 'e2t', e2t )
       CALL iom_get( inum, jpdom_data, 'e2u', e2u )
       CALL iom_get( inum, jpdom_data, 'e2v', e2v )
       CALL iom_get( inum, jpdom_data, 'e2f', e2f )
-      
+      !
       CALL iom_close( inum )
-      
-    END SUBROUTINE hgr_read
+      !
+   END SUBROUTINE hgr_read
     
    !!======================================================================
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 4616)
@@ -9,6 +9,5 @@
    !!                                          vvl option includes z_star and z_tilde coordinates
    !!----------------------------------------------------------------------
-   !!   'key_vvl'                              variable volume
-   !!----------------------------------------------------------------------
+
    !!----------------------------------------------------------------------
    !!   dom_vvl_init     : define initial vertical scale factors, depths and column thickness
@@ -18,8 +17,5 @@
    !!   dom_vvl_rst      : read/write restart file
    !!   dom_vvl_ctl      : Check the vvl options
-   !!   dom_vvl_orca_fix : Recompute some area-weighted interpolations of vertical scale factors 
-   !!                    : to account for manual changes to e[1,2][u,v] in some Straits 
    !!----------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers
    USE dom_oce         ! ocean space and time domain
@@ -36,32 +32,28 @@
    PRIVATE
 
-   !! * Routine accessibility
    PUBLIC  dom_vvl_init       ! called by domain.F90
    PUBLIC  dom_vvl_sf_nxt     ! called by step.F90
    PUBLIC  dom_vvl_sf_swp     ! called by step.F90
    PUBLIC  dom_vvl_interpol   ! called by dynnxt.F90
-   PRIVATE dom_vvl_orca_fix   ! called by dom_vvl_interpol
-
-   !!* Namelist nam_vvl
-   LOGICAL , PUBLIC                                      :: ln_vvl_zstar              ! zstar  vertical coordinate
-   LOGICAL , PUBLIC                                      :: ln_vvl_ztilde             ! ztilde vertical coordinate
-   LOGICAL , PUBLIC                                      :: ln_vvl_layer              ! level  vertical coordinate
-   LOGICAL , PUBLIC                                      :: ln_vvl_ztilde_as_zstar    ! ztilde vertical coordinate
-   LOGICAL , PUBLIC                                      :: ln_vvl_zstar_at_eqtor     ! ztilde vertical coordinate
-   LOGICAL , PUBLIC                                      :: ln_vvl_kepe               ! kinetic/potential energy transfer
-   !                                                                                           ! conservation: not used yet
-   REAL(wp)                                              :: rn_ahe3                   ! thickness diffusion coefficient
-   REAL(wp)                                              :: rn_rst_e3t                ! ztilde to zstar restoration timescale [days]
-   REAL(wp)                                              :: rn_lf_cutoff              ! cutoff frequency for low-pass filter  [days]
-   REAL(wp)                                              :: rn_zdef_max               ! maximum fractional e3t deformation
-   LOGICAL , PUBLIC                                      :: ln_vvl_dbg                ! debug control prints
-
-   !! * Module variables
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: un_td, vn_td                       ! thickness diffusion transport
-   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hdiv_lf                            ! low frequency part of hz divergence
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tilde_e3t_b, tilde_e3t_n           ! baroclinic scale factors
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tilde_e3t_a, dtilde_e3t_a          ! baroclinic scale factors
-   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: frq_rst_e3t                        ! retoring period for scale factors
-   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: frq_rst_hdv                        ! retoring period for low freq. divergence
+
+   !                                            !!* Namelist nam_vvl *
+   LOGICAL , PUBLIC :: ln_vvl_zstar              ! zstar  vertical coordinate
+   LOGICAL , PUBLIC :: ln_vvl_ztilde             ! ztilde vertical coordinate
+   LOGICAL , PUBLIC :: ln_vvl_layer              ! level  vertical coordinate
+   LOGICAL , PUBLIC :: ln_vvl_ztilde_as_zstar    ! ztilde vertical coordinate
+   LOGICAL , PUBLIC :: ln_vvl_zstar_at_eqtor     ! ztilde vertical coordinate
+   LOGICAL , PUBLIC :: ln_vvl_kepe               ! kinetic/potential energy transfer conservation: not used yet
+   REAL(wp)         :: rn_ahe3                   ! thickness diffusion coefficient
+   REAL(wp)         :: rn_rst_e3t                ! ztilde to zstar restoration timescale [days]
+   REAL(wp)         :: rn_lf_cutoff              ! cutoff frequency for low-pass filter  [days]
+   REAL(wp)         :: rn_zdef_max               ! maximum fractional e3t deformation
+   LOGICAL , PUBLIC :: ln_vvl_dbg                ! debug control prints
+
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   un_td, vn_td                ! thickness diffusion transport
+   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   hdiv_lf                     ! low frequency part of hz divergence
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tilde_e3t_b, tilde_e3t_n    ! baroclinic scale factors
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tilde_e3t_a, dtilde_e3t_a   ! baroclinic scale factors
+   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   frq_rst_e3t                 ! retoring period for scale factors
+   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   frq_rst_hdv                 ! retoring period for low freq. divergence
 
    !! * Substitutions
@@ -73,5 +65,4 @@
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
@@ -80,5 +71,5 @@
       !!                ***  FUNCTION dom_vvl_alloc  ***
       !!----------------------------------------------------------------------
-      IF( ln_vvl_zstar ) dom_vvl_alloc = 0
+      IF( ln_vvl_zstar )   dom_vvl_alloc = 0
       IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
          ALLOCATE( tilde_e3t_b(jpi,jpj,jpk)  , tilde_e3t_n(jpi,jpj,jpk) , tilde_e3t_a(jpi,jpj,jpk) ,   &
@@ -95,5 +86,5 @@
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
       ENDIF
-
+      !
    END FUNCTION dom_vvl_alloc
 
@@ -358,8 +349,8 @@
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
-                  un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * re2u_e1u(ji,jj) &
-                                  & * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj  ,jk) )
-                  vn_td(ji,jj,jk) = rn_ahe3 * vmask(ji,jj,jk) * re1v_e2v(ji,jj) & 
-                                  & * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji  ,jj+1,jk) )
+                  un_td(ji,jj,jk) = rn_ahe3 * umask(ji,jj,jk) * e2_e1u(ji,jj)    &
+                     &                      * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji+1,jj  ,jk) )
+                  vn_td(ji,jj,jk) = rn_ahe3 * vmask(ji,jj,jk) * e1_e2v(ji,jj)    & 
+                     &                      * ( tilde_e3t_b(ji,jj,jk) - tilde_e3t_b(ji  ,jj+1,jk) )
                   zwu(ji,jj) = zwu(ji,jj) + un_td(ji,jj,jk)
                   zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk)
@@ -380,5 +371,5 @@
                   tilde_e3t_a(ji,jj,jk) = tilde_e3t_a(ji,jj,jk) + (   un_td(ji-1,jj  ,jk) - un_td(ji,jj,jk)    &
                      &                                          +     vn_td(ji  ,jj-1,jk) - vn_td(ji,jj,jk)    &
-                     &                                            ) * r1_e12t(ji,jj)
+                     &                                            ) * r1_e1e2t(ji,jj)
                END DO
             END DO
@@ -671,10 +662,9 @@
       !!                - vertical interpolation: simple averaging
       !!----------------------------------------------------------------------
-      !! * Arguments
       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in    ) ::  pe3_in     ! input e3 to be interpolated
       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( inout ) ::  pe3_out    ! output interpolated e3
       CHARACTER(LEN=*), INTENT( in )                    ::  pout       ! grid point of out scale factors
       !                                                                !   =  'U', 'V', 'W, 'F', 'UW' or 'VW'
-      !! * Local declarations
+      !
       INTEGER ::   ji, jj, jk                                          ! dummy loop indices
       LOGICAL ::   l_is_orca                                           ! local logical
@@ -685,73 +675,65 @@
       IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) l_is_orca = .TRUE.      ! ORCA R2 configuration - will need to correct some locations
 
-      SELECT CASE ( pout )
-         !               ! ------------------------------------- !
-      CASE( 'U' )        ! interpolation from T-point to U-point !
-         !               ! ------------------------------------- !
-         ! horizontal surface weighted interpolation
-         DO jk = 1, jpk
+      SELECT CASE ( pout )    
+      !                             ! ------------------------------------- !
+      CASE( 'U' )                   ! interpolation from T-point to U-point !
+         !                          ! ------------------------------------- !
+         DO jk = 1, jpk                ! horizontal surface weighted interpolation
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
-                  pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * r1_e12u(ji,jj)                                   &
-                     &                       * (   e12t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) )     &
-                     &                           + e12t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) )
+                  pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * r1_e1e2u(ji,jj)                                   &
+                     &                       * (   e1e2t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) )     &
+                     &                           + e1e2t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) )
                END DO
             END DO
          END DO
-         !
-         IF( l_is_orca ) CALL dom_vvl_orca_fix( pe3_in, pe3_out, pout )
-         ! boundary conditions
-         CALL lbc_lnk( pe3_out(:,:,:), 'U', 1. )
+         CALL lbc_lnk( pe3_out(:,:,:), 'U', 1. )         ! boundary conditions
          pe3_out(:,:,:) = pe3_out(:,:,:) + e3u_0(:,:,:)
-         !               ! ------------------------------------- !
-      CASE( 'V' )        ! interpolation from T-point to V-point !
-         !               ! ------------------------------------- !
-         ! horizontal surface weighted interpolation
-         DO jk = 1, jpk
+         !
+         !                          ! ------------------------------------- !
+      CASE( 'V' )                   ! interpolation from T-point to V-point !
+         !                          ! ------------------------------------- !
+         DO jk = 1, jpk                ! horizontal surface weighted interpolation
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
-                  pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk) * r1_e12v(ji,jj)                                   &
-                     &                       * (   e12t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) )     &
-                     &                           + e12t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) )
+                  pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk) * r1_e1e2v(ji,jj)                                   &
+                     &                       * (   e1e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) )     &
+                     &                           + e1e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) )
                END DO
             END DO
          END DO
-         !
-         IF( l_is_orca ) CALL dom_vvl_orca_fix( pe3_in, pe3_out, pout )
-         ! boundary conditions
-         CALL lbc_lnk( pe3_out(:,:,:), 'V', 1. )
+         CALL lbc_lnk( pe3_out(:,:,:), 'V', 1. )         ! boundary conditions
          pe3_out(:,:,:) = pe3_out(:,:,:) + e3v_0(:,:,:)
-         !               ! ------------------------------------- !
-      CASE( 'F' )        ! interpolation from U-point to F-point !
-         !               ! ------------------------------------- !
-         ! horizontal surface weighted interpolation
-         DO jk = 1, jpk
+         !
+         !                          ! ------------------------------------- !
+      CASE( 'F' )                   ! interpolation from U-point to F-point !
+         !                          ! ------------------------------------- !
+         DO jk = 1, jpk                ! horizontal surface weighted interpolation
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
-                  pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk) * r1_e12f(ji,jj)               &
-                     &                       * (   e12u(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3u_0(ji,jj  ,jk) )     &
-                     &                           + e12u(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3u_0(ji,jj+1,jk) ) )
+                  pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk) * r1_e1e2f(ji,jj)               &
+                     &                       * (   e1e2u(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3u_0(ji,jj  ,jk) )     &
+                     &                           + e1e2u(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3u_0(ji,jj+1,jk) ) )
                END DO
             END DO
          END DO
-         !
-         IF( l_is_orca ) CALL dom_vvl_orca_fix( pe3_in, pe3_out, pout )
          ! boundary conditions
          CALL lbc_lnk( pe3_out(:,:,:), 'F', 1. )
          pe3_out(:,:,:) = pe3_out(:,:,:) + e3f_0(:,:,:)
-         !               ! ------------------------------------- !
-      CASE( 'W' )        ! interpolation from T-point to W-point !
-         !               ! ------------------------------------- !
-         ! vertical simple interpolation
+         !
+         !                          ! ------------------------------------- !
+      CASE( 'W' )                   ! interpolation from T-point to W-point !
+         !                          ! ------------------------------------- !
+         !                             ! vertical simple interpolation
          pe3_out(:,:,1) = e3w_0(:,:,1) + pe3_in(:,:,1) - e3t_0(:,:,1)
-         ! - ML - The use of mask in this formaula enables the special treatment of the last w- point without indirect adressing
+         ! - ML - The use of mask in this formaula enables the special treatment of the last w-point without indirect adressing
          DO jk = 2, jpk
             pe3_out(:,:,jk) = e3w_0(:,:,jk) + ( 1.0_wp - 0.5_wp * tmask(:,:,jk) ) * ( pe3_in(:,:,jk-1) - e3t_0(:,:,jk-1) )   &
                &                            +            0.5_wp * tmask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3t_0(:,:,jk  ) )
          END DO
-         !               ! -------------------------------------- !
-      CASE( 'UW' )       ! interpolation from U-point to UW-point !
-         !               ! -------------------------------------- !
-         ! vertical simple interpolation
+         !                          ! -------------------------------------- !
+      CASE( 'UW' )                  ! interpolation from U-point to UW-point !
+         !                          ! -------------------------------------- !
+         !                             ! vertical simple interpolation
          pe3_out(:,:,1) = e3uw_0(:,:,1) + pe3_in(:,:,1) - e3u_0(:,:,1)
          ! - ML - The use of mask in this formaula enables the special treatment of the last w- point without indirect adressing
@@ -760,8 +742,8 @@
                &                             +            0.5_wp * umask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3u_0(:,:,jk  ) )
          END DO
-         !               ! -------------------------------------- !
-      CASE( 'VW' )       ! interpolation from V-point to VW-point !
-         !               ! -------------------------------------- !
-         ! vertical simple interpolation
+         !                          ! -------------------------------------- !
+      CASE( 'VW' )                  ! interpolation from V-point to VW-point !
+         !                          ! -------------------------------------- !
+         !                             ! vertical simple interpolation
          pe3_out(:,:,1) = e3vw_0(:,:,1) + pe3_in(:,:,1) - e3v_0(:,:,1)
          ! - ML - The use of mask in this formaula enables the special treatment of the last w- point without indirect adressing
@@ -770,10 +752,11 @@
                &                             +            0.5_wp * vmask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3v_0(:,:,jk  ) )
          END DO
+         !
       END SELECT
       !
-
       IF( nn_timing == 1 )  CALL timing_stop('dom_vvl_interpol')
-
+      !
    END SUBROUTINE dom_vvl_interpol
+
 
    SUBROUTINE dom_vvl_rst( kt, cdrw )
@@ -982,387 +965,4 @@
    END SUBROUTINE dom_vvl_ctl
 
-   SUBROUTINE dom_vvl_orca_fix( pe3_in, pe3_out, pout )
-      !!---------------------------------------------------------------------
-      !!                   ***  ROUTINE dom_vvl_orca_fix  ***
-      !!                     
-      !! ** Purpose :   Correct surface weighted, horizontally interpolated, 
-      !!                scale factors at locations that have been individually
-      !!                modified in domhgr. Such modifications break the
-      !!                relationship between e12t and e1u*e2u etc.
-      !!                Recompute some scale factors ignoring the modified metric.
-      !!----------------------------------------------------------------------
-      !! * Arguments
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in    ) ::  pe3_in     ! input e3 to be interpolated
-      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( inout ) ::  pe3_out    ! output interpolated e3
-      CHARACTER(LEN=*), INTENT( in )                    ::  pout       ! grid point of out scale factors
-      !                                                                !   =  'U', 'V', 'W, 'F', 'UW' or 'VW'
-      !! * Local declarations
-      INTEGER ::   ji, jj, jk                                          ! dummy loop indices
-      INTEGER ::   ij0, ij1, ii0, ii1                                  ! dummy loop indices
-      !! acc
-      !! Hmm with the time splitting these "fixes" seem to do more harm than good. Temporarily disabled for
-      !! the ORCA2 tests (by changing jp_cfg test from 2 to 3) pending further investigations
-      !! 
-      !                                                ! =====================
-      IF( cp_cfg == "orca" .AND. jp_cfg == 3 ) THEN    ! ORCA R2 configuration
-         !                                             ! =====================
-      !! acc
-         IF( nn_cla == 0 ) THEN
-            !
-            ii0 = 139   ;   ii1 = 140        ! Gibraltar Strait (e2u was modified)
-            ij0 = 102   ;   ij1 = 102
-            DO jk = 1, jpkm1
-               DO jj = mj0(ij0), mj1(ij1)
-                  DO ji = mi0(ii0), mi1(ii1)
-                     SELECT CASE ( pout )
-                     CASE( 'U' )
-                        pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &
-                       &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                       &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                       &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                     CASE( 'F' )
-                        pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &
-                       &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                       &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                       &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                     END SELECT
-                  END DO
-               END DO
-            END DO
-            !
-            ii0 = 160   ;   ii1 = 160        ! Bab el Mandeb (e2u and e1v were modified)
-            ij0 =  88   ;   ij1 =  88
-            DO jk = 1, jpkm1
-               DO jj = mj0(ij0), mj1(ij1)
-                  DO ji = mi0(ii0), mi1(ii1)
-                     SELECT CASE ( pout )
-                     CASE( 'U' )
-                        pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &
-                       &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                       &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                       &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                     CASE( 'V' )
-                        pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk)                                        &
-                       &                    * (   e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) ) &
-                       &                    +     e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) &
-                       &                      ) / e2v(ji,jj)   +   e3v_0(ji,jj,jk)
-                     CASE( 'F' )
-                        pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &
-                       &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                       &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                       &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                     END SELECT
-                  END DO
-               END DO
-            END DO
-         ENDIF
-
-         ii0 = 145   ;   ii1 = 146        ! Danish Straits (e2u was modified)
-         ij0 = 116   ;   ij1 = 116
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'U' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &
-                    &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                    &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                    &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                  CASE( 'F' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &
-                    &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                    &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                    &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-      ENDIF
-      !
-         !                                             ! =====================
-      IF( cp_cfg == "orca" .AND. jp_cfg == 1 ) THEN    ! ORCA R1 configuration
-         !                                             ! =====================
-         !
-         ii0 = 281   ;   ii1 = 282        ! Gibraltar Strait (e2u was modified)
-         ij0 = 200   ;   ij1 = 200
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'U' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &
-                    &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                    &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                    &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                  CASE( 'F' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &
-                    &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                    &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                    &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 = 314   ;   ii1 = 315        ! Bhosporus Strait (e2u was modified)
-         ij0 = 208   ;   ij1 = 208
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'U' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &  
-                    &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                    &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                    &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                  CASE( 'F' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &  
-                    &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                    &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                    &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 =  44   ;   ii1 =  44        ! Lombok Strait (e1v was modified)
-         ij0 = 124   ;   ij1 = 125
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'V' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk)                                        &
-                    &                    * (   e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) ) &
-                    &                    +     e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) &
-                    &                      ) / e2v(ji,jj)   +   e3v_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 =  48   ;   ii1 =  48        ! Sumba Strait (e1v was modified) [closed from bathy_11 on]
-         ij0 = 124   ;   ij1 = 125
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'V' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk)                                        &
-                    &                    * (   e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) ) &
-                    &                    +     e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) &
-                    &                      ) / e2v(ji,jj)   +   e3v_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 =  53   ;   ii1 =  53        ! Ombai Strait (e1v was modified)
-         ij0 = 124   ;   ij1 = 125
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'V' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk)                                        &
-                    &                    * (   e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) ) &
-                    &                    +     e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) &
-                    &                      ) / e2v(ji,jj)   +   e3v_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 =  56   ;   ii1 =  56        ! Timor Passage (e1v was modified)
-         ij0 = 124   ;   ij1 = 125
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'V' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk)                                        &
-                    &                    * (   e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) ) &
-                    &                    +     e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) &
-                    &                      ) / e2v(ji,jj)   +   e3v_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 =  55   ;   ii1 =  55        ! West Halmahera Strait (e1v was modified)
-         ij0 = 141   ;   ij1 = 142
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'V' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk)                                        &
-                    &                    * (   e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) ) &
-                    &                    +     e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) &
-                    &                      ) / e2v(ji,jj)   +   e3v_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 =  58   ;   ii1 =  58        ! East Halmahera Strait (e1v was modified)
-         ij0 = 141   ;   ij1 = 142
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'V' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk)                                        &
-                    &                    * (   e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) ) &
-                    &                    +     e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) &
-                    &                      ) / e2v(ji,jj)   +   e3v_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-      ENDIF
-         !                                             ! =====================
-      IF( cp_cfg == "orca" .AND. jp_cfg == 05 ) THEN   ! ORCA R05 configuration
-         !                                             ! =====================
-         !
-         ii0 = 563   ;   ii1 = 564        ! Gibraltar Strait (e2u was modified)
-         ij0 = 327   ;   ij1 = 327
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'U' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &
-                    &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                    &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                    &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                  CASE( 'F' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &
-                    &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                    &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                    &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 = 627   ;   ii1 = 628        ! Bosphorus Strait (e2u was modified)
-         ij0 = 343   ;   ij1 = 343
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'U' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &  
-                    &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                    &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                    &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                  CASE( 'F' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &  
-                    &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                    &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                    &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 =  93   ;   ii1 =  94        ! Sumba Strait (e2u was modified)
-         ij0 = 232   ;   ij1 = 232
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'U' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &
-                    &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                    &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                    &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                  CASE( 'F' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &
-                    &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                    &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                    &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 = 103   ;   ii1 = 103        ! Ombai Strait (e2u was modified)
-         ij0 = 232   ;   ij1 = 232
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'U' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &
-                    &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                    &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                    &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                  CASE( 'F' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &
-                    &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                    &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                    &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 =  15   ;   ii1 =  15        ! Palk Strait (e2u was modified)
-         ij0 = 270   ;   ij1 = 270
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'U' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk)                                        &
-                    &                    * (   e1t(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3t_0(ji  ,jj,jk) ) &
-                    &                    +     e1t(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3t_0(ji+1,jj,jk) ) &
-                    &                      ) / e1u(ji,jj)   +   e3u_0(ji,jj,jk)
-                  CASE( 'F' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * umask(ji,jj,jk) * umask(ji,jj+1,jk)                    &
-                    &                    * (   e1u(ji  ,jj) * ( pe3_in(ji  ,jj,jk) - e3u_0(ji  ,jj,jk) ) &
-                    &                    +     e1u(ji+1,jj) * ( pe3_in(ji+1,jj,jk) - e3u_0(ji+1,jj,jk) ) &
-                    &                      ) / e1f(ji,jj)   +   e3f_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 =  87   ;   ii1 =  87        ! Lombok Strait (e1v was modified)
-         ij0 = 232   ;   ij1 = 233
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'V' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk)                                        &
-                    &                    * (   e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) ) &
-                    &                    +     e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) &
-                    &                      ) / e2v(ji,jj)   +   e3v_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-         !
-         ii0 = 662   ;   ii1 = 662        ! Bab el Mandeb (e1v was modified)
-         ij0 = 276   ;   ij1 = 276
-         DO jk = 1, jpkm1
-            DO jj = mj0(ij0), mj1(ij1)
-               DO ji = mi0(ii0), mi1(ii1)
-                  SELECT CASE ( pout )
-                  CASE( 'V' )
-                     pe3_out(ji,jj,jk) = 0.5_wp * vmask(ji,jj,jk)                                        &
-                    &                    * (   e2t(ji,jj  ) * ( pe3_in(ji,jj  ,jk) - e3t_0(ji,jj  ,jk) ) &
-                    &                    +     e2t(ji,jj+1) * ( pe3_in(ji,jj+1,jk) - e3t_0(ji,jj+1,jk) ) &
-                    &                      ) / e2v(ji,jj)   +   e3v_0(ji,jj,jk)
-                  END SELECT
-               END DO
-            END DO
-         END DO
-      ENDIF
-   END SUBROUTINE dom_vvl_orca_fix
-
    !!======================================================================
 END MODULE domvvl
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 4616)
@@ -485,16 +485,16 @@
                zmsv = 1. / MAX(  umask(ji-1,jj+1,jk) + umask(ji  ,jj+1,jk)   &
                                + umask(ji-1,jj  ,jk) + umask(ji  ,jj  ,jk) , 1.  )
-               zphv = ( zprn(ji  ,jj+1,jk) - zprn(ji-1,jj+1,jk) ) * umask(ji-1,jj+1,jk) / e1u(ji-1,jj+1)   &
-                    + ( zprn(ji+1,jj+1,jk) - zprn(ji  ,jj+1,jk) ) * umask(ji  ,jj+1,jk) / e1u(ji  ,jj+1)   &
-                    + ( zprn(ji  ,jj  ,jk) - zprn(ji-1,jj  ,jk) ) * umask(ji-1,jj  ,jk) / e1u(ji-1,jj  )   &
-                    + ( zprn(ji+1,jj  ,jk) - zprn(ji  ,jj  ,jk) ) * umask(ji  ,jj  ,jk) / e1u(ji  ,jj  )
+               zphv = ( zprn(ji  ,jj+1,jk) - zprn(ji-1,jj+1,jk) ) * umask(ji-1,jj+1,jk) * r1_e1u(ji-1,jj+1)   &
+                    + ( zprn(ji+1,jj+1,jk) - zprn(ji  ,jj+1,jk) ) * umask(ji  ,jj+1,jk) * r1_e1u(ji  ,jj+1)   &
+                    + ( zprn(ji  ,jj  ,jk) - zprn(ji-1,jj  ,jk) ) * umask(ji-1,jj  ,jk) * r1_e1u(ji-1,jj  )   &
+                    + ( zprn(ji+1,jj  ,jk) - zprn(ji  ,jj  ,jk) ) * umask(ji  ,jj  ,jk) * r1_e1u(ji  ,jj  )
                zphv = 1. / rau0 * zphv * zmsv * vmask(ji,jj,jk)
 
                zmsu = 1. / MAX(  vmask(ji+1,jj  ,jk) + vmask(ji  ,jj  ,jk)   &
                                + vmask(ji+1,jj-1,jk) + vmask(ji  ,jj-1,jk) , 1.  )
-               zphu = ( zprn(ji+1,jj+1,jk) - zprn(ji+1,jj  ,jk) ) * vmask(ji+1,jj  ,jk) / e2v(ji+1,jj  )   &
-                    + ( zprn(ji  ,jj+1,jk) - zprn(ji  ,jj  ,jk) ) * vmask(ji  ,jj  ,jk) / e2v(ji  ,jj  )   &
-                    + ( zprn(ji+1,jj  ,jk) - zprn(ji+1,jj-1,jk) ) * vmask(ji+1,jj-1,jk) / e2v(ji+1,jj-1)   &
-                    + ( zprn(ji  ,jj  ,jk) - zprn(ji  ,jj-1,jk) ) * vmask(ji  ,jj-1,jk) / e2v(ji  ,jj-1)
+               zphu = ( zprn(ji+1,jj+1,jk) - zprn(ji+1,jj  ,jk) ) * vmask(ji+1,jj  ,jk) * r1_e2v(ji+1,jj  )   &
+                    + ( zprn(ji  ,jj+1,jk) - zprn(ji  ,jj  ,jk) ) * vmask(ji  ,jj  ,jk) * r1_e2v(ji  ,jj  )   &
+                    + ( zprn(ji+1,jj  ,jk) - zprn(ji+1,jj-1,jk) ) * vmask(ji+1,jj-1,jk) * r1_e2v(ji+1,jj-1)   &
+                    + ( zprn(ji  ,jj  ,jk) - zprn(ji  ,jj-1,jk) ) * vmask(ji  ,jj-1,jk) * r1_e2v(ji  ,jj-1)
                zphu = 1. / rau0 * zphu * zmsu * umask(ji,jj,jk)
 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/divhor.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/divhor.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/divhor.F90	(revision 4616)
@@ -57,5 +57,5 @@
       !!
       !! ** Method  :   the now divergence is computed as :
-      !!         hdivn = 1/(e1t*e2t*e3t) ( di[e2u*e3u un] + dj[e1v*e3v vn] )
+      !!         hdivn = 1/(e1e2t*e3t) ( di[e2u*e3u un] + dj[e1v*e3v vn] )
       !!      and correct with runoff inflow (div_rnf) and cross land flow (div_cla) 
       !!
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_cen2.F90	(revision 4616)
@@ -52,5 +52,4 @@
       !
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
-      REAL(wp) ::   zbu, zbv     ! local scalars
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zfu_t, zfv_t, zfu_f, zfv_f, zfu_uw, zfv_vw, zfw
       REAL(wp), POINTER, DIMENSION(:,:,:) ::  zfu, zfv
@@ -89,11 +88,8 @@
          DO jj = 2, jpjm1                          ! divergence of horizontal momentum fluxes
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zbu = e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk)
-               zbv = e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk)
-               !
                ua(ji,jj,jk) = ua(ji,jj,jk) - (  zfu_t(ji+1,jj  ,jk) - zfu_t(ji  ,jj  ,jk)    &
-                  &                           + zfv_f(ji  ,jj  ,jk) - zfv_f(ji  ,jj-1,jk)  ) / zbu
+                  &                           + zfv_f(ji  ,jj  ,jk) - zfv_f(ji  ,jj-1,jk)  ) / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
                va(ji,jj,jk) = va(ji,jj,jk) - (  zfu_f(ji  ,jj  ,jk) - zfu_f(ji-1,jj  ,jk)    &
-                  &                           + zfv_t(ji  ,jj+1,jk) - zfv_t(ji  ,jj  ,jk)  ) / zbv
+                  &                           + zfv_t(ji  ,jj+1,jk) - zfv_t(ji  ,jj  ,jk)  ) / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
             END DO
          END DO
@@ -113,5 +109,5 @@
       DO jk = 1, jpkm1                       ! ==================== !
          !                                         ! Vertical volume fluxesÊ
-         zfw(:,:,jk) = 0.25 * e1t(:,:) * e2t(:,:) * wn(:,:,jk)
+         zfw(:,:,jk) = 0.25 * e1e2t(:,:) * wn(:,:,jk)
          !
          IF( jk == 1 ) THEN                        ! surface/bottom advective fluxes                   
@@ -143,7 +139,7 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ua(ji,jj,jk) =  ua(ji,jj,jk) - ( zfu_uw(ji,jj,jk) - zfu_uw(ji,jj,jk+1) )    &
-                  &  / ( e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  &  / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
                va(ji,jj,jk) =  va(ji,jj,jk) - ( zfv_vw(ji,jj,jk) - zfv_vw(ji,jj,jk+1) )    &
-                  &  / ( e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  &  / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv_ubs.F90	(revision 4616)
@@ -183,6 +183,6 @@
          DO jj = 2, jpjm1                          ! divergence of horizontal momentum fluxes
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zbu = e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk)
-               zbv = e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk)
+               zbu = e1e2u(ji,jj) * fse3u(ji,jj,jk)
+               zbv = e1e2v(ji,jj) * fse3v(ji,jj,jk)
                !
                ua(ji,jj,jk) = ua(ji,jj,jk) - (  zfu_t(ji+1,jj  ,jk) - zfu_t(ji  ,jj  ,jk)    &
@@ -205,5 +205,5 @@
       DO jk = 1, jpkm1                       ! ==================== !
          !                                         ! Vertical volume fluxesÊ
-         zfw(:,:,jk) = 0.25 * e1t(:,:) * e2t(:,:) * wn(:,:,jk)
+         zfw(:,:,jk) = 0.25 * e1e2t(:,:) * wn(:,:,jk)
          !
          IF( jk == 1 ) THEN                        ! surface/bottom advective fluxes                   
@@ -235,7 +235,7 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ua(ji,jj,jk) =  ua(ji,jj,jk) - ( zfu_uw(ji,jj,jk) - zfu_uw(ji,jj,jk+1) )    &
-                  &  / ( e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  &  / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
                va(ji,jj,jk) =  va(ji,jj,jk) - ( zfv_vw(ji,jj,jk) - zfv_vw(ji,jj,jk+1) )    &
-                  &  / ( e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  &  / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynbfr.F90	(revision 4616)
@@ -33,5 +33,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -69,11 +69,6 @@
 
 
-# if defined key_vectopt_loop
-        DO jj = 1, 1
-           DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
-# else
         DO jj = 2, jpjm1
            DO ji = 2, jpim1
-# endif
               ikbu = mbku(ji,jj)          ! deepest ocean u- & v-levels
               ikbv = mbkv(ji,jj)
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 4616)
@@ -60,5 +60,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -217,6 +217,6 @@
             zcoef1 = zcoef0 * fse3w(ji,jj,1)
             ! hydrostatic pressure gradient
-            zhpi(ji,jj,1) = zcoef1 * ( rhd(ji+1,jj,1) - rhd(ji,jj,1) ) / e1u(ji,jj)
-            zhpj(ji,jj,1) = zcoef1 * ( rhd(ji,jj+1,1) - rhd(ji,jj,1) ) / e2v(ji,jj)
+            zhpi(ji,jj,1) = zcoef1 * ( rhd(ji+1,jj,1) - rhd(ji,jj,1) ) * r1_e1u(ji,jj)
+            zhpj(ji,jj,1) = zcoef1 * ( rhd(ji,jj+1,1) - rhd(ji,jj,1) ) * r1_e2v(ji,jj)
             ! add to the general momentum trend
             ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1)
@@ -234,9 +234,9 @@
                zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1)   &
                   &           + zcoef1 * (  ( rhd(ji+1,jj,jk)+rhd(ji+1,jj,jk-1) )   &
-                  &                       - ( rhd(ji  ,jj,jk)+rhd(ji  ,jj,jk-1) )  ) / e1u(ji,jj)
+                  &                       - ( rhd(ji  ,jj,jk)+rhd(ji  ,jj,jk-1) )  ) * r1_e1u(ji,jj)
 
                zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1)   &
                   &           + zcoef1 * (  ( rhd(ji,jj+1,jk)+rhd(ji,jj+1,jk-1) )   &
-                  &                       - ( rhd(ji,jj,  jk)+rhd(ji,jj  ,jk-1) )  ) / e2v(ji,jj)
+                  &                       - ( rhd(ji,jj,  jk)+rhd(ji,jj  ,jk-1) )  ) * r1_e2v(ji,jj)
                ! add to the general momentum trend
                ua(ji,jj,jk) = ua(ji,jj,jk) + zhpi(ji,jj,jk)
@@ -284,6 +284,6 @@
             zcoef1 = zcoef0 * fse3w(ji,jj,1)
             ! hydrostatic pressure gradient
-            zhpi(ji,jj,1) = zcoef1 * ( rhd(ji+1,jj  ,1) - rhd(ji,jj,1) ) / e1u(ji,jj)
-            zhpj(ji,jj,1) = zcoef1 * ( rhd(ji  ,jj+1,1) - rhd(ji,jj,1) ) / e2v(ji,jj)
+            zhpi(ji,jj,1) = zcoef1 * ( rhd(ji+1,jj  ,1) - rhd(ji,jj,1) ) * r1_e1u(ji,jj)
+            zhpj(ji,jj,1) = zcoef1 * ( rhd(ji  ,jj+1,1) - rhd(ji,jj,1) ) * r1_e2v(ji,jj)
             ! add to the general momentum trend
             ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1)
@@ -300,10 +300,10 @@
                ! hydrostatic pressure gradient
                zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1)   &
-                  &           + zcoef1 * (  ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) )   &
-                  &                       - ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) )  ) / e1u(ji,jj)
+                  &           + zcoef1 * (  ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) )    &
+                  &                       - ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) )  ) * r1_e1u(ji,jj)
 
                zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1)   &
-                  &           + zcoef1 * (  ( rhd(ji,jj+1,jk) + rhd(ji,jj+1,jk-1) )   &
-                  &                       - ( rhd(ji,jj,  jk) + rhd(ji,jj  ,jk-1) )  ) / e2v(ji,jj)
+                  &           + zcoef1 * (  ( rhd(ji,jj+1,jk) + rhd(ji,jj+1,jk-1) )    &
+                  &                       - ( rhd(ji,jj,  jk) + rhd(ji,jj  ,jk-1) )  ) * r1_e2v(ji,jj)
                ! add to the general momentum trend
                ua(ji,jj,jk) = ua(ji,jj,jk) + zhpi(ji,jj,jk)
@@ -315,11 +315,6 @@
 
       ! partial steps correction at the last level  (use gru & grv computed in zpshde.F90)
-# if defined key_vectopt_loop
-         jj = 1
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
-# else
       DO jj = 2, jpjm1
          DO ji = 2, jpim1
-# endif
             iku = mbku(ji,jj)
             ikv = mbkv(ji,jj)
@@ -329,5 +324,5 @@
                ua  (ji,jj,iku) = ua(ji,jj,iku) - zhpi(ji,jj,iku)         ! subtract old value
                zhpi(ji,jj,iku) = zhpi(ji,jj,iku-1)                   &   ! compute the new one
-                  &            + zcoef2 * ( rhd(ji+1,jj,iku-1) - rhd(ji,jj,iku-1) + gru(ji,jj) ) / e1u(ji,jj)
+                  &            + zcoef2 * ( rhd(ji+1,jj,iku-1) - rhd(ji,jj,iku-1) + gru(ji,jj) ) * r1_e1u(ji,jj)
                ua  (ji,jj,iku) = ua(ji,jj,iku) + zhpi(ji,jj,iku)         ! add the new one to the general momentum trend
             ENDIF
@@ -335,10 +330,8 @@
                va  (ji,jj,ikv) = va(ji,jj,ikv) - zhpj(ji,jj,ikv)         ! subtract old value
                zhpj(ji,jj,ikv) = zhpj(ji,jj,ikv-1)                   &   ! compute the new one
-                  &            + zcoef3 * ( rhd(ji,jj+1,ikv-1) - rhd(ji,jj,ikv-1) + grv(ji,jj) ) / e2v(ji,jj)
+                  &            + zcoef3 * ( rhd(ji,jj+1,ikv-1) - rhd(ji,jj,ikv-1) + grv(ji,jj) ) * r1_e2v(ji,jj)
                va  (ji,jj,ikv) = va(ji,jj,ikv) + zhpj(ji,jj,ikv)         ! add the new one to the general momentum trend
             ENDIF
-# if ! defined key_vectopt_loop
-         END DO
-# endif
+         END DO
       END DO
       !
@@ -392,13 +385,13 @@
          DO ji = fs_2, fs_jpim1   ! vector opt.
             ! hydrostatic pressure gradient along s-surfaces
-            zhpi(ji,jj,1) = zcoef0 / e1u(ji,jj) * ( fse3w(ji+1,jj  ,1) * ( znad + rhd(ji+1,jj  ,1) )   &
-               &                                  - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
-            zhpj(ji,jj,1) = zcoef0 / e2v(ji,jj) * ( fse3w(ji  ,jj+1,1) * ( znad + rhd(ji  ,jj+1,1) )   &
-               &                                  - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
+            zhpi(ji,jj,1) = zcoef0 * r1_e1u(ji,jj) * ( fse3w(ji+1,jj  ,1) * ( znad + rhd(ji+1,jj  ,1) )   &
+               &                                     - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
+            zhpj(ji,jj,1) = zcoef0 * r1_e2v(ji,jj) * ( fse3w(ji  ,jj+1,1) * ( znad + rhd(ji  ,jj+1,1) )   &
+               &                                     - fse3w(ji  ,jj  ,1) * ( znad + rhd(ji  ,jj  ,1) ) )
             ! s-coordinate pressure gradient correction
             zuap = -zcoef0 * ( rhd   (ji+1,jj,1) + rhd   (ji,jj,1) + 2._wp * znad )   &
-               &           * ( fsde3w(ji+1,jj,1) - fsde3w(ji,jj,1) ) / e1u(ji,jj)
+               &           * ( fsde3w(ji+1,jj,1) - fsde3w(ji,jj,1) ) * r1_e1u(ji,jj)
             zvap = -zcoef0 * ( rhd   (ji,jj+1,1) + rhd   (ji,jj,1) + 2._wp * znad )   &
-               &           * ( fsde3w(ji,jj+1,1) - fsde3w(ji,jj,1) ) / e2v(ji,jj)
+               &           * ( fsde3w(ji,jj+1,1) - fsde3w(ji,jj,1) ) * r1_e2v(ji,jj)
             ! add to the general momentum trend
             ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1) + zuap
@@ -406,4 +399,8 @@
          END DO
       END DO
+
+!!gm
+!!gm Idea of optimization here : only divide by e1u and e2v  when apply to ua, va ....
+!!gm
 
       ! interior value (2=<jk=<jpkm1)
@@ -412,15 +409,15 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ! hydrostatic pressure gradient along s-surfaces
-               zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) + zcoef0 / e1u(ji,jj)   &
+               zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1) + zcoef0 * r1_e1u(ji,jj)   &
                   &           * (  fse3w(ji+1,jj,jk) * ( rhd(ji+1,jj,jk) + rhd(ji+1,jj,jk-1) + 2*znad )   &
                   &              - fse3w(ji  ,jj,jk) * ( rhd(ji  ,jj,jk) + rhd(ji  ,jj,jk-1) + 2*znad )  )
-               zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1) + zcoef0 / e2v(ji,jj)   &
+               zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1) + zcoef0 * r1_e2v(ji,jj)   &
                   &           * (  fse3w(ji,jj+1,jk) * ( rhd(ji,jj+1,jk) + rhd(ji,jj+1,jk-1) + 2*znad )   &
                   &              - fse3w(ji,jj  ,jk) * ( rhd(ji,jj,  jk) + rhd(ji,jj  ,jk-1) + 2*znad )  )
                ! s-coordinate pressure gradient correction
                zuap = -zcoef0 * ( rhd   (ji+1,jj  ,jk) + rhd   (ji,jj,jk) + 2._wp * znad )   &
-                  &           * ( fsde3w(ji+1,jj  ,jk) - fsde3w(ji,jj,jk) ) / e1u(ji,jj)
+                  &           * ( fsde3w(ji+1,jj  ,jk) - fsde3w(ji,jj,jk) ) * r1_e1u(ji,jj)
                zvap = -zcoef0 * ( rhd   (ji  ,jj+1,jk) + rhd   (ji,jj,jk) + 2._wp * znad )   &
-                  &           * ( fsde3w(ji  ,jj+1,jk) - fsde3w(ji,jj,jk) ) / e2v(ji,jj)
+                  &           * ( fsde3w(ji  ,jj+1,jk) - fsde3w(ji,jj,jk) ) * r1_e2v(ji,jj)
                ! add to the general momentum trend
                ua(ji,jj,jk) = ua(ji,jj,jk) + zhpi(ji,jj,jk) + zuap
@@ -625,6 +622,6 @@
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
-            zhpi(ji,jj,1) = ( rho_k(ji+1,jj  ,1) - rho_k(ji,jj,1) - rho_i(ji,jj,1) ) / e1u(ji,jj)
-            zhpj(ji,jj,1) = ( rho_k(ji  ,jj+1,1) - rho_k(ji,jj,1) - rho_j(ji,jj,1) ) / e2v(ji,jj)
+            zhpi(ji,jj,1) = ( rho_k(ji+1,jj  ,1) - rho_k(ji,jj,1) - rho_i(ji,jj,1) ) * r1_e1u(ji,jj)
+            zhpj(ji,jj,1) = ( rho_k(ji  ,jj+1,1) - rho_k(ji,jj,1) - rho_j(ji,jj,1) ) * r1_e2v(ji,jj)
             ! add to the general momentum trend
             ua(ji,jj,1) = ua(ji,jj,1) + zhpi(ji,jj,1)
@@ -642,8 +639,8 @@
                zhpi(ji,jj,jk) = zhpi(ji,jj,jk-1)                                &
                   &           + (  ( rho_k(ji+1,jj,jk) - rho_k(ji,jj,jk  ) )    &
-                  &              - ( rho_i(ji  ,jj,jk) - rho_i(ji,jj,jk-1) )  ) / e1u(ji,jj)
+                  &              - ( rho_i(ji  ,jj,jk) - rho_i(ji,jj,jk-1) )  ) * r1_e1u(ji,jj)
                zhpj(ji,jj,jk) = zhpj(ji,jj,jk-1)                                &
                   &           + (  ( rho_k(ji,jj+1,jk) - rho_k(ji,jj,jk  ) )    &
-                  &               -( rho_j(ji,jj  ,jk) - rho_j(ji,jj,jk-1) )  ) / e2v(ji,jj)
+                  &               -( rho_j(ji,jj  ,jk) - rho_j(ji,jj,jk-1) )  ) * r1_e2v(ji,jj)
                ! add to the general momentum trend
                ua(ji,jj,jk) = ua(ji,jj,jk) + zhpi(ji,jj,jk)
@@ -853,14 +850,15 @@
                ! update the momentum trends in u direction
 
-               zdpdx1 = zcoef0 / e1u(ji,jj) * (zhpi(ji+1,jj,jk) - zhpi(ji,jj,jk))
+               zdpdx1 = zcoef0 * r1_e1u(ji,jj) * (zhpi(ji+1,jj,jk) - zhpi(ji,jj,jk))
                IF( lk_vvl ) THEN
-                 zdpdx2 = zcoef0 / e1u(ji,jj) * &
+                 zdpdx2 = zcoef0 * r1_e1u(ji,jj) * &
                          ( REAL(jis-jid, wp) * (zpwes + zpwed) + (sshn(ji+1,jj)-sshn(ji,jj)) )
                 ELSE
-                 zdpdx2 = zcoef0 / e1u(ji,jj) * REAL(jis-jid, wp) * (zpwes + zpwed)
+                 zdpdx2 = zcoef0 * r1_e1u(ji,jj) * REAL(jis-jid, wp) * (zpwes + zpwed)
                ENDIF
 
                ua(ji,jj,jk) = ua(ji,jj,jk) + (zdpdx1 + zdpdx2) * &
                &           umask(ji,jj,jk) * tmask(ji,jj,jk) * tmask(ji+1,jj,jk)
+!!gm above it is stupid:   umask is equal to the product of the 2 tmask that follows...
             ENDIF
 
@@ -910,7 +908,7 @@
                ! update the momentum trends in v direction
 
-               zdpdy1 = zcoef0 / e2v(ji,jj) * (zhpi(ji,jj+1,jk) - zhpi(ji,jj,jk))
+               zdpdy1 = zcoef0 * r1_e2v(ji,jj) * (zhpi(ji,jj+1,jk) - zhpi(ji,jj,jk))
                IF( lk_vvl ) THEN
-                   zdpdy2 = zcoef0 / e2v(ji,jj) * &
+                   zdpdy2 = zcoef0 * r1_e2v(ji,jj) * &
                            ( REAL(jjs-jjd, wp) * (zpnss + zpnsd) + (sshn(ji,jj+1)-sshn(ji,jj)) )
                ELSE
@@ -920,4 +918,5 @@
                va(ji,jj,jk) = va(ji,jj,jk) + (zdpdy1 + zdpdy2)*&
                &              vmask(ji,jj,jk)*tmask(ji,jj,jk)*tmask(ji,jj+1,jk)
+!!gm above it is stupid:   vmask is equal to the product of the 2 tmask that follows...
             ENDIF
 
@@ -932,4 +931,5 @@
    END SUBROUTINE hpg_prj
 
+
    SUBROUTINE cspline(fsp, xsp, asp, bsp, csp, dsp, polynomial_type)
       !!----------------------------------------------------------------------
@@ -940,14 +940,10 @@
       !! ** Method  :   f(x) = asp + bsp*x + csp*x^2 + dsp*x^3
       !! Reference: CJC Kruger, Constrained Cubic Spline Interpoltation
-      !!
-      !!----------------------------------------------------------------------
-      IMPLICIT NONE
+      !!----------------------------------------------------------------------
       REAL(wp), DIMENSION(:,:,:), INTENT(in)  :: fsp, xsp           ! value and coordinate
-      REAL(wp), DIMENSION(:,:,:), INTENT(out) :: asp, bsp, csp, dsp ! coefficients of
-                                                                    ! the interpoated function
+      REAL(wp), DIMENSION(:,:,:), INTENT(out) :: asp, bsp, csp, dsp ! coefficients of the interpolated function
       INTEGER, INTENT(in) :: polynomial_type                        ! 1: cubic spline
-                                                                    ! 2: Linear
-
-      ! Local Variables
+      !                                                             ! 2: Linear
+      !
       INTEGER  ::   ji, jj, jk                 ! dummy loop indices
       INTEGER  ::   jpi, jpj, jpkm1
@@ -1038,6 +1034,5 @@
            CALL ctl_stop( 'invalid polynomial type in cspline' )
       ENDIF
-
-
+      !
    END SUBROUTINE cspline
 
@@ -1069,4 +1064,5 @@
    END FUNCTION interp1
 
+
    FUNCTION interp2(x, a, b, c, d)  RESULT(f)
       !!----------------------------------------------------------------------
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynkeg.F90	(revision 4616)
@@ -99,6 +99,6 @@
          DO jj = 2, jpjm1       ! add the gradient of kinetic energy to the general momentum trends
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               ua(ji,jj,jk) = ua(ji,jj,jk) - ( zhke(ji+1,jj  ,jk) - zhke(ji,jj,jk) ) / e1u(ji,jj)
-               va(ji,jj,jk) = va(ji,jj,jk) - ( zhke(ji  ,jj+1,jk) - zhke(ji,jj,jk) ) / e2v(ji,jj)
+               ua(ji,jj,jk) = ua(ji,jj,jk) - ( zhke(ji+1,jj  ,jk) - zhke(ji,jj,jk) ) * r1_e1u(ji,jj)
+               va(ji,jj,jk) = va(ji,jj,jk) - ( zhke(ji  ,jj+1,jk) - zhke(ji,jj,jk) ) * r1_e2v(ji,jj)
             END DO 
          END DO
@@ -112,5 +112,5 @@
 !                  &                                   - un(ji-1,jj  ,jk) * un(ji-1,jj  ,jk)   &
 !                  &                                   - vn(ji  ,jj-1,jk) * vn(ji  ,jj-1,jk)   &
-!                  &                                   - vn(ji  ,jj  ,jk) * vn(ji  ,jj  ,jk)   ) / e1u(ji,jj)
+!                  &                                   - vn(ji  ,jj  ,jk) * vn(ji  ,jj  ,jk)   ) * r1_e1u(ji,jj)
 !                  !
 !               va(ji,jj,jk) = va(ji,jj,jk) - 0.25 * (   un(ji-1,jj+1,jk) * un(ji-1,jj+1,jk)   &
@@ -120,5 +120,5 @@
 !                  &                                   - un(ji-1,jj  ,jk) * un(ji-1,jj  ,jk)   &
 !                  &                                   - un(ji  ,jj  ,jk) * un(ji  ,jj  ,jk)   &
-!                  &                                   - vn(ji  ,jj  ,jk) * vn(ji  ,jj  ,jk)   ) / e2v(ji,jj)
+!                  &                                   - vn(ji  ,jj  ,jk) * vn(ji  ,jj  ,jk)   ) * r1_e2v(ji,jj)
 !            END DO 
 !         END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_bilapg.F90	(revision 4616)
@@ -161,10 +161,10 @@
       !!      ===========  pu as follows (idem on pv)
       !!      vertical fluxes :
-      !!         zftw = e1t*e2t/e3w * (ahm*wslpi^2+ahm*wslpj^2)  dk-1[ pu ]
-      !!              -     e2t     *  ahm*wslpi                di[ mi(mk(pu)) ]
-      !!              -     e1t     *  ahm*wslpj                dj[ mj(mk(pu)) ]
+      !!         zftw = e1e2t/e3w * (ahm*wslpi^2+ahm*wslpj^2)  dk-1[ pu ]
+      !!              -   e2t     *  ahm*wslpi                di[ mi(mk(pu)) ]
+      !!              -   e1t     *  ahm*wslpj                dj[ mj(mk(pu)) ]
       !!      take the vertical divergence of the fluxes add it to the hori-
       !!      zontal component, divide the result by the volume element :
-      !!         plu  =  zsign / (e1t*e2t*e3t) { plu + dk[ zftw ] }
+      !!         plu  =  zsign / (e1e2t*e3t) { plu + dk[ zftw ] }
       !!      where  zsign=+1  if kahm =1 (laplacian or 1st pass of bilaplacian)
       !!                  =-1  if kahm =2 (2nd pass in case of bilaplacian)
@@ -369,5 +369,5 @@
                zuwslpj = 0.5 * ( wslpj(ji+1,jj,jk) + wslpj(ji,jj,jk) )
                ! coef. for the vertical dirative
-               zcoef0 = e1u(ji,jj) * e2u(ji,jj) / fse3u(ji,jj,jk)   &
+               zcoef0 = e1e2u(ji,jj) / fse3u(ji,jj,jk)   &
                   &   * ( zuwslpi * zuwslpi + zuwslpj * zuwslpj )
                ! weights for the i-k, j-k averaging at t- and f-points, resp.
@@ -403,5 +403,5 @@
                zvwslpj = 0.5 * ( wslpj(ji,jj+1,jk) + wslpj(ji,jj,jk) )
                ! coef. for the vertical derivative
-               zcoef0 = e1v(ji,jj) * e2v(ji,jj) / fse3v(ji,jj,jk)   &
+               zcoef0 = e1e2v(ji,jj) / fse3v(ji,jj,jk)   &
                   &   * ( zvwslpi * zvwslpi + zvwslpj * zvwslpj )
 !!gm caution here fmask multiplication already done in the def of ahmf...
@@ -439,6 +439,6 @@
                zvav = zfvw(ji,jk) - zfvw(ji,jk+1)
                ! harmonic operator applied to (pu,pv) and multiply by ahm
-               plu(ji,jj,jk) = zsign * ( plu(ji,jj,jk) + zuav ) / ( e1u(ji,jj)*e2u(ji,jj)*fse3u(ji,jj,jk) )
-               plv(ji,jj,jk) = zsign * ( plv(ji,jj,jk) + zvav ) / ( e1v(ji,jj)*e2v(ji,jj)*fse3v(ji,jj,jk) )
+               plu(ji,jj,jk) = zsign * ( plu(ji,jj,jk) + zuav ) / ( e1e2u(ji,jj)*fse3u(ji,jj,jk) )
+               plv(ji,jj,jk) = zsign * ( plv(ji,jj,jk) + zvav ) / ( e1e2v(ji,jj)*fse3v(ji,jj,jk) )
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_iso.F90	(revision 4616)
@@ -110,5 +110,5 @@
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       REAL(wp) ::   zabe1, zabe2, zcof1, zcof2                       ! local scalars
-      REAL(wp) ::   zmskt, zmskf, zbu, zbv, zuah, zvah               !   -      -
+      REAL(wp) ::   zmskt, zmskf                                     !   -      -
       REAL(wp) ::   zcoef0, zcoef3, zcoef4, zmkt, zmkf               !   -      -
       REAL(wp) ::   zuav, zvav, zuwslpi, zuwslpj, zvwslpi, zvwslpj   !   -      -
@@ -135,8 +135,8 @@
             DO jj = 2, jpjm1
                DO ji = 2, jpim1
-                  uslp (ji,jj,jk) = -1./e1u(ji,jj) * ( fsdept_b(ji+1,jj,jk) - fsdept_b(ji ,jj ,jk) ) * umask(ji,jj,jk)
-                  vslp (ji,jj,jk) = -1./e2v(ji,jj) * ( fsdept_b(ji,jj+1,jk) - fsdept_b(ji ,jj ,jk) ) * vmask(ji,jj,jk)
-                  wslpi(ji,jj,jk) = -1./e1t(ji,jj) * ( fsdepw_b(ji+1,jj,jk) - fsdepw_b(ji-1,jj,jk) ) * tmask(ji,jj,jk) * 0.5
-                  wslpj(ji,jj,jk) = -1./e2t(ji,jj) * ( fsdepw_b(ji,jj+1,jk) - fsdepw_b(ji,jj-1,jk) ) * tmask(ji,jj,jk) * 0.5
+                  uslp (ji,jj,jk) = - ( fsdept_b(ji+1,jj,jk) - fsdept_b(ji ,jj ,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
+                  vslp (ji,jj,jk) = - ( fsdept_b(ji,jj+1,jk) - fsdept_b(ji ,jj ,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk)
+                  wslpi(ji,jj,jk) = - ( fsdepw_b(ji+1,jj,jk) - fsdepw_b(ji-1,jj,jk) ) * r1_e1t(ji,jj) * tmask(ji,jj,jk) * 0.5
+                  wslpj(ji,jj,jk) = - ( fsdepw_b(ji,jj+1,jk) - fsdepw_b(ji,jj-1,jk) ) * r1_e2t(ji,jj) * tmask(ji,jj,jk) * 0.5
                END DO
             END DO
@@ -183,5 +183,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, jpi   ! vector opt.
-                  zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e2t(ji,jj) * MIN( fse3u(ji,jj,jk), fse3u(ji-1,jj,jk) ) / e1t(ji,jj)
+                  zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e2t(ji,jj) * MIN( fse3u(ji,jj,jk), fse3u(ji-1,jj,jk) ) * r1_e1t(ji,jj)
 
                   zmskt = 1._wp / MAX(   umask(ji-1,jj,jk  )+umask(ji,jj,jk+1)     &
@@ -198,5 +198,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, jpi   ! vector opt.
-                  zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e2t(ji,jj) * fse3t(ji,jj,jk) / e1t(ji,jj)
+                  zabe1 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e2t(ji,jj) * fse3t(ji,jj,jk) * r1_e1t(ji,jj)
 
                   zmskt = 1._wp / MAX(   umask(ji-1,jj,jk  ) + umask(ji,jj,jk+1)     &
@@ -215,5 +215,5 @@
          DO jj = 1, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               zabe2 = ( ahmf(ji,jj,jk) + rn_ahm_b ) * e1f(ji,jj) * fse3f(ji,jj,jk) / e2f(ji,jj)
+               zabe2 = ( ahmf(ji,jj,jk) + rn_ahm_b ) * e1f(ji,jj) * fse3f(ji,jj,jk) * r1_e2f(ji,jj)
 
                zmskf = 1._wp / MAX(   umask(ji,jj+1,jk  )+umask(ji,jj,jk+1)     &
@@ -236,5 +236,5 @@
          DO jj = 2, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               zabe1 = ( ahmf(ji,jj,jk) + rn_ahm_b ) * e2f(ji,jj) * fse3f(ji,jj,jk) / e1f(ji,jj)
+               zabe1 = ( ahmf(ji,jj,jk) + rn_ahm_b ) * e2f(ji,jj) * fse3f(ji,jj,jk) * r1_e1f(ji,jj)
 
                zmskf = 1._wp / MAX(  vmask(ji+1,jj,jk  )+vmask(ji,jj,jk+1)     &
@@ -253,5 +253,5 @@
             DO jj = 2, jpj
                DO ji = 1, fs_jpim1   ! vector opt.
-                  zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e1t(ji,jj) * MIN( fse3v(ji,jj,jk), fse3v(ji,jj-1,jk) ) / e2t(ji,jj)
+                  zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e1t(ji,jj) * MIN( fse3v(ji,jj,jk), fse3v(ji,jj-1,jk) ) * r1_e2t(ji,jj)
 
                   zmskt = 1._wp / MAX(  vmask(ji,jj-1,jk  )+vmask(ji,jj,jk+1)     &
@@ -268,5 +268,5 @@
             DO jj = 2, jpj
                DO ji = 1, fs_jpim1   ! vector opt.
-                  zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e1t(ji,jj) * fse3t(ji,jj,jk) / e2t(ji,jj)
+                  zabe2 = ( ahmt(ji,jj,jk)+rn_ahm_b ) * e1t(ji,jj) * fse3t(ji,jj,jk) * r1_e2t(ji,jj)
 
                   zmskt = 1./MAX(  vmask(ji,jj-1,jk  )+vmask(ji,jj,jk+1)   &
@@ -285,18 +285,10 @@
          ! Second derivative (divergence) and add to the general trend
          ! -----------------------------------------------------------
-
          DO jj = 2, jpjm1
             DO ji = 2, jpim1          !! Question vectop possible??? !!bug
-               ! volume elements
-               zbu = e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk)
-               zbv = e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk)
-               ! horizontal component of isopycnal momentum diffusive trends
-               zuah =( ziut (ji+1,jj) - ziut (ji,jj  ) +   &
-                  &    zjuf (ji  ,jj) - zjuf (ji,jj-1)  ) / zbu
-               zvah =( zivf (ji,jj  ) - zivf (ji-1,jj) +   &
-                  &    zjvt (ji,jj+1) - zjvt (ji,jj  )  ) / zbv
-               ! add the trends to the general trends
-               ua (ji,jj,jk) = ua (ji,jj,jk) + zuah
-               va (ji,jj,jk) = va (ji,jj,jk) + zvah
+               ua(ji,jj,jk) = ua(ji,jj,jk) + ( ziut(ji+1,jj) - ziut(ji,jj  )    &
+                  &                          + zjuf(ji  ,jj) - zjuf(ji,jj-1)  ) / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
+               va(ji,jj,jk) = va(ji,jj,jk) + ( zivf(ji,jj  ) - zivf(ji-1,jj)    &
+                  &                          + zjvt(ji,jj+1) - zjvt(ji,jj  )  ) / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
             END DO
          END DO
@@ -411,13 +403,6 @@
          DO jk = 1, jpkm1
             DO ji = 2, jpim1
-               ! volume elements
-               zbu = e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk)
-               zbv = e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk)
-               ! part of the k-component of isopycnal momentum diffusive trends
-               zuav = ( zfuw(ji,jk) - zfuw(ji,jk+1) ) / zbu
-               zvav = ( zfvw(ji,jk) - zfvw(ji,jk+1) ) / zbv
-               ! add the trends to the general trends
-               ua(ji,jj,jk) = ua(ji,jj,jk) + zuav
-               va(ji,jj,jk) = va(ji,jj,jk) + zvav
+               ua(ji,jj,jk) = ua(ji,jj,jk) + ( zfuw(ji,jk) - zfuw(ji,jk+1) ) / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
+               va(ji,jj,jk) = va(ji,jj,jk) + ( zfvw(ji,jk) - zfvw(ji,jk+1) ) / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf_lap.F90	(revision 4616)
@@ -89,5 +89,5 @@
             DO ji = fs_2, jpi   ! vector opt.
                !                                      ! ahm * e3 * curl  (computed from 1 to jpim1/jpjm1)
-               zcur(ji-1,jj-1) = ahmf(ji-1,jj-1,jk) * fse3f(ji-1,jj-1,jk) / ( e1f(ji-1,jj-1) * e2f(ji-1,jj-1) )     &
+               zcur(ji-1,jj-1) = ahmf(ji-1,jj-1,jk) * fse3f(ji-1,jj-1,jk) * r1_e1e2f(ji-1,jj-1)      &
                   &     * (  e2v(ji  ,jj-1) * pvb(ji  ,jj-1,jk) - e2v(ji-1,jj-1) * pvb(ji-1,jj-1,jk)                &
                   &        - e1u(ji-1,jj  ) * pub(ji-1,jj  ,jk) + e1u(ji-1,jj-1) * pub(ji-1,jj-1,jk)  ) * fmask(ji-1,jj-1,jk)
@@ -101,11 +101,11 @@
          DO jj = 2, jpjm1                             ! - curl( curl) + grad( div )
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               pua(ji,jj,jk) = pua(ji,jj,jk) + zsign * (                                                  &
-                  &              - ( zcur(ji  ,jj) - zcur(ji,jj-1) ) / ( e2u(ji,jj) * fse3u(ji,jj,jk) )   &
-                  &              + ( zdiv(ji+1,jj) - zdiv(ji,jj  ) ) /   e1u(ji,jj)                     )
+               pua(ji,jj,jk) = pua(ji,jj,jk) + zsign * (                                                   &
+                  &              - ( zcur(ji  ,jj) - zcur(ji,jj-1) ) /  ( e2u(ji,jj) * fse3u(ji,jj,jk) )   &
+                  &              + ( zdiv(ji+1,jj) - zdiv(ji,jj  ) ) * r1_e1u(ji,jj)                     )
                   !
-               pva(ji,jj,jk) = pva(ji,jj,jk) + zsign * (                                                  &
-                  &                ( zcur(ji,jj  ) - zcur(ji-1,jj) ) / ( e1v(ji,jj) * fse3v(ji,jj,jk) )   &
-                  &              + ( zdiv(ji,jj+1) - zdiv(ji  ,jj) ) /   e2v(ji,jj)                     )
+               pva(ji,jj,jk) = pva(ji,jj,jk) + zsign * (                                                   &
+                  &                ( zcur(ji,jj  ) - zcur(ji-1,jj) ) /  ( e1v(ji,jj) * fse3v(ji,jj,jk) )   &
+                  &              + ( zdiv(ji,jj+1) - zdiv(ji  ,jj) ) * r1_e2v(ji,jj)                     )
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90	(revision 4616)
@@ -349,5 +349,5 @@
       !! ** Method  : - Divergence:
       !!      - compute the divergence given by :
-      !!         zhdivnep = 1/(e1t*e2t*e3t) ( di[e2u*e3u zunep] + dj[e1v*e3v zvnep] )
+      !!         zhdivnep = 1/(e1e2t*e3t) ( di[e2u*e3u zunep] + dj[e1v*e3v zvnep] )
       !!      - compute the curl in tensorial formalism:
       !!         zmrotnep = 1/(e1f*e2f) ( di[e2v zvnep] - dj[e1u zunep] )
@@ -414,5 +414,5 @@
                &    + e1v(ji  ,jj  )*fse3v(ji  ,jj  ,jk) * zvnep(ji  ,jj  ) * vmask(ji  ,jj  ,jk)    &
                &    - e1v(ji  ,jj-1)*fse3v(ji  ,jj-1,jk) * zvnep(ji  ,jj-1) * vmask(ji  ,jj-1,jk) )  &
-               &  / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+               &  / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
             END DO
          END DO
@@ -435,5 +435,5 @@
                   &        - e1u(ji  ,jj+1) * zunep(ji  ,jj+1) * umask(ji  ,jj+1,jk)     &
                   &        + e1u(ji  ,jj  ) * zunep(ji  ,jj  ) * umask(ji  ,jj  ,jk)  )  &
-                  &       * fmask(ji,jj,jk) / ( e1f(ji,jj) * e2f(ji,jj) )
+                  &       * fmask(ji,jj,jk) * r1_e1e2f(ji,jj)
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 4616)
@@ -53,5 +53,5 @@
 #  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$ 
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -335,11 +335,6 @@
       !
       DO jk = 1, jpkm1
-#if defined key_vectopt_loop
-         DO jj = 1, 1         !Vector opt. => forced unrolling
-            DO ji = 1, jpij
-#else 
          DO jj = 1, jpj
             DO ji = 1, jpi
-#endif                  
                un_b(ji,jj) = un_b(ji,jj) + fse3u_a(ji,jj,jk) * un(ji,jj,jk) * umask(ji,jj,jk)
                vn_b(ji,jj) = vn_b(ji,jj) + fse3v_a(ji,jj,jk) * vn(ji,jj,jk) * vmask(ji,jj,jk)
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 4616)
@@ -120,7 +120,7 @@
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   spgu(ji,jj) = spgu(ji,jj) + zg_2 * (  ssh_ib (ji+1,jj) - ssh_ib (ji,jj)    &
-                     &                      + ssh_ibb(ji+1,jj) - ssh_ibb(ji,jj)  ) /e1u(ji,jj)
+                     &                      + ssh_ibb(ji+1,jj) - ssh_ibb(ji,jj)  ) * r1_e1u(ji,jj)
                   spgv(ji,jj) = spgv(ji,jj) + zg_2 * (  ssh_ib (ji,jj+1) - ssh_ib (ji,jj)    &
-                     &                      + ssh_ibb(ji,jj+1) - ssh_ibb(ji,jj)  ) /e2v(ji,jj)
+                     &                      + ssh_ibb(ji,jj+1) - ssh_ibb(ji,jj)  ) * r1_e2v(ji,jj)
                END DO
             END DO
@@ -134,6 +134,6 @@
             DO jj = 2, jpjm1                         ! add tide potential forcing
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  spgu(ji,jj) = spgu(ji,jj) + grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) / e1u(ji,jj)
-                  spgv(ji,jj) = spgv(ji,jj) + grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) / e2v(ji,jj)
+                  spgu(ji,jj) = spgu(ji,jj) + grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) * r1_e1u(ji,jj)
+                  spgv(ji,jj) = spgv(ji,jj) + grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) * r1_e2v(ji,jj)
                END DO 
             END DO
@@ -148,6 +148,6 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  spgu(ji,jj) = spgu(ji,jj) + ( zpice(ji+1,jj) - zpice(ji,jj) ) / e1u(ji,jj)
-                  spgv(ji,jj) = spgv(ji,jj) + ( zpice(ji,jj+1) - zpice(ji,jj) ) / e2v(ji,jj)
+                  spgu(ji,jj) = spgu(ji,jj) + ( zpice(ji+1,jj) - zpice(ji,jj) ) * r1_e1u(ji,jj)
+                  spgv(ji,jj) = spgv(ji,jj) + ( zpice(ji,jj+1) - zpice(ji,jj) ) * r1_e2v(ji,jj)
                END DO
             END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 4616)
@@ -25,5 +25,4 @@
    USE iom             ! I/O library
    USE timing          ! Timing
-
 
    IMPLICIT NONE
@@ -80,6 +79,6 @@
          DO jj = 2, jpjm1                    ! now surface pressure gradient
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj)
-               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj)
+               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) * r1_e1u(ji,jj)
+               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) * r1_e2v(ji,jj)
             END DO 
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 4616)
@@ -166,6 +166,6 @@
          DO jj = 2, jpjm1              ! Surface pressure gradient (now)
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj)
-               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj)
+               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) * r1_e1u(ji,jj)
+               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) * r1_e2v(ji,jj)
             END DO 
          END DO 
@@ -192,30 +192,19 @@
       ! compute the next vertically averaged velocity (effect of the additional force not included)
       ! ---------------------------------------------
+      ! vertical sum
       DO jj = 2, jpjm1
          DO ji = fs_2, fs_jpim1   ! vector opt.
-            spgu(ji,jj) = 0._wp
-            spgv(ji,jj) = 0._wp
-         END DO
-      END DO
-
-      ! vertical sum
-!CDIR NOLOOPCHG
-      IF( lk_vopt_loop ) THEN          ! vector opt., forced unroll
-         DO jk = 1, jpkm1
-            DO ji = 1, jpij
-               spgu(ji,1) = spgu(ji,1) + fse3u_a(ji,1,jk) * ua(ji,1,jk)
-               spgv(ji,1) = spgv(ji,1) + fse3v_a(ji,1,jk) * va(ji,1,jk)
-            END DO
-         END DO
-      ELSE                        ! No  vector opt.
-         DO jk = 1, jpkm1
-            DO jj = 2, jpjm1
-               DO ji = 2, jpim1
-                  spgu(ji,jj) = spgu(ji,jj) + fse3u_a(ji,jj,jk) * ua(ji,jj,jk)
-                  spgv(ji,jj) = spgv(ji,jj) + fse3v_a(ji,jj,jk) * va(ji,jj,jk)
-               END DO
-            END DO
-         END DO
-      ENDIF
+            spgu(ji,jj) = fse3u_a(ji,jj,1) * ua(ji,jj,1)
+            spgv(ji,jj) = fse3v_a(ji,jj,1) * va(ji,jj,1)
+         END DO
+      END DO
+      DO jk = 2, jpkm1
+         DO jj = 2, jpjm1
+            DO ji = 2, jpim1
+               spgu(ji,jj) = spgu(ji,jj) + fse3u_a(ji,jj,jk) * ua(ji,jj,jk)
+               spgv(ji,jj) = spgv(ji,jj) + fse3v_a(ji,jj,jk) * va(ji,jj,jk)
+            END DO
+         END DO
+      END DO
 
       ! transport: multiplied by the horizontal scale factor
@@ -294,6 +283,6 @@
          DO ji = fs_2, fs_jpim1   ! vector opt.
             ! trend of Transport divergence gradient
-            ztdgu = z2dtg * (gcx(ji+1,jj  ) - gcx(ji,jj) ) / e1u(ji,jj)
-            ztdgv = z2dtg * (gcx(ji  ,jj+1) - gcx(ji,jj) ) / e2v(ji,jj)
+            ztdgu = z2dtg * (gcx(ji+1,jj  ) - gcx(ji,jj) ) * r1_e1u(ji,jj)
+            ztdgv = z2dtg * (gcx(ji  ,jj+1) - gcx(ji,jj) ) * r1_e2v(ji,jj)
             ! multiplied by z2dt
 #if defined key_bdy
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 4616)
@@ -75,5 +75,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.5 , NEMO Consortium (2013)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id: dynspg_ts.F90
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -104,4 +104,5 @@
       !
    END FUNCTION dyn_spg_ts_alloc
+
 
    SUBROUTINE dyn_spg_ts( kt )
@@ -290,11 +291,6 @@
       !
       DO jk = 1, jpkm1
-#if defined key_vectopt_loop
-         DO jj = 1, 1         !Vector opt. => forced unrolling
-            DO ji = 1, jpij
-#else 
          DO jj = 1, jpj
             DO ji = 1, jpi
-#endif                                                                   
                zu_frc(ji,jj) = zu_frc(ji,jj) + fse3u_n(ji,jj,jk) * ua(ji,jj,jk) * umask(ji,jj,jk)
                zv_frc(ji,jj) = zv_frc(ji,jj) + fse3v_n(ji,jj,jk) * va(ji,jj,jk) * vmask(ji,jj,jk)         
@@ -324,11 +320,11 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zy1 = ( zwy(ji,jj-1) + zwy(ji+1,jj-1) ) / e1u(ji,jj)
-               zy2 = ( zwy(ji,jj  ) + zwy(ji+1,jj  ) ) / e1u(ji,jj)
-               zx1 = ( zwx(ji-1,jj) + zwx(ji-1,jj+1) ) / e2v(ji,jj)
-               zx2 = ( zwx(ji  ,jj) + zwx(ji  ,jj+1) ) / e2v(ji,jj)
+               zy1 = ( zwy(ji,jj-1) + zwy(ji+1,jj-1) )
+               zy2 = ( zwy(ji,jj  ) + zwy(ji+1,jj  ) )
+               zx1 = ( zwx(ji-1,jj) + zwx(ji-1,jj+1) )
+               zx2 = ( zwx(ji  ,jj) + zwx(ji  ,jj+1) )
                ! energy conserving formulation for planetary vorticity term
-               zu_trd(ji,jj) = z1_4 * ( zwz(ji  ,jj-1) * zy1 + zwz(ji,jj) * zy2 )
-               zv_trd(ji,jj) =-z1_4 * ( zwz(ji-1,jj  ) * zx1 + zwz(ji,jj) * zx2 )
+               zu_trd(ji,jj) = z1_4 * r1_e1u(ji,jj) * ( zwz(ji  ,jj-1) * zy1 + zwz(ji,jj) * zy2 )
+               zv_trd(ji,jj) =-z1_4 * r1_e2v(ji,jj) * ( zwz(ji-1,jj  ) * zx1 + zwz(ji,jj) * zx2 )
             END DO
          END DO
@@ -338,7 +334,7 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                zy1 =   z1_8 * ( zwy(ji  ,jj-1) + zwy(ji+1,jj-1) &
-                 &            + zwy(ji  ,jj  ) + zwy(ji+1,jj  ) ) / e1u(ji,jj)
+                 &            + zwy(ji  ,jj  ) + zwy(ji+1,jj  ) ) * r1_e1u(ji,jj)
                zx1 = - z1_8 * ( zwx(ji-1,jj  ) + zwx(ji-1,jj+1) &
-                 &            + zwx(ji  ,jj  ) + zwx(ji  ,jj+1) ) / e2v(ji,jj)
+                 &            + zwx(ji  ,jj  ) + zwx(ji  ,jj+1) ) * r1_e2v(ji,jj)
                zu_trd(ji,jj)  = zy1 * ( zwz(ji  ,jj-1) + zwz(ji,jj) )
                zv_trd(ji,jj)  = zx1 * ( zwz(ji-1,jj  ) + zwz(ji,jj) )
@@ -349,12 +345,12 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zu_trd(ji,jj) = + z1_12 / e1u(ji,jj) * (  ftne(ji,jj  ) * zwy(ji  ,jj  ) &
-                &                                      + ftnw(ji+1,jj) * zwy(ji+1,jj  ) &
-                &                                      + ftse(ji,jj  ) * zwy(ji  ,jj-1) &
-                &                                      + ftsw(ji+1,jj) * zwy(ji+1,jj-1) )
-               zv_trd(ji,jj) = - z1_12 / e2v(ji,jj) * (  ftsw(ji,jj+1) * zwx(ji-1,jj+1) &
-                &                                      + ftse(ji,jj+1) * zwx(ji  ,jj+1) &
-                &                                      + ftnw(ji,jj  ) * zwx(ji-1,jj  ) &
-                &                                      + ftne(ji,jj  ) * zwx(ji  ,jj  ) )
+               zu_trd(ji,jj) = + z1_12 * r1_e1u(ji,jj) * (  ftne(ji,jj  ) * zwy(ji  ,jj  ) &
+                &                                         + ftnw(ji+1,jj) * zwy(ji+1,jj  ) &
+                &                                         + ftse(ji,jj  ) * zwy(ji  ,jj-1) &
+                &                                         + ftsw(ji+1,jj) * zwy(ji+1,jj-1) )
+               zv_trd(ji,jj) = - z1_12 * r1_e2v(ji,jj) * (  ftsw(ji,jj+1) * zwx(ji-1,jj+1) &
+                &                                         + ftse(ji,jj+1) * zwx(ji  ,jj+1) &
+                &                                         + ftnw(ji,jj  ) * zwx(ji-1,jj  ) &
+                &                                         + ftne(ji,jj  ) * zwx(ji  ,jj  ) )
             END DO
          END DO
@@ -367,6 +363,6 @@
          DO jj = 2, jpjm1 
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zu_trd(ji,jj) = zu_trd(ji,jj) - grav * (  sshn(ji+1,jj  ) - sshn(ji  ,jj  )  ) / e1u(ji,jj)
-               zv_trd(ji,jj) = zv_trd(ji,jj) - grav * (  sshn(ji  ,jj+1) - sshn(ji  ,jj  )  ) / e2v(ji,jj)
+               zu_trd(ji,jj) = zu_trd(ji,jj) - grav * (  sshn(ji+1,jj  ) - sshn(ji  ,jj  )  ) * r1_e1u(ji,jj)
+               zv_trd(ji,jj) = zv_trd(ji,jj) - grav * (  sshn(ji  ,jj+1) - sshn(ji  ,jj  )  ) * r1_e2v(ji,jj)
             END DO
          END DO
@@ -417,6 +413,6 @@
             DO jj = 2, jpjm1              
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zu_spg =  grav * (  ssh_ib (ji+1,jj  ) - ssh_ib (ji,jj) ) /e1u(ji,jj)
-                  zv_spg =  grav * (  ssh_ib (ji  ,jj+1) - ssh_ib (ji,jj) ) /e2v(ji,jj)
+                  zu_spg =  grav * (  ssh_ib (ji+1,jj  ) - ssh_ib (ji,jj) ) * r1_e1u(ji,jj)
+                  zv_spg =  grav * (  ssh_ib (ji  ,jj+1) - ssh_ib (ji,jj) ) * r1_e2v(ji,jj)
                   zu_frc(ji,jj) = zu_frc(ji,jj) + zu_spg
                   zv_frc(ji,jj) = zv_frc(ji,jj) + zv_spg
@@ -427,7 +423,7 @@
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   zu_spg =  grav * z1_2 * (  ssh_ib (ji+1,jj  ) - ssh_ib (ji,jj)    &
-                      &                    + ssh_ibb(ji+1,jj  ) - ssh_ibb(ji,jj)  ) /e1u(ji,jj)
+                      &                    + ssh_ibb(ji+1,jj  ) - ssh_ibb(ji,jj)  ) * r1_e1u(ji,jj)
                   zv_spg =  grav * z1_2 * (  ssh_ib (ji  ,jj+1) - ssh_ib (ji,jj)    &
-                      &                    + ssh_ibb(ji  ,jj+1) - ssh_ibb(ji,jj)  ) /e2v(ji,jj)
+                      &                    + ssh_ibb(ji  ,jj+1) - ssh_ibb(ji,jj)  ) * r1_e2v(ji,jj)
                   zu_frc(ji,jj) = zu_frc(ji,jj) + zu_spg
                   zv_frc(ji,jj) = zv_frc(ji,jj) + zv_spg
@@ -525,10 +521,10 @@
             DO jj = 2, jpjm1                                    ! Sea Surface Height at u- & v-points
                DO ji = 2, fs_jpim1   ! Vector opt.
-                  zwx(ji,jj) = z1_2 * umask(ji,jj,1)  * r1_e12u(ji,jj)     &
-                     &              * ( e12t(ji  ,jj) * zsshp2_e(ji  ,jj)  &
-                     &              +   e12t(ji+1,jj) * zsshp2_e(ji+1,jj) )
-                  zwy(ji,jj) = z1_2 * vmask(ji,jj,1)  * r1_e12v(ji,jj)     &
-                     &              * ( e12t(ji,jj  ) * zsshp2_e(ji,jj  )  &
-                     &              +   e12t(ji,jj+1) * zsshp2_e(ji,jj+1) )
+                  zwx(ji,jj) = z1_2 * umask(ji,jj,1)  * r1_e1e2u(ji,jj)     &
+                     &              * ( e1e2t(ji  ,jj) * zsshp2_e(ji  ,jj)  &
+                     &              +   e1e2t(ji+1,jj) * zsshp2_e(ji+1,jj) )
+                  zwy(ji,jj) = z1_2 * vmask(ji,jj,1)  * r1_e1e2v(ji,jj)     &
+                     &              * ( e1e2t(ji,jj  ) * zsshp2_e(ji,jj  )  &
+                     &              +   e1e2t(ji,jj+1) * zsshp2_e(ji,jj+1) )
                END DO
             END DO
@@ -578,6 +574,6 @@
          ! Sum over sub-time-steps to compute advective velocities
          za2 = wgtbtp2(jn)
-         zu_sum  (:,:) = zu_sum  (:,:) + za2 * zwx  (:,:) / e2u  (:,:)
-         zv_sum  (:,:) = zv_sum  (:,:) + za2 * zwy  (:,:) / e1v  (:,:)
+         zu_sum  (:,:) = zu_sum  (:,:) + za2 * zwx  (:,:) * r1_e2u  (:,:)
+         zv_sum  (:,:) = zv_sum  (:,:) + za2 * zwy  (:,:) * r1_e1v  (:,:)
          !
          ! Set next sea level:
@@ -585,5 +581,5 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                zhdiv(ji,jj) = (   zwx(ji,jj) - zwx(ji-1,jj)   &
-                  &             + zwy(ji,jj) - zwy(ji,jj-1)   ) * r1_e12t(ji,jj)
+                  &             + zwy(ji,jj) - zwy(ji,jj-1)   ) * r1_e1e2t(ji,jj)
             END DO
          END DO
@@ -603,10 +599,10 @@
             DO jj = 2, jpjm1
                DO ji = 2, jpim1      ! NO Vector Opt.
-                  zsshu_a(ji,jj) = z1_2 * umask(ji,jj,1)  * r1_e12u(ji,jj)  &
-                     &              * ( e12t(ji  ,jj  ) * ssha_e(ji  ,jj  ) &
-                     &              +   e12t(ji+1,jj  ) * ssha_e(ji+1,jj  ) )
-                  zsshv_a(ji,jj) = z1_2 * vmask(ji,jj,1)  * r1_e12v(ji,jj)  &
-                     &              * ( e12t(ji  ,jj  ) * ssha_e(ji  ,jj  ) &
-                     &              +   e12t(ji  ,jj+1) * ssha_e(ji  ,jj+1) )
+                  zsshu_a(ji,jj) = z1_2 * umask(ji,jj,1)  * r1_e1e2u(ji,jj)  &
+                     &              * ( e1e2t(ji  ,jj  ) * ssha_e(ji  ,jj  ) &
+                     &              +   e1e2t(ji+1,jj  ) * ssha_e(ji+1,jj  ) )
+                  zsshv_a(ji,jj) = z1_2 * vmask(ji,jj,1)  * r1_e1e2v(ji,jj)  &
+                     &              * ( e1e2t(ji  ,jj  ) * ssha_e(ji  ,jj  ) &
+                     &              +   e1e2t(ji  ,jj+1) * ssha_e(ji  ,jj+1) )
                END DO
             END DO
@@ -642,10 +638,10 @@
             DO jj = 2, jpjm1                            
                DO ji = 2, jpim1
-                  zx1 = z1_2 * umask(ji  ,jj,1) *  r1_e12u(ji  ,jj)    &
-                     &      * ( e12t(ji  ,jj  ) * zsshp2_e(ji  ,jj)    &
-                     &      +   e12t(ji+1,jj  ) * zsshp2_e(ji+1,jj  ) )
-                  zy1 = z1_2 * vmask(ji  ,jj,1) *  r1_e12v(ji  ,jj  )  &
-                     &       * ( e12t(ji ,jj  ) * zsshp2_e(ji  ,jj  )  &
-                     &       +   e12t(ji ,jj+1) * zsshp2_e(ji  ,jj+1) )
+                  zx1 = z1_2 * umask(ji  ,jj,1) *  r1_e1e2u(ji  ,jj)    &
+                     &      * ( e1e2t(ji  ,jj  ) * zsshp2_e(ji  ,jj)    &
+                     &      +   e1e2t(ji+1,jj  ) * zsshp2_e(ji+1,jj  ) )
+                  zy1 = z1_2 * vmask(ji  ,jj,1) *  r1_e1e2v(ji  ,jj  )  &
+                     &       * ( e1e2t(ji ,jj  ) * zsshp2_e(ji  ,jj  )  &
+                     &       +   e1e2t(ji ,jj+1) * zsshp2_e(ji  ,jj+1) )
                   zhust_e(ji,jj) = hu_0(ji,jj) + zx1 
                   zhvst_e(ji,jj) = hv_0(ji,jj) + zy1
@@ -664,10 +660,10 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zy1 = ( zwy(ji  ,jj-1) + zwy(ji+1,jj-1) ) / e1u(ji,jj)
-                  zy2 = ( zwy(ji  ,jj  ) + zwy(ji+1,jj  ) ) / e1u(ji,jj)
-                  zx1 = ( zwx(ji-1,jj  ) + zwx(ji-1,jj+1) ) / e2v(ji,jj)
-                  zx2 = ( zwx(ji  ,jj  ) + zwx(ji  ,jj+1) ) / e2v(ji,jj)
-                  zu_trd(ji,jj) = z1_4 * ( zwz(ji  ,jj-1) * zy1 + zwz(ji,jj) * zy2 )
-                  zv_trd(ji,jj) =-z1_4 * ( zwz(ji-1,jj  ) * zx1 + zwz(ji,jj) * zx2 )
+                  zy1 = ( zwy(ji  ,jj-1) + zwy(ji+1,jj-1) )
+                  zy2 = ( zwy(ji  ,jj  ) + zwy(ji+1,jj  ) )
+                  zx1 = ( zwx(ji-1,jj  ) + zwx(ji-1,jj+1) )
+                  zx2 = ( zwx(ji  ,jj  ) + zwx(ji  ,jj+1) )
+                  zu_trd(ji,jj) = z1_4 * ( zwz(ji  ,jj-1) * zy1 + zwz(ji,jj) * zy2 ) * r1_e1u(ji,jj)
+                  zv_trd(ji,jj) =-z1_4 * ( zwz(ji-1,jj  ) * zx1 + zwz(ji,jj) * zx2 ) * r1_e2v(ji,jj)
                END DO
             END DO
@@ -677,7 +673,7 @@
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   zy1 =   z1_8 * ( zwy(ji  ,jj-1) + zwy(ji+1,jj-1) &
-                   &             + zwy(ji  ,jj  ) + zwy(ji+1,jj  ) ) / e1u(ji,jj)
+                   &             + zwy(ji  ,jj  ) + zwy(ji+1,jj  ) ) * r1_e1u(ji,jj)
                   zx1 = - z1_8 * ( zwx(ji-1,jj  ) + zwx(ji-1,jj+1) &
-                   &             + zwx(ji  ,jj  ) + zwx(ji  ,jj+1) ) / e2v(ji,jj)
+                   &             + zwx(ji  ,jj  ) + zwx(ji  ,jj+1) ) * r1_e2v(ji,jj)
                   zu_trd(ji,jj)  = zy1 * ( zwz(ji  ,jj-1) + zwz(ji,jj) )
                   zv_trd(ji,jj)  = zx1 * ( zwz(ji-1,jj  ) + zwz(ji,jj) )
@@ -688,12 +684,12 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zu_trd(ji,jj) = + z1_12 / e1u(ji,jj) * (  ftne(ji,jj  ) * zwy(ji  ,jj  ) &
-                     &                                    + ftnw(ji+1,jj) * zwy(ji+1,jj  ) &
-                     &                                    + ftse(ji,jj  ) * zwy(ji  ,jj-1) & 
-                     &                                    + ftsw(ji+1,jj) * zwy(ji+1,jj-1) )
-                  zv_trd(ji,jj) = - z1_12 / e2v(ji,jj) * (  ftsw(ji,jj+1) * zwx(ji-1,jj+1) & 
-                     &                                    + ftse(ji,jj+1) * zwx(ji  ,jj+1) &
-                     &                                    + ftnw(ji,jj  ) * zwx(ji-1,jj  ) & 
-                     &                                    + ftne(ji,jj  ) * zwx(ji  ,jj  ) )
+                  zu_trd(ji,jj) = + z1_12 * r1_e1u(ji,jj) * (  ftne(ji,jj  ) * zwy(ji  ,jj  ) &
+                     &                                       + ftnw(ji+1,jj) * zwy(ji+1,jj  ) &
+                     &                                       + ftse(ji,jj  ) * zwy(ji  ,jj-1) & 
+                     &                                       + ftsw(ji+1,jj) * zwy(ji+1,jj-1) )
+                  zv_trd(ji,jj) = - z1_12 * r1_e2v(ji,jj) * (  ftsw(ji,jj+1) * zwx(ji-1,jj+1) & 
+                     &                                       + ftse(ji,jj+1) * zwx(ji  ,jj+1) &
+                     &                                       + ftnw(ji,jj  ) * zwx(ji-1,jj  ) & 
+                     &                                       + ftne(ji,jj  ) * zwx(ji  ,jj  ) )
                END DO
             END DO
@@ -705,6 +701,6 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zu_spg = grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) / e1u(ji,jj)
-                  zv_spg = grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) / e2v(ji,jj)
+                  zu_spg = grav * ( pot_astro(ji+1,jj) - pot_astro(ji,jj) ) * r1_e1u(ji,jj)
+                  zv_spg = grav * ( pot_astro(ji,jj+1) - pot_astro(ji,jj) ) * r1_e2v(ji,jj)
                   zu_trd(ji,jj) = zu_trd(ji,jj) + zu_spg
                   zv_trd(ji,jj) = zv_trd(ji,jj) + zv_spg
@@ -721,6 +717,6 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ! Add surface pressure gradient
-               zu_spg = - grav * ( zsshp2_e(ji+1,jj) - zsshp2_e(ji,jj) ) / e1u(ji,jj)
-               zv_spg = - grav * ( zsshp2_e(ji,jj+1) - zsshp2_e(ji,jj) ) / e2v(ji,jj)
+               zu_spg = - grav * ( zsshp2_e(ji+1,jj) - zsshp2_e(ji,jj) ) * r1_e1u(ji,jj)
+               zv_spg = - grav * ( zsshp2_e(ji,jj+1) - zsshp2_e(ji,jj) ) * r1_e2v(ji,jj)
                zwx(ji,jj) = zu_spg
                zwy(ji,jj) = zv_spg
@@ -827,10 +823,10 @@
          DO jj = 1, jpjm1
             DO ji = 1, jpim1      ! NO Vector Opt.
-               zsshu_a(ji,jj) = z1_2 * umask(ji,jj,1)  * r1_e12u(ji,jj) &
-                  &              * ( e12t(ji  ,jj) * ssha(ji  ,jj)    &
-                  &              +   e12t(ji+1,jj) * ssha(ji+1,jj) )
-               zsshv_a(ji,jj) = z1_2 * vmask(ji,jj,1)  * r1_e12v(ji,jj) &
-                  &              * ( e12t(ji,jj  ) * ssha(ji,jj  )    &
-                  &              +   e12t(ji,jj+1) * ssha(ji,jj+1) )
+               zsshu_a(ji,jj) = z1_2 * umask(ji,jj,1)  * r1_e1e2u(ji,jj) &
+                  &              * ( e1e2t(ji  ,jj) * ssha(ji  ,jj)    &
+                  &              +   e1e2t(ji+1,jj) * ssha(ji+1,jj) )
+               zsshv_a(ji,jj) = z1_2 * vmask(ji,jj,1)  * r1_e1e2v(ji,jj) &
+                  &              * ( e1e2t(ji,jj  ) * ssha(ji,jj  )    &
+                  &              +   e1e2t(ji,jj+1) * ssha(ji,jj+1) )
             END DO
          END DO
@@ -1071,7 +1067,7 @@
          DO jj = 1, jpj
             DO ji =1, jpi
-               zxr2 = 1./(e1t(ji,jj)*e1t(ji,jj))
-               zyr2 = 1./(e2t(ji,jj)*e2t(ji,jj))
-               zcu(ji,jj) = sqrt(grav*ht_0(ji,jj)*(zxr2 + zyr2) )
+               zxr2 = 1._wp / ( e1t(ji,jj)*e1t(ji,jj) )
+               zyr2 = 1._wp / ( e2t(ji,jj)*e2t(ji,jj) )
+               zcu(ji,jj) = SQRT( grav*ht_0(ji,jj)*(zxr2 + zyr2) )
             END DO
          END DO
@@ -1079,7 +1075,7 @@
          DO jj = 1, jpj
             DO ji =1, jpi
-               zxr2 = 1./(e1t(ji,jj)*e1t(ji,jj))
-               zyr2 = 1./(e2t(ji,jj)*e2t(ji,jj))
-               zcu(ji,jj) = sqrt(grav*ht(ji,jj)*(zxr2 + zyr2) )
+               zxr2 = 1._wp / ( e1t(ji,jj)*e1t(ji,jj) )
+               zyr2 = 1._wp / ( e2t(ji,jj)*e2t(ji,jj) )
+               zcu(ji,jj) = SQRT( grav*ht(ji,jj)*(zxr2 + zyr2) )
             END DO
          END DO
@@ -1092,5 +1088,5 @@
       IF (ln_bt_nn_auto) nn_baro = CEILING( rdt / rn_bt_cmax * zcmax)
       
-      rdtbt = rdt / FLOAT(nn_baro)
+      rdtbt = rdt / REAL( nn_baro, wp )
       zcmax = zcmax * rdtbt
 							! Print results
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 4616)
@@ -245,6 +245,5 @@
                DO ji = 1, fs_jpim1   ! vector opt.
                   zwz(ji,jj) = (  e2v(ji+1,jj  ) * vn(ji+1,jj  ,jk) - e2v(ji,jj) * vn(ji,jj,jk)    &
-                     &          - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) &
-                     &       / ( e1f(ji,jj) * e2f(ji,jj) )
+                     &          - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
                END DO
             END DO
@@ -254,5 +253,5 @@
                   zwz(ji,jj) = (   ( vn(ji+1,jj  ,jk) + vn (ji,jj,jk) ) * ( e2v(ji+1,jj  ) - e2v(ji,jj) )       &
                        &         - ( un(ji  ,jj+1,jk) + un (ji,jj,jk) ) * ( e1u(ji  ,jj+1) - e1u(ji,jj) )   )   &
-                       &     * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) )
+                       &     * 0.5 * r1_e1e2f(ji,jj)
                END DO
             END DO
@@ -262,5 +261,5 @@
                   zwz(ji,jj) = ff(ji,jj) + (  e2v(ji+1,jj  ) * vn(ji+1,jj  ,jk) - e2v(ji,jj) * vn(ji,jj,jk)    &
                      &                      - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) &
-                     &                   / ( e1f(ji,jj) * e2f(ji,jj) )
+                     &                   * r1_e1e2f(ji,jj)
                END DO
             END DO
@@ -271,5 +270,5 @@
                        &     + (   ( vn(ji+1,jj  ,jk) + vn (ji,jj,jk) ) * ( e2v(ji+1,jj  ) - e2v(ji,jj) )       &
                        &         - ( un(ji  ,jj+1,jk) + un (ji,jj,jk) ) * ( e1u(ji  ,jj+1) - e1u(ji,jj) )   )   &
-                       &     * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) )
+                       &     * 0.5 * r1_e1e2f(ji,jj)
                END DO
             END DO
@@ -293,6 +292,6 @@
                zx1 = zwx(ji-1,jj) + zwx(ji-1,jj+1)
                zx2 = zwx(ji  ,jj) + zwx(ji  ,jj+1)
-               pua(ji,jj,jk) = pua(ji,jj,jk) + r1_4 / e1u(ji,jj) * ( zwz(ji  ,jj-1) * zy1 + zwz(ji,jj) * zy2 )
-               pva(ji,jj,jk) = pva(ji,jj,jk) - r1_4 / e2v(ji,jj) * ( zwz(ji-1,jj  ) * zx1 + zwz(ji,jj) * zx2 ) 
+               pua(ji,jj,jk) = pua(ji,jj,jk) + r1_4 * r1_e1u(ji,jj) * ( zwz(ji  ,jj-1) * zy1 + zwz(ji,jj) * zy2 )
+               pva(ji,jj,jk) = pva(ji,jj,jk) - r1_4 * r1_e2v(ji,jj) * ( zwz(ji-1,jj  ) * zx1 + zwz(ji,jj) * zx2 ) 
             END DO  
          END DO  
@@ -357,6 +356,5 @@
                DO ji = 1, fs_jpim1   ! vector opt.
                   zwz(ji,jj) = (  e2v(ji+1,jj  ) * vn(ji+1,jj  ,jk) - e2v(ji,jj) * vn(ji,jj,jk)    &
-                     &          - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) &
-                     &       / ( e1f(ji,jj) * e2f(ji,jj) )
+                     &          - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) * r1_e1e2f(ji,jj)
                END DO
             END DO
@@ -366,5 +364,5 @@
                   zwz(ji,jj) = (   ( vn(ji+1,jj  ,jk) + vn (ji,jj,jk) ) * ( e2v(ji+1,jj  ) - e2v(ji,jj) )       &
                        &         - ( un(ji  ,jj+1,jk) + un (ji,jj,jk) ) * ( e1u(ji  ,jj+1) - e1u(ji,jj) )   )   &
-                       &     * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) )
+                       &     * 0.5 * r1_e1e2f(ji,jj)
                END DO
             END DO
@@ -374,5 +372,5 @@
                   zwz(ji,jj) = ff(ji,jj) + (  e2v(ji+1,jj  ) * vn(ji+1,jj  ,jk) - e2v(ji,jj) * vn(ji,jj,jk)    &
                      &                      - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) &
-                     &                   / ( e1f(ji,jj) * e2f(ji,jj) )
+                     &                   * r1_e1e2f(ji,jj)
                END DO
             END DO
@@ -383,5 +381,5 @@
                        &     + (   ( vn(ji+1,jj  ,jk) + vn (ji,jj,jk) ) * ( e2v(ji+1,jj  ) - e2v(ji,jj) )       &
                        &         - ( un(ji  ,jj+1,jk) + un (ji,jj,jk) ) * ( e1u(ji  ,jj+1) - e1u(ji,jj) )   )   &
-                       &     * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) )
+                       &     * 0.5 * r1_e1e2f(ji,jj)
                END DO
             END DO
@@ -401,7 +399,7 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zuav = r1_8 / e1u(ji,jj) * ( zwy(ji  ,jj-1) + zwy(ji+1,jj-1)   &
+               zuav = r1_8 * r1_e1u(ji,jj) * ( zwy(ji  ,jj-1) + zwy(ji+1,jj-1)   &
                   &                       + zwy(ji  ,jj  ) + zwy(ji+1,jj  ) )
-               zvau =-r1_8 / e2v(ji,jj) * ( zwx(ji-1,jj  ) + zwx(ji-1,jj+1)   &
+               zvau =-r1_8 * r1_e2v(ji,jj) * ( zwx(ji-1,jj  ) + zwx(ji-1,jj+1)   &
                   &                       + zwx(ji  ,jj  ) + zwx(ji  ,jj+1) )
                pua(ji,jj,jk) = pua(ji,jj,jk) + zuav * ( zwz(ji  ,jj-1) + zwz(ji,jj) )
@@ -501,5 +499,5 @@
                   zwz(ji,jj) = (  e2v(ji+1,jj  ) * vn(ji+1,jj  ,jk) - e2v(ji,jj) * vn(ji,jj,jk)    &
                      &          - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) &
-                     &       / ( e1f(ji,jj) * e2f(ji,jj) ) * r1_e3f(ji,jj,jk)
+                     &       * r1_e1e2f(ji,jj) * r1_e3f(ji,jj,jk)
                END DO
             END DO
@@ -510,5 +508,5 @@
                   zwz(ji,jj) = (   ( vn(ji+1,jj  ,jk) + vn (ji,jj,jk) ) * ( e2v(ji+1,jj  ) - e2v(ji,jj) )       &
                        &         - ( un(ji  ,jj+1,jk) + un (ji,jj,jk) ) * ( e1u(ji  ,jj+1) - e1u(ji,jj) )   )   &
-                       &     * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) ) * r1_e3f(ji,jj,jk)
+                       &     * 0.5 * r1_e1e2f(ji,jj) * r1_e3f(ji,jj,jk)
                END DO
             END DO
@@ -519,5 +517,5 @@
                   zwz(ji,jj) = (  ff(ji,jj) + (  e2v(ji+1,jj  ) * vn(ji+1,jj  ,jk) - e2v(ji,jj) * vn(ji,jj,jk)    &
                      &                      - e1u(ji  ,jj+1) * un(ji  ,jj+1,jk) + e1u(ji,jj) * un(ji,jj,jk)  ) &
-                     &                      / ( e1f(ji,jj) * e2f(ji,jj) )    ) * r1_e3f(ji,jj,jk)
+                     &                      * r1_e1e2f(ji,jj)    ) * r1_e3f(ji,jj,jk)
                END DO
             END DO
@@ -529,5 +527,5 @@
                        &        + (   ( vn(ji+1,jj  ,jk) + vn (ji,jj,jk) ) * ( e2v(ji+1,jj  ) - e2v(ji,jj) )       &
                        &            - ( un(ji  ,jj+1,jk) + un (ji,jj,jk) ) * ( e1u(ji  ,jj+1) - e1u(ji,jj) )   )   &
-                       &        * 0.5 / ( e1f(ji,jj) * e2f(ji,jj) )   ) * r1_e3f(ji,jj,jk)
+                       &        * 0.5 * r1_e1e2f(ji,jj)   ) * r1_e3f(ji,jj,jk)
                END DO
             END DO
@@ -560,8 +558,8 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zua = + r1_12 / e1u(ji,jj) * (  ztne(ji,jj  ) * zwy(ji  ,jj  ) + ztnw(ji+1,jj) * zwy(ji+1,jj  )   &
-                  &                          + ztse(ji,jj  ) * zwy(ji  ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) )
-               zva = - r1_12 / e2v(ji,jj) * (  ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji  ,jj+1)   &
-                  &                          + ztnw(ji,jj  ) * zwx(ji-1,jj  ) + ztne(ji,jj  ) * zwx(ji  ,jj  ) )
+               zua = + r1_12 * r1_e1u(ji,jj) * (  ztne(ji,jj  ) * zwy(ji  ,jj  ) + ztnw(ji+1,jj) * zwy(ji+1,jj  )   &
+                  &                             + ztse(ji,jj  ) * zwy(ji  ,jj-1) + ztsw(ji+1,jj) * zwy(ji+1,jj-1) )
+               zva = - r1_12 * r1_e2v(ji,jj) * (  ztsw(ji,jj+1) * zwx(ji-1,jj+1) + ztse(ji,jj+1) * zwx(ji  ,jj+1)   &
+                  &                             + ztnw(ji,jj  ) * zwx(ji-1,jj  ) + ztne(ji,jj  ) * zwx(ji  ,jj  ) )
                pua(ji,jj,jk) = pua(ji,jj,jk) + zua
                pva(ji,jj,jk) = pva(ji,jj,jk) + zva
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynzad.F90	(revision 4616)
@@ -47,6 +47,6 @@
       !!
       !! ** Method  :   The now vertical advection of momentum is given by:
-      !!         w dz(u) = ua + 1/(e1u*e2u*e3u) mk+1[ mi(e1t*e2t*wn) dk(un) ]
-      !!         w dz(v) = va + 1/(e1v*e2v*e3v) mk+1[ mj(e1t*e2t*wn) dk(vn) ]
+      !!         w dz(u) = ua + 1/(e1e2u*e3u) mk+1[ mi(e1e2t*wn) dk(un) ]
+      !!         w dz(v) = va + 1/(e1e2v*e3v) mk+1[ mj(e1e2t*wn) dk(vn) ]
       !!      Add this trend to the general trend (ua,va):
       !!         (ua,va) = (ua,va) + w dz(u,v)
@@ -83,5 +83,5 @@
          DO jj = 2, jpj                   ! vertical fluxes 
             DO ji = fs_2, jpi             ! vector opt.
-               zww(ji,jj) = 0.25 * e1t(ji,jj) * e2t(ji,jj) * wn(ji,jj,jk)
+               zww(ji,jj) = 0.25 * e1e2t(ji,jj) * wn(ji,jj,jk)
             END DO
          END DO
@@ -106,6 +106,6 @@
             DO ji = fs_2, fs_jpim1       ! vector opt.
                !                         ! vertical momentum advective trends
-               zua = - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) / ( e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) )
-               zva = - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) / ( e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) )
+               zua = - ( zwuw(ji,jj,jk) + zwuw(ji,jj,jk+1) ) / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
+               zva = - ( zwvw(ji,jj,jk) + zwvw(ji,jj,jk+1) ) / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
                !                         ! add the trends to the general momentum trends
                ua(ji,jj,jk) = ua(ji,jj,jk) + zua
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 4616)
@@ -39,5 +39,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -101,11 +101,6 @@
 
       IF( ln_bfrimp ) THEN
-# if defined key_vectopt_loop
-         DO jj = 1, 1
-            DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
-# else
          DO jj = 2, jpjm1
             DO ji = 2, jpim1
-# endif
                ikbu = mbku(ji,jj)       ! ocean bottom level at u- and v-points 
                ikbv = mbkv(ji,jj)       ! (deepest ocean u- and v-points)
@@ -352,17 +347,12 @@
       !! restore bottom layer avmu(v) 
       IF( ln_bfrimp ) THEN
-# if defined key_vectopt_loop
-      DO jj = 1, 1
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
-# else
-      DO jj = 2, jpjm1
-         DO ji = 2, jpim1
-# endif
-            ikbu = mbku(ji,jj)         ! ocean bottom level at u- and v-points 
-            ikbv = mbkv(ji,jj)         ! (deepest ocean u- and v-points)
-            avmu(ji,jj,ikbu+1) = 0.e0
-            avmv(ji,jj,ikbv+1) = 0.e0
-         END DO
-      END DO
+         DO jj = 2, jpjm1
+            DO ji = 2, jpim1
+               ikbu = mbku(ji,jj)         ! ocean bottom level at u- and v-points 
+               ikbv = mbkv(ji,jj)         ! (deepest ocean u- and v-points)
+               avmu(ji,jj,ikbu+1) = 0._wp
+               avmv(ji,jj,ikbv+1) = 0._wp
+            END DO
+         END DO
       ENDIF
       !
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 4616)
@@ -194,5 +194,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zhdiv(ji,jj,jk) = r1_e12t(ji,jj) * ( un_td(ji,jj,jk) - un_td(ji-1,jj,jk) + vn_td(ji,jj,jk) - vn_td(ji,jj-1,jk) )
+                  zhdiv(ji,jj,jk) = r1_e1e2t(ji,jj) * ( un_td(ji,jj,jk) - un_td(ji-1,jj,jk) + vn_td(ji,jj,jk) - vn_td(ji,jj-1,jk) )
                END DO
             END DO
@@ -232,5 +232,5 @@
          CALL wrk_alloc( jpi, jpj, jpk, z3d ) 
          ! Caution: in the VVL case, it only correponds to the baroclinic mass transport.
-         z2d(:,:) = rau0 * e12t(:,:)
+         z2d(:,:) = rau0 * e1e2t(:,:)
          DO jk = 1, jpk
             z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:)
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/FLO/flo4rk.F90	(revision 4616)
@@ -261,5 +261,5 @@
                      &   (  tcoef1(ki) * ub(iidu(jfl,jind1),ijdu(jfl,jind2),ikdu(jfl,jind3)) +   &
                      &      tcoef2(ki) * un(iidu(jfl,jind1),ijdu(jfl,jind2),ikdu(jfl,jind3)) )   &
-                     &      / e1u(iidu(jfl,jind1),ijdu(jfl,jind2)) 
+                     &      * r1_e1u(iidu(jfl,jind1),ijdu(jfl,jind2)) 
                END DO
             END DO
@@ -345,5 +345,5 @@
                      &   ( tcoef1(ki) * vb(iidv(jfl,jind1),ijdv(jfl,jind2),ikdv(jfl,jind3))  +   &
                      &     tcoef2(ki) * vn(iidv(jfl,jind1),ijdv(jfl,jind2),ikdv(jfl,jind3)) )    & 
-                     &     / e2v(iidv(jfl,jind1),ijdv(jfl,jind2))
+                     &     * r1_e2v(iidv(jfl,jind1),ijdv(jfl,jind2))
                END DO
             END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/FLO/floblk.F90	(revision 4616)
@@ -125,5 +125,5 @@
 
             ! for a isobar float zsurfz is put to zero. The vertical velocity will be zero too.
-            zsurfz = e1t(iiloc(jfl),ijloc(jfl)) * e2t(iiloc(jfl),ijloc(jfl))
+            zsurfz = e1e2t(iiloc(jfl),ijloc(jfl))
             zvol   = zsurfz * fse3t(iiloc(jfl),ijloc(jfl),-ikl(jfl))
 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/FLO/flodom.F90	(revision 4616)
@@ -236,6 +236,6 @@
 
             ! Translation of this distances (in meter) in indexes
-            zgifl(jfl)= (iimfl(jfl)-0.5) + zdxab/e1u(iimfl(jfl)-1,ijmfl(jfl)) + (mig(1)-jpizoom)
-            zgjfl(jfl)= (ijmfl(jfl)-0.5) + zdyad/e2v(iimfl(jfl),ijmfl(jfl)-1) + (mjg(1)-jpjzoom)
+            zgifl(jfl)= (iimfl(jfl)-0.5) + zdxab*r1_e1u(iimfl(jfl)-1,ijmfl(jfl)) + (mig(1)-jpizoom)
+            zgjfl(jfl)= (ijmfl(jfl)-0.5) + zdyad*r1_e2v(iimfl(jfl),ijmfl(jfl)-1) + (mjg(1)-jpjzoom)
             zgkfl(jfl) = (( fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1) - flzz(jfl) )* ikmfl(jfl))   &
                &                 / (  fsdepw(iimfl(jfl),ijmfl(jfl),ikmfl(jfl)+1)                              &
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ICB/icbthm.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ICB/icbthm.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ICB/icbthm.F90	(revision 4616)
@@ -1,4 +1,3 @@
 MODULE icbthm
-
    !!======================================================================
    !!                       ***  MODULE  icbthm  ***
@@ -11,7 +10,7 @@
    !!            -    !  2011-05  (Alderson)       Use tmask instead of tmask_i
    !!----------------------------------------------------------------------
-   !!----------------------------------------------------------------------
-   !!   icb_thm : initialise
-   !!             reference for equations - M = Martin + Adcroft, OM 34, 2010
+   
+   !!----------------------------------------------------------------------
+   !!   icb_thm : initialise (reference for equations - M = Martin + Adcroft, OM 34, 2010)
    !!----------------------------------------------------------------------
    USE par_oce        ! NEMO parameters
@@ -21,5 +20,5 @@
    USE phycst         ! NEMO physical constants
    USE sbc_oce
-
+   !
    USE icb_oce        ! define iceberg arrays
    USE icbutl         ! iceberg utility routines
@@ -31,4 +30,9 @@
    PUBLIC   icb_thm ! routine called in icbstp.F90 module
 
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
+   !! $Id: cla.F90 4596 2014-03-26 11:02:30Z gm $
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
 CONTAINS
 
@@ -155,5 +159,5 @@
          ! use tmask rather than tmask_i when dealing with icebergs
          IF( tmask(ii,ij,1) /= 0._wp ) THEN    ! Add melting to the grid and field diagnostics
-            z1_e1e2    = 1._wp / e1e2t(ii,ij) * this%mass_scaling
+            z1_e1e2    = r1_e1e2t(ii,ij) * this%mass_scaling
             z1_dt_e1e2 = z1_dt * z1_e1e2
             zmelt    = ( zdM - ( zdMbitsE - zdMbitsM ) ) * z1_dt   ! kg/s
@@ -194,5 +198,5 @@
             !
          ELSE                            ! Diagnose mass distribution on grid
-            z1_e1e2 = 1._wp / e1e2t(ii,ij) * this%mass_scaling
+            z1_e1e2 = r1_e1e2t(ii,ij) * this%mass_scaling
             CALL icb_dia_size( ii, ij, zWn, zLn, zAbits,   &
             &                  this%mass_scaling, zMnew, znMbits, z1_e1e2)
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90	(revision 4616)
@@ -73,5 +73,5 @@
 
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
@@ -812,12 +812,8 @@
                IF( zofs /= 0. )   pv_r1d(:) = pv_r1d(:) + zofs
             ELSEIF( PRESENT(pv_r2d) ) THEN
-!CDIR COLLAPSE
                IF( zscf /= 1.)   pv_r2d(:,:) = pv_r2d(:,:) * zscf
-!CDIR COLLAPSE
                IF( zofs /= 0.)   pv_r2d(:,:) = pv_r2d(:,:) + zofs
             ELSEIF( PRESENT(pv_r3d) ) THEN
-!CDIR COLLAPSE
                IF( zscf /= 1.)   pv_r3d(:,:,:) = pv_r3d(:,:,:) * zscf
-!CDIR COLLAPSE
                IF( zofs /= 0.)   pv_r3d(:,:,:) = pv_r3d(:,:,:) + zofs
             ENDIF
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/LBC/cla.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/LBC/cla.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/LBC/cla.F90	(revision 4616)
@@ -316,9 +316,9 @@
             DO ji = mi0(161), mi1(161)         !------------------------------
                DO jk = 1, 8                        ! surface in/out flow   (Ind -> Red)   (div >0)
-                  hdiv_161_88(jk) = + zio_flow / ( 8. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_161_88(jk) = + zio_flow / ( 8. * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
                !                                   ! recirculation water   (Ind -> Red)   (div >0)
-               hdiv_161_88(20) =                 + zrecirc_upp   / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,20) )
-               hdiv_161_88(21) = + ( zrecirc_bot - zrecirc_upp ) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,21) )
+               hdiv_161_88(20) =                 + zrecirc_upp   / ( e1e2t(ji,jj) * fse3t(ji,jj,20) )
+               hdiv_161_88(21) = + ( zrecirc_bot - zrecirc_upp ) / ( e1e2t(ji,jj) * fse3t(ji,jj,21) )
             END DO
          END DO
@@ -327,5 +327,5 @@
             DO ji = mi0(161), mi1(161)         !------------------------------
                !                                   ! deep out flow + recirculation   (Red -> Ind)   (div <0)
-               hdiv_161_87(21) = - ( zio_flow + zrecirc_bot ) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,21) )
+               hdiv_161_87(21) = - ( zio_flow + zrecirc_bot ) / ( e1e2t(ji,jj) * fse3t(ji,jj,21) )
             END DO
          END DO
@@ -334,8 +334,8 @@
             DO ji = mi0(160), mi1(160)         !------------------------------
                DO jk = 1, 8                        ! surface inflow    (Ind -> Red)   (div <0)
-                  hdiv_160_89(jk) = - zio_flow / ( 8. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_160_89(jk) = - zio_flow / ( 8. * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
                !                                   ! deep    outflow   (Red -> Ind)   (div >0)
-               hdiv_160_89(16)    = + zio_flow / (      e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,16) )
+               hdiv_160_89(16)    = + zio_flow / (      e1e2t(ji,jj) * fse3t(ji,jj,16) )
             END DO
          END DO
@@ -347,5 +347,5 @@
          DO jj = mj0(87), mj1(96)                  ! sum over the Red sea
             DO ji = mi0(148), mi1(160) 
-               zemp_red = zemp_red + emp(ji,jj) * e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj)
+               zemp_red = zemp_red + emp(ji,jj) * e1e2t(ji,jj) * tmask_i(ji,jj)
             END DO
          END DO
@@ -421,18 +421,15 @@
          DO jj = mj0(88), mj1(88)              !** (160,88)   (Gulf of Aden side, north point)
             DO ji = mi0(160), mi1(160)                   ! 160, not 161 as it is a U-point) 
-               ua(ji,jj,:) = - hdiv_161_88_kt(:) / ( e1t(ji+1,jj) * e2t(ji+1,jj) * fse3t(ji+1,jj,:) )   &
-                  &                              * e2u(ji,jj) * fse3u(ji,jj,:)
+               ua(ji,jj,:) = - hdiv_161_88_kt(:) / ( e1e2t(ji+1,jj) * fse3t(ji+1,jj,:) ) * e2u(ji,jj) * fse3u(ji,jj,:)
             END DO
          END DO
          DO jj = mj0(87), mj1(87)              !** (160,87)   (Gulf of Aden side, south point)
             DO ji = mi0(160), mi1(160)                   ! 160, not 161 as it is a U-point) 
-               ua(ji,jj,:) = - hdiv_161_87(:) / ( e1t(ji+1,jj) * e2t(ji+1,jj) * fse3t(ji+1,jj,:) )   &
-                  &                           * e2u(ji,jj) * fse3u(ji,jj,:)
+               ua(ji,jj,:) = - hdiv_161_87(:) / ( e1e2t(ji+1,jj) * fse3t(ji+1,jj,:) ) * e2u(ji,jj) * fse3u(ji,jj,:)
             END DO
          END DO
          DO jj = mj0(88), mj1(88)              !** profile of divergence at (160,89)   (Red sea side)
             DO ji = mi0(160), mi1(160)                   ! 88, not 89 as it is a V-point)
-               va(ji,jj,:) = - hdiv_160_89_kt(:) / ( e1t(ji,jj+1) * e2t(ji,jj+1) * fse3t(ji,jj+1,:) )   &
-                  &                              * e1v(ji,jj) * fse3v(ji,jj,:)
+               va(ji,jj,:) = - hdiv_160_89_kt(:) / ( e1e2t(ji,jj+1) * fse3t(ji,jj+1,:) ) * e1v(ji,jj) * fse3v(ji,jj,:)
             END DO
          END DO
@@ -492,14 +489,14 @@
             DO ji = mi0(139), mi1(139)         !-----------------------------
                DO jk = 1, 14                        ! surface in/out flow (Atl -> Med)   (div >0)
-                  hdiv_139_101(jk) = + zio_flow / ( 14. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_139_101(jk) = + zio_flow / ( 14. * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
                DO jk = 15, 20                       ! middle  reciculation (Atl 101 -> Atl 102)   (div >0)   
-                  hdiv_139_101(jk) = + zrecirc_mid / ( 6. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_139_101(jk) = + zrecirc_mid / ( 6. * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
                !                                    ! upper reciculation (Atl 101 -> Atl 101)   (div >0)
-               hdiv_139_101(21) =               + zrecirc_upp / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+               hdiv_139_101(21) =               + zrecirc_upp / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                !
                !                                    ! upper & bottom reciculation (Atl 101 -> Atl 101 & 102)   (div >0)
-               hdiv_139_101(22) = ( zrecirc_bot - zrecirc_upp ) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+               hdiv_139_101(22) = ( zrecirc_bot - zrecirc_upp ) / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
             END DO
          END DO
@@ -507,8 +504,8 @@
             DO ji = mi0(139), mi1(139)         !-----------------------------
                DO jk = 15, 20                       ! middle reciculation (Atl 101 -> Atl 102)   (div <0)                
-                  hdiv_139_102(jk) = - zrecirc_mid / ( 6. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_139_102(jk) = - zrecirc_mid / ( 6. * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
                !                                    ! outflow of Mediterranean sea + deep recirculation   (div <0) 
-               hdiv_139_102(22) = - ( zio_flow + zrecirc_bot ) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+               hdiv_139_102(22) = - ( zio_flow + zrecirc_bot ) / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
             END DO
          END DO
@@ -516,8 +513,8 @@
             DO ji = mi0(141), mi1(141)         !------------------------------
                DO  jk = 1, 14                       ! surface inflow in the Med     (div <0)
-                  hdiv_141_102(jk) = - zio_flow / ( 14. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_141_102(jk) = - zio_flow / ( 14. * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
                !                                    ! deep    outflow toward the Atlantic    (div >0) 
-               hdiv_141_102(21)    = + zio_flow / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+               hdiv_141_102(21)    = + zio_flow / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
             END DO
          END DO
@@ -529,13 +526,13 @@
          DO jj = mj0(96), mj1(110)                  ! sum over the Med sea
             DO ji = mi0(141),mi1(181)
-               zemp_med = zemp_med + emp(ji,jj) * e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj) 
+               zemp_med = zemp_med + emp(ji,jj) * e1e2t(ji,jj) * tmask_i(ji,jj) 
             END DO
          END DO
          DO jj = mj0(96), mj1(96)                   ! minus 2 points in Red Sea 
             DO ji = mi0(148),mi1(148)
-               zemp_med = zemp_med - emp(ji,jj) * e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj)
+               zemp_med = zemp_med - emp(ji,jj) * e1e2t(ji,jj) * tmask_i(ji,jj)
             END DO
             DO ji = mi0(149),mi1(149)
-               zemp_med = zemp_med - emp(ji,jj) * e1t(ji,jj) * e2t(ji,jj) * tmask_i(ji,jj)
+               zemp_med = zemp_med - emp(ji,jj) * e1e2t(ji,jj) * tmask_i(ji,jj)
             END DO
          END DO
@@ -549,5 +546,5 @@
                hdiv_139_101_kt(:) = hdiv_139_101(:)      
                DO jk = 1, 14                              ! increase the inflow from the Atlantic   (div >0) 
-                  hdiv_139_101_kt(jk) = hdiv_139_101(jk) + zemp_med / ( 14. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_139_101_kt(jk) = hdiv_139_101(jk) + zemp_med / ( 14. * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
                hdivn(ji, jj,:) = hdivn(ji, jj,:) + hdiv_139_101_kt(:)
@@ -563,5 +560,5 @@
                hdiv_141_102(:) = hdiv_141_102(:)
                DO jk = 1, 14                              ! increase the inflow from the Atlantic   (div <0)
-                  hdiv_141_102_kt(jk) = hdiv_141_102(jk) - zemp_med / ( 14. * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_141_102_kt(jk) = hdiv_141_102(jk) - zemp_med / ( 14. * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
                hdivn(ji, jj,:) = hdivn(ji, jj,:) + hdiv_141_102_kt(:)
@@ -616,18 +613,15 @@
          DO jj = mj0(101), mj1(101)            !** 139,101 (Atlantic side, south point)
             DO ji = mi0(139), mi1(139)                    ! div >0 => ua >0, same sign
-               ua(ji,jj,:) = hdiv_139_101_kt(:) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,:) )   &
-                  &                             * e2u(ji,jj) * fse3u(ji,jj,:)
+               ua(ji,jj,:) = hdiv_139_101_kt(:) / ( e1e2t(ji,jj) * fse3t(ji,jj,:) ) * e2u(ji,jj) * fse3u(ji,jj,:)
             END DO
          END DO
          DO jj = mj0(102), mj1(102)            !** 139,102 (Atlantic side, north point)
             DO ji = mi0(139), mi1(139)                    ! div <0 => ua <0, same sign
-               ua(ji,jj,:) = hdiv_139_102(:) / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,:) )   &
-                  &                          * e2u(ji,jj) * fse3u(ji,jj,:)   
+               ua(ji,jj,:) = hdiv_139_102(:) / ( e1e2t(ji,jj) * fse3t(ji,jj,:) ) * e2u(ji,jj) * fse3u(ji,jj,:)   
             END DO
          END DO
          DO jj = mj0(102), mj1(102)            !** 140,102 (Med side) (140 not 141 as it is a U-point)
             DO ji = mi0(140), mi1(140)                    ! div >0 => ua <0, opposite sign
-               ua(ji,jj,:) = - hdiv_141_102(:) / ( e1t(ji+1,jj) * e2t(ji+1,jj) * fse3t(ji+1,jj,:) )   &
-                  &                            * e2u(ji,jj) * fse3u(ji,jj,:)
+               ua(ji,jj,:) = - hdiv_141_102(:) / ( e1e2t(ji+1,jj) * fse3t(ji+1,jj,:) ) * e2u(ji,jj) * fse3u(ji,jj,:)
             END DO
          END DO
@@ -675,8 +669,8 @@
             DO ji = mi0(172), mi1(172) 
                DO jk = 1, 8                            ! surface inflow  (Indian ocean to Persian Gulf) (div<0)
-                  hdiv_172_94(jk) = - ( zio_flow / 8.e0 * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_172_94(jk) = - ( zio_flow / 8.e0 * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
                DO jk = 16, 18                          ! deep    outflow (Persian Gulf to Indian ocean) (div>0)
-                  hdiv_172_94(jk) = + ( zio_flow / 3.e0 * e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  hdiv_172_94(jk) = + ( zio_flow / 3.e0 * e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                END DO
             END DO
@@ -722,6 +716,5 @@
          DO jj = mj0(94), mj1(94)              !** 171,94 (Indian ocean side) (171 not 172 as it is the western U-point)
             DO ji = mi0(171), mi1(171)                ! div >0 => ua >0, opposite sign
-               ua(ji,jj,:) = - hdiv_172_94(:) / ( e1t(ji+1,jj) * e2t(ji+1,jj) * fse3t(ji+1,jj,:) )   &
-                  &                           * e2u(ji,jj) * fse3u(ji,jj,:)
+               ua(ji,jj,:) = - hdiv_172_94(:) / ( e1e2t(ji+1,jj) * fse3t(ji+1,jj,:) ) * e2u(ji,jj) * fse3u(ji,jj,:)
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/LDF/ldfslp.F90	(revision 4616)
@@ -144,11 +144,6 @@
       END DO
       IF( ln_zps ) THEN                           ! partial steps correction at the bottom ocean level
-# if defined key_vectopt_loop
-         DO jj = 1, 1
-            DO ji = 1, jpij-jpi   ! vector opt. (forced unrolling)
-# else
          DO jj = 1, jpjm1
             DO ji = 1, jpim1
-# endif
                zgru(ji,jj,mbku(ji,jj)) = gru(ji,jj)
                zgrv(ji,jj,mbkv(ji,jj)) = grv(ji,jj)
@@ -179,6 +174,6 @@
             DO ji = fs_2, fs_jpim1   ! vector opt.
                !                                      ! horizontal and vertical density gradient at u- and v-points
-               zau = zgru(ji,jj,jk) / e1u(ji,jj)
-               zav = zgrv(ji,jj,jk) / e2v(ji,jj)
+               zau = zgru(ji,jj,jk) * r1_e1u(ji,jj)
+               zav = zgrv(ji,jj,jk) * r1_e2v(ji,jj)
                zbu = 0.5_wp * ( zdzr(ji,jj,jk) + zdzr(ji+1,jj  ,jk) )
                zbv = 0.5_wp * ( zdzr(ji,jj,jk) + zdzr(ji  ,jj+1,jk) )
@@ -433,6 +428,6 @@
                   zdjt = ( tsb(ji,jj+1,jk,jp_tem) - tsb(ji,jj,jk,jp_tem) )    ! j-gradient of T & S at v-point
                   zdjs = ( tsb(ji,jj+1,jk,jp_sal) - tsb(ji,jj,jk,jp_sal) )
-                  zdxrho_raw = ( - zalbet(ji+ip,jj   ,jk) * zdit + zbeta0*zdis ) / e1u(ji,jj)
-                  zdyrho_raw = ( - zalbet(ji   ,jj+jp,jk) * zdjt + zbeta0*zdjs ) / e2v(ji,jj)
+                  zdxrho_raw = ( - zalbet(ji+ip,jj   ,jk) * zdit + zbeta0*zdis ) * r1_e1u(ji,jj)
+                  zdyrho_raw = ( - zalbet(ji   ,jj+jp,jk) * zdjt + zbeta0*zdjs ) * r1_e2v(ji,jj)
                   zdxrho(ji+ip,jj   ,jk,1-ip) = SIGN(  MAX( repsln, ABS( zdxrho_raw ) ), zdxrho_raw  )   ! keep the sign
                   zdyrho(ji   ,jj+jp,jk,1-jp) = SIGN(  MAX( repsln, ABS( zdyrho_raw ) ), zdyrho_raw  )
@@ -447,6 +442,6 @@
                   zdit = gtsu(ji,jj,jp_tem)   ;   zdjt = gtsv(ji,jj,jp_tem)      ! i- & j-gradient of Temperature
                   zdis = gtsu(ji,jj,jp_sal)   ;   zdjs = gtsv(ji,jj,jp_sal)      ! i- & j-gradient of Salinity
-                  zdxrho_raw = ( - zalbet(ji+ip,jj   ,iku) * zdit + zbeta0*zdis ) / e1u(ji,jj)
-                  zdyrho_raw = ( - zalbet(ji   ,jj+jp,ikv) * zdjt + zbeta0*zdjs ) / e2v(ji,jj)
+                  zdxrho_raw = ( - zalbet(ji+ip,jj   ,iku) * zdit + zbeta0*zdis ) * r1_e1u(ji,jj)
+                  zdyrho_raw = ( - zalbet(ji   ,jj+jp,ikv) * zdjt + zbeta0*zdjs ) * r1_e2v(ji,jj)
                   zdxrho(ji+ip,jj   ,iku,1-ip) = SIGN( MAX( repsln, ABS( zdxrho_raw ) ), zdxrho_raw )   ! keep the sign
                   zdyrho(ji   ,jj+jp,ikv,1-jp) = SIGN( MAX( repsln, ABS( zdyrho_raw ) ), zdyrho_raw )
@@ -468,6 +463,6 @@
                      zdks = 0._wp
                   ENDIF
-                  zdzrho_raw = ( - zalbet(ji   ,jj   ,jk) * zdkt + zbeta0*zdks ) / fse3w(ji,jj,jk+kp)
-                  zdzrho(ji   ,jj   ,jk,  kp) =     - MIN( - repsln,      zdzrho_raw )    ! force zdzrho >= repsln
+                  zdzrho_raw = ( - zalbet(ji,jj,jk) * zdkt + zbeta0*zdks ) / fse3w(ji,jj,jk+kp)
+                  zdzrho(ji,jj,jk,kp) = - MIN( - repsln , zdzrho_raw )    ! force zdzrho >= repsln
                  END DO
             END DO
@@ -507,6 +502,6 @@
                      ! Add s-coordinate slope at t-points (do this by *subtracting* gradient of depth)
                      zti_g_raw = (  zdxrho(ji+ip,jj,jk-kp,1-ip) / zdzrho(ji+ip,jj,jk-kp,kp)      &
-                        &          - ( fsdept(ji+1,jj,jk-kp) - fsdept(ji,jj,jk-kp) ) / e1u(ji,jj)  ) * umask(ji,jj,jk)
-                     ze3_e1    =  fse3w(ji+ip,jj,jk-kp) / e1u(ji,jj) 
+                        &          - ( fsdept(ji+1,jj,jk-kp) - fsdept(ji,jj,jk-kp) ) * r1_e1u(ji,jj)  ) * umask(ji,jj,jk)
+                     ze3_e1    =  fse3w(ji+ip,jj,jk-kp) * r1_e1u(ji,jj) 
                      zti_mlb(ji+ip,jj   ,1-ip,kp) = SIGN( MIN( rn_slpmax, 5.0_wp * ze3_e1  , ABS( zti_g_raw ) ), zti_g_raw )
                   ENDIF
@@ -550,11 +545,11 @@
                      !
                      ! Must mask contribution to slope for triad jk=1,kp=0 that poke up though ocean surface
-                     zti_coord = znot_thru_surface * ( fsdept(ji+1,jj  ,jk) - fsdept(ji,jj,jk) ) / e1u(ji,jj)
-                     ztj_coord = znot_thru_surface * ( fsdept(ji  ,jj+1,jk) - fsdept(ji,jj,jk) ) / e2v(ji,jj)                  ! unmasked
+                     zti_coord = znot_thru_surface * ( fsdept(ji+1,jj  ,jk) - fsdept(ji,jj,jk) ) * r1_e1u(ji,jj)
+                     ztj_coord = znot_thru_surface * ( fsdept(ji  ,jj+1,jk) - fsdept(ji,jj,jk) ) * r1_e2v(ji,jj)     ! unmasked
                      zti_g_raw = zti_raw - zti_coord      ! ref to geopot surfaces
                      ztj_g_raw = ztj_raw - ztj_coord
                      ! additional limit required in bilaplacian case
-                     ze3_e1    = fse3w(ji+ip,jj   ,jk+kp) / e1u(ji,jj)
-                     ze3_e2    = fse3w(ji   ,jj+jp,jk+kp) / e2v(ji,jj)
+                     ze3_e1    = fse3w(ji+ip,jj   ,jk+kp) * r1_e1u(ji,jj)
+                     ze3_e2    = fse3w(ji   ,jj+jp,jk+kp) * r1_e2v(ji,jj)
                      ! NB: hard coded factor 5 (can be a namelist parameter...)
                      zti_g_lim = SIGN( MIN( rn_slpmax, 5.0_wp * ze3_e1, ABS( zti_g_raw ) ), zti_g_raw )
@@ -602,8 +597,8 @@
 #endif
                      !
-                     zbu  = e1u(ji,jj) * e2u(ji,jj) * fse3u(ji   ,jj   ,jk   )
-                     zbv  = e1v(ji,jj) * e2v(ji,jj) * fse3v(ji   ,jj   ,jk   )
-                     zbti = e1e2t(ji+ip,jj   )      * fse3w(ji+ip,jj   ,jk+kp)
-                     zbtj = e1e2t(ji   ,jj+jp)      * fse3w(ji   ,jj+jp,jk+kp)
+                     zbu  = e1e2u(ji   ,jj   ) * fse3u(ji   ,jj   ,jk   )
+                     zbv  = e1e2v(ji   ,jj   ) * fse3v(ji   ,jj   ,jk   )
+                     zbti = e1e2t(ji+ip,jj   ) * fse3w(ji+ip,jj   ,jk+kp)
+                     zbtj = e1e2t(ji   ,jj+jp) * fse3w(ji   ,jj+jp,jk+kp)
                      !
                      !!gm this may inhibit vectorization on Vect Computers, and even on scalar computers....  ==> to be checked
@@ -673,11 +668,6 @@
       !                                            !==   surface mixed layer mask   !
       DO jk = 1, jpk                               ! =1 inside the mixed layer, =0 otherwise
-# if defined key_vectopt_loop
-         DO jj = 1, 1
-            DO ji = 1, jpij                        ! vector opt. (forced unrolling)
-# else
          DO jj = 1, jpj
             DO ji = 1, jpi
-# endif
                ik = nmln(ji,jj) - 1
                IF( jk <= ik ) THEN   ;   omlmask(ji,jj,jk) = 1._wp
@@ -699,11 +689,6 @@
       !-----------------------------------------------------------------------
       !
-# if defined key_vectopt_loop
-      DO jj = 1, 1
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
-# else
       DO jj = 2, jpjm1
          DO ji = 2, jpim1
-# endif
             !                        !==   Slope at u- & v-points just below the Mixed Layer   ==!
             !
@@ -714,6 +699,6 @@
             zbv = 0.5_wp * ( p_dzr(ji,jj,ikv) + p_dzr(ji  ,jj+1,ikv) )
             !                        !- horizontal density gradient at u- & v-points
-            zau = p_gru(ji,jj,iku) / e1u(ji,jj)
-            zav = p_grv(ji,jj,ikv) / e2v(ji,jj)
+            zau = p_gru(ji,jj,iku) * r1_e1u(ji,jj)
+            zav = p_grv(ji,jj,ikv) * r1_e2v(ji,jj)
             !                        !- bound the slopes: abs(zw.)<= 1/100 and zb..<0
             !                           kxz max= ah slope max =< e1 e3 /(pi**2 2 dt)
@@ -816,8 +801,8 @@
 !               DO jj = 2, jpjm1
 !                  DO ji = fs_2, fs_jpim1   ! vector opt.
-!                     uslp (ji,jj,jk) = -1./e1u(ji,jj) * ( fsdept(ji+1,jj,jk) - fsdept(ji ,jj ,jk) ) * umask(ji,jj,jk)
-!                     vslp (ji,jj,jk) = -1./e2v(ji,jj) * ( fsdept(ji,jj+1,jk) - fsdept(ji ,jj ,jk) ) * vmask(ji,jj,jk)
-!                     wslpi(ji,jj,jk) = -1./e1t(ji,jj) * ( fsdepw(ji+1,jj,jk) - fsdepw(ji-1,jj,jk) ) * tmask(ji,jj,jk) * 0.5
-!                     wslpj(ji,jj,jk) = -1./e2t(ji,jj) * ( fsdepw(ji,jj+1,jk) - fsdepw(ji,jj-1,jk) ) * tmask(ji,jj,jk) * 0.5
+!                     uslp (ji,jj,jk) = - ( fsdept(ji+1,jj,jk) - fsdept(ji ,jj ,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk)
+!                     vslp (ji,jj,jk) = - ( fsdept(ji,jj+1,jk) - fsdept(ji ,jj ,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk)
+!                     wslpi(ji,jj,jk) = - ( fsdepw(ji+1,jj,jk) - fsdepw(ji-1,jj,jk) ) * r1_e1t(ji,jj) * tmask(ji,jj,jk) * 0.5
+!                     wslpj(ji,jj,jk) = - ( fsdepw(ji,jj+1,jk) - fsdepw(ji,jj-1,jk) ) * r1_e2t(ji,jj) * tmask(ji,jj,jk) * 0.5
 !                  END DO
 !               END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_smag.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_smag.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra_smag.F90	(revision 4616)
@@ -106,13 +106,13 @@
          !
          DO jk = 1 , jpkm1
-            zue2(:,:) = un(:,:,jk) / e2u(:,:)          !!gm  for stability reason use of before instead of now here !!!!
-            zve1(:,:) = vn(:,:,jk) / e1v(:,:)
-            zue1(:,:) = un(:,:,jk) / e1u(:,:)
-            zve2(:,:) = vn(:,:,jk) / e2v(:,:)
+            zue2(:,:) = un(:,:,jk) * r1_e2u(:,:)          !!gm  for stability reason use of before instead of now here !!!!
+            zve1(:,:) = vn(:,:,jk) * r1_e1v(:,:)
+            zue1(:,:) = un(:,:,jk) * r1_e1u(:,:)
+            zve2(:,:) = vn(:,:,jk) * r1_e2v(:,:)
             !
             DO jj = 2, jpj                               !!gm  multiplication by tmask useless as un, vn maked field !
                DO ji= 2, jpi
-                  zux(ji,jj) = ( zue2(ji,jj) - zue2(ji-1,jj  ) ) / e1e2t(ji,jj) * tmask(ji,jj,jk) * zsmsh 
-                  zvy(ji,jj) = ( zve1(ji,jj) - zve1(ji  ,jj-1) ) / e1e2t(ji,jj) * tmask(ji,jj,jk) * zsmsh 
+                  zux(ji,jj) = ( zue2(ji,jj) - zue2(ji-1,jj  ) ) * r1_e1e2t(ji,jj) * tmask(ji,jj,jk) * zsmsh 
+                  zvy(ji,jj) = ( zve1(ji,jj) - zve1(ji  ,jj-1) ) * r1_e1e2t(ji,jj) * tmask(ji,jj,jk) * zsmsh 
                END DO
             END DO
@@ -120,6 +120,6 @@
             DO jj = 1, jpjm1
                DO ji = 1, jpim1
-               zuy(ji,jj) = ( zue1(ji  ,jj+1) - zue1(ji,jj) ) / e2f(ji,jj) *e1f(ji,jj) * fmask(ji,jj,jk)
-               zvx(ji,jj) = ( zve2(ji+1,jj  ) - zve2(ji,jj) ) / e1f(ji,jj) *e2f(ji,jj) * fmask(ji,jj,jk)
+               zuy(ji,jj) = ( zue1(ji  ,jj+1) - zue1(ji,jj) ) * r1_e2f(ji,jj) *e1f(ji,jj) * fmask(ji,jj,jk)
+               zvx(ji,jj) = ( zve2(ji+1,jj  ) - zve2(ji,jj) ) * r1_e1f(ji,jj) *e2f(ji,jj) * fmask(ji,jj,jk)
                END DO
             END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90	(revision 4616)
@@ -23,8 +23,7 @@
    USE netcdf           ! NetCDF library
    USE lib_mpp          ! MPP library
-   USE dom_oce, ONLY : &                  ! Domain variables
-      &                    tmask, tmask_i, e1t, e2t, gphit, glamt
-   USE obs_const, ONLY :   obfillflt      ! Fillvalue
-   USE oce      , ONLY :   sshn           ! Model variables
+   USE dom_oce  , ONLY :   tmask, tmask_i, e1e2t, gphit, glamt ! Domain variables
+   USE obs_const, ONLY :   obfillflt                           ! Fillvalue
+   USE oce      , ONLY :   sshn                                ! Model variables
 
    IMPLICIT NONE
@@ -220,5 +219,5 @@
       DO jj = 1, jpj
          DO ji = 1, jpi
-          zdxdy = e1t(ji,jj) * e2t(ji,jj) * zpromsk(ji,jj)
+          zdxdy = e1e2t(ji,jj) * zpromsk(ji,jj)
           zarea = zarea + zdxdy
           zeta1 = zeta1 + mdt(ji,jj) * zdxdy
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90	(revision 4616)
@@ -281,5 +281,4 @@
                ztinta =  REAL( isecsbc - sd(jf)%nrec_b(2), wp ) / REAL( sd(jf)%nrec_a(2) - sd(jf)%nrec_b(2), wp )
                ztintb =  1. - ztinta
-!CDIR COLLAPSE
                sd(jf)%fnow(:,:,:) = ztintb * sd(jf)%fdta(:,:,:,1) + ztinta * sd(jf)%fdta(:,:,:,2)
             ELSE   ! nothing to do...
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/geo2ocean.F90	(revision 4616)
@@ -195,5 +195,4 @@
 
       DO jj = 2, jpjm1
-!CDIR NOVERRCHK
          DO ji = fs_2, jpi   ! vector opt.
 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 4616)
@@ -168,7 +168,5 @@
       !!---------------------------------------------------------------------
       zcoef = 0.5 / ( zrhoa * zcdrag ) 
-!CDIR NOVERRCHK
       DO jj = 2, jpjm1
-!CDIR NOVERRCHK
          DO ji = fs_2, fs_jpim1   ! vect. opt.
             ztx = utau(ji-1,jj  ) + utau(ji,jj) 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90	(revision 4616)
@@ -271,7 +271,5 @@
       ! module of wind stress and wind speed at T-point
       zcoef = 1. / ( zrhoa * zcdrag ) 
-!CDIR NOVERRCHK
       DO jj = 2, jpjm1
-!CDIR NOVERRCHK
          DO ji = fs_2, fs_jpim1   ! vect. opt.
             ztx = utau(ji-1,jj  ) + utau(ji,jj) 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 4616)
@@ -240,7 +240,5 @@
       !   momentum fluxes  (utau, vtau )   !
       !------------------------------------!
-!CDIR COLLAPSE
       utau(:,:) = sf(jp_utau)%fnow(:,:,1)
-!CDIR COLLAPSE
       vtau(:,:) = sf(jp_vtau)%fnow(:,:,1)
 
@@ -248,7 +246,5 @@
       !   wind stress module (taum )       !
       !------------------------------------!
-!CDIR NOVERRCHK
       DO jj = 2, jpjm1
-!CDIR NOVERRCHK
          DO ji = fs_2, fs_jpim1   ! vector opt.
             ztx2 = utau(ji-1,jj  ) + utau(ji,jj)
@@ -262,5 +258,4 @@
       !   store the wind speed  (wndm )    !
       !------------------------------------!
-!CDIR COLLAPSE
       wndm(:,:) = sf(jp_wndm)%fnow(:,:,1)
 
@@ -274,8 +269,5 @@
       !   Other ocean fluxes   !
       !------------------------!
-!CDIR NOVERRCHK
-!CDIR COLLAPSE
       DO jj = 1, jpj
-!CDIR NOVERRCHK
          DO ji = 1, jpi
             !
@@ -368,9 +360,7 @@
       zcprec = rcp /  rday     ! convert prec ( mm/day ==> m/s)  ==> W/m2
 
-!CDIR COLLAPSE
       emp(:,:) = zqla(:,:) / cevap                                        &   ! freshwater flux
          &     - sf(jp_prec)%fnow(:,:,1) / rday * tmask(:,:,1)
       !
-!CDIR COLLAPSE
       qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)                        &   ! Downward Non Solar flux
          &     - zqla(:,:)             * pst(:,:) * zcevap                &   ! remove evap.   heat content at SST in Celcius
@@ -496,8 +486,5 @@
       !  and the correction factor for taking into account  the effect of clouds 
       !------------------------------------------------------
-!CDIR NOVERRCHK
-!CDIR COLLAPSE
       DO jj = 1, jpj
-!CDIR NOVERRCHK
          DO ji = 1, jpi
             ztatm (ji,jj) = sf(jp_tair)%fnow(ji,jj,1)                ! air temperature in Kelvins 
@@ -546,8 +533,5 @@
       DO jl = 1, ijpl                       !  Loop over ice categories  !
          !                                  ! ========================== !
-!CDIR NOVERRCHK
-!CDIR COLLAPSE
          DO jj = 1 , jpj
-!CDIR NOVERRCHK
             DO ji = 1, jpi
                !-------------------------------------------!
@@ -607,7 +591,5 @@
       ! ----------------------------------------------------------------------------- !
       !
-!CDIR COLLAPSE
       p_qns(:,:,:) = z_qlw (:,:,:) - z_qsb (:,:,:) - p_qla (:,:,:)      ! Downward Non Solar flux
-!CDIR COLLAPSE
       p_tpr(:,:)   = sf(jp_prec)%fnow(:,:,1) / rday                     ! total precipitation [kg/m2/s]
       !
@@ -615,5 +597,4 @@
       !    Correct the OCEAN non solar flux with the existence of solid precipitation !
       ! ---------------=====--------------------------------------------------------- !
-!CDIR COLLAPSE
       qns(:,:) = qns(:,:)                                                           &   ! update the non-solar heat flux with:
          &     - p_spr(:,:) * lfus                                                  &   ! remove melting solid precip
@@ -716,8 +697,5 @@
       ! Saturated water vapour and vapour pressure
       ! ------------------------------------------
-!CDIR NOVERRCHK
-!CDIR COLLAPSE
       DO jj = 1, jpj
-!CDIR NOVERRCHK
          DO ji = 1, jpi
             ztamr = sf(jp_tair)%fnow(ji,jj,1) - rtt
@@ -748,7 +726,5 @@
       zdaycor  = 1.0 + 0.0013 * SIN( zdist ) + 0.0342 * COS( zdist )
 
-!CDIR NOVERRCHK
       DO jj = 1, jpj
-!CDIR NOVERRCHK
          DO ji = 1, jpi
             !  product of sine (cosine) of latitude and sine (cosine) of solar declination
@@ -771,11 +747,7 @@
 
       ! compute and sum ocean qsr over the daylight (i.e. between sunrise and sunset)
-!CDIR NOVERRCHK   
       DO jt = 1, jp24
          zcoef = FLOAT( jt ) - 0.5
-!CDIR NOVERRCHK     
-!CDIR COLLAPSE
          DO jj = 1, jpj
-!CDIR NOVERRCHK
             DO ji = 1, jpi
                zlha = COS(  zlsrise(ji,jj) - zcoef * zdlha(ji,jj)  )                  ! local hour angle
@@ -796,5 +768,4 @@
       ! Taking into account the ellipsity of the earth orbit, the clouds AND masked if sea-ice cover > 0%
       zcoef1 = srgamma * zdaycor / ( 2. * rpi )
-!CDIR COLLAPSE
       DO jj = 1, jpj
          DO ji = 1, jpi
@@ -854,8 +825,5 @@
       ! Saturated water vapour and vapour pressure
       ! ------------------------------------------
-!CDIR NOVERRCHK
-!CDIR COLLAPSE
       DO jj = 1, jpj
-!CDIR NOVERRCHK
          DO ji = 1, jpi           
             ztamr = sf(jp_tair)%fnow(ji,jj,1) - rtt           
@@ -886,7 +854,5 @@
       zdaycor  = 1.0 + 0.0013 * SIN( zdist ) + 0.0342 * COS( zdist )
 
-!CDIR NOVERRCHK
       DO jj = 1, jpj
-!CDIR NOVERRCHK
          DO ji = 1, jpi
             !  product of sine (cosine) of latitude and sine (cosine) of solar declination
@@ -913,11 +879,7 @@
       DO jl = 1, ijpl      !  loop over ice categories  !
          !                 !----------------------------! 
-!CDIR NOVERRCHK   
          DO jt = 1, jp24   
             zcoef = FLOAT( jt ) - 0.5
-!CDIR NOVERRCHK     
-!CDIR COLLAPSE
             DO jj = 1, jpj
-!CDIR NOVERRCHK
                DO ji = 1, jpi
                   zlha = COS(  zlsrise(ji,jj) - zcoef * zdlha(ji,jj)  )                  ! local hour angle
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4616)
@@ -88,5 +88,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO-consortium (2010) 
+   !! NEMO/OPA 3.7 , NEMO-consortium (2014) 
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -125,5 +125,5 @@
       !!----------------------------------------------------------------------
       INTEGER, INTENT(in) ::   kt   ! ocean time step
-      !!
+      !
       INTEGER  ::   ierror   ! return error code
       INTEGER  ::   ifpr     ! dummy loop indice
@@ -141,5 +141,5 @@
          &                  sn_tdif, rn_zqt , ln_bulk2z, rn_zu
       !!---------------------------------------------------------------------
-
+      !
       !                                         ! ====================== !
       IF( kt == nit000 ) THEN                   !  First call kt=nit000  !
@@ -149,5 +149,5 @@
          READ  ( numnam_ref, namsbc_core, IOSTAT = ios, ERR = 901)
 901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_core in reference namelist', lwp )
-
+         !
          REWIND( numnam_cfg )              ! Namelist namsbc_core in configuration namelist : CORE bulk parameters
          READ  ( numnam_cfg, namsbc_core, IOSTAT = ios, ERR = 902 )
@@ -269,7 +269,4 @@
       zwnd_j(:,:) = 0.e0
 #if defined key_cyclone
-# if defined key_vectopt_loop
-!CDIR COLLAPSE
-# endif
       CALL wnd_cyc( kt, zwnd_i, zwnd_j )    ! add Manu !
       DO jj = 2, jpjm1
@@ -279,7 +276,4 @@
          END DO
       END DO
-#endif
-#if defined key_vectopt_loop
-!CDIR COLLAPSE
 #endif
       DO jj = 2, jpjm1
@@ -292,6 +286,4 @@
       CALL lbc_lnk( zwnd_j(:,:) , 'T', -1. )
       ! ... scalar wind ( = | U10m - U_oce | ) at T-point (masked)
-!CDIR NOVERRCHK
-!CDIR COLLAPSE
       wndm(:,:) = SQRT(  zwnd_i(:,:) * zwnd_i(:,:)   &
          &             + zwnd_j(:,:) * zwnd_j(:,:)  ) * tmask(:,:,1)
@@ -306,5 +298,4 @@
       ELSE                  ;   qsr(:,:) = zztmp *          sf(jp_qsr)%fnow(:,:,1)   * tmask(:,:,1)
       ENDIF
-!CDIR COLLAPSE
       zqlw(:,:) = (  sf(jp_qlw)%fnow(:,:,1) - Stef * zst(:,:)*zst(:,:)*zst(:,:)*zst(:,:)  ) * tmask(:,:,1)   ! Long  Wave
       ! ----------------------------------------------------------------------------- !
@@ -313,6 +304,4 @@
 
       ! ... specific humidity at SST and IST
-!CDIR NOVERRCHK
-!CDIR COLLAPSE
       zqsatw(:,:) = zcoef_qsatw * EXP( -5107.4 / zst(:,:) ) 
 
@@ -340,14 +329,7 @@
       ELSE
          !! If air temp. and spec. hum. are given at same height than wind (10m) :
-!gm bug?  at the compiling phase, add a copy in temporary arrays...  ==> check perf
-!         CALL TURB_CORE_1Z( 10., zst   (:,:), sf(jp_tair)%fnow(:,:),              &
-!            &                    zqsatw(:,:), sf(jp_humi)%fnow(:,:), wndm(:,:),   &
-!            &                    Cd    (:,:),             Ch  (:,:), Ce  (:,:)  )
-!gm bug
-! ARPDBG - this won't compile with gfortran. Fix but check performance
-! as per comment above.
          CALL TURB_CORE_1Z( 10., zst   , sf(jp_tair)%fnow(:,:,1),       &
             &                    zqsatw, sf(jp_humi)%fnow(:,:,1), wndm, &
-            &                    Cd    , Ch              , Ce    )
+            &                    Cd    , Ch                     , Ce    )
       ENDIF
 
@@ -364,5 +346,4 @@
       ! ... add the HF tau contribution to the wind stress module?
       IF( lhftau ) THEN 
-!CDIR COLLAPSE
          taum(:,:) = taum(:,:) + sf(jp_tdif)%fnow(:,:,1)
       ENDIF
@@ -387,10 +368,7 @@
          zqsb (:,:) =                      rhoa*cpa*Ch(:,:)*( zst   (:,:) - zt_zu(:,:) ) * wndm(:,:)     ! Sensible Heat
       ELSE
-!CDIR COLLAPSE
          zevap(:,:) = rn_efac * MAX( 0.e0, rhoa    *Ce(:,:)*( zqsatw(:,:) - sf(jp_humi)%fnow(:,:,1) ) * wndm(:,:) )   ! Evaporation
-!CDIR COLLAPSE
          zqsb (:,:) =            rhoa*cpa*Ch(:,:)*( zst   (:,:) - sf(jp_tair)%fnow(:,:,1) ) * wndm(:,:)     ! Sensible Heat
       ENDIF
-!CDIR COLLAPSE
       zqla (:,:) = Lv * zevap(:,:)                                                              ! Latent Heat
 
@@ -409,9 +387,7 @@
       !     III    Total FLUXES                                                       !
       ! ----------------------------------------------------------------------------- !
-     
-!CDIR COLLAPSE
+      !
       emp (:,:) = (  zevap(:,:)                                          &   ! mass flux (evap. - precip.)
          &         - sf(jp_prec)%fnow(:,:,1) * rn_pfac  ) * tmask(:,:,1)
-!CDIR COLLAPSE
       qns(:,:) = zqlw(:,:) - zqsb(:,:) - zqla(:,:)                                &   ! Downward Non Solar flux
          &     - sf(jp_snow)%fnow(:,:,1) * rn_pfac * lfus                         &   ! remove latent melting heat for solid precip
@@ -579,5 +555,4 @@
       CASE( 'I' )                  ! B-grid ice dynamics :   I-point (i.e. F-point with sea-ice indexation)
          !                           and scalar wind at T-point ( = | U10m - U_ice | ) (masked)
-!CDIR NOVERRCHK
          DO jj = 2, jpjm1
             DO ji = 2, jpim1   ! B grid : NO vector opt
@@ -604,7 +579,4 @@
          !
       CASE( 'C' )                  ! C-grid ice dynamics :   U & V-points (same as ocean)
-#if defined key_vectopt_loop
-!CDIR COLLAPSE
-#endif
          DO jj = 2, jpj
             DO ji = fs_2, jpi   ! vect. opt.
@@ -614,7 +586,4 @@
             END DO
          END DO
-#if defined key_vectopt_loop
-!CDIR COLLAPSE
-#endif
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vect. opt.
@@ -635,8 +604,5 @@
       DO jl = 1, ijpl                       !  Loop over ice categories  !
          !                                  ! ========================== !
-!CDIR NOVERRCHK
-!CDIR COLLAPSE
          DO jj = 1 , jpj
-!CDIR NOVERRCHK
             DO ji = 1, jpi
                ! ----------------------------!
@@ -690,12 +656,8 @@
       ! ( Maykut and Untersteiner, 1971 ; Ebert and Curry, 1993 )
     
-!CDIR COLLAPSE
       p_fr1(:,:) = ( 0.18 * ( 1.0 - zcoef_frca ) + 0.35 * zcoef_frca )
-!CDIR COLLAPSE
       p_fr2(:,:) = ( 0.82 * ( 1.0 - zcoef_frca ) + 0.65 * zcoef_frca )
        
-!CDIR COLLAPSE
       p_tpr(:,:) = sf(jp_prec)%fnow(:,:,1) * rn_pfac      ! total precipitation [kg/m2/s]
-!CDIR COLLAPSE
       p_spr(:,:) = sf(jp_snow)%fnow(:,:,1) * rn_pfac      ! solid precipitation [kg/m2/s]
       CALL iom_put( 'snowpre', p_spr * 86400. )                  ! Snow precipitation 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 4616)
@@ -248,7 +248,5 @@
          ! for basin budget and cooerence
          !--------------------------------------------------
-!CDIR COLLAPSE
            emp (:,:) = evap(:,:) - sf(jp_prec)%fnow(:,:,1) * tmask(:,:,1)
-!CDIR COLLAPSE
 
          CALL iom_put( "qlw_oce",   qbw  )                 ! output downward longwave heat over the ocean
@@ -264,7 +262,7 @@
   
  
-   SUBROUTINE fluxes_mfs(alat,alon,hour,                               &
-        sst,tnow,shnow,unow,vnow,mslnow,cldnow,qsw,qbw,ha,elat,        &
-        evap,taux,tauy)
+   SUBROUTINE fluxes_mfs( alat, alon , hour, sst ,                   &
+      &                   tnow, shnow, unow, vnow, mslnow, cldnow,   &
+      &                   qsw , qbw  , ha  , elat, evap, taux, tauy )
       !!----------------------------------------------------------------------
       !!                    ***  ROUTINE fluxes_mfs  ***
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 4616)
@@ -752,7 +752,5 @@
          ! => need to be done only when otx1 was changed
          IF( llnewtx ) THEN
-!CDIR NOVERRCHK
             DO jj = 2, jpjm1
-!CDIR NOVERRCHK
                DO ji = fs_2, fs_jpim1   ! vect. opt.
                   zzx = frcv(jpr_otx1)%z3(ji-1,jj  ,1) + frcv(jpr_otx1)%z3(ji,jj,1)
@@ -782,7 +780,5 @@
          IF( llnewtau ) THEN 
             zcoef = 1. / ( zrhoa * zcdrag ) 
-!CDIR NOVERRCHK
             DO jj = 1, jpj
-!CDIR NOVERRCHK
                DO ji = 1, jpi 
                   wndm(ji,jj) = SQRT( frcv(jpr_taum)%z3(ji,jj,1) * zcoef )
@@ -797,10 +793,8 @@
       ! -> need to be reset before each call of the ice/fsbc      
       IF( MOD( kt-1, k_fsbc ) == 0 ) THEN
-         !
          utau(:,:) = frcv(jpr_otx1)%z3(:,:,1)
          vtau(:,:) = frcv(jpr_oty1)%z3(:,:,1)
          taum(:,:) = frcv(jpr_taum)%z3(:,:,1)
          CALL iom_put( "taum_oce", taum )   ! output wind stress module
-         !  
       ENDIF
 
@@ -832,6 +826,6 @@
 !!         IF( TRIM( sn_rcv_rnf%cldes ) == 'coupled' ) THEN     ! add to the total freshwater budget
 !!            ! remove negative runoff
-!!            zcumulpos = SUM( MAX( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1t(:,:) * e2t(:,:) * tmask_i(:,:) ) 
-!!            zcumulneg = SUM( MIN( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1t(:,:) * e2t(:,:) * tmask_i(:,:) )
+!!            zcumulpos = SUM( MAX( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1e2t(:,:) * tmask_i(:,:) ) 
+!!            zcumulneg = SUM( MIN( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1e2t(:,:) * tmask_i(:,:) )
 !!            IF( lk_mpp )   CALL mpp_sum( zcumulpos )   ! sum over the global domain
 !!            IF( lk_mpp )   CALL mpp_sum( zcumulneg ) 
@@ -1183,6 +1177,6 @@
 !!gm                                       at least should be optional...
 !!       ! remove negative runoff                            ! sum over the global domain
-!!       zcumulpos = SUM( MAX( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1t(:,:) * e2t(:,:) * tmask_i(:,:) ) 
-!!       zcumulneg = SUM( MIN( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1t(:,:) * e2t(:,:) * tmask_i(:,:) )
+!!       zcumulpos = SUM( MAX( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1e2t(:,:) * tmask_i(:,:) ) 
+!!       zcumulneg = SUM( MIN( frcv(jpr_rnf)%z3(:,:,1), 0.e0 ) * e1e2t(:,:) * tmask_i(:,:) )
 !!       IF( lk_mpp )   CALL mpp_sum( zcumulpos )
 !!       IF( lk_mpp )   CALL mpp_sum( zcumulneg ) 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 4616)
@@ -131,5 +131,5 @@
          ELSE                  ;   qsr(:,:) =          sf(jp_qsr)%fnow(:,:,1)
          ENDIF
-!CDIR COLLAPSE
+         !
          DO jj = 1, jpj                                           ! set the ocean fluxes from read fields
             DO ji = 1, jpi
@@ -145,7 +145,5 @@
          !                                                        ! module of wind stress and wind speed at T-point
          zcoef = 1. / ( zrhoa * zcdrag )
-!CDIR NOVERRCHK
          DO jj = 2, jpjm1
-!CDIR NOVERRCHK
             DO ji = fs_2, fs_jpim1   ! vect. opt.
                ztx = utau(ji-1,jj  ) + utau(ji,jj) 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 4616)
@@ -55,5 +55,4 @@
    PRIVATE
 
-   !! * Routine accessibility
    PUBLIC cice_sbc_init   ! routine called by sbc_init
    PUBLIC cice_sbc_final  ! routine called by sbc_final
@@ -83,5 +82,5 @@
    !! * Substitutions
 #  include "domzgr_substitute.h90"
-
+   !!----------------------------------------------------------------------
 CONTAINS
 
@@ -225,15 +224,11 @@
             DO jj = 1, jpjm1
                DO ji = 1, jpim1                    ! caution: use of Vector Opt. not possible
-                  zcoefu = 0.5  * umask(ji,jj,1) / ( e1u(ji,jj) * e2u(ji,jj) )
-                  zcoefv = 0.5  * vmask(ji,jj,1) / ( e1v(ji,jj) * e2v(ji,jj) )
+                  zcoefu = 0.5  * umask(ji,jj,1) * r1_e1e2u(ji,jj)
+                  zcoefv = 0.5  * vmask(ji,jj,1) * r1_e1e2v(ji,jj)
                   zcoeff = 0.25 * umask(ji,jj,1) * umask(ji,jj+1,1)
-                  sshu_b(ji,jj) = zcoefu * ( e1t(ji  ,jj) * e2t(ji  ,jj) * sshb(ji  ,jj)     &
-                     &                     + e1t(ji+1,jj) * e2t(ji+1,jj) * sshb(ji+1,jj) )
-                  sshv_b(ji,jj) = zcoefv * ( e1t(ji,jj  ) * e2t(ji,jj  ) * sshb(ji,jj  )     &
-                     &                     + e1t(ji,jj+1) * e2t(ji,jj+1) * sshb(ji,jj+1) )
-                  sshu_n(ji,jj) = zcoefu * ( e1t(ji  ,jj) * e2t(ji  ,jj) * sshn(ji  ,jj)     &
-                     &                     + e1t(ji+1,jj) * e2t(ji+1,jj) * sshn(ji+1,jj) )
-                  sshv_n(ji,jj) = zcoefv * ( e1t(ji,jj  ) * e2t(ji,jj  ) * sshn(ji,jj  )     &
-                     &                     + e1t(ji,jj+1) * e2t(ji,jj+1) * sshn(ji,jj+1) )
+                  sshu_b(ji,jj) = zcoefu * ( e1e2t(ji,jj) * sshb(ji,jj) + e1e2t(ji+1,jj  ) * sshb(ji+1,jj  ) )
+                  sshv_b(ji,jj) = zcoefv * ( e1e2t(ji,jj) * sshb(ji,jj) + e1e2t(ji  ,jj+1) * sshb(ji  ,jj+1) )
+                  sshu_n(ji,jj) = zcoefu * ( e1e2t(ji,jj) * sshn(ji,jj) + e1e2t(ji+1,jj  ) * sshn(ji+1,jj  ) )
+                  sshv_n(ji,jj) = zcoefv * ( e1e2t(ji,jj) * sshn(ji,jj) + e1e2t(ji  ,jj+1) * sshn(ji  ,jj+1) )
                END DO
             END DO
@@ -242,9 +237,8 @@
             DO jj = 1, jpjm1
                DO ji = 1, jpim1      ! NO Vector Opt.
-                  sshf_n(ji,jj) = 0.5  * umask(ji,jj,1) * umask(ji,jj+1,1)                   &
-                       &               / ( e1f(ji,jj  ) * e2f(ji,jj  ) )                     &
-                       &               * ( e1u(ji,jj  ) * e2u(ji,jj  ) * sshu_n(ji,jj  )     &
-                       &                 + e1u(ji,jj+1) * e2u(ji,jj+1) * sshu_n(ji,jj+1) )
-               END DO
+                  sshf_n(ji,jj) = 0.5  * umask(ji,jj,1) * umask(ji,jj+1,1)      &
+                       &               * (  e1e2u(ji,jj  ) * sshu_n(ji,jj  )    &
+                       &                  + e1e2u(ji,jj+1) * sshu_n(ji,jj+1)  ) * r1_e1e2f(ji,jj)
+              END DO
             END DO
             CALL lbc_lnk( sshf_n, 'F', 1. )
@@ -266,5 +260,5 @@
       INTEGER, INTENT(in   ) ::   kt   ! ocean time step
       INTEGER, INTENT(in   ) ::   nsbc ! surface forcing type
-
+      !
       INTEGER  ::   ji, jj, jl                   ! dummy loop indices      
       REAL(wp), DIMENSION(:,:), POINTER :: ztmp, zpice
@@ -458,21 +452,19 @@
 ! x comp and y comp of sea surface slope (on F points)
 ! T point to F point
-      DO jj=1,jpjm1
-         DO ji=1,jpim1
-            ztmp(ji,jj)=0.5 * (  (zpice(ji+1,jj  )-zpice(ji,jj  ))/e1u(ji,jj  )   &
-                               + (zpice(ji+1,jj+1)-zpice(ji,jj+1))/e1u(ji,jj+1) ) & 
-                            *  fmask(ji,jj,1)
-         ENDDO
-      ENDDO
-      CALL nemo2cice(ztmp,ss_tltx,'F', -1. )
+      DO jj = 1, jpjm1
+         DO ji = 1, jpim1
+            ztmp(ji,jj)=0.5 * (  (zpice(ji+1,jj  )-zpice(ji,jj  )) * r1_e1u(ji,jj  )    &
+               &               + (zpice(ji+1,jj+1)-zpice(ji,jj+1)) * r1_e1u(ji,jj+1)  ) * fmask(ji,jj,1)
+         END DO
+      END DO
+      CALL nemo2cice( ztmp,ss_tltx,'F', -1. )
 
 ! T point to F point
-      DO jj=1,jpjm1
-         DO ji=1,jpim1
-            ztmp(ji,jj)=0.5 * (  (zpice(ji  ,jj+1)-zpice(ji  ,jj))/e2v(ji  ,jj)   &
-                               + (zpice(ji+1,jj+1)-zpice(ji+1,jj))/e2v(ji+1,jj) ) &
-                            *  fmask(ji,jj,1)
-         ENDDO
-      ENDDO
+      DO jj = 1, jpjm1
+         DO ji = 1, jpim1
+            ztmp(ji,jj)=0.5 * (  (zpice(ji  ,jj+1)-zpice(ji  ,jj)) * r1_e2v(ji  ,jj)    &
+               &               + (zpice(ji+1,jj+1)-zpice(ji+1,jj)) * r1_e2v(ji+1,jj)  ) *  fmask(ji,jj,1)
+         END DO
+      END DO
       CALL nemo2cice(ztmp,ss_tlty,'F', -1. )
 
@@ -532,6 +524,6 @@
 ! [Note that fr_iu hasn't yet been updated, so still from start of CICE timestep]
 
-      utau(:,:)=(1.0-fr_iu(:,:))*utau(:,:)-ss_iou(:,:)
-      vtau(:,:)=(1.0-fr_iv(:,:))*vtau(:,:)-ss_iov(:,:)     
+      utau(:,:) = ( 1.0 - fr_iu(:,:) ) * utau(:,:) - ss_iou(:,:)
+      vtau(:,:) = ( 1.0 - fr_iv(:,:) ) * vtau(:,:) - ss_iov(:,:)     
 
 ! Freshwater fluxes 
@@ -542,7 +534,7 @@
 ! Not ideal since aice won't be the same as in the atmosphere.  
 ! Better to use evap and tprecip? (but for now don't read in evap in this case)
-         emp(:,:)  = emp(:,:)+fr_i(:,:)*(tprecip(:,:)-sprecip(:,:))
+         emp(:,:)  = emp(:,:) + fr_i(:,:) * ( tprecip(:,:) - sprecip(:,:) )
       ELSE IF (nsbc == 4) THEN
-         emp(:,:)  = (1.0-fr_i(:,:))*emp(:,:)        
+         emp(:,:)  = ( 1.0 - fr_i(:,:) ) * emp(:,:)        
       ELSE IF (nsbc ==5) THEN
 ! emp_tot is set in sbc_cpl_ice_flx (called from cice_sbc_in above) 
@@ -551,6 +543,6 @@
       ENDIF
 
-      CALL cice2nemo(fresh_gbm,ztmp1,'T', 1. )
-      CALL cice2nemo(fsalt_gbm,ztmp2,'T', 1. )
+      CALL cice2nemo( fresh_gbm, ztmp1,'T', 1. )
+      CALL cice2nemo( fsalt_gbm, ztmp2,'T', 1. )
 
 ! Check to avoid unphysical expression when ice is forming (ztmp1 negative)
@@ -559,7 +551,7 @@
 ! This check breaks conservation but seems reasonable until we have prognostic ice salinity
 ! Note the 1000.0 below is to convert from kg salt to g salt (needed for PSU)
-      WHERE (ztmp1(:,:).lt.0.0) ztmp2(:,:)=MAX(ztmp2(:,:),ztmp1(:,:)*sss_m(:,:)/1000.0)
-      sfx(:,:)=ztmp2(:,:)*1000.0
-      emp(:,:)=emp(:,:)-ztmp1(:,:)
+      WHERE (ztmp1(:,:) < 0._wp )   ztmp2(:,:) = MAX( ztmp2(:,:) , ztmp1(:,:)*sss_m(:,:)/1000._wp )
+      sfx(:,:) = ztmp2(:,:) * 1000.0
+      emp(:,:) = emp(:,:) - ztmp1(:,:)
  
       CALL lbc_lnk( emp , 'T', 1. )
@@ -584,5 +576,5 @@
 ! Now add in ice / snow related terms
 ! [fswthru will be zero unless running with calc_Tsfc=T in CICE]
-      CALL cice2nemo(fswthru_gbm,ztmp1,'T', 1. )
+      CALL cice2nemo( fswthru_gbm,ztmp1,'T', 1. )
       qsr(:,:)=qsr(:,:)+ztmp1(:,:)
       CALL lbc_lnk( qsr , 'T', 1. )
@@ -590,5 +582,5 @@
       DO jj=1,jpj
          DO ji=1,jpi
-            nfrzmlt(ji,jj)=MAX(nfrzmlt(ji,jj),0.0)
+            nfrzmlt(ji,jj) = MAX (nfrzmlt(ji,jj) , 0._wp )
          ENDDO
       ENDDO
@@ -818,18 +810,14 @@
 #endif
       !!---------------------------------------------------------------------
-
-      CHARACTER(len=1), INTENT( in ) ::   &
-          cd_type       ! nature of pn grid-point
-          !             !   = T or F gridpoints
-      REAL(wp), INTENT( in ) ::   &
-          psgn          ! control of the sign change
-          !             !   =-1 , the sign is modified following the type of b.c. used
-          !             !   = 1 , no sign change
-      REAL(wp), DIMENSION(jpi,jpj) :: pn
+      CHARACTER(len=1), INTENT( in ) ::   cd_type   ! nature of pn grid-point (= T or F)
+      REAL(wp)        , INTENT( in ) ::   psgn      ! control of the sign change
+          !                                         !   =-1 , the sign is modified following the type of b.c. used
+          !                                         !   = 1 , no sign change
+      REAL(wp), DIMENSION(jpi,jpj) ::   pn          !!gm INTENT missing !!!!!
 #if !defined key_nemocice_decomp
       REAL(wp), DIMENSION(jpiglo,jpjglo) :: png2
       REAL (kind=dbl_kind), dimension(nx_global,ny_global) :: pcg
 #endif
-      REAL (kind=dbl_kind), dimension(nx_block,ny_block,max_blocks) :: pc
+      REAL (kind=dbl_kind), dimension(nx_block,ny_block,max_blocks) ::   pc   !!gm INTENT missing !!!!
       INTEGER (int_kind) :: &
          field_type,        &! id for type of field (scalar, vector, angle)
@@ -838,4 +826,5 @@
 
       INTEGER  ::   ji, jj, jn                      ! dummy loop indices
+      !!---------------------------------------------------------------------
 
 !     A. Ensure all haloes are filled in NEMO field (pn)
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 4616)
@@ -33,5 +33,5 @@
 #  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -107,5 +107,4 @@
 
          ! Flux and ice fraction computation
-!CDIR COLLAPSE
          DO jj = 1, jpj
             DO ji = 1, jpi
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 4616)
@@ -48,5 +48,5 @@
 #  include "domzgr_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -93,5 +93,4 @@
             !
             IF( nn_sstr == 1 ) THEN                                   !* Temperature restoring term
-!CDIR COLLAPSE
                DO jj = 1, jpj
                   DO ji = 1, jpi
@@ -106,5 +105,4 @@
             IF( nn_sssr == 1 ) THEN                                   !* Salinity damping term (salt flux only (sfx))
                zsrp = rn_deds / rday                                  ! from [mm/day] to [kg/m2/s]
-!CDIR COLLAPSE
                DO jj = 1, jpj
                   DO ji = 1, jpi
@@ -120,5 +118,4 @@
                zsrp = rn_deds / rday                                  ! from [mm/day] to [kg/m2/s]
                zerp_bnd = rn_sssr_bnd / rday                          !       -              -    
-!CDIR COLLAPSE
                DO jj = 1, jpj
                   DO ji = 1, jpi                            
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/SOL/solmat.F90	(revision 4616)
@@ -89,13 +89,13 @@
          DO ji = 2, jpim1
             zcoef = z2dt * z2dt * grav * bmask(ji,jj)
-            zcoefs = -zcoef * hv(ji  ,jj-1) * e1v(ji  ,jj-1) / e2v(ji  ,jj-1)    ! south coefficient
-            zcoefw = -zcoef * hu(ji-1,jj  ) * e2u(ji-1,jj  ) / e1u(ji-1,jj  )    ! west coefficient
-            zcoefe = -zcoef * hu(ji  ,jj  ) * e2u(ji  ,jj  ) / e1u(ji  ,jj  )    ! east coefficient
-            zcoefn = -zcoef * hv(ji  ,jj  ) * e1v(ji  ,jj  ) / e2v(ji  ,jj  )    ! north coefficient
+            zcoefs = -zcoef * hv(ji  ,jj-1) * e1_e2v(ji  ,jj-1)    ! south coefficient
+            zcoefw = -zcoef * hu(ji-1,jj  ) * e2_e1u(ji-1,jj  )    ! west coefficient
+            zcoefe = -zcoef * hu(ji  ,jj  ) * e2_e1u(ji  ,jj  )    ! east coefficient
+            zcoefn = -zcoef * hv(ji  ,jj  ) * e1_e2v(ji  ,jj  )    ! north coefficient
             gcp(ji,jj,1) = zcoefs
             gcp(ji,jj,2) = zcoefw
             gcp(ji,jj,3) = zcoefe
             gcp(ji,jj,4) = zcoefn
-            gcdmat(ji,jj) = e1t(ji,jj) * e2t(ji,jj) * bmask(ji,jj)    &          ! diagonal coefficient
+            gcdmat(ji,jj) = e1e2t(ji,jj) * bmask(ji,jj)    &          ! diagonal coefficient
                &          - zcoefs -zcoefw -zcoefe -zcoefn
          END DO
@@ -110,26 +110,25 @@
 
             !  south coefficient
-            zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)
+            zcoefs = -zcoef * hv(ji,jj-1) * e1_e2v(ji,jj-1)
             zcoefs = zcoefs * bdyvmask(ji,jj-1)
             gcp(ji,jj,1) = zcoefs
 
             !  west coefficient
-            zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)
+            zcoefw = -zcoef * hu(ji-1,jj) * e2_e1u(ji-1,jj)
             zcoefw = zcoefw * bdyumask(ji-1,jj)
             gcp(ji,jj,2) = zcoefw
 
             !  east coefficient
-            zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)
+            zcoefe = -zcoef * hu(ji,jj) * e2_e1u(ji,jj)
             zcoefe = zcoefe * bdyumask(ji,jj)
             gcp(ji,jj,3) = zcoefe
 
             !  north coefficient
-            zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)
+            zcoefn = -zcoef * hv(ji,jj) * e1_e2v(ji,jj)
             zcoefn = zcoefn * bdyvmask(ji,jj)
             gcp(ji,jj,4) = zcoefn
 
             ! diagonal coefficient
-            gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj) &
-                            - zcoefs -zcoefw -zcoefe -zcoefn
+            gcdmat(ji,jj) = e1e2t(ji,jj)*bmask(ji,jj) - zcoefs -zcoefw -zcoefe -zcoefn
          END DO
       END DO
@@ -149,7 +148,7 @@
                !  south coefficient
                IF( ( nbondj == -1 .OR. nbondj == 2 ) .AND. ( jj == 3 ) ) THEN
-                  zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)*(1.-vmask(ji,jj-1,1))
+                  zcoefs = -zcoef * hv(ji,jj-1) * e1_e2v(ji,jj-1)*(1.-vmask(ji,jj-1,1))
                ELSE
-                  zcoefs = -zcoef * hv(ji,jj-1) * e1v(ji,jj-1)/e2v(ji,jj-1)
+                  zcoefs = -zcoef * hv(ji,jj-1) * e1_e2v(ji,jj-1)
                END IF
                gcp(ji,jj,1) = zcoefs
@@ -157,7 +156,7 @@
                !  west coefficient
                IF( ( nbondi == -1 .OR. nbondi == 2 ) .AND. ( ji == 3 )  ) THEN
-                  zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)*(1.-umask(ji-1,jj,1))
+                  zcoefw = -zcoef * hu(ji-1,jj) * e2_e1u(ji-1,jj)*(1.-umask(ji-1,jj,1))
                ELSE
-                  zcoefw = -zcoef * hu(ji-1,jj) * e2u(ji-1,jj)/e1u(ji-1,jj)
+                  zcoefw = -zcoef * hu(ji-1,jj) * e2_e1u(ji-1,jj)
                END IF
                gcp(ji,jj,2) = zcoefw
@@ -165,7 +164,7 @@
                !   east coefficient
                IF( ( nbondi == 1 .OR. nbondi == 2 ) .AND. ( ji == nlci-2 ) ) THEN
-                  zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)*(1.-umask(ji,jj,1))
+                  zcoefe = -zcoef * hu(ji,jj) * e2_e1u(ji,jj)*(1.-umask(ji,jj,1))
                ELSE
-                  zcoefe = -zcoef * hu(ji,jj) * e2u(ji,jj)/e1u(ji,jj)
+                  zcoefe = -zcoef * hu(ji,jj) * e2_e1u(ji,jj)
                END IF
                gcp(ji,jj,3) = zcoefe
@@ -173,13 +172,12 @@
                !   north coefficient
                IF( ( nbondj == 1 .OR. nbondj == 2 ) .AND. ( jj == nlcj-2 ) ) THEN
-                  zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)*(1.-vmask(ji,jj,1))
+                  zcoefn = -zcoef * hv(ji,jj) * e1_e2v(ji,jj)*(1.-vmask(ji,jj,1))
                ELSE
-                  zcoefn = -zcoef * hv(ji,jj) * e1v(ji,jj)/e2v(ji,jj)
+                  zcoefn = -zcoef * hv(ji,jj) * e1_e2v(ji,jj)
                END IF
                gcp(ji,jj,4) = zcoefn
                !
                ! diagonal coefficient
-               gcdmat(ji,jj) = e1t(ji,jj)*e2t(ji,jj)*bmask(ji,jj)   &
-                  &            - zcoefs -zcoefw -zcoefe -zcoefn
+               gcdmat(ji,jj) = e1e2t(ji,jj)*bmask(ji,jj) - zcoefs -zcoefw -zcoefe -zcoefn
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 4616)
@@ -133,5 +133,5 @@
       !
       CASE( 0 )                !==  Jackett and McDougall (1994) formulation  ==!
-!CDIR NOVERRCHK
+         !
          zws(:,:,:) = SQRT( ABS( pts(:,:,:,jp_sal) ) )
          !
@@ -265,5 +265,5 @@
       !
       CASE( 0 )                !==  Jackett and McDougall (1994) formulation  ==!
-!CDIR NOVERRCHK
+         !
          zws(:,:,:) = SQRT( ABS( pts(:,:,:,jp_sal) ) )
          !
@@ -394,8 +394,6 @@
       !
       CASE( 0 )                !==  Jackett and McDougall (1994) formulation  ==!
-      !
-!CDIR NOVERRCHK
+         !
          DO jj = 1, jpjm1
-!CDIR NOVERRCHK
             DO ji = 1, fs_jpim1   ! vector opt.
                zws(ji,jj) = SQRT( ABS( pts(ji,jj,jp_sal) ) )
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 4616)
@@ -90,7 +90,7 @@
       !                                               !==  effective transport  ==!
       DO jk = 1, jpkm1
-         zun(:,:,jk) = e2u(:,:) * fse3u(:,:,jk) * un(:,:,jk)                  ! eulerian transport only
-         zvn(:,:,jk) = e1v(:,:) * fse3v(:,:,jk) * vn(:,:,jk)
-         zwn(:,:,jk) = e1t(:,:) * e2t(:,:)      * wn(:,:,jk)
+         zun(:,:,jk) = e2u  (:,:) * fse3u(:,:,jk) * un(:,:,jk)                  ! eulerian transport only
+         zvn(:,:,jk) = e1v  (:,:) * fse3v(:,:,jk) * vn(:,:,jk)
+         zwn(:,:,jk) = e1e2t(:,:)                 * wn(:,:,jk)
       END DO
       !
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 4616)
@@ -82,5 +82,5 @@
       !!               zwy = zcofj * zupsv + (1-zcofj) * zcenv
       !!       * horizontal advective trend (divergence of the fluxes)
-      !!               ztra = 1/(e1t*e2t*e3t) { di-1[zwx] + dj-1[zwy] }
+      !!               ztra = 1/(e1e2t*e3t) { di-1[zwx] + dj-1[zwy] }
       !!       * Add this trend now to the general trend of tracer (ta,sa):
       !!               pta = pta + ztra
@@ -249,5 +249,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) *  fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) *  fse3t(ji,jj,jk) )
                   ! advective trends
                   ztra = - zbtr * (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90	(revision 4616)
@@ -184,8 +184,8 @@
          DO jj = 1, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               zpsim_u(ji,jj) = rc_f *   zhu(ji,jj)   * zhu(ji,jj)   * e2u(ji,jj) / e1u(ji,jj)          &
+               zpsim_u(ji,jj) = rc_f *   zhu(ji,jj)   * zhu(ji,jj)   * e2_e1u(ji,jj)               &
                   &                  * ( zbm(ji+1,jj) - zbm(ji,jj) ) * MIN( 111.e3_wp , e1u(ji,jj) )
                   !
-               zpsim_v(ji,jj) = rc_f *   zhv(ji,jj)   * zhv(ji,jj)   * e1v(ji,jj) / e2v(ji,jj)          &
+               zpsim_v(ji,jj) = rc_f *   zhv(ji,jj)   * zhv(ji,jj)   * e1_e2v(ji,jj)               &
                   &                  * ( zbm(ji,jj+1) - zbm(ji,jj) ) * MIN( 111.e3_wp , e2v(ji,jj) )
             END DO
@@ -247,6 +247,6 @@
          ! divide by cross distance to give streamfunction with dimensions m^2/s
          DO jk = 1, ikmax+1
-            zpsi_uw(:,:,jk) = zpsi_uw(:,:,jk)/e2u(:,:)
-            zpsi_vw(:,:,jk) = zpsi_vw(:,:,jk)/e1v(:,:)
+            zpsi_uw(:,:,jk) = zpsi_uw(:,:,jk) / e2u(:,:)
+            zpsi_vw(:,:,jk) = zpsi_vw(:,:,jk) / e1v(:,:)
          END DO
          CALL iom_put( "psiu_mle", zpsi_uw )    ! i-mle streamfunction
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 4616)
@@ -191,5 +191,5 @@
                   z0u = SIGN( 0.5, pun(ji,jj,jk) )
                   zalpha = 0.5 - z0u
-                  zu  = z0u - 0.5 * pun(ji,jj,jk) * zdt / ( e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  zu  = z0u - 0.5 * pun(ji,jj,jk) * zdt / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
                   zzwx = ptb(ji+1,jj,jk,jn) + xind(ji,jj,jk) * (zu * zslpx(ji+1,jj,jk))
                   zzwy = ptb(ji  ,jj,jk,jn) + xind(ji,jj,jk) * (zu * zslpx(ji  ,jj,jk))
@@ -198,5 +198,5 @@
                   z0v = SIGN( 0.5, pvn(ji,jj,jk) )
                   zalpha = 0.5 - z0v
-                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * zdt / ( e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * zdt / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
                   zzwx = ptb(ji,jj+1,jk,jn) + xind(ji,jj,jk) * (zv * zslpy(ji,jj+1,jk))
                   zzwy = ptb(ji,jj  ,jk,jn) + xind(ji,jj,jk) * (zv * zslpy(ji,jj  ,jk))
@@ -212,5 +212,5 @@
             DO jj = 2, jpjm1      
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! horizontal advective trends
                   ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
@@ -270,5 +270,5 @@
             DO jj = 2, jpjm1      
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3w(ji,jj,jk+1) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3w(ji,jj,jk+1) )
                   z0w = SIGN( 0.5, pwn(ji,jj,jk+1) )
                   zalpha = 0.5 + z0w
@@ -285,5 +285,5 @@
             DO jj = 2, jpjm1      
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! vertical advective trends 
                   ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji,jj,jk+1) )
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 4616)
@@ -146,5 +146,5 @@
                   z0u = SIGN( 0.5, pun(ji,jj,jk) )
                   zalpha = 0.5 - z0u
-                  zu  = z0u - 0.5 * pun(ji,jj,jk) * zdt / ( e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) )
+                  zu  = z0u - 0.5 * pun(ji,jj,jk) * zdt / ( e1e2u(ji,jj) * fse3u(ji,jj,jk) )
                   zzwx = ptb(ji+1,jj,jk,jn) + zu * zslpx(ji+1,jj,jk)
                   zzwy = ptb(ji  ,jj,jk,jn) + zu * zslpx(ji  ,jj,jk)
@@ -153,5 +153,5 @@
                   z0v = SIGN( 0.5, pvn(ji,jj,jk) )
                   zalpha = 0.5 - z0v
-                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * zdt / ( e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) )
+                  zv  = z0v - 0.5 * pvn(ji,jj,jk) * zdt / ( e1e2v(ji,jj) * fse3v(ji,jj,jk) )
                   zzwx = ptb(ji,jj+1,jk,jn) + zv * zslpy(ji,jj+1,jk)
                   zzwy = ptb(ji,jj  ,jk,jn) + zv * zslpy(ji,jj  ,jk)
@@ -190,5 +190,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! horizontal advective trends 
                   ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
@@ -249,5 +249,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3w(ji,jj,jk+1) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3w(ji,jj,jk+1) )
                   z0w = SIGN( 0.5, pwn(ji,jj,jk+1) )
                   zalpha = 0.5 + z0w
@@ -275,5 +275,5 @@
             DO jj = 2, jpjm1      
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! vertical advective trends 
                   ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji,jj,jk+1) )
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 4616)
@@ -224,5 +224,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.  
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! horizontal advective trends
                   ztra = - zbtr * ( zwx(ji,jj,jk) - zwx(ji-1,jj,jk) )
@@ -350,5 +350,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.  
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! horizontal advective trends
                   ztra = - zbtr * ( zwy(ji,jj,jk) - zwy(ji,jj-1,jk) )
@@ -413,5 +413,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! k- vertical advective trends 
                   ztra = - zbtr * ( zwz(ji,jj,jk) - zwz(ji,jj,jk+1) ) 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 4616)
@@ -151,5 +151,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! total intermediate advective trends
                   ztra = - zbtr * (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
@@ -211,5 +211,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.  
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! total advective trends
                   ztra = - zbtr * (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk  )   &
@@ -321,5 +321,5 @@
 
                ! up & down beta terms
-               zbt = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
+               zbt = e1e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
                zbetup(ji,jj,jk) = ( zup            - paft(ji,jj,jk) ) / ( zpos + zrtrn ) * zbt
                zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zdo            ) / ( zneg + zrtrn ) * zbt
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 4616)
@@ -120,6 +120,6 @@
             DO jj = 1, jpjm1            ! First derivative (gradient)
                DO ji = 1, fs_jpim1   ! vector opt.
-                  zeeu = e2u(ji,jj) * fse3u(ji,jj,jk) / e1u(ji,jj) * umask(ji,jj,jk)
-                  zeev = e1v(ji,jj) * fse3v(ji,jj,jk) / e2v(ji,jj) * vmask(ji,jj,jk)
+                  zeeu = e2_e1u(ji,jj) * fse3u(ji,jj,jk) * umask(ji,jj,jk)
+                  zeev = e1_e2v(ji,jj) * fse3v(ji,jj,jk) * vmask(ji,jj,jk)
                   ztu(ji,jj,jk) = zeeu * ( ptb(ji+1,jj  ,jk,jn) - ptb(ji,jj,jk,jn) )
                   ztv(ji,jj,jk) = zeev * ( ptb(ji  ,jj+1,jk,jn) - ptb(ji,jj,jk,jn) )
@@ -164,5 +164,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! horizontal advective
                   ztra = - zbtr * (  zwx(ji,jj,jk) - zwx(ji-1,jj  ,jk)   &
@@ -219,5 +219,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ztak = - ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) ) * zbtr
                   pta(ji,jj,jk,jn) =   pta(ji,jj,jk,jn) +  ztak 
@@ -245,5 +245,5 @@
             DO jj = 2, jpjm1 
                DO ji = fs_2, fs_jpim1   ! vector opt.   
-                  zbtr = 1. / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                  zbtr = 1. / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                   ! k- vertical advective trends  
                   ztra = - zbtr * ( ztw(ji,jj,jk) - ztw(ji,jj,jk+1) )
@@ -259,5 +259,5 @@
                DO jj = 2, jpjm1
                   DO ji = fs_2, fs_jpim1   ! vector opt.
-                     zbtr = 1.e0 / ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+                     zbtr = 1.e0 / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                      z_hdivn = (  pwn(ji,jj,jk) - pwn(ji,jj,jk+1)  ) * zbtr
                      zltv(ji,jj,jk) = pta(ji,jj,jk,jn) - zltv(ji,jj,jk) + ptn(ji,jj,jk,jn) * z_hdivn
@@ -358,5 +358,5 @@
                zneg = MAX( 0., pcc(ji  ,jj  ,jk  ) ) - MIN( 0., pcc(ji  ,jj  ,jk+1) )
                ! up & down beta terms
-               zbt = e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
+               zbt = e1e2t(ji,jj) * fse3t(ji,jj,jk) / z2dtt
                zbetup(ji,jj,jk) = ( zbetup(ji,jj,jk) - paft(ji,jj,jk) ) / (zpos+zrtrn) * zbt
                zbetdo(ji,jj,jk) = ( paft(ji,jj,jk) - zbetdo(ji,jj,jk) ) / (zneg+zrtrn) * zbt
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 4616)
@@ -84,11 +84,6 @@
       !
       !                             !  Add the geothermal heat flux trend on temperature
-#if defined key_vectopt_loop
-      DO jj = 1, 1
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
-#else
       DO jj = 2, jpjm1
          DO ji = 2, jpim1
-#endif
             ik = mbkt(ji,jj)
             zqgh_trd = qgh_trd0(ji,jj) / fse3t(ji,jj,ik)
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 4616)
@@ -37,5 +37,4 @@
    USE timing         ! Timing
 
-
    IMPLICIT NONE
    PRIVATE
@@ -47,15 +46,14 @@
    PUBLIC   bbl           !  routine called by trcbbl.F90 and dtadyn.F90
 
-   LOGICAL, PUBLIC, PARAMETER ::   lk_trabbl = .TRUE.    !: bottom boundary layer flag
-
-   !                                !!* Namelist nambbl *
-   INTEGER , PUBLIC ::   nn_bbl_ldf  !: =1   : diffusive bbl or not (=0)
-   INTEGER , PUBLIC ::   nn_bbl_adv  !: =1/2 : advective bbl or not (=0)
-   !                                            !  =1 : advective bbl using the bottom ocean velocity
-   !                                            !  =2 :     -      -  using utr_bbl proportional to grad(rho)
-   REAL(wp), PUBLIC ::   rn_ahtbbl   !: along slope bbl diffusive coefficient [m2/s]
-   REAL(wp), PUBLIC ::   rn_gambbl   !: lateral coeff. for bottom boundary layer scheme [s]
-
-   LOGICAL , PUBLIC ::   l_bbl                  !: flag to compute bbl diffu. flux coef and transport
+   !                                  !!* Namelist nambbl *
+   LOGICAL , PUBLIC ::   ln_trabbl     !: bottom boundary layer flag
+   INTEGER , PUBLIC ::   nn_bbl_ldf    !: =1   : diffusive bbl or not (=0)
+   INTEGER , PUBLIC ::   nn_bbl_adv    !: =1/2 : advective bbl or not (=0)
+   !                                   !         =1 : advective bbl using the bottom ocean velocity
+   !                                   !         =2 :     -      -  using utr_bbl proportional to grad(rho)
+   REAL(wp), PUBLIC ::   rn_ahtbbl     !: along slope bbl diffusive coefficient [m2/s]
+   REAL(wp), PUBLIC ::   rn_gambbl     !: lateral coeff. for bottom boundary layer scheme [s]
+
+   LOGICAL , PUBLIC ::   l_bbl         !: flag to compute bbl diffu. flux coef and transport
 
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:), PUBLIC ::   utr_bbl  , vtr_bbl   ! u- (v-) transport in the bottom boundary layer
@@ -179,5 +177,4 @@
       !!              Campin, J.-M., and H. Goosse, 1999, Tellus, 412-430.
       !!----------------------------------------------------------------------
-      !
       INTEGER                              , INTENT(in   ) ::   kjpt   ! number of tracers
       REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb    ! before and now tracer fields
@@ -186,5 +183,4 @@
       INTEGER  ::   ji, jj, jn   ! dummy loop indices
       INTEGER  ::   ik           ! local integers
-      REAL(wp) ::   zbtr         ! local scalars
       REAL(wp), POINTER, DIMENSION(:,:) :: zptb
       !!----------------------------------------------------------------------
@@ -196,11 +192,6 @@
       DO jn = 1, kjpt                                     ! tracer loop
          !                                                ! ===========
-#  if defined key_vectopt_loop
-         DO jj = 1, 1   ! vector opt. (forced unrolling)
-            DO ji = 1, jpij
-#else
          DO jj = 1, jpj
             DO ji = 1, jpi
-#endif
                ik = mbkt(ji,jj)                        ! bottom T-level index
                zptb(ji,jj) = ptb(ji,jj,ik,jn)              ! bottom before T and S
@@ -208,18 +199,13 @@
          END DO
          !                                                ! Compute the trend
-#  if defined key_vectopt_loop
-         DO jj = 1, 1   ! vector opt. (forced unrolling)
-            DO ji = jpi+1, jpij-jpi-1
-#  else
          DO jj = 2, jpjm1
             DO ji = 2, jpim1
-#  endif
                ik = mbkt(ji,jj)                            ! bottom T-level index
-               zbtr = r1_e12t(ji,jj)  / fse3t(ji,jj,ik)
-               pta(ji,jj,ik,jn) = pta(ji,jj,ik,jn)                                                         &
-                  &               + (   ahu_bbl(ji  ,jj  ) * ( zptb(ji+1,jj  ) - zptb(ji  ,jj  ) )   &
-                  &                   - ahu_bbl(ji-1,jj  ) * ( zptb(ji  ,jj  ) - zptb(ji-1,jj  ) )   &
-                  &                   + ahv_bbl(ji  ,jj  ) * ( zptb(ji  ,jj+1) - zptb(ji  ,jj  ) )   &
-                  &                   - ahv_bbl(ji  ,jj-1) * ( zptb(ji  ,jj  ) - zptb(ji  ,jj-1) )   ) * zbtr
+               pta(ji,jj,ik,jn) = pta(ji,jj,ik,jn)                                                  &
+                  &             + (  ahu_bbl(ji  ,jj  ) * ( zptb(ji+1,jj  ) - zptb(ji  ,jj  ) )     &
+                  &                - ahu_bbl(ji-1,jj  ) * ( zptb(ji  ,jj  ) - zptb(ji-1,jj  ) )     &
+                  &                + ahv_bbl(ji  ,jj  ) * ( zptb(ji  ,jj+1) - zptb(ji  ,jj  ) )     &
+                  &                - ahv_bbl(ji  ,jj-1) * ( zptb(ji  ,jj  ) - zptb(ji  ,jj-1) )  )  &
+                  &             / ( e1e2t(ji,jj) * fse3t(ji,jj,ik) )
             END DO
          END DO
@@ -264,11 +250,6 @@
       DO jn = 1, kjpt                                            ! tracer loop
          !                                                       ! ===========
-# if defined key_vectopt_loop
-         DO jj = 1, 1
-            DO ji = 1, jpij-jpi-1   ! vector opt. (forced unrolling)
-# else
          DO jj = 1, jpjm1
             DO ji = 1, jpim1            ! CAUTION start from i=1 to update i=2 when cyclic east-west
-# endif
                IF( utr_bbl(ji,jj) /= 0.e0 ) THEN            ! non-zero i-direction bbl advection
                   ! down-slope i/k-indices (deep)      &   up-slope i/k indices (shelf)
@@ -278,15 +259,15 @@
                   !
                   !                                               ! up  -slope T-point (shelf bottom point)
-                  zbtr = r1_e12t(iis,jj) / fse3t(iis,jj,ikus)
+                  zbtr = r1_e1e2t(iis,jj) / fse3t(iis,jj,ikus)
                   ztra = zu_bbl * ( ptb(iid,jj,ikus,jn) - ptb(iis,jj,ikus,jn) ) * zbtr
                   pta(iis,jj,ikus,jn) = pta(iis,jj,ikus,jn) + ztra
                   !
                   DO jk = ikus, ikud-1                            ! down-slope upper to down T-point (deep column)
-                     zbtr = r1_e12t(iid,jj) / fse3t(iid,jj,jk)
+                     zbtr = r1_e1e2t(iid,jj) / fse3t(iid,jj,jk)
                      ztra = zu_bbl * ( ptb(iid,jj,jk+1,jn) - ptb(iid,jj,jk,jn) ) * zbtr
                      pta(iid,jj,jk,jn) = pta(iid,jj,jk,jn) + ztra
                   END DO
                   !
-                  zbtr = r1_e12t(iid,jj) / fse3t(iid,jj,ikud)
+                  zbtr = r1_e1e2t(iid,jj) / fse3t(iid,jj,ikud)
                   ztra = zu_bbl * ( ptb(iis,jj,ikus,jn) - ptb(iid,jj,ikud,jn) ) * zbtr
                   pta(iid,jj,ikud,jn) = pta(iid,jj,ikud,jn) + ztra
@@ -300,15 +281,15 @@
                   !
                   ! up  -slope T-point (shelf bottom point)
-                  zbtr = r1_e12t(ji,ijs) / fse3t(ji,ijs,ikvs)
+                  zbtr = r1_e1e2t(ji,ijs) / fse3t(ji,ijs,ikvs)
                   ztra = zv_bbl * ( ptb(ji,ijd,ikvs,jn) - ptb(ji,ijs,ikvs,jn) ) * zbtr
                   pta(ji,ijs,ikvs,jn) = pta(ji,ijs,ikvs,jn) + ztra
                   !
                   DO jk = ikvs, ikvd-1                            ! down-slope upper to down T-point (deep column)
-                     zbtr = r1_e12t(ji,ijd) / fse3t(ji,ijd,jk)
+                     zbtr = r1_e1e2t(ji,ijd) / fse3t(ji,ijd,jk)
                      ztra = zv_bbl * ( ptb(ji,ijd,jk+1,jn) - ptb(ji,ijd,jk,jn) ) * zbtr
                      pta(ji,ijd,jk,jn) = pta(ji,ijd,jk,jn)  + ztra
                   END DO
                   !                                               ! down-slope T-point (deep bottom point)
-                  zbtr = r1_e12t(ji,ijd) / fse3t(ji,ijd,ikvd)
+                  zbtr = r1_e1e2t(ji,ijd) / fse3t(ji,ijd,ikvd)
                   ztra = zv_bbl * ( ptb(ji,ijs,ikvs,jn) - ptb(ji,ijd,ikvd,jn) ) * zbtr
                   pta(ji,ijd,ikvd,jn) = pta(ji,ijd,ikvd,jn) + ztra
@@ -353,5 +334,4 @@
       !!              Campin, J.-M., and H. Goosse, 1999, Tellus, 412-430.
       !!----------------------------------------------------------------------
-      !
       INTEGER         , INTENT(in   ) ::   kt       ! ocean time-step index
       INTEGER         , INTENT(in   ) ::   kit000          ! first time step index
@@ -412,11 +392,6 @@
 
       !                                        !* bottom temperature, salinity, velocity and depth
-#if defined key_vectopt_loop
-      DO jj = 1, 1   ! vector opt. (forced unrolling)
-         DO ji = 1, jpij
-#else
       DO jj = 1, jpj
          DO ji = 1, jpi
-#endif
             ik = mbkt(ji,jj)                        ! bottom T-level index
             ztb (ji,jj) = tsb(ji,jj,ik,jp_tem) * tmask(ji,jj,1)      ! bottom before T and S
@@ -629,6 +604,6 @@
 
       !                             !* masked diffusive flux coefficients
-      ahu_bbl_0(:,:) = rn_ahtbbl * e2u(:,:) * e3u_bbl_0(:,:) / e1u(:,:)  * umask(:,:,1)
-      ahv_bbl_0(:,:) = rn_ahtbbl * e1v(:,:) * e3v_bbl_0(:,:) / e2v(:,:)  * vmask(:,:,1)
+      ahu_bbl_0(:,:) = rn_ahtbbl * e2_e1u(:,:) * e3u_bbl_0(:,:) * umask(:,:,1)
+      ahv_bbl_0(:,:) = rn_ahtbbl * e1_e2v(:,:) * e3v_bbl_0(:,:) * vmask(:,:,1)
 
 
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 4616)
@@ -72,5 +72,5 @@
       !!               - pahv e2u*vslp    dk[ mj(mk(tb)) ]
       !!      take the horizontal divergence of the fluxes:
-      !!         difft = 1/(e1t*e2t*e3t) {  di-1[ zftu ] +  dj-1[ zftv ]  }
+      !!         difft = 1/(e1e2t*e3t) {  di-1[ zftu ] +  dj-1[ zftv ]  }
       !!      Add this trend to the general trend (ta,sa):
       !!         ta = ta + difft
@@ -82,5 +82,5 @@
       !!                   + mj(mk(pahv)) * e1t*wslpj dj[ mj(mk(tb)) ]  }
       !!      take the horizontal divergence of the fluxes:
-      !!         difft = 1/(e1t*e2t*e3t) dk[ zftw ]
+      !!         difft = 1/(e1e2t*e3t) dk[ zftw ]
       !!      Add this trend to the general trend (ta,sa):
       !!         pta = pta + difft
@@ -246,6 +246,6 @@
             DO jj = 1 , jpjm1            !==  Horizontal fluxes
                DO ji = 1, fs_jpim1   ! vector opt.
-                  zabe1 = pahu(ji,jj,jk) * e2u(ji,jj) * fse3u(ji,jj,jk) / e1u(ji,jj)
-                  zabe2 = pahv(ji,jj,jk) * e1v(ji,jj) * fse3v(ji,jj,jk) / e2v(ji,jj)
+                  zabe1 = pahu(ji,jj,jk) * e2_e1u(ji,jj) * fse3u(ji,jj,jk)
+                  zabe2 = pahv(ji,jj,jk) * e1_e2v(ji,jj) * fse3v(ji,jj,jk)
                   !
                   zmsku = 1. / MAX(  tmask(ji+1,jj,jk  ) + tmask(ji,jj,jk+1)   &
@@ -259,9 +259,9 @@
                   !
                   zftu(ji,jj,jk ) = (  zabe1 * zdit(ji,jj,jk)   &
-                     &              + zcof1 * (  zdkt (ji+1,jj) + zdk1t(ji,jj)      &
-                     &                         + zdk1t(ji+1,jj) + zdkt (ji,jj)  )  ) * umask(ji,jj,jk)
+                     &               + zcof1 * (  zdkt (ji+1,jj) + zdk1t(ji,jj)      &
+                     &                          + zdk1t(ji+1,jj) + zdkt (ji,jj)  )  ) * umask(ji,jj,jk)
                   zftv(ji,jj,jk) = (  zabe2 * zdjt(ji,jj,jk)   &
-                     &              + zcof2 * (  zdkt (ji,jj+1) + zdk1t(ji,jj)      &
-                     &                         + zdk1t(ji,jj+1) + zdkt (ji,jj)  )  ) * vmask(ji,jj,jk)                  
+                     &               + zcof2 * (  zdkt (ji,jj+1) + zdk1t(ji,jj)      &
+                     &                          + zdk1t(ji,jj+1) + zdkt (ji,jj)  )  ) * vmask(ji,jj,jk)                  
                END DO
             END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_triad.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_triad.F90	(revision 4616)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_triad.F90	(revision 4616)
@@ -0,0 +1,528 @@
+MODULE traldf_iso_triad
+   !!======================================================================
+   !!                   ***  MODULE  traldf_iso_triad  ***
+   !! Ocean  tracers:  horizontal component of the lateral tracer mixing trend
+   !!======================================================================
+   !! History :  3.3  ! 2010-10  (G. Nurser, C. Harris, G. Madec)  Griffies operator (original code)
+   !!            3.7  ! 2013-12  (F. Lemarie, G. Madec)  triad operator (Griffies) + Method of Stabilizing Correction
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   tra_ldf_iso_triad : update the tracer trend with the iso-neutral   laplacian triad-operator
+   !!   tra_ldf_iso_blp   : update the tracer trend with the iso-neutral bilaplacian triad-operator 
+   !!----------------------------------------------------------------------
+   USE oce             ! ocean dynamics and active tracers
+   USE dom_oce         ! ocean space and time domain
+   USE phycst          ! physical constants
+   USE trc_oce         ! share passive tracers/Ocean variables
+   USE zdf_oce         ! ocean vertical physics
+   USE ldftra          ! lateral physics: eddy diffusivity
+   USE ldfslp          ! lateral physics: iso-neutral slopes
+   USE traldf_iso      ! lateral diffusion (Madec operator)         (tra_ldf_iso routine)
+   USE diaptr          ! poleward transport diagnostics
+   USE zpshde          ! partial step: hor. derivative     (zps_hde routine)
+   !
+   USE in_out_manager  ! I/O manager
+   USE iom             ! I/O library
+   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
+   USE lib_mpp         ! MPP library
+   USE wrk_nemo        ! Memory Allocation
+   USE timing          ! Timing
+
+   IMPLICIT NONE
+   PRIVATE
+
+   PUBLIC   tra_ldf_iso_triad   ! routine called by traldf.F90
+   PUBLIC   tra_ldf_iso_blp     ! routine called by traldf.F90
+
+   REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE ::   zdkt3d   !: vertical tracer gradient at 2 levels
+
+   !! * Substitutions
+#  include "domzgr_substitute.h90"
+#  include "vectopt_loop_substitute.h90"
+   !!----------------------------------------------------------------------
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
+   !! $Id$
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+   !!----------------------------------------------------------------------
+CONTAINS
+
+  SUBROUTINE tra_ldf_iso_triad( kt, kit000, cdtype, pgu, pgv , pahu, pahv ,       &
+       &                                            ptb, ptbb, pta , kjpt , kpass )
+      !!----------------------------------------------------------------------
+      !!                  ***  ROUTINE tra_ldf_iso_triad  ***
+      !!
+      !! ** Purpose :   Compute the before horizontal tracer (t & s) diffusive
+      !!      trend for a laplacian tensor (ezxcept the dz[ dz[.] ] term) and
+      !!      add it to the general trend of tracer equation.
+      !!
+      !! ** Method  :   The horizontal component of the lateral diffusive trends
+      !!      is provided by a 2nd order operator rotated along neural or geopo-
+      !!      tential surfaces to which an eddy induced advection can be added
+      !!      It is computed using before fields (forward in time) and isopyc-
+      !!      nal or geopotential slopes computed in routine ldfslp.
+      !!
+      !!      see documentation for the desciption
+      !!
+      !! ** Action :   pta   updated with the before rotated diffusion
+      !!               akz   stabilizing vertical diffusivity coefficient (used in trazdf_imp)
+      !!----------------------------------------------------------------------
+      INTEGER                              , INTENT(in   ) ::   kt         ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000     ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
+      INTEGER                              , INTENT(in   ) ::   kpass      ! =1/2 first or second passage
+      REAL(wp), DIMENSION(jpi,jpj    ,kjpt), INTENT(in   ) ::   pgu , pgv  ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   pahu, pahv ! eddy diffusivity at u- and v-points  [m2/s]
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb        ! tracer (kpass=1) or laplacian of tracer (kpass=2)
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptbb       ! tracer (only used in kpass=2)
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta        ! tracer trend
+      !
+      INTEGER  ::  ji, jj, jk, jn   ! dummy loop indices
+      INTEGER  ::  ip,jp,kp         ! dummy loop indices
+      INTEGER  ::  ierr            ! local integer
+      REAL(wp) ::  zmsku, zabe1, zcof1, zcoef3          ! local scalars
+      REAL(wp) ::  zmskv, zabe2, zcof2, zcoef4          !   -      -
+      REAL(wp) ::  zcoef0, ze3w_2, zsign, z2dt, z1_2dt  !   -      -
+      !
+      REAL(wp) ::   zslope_skew, zslope_iso, zslope2, zbu, zbv
+      REAL(wp) ::   ze1ur, ze2vr, ze3wr, zdxt, zdyt, zdzt
+      REAL(wp) ::   zah, zah_slp, zaei_slp
+#if defined key_diaar5
+      REAL(wp) ::   zztmp              ! local scalar
+#endif
+      REAL(wp), POINTER, DIMENSION(:,:  ) :: z2d                                            ! 2D workspace
+      REAL(wp), POINTER, DIMENSION(:,:,:) :: zdit, zdjt, zftu, zftv, ztfw, zpsi_uw, zpsi_vw   ! 3D     -
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_ldf_iso_triad')
+      !
+      CALL wrk_alloc( jpi, jpj,      z2d ) 
+      CALL wrk_alloc( jpi, jpj, jpk, zdit, zdjt, zftu, zftv, ztfw, zpsi_uw, zpsi_vw  ) 
+      IF( .NOT.ALLOCATED(zdkt3d) )  THEN
+         ALLOCATE( zdkt3d(jpi,jpj,0:1) , STAT=ierr )
+         IF( lk_mpp   )   CALL mpp_sum ( ierr )
+         IF( ierr > 0 )   CALL ctl_stop('STOP', 'tra_ldf_iso_triad: unable to allocate arrays')
+      ENDIF
+     !
+      IF( kpass == 1 .AND. kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_ldf_iso_triad : rotated laplacian diffusion operator on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+      ENDIF
+      !
+      !                                               ! set time step size (Euler/Leapfrog)
+      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   z2dt =     rdttra(1)      ! at nit000   (Euler)
+      ELSE                                        ;   z2dt = 2.* rdttra(1)      !             (Leapfrog)
+      ENDIF
+      z1_2dt = 1._wp / z2dt
+      !
+      IF( kpass == 1 ) THEN   ;   zsign =  1._wp      ! bilaplacian operator require a minus sign (eddy diffusivity >0)
+      ELSE                    ;   zsign = -1._wp
+      ENDIF
+                  
+      !!----------------------------------------------------------------------
+      !!   0 - calculate  ah_wslp2, akz, and optionally zpsi_uw, zpsi_vw
+      !!----------------------------------------------------------------------
+      !
+      IF( kpass == 1 ) THEN                  !==  first pass only  and whatever the tracer is  ==!
+         !
+         akz     (:,:,:) = 0._wp      
+         ah_wslp2(:,:,:) = 0._wp
+         IF( ln_ldfeiv_dia ) THEN
+            zpsi_uw(:,:,:) = 0._wp
+            zpsi_vw(:,:,:) = 0._wp
+         ENDIF
+         !
+         DO ip = 0, 1                            ! i-k triads
+            DO kp = 0, 1
+               DO jk = 1, jpkm1
+                  DO jj = 1, jpjm1
+                     DO ji = 1, fs_jpim1
+                        ze3wr = 1._wp / fse3w(ji+ip,jj,jk+kp)
+                        zbu   = e1e2u(ji,jj) * fse3u(ji,jj,jk)
+                        zah   = 0.25_wp * pahu(ji,jj,jk)
+                        zslope_skew = triadi_g(ji+ip,jj,jk,1-ip,kp)
+                        ! Subtract s-coordinate slope at t-points to give slope rel to s-surfaces (do this by *adding* gradient of depth)
+                        zslope2 = zslope_skew + ( fsdept(ji+1,jj,jk) - fsdept(ji,jj,jk) ) * r1_e1u(ji,jj) * umask(ji,jj,jk+kp)
+                        zslope2 = zslope2 *zslope2
+                        ah_wslp2(ji+ip,jj,jk+kp) = ah_wslp2(ji+ip,jj,jk+kp) + zah * zbu * ze3wr * r1_e1e2t(ji+ip,jj) * zslope2
+                        akz     (ji+ip,jj,jk+kp) = akz     (ji+ip,jj,jk+kp) + zah / ( e1u(ji,jj) * e1u(ji,jj) ) * umask(ji,jj,jk+kp)
+                        !
+                       IF( ln_ldfeiv_dia )   zpsi_uw(ji,jj,jk+kp) = zpsi_uw(ji,jj,jk+kp)   &
+                           &                                       + 0.25_wp * aeiu(ji,jj,jk) * e2u(ji,jj) * zslope_skew
+                     END DO
+                  END DO
+               END DO
+            END DO
+         END DO
+         !
+         DO jp = 0, 1                            ! j-k triads 
+            DO kp = 0, 1
+               DO jk = 1, jpkm1
+                  DO jj = 1, jpjm1
+                     DO ji = 1, fs_jpim1
+                        ze3wr = 1.0_wp / fse3w(ji,jj+jp,jk+kp)
+                        zbv   = e1e2v(ji,jj) * fse3v(ji,jj,jk)
+                        zah   = 0.25_wp * pahv(ji,jj,jk)
+                        zslope_skew = triadj_g(ji,jj+jp,jk,1-jp,kp)
+                        ! Subtract s-coordinate slope at t-points to give slope rel to s surfaces
+                        !    (do this by *adding* gradient of depth)
+                        zslope2 = zslope_skew + ( fsdept(ji,jj+1,jk) - fsdept(ji,jj,jk) ) * r1_e2v(ji,jj) * vmask(ji,jj,jk+kp)
+                        zslope2 = zslope2 * zslope2
+                        ah_wslp2(ji,jj+jp,jk+kp) = ah_wslp2(ji,jj+jp,jk+kp) + zah * zbv * ze3wr / e1e2t(ji,jj+jp) * zslope2
+                        akz     (ji,jj+jp,jk+kp) = akz     (ji,jj+jp,jk+kp) + zah / ( e2v(ji,jj) * e2v(ji,jj) ) * vmask(ji,jj,jk+kp)
+                        !
+                        IF( ln_ldfeiv_dia )   zpsi_vw(ji,jj,jk+kp) = zpsi_vw(ji,jj,jk+kp)   &
+                           &                                       + 0.25 * aeiv(ji,jj,jk) * e1v(ji,jj) * zslope_skew
+                     END DO
+                  END DO
+               END DO
+            END DO
+         END DO
+         !
+         IF( ln_traldf_msc ) THEN                ! stabilizing vertical diffusivity coefficient
+            !
+            IF( ln_traldf_blp ) THEN                ! bilaplacian operator
+               DO jk = 2, jpkm1
+                  DO jj = 1, jpjm1
+                     DO ji = 1, fs_jpim1
+                        akz(ji,jj,jk) = 16._wp * ah_wslp2(ji,jj,jk)   &
+                           &          * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ( fse3w(ji,jj,jk) * fse3w(ji,jj,jk) )  )
+                     END DO
+                  END DO
+               END DO
+            ELSEIF( ln_traldf_lap ) THEN              ! laplacian operator
+               DO jk = 2, jpkm1
+                  DO jj = 1, jpjm1
+                     DO ji = 1, fs_jpim1
+                        ze3w_2 = fse3w(ji,jj,jk) * fse3w(ji,jj,jk)
+                        zcoef0 = z2dt * (  akz(ji,jj,jk) + ah_wslp2(ji,jj,jk) / ze3w_2  )
+                        akz(ji,jj,jk) = MAX( zcoef0 - 0.5_wp , 0._wp ) * ze3w_2 * z1_2dt
+                     END DO
+                  END DO
+               END DO
+           ENDIF
+           !
+         ELSE                                    ! 33 flux set to zero with akz=ah_wslp2 ==>> computed in full implicit
+            akz(:,:,:) = ah_wslp2(:,:,:)      
+         ENDIF
+         !
+         IF( ln_ldfeiv_dia .AND. cdtype == 'TRA' )   CALL ldf_eiv_dia( zpsi_uw, zpsi_vw )
+         !
+      ENDIF                                  !==  end 1st pass only  ==!
+      !
+      !                                                           ! ===========
+      DO jn = 1, kjpt                                             ! tracer loop
+         !                                                        ! ===========
+         ! Zero fluxes for each tracer
+!!gm  this should probably be done outside the jn loop
+         ztfw(:,:,:) = 0._wp
+         zftu(:,:,:) = 0._wp
+         zftv(:,:,:) = 0._wp
+         !
+         DO jk = 1, jpkm1                          !==  before lateral T & S gradients at T-level jk  ==!
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zdit(ji,jj,jk) = ( ptb(ji+1,jj  ,jk,jn) - ptb(ji,jj,jk,jn) ) * umask(ji,jj,jk)
+                  zdjt(ji,jj,jk) = ( ptb(ji  ,jj+1,jk,jn) - ptb(ji,jj,jk,jn) ) * vmask(ji,jj,jk)
+               END DO
+            END DO
+         END DO
+         IF( ln_zps.and.l_grad_zps ) THEN              ! partial steps: correction at the last level
+            DO jj = 1, jpjm1
+               DO ji = 1, jpim1
+                  zdit(ji,jj,mbku(ji,jj)) = pgu(ji,jj,jn)
+                  zdjt(ji,jj,mbkv(ji,jj)) = pgv(ji,jj,jn)
+               END DO
+            END DO
+         ENDIF
+
+         !!----------------------------------------------------------------------
+         !!   II - horizontal trend  (full)
+         !!----------------------------------------------------------------------
+         !
+         DO jk = 1, jpkm1
+            !
+            !                    !==  Vertical tracer gradient at level jk and jk+1
+            zdkt3d(:,:,1) = ( ptb(:,:,jk,jn) - ptb(:,:,jk+1,jn) ) * tmask(:,:,jk+1)
+            !
+            !                    ! surface boundary condition: zdkt3d(jk=0)=zdkt3d(jk=1)
+            IF( jk == 1 ) THEN   ;   zdkt3d(:,:,0) = zdkt3d(:,:,1)
+            ELSE                 ;   zdkt3d(:,:,0) = ( ptb(:,:,jk-1,jn) - ptb(:,:,jk,jn) ) * tmask(:,:,jk)
+            ENDIF
+            !
+            zaei_slp = 0._wp
+            !
+            IF( ln_botmix_triad ) THEN
+               DO ip = 0, 1              !==  Horizontal & vertical fluxes
+                  DO kp = 0, 1
+                     DO jj = 1, jpjm1
+                        DO ji = 1, fs_jpim1
+                           ze1ur = r1_e1u(ji,jj)
+                           zdxt  = zdit(ji,jj,jk) * ze1ur
+                           ze3wr = 1._wp / fse3w(ji+ip,jj,jk+kp)
+                           zdzt  = zdkt3d(ji+ip,jj,kp) * ze3wr
+                           zslope_skew = triadi_g(ji+ip,jj,jk,1-ip,kp)
+                           zslope_iso  = triadi  (ji+ip,jj,jk,1-ip,kp)
+
+                           zbu = 0.25_wp * e1e2u(ji,jj) * fse3u(ji,jj,jk)
+                           ! ln_botmix_triad is .T. don't mask zah for bottom half cells    !!gm ?????   ahu is masked....
+                           zah = pahu(ji,jj,jk)
+                           zah_slp  = zah * zslope_iso
+                           IF( ln_ldfeiv )   zaei_slp = aeiu(ji,jj,jk) * zslope_skew
+                           zftu(ji   ,jj,jk   ) = zftu(ji   ,jj,jk   ) - ( zah * zdxt + (zah_slp - zaei_slp) * zdzt ) * zbu * ze1ur
+                           ztfw(ji+ip,jj,jk+kp) = ztfw(ji+ip,jj,jk+kp) - ( zah_slp + zaei_slp) * zdxt                 * zbu * ze3wr
+                        END DO
+                     END DO
+                  END DO
+               END DO
+
+               DO jp = 0, 1
+                  DO kp = 0, 1
+                     DO jj = 1, jpjm1
+                        DO ji = 1, fs_jpim1
+                           ze2vr =r1_e2v(ji,jj)
+                           zdyt  = zdjt(ji,jj,jk) * ze2vr
+                           ze3wr = 1._wp / fse3w(ji,jj+jp,jk+kp)
+                           zdzt  = zdkt3d(ji,jj+jp,kp) * ze3wr
+                           zslope_skew = triadj_g(ji,jj+jp,jk,1-jp,kp)
+                           zslope_iso  = triadj(ji,jj+jp,jk,1-jp,kp)
+                           zbv = 0.25_wp * e1e2v(ji,jj) * fse3v(ji,jj,jk)
+                           ! ln_botmix_triad is .T. don't mask zah for bottom half cells    !!gm ?????  ahv is masked...
+                           zah = pahv(ji,jj,jk)
+                           zah_slp = zah * zslope_iso
+                           IF( ln_ldfeiv )   zaei_slp = aeiv(ji,jj,jk) * zslope_skew
+                           zftv(ji,jj   ,jk   ) = zftv(ji,jj   ,jk   ) - ( zah * zdyt + (zah_slp - zaei_slp) * zdzt ) * zbv * ze2vr
+                           ztfw(ji,jj+jp,jk+kp) = ztfw(ji,jj+jp,jk+kp) - ( zah_slp + zaei_slp ) * zdyt                * zbv * ze3wr
+                        END DO
+                     END DO
+                  END DO
+               END DO
+
+            ELSE
+
+               DO ip = 0, 1               !==  Horizontal & vertical fluxes
+                  DO kp = 0, 1
+                     DO jj = 1, jpjm1
+                        DO ji = 1, fs_jpim1
+                           ze1ur = r1_e1u(ji,jj)
+                           zdxt  = zdit(ji,jj,jk) * ze1ur
+                           ze3wr = 1._wp / fse3w(ji+ip,jj,jk+kp)
+                           zdzt  = zdkt3d(ji+ip,jj,kp) * ze3wr
+                           zslope_skew = triadi_g(ji+ip,jj,jk,1-ip,kp)
+                           zslope_iso  = triadi(ji+ip,jj,jk,1-ip,kp)
+
+                           zbu = 0.25_wp * e1e2u(ji,jj) * fse3u(ji,jj,jk)
+                           ! ln_botmix_triad is .F. mask zah for bottom half cells
+                           zah = pahu(ji,jj,jk) * umask(ji,jj,jk+kp)         ! pahu(ji+ip,jj,jk)   ===>>  ????
+                           zah_slp  = zah * zslope_iso
+                           IF( ln_ldfeiv )   zaei_slp = aeiu(ji,jj,jk) * zslope_skew        ! fsaeit(ji+ip,jj,jk)*zslope_skew
+                           zftu(ji   ,jj,jk   ) = zftu(ji   ,jj,jk   ) - ( zah * zdxt + (zah_slp - zaei_slp) * zdzt ) * zbu * ze1ur
+                           ztfw(ji+ip,jj,jk+kp) = ztfw(ji+ip,jj,jk+kp) - (zah_slp + zaei_slp) * zdxt * zbu * ze3wr
+                        END DO
+                     END DO
+                  END DO
+               END DO
+
+               DO jp = 0, 1
+                  DO kp = 0, 1
+                     DO jj = 1, jpjm1
+                        DO ji = 1, fs_jpim1
+                           ze2vr = r1_e2v(ji,jj)
+                           zdyt  = zdjt(ji,jj,jk) * ze2vr
+                           ze3wr = 1._wp / fse3w(ji,jj+jp,jk+kp)
+                           zdzt  = zdkt3d(ji,jj+jp,kp) * ze3wr
+                           zslope_skew = triadj_g(ji,jj+jp,jk,1-jp,kp)
+                           zslope_iso  = triadj(ji,jj+jp,jk,1-jp,kp)
+                           zbv = 0.25_wp * e1e2v(ji,jj) * fse3v(ji,jj,jk)
+                           ! ln_botmix_triad is .F. mask zah for bottom half cells
+                           zah = pahv(ji,jj,jk) * vmask(ji,jj,jk+kp)         ! pahv(ji,jj+jp,jk)  ????
+                           zah_slp = zah * zslope_iso
+                           IF( ln_ldfeiv )   zaei_slp = aeiv(ji,jj,jk) * zslope_skew        ! fsaeit(ji,jj+jp,jk)*zslope_skew
+                           zftv(ji,jj,jk) = zftv(ji,jj,jk) - ( zah * zdyt + (zah_slp - zaei_slp) * zdzt ) * zbv * ze2vr
+                           ztfw(ji,jj+jp,jk+kp) = ztfw(ji,jj+jp,jk+kp) - (zah_slp + zaei_slp) * zdyt * zbv * ze3wr
+                        END DO
+                     END DO
+                  END DO
+               END DO
+            ENDIF
+            !                             !==  horizontal divergence and add to the general trend  ==!
+            DO jj = 2 , jpjm1
+               DO ji = fs_2, fs_jpim1  ! vector opt.
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + zsign * (  zftu(ji-1,jj,jk) - zftu(ji,jj,jk)       &
+                     &                                           + zftv(ji,jj-1,jk) - zftv(ji,jj,jk)   )   &
+                     &                                        / (  e1e2t(ji,jj) * fse3t(ji,jj,jk)  )
+               END DO
+            END DO
+            !
+         END DO
+         !
+         !                                !==  add the vertical 33 flux  ==!
+         IF( ln_traldf_lap ) THEN               ! laplacian case: eddy coef = ah_wslp2 - akz
+            DO jk = 2, jpkm1       
+               DO jj = 1, jpjm1
+                  DO ji = fs_2, fs_jpim1
+                     ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / fse3w(ji,jj,jk) * tmask(ji,jj,jk)   &
+                        &                            * ( ah_wslp2(ji,jj,jk) - akz(ji,jj,jk) )             &
+                        &                            * ( ptb(ji,jj,jk-1,jn) - ptb(ji,jj,jk,jn) )
+                  END DO
+               END DO
+            END DO
+         ELSE                                   ! bilaplacian 
+            SELECT CASE( kpass )
+            CASE(  1  )                            ! 1st pass : eddy coef = ah_wslp2
+               DO jk = 2, jpkm1 
+                  DO jj = 1, jpjm1
+                     DO ji = fs_2, fs_jpim1
+                        ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / fse3w(ji,jj,jk) * tmask(ji,jj,jk)             &
+                           &                            * ah_wslp2(ji,jj,jk) * ( ptb(ji,jj,jk-1,jn) - ptb(ji,jj,jk,jn) )
+                     END DO
+                  END DO
+               END DO 
+            CASE(  2  )                            ! 2nd pass : eddy flux = ah_wslp2 and akz applied on ptb  and ptbb gradients, resp.
+               DO jk = 2, jpkm1 
+                  DO jj = 1, jpjm1
+                     DO ji = fs_2, fs_jpim1
+                        ztfw(ji,jj,jk) = ztfw(ji,jj,jk) - e1e2t(ji,jj) / fse3w(ji,jj,jk) * tmask(ji,jj,jk)                      &
+                           &                            * (  ah_wslp2(ji,jj,jk) * ( ptb (ji,jj,jk-1,jn) - ptb (ji,jj,jk,jn) )   &
+                           &                               + akz     (ji,jj,jk) * ( ptbb(ji,jj,jk-1,jn) - ptbb(ji,jj,jk,jn) )   )
+                     END DO
+                  END DO
+               END DO
+            END SELECT 
+         ENDIF
+         !
+         DO jk = 1, jpkm1                 !==  Divergence of vertical fluxes added to pta  ==!
+            DO jj = 2, jpjm1
+               DO ji = fs_2, fs_jpim1  ! vector opt.
+                  pta(ji,jj,jk,jn) = pta(ji,jj,jk,jn) + zsign * (  ztfw(ji,jj,jk+1) - ztfw(ji,jj,jk)  )   &
+                     &                                        / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
+               END DO
+            END DO
+         END DO
+         !
+         IF( ( kpass == 1 .AND. ln_traldf_lap ) .OR.  &     !==  first pass only (  laplacian)  ==!
+             ( kpass == 2 .AND. ln_traldf_blp ) ) THEN      !==  2nd   pass      (bilaplacian)  ==!
+            !
+            !                             ! "Poleward" diffusive heat or salt transports (T-S case only)
+            IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( MOD( kt, nn_fptr ) == 0 ) ) THEN
+               IF( jn == jp_tem)   htr_ldf(:) = ptr_vj( zftv(:,:,:) )        ! 3.3  names
+               IF( jn == jp_sal)   str_ldf(:) = ptr_vj( zftv(:,:,:) )
+            ENDIF
+
+#if defined key_diaar5
+            !                             ! AR5 diagnostics:  vertical integrated heat transport
+            IF( cdtype == 'TRA' .AND. jn == jp_tem  ) THEN
+               z2d(:,:) = 0._wp
+               zztmp = rau0 * rcp
+               DO jk = 1, jpkm1
+                  DO jj = 2, jpjm1
+                     DO ji = fs_2, fs_jpim1   ! vector opt.
+                        z2d(ji,jj) = z2d(ji,jj) + zftu(ji,jj,jk)
+                     END DO
+                  END DO
+               END DO
+               z2d(:,:) = zztmp * z2d(:,:)
+               CALL lbc_lnk( z2d, 'U', -1. )
+               CALL iom_put( "udiff_heattr", z2d )                  ! heat transport in i-direction
+               z2d(:,:) = 0._wp
+               DO jk = 1, jpkm1
+                  DO jj = 2, jpjm1
+                     DO ji = fs_2, fs_jpim1   ! vector opt.
+                        z2d(ji,jj) = z2d(ji,jj) + zftv(ji,jj,jk)
+                     END DO
+                  END DO
+               END DO
+               z2d(:,:) = zztmp * z2d(:,:)
+               CALL lbc_lnk( z2d, 'V', -1. )
+               CALL iom_put( "vdiff_heattr", z2d )                  !  heat transport in j-direction
+            ENDIF
+#endif
+         ENDIF                                                    !== end pass selection  ==!
+         !
+         !                                                        ! ===============
+      END DO                                                      ! end tracer loop
+      !                                                           ! ===============
+      !
+      CALL wrk_dealloc( jpi, jpj,      z2d ) 
+      CALL wrk_dealloc( jpi, jpj, jpk, zdit, zdjt, ztfw  ) 
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_ldf_iso_triad')
+      !
+   END SUBROUTINE tra_ldf_iso_triad
+
+
+   SUBROUTINE tra_ldf_iso_blp( kt, kit000, cdtype, pgu, pgv, pahu, pahv,      &
+       &                                                       ptb, pta, kjpt )
+      !!----------------------------------------------------------------------
+      !!                 ***  ROUTINE tra_ldf_blp  ***
+      !!                    
+      !! ** Purpose :   Compute the before horizontal tracer diffusive 
+      !!      trend and add it to the general trend of tracer equation.
+      !!
+      !! ** Method  :   The lateral diffusive trends is provided by a bilaplacian
+      !!      operator rotated along iso-neutral surfaces applied to before field
+      !!      (forward in time).
+      !!         It is computed by two successive calls to tra_ldf_iso_triad 
+      !!      routine (i.e. a laplacian triad-operator).
+      !!         It requires ln_traldf_msc=T unless a very small time step is used
+      !!
+      !! ** Action :   pta   updated with the before rotated bilaplacian diffusion
+      !!               akz   stabilizing vertical diffusivity coefficient (used in trazdf_imp)
+      !!----------------------------------------------------------------------
+      INTEGER                              , INTENT(in   ) ::   kt         ! ocean time-step index
+      INTEGER                              , INTENT(in   ) ::   kit000     ! first time step index
+      CHARACTER(len=3)                     , INTENT(in   ) ::   cdtype     ! =TRA or TRC (tracer indicator)
+      INTEGER                              , INTENT(in   ) ::   kjpt       ! number of tracers
+      REAL(wp), DIMENSION(jpi,jpj    ,kjpt), INTENT(in   ) ::   pgu, pgv   ! tracer gradient at pstep levels
+      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   pahu, pahv   ! eddy diffusivity at u- and v-points  [m2/s]
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(in   ) ::   ptb        ! before and now tracer fields
+      REAL(wp), DIMENSION(jpi,jpj,jpk,kjpt), INTENT(inout) ::   pta        ! tracer trend
+      !
+      INTEGER ::   ji, jj, jk, jn   ! dummy loop indices
+      REAL(wp), POINTER, DIMENSION(:,:,:,:) :: zlap         ! laplacian at t-point
+      REAL(wp), POINTER, DIMENSION(:,:,:)   :: zglu, zglv   ! gradient of the laplacian at partial step level (u- and v-points)
+      !!----------------------------------------------------------------------
+      !
+      IF( nn_timing == 1 )  CALL timing_start('tra_ldf_iso_blp')
+      !
+      CALL wrk_alloc( jpi, jpj, jpk, kjpt, zlap ) 
+      CALL wrk_alloc( jpi, jpj     , kjpt, zglu, zglv ) 
+      !
+      IF( kt == kit000 )  THEN
+         IF(lwp) WRITE(numout,*)
+         IF(lwp) WRITE(numout,*) 'tra_ldf_iso_blp : iso-neutral biharmonic operator on ', cdtype
+         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~~~'
+      ENDIF
+
+      zlap(:,:,:,:) = 0._wp
+      !                                                           ! rotated laplacian applied to ptb (output in zlap)
+      IF( ln_traldf_triad ) THEN                                        ! triad operator (Griffies)
+         CALL tra_ldf_iso_triad( kt, kit000, cdtype, pgu, pgv, pahu, pahv, ptb, ptb, zlap, kjpt, 1 )
+      ELSE                                                              ! Madec operator
+         CALL tra_ldf_iso      ( kt, kit000, cdtype, pgu, pgv, pahu, pahv, ptb, ptb, zlap, kjpt, 1 )
+      ENDIF                                                                               
+      !
+      DO jn = 1, kjpt
+         CALL lbc_lnk( zlap(:,:,:,jn) , 'T', 1. )                 ! Lateral boundary conditions (unchanged sign)
+      END DO
+      !      
+      IF( ln_zps )   CALL zps_hde( kt, jpts, zlap, zglu, zglv )   ! Partial steps: hor. gradient of laplacian at the partial step level
+      
+      !                                                           ! rotated laplacian applied to zlap (output in pta)
+      IF( ln_traldf_triad ) THEN                                        ! triad operator (Griffies)
+         CALL tra_ldf_iso_triad( kt, kit000, cdtype, zglu, zglv, pahu, pahv, zlap, ptb, pta, kjpt, 2 )
+      ELSE                                                              ! Madec operator
+         CALL tra_ldf_iso      ( kt, kit000, cdtype, zglu, zglv, pahu, pahv, zlap, ptb, pta, kjpt, 2 )
+      ENDIF                                                                               
+      !
+      CALL wrk_dealloc( jpi, jpj, jpk, kjpt, zlap ) 
+      CALL wrk_dealloc( jpi, jpj     , kjpt, zglu, zglv ) 
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('tra_ldf_iso_blp')
+      !
+   END SUBROUTINE tra_ldf_iso_blp
+
+   !!==============================================================================
+END MODULE traldf_iso_triad
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 4616)
@@ -38,6 +38,4 @@
    PUBLIC   tra_ldf_blp   ! routine called by step.F90
 
-   REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:) ::   e1ur, e2vr   ! scale factor coefficients
-
    !! * Substitutions
 #  include "domzgr_substitute.h90"
@@ -61,6 +59,6 @@
       !!      fields (forward time scheme). The horizontal diffusive trends of 
       !!      the tracer is given by:
-      !!          difft = 1/(e1t*e2t*e3t) {  di-1[ pahu e2u*e3u/e1u di(tb) ]
-      !!                                   + dj-1[ pahv e1v*e3v/e2v dj(tb) ] }
+      !!          difft = 1/(e1e2t*e3t) {  di-1[ pahu e2u*e3u/e1u di(tb) ]
+      !!                                 + dj-1[ pahv e1v*e3v/e2v dj(tb) ] }
       !!      Add this trend to the general tracer trend pta :
       !!          pta = pta + difft
@@ -98,6 +96,6 @@
          DO jj = 1, jpjm1
             DO ji = 1, fs_jpim1   ! vector opt.
-               zaheeu(ji,jj,jk) = pahu(ji,jj,jk) * e2u(ji,jj) * fse3u(ji,jj,jk) / e1u(ji,jj)   !!gm   * umask(ji,jj,jk)
-               zaheev(ji,jj,jk) = pahv(ji,jj,jk) * e1v(ji,jj) * fse3v(ji,jj,jk) / e2v(ji,jj)   !!gm   * vmask(ji,jj,jk)
+               zaheeu(ji,jj,jk) = pahu(ji,jj,jk) * e2_e1u(ji,jj) * fse3u(ji,jj,jk)   !!gm   * umask(ji,jj,jk)
+               zaheev(ji,jj,jk) = pahv(ji,jj,jk) * e1_e2v(ji,jj) * fse3v(ji,jj,jk)   !!gm   * vmask(ji,jj,jk)
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 4616)
@@ -62,5 +62,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -187,8 +187,5 @@
                   CALL fld_read( kt, 1, sf_chl )                         ! Read Chl data and provides it at the current time step
                   !         
-!CDIR COLLAPSE
-!CDIR NOVERRCHK
                   DO jj = 1, jpj                                         ! Separation in R-G-B depending of the surface Chl
-!CDIR NOVERRCHK
                      DO ji = 1, jpi
                         zchl = MIN( 10. , MAX( 0.03, sf_chl(1)%fnow(ji,jj,1) ) )
@@ -215,7 +212,5 @@
                !
                DO jk = 2, nksr+1
-!CDIR NOVERRCHK
                   DO jj = 1, jpj
-!CDIR NOVERRCHK   
                      DO ji = 1, jpi
                         zc0 = ze0(ji,jj,jk-1) * EXP( - fse3t(ji,jj,jk-1) * xsi0r     )
@@ -502,7 +497,5 @@
                
                   DO jk = 2, nksr+1
-!CDIR NOVERRCHK
                      DO jj = 1, jpj
-!CDIR NOVERRCHK   
                         DO ji = 1, jpi
                            zc0 = ze0(ji,jj,jk-1) * EXP( - e3t_0(ji,jj,jk-1) * xsi0r     )
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/zpshde.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/zpshde.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRA/zpshde.F90	(revision 4616)
@@ -105,11 +105,6 @@
       DO jn = 1, kjpt      !==   Interpolation of tracers at the last ocean level   ==!
          !
-# if defined key_vectopt_loop
-         jj = 1
-         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolled)
-# else
          DO jj = 1, jpjm1
             DO ji = 1, jpim1
-# endif
                iku = mbku(ji,jj)   ;   ikum1 = MAX( iku - 1 , 1 )    ! last and before last ocean level at u- & v-points
                ikv = mbkv(ji,jj)   ;   ikvm1 = MAX( ikv - 1 , 1 )    ! if level first is a p-step, ik.m1=1
@@ -146,7 +141,5 @@
                   pgtv(ji,jj,jn) = vmask(ji,jj,1) * ( pta(ji,jj+1,ikv,jn) - ztj(ji,jj,jn) )
                ENDIF
-# if ! defined key_vectopt_loop
             END DO
-# endif
          END DO
          CALL lbc_lnk( pgtu(:,:,jn), 'U', -1. )   ;   CALL lbc_lnk( pgtv(:,:,jn), 'V', -1. )   ! Lateral boundary cond.
@@ -156,11 +149,6 @@
       ! horizontal derivative of density anomalies (rd)
       IF( PRESENT( prd ) ) THEN         ! depth of the partial step level
-# if defined key_vectopt_loop
-         jj = 1
-         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolled)
-# else
          DO jj = 1, jpjm1
             DO ji = 1, jpim1
-# endif
                iku = mbku(ji,jj)
                ikv = mbkv(ji,jj)
@@ -173,7 +161,5 @@
                ELSE                        ;   zhj(ji,jj) = fsdept(ji,jj+1,ikv)     ! -     -      case 2
                ENDIF
-# if ! defined key_vectopt_loop
             END DO
-# endif
          END DO
 
@@ -184,11 +170,6 @@
 
          ! Gradient of density at the last level 
-# if defined key_vectopt_loop
-         jj = 1
-         DO ji = 1, jpij-jpi   ! vector opt. (forced unrolled)
-# else
          DO jj = 1, jpjm1
             DO ji = 1, jpim1
-# endif
                iku = mbku(ji,jj)
                ikv = mbkv(ji,jj)
@@ -201,7 +182,5 @@
                ELSE                        ;   pgrv(ji,jj) = vmask(ji,jj,1) * ( prd(ji,jj+1,ikv) - zrj(ji,jj) )   ! j: 2
                ENDIF
-# if ! defined key_vectopt_loop
             END DO
-# endif
          END DO
          CALL lbc_lnk( pgru , 'U', -1. )   ;   CALL lbc_lnk( pgrv , 'V', -1. )   ! Lateral boundary conditions
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90	(revision 4616)
@@ -92,6 +92,6 @@
          SELECT CASE( ktrd )
          CASE( jpdyn_trd_swf )         ! surface forcing
-            umo(ktrd) = SUM( ptrd2dx(:,:) * e1u(:,:) * e2u(:,:) * fse3u(:,:,1) )
-            vmo(ktrd) = SUM( ptrd2dy(:,:) * e1v(:,:) * e2v(:,:) * fse3v(:,:,1) )
+            umo(ktrd) = SUM( ptrd2dx(:,:) * e1e2u(:,:) * fse3u(:,:,1) )
+            vmo(ktrd) = SUM( ptrd2dy(:,:) * e1e2v(:,:) * fse3v(:,:,1) )
          END SELECT
          !
@@ -104,6 +104,6 @@
       !
       CASE( 'DYN' )              ! Momentum
-         hke(ktrd) = SUM(   un(:,:,1) * ptrd2dx(:,:) * e1u(:,:) * e2u(:,:) * fse3u(:,:,1)   &
-            &             + vn(:,:,1) * ptrd2dy(:,:) * e1v(:,:) * e2v(:,:) * fse3v(:,:,1)   )
+         hke(ktrd) = SUM(   un(:,:,1) * ptrd2dx(:,:) * e1e2u(:,:) * fse3u(:,:,1)   &
+            &             + vn(:,:,1) * ptrd2dy(:,:) * e1e2v(:,:) * fse3v(:,:,1)   )
          !
       CASE( 'TRA' )              ! Tracers
@@ -159,6 +159,6 @@
          vmo(ktrd) = 0._wp
          DO jk = 1, jpkm1
-            umo(ktrd) = umo(ktrd) + SUM( ptrd3dx(:,:,jk) * e1u(:,:) * e2u(:,:) * fse3u(:,:,jk) )
-            vmo(ktrd) = vmo(ktrd) + SUM( ptrd3dy(:,:,jk) * e1v(:,:) * e2v(:,:) * fse3v(:,:,jk) )
+            umo(ktrd) = umo(ktrd) + SUM( ptrd3dx(:,:,jk) * e1e2u(:,:) * fse3u(:,:,jk) )
+            vmo(ktrd) = vmo(ktrd) + SUM( ptrd3dy(:,:,jk) * e1e2v(:,:) * fse3v(:,:,jk) )
          END DO
          !
@@ -178,6 +178,6 @@
          hke(ktrd) = 0._wp
          DO jk = 1, jpkm1
-            hke(ktrd) = hke(ktrd) + SUM(   un(:,:,jk) * ptrd3dx(:,:,jk) * e1u(:,:) * e2u(:,:) * fse3u(:,:,jk)   &
-               &                         + vn(:,:,jk) * ptrd3dy(:,:,jk) * e1v(:,:) * e2v(:,:) * fse3v(:,:,jk)   )
+            hke(ktrd) = hke(ktrd) + SUM(   un(:,:,jk) * ptrd3dx(:,:,jk) * e1e2u(:,:) * fse3u(:,:,jk)   &
+               &                         + vn(:,:,jk) * ptrd3dy(:,:,jk) * e1e2v(:,:) * fse3v(:,:,jk)   )
          END DO
          !
@@ -230,6 +230,6 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               tvolu = tvolu + e1u(ji,jj) * e2u(ji,jj) * fse3u(ji,jj,jk) * tmask_i(ji+1,jj  ) * tmask_i(ji,jj) * umask(ji,jj,jk)
-               tvolv = tvolv + e1v(ji,jj) * e2v(ji,jj) * fse3v(ji,jj,jk) * tmask_i(ji  ,jj+1) * tmask_i(ji,jj) * vmask(ji,jj,jk)
+               tvolu = tvolu + e1e2u(ji,jj) * fse3u(ji,jj,jk) * tmask_i(ji+1,jj  ) * tmask_i(ji,jj) * umask(ji,jj,jk)
+               tvolv = tvolv + e1e2v(ji,jj) * fse3v(ji,jj,jk) * tmask_i(ji  ,jj+1) * tmask_i(ji,jj) * vmask(ji,jj,jk)
             END DO
          END DO
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90	(revision 4616)
@@ -179,5 +179,5 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-               zbtr    = 1.e0/ ( e1t(ji,jj) * e2t(ji,jj) * fse3t(ji,jj,jk) )
+               zbtr    = 1._wp / ( e1e2t(ji,jj) * fse3t(ji,jj,jk) )
                ptrd(ji,jj,jk) = - zbtr * (      pf (ji,jj,jk) - pf (ji-ii,jj-ij,jk-ik)                    &
                  &                          - ( pun(ji,jj,jk) - pun(ji-ii,jj-ij,jk-ik) ) * ptn(ji,jj,jk)  )
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 4616)
@@ -105,14 +105,6 @@
          IF ( ln_loglayer.AND.lk_vvl ) THEN ! "log layer" bottom friction coefficient
 
-#  if defined key_vectopt_loop
-            DO jj = 1, 1
-!CDIR NOVERRCHK
-               DO ji = 1, jpij   ! vector opt. (forced unrolling)
-#  else
-!CDIR NOVERRCHK
             DO jj = 1, jpj
-!CDIR NOVERRCHK
                DO ji = 1, jpi
-#  endif
                   ikbt = mbkt(ji,jj)
 ! JC: possible WAD implementation should modify line below if layers vanish
@@ -127,14 +119,6 @@
          ENDIF
 
-# if defined key_vectopt_loop
-         DO jj = 1, 1
-!CDIR NOVERRCHK
-            DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
-# else
-!CDIR NOVERRCHK
          DO jj = 2, jpjm1
-!CDIR NOVERRCHK
             DO ji = 2, jpim1
-# endif
                ikbu = mbku(ji,jj)         ! ocean bottom level at u- and v-points
                ikbv = mbkv(ji,jj)         ! (deepest ocean u- and v-points)
@@ -265,14 +249,6 @@
          !
          IF ( ln_loglayer.AND.(.NOT.lk_vvl) ) THEN ! set "log layer" bottom friction once for all
-#  if defined key_vectopt_loop
-            DO jj = 1, 1
-!CDIR NOVERRCHK
-               DO ji = 1, jpij   ! vector opt. (forced unrolling)
-#  else
-!CDIR NOVERRCHK
             DO jj = 1, jpj
-!CDIR NOVERRCHK
                DO ji = 1, jpi
-#  endif
                   ikbt = mbkt(ji,jj)
                   ztmp = tmask(ji,jj,ikbt) * ( vkarmn / LOG( 0.5_wp * fse3t_n(ji,jj,ikbt) / rn_bfrz0 ))**2._wp
@@ -309,14 +285,6 @@
       zmaxbfr = -1.e10_wp    ! initialise tracker for maximum of bottom friction coefficient
       !
-#  if defined key_vectopt_loop
-      DO jj = 1, 1
-!CDIR NOVERRCHK
-         DO ji = jpi+2, jpij-jpi-1   ! vector opt. (forced unrolling)
-#  else
-!CDIR NOVERRCHK
       DO jj = 2, jpjm1
-!CDIR NOVERRCHK
          DO ji = 2, jpim1
-#  endif
              ikbu = mbku(ji,jj)       ! deepest ocean level at u- and v-points
              ikbv = mbkv(ji,jj)
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 4616)
@@ -44,5 +44,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -145,7 +145,5 @@
          ! ------------------
          ! Constant eddy coefficient: reset to the background value
-!CDIR NOVERRCHK
          DO jj = 1, jpj
-!CDIR NOVERRCHK
             DO ji = 1, jpi
                zinr = 1./rrau(ji,jj,jk)
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfevd.F90	(revision 4616)
@@ -78,11 +78,6 @@
          !
          DO jk = 1, jpkm1 
-#if defined key_vectopt_loop
-            DO jj = 1, 1                     ! big loop forced
-               DO ji = jpi+2, jpij   
-#else
             DO jj = 2, jpj             ! no vector opt.
                DO ji = 2, jpi
-#endif
 #if defined key_zdfkpp
                   ! no evd mixing in the boundary layer with KPP
@@ -110,11 +105,6 @@
          DO jk = 1, jpkm1
 !!!         WHERE( rn2(:,:,jk) <= -1.e-12 ) avt(:,:,jk) = tmask(:,:,jk) * avevd   ! agissant sur T SEUL! 
-#if defined key_vectopt_loop
-            DO jj = 1, 1                     ! big loop forced
-               DO ji = 1, jpij   
-#else
             DO jj = 1, jpj             ! loop over the whole domain (no lbc_lnk call)
                DO ji = 1, jpi
-#endif
 #if defined key_zdfkpp
                   ! no evd mixing in the boundary layer with KPP
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 4616)
@@ -112,5 +112,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -174,7 +174,5 @@
 
       ! Compute surface and bottom friction at T-points
-!CDIR NOVERRCHK
       DO jj = 2, jpjm1
-!CDIR NOVERRCHK
          DO ji = fs_2, fs_jpim1   ! vector opt.
             ! 
@@ -387,7 +385,5 @@
          !                      ! en(ibot) = u*^2 / Co2 and mxln(ibot) = rn_lmin
          !                      ! Balance between the production and the dissipation terms
-!CDIR NOVERRCHK
-         DO jj = 2, jpjm1
-!CDIR NOVERRCHK
+         DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point
@@ -410,7 +406,5 @@
       CASE ( 1 )             ! Neumman boundary condition
          !                      
-!CDIR NOVERRCHK
-         DO jj = 2, jpjm1
-!CDIR NOVERRCHK
+         DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point
@@ -650,7 +644,5 @@
          !                      ! en(ibot) = u*^2 / Co2 and mxln(ibot) = vkarmn * hbro
          !                      ! Balance between the production and the dissipation terms
-!CDIR NOVERRCHK
-         DO jj = 2, jpjm1
-!CDIR NOVERRCHK
+         DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point
@@ -673,7 +665,5 @@
       CASE ( 1 )             ! Neumman boundary condition
          !                      
-!CDIR NOVERRCHK
-         DO jj = 2, jpjm1
-!CDIR NOVERRCHK
+         DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
                ibot   = mbkt(ji,jj) + 1      ! k   bottom level of w-point
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 4616)
@@ -147,5 +147,5 @@
 #  include  "zdfddm_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -435,6 +435,6 @@
             ws0(ji,jj) = - ( ( emp(ji,jj)-rnf(ji,jj) ) * tsn(ji,jj,1,jp_sal)                          &
                &             + sfx(ji,jj)                                     ) * rcs * tmask(ji,jj,1) 
-         ENDDO
-      ENDDO
+         END DO
+      END DO
 
       zflageos = 0.5 + SIGN( 0.5, nn_eos - 1. ) 
@@ -447,12 +447,11 @@
             ! Friction velocity (zustar), at T-point : LMD94 eq. 2
             zustar(ji,jj) = SQRT( taum(ji,jj) / ( zrhos +  epsln ) )
-         ENDDO
-      ENDDO
-
-!CDIR NOVERRCHK  
-      !                                               ! ===============
+         END DO
+      END DO
+
+      !                                                ! ===============
       DO jj = 2, jpjm1                                 !  Vertical slab
          !                                             ! ===============
-         
+         !
          !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
          ! II Compute Boundary layer mixing coef. and diagnose the new boundary layer depth
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 4616)
@@ -99,5 +99,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -256,7 +256,6 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
       !                     en(bot)   = (rn_ebb0/rau0)*0.5*sqrt(u_botfr^2+v_botfr^2) (min value rn_emin)
-!CDIR NOVERRCHK
+!!bfr   - commented area
 !!    DO jj = 2, jpjm1
-!CDIR NOVERRCHK
 !!       DO ji = fs_2, fs_jpim1   ! vector opt.
 !!          ztx2 = bfrua(ji-1,jj) * ub(ji-1,jj,mbku(ji-1,jj)) + &
@@ -291,20 +290,12 @@
          END DO
          !                               ! finite LC depth
-# if defined key_vectopt_loop
-         DO jj = 1, 1
-            DO ji = 1, jpij   ! vector opt. (forced unrolling)
-# else
          DO jj = 1, jpj 
             DO ji = 1, jpi
-# endif
                zhlc(ji,jj) = fsdepw(ji,jj,imlc(ji,jj))
             END DO
          END DO
          zcof = 0.016 / SQRT( zrhoa * zcdrag )
-!CDIR NOVERRCHK
          DO jk = 2, jpkm1         !* TKE Langmuir circulation source term added to en
-!CDIR NOVERRCHK
-            DO jj = 2, jpjm1
-!CDIR NOVERRCHK
+            DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   zus  = zcof * SQRT( taum(ji,jj) )           ! Stokes drift
@@ -425,9 +416,6 @@
          END DO
       ELSEIF( nn_etau == 3 ) THEN       !* penetration belox the mixed layer (HF variability)
-!CDIR NOVERRCHK
          DO jk = 2, jpkm1
-!CDIR NOVERRCHK
-            DO jj = 2, jpjm1
-!CDIR NOVERRCHK
+            DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   ztx2 = utau(ji-1,jj  ) + utau(ji,jj)
@@ -513,9 +501,6 @@
       zmxlm(:,:,jpk)  = rmxl_min     ! last level set to the interior minium value
       !
-!CDIR NOVERRCHK
       DO jk = 2, jpkm1              ! interior value : l=sqrt(2*e/n^2)
-!CDIR NOVERRCHK
          DO jj = 2, jpjm1
-!CDIR NOVERRCHK
             DO ji = fs_2, fs_jpim1   ! vector opt.
                zrn2 = MAX( rn2(ji,jj,jk), rsmall )
@@ -588,9 +573,6 @@
             END DO
          END DO
-!CDIR NOVERRCHK
          DO jk = 2, jpkm1
-!CDIR NOVERRCHK
-            DO jj = 2, jpjm1
-!CDIR NOVERRCHK
+            DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   zemlm = MIN ( zmxld(ji,jj,jk),  zmxlm(ji,jj,jk) )
@@ -612,9 +594,6 @@
       !                     !  Vertical eddy viscosity and diffusivity  (avmu, avmv, avt)
       !                     !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-!CDIR NOVERRCHK
       DO jk = 1, jpkm1            !* vertical eddy viscosity & diffivity at w-points
-!CDIR NOVERRCHK
          DO jj = 2, jpjm1
-!CDIR NOVERRCHK
             DO ji = fs_2, fs_jpim1   ! vector opt.
                zsqen = SQRT( en(ji,jj,jk) )
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 4616)
@@ -54,5 +54,5 @@
 #  include "vectopt_loop_substitute.h90"
    !!----------------------------------------------------------------------
-   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
+   !! NEMO/OPA 3.7 , NEMO Consortium (2014)
    !! $Id$
    !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
@@ -144,5 +144,5 @@
             DO jj= 1, jpj
                DO ji= 1, jpi
-                  ztpc = ztpc + fse3w(ji,jj,jk) * e1t(ji,jj) * e2t(ji,jj)   &
+                  ztpc = ztpc + fse3w(ji,jj,jk) * e1e2t(ji,jj)                   &
                      &         * MAX( 0.e0, rn2(ji,jj,jk) ) * zav_tide(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
                END DO
@@ -150,4 +150,5 @@
          END DO
          ztpc= rau0 / ( rn_tfe * rn_me ) * ztpc
+         IF( lk_mpp )   CALL mpp_sum( ztpc )
          IF(lwp) WRITE(numout,*) 
          IF(lwp) WRITE(numout,*) '          N Total power consumption by av_tide    : ztpc = ', ztpc * 1.e-12 ,'TW'
@@ -228,5 +229,4 @@
       DO jk = 1, jpkm1             
          zdn2dz     (:,:,jk) = rn2(:,:,jk) - rn2(:,:,jk+1)           ! Vertical profile of dN2/dz
-!CDIR NOVERRCHK
          zempba_3d_1(:,:,jk) = SQRT(  MAX( 0.e0, rn2(:,:,jk) )  )    !    -        -    of N
          zempba_3d_2(:,:,jk) =        MAX( 0.e0, rn2(:,:,jk) )       !    -        -    of N^2
@@ -292,9 +292,10 @@
             DO jj= 1, jpj
                DO ji= 1, jpi
-                  ztpc = ztpc + e1t(ji,jj) * e2t(ji,jj) * fse3w(ji,jj,jk) * MAX( 0.e0, rn2(ji,jj,jk) )   &
-                     &                     * zavt_itf(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
+                  ztpc = ztpc + e1e2t(ji,jj) * fse3w(ji,jj,jk) * MAX( 0.e0, rn2(ji,jj,jk) )   &
+                     &                       * zavt_itf(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
                END DO
             END DO
          END DO
+         IF( lk_mpp )   CALL mpp_sum( ztpc )
          ztpc= rau0 * ztpc / ( rn_me * rn_tfe_itf )
          IF(lwp) WRITE(numout,*) '          N Total power consumption by zavt_itf: ztpc = ', ztpc * 1.e-12 ,'TW'
@@ -446,8 +447,9 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  ztpc = ztpc + fse3w(ji,jj,jk) * e1t(ji,jj) * e2t(ji,jj) * zpc(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
+                  ztpc = ztpc + fse3w(ji,jj,jk) * e1e2t(ji,jj) * zpc(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
                END DO
             END DO
          END DO
+         IF( lk_mpp )   CALL mpp_sum( ztpc )
          ztpc= rau0 * 1/(rn_tfe * rn_me) * ztpc
 
@@ -492,18 +494,19 @@
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  ztpc = ztpc + fse3w(ji,jj,jk) * e1t(ji,jj) * e2t(ji,jj) * zpc(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
+                  ztpc = ztpc + fse3w(ji,jj,jk) * e1e2t(ji,jj) * zpc(ji,jj,jk) * tmask(ji,jj,jk) * tmask_i(ji,jj)
                END DO
             END DO
          END DO
+         IF( lk_mpp )   CALL mpp_sum( ztpc )
          ztpc= rau0 * 1/(rn_tfe * rn_me) * ztpc
          WRITE(numout,*) '          2 Total power consumption of the tidally driven part of Kz : ztpc = ', ztpc * 1.e-12 ,'TW'
-
+!!gm bug mpp  in these diagnostics
          DO jk = 1, jpk
-            ze_z =                  SUM( e1t(:,:) * e2t(:,:) * zav_tide(:,:,jk)     * tmask_i(:,:) )   &
-               &     / MAX( 1.e-20, SUM( e1t(:,:) * e2t(:,:) * tmask (:,:,jk) * tmask_i(:,:) ) )
-            ztpc = 1.E50
+            ze_z =                  SUM( e1e2t(:,:) * zav_tide(:,:,jk) * tmask_i(:,:) )   &
+               &     / MAX( 1.e-20, SUM( e1e2t(:,:) * tmask   (:,:,jk) * tmask_i(:,:) ) )
+            ztpc = 1.e50_wp
             DO jj = 1, jpj
                DO ji = 1, jpi
-                  IF( zav_tide(ji,jj,jk) /= 0.e0 )   ztpc =Min( ztpc, zav_tide(ji,jj,jk) )
+                  IF( zav_tide(ji,jj,jk) /= 0.e0 )   ztpc = MIN( ztpc, zav_tide(ji,jj,jk) )
                END DO
             END DO
@@ -512,5 +515,5 @@
          END DO
 
-         WRITE(numout,*) '          e_tide : ', SUM( e1t*e2t*en_tmx ) / ( rn_tfe * rn_me ) * 1.e-12, 'TW'
+         WRITE(numout,*) '          e_tide : ', SUM( e1e2t*en_tmx ) / ( rn_tfe * rn_me ) * 1.e-12, 'TW'
          WRITE(numout,*) 
          WRITE(numout,*) '          Initial profile of tidal vertical mixing'
@@ -521,16 +524,17 @@
                END DO
             END DO
-            ze_z =                  SUM( e1t(:,:) * e2t(:,:) * zkz(:,:)     * tmask_i(:,:) )   &
-               &     / MAX( 1.e-20, SUM( e1t(:,:) * e2t(:,:) * tmask (:,:,jk) * tmask_i(:,:) ) )
+            ze_z =                  SUM( e1e2t(:,:) * zkz(:,:)       * tmask_i(:,:) )   &
+               &     / MAX( 1.e-20, SUM( e1e2t(:,:) * tmask (:,:,jk) * tmask_i(:,:) ) )
             WRITE(numout,*) '                jk= ', jk,'   ', ze_z * 1.e4,' cm2/s'
          END DO
          DO jk = 1, jpk
             zkz(:,:) = az_tmx(:,:,jk) /rn_n2min
-            ze_z =                  SUM( e1t(:,:) * e2t(:,:) * zkz(:,:)     * tmask_i(:,:) )   &
-               &     / MAX( 1.e-20, SUM( e1t(:,:) * e2t(:,:) * tmask (:,:,jk) * tmask_i(:,:) ) )
+            ze_z =                  SUM( e1e2t(:,:) * zkz(:,:)       * tmask_i(:,:) )   &
+               &     / MAX( 1.e-20, SUM( e1e2t(:,:) * tmask (:,:,jk) * tmask_i(:,:) ) )
             WRITE(numout,*) 
             WRITE(numout,*) '          N2 min - jk= ', jk,'   ', ze_z * 1.e4,' cm2/s min= ',MINVAL(zkz)*1.e4,   &
                &       'max= ', MAXVAL(zkz)*1.e4, ' cm2/s'
          END DO
+!!gm  end bug mpp
          !
       ENDIF
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/module_example
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/module_example	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/module_example	(revision 4616)
@@ -19,4 +19,11 @@
    USE module_name1   ! brief description of the used module
    USE module_name2   ! ....
+   !
+   USE in_out_manager ! I/O manager
+   USE prtctl         ! Print control
+   USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
+   USE lib_mpp        ! MPP library
+   USE wrk_nemo       ! Memory Allocation
+   USE timing         ! Timing
 
    IMPLICIT NONE
@@ -87,22 +94,22 @@
       !!----------------------------------------------------------------------
       USE toto_module      ! description of the module
-      USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released
-      USE wrk_nemo, ONLY:   zztab => wrk_2d_5                     ! 2D workspace
-      USE wrk_nemo, ONLY:   zwx => wrk_3d_12 , zwy => wrk_3d_13   ! 3D workspace
-      !!
+      !
       INTEGER , INTENT(in   )                     ::   kt      ! short description 
       INTEGER , INTENT(inout)                     ::   pvar1   !   -         -
       REAL(wp), INTENT(  out)                     ::   pvar2   !   -         -
       REAL(wp), INTENT(  out), DIMENSION(jpi,jpj) ::   pvar2   !   -         -
-      !!
+      !
       INTEGER  ::   ji, jj, jk       ! dummy loop arguments  (DOCTOR : start with j, but not jp)
       INTEGER  ::   itoto, itata     ! temporary integers    (DOCTOR : start with i
       REAL(wp) ::   zmlmin, zbbrau   ! temporary scalars     (DOCTOR : start with z)
       REAL(wp) ::   zfact1, zfact2   ! do not use continuation lines in declaration
+      REAL(wp), POINTER, DIMENSION(:,:,:  ) ::  zwrku, zwrkv     ! 2D workspace as pointers
+      REAL(wp), POINTER, DIMENSION(:,:,:,:) ::  zavm, zavt       ! 3D workspace as pointers
       !!--------------------------------------------------------------------
 
-      IF( wrk_in_use(3, 12,13) .OR. wrk_in_use(2, 5 ) THEN
-         CALL ctl_stop('exa_mpl: requested workspace arrays unavailable')   ;   RETURN
-      ENDIF
+      IF( nn_timing == 1 )   CALL timing_start('exa_mpl')
+
+      CALL wrk_alloc( jpi, jpj, jpk, zavm , zavt  )         ! assign workspace pointers to already allocated arrays
+      CALL wrk_alloc( jpi, jpj     , zwrku, zwrkv )
 
       IF( kt == nit000  )   CALL exa_mpl_init    ! Initialization (first time-step only)
@@ -137,7 +144,8 @@
       CALL mpplnk2( avmu, 'U', 1. )              ! Lateral boundary conditions (unchanged sign)
       !
-      IF( wrk_not_released(3, 12,13) .OR. wrk_not_released(2, 5 ) THEN
-         CALL ctl_stop('exa_mpl: failed to release workspace arrays')   ;   RETURN
-      ENDIF
+      CALL wrk_dealloc( jpi, jpj, jpk,       zfu_t , zfv_t , zfu_f , zfv_f, zfu_uw, zfv_vw, zfu, zfv, zfw )
+      CALL wrk_dealloc( jpi, jpj, jpk, jpts, zlu_uu, zlv_vv, zlu_uv, zlv_vu                               )
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('dyn_adv_ubs')
       !
    END SUBROUTINE exa_mpl
@@ -157,18 +165,19 @@
       !!----------------------------------------------------------------------
       INTEGER ::   ji, jj, jk, jit   ! dummy loop indices
-      INTEGER  ::   ios              ! Local integer output status for namelist read
-      !!
+      INTEGER ::   ios               ! Local integer output status for namelist read
+      !
       NAMELIST/namexa/ exa_v1, exa_v2, nexa_0, sn_ex     
       !!----------------------------------------------------------------------
       !
-      REWIND( numnam_ref )              ! Namelist namexa in reference namelist : Example
+      REWIND( numnam_ref )             ! Namelist namexa in reference namelist : Example
       READ  ( numnam_ref, namexa, IOSTAT = ios, ERR = 901)
 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namexa in reference namelist', lwp )
-
-      REWIND( numnam_cfg )              ! Namelist namexa in configuration namelist : Example
+      !
+      REWIND( numnam_cfg )             ! Namelist namexa in configuration namelist : Example
       READ  ( numnam_cfg, namexa, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namexa in configuration namelist', lwp )
-   ! Output namelist for control
-      WRITE ( numond, namexa )
+      !
+      WRITE ( numond, namexa )         ! Output namelist for control
+
       !
       IF(lwp) THEN                              ! Control print
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/par_oce.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/par_oce.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/par_oce.F90	(revision 4616)
@@ -94,10 +94,4 @@
 #endif
 
-#if defined key_vectopt_loop
-   LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_loop = .TRUE.   !: vector optimization flag
-#else
-   LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_loop = .FALSE.  !: vector optimization flag
-#endif
-
    !!----------------------------------------------------------------------
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
Index: /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4615)
+++ /branches/2014/dev_CNRS0_NOC1_LDF/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4616)
@@ -212,5 +212,4 @@
       IF( ln_crs     )   CALL crs_fld( kstp )         ! ocean model: online field coarsening & output
 
-
 #if defined key_top
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
