Index: branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 3871)
+++ branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 3884)
@@ -146,9 +146,11 @@
          CALL iom_put( "toce" , z3d                        )   ! heat content
          CALL iom_put( "sst"  , z3d(:,:,1)                 )   ! sea surface heat content
-         CALL iom_put( "sst2" , z3d(:,:,1) * z3d(:,:,1)    )   ! sea surface content of squared temperature
+         z3d(:,:,1) = tsn(:,:,1,jp_tem) * z3d(:,:,1)
+         CALL iom_put( "sst2" , z3d(:,:,1)                 )   ! sea surface content of squared temperature
          z3d(:,:,:) = tsn(:,:,:,jp_sal) * fse3t_n(:,:,:)            
          CALL iom_put( "soce" , z3d                        )   ! salinity content
          CALL iom_put( "sss"  , z3d(:,:,1)                 )   ! sea surface salinity content
-         CALL iom_put( "sss2" , z3d(:,:,1) * z3d(:,:,1)    )   ! sea surface content of squared salinity
+         z3d(:,:,1) = tsn(:,:,1,jp_sal) * z3d(:,:,1)
+         CALL iom_put( "sss2" , z3d(:,:,1)                 )   ! sea surface content of squared salinity
       ELSE
          CALL iom_put( "toce" , tsn(:,:,:,jp_tem)          )   ! temperature
Index: branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 3871)
+++ branches/2013/dev_r3858_NOC_ZTC/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 3884)
@@ -18,4 +18,6 @@
    !!   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
@@ -35,8 +37,9 @@
 
    !! * 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
+   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
@@ -52,5 +55,6 @@
    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)        , ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: e3t_t_b, e3t_t_n, e3t_t_a ! baroclinic scale factors
+   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tilde_e3t_b, tilde_e3t_n  ! baroclinic scale factors
+   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: tilde_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
@@ -76,6 +80,6 @@
       IF( ln_vvl_zstar ) dom_vvl_alloc = 0
       IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
-         ALLOCATE( e3t_t_b(jpi,jpj,jpk) , e3t_t_n(jpi,jpj,jpk) , e3t_t_a(jpi,jpj,jpk) ,   &
-            &      un_td  (jpi,jpj,jpk) , vn_td  (jpi,jpj,jpk) , STAT = dom_vvl_alloc        )
+         ALLOCATE( tilde_e3t_b(jpi,jpj,jpk) , tilde_e3t_n(jpi,jpj,jpk) , tilde_e3t_a(jpi,jpj,jpk) ,   &
+            &      un_td  (jpi,jpj,jpk)     , vn_td  (jpi,jpj,jpk)     , STAT = dom_vvl_alloc        )
          IF( lk_mpp             )   CALL mpp_sum ( dom_vvl_alloc )
          IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays')
@@ -100,5 +104,5 @@
       !!               - interpolate scale factors
       !!
-      !! ** Action  : - fse3t_(n/b) and e3t_t_(n/b)
+      !! ** Action  : - fse3t_(n/b) and tilde_e3t_(n/b)
       !!              - Regrid: fse3(u/v)_n
       !!                        fse3(u/v)_b       
@@ -130,11 +134,11 @@
       IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' )
 
-      ! Read or initialize fse3t_(b/n), e3t_t_(b/n) and hdiv_lf (and e3t_a(jpk))
-      ! ========================================================================
+      ! Read or initialize fse3t_(b/n), tilde_e3t_(b/n) and hdiv_lf (and e3t_a(jpk))
+      ! ============================================================================
       CALL dom_vvl_rst( nit000, 'READ' )
       fse3t_a(:,:,jpk) = e3t_0(:,:,jpk)
 
       ! Reconstruction of all vertical scale factors at now and before time steps
-      ! =========================================================================
+      ! =============================================================================
       ! Horizontal scale factor interpolations
       ! --------------------------------------
@@ -178,4 +182,7 @@
          frq_rst_e3t(:,:) = 2.e0_wp * rpi / ( 30.e0_wp * 86400.e0_wp )
          frq_rst_hdv(:,:) = 2.e0_wp * rpi / (  5.e0_wp * 86400.e0_wp )
+! Use these next two to emulate z-star using z-tilde
+         frq_rst_e3t(:,:) = 0.e0_wp 
+         frq_rst_hdv(:,:) = 1.e0_wp / rdt
       ENDIF
 
@@ -200,7 +207,7 @@
       !!                               to the "baroclinic" level thickness.
       !!
