Index: NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/DYN/dynadv_ubs.F90
===================================================================
--- NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/DYN/dynadv_ubs.F90	(revision 14808)
+++ NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/DYN/dynadv_ubs.F90	(revision 14809)
@@ -109,6 +109,10 @@
          !            
          DO_2D( 0, 0, 0, 0 )                       ! laplacian
-            zlu_uu(ji,jj,jk,1) = ( puu (ji+1,jj  ,jk,Kbb) - 2.*puu (ji,jj,jk,Kbb) + puu (ji-1,jj  ,jk,Kbb) ) * umask(ji,jj,jk)
-            zlv_vv(ji,jj,jk,1) = ( pvv (ji  ,jj+1,jk,Kbb) - 2.*pvv (ji,jj,jk,Kbb) + pvv (ji  ,jj-1,jk,Kbb) ) * vmask(ji,jj,jk)
+            ! round brackets added to fix the order of floating point operations
+            ! needed to ensure halo 1 - halo 2 compatibility
+            zlu_uu(ji,jj,jk,1) = ( (puu (ji+1,jj  ,jk,Kbb) - puu (ji  ,jj  ,jk,Kbb)) +                         &
+               &                   (puu (ji-1,jj  ,jk,Kbb) - puu (ji  ,jj  ,jk,Kbb)) ) * umask(ji  ,jj  ,jk)
+            zlv_vv(ji,jj,jk,1) = ( (pvv (ji  ,jj+1,jk,Kbb) - pvv (ji  ,jj  ,jk,Kbb)) +                         &
+               &                   (pvv (ji  ,jj-1,jk,Kbb) - pvv (ji  ,jj  ,jk,Kbb)) ) * vmask(ji  ,jj  ,jk)
             zlu_uv(ji,jj,jk,1) = ( puu (ji  ,jj+1,jk,Kbb) - puu (ji  ,jj  ,jk,Kbb) ) * fmask(ji  ,jj  ,jk)   &
                &               - ( puu (ji  ,jj  ,jk,Kbb) - puu (ji  ,jj-1,jk,Kbb) ) * fmask(ji  ,jj-1,jk)
@@ -116,6 +120,8 @@
                &               - ( pvv (ji  ,jj  ,jk,Kbb) - pvv (ji-1,jj  ,jk,Kbb) ) * fmask(ji-1,jj  ,jk)
             !
-            zlu_uu(ji,jj,jk,2) = ( zfu(ji+1,jj  ,jk) - 2.*zfu(ji,jj,jk) + zfu(ji-1,jj  ,jk) ) * umask(ji,jj,jk)
-            zlv_vv(ji,jj,jk,2) = ( zfv(ji  ,jj+1,jk) - 2.*zfv(ji,jj,jk) + zfv(ji  ,jj-1,jk) ) * vmask(ji,jj,jk)
+            zlu_uu(ji,jj,jk,2) = ( (zfu(ji+1,jj  ,jk) - zfu(ji  ,jj  ,jk)) +                                   &
+               &                   (zfu(ji-1,jj  ,jk) - zfu(ji  ,jj  ,jk)) ) * umask(ji  ,jj  ,jk)
+            zlv_vv(ji,jj,jk,2) = ( (zfv(ji  ,jj+1,jk) - zfv(ji  ,jj  ,jk)) +                                   &
+               &                   (zfv(ji  ,jj-1,jk) - zfv(ji  ,jj  ,jk)) ) * vmask(ji  ,jj  ,jk)
             zlu_uv(ji,jj,jk,2) = ( zfu(ji  ,jj+1,jk) - zfu(ji  ,jj  ,jk) ) * fmask(ji  ,jj  ,jk)   &
                &               - ( zfu(ji  ,jj  ,jk) - zfu(ji  ,jj-1,jk) ) * fmask(ji  ,jj-1,jk)
@@ -124,8 +130,8 @@
          END_2D
       END DO