-      !! ** Action  :  - hdiv_lf: restoring towards full baroclinic divergence in z_tilde case
-      !!               - e3t_t_a: after increment of vertical scale factor 
-      !!                          in z_tilde case
+      !! ** Action  :  - hdiv_lf    : restoring towards full baroclinic divergence in z_tilde case
+      !!               - tilde_e3t_a: after increment of vertical scale factor 
+      !!                              in z_tilde case
       !!               - fse3(t/u/v)_a
       !!
@@ -271,15 +278,15 @@
          ! II - after z_tilde increments of vertical scale factors
          ! =======================================================
-         e3t_t_a(:,:,:) = 0.e0   ! e3t_t_a used to store tendency terms
+         tilde_e3t_a(:,:,:) = 0.0_wp  ! tilde_e3t_a used to store tendency terms
 
          ! 1 - High frequency divergence term
          ! ----------------------------------
-         IF( ln_vvl_ztilde ) THEN   ! z_tilde case
+         IF( ln_vvl_ztilde ) THEN     ! z_tilde case
             DO jk = 1, jpkm1
-               e3t_t_a(:,:,jk) = e3t_t_a(:,:,jk) - ( fse3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) - hdiv_lf(:,:,jk) )
-            END DO
-         ELSE                       ! layer case
+               tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - ( fse3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) - hdiv_lf(:,:,jk) )
+            END DO
+         ELSE                         ! layer case
             DO jk = 1, jpkm1
-               e3t_t_a(:,:,jk) = e3t_t_a(:,:,jk) - fse3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) )
+               tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) -   fse3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) )
             END DO
          END IF
@@ -289,5 +296,5 @@
          IF( ln_vvl_ztilde ) THEN
             DO jk = 1, jpk
-               e3t_t_a(:,:,jk) = e3t_t_a(:,:,jk) - frq_rst_e3t(:,:) * e3t_t_b(:,:,jk)
+               tilde_e3t_a(:,:,jk) = tilde_e3t_a(:,:,jk) - frq_rst_e3t(:,:) * tilde_e3t_b(:,:,jk)
             END DO
          END IF
@@ -301,6 +308,6 @@
             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) * ( e3t_t_b(ji,jj,jk) - e3t_t_b(ji+1,jj  ,jk) )
-                  vn_td(ji,jj,jk) = rn_ahe3 * vmask(ji,jj,jk) * re1v_e2v(ji,jj) * ( e3t_t_b(ji,jj,jk) - e3t_t_b(ji  ,jj+1,jk) )
+                  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) )
                   zwu(ji,jj) = zwu(ji,jj) + un_td(ji,jj,jk)
                   zwv(ji,jj) = zwv(ji,jj) + vn_td(ji,jj,jk)
@@ -319,7 +326,7 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  e3t_t_a(ji,jj,jk) = e3t_t_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)
+                  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)
                END DO
             END DO
@@ -339,6 +346,6 @@
             z2dt = 2.e0 * rdt
          ENDIF
-         CALL lbc_lnk( e3t_t_a(:,:,:), 'T', 1. )
-         e3t_t_a(:,:,:) = e3t_t_b(:,:,:) + z2dt * tmask(:,:,:) * e3t_t_a(:,:,:)
+         CALL lbc_lnk( tilde_e3t_a(:,:,:), 'T', 1. )
+         tilde_e3t_a(:,:,:) = tilde_e3t_b(:,:,:) + z2dt * tmask(:,:,:) * tilde_e3t_a(:,:,:)
 
          ! Maximum deformation control
@@ -348,26 +355,39 @@
          ze3t(:,:,jpk) = 0.e0
          DO jk = 1, jpkm1
-            ze3t(:,:,jk) = e3t_t_a(:,:,jk) / e3t_0(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:)
+            ze3t(:,:,jk) = tilde_e3t_a(:,:,jk) / e3t_0(:,:,jk) * tmask(:,:,jk) * tmask_i(:,:)
          END DO
          z_tmax = MAXVAL( ze3t(:,:,:) )
+         IF( lk_mpp )   CALL mpp_max( z_tmax )                 ! max over the global domain
          z_tmin = MINVAL( ze3t(:,:,:) )
+         IF( lk_mpp )   CALL mpp_min( z_tmin )                 ! min over the global domain
          ! - ML - test: for the moment, stop simulation for too large e3_t variations
          IF( ( z_tmax .GT. z_def_max ) .OR. ( z_tmin .LT. - z_def_max ) ) THEN
-            ijk_max = MAXLOC( ze3t(:,:,:) )
-            ijk_min = MINLOC( ze3t(:,:,:) )
-            WRITE(numout, *) 'MAX( e3t_t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmax
-            WRITE(numout, *) 'at i, j, k=', ijk_max
-            WRITE(numout, *) 'MIN( e3t_t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmin
-            WRITE(numout, *) 'at i, j, k=', ijk_min            
-            CALL ctl_stop('MAX( ABS( e3t_t_a(:,:,:) ) / e3t_0(:,:,:) ) too high')
+            IF( lk_mpp ) THEN
+               CALL mpp_maxloc( ze3t, tmask, z_tmax, ijk_max(1), ijk_max(2), ijk_max(3) )
+               CALL mpp_minloc( ze3t, tmask, z_tmin, ijk_min(1), ijk_min(2), ijk_min(3) )
+            ELSE
+               ijk_max = MAXLOC( ze3t(:,:,:) )
+               ijk_max(1) = ijk_max(1) + nimpp - 1
+               ijk_max(2) = ijk_max(2) + njmpp - 1
+               ijk_min = MINLOC( ze3t(:,:,:) )
+               ijk_min(1) = ijk_min(1) + nimpp - 1
+               ijk_min(2) = ijk_min(2) + njmpp - 1
+            ENDIF
+            IF (lwp) THEN
+               WRITE(numout, *) 'MAX( tilde_e3t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmax
+               WRITE(numout, *) 'at i, j, k=', ijk_max
+               WRITE(numout, *) 'MIN( tilde_e3t_a(:,:,:) / e3t_0(:,:,:) ) =', z_tmin
+               WRITE(numout, *) 'at i, j, k=', ijk_min            
+               CALL ctl_warn('MAX( ABS( tilde_e3t_a(:,:,:) ) / e3t_0(:,:,:) ) too high')
+            ENDIF
          ENDIF
          ! - ML - end test
-         ! - ML - This will cause a baroclinicity error if the ctl_stop above is not used
-         e3t_t_a(:,:,:) = MIN( e3t_t_a(:,:,:),   z_def_max * e3t_0(:,:,:) )
-         e3t_t_a(:,:,:) = MAX( e3t_t_a(:,:,:), - z_def_max * e3t_0(:,:,:) )
+         ! - ML - Imposing these limits will cause a baroclinicity error which is corrected for below
+         tilde_e3t_a(:,:,:) = MIN( tilde_e3t_a(:,:,:),   z_def_max * e3t_0(:,:,:) )
+         tilde_e3t_a(:,:,:) = MAX( tilde_e3t_a(:,:,:), - z_def_max * e3t_0(:,:,:) )
 
          ! Add "tilda" part to the after scale factor
          ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-         fse3t_a(:,:,:) = e3t_0(:,:,:) + e3t_t_a(:,:,:)
+         fse3t_a(:,:,:) = e3t_0(:,:,:) + tilde_e3t_a(:,:,:)
 
          ! III - Barotropic repartition of the sea surface height over the baroclinic profile
@@ -375,5 +395,5 @@
          ! add e3t(n-1) "star" Asselin-filtered
          DO jk = 1, jpkm1
-            fse3t_a(:,:,jk) = fse3t_a(:,:,jk) + fse3t_b(:,:,jk) - e3t_0(:,:,jk) - e3t_t_b(:,:,jk)
+            fse3t_a(:,:,jk) = fse3t_a(:,:,jk) + fse3t_b(:,:,jk) - e3t_0(:,:,jk) - tilde_e3t_b(:,:,jk)
          END DO
          ! add ( ssh increment + "baroclinicity error" ) proportionnaly to e3t(n)
@@ -383,5 +403,5 @@
          zht(:,:) = 0.
          DO jk = 1, jpkm1
-            zht(:,:) = zht(:,:) + e3t_t_a(:,:,jk) * tmask(:,:,jk)
+            zht(:,:)  = zht(:,:) + tilde_e3t_a(:,:,jk) * tmask(:,:,jk)
          END DO
          z_scale(:,:) = ( ssha(:,:) - sshb(:,:) - zht(:,:) ) / ( ht_0(:,:) + sshn(:,:) + 1. - tmask(:,:,1) )
@@ -393,21 +413,28 @@
 
       IF( ln_vvl_dbg ) THEN   ! - ML - test: control prints for debuging
+         !
+         IF( lwp ) WRITE(numout, *) 'kt =', kt
          IF ( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
-            WRITE(numout, *) 'kt =', kt
-            WRITE(numout, *) 'MAXVAL(abs(SUM(e3t_t_a))) =',   &
-               &              MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( zht(:,:) ) )
+            z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( zht(:,:) ) )
+            IF( lk_mpp ) CALL mpp_max( z_tmax )                             ! max over the global domain
+            IF( lwp    ) WRITE(numout, *) 'MAXVAL(abs(SUM(tilde_e3t_a))) =', z_tmax
          END IF