-      CALL lbc_lnk( 'dynadv_ubs', zlu_uu(:,:,:,1), 'U', 1.0_wp , zlu_uv(:,:,:,1), 'U', 1.0_wp,  &
-         &                        zlu_uu(:,:,:,2), 'U', 1.0_wp , zlu_uv(:,:,:,2), 'U', 1.0_wp,  & 
-         &                        zlv_vv(:,:,:,1), 'V', 1.0_wp , zlv_vu(:,:,:,1), 'V', 1.0_wp,  &
-         &                        zlv_vv(:,:,:,2), 'V', 1.0_wp , zlv_vu(:,:,:,2), 'V', 1.0_wp   )
+      CALL lbc_lnk( 'dynadv_ubs', zlu_uu(:,:,:,1), 'U', -1.0_wp , zlu_uv(:,:,:,1), 'U', -1.0_wp,  &
+         &                        zlu_uu(:,:,:,2), 'U', -1.0_wp , zlu_uv(:,:,:,2), 'U', -1.0_wp,  &
+         &                        zlv_vv(:,:,:,1), 'V', -1.0_wp , zlv_vu(:,:,:,1), 'V', -1.0_wp,  &
+         &                        zlv_vv(:,:,:,2), 'V', -1.0_wp , zlv_vu(:,:,:,2), 'V', -1.0_wp   )
       !
       !                                      ! ====================== !
Index: NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/DYN/dynvor.F90
===================================================================
--- NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/DYN/dynvor.F90	(revision 14808)
+++ NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/DYN/dynvor.F90	(revision 14809)
@@ -632,8 +632,10 @@
          CASE ( 0 )                                   ! original formulation  (masked averaging of e3t divided by 4)
             DO_2D( 1, 0, 1, 0 )
-               ze3f = (  e3t(ji  ,jj+1,jk,Kmm)*tmask(ji  ,jj+1,jk)   &
-                  &    + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)   &
-                  &    + e3t(ji  ,jj  ,jk,Kmm)*tmask(ji  ,jj  ,jk)   &
-                  &    + e3t(ji+1,jj  ,jk,Kmm)*tmask(ji+1,jj  ,jk)  )
+               ! round brackets added to fix the order of floating point operations
+               ! needed to ensure halo 1 - halo 2 compatibility
+               ze3f = (  (e3t(ji  ,jj+1,jk,Kmm)*tmask(ji  ,jj+1,jk)    &
+                  &    +  e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk))   &
+                  &    + (e3t(ji  ,jj  ,jk,Kmm)*tmask(ji  ,jj  ,jk)    &
+                  &    +  e3t(ji+1,jj  ,jk,Kmm)*tmask(ji+1,jj  ,jk))  )
                IF( ze3f /= 0._wp ) THEN   ;   z1_e3f(ji,jj) = 4._wp / ze3f
                ELSE                       ;   z1_e3f(ji,jj) = 0._wp
@@ -642,8 +644,10 @@
          CASE ( 1 )                                   ! new formulation  (masked averaging of e3t divided by the sum of mask)
             DO_2D( 1, 0, 1, 0 )
-               ze3f = (  e3t(ji  ,jj+1,jk,Kmm)*tmask(ji  ,jj+1,jk)   &
-                  &    + e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk)   &
-                  &    + e3t(ji  ,jj  ,jk,Kmm)*tmask(ji  ,jj  ,jk)   &
-                  &    + e3t(ji+1,jj  ,jk,Kmm)*tmask(ji+1,jj  ,jk)  )
+               ! round brackets added to fix the order of floating point operations
+               ! needed to ensure halo 1 - halo 2 compatibility
+               ze3f = (  (e3t(ji  ,jj+1,jk,Kmm)*tmask(ji  ,jj+1,jk)    &
+                  &    +  e3t(ji+1,jj+1,jk,Kmm)*tmask(ji+1,jj+1,jk))   &
+                  &    + (e3t(ji  ,jj  ,jk,Kmm)*tmask(ji  ,jj  ,jk)    &
+                  &    +  e3t(ji+1,jj  ,jk,Kmm)*tmask(ji+1,jj  ,jk))  )
                zmsk = (                    tmask(ji,jj+1,jk) +                     tmask(ji+1,jj+1,jk)   &
                   &                      + tmask(ji,jj  ,jk) +                     tmask(ji+1,jj  ,jk)  )
@@ -785,6 +789,8 @@
          CASE ( np_RVO )                           !* relative vorticity
             DO_2D( 1, 0, 1, 0 )
-               zwz(ji,jj,jk) = (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
-                  &             - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) &
+               ! round brackets added to fix the order of floating point operations
+               ! needed to ensure halo 1 - halo 2 compatibility
+               zwz(ji,jj,jk) = (  (e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk))    &
+                  &             - (e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk))  ) &
                   &          * r1_e1e2f(ji,jj)
             END_2D
@@ -801,6 +807,8 @@
          CASE ( np_CRV )                           !* Coriolis + relative vorticity
             DO_2D( 1, 0, 1, 0 )