+         !
          zht(:,:) = 0.e0
          DO jk = 1, jpkm1
             zht(:,:) = zht(:,:) + fse3t_n(:,:,jk) * tmask(:,:,jk)
          END DO
-         WRITE(numout, *) 'MAXVAL(abs(ht_0+sshn-SUM(fse3t_n))) =',   &
-            &              MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshn(:,:) - zht(:,:) ) )
+         z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + sshn(:,:) - zht(:,:) ) )
+         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lwp    ) WRITE(numout, *) 'MAXVAL(abs(ht_0+sshn-SUM(fse3t_n))) =', z_tmax
+         !
          zht(:,:) = 0.e0
          DO jk = 1, jpkm1
             zht(:,:) = zht(:,:) + fse3t_a(:,:,jk) * tmask(:,:,jk)
          END DO
-         WRITE(numout, *) 'MAXVAL(abs(ht_0+ssha-SUM(fse3t_a))) =',   &
-            &              MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + ssha(:,:) - zht(:,:) ) )
+         z_tmax = MAXVAL( tmask(:,:,1) * tmask_i(:,:) * ABS( ht_0(:,:) + ssha(:,:) - zht(:,:) ) )
+         IF( lk_mpp ) CALL mpp_max( z_tmax )                                ! max over the global domain
+         IF( lwp    ) WRITE(numout, *) 'MAXVAL(abs(ht_0+ssha-SUM(fse3t_a))) =', z_tmax
+         !
       END IF
 
@@ -439,5 +466,5 @@
       !!               - recompute depths and water height fields
       !!
-      !! ** Action  :  - fse3t_(b/n), e3t_t_(b/n) and fse3(u/v)_n ready for next time step
+      !! ** Action  :  - fse3t_(b/n), tilde_e3t_(b/n) and fse3(u/v)_n ready for next time step
       !!               - Recompute:
       !!                    fse3(u/v)_b       
@@ -473,9 +500,9 @@
       IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN
          IF( neuler == 0 .AND. kt == nit000 ) THEN
-            e3t_t_b(:,:,:) = e3t_t_n(:,:,:)
+            tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:)
          ELSE
-            e3t_t_b(:,:,:) = e3t_t_n(:,:,:) + atfp * ( e3t_t_b(:,:,:) - 2.e0 * e3t_t_n(:,:,:) + e3t_t_a(:,:,:) )
+            tilde_e3t_b(:,:,:) = tilde_e3t_n(:,:,:) + atfp * ( tilde_e3t_b(:,:,:) - 2.e0 * tilde_e3t_n(:,:,:) + tilde_e3t_a(:,:,:) )
          ENDIF
-         e3t_t_n(:,:,:) = e3t_t_a(:,:,:)
+         tilde_e3t_n(:,:,:) = tilde_e3t_a(:,:,:)
       ENDIF
       fse3t_n(:,:,:) = fse3t_a(:,:,:)
@@ -553,6 +580,11 @@
       !! * Local declarations
       INTEGER ::   ji, jj, jk                                          ! dummy loop indices
+      LOGICAL ::   l_is_orca                                           ! local logical
       !!----------------------------------------------------------------------
       IF( nn_timing == 1 )  CALL timing_start('dom_vvl_interpol')
+         !
+      l_is_orca = .FALSE.
+      IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) l_is_orca = .TRUE.      ! ORCA R2 configuration - will need to correct some locations
+
       SELECT CASE ( pout )
          !               ! ------------------------------------- !
@@ -563,5 +595,5 @@
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
-                  pe3_out(ji,jj,jk) = 0.5 * umask(ji,jj,jk) * r1_e12u(ji,jj)                                      &
+                  pe3_out(ji,jj,jk) = 0.5 * 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) ) )
@@ -569,4 +601,6 @@
             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. )
@@ -579,5 +613,5 @@
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
-                  pe3_out(ji,jj,jk) = 0.5 * vmask(ji,jj,jk) * r1_e12v(ji,jj)                                      &
+                  pe3_out(ji,jj,jk) = 0.5 * 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) ) )
@@ -585,4 +619,6 @@
             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. )
@@ -595,5 +631,5 @@
             DO jj = 1, jpjm1
                DO ji = 1, fs_jpim1   ! vector opt.