-               zwz(ji,jj,jk) = (  ff_f(ji,jj) + (  e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk)    &
-                  &                              - e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) + e1u(ji,jj) * pu(ji,jj,jk)  ) &
+               ! round brackets added to fix the order of floating point operations
+               ! needed to ensure halo 1 - halo 2 compatibility
+               zwz(ji,jj,jk) = (  ff_f(ji,jj) + (  (e2v(ji+1,jj  ) * pv(ji+1,jj  ,jk) - e2v(ji,jj) * pv(ji,jj,jk))    &
+                  &                              - (e1u(ji  ,jj+1) * pu(ji  ,jj+1,jk) - e1u(ji,jj) * pu(ji,jj,jk))  ) &
                   &                         * r1_e1e2f(ji,jj)    )
             END_2D
Index: NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/TRA/traadv_fct.F90
===================================================================
--- NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/TRA/traadv_fct.F90	(revision 14808)
+++ NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/TRA/traadv_fct.F90	(revision 14809)
@@ -238,5 +238,6 @@
                END_2D
             END DO
-            CALL lbc_lnk( 'traadv_fct', zltu, 'T', 1.0_wp , zltv, 'T', 1.0_wp )   ! Lateral boundary cond. (unchanged sgn)
+            ! NOTE [ comm_cleanup ] : need to change sign to ensure halo 1 - halo 2 compatibility
+            CALL lbc_lnk( 'traadv_fct', zltu, 'T', -1.0_wp , zltv, 'T', -1.0_wp )   ! Lateral boundary cond. (unchanged sgn)
             !
             DO_3D( 1, 0, 1, 0, 1, jpkm1 )
@@ -244,6 +245,12 @@
                zC2t_v = pt(ji,jj,jk,jn,Kmm) + pt(ji  ,jj+1,jk,jn,Kmm)
                !                                                        ! C4 minus upstream advective fluxes
-               zwx(ji,jj,jk) =  0.5_wp * pU(ji,jj,jk) * ( zC2t_u + zltu(ji,jj,jk) - zltu(ji+1,jj,jk) ) - zwx(ji,jj,jk)
-               zwy(ji,jj,jk) =  0.5_wp * pV(ji,jj,jk) * ( zC2t_v + zltv(ji,jj,jk) - zltv(ji,jj+1,jk) ) - zwy(ji,jj,jk)
+               ! round brackets added to fix the order of floating point operations
+               ! needed to ensure halo 1 - halo 2 compatibility
+               zwx(ji,jj,jk) =  0.5_wp * pU(ji,jj,jk) * ( zC2t_u + ( zltu(ji,jj,jk) - zltu(ji+1,jj,jk)   &
+                             &                                     )                                     & ! bracket for halo 1 - halo 2 compatibility
+                             &                          ) - zwx(ji,jj,jk)
+               zwy(ji,jj,jk) =  0.5_wp * pV(ji,jj,jk) * ( zC2t_v + ( zltv(ji,jj,jk) - zltv(ji,jj+1,jk)   &
+                             &                                     )                                     & ! bracket for halo 1 - halo 2 compatibility
+                             &                          ) - zwy(ji,jj,jk)
             END_3D
             IF (nn_hls.EQ.2) CALL lbc_lnk( 'traadv_fct', zwx, 'U', -1.0_wp, zwy, 'V', -1.0_wp )   ! Lateral boundary cond. (unchanged sgn)
Index: NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/TRA/trabbl.F90
===================================================================
--- NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/TRA/trabbl.F90	(revision 14808)
+++ NEMO/branches/2021/ticket2607_r14608_halo1_halo2_compatibility/src/OCE/TRA/trabbl.F90	(revision 14809)
@@ -141,5 +141,5 @@
          IF( ntile == 0 .OR. ntile == nijtile ) THEN                       ! Do only on the last tile
             ! lateral boundary conditions ; just need for outputs
-            CALL lbc_lnk( 'trabbl', utr_bbl, 'U', 1.0_wp , vtr_bbl, 'V', 1.0_wp )
+            CALL lbc_lnk( 'trabbl', utr_bbl, 'U', -1.0_wp , vtr_bbl, 'V', -1.0_wp )
             CALL iom_put( "uoce_bbl", utr_bbl )  ! bbl i-transport
             CALL iom_put( "voce_bbl", vtr_bbl )  ! bbl j-transport