-                  pe3_out(ji,jj,jk) = 0.5 * umask(ji,jj,jk) * umask(ji,jj+1,jk) * r1_e12f(ji,jj)                  &
+                  pe3_out(ji,jj,jk) = 0.5 * 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) ) )
@@ -601,4 +637,6 @@
             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. )
@@ -612,5 +650,5 @@
          DO jk = 2, jpk
             pe3_out(:,:,jk) = e3w_0(:,:,jk) + ( 1. - 0.5 * tmask(:,:,jk) ) * ( pe3_in(:,:,jk-1) - e3t_0(:,:,jk-1) )   &
-               &                              +        0.5 * tmask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3t_0(:,:,jk  ) )
+               &                              +      0.5 * tmask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3t_0(:,:,jk  ) )
          END DO
          !               ! -------------------------------------- !
@@ -622,5 +660,5 @@
          DO jk = 2, jpk
             pe3_out(:,:,jk) = e3uw_0(:,:,jk) + ( 1. - 0.5 * umask(:,:,jk) ) * ( pe3_in(:,:,jk-1) - e3u_0(:,:,jk-1) )   &
-               &                               +        0.5 * umask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3u_0(:,:,jk  ) )
+               &                               +      0.5 * umask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3u_0(:,:,jk  ) )
          END DO
          !               ! -------------------------------------- !
@@ -632,12 +670,12 @@
          DO jk = 2, jpk
             pe3_out(:,:,jk) = e3vw_0(:,:,jk) + ( 1. - 0.5 * vmask(:,:,jk) ) * ( pe3_in(:,:,jk-1) - e3v_0(:,:,jk-1) )   &
-               &                               +        0.5 * vmask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3v_0(:,:,jk  ) )
+               &                               +      0.5 * 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 )
@@ -666,6 +704,6 @@
             id1 = iom_varid( numror, 'fse3t_b', ldstop = .FALSE. )
             id2 = iom_varid( numror, 'fse3t_n', ldstop = .FALSE. )
-            id3 = iom_varid( numror, 'e3t_t_b', ldstop = .FALSE. )
-            id4 = iom_varid( numror, 'e3t_t_n', ldstop = .FALSE. )
+            id3 = iom_varid( numror, 'tilde_e3t_b', ldstop = .FALSE. )
+            id4 = iom_varid( numror, 'tilde_e3t_n', ldstop = .FALSE. )
             id5 = iom_varid( numror, 'hdif_lf', ldstop = .FALSE. )
             !                             ! --------- !
@@ -691,9 +729,9 @@
                !                          ! ----------------------- !
                IF( MIN( id3, id4 ) > 0 ) THEN  ! all required arrays exist
-                  CALL iom_get( numror, jpdom_autoglo, 'e3t_t_b', e3t_t_b(:,:,:) )
-                  CALL iom_get( numror, jpdom_autoglo, 'e3t_t_n', e3t_t_n(:,:,:) )
+                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_b', tilde_e3t_b(:,:,:) )
+                  CALL iom_get( numror, jpdom_autoglo, 'tilde_e3t_n', tilde_e3t_n(:,:,:) )
                ELSE                            ! one at least array is missing
-                  e3t_t_b(:,:,:) = 0.e0
-                  e3t_t_n(:,:,:) = 0.e0
+                  tilde_e3t_b(:,:,:) = 0.e0
+                  tilde_e3t_n(:,:,:) = 0.e0
                ENDIF
                !                          ! ------------ !
@@ -712,6 +750,6 @@
             fse3t_n(:,:,:) = e3t_0(:,:,:)
             IF( ln_vvl_ztilde .OR. ln_vvl_layer) THEN
-               e3t_t_b(:,:,:) = 0.e0
-               e3t_t_n(:,:,:) = 0.e0
+               tilde_e3t_b(:,:,:) = 0.e0
+               tilde_e3t_n(:,:,:) = 0.e0
                IF( ln_vvl_ztilde ) hdiv_lf(:,:,:) = 0.e0
             END IF
@@ -729,6 +767,6 @@
          IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN  ! z_tilde and layer cases !
             !                                        ! ----------------------- !
-            CALL iom_rstput( kt, nitrst, numrow, 'e3t_t_b', e3t_t_b(:,:,:) )
-            CALL iom_rstput( kt, nitrst, numrow, 'e3t_t_n', e3t_t_n(:,:,:) )
+            CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_b', tilde_e3t_b(:,:,:) )
+            CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_n', tilde_e3t_n(:,:,:) )
          END IF
          !                                           ! -------------!    
@@ -794,4 +832,382 @@
    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
+      !                                                ! =====================
+      IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) THEN    ! ORCA R2 configuration
+         !                                             ! =====================
+         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
