Index: branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/OPATAM_SRC/LBC/lbcnfd_tam.F90
===================================================================
--- branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/OPATAM_SRC/LBC/lbcnfd_tam.F90	(revision 4583)
+++ branches/2012/dev_v3_4_STABLE_2012/NEMOGCM/NEMO/OPATAM_SRC/LBC/lbcnfd_tam.F90	(revision 4584)
@@ -55,4 +55,6 @@
       INTEGER  ::   ji, jk
       INTEGER  ::   ijt, iju, ijpj, ijpjm1
+      ! 
+      REAL(wp) :: ztmp
       !!----------------------------------------------------------------------
 
@@ -73,7 +75,9 @@
             DO ji = jpiglo, jpiglo/2+1, -1
                ijt = jpiglo-ji+2
-               pt3d(ijt,ijpjm1,jk) = pt3d(ijt,ijpjm1,jk) + psgn * pt3d(ji,ijpjm1,jk)
+               ztmp = psgn * pt3d(ji,ijpjm1,jk)
                pt3d(ji ,ijpjm1,jk) = 0.0_wp
-            END DO
+               pt3d(ijt,ijpjm1,jk) = pt3d(ijt,ijpjm1,jk) + ztmp
+            END DO
+
             DO ji = jpiglo, 2, -1
                ijt = jpiglo-ji+2
@@ -84,7 +88,9 @@
             DO ji = jpiglo-1, jpiglo/2, -1
                iju = jpiglo-ji+1
-               pt3d(iju,ijpjm1,jk) = pt3d(iju,ijpjm1,jk) + psgn * pt3d(ji,ijpjm1,jk)
+               ztmp = psgn * pt3d(ji,ijpjm1,jk)
                pt3d(ji ,ijpjm1,jk) = 0.0_wp
-            END DO
+               pt3d(iju,ijpjm1,jk) = pt3d(iju,ijpjm1,jk) + ztmp
+            END DO
+
             DO ji = jpiglo-1, 1, -1
                iju = jpiglo-ji+1
@@ -128,6 +134,7 @@
             DO ji = jpiglo, jpiglo/2+1, -1
                ijt = jpiglo-ji+1
-               pt3d(ijt,ijpjm1,jk) = pt3d(ijt,ijpjm1,jk) + psgn * pt3d(ji,ijpjm1,jk)
+               ztmp = psgn * pt3d(ji,ijpjm1,jk)
                pt3d(ji ,ijpjm1,jk) = 0.0_wp
+               pt3d(ijt,ijpjm1,jk) = pt3d(ijt,ijpjm1,jk) + ztmp
             END DO
             DO ji = jpiglo, 1, -1
@@ -139,6 +146,7 @@
             DO ji = jpiglo-1, jpiglo/2+1, -1
                iju = jpiglo-ji
-               pt3d(iju,ijpjm1,jk) = pt3d(iju,ijpjm1,jk) + psgn * pt3d(ji,ijpjm1,jk)
+               ztmp = psgn * pt3d(ji,ijpjm1,jk)
                pt3d(ji ,ijpjm1,jk) = 0.0_wp
+               pt3d(iju,ijpjm1,jk) = pt3d(iju,ijpjm1,jk) + ztmp
             END DO
             DO ji = jpiglo-1, 1, -1
@@ -187,4 +195,6 @@
       INTEGER  ::   ji, jl, ipr2dj
       INTEGER  ::   ijt, iju, ijpj, ijpjm1
+      !
+      REAL(wp) :: ztmp
       !!----------------------------------------------------------------------
 
@@ -211,12 +221,14 @@
             DO ji = jpiglo, jpiglo/2+1, -1
                ijt=jpiglo-ji+2
-               pt2d(ijt,ijpj-1) = pt2d(ijt,ijpj-1) + psgn * pt2d(ji,ijpj-1)
+               ztmp = psgn * pt2d(ji,ijpj-1)
                pt2d(ji,ijpj-1) = 0.0_wp
+               pt2d(ijt,ijpj-1) = pt2d(ijt,ijpj-1) + ztmp
             END DO
             DO jl = ipr2dj, 0, -1
                DO ji = jpiglo, 2, -1
                   ijt=jpiglo-ji+2
-                  pt2d(ijt,ijpj-2-jl) = pt2d(ijt,ijpj-2-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji ,ijpj+jl  ) = 0.0_wp
+                  pt2d(ijt,ijpj-2-jl) = pt2d(ijt,ijpj-2-jl) + ztmp
                END DO
             END DO
@@ -224,12 +236,14 @@
             DO ji = jpiglo-1, jpiglo/2, -1
                iju = jpiglo-ji+1
-               pt2d(iju,ijpjm1) = pt2d(iju,ijpjm1) + psgn * pt2d(ji,ijpjm1)
+               ztmp = psgn * pt2d(ji,ijpjm1)
                pt2d(ji,ijpjm1) = 0.0_wp
+               pt2d(iju,ijpjm1) = pt2d(iju,ijpjm1) + ztmp
             END DO
             DO jl = ipr2dj, 0, -1
                DO ji = jpiglo-1, 1, -1
                   iju = jpiglo-ji+1
-                  pt2d(iju,ijpj-2-jl) = pt2d(iju,ijpj-2-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji ,ijpj+jl  ) = 0.0_wp
+                  pt2d(iju,ijpj-2-jl) = pt2d(iju,ijpj-2-jl) + ztmp
                END DO
             END DO
@@ -238,6 +252,7 @@
                DO ji = jpiglo, 2, -1
                   ijt = jpiglo-ji+2
-                  pt2d(ijt,ijpj-3-jl) = pt2d(ijt,ijpj-3-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji ,ijpj+jl  ) = 0.0_wp
+                  pt2d(ijt,ijpj-3-jl) = pt2d(ijt,ijpj-3-jl) + ztmp
                END DO
             END DO
@@ -246,6 +261,7 @@
                DO ji = jpiglo-1, 1, -1
                   iju = jpiglo-ji+1
-                  pt2d(iju,ijpj-3-jl) = pt2d(iju,ijpj-3-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji,ijpj+jl) = 0.0_wp
+                  pt2d(iju,ijpj-3-jl) = pt2d(iju,ijpj-3-jl) + ztmp
                END DO
             END DO
@@ -254,9 +270,11 @@
                DO ji = jpiglo, 3, -1
                   iju = jpiglo - ji + 3
-                  pt2d(iju,ijpj-1-jl) = pt2d(iju,ijpj-1-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji,ijpj+jl) = 0.0_wp
-               END DO
-               pt2d(3,ijpj-1+jl) = pt2d(3,ijpj-1+jl) + psgn * pt2d(2,ijpj+jl)
+                  pt2d(iju,ijpj-1-jl) = pt2d(iju,ijpj-1-jl) + ztmp
+               END DO
+               ztmp = psgn * pt2d(2,ijpj+jl)
                pt2d(2,ijpj+jl) = 0.0_wp
+               pt2d(3,ijpj-1+jl) = pt2d(3,ijpj-1+jl) + ztmp
             END DO
          CASE ( 'J' )                                     ! first ice U-V point
@@ -264,6 +282,7 @@
                DO ji = 3, jpiglo
                   iju = jpiglo - ji + 3
-                  pt2d(iju,ijpj-1-jl) = pt2d(iju,ijpj-1-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji,ijpj+jl) = 0.0_wp
+                  pt2d(iju,ijpj-1-jl) = pt2d(iju,ijpj-1-jl) + ztmp
                END DO
                pt2d(3,ijpj-1+jl) = pt2d(3,ijpj-1+jl) + psgn * pt2d(2,ijpj+jl)
@@ -277,6 +296,7 @@
                   pt2d(ji,ijpj+jl) = 0.0_wp
                END DO
-               pt2d(3,ijpj-1+jl) = pt2d(3,ijpj-1+jl) + psgn * pt2d(ji,ijpj+jl)
-               pt2d(3,ijpj-1+jl) = 0.0_wp
+               ztmp = psgn * pt2d(2,ijpj+jl)
+               pt2d(2,ijpj+jl) = 0.0_wp
+               pt2d(3,ijpj-1+jl) = pt2d(3,ijpj-1+jl) + ztmp
             END DO
          END SELECT
@@ -289,6 +309,7 @@
                DO ji = jpiglo, 1, -1
                   ijt = jpiglo-ji+1
-                  pt2d(ijt,ijpj-1-jl) = pt2d(ijt,ijpj-1-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji ,ijpj+jl  ) = 0.0_wp
+                  pt2d(ijt,ijpj-1-jl) = pt2d(ijt,ijpj-1-jl) + ztmp
                END DO
             END DO
@@ -297,6 +318,7 @@
                DO ji = jpiglo-1, 1, -1
                   iju = jpiglo-ji
-                  pt2d(iju,ijpj-1-jl) = pt2d(iju,ijpj-1-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji,ijpj+jl) = 0.0_wp
+                  pt2d(iju,ijpj-1-jl) = pt2d(iju,ijpj-1-jl) + ztmp
                END DO
             END DO
@@ -304,12 +326,14 @@
             DO ji = jpiglo, jpiglo/2+1, -1
                ijt = jpiglo-ji+1
-               pt2d(ijt,ijpjm1) = pt2d(ijt,ijpjm1) + psgn * pt2d(ji,ijpjm1)
+               ztmp = psgn * pt2d(ji,ijpjm1)
                pt2d(ji ,ijpjm1) = 0.0_wp
+               pt2d(ijt,ijpjm1) = pt2d(ijt,ijpjm1) + ztmp
             END DO
             DO jl = ipr2dj, 0, -1
                DO ji = jpiglo, 1, -1
                   ijt = jpiglo-ji+1
-                  pt2d(ijt,ijpj-2-jl) = pt2d(ijt,ijpj-2-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji,ijpj+jl) = 0.0_wp
+                  pt2d(ijt,ijpj-2-jl) = pt2d(ijt,ijpj-2-jl) + ztmp
                END DO
             END DO
@@ -317,12 +341,14 @@
             DO ji = jpiglo-1, jpiglo/2+1, -1
                iju = jpiglo-ji
-               pt2d(iju,ijpjm1) = pt2d(iju,ijpjm1) + psgn * pt2d(ji,ijpjm1)
+               ztmp = psgn * pt2d(ji,ijpjm1)
                pt2d(ji ,ijpjm1) = 0.0_wp
+               pt2d(iju,ijpjm1) = pt2d(iju,ijpjm1) + ztmp
             END DO
             DO jl = ipr2dj, 0, -1
                DO ji = jpiglo-1, 1, -1
                   iju = jpiglo-ji
-                  pt2d(iju,ijpj-2-jl) = pt2d(iju,ijpj-2-jl) + psgn * pt2d(ji,ijpj+jl)
+                  ztmp = psgn * pt2d(ji,ijpj+jl)
                   pt2d(ji ,ijpj+jl  ) = 0.0_wp
+                  pt2d(iju,ijpj-2-jl) = pt2d(iju,ijpj-2-jl) + ztmp
                END DO
             END DO
@@ -415,16 +441,4 @@
       & prntst_adj
    USE dom_oce       , ONLY: & ! Ocean space and time domain
-      & e1u,                 &
-      & e2u,                 &
-      & e1v,                 &
-      & e2v,                 &
-      & e1t,                 &
-      & e2t,                 &
-#if defined key_zco
-      & e3t_0,               &
-#else
-      & e3u,                 &
-      & e3v,                 &
-#endif
       & tmask,               &
       & umask,               &
@@ -486,4 +500,9 @@
 
       zijpj = 4
+
+      SELECT CASE ( jpni )
+      CASE ( 1 )     ;   ijpj = nlcj      ! 1 proc only  along the i-direction
+      CASE DEFAULT   ;   ijpj = 4         ! several proc along the i-direction
+      END SELECT
 
       ALLOCATE( &
@@ -600,6 +619,5 @@
 
         ! DOT_PRODUCT
-        zsp1 = sum( &
-         &                       PACK(zu_tlout(:,:,:),.TRUE.) * &
+        zsp1 = sum( PACK(zu_tlout(:,:,:),.TRUE.) * &
          &                       PACK( zu_adin(:,:,:),.TRUE.) )
 
@@ -616,28 +634,33 @@
         zt_adout(:,:,:) = zt_ad(:,:,:)
 
-        zsp2 = sum( &
-         &                       PACK(zu_tlin(:,:,:),.TRUE.) * &
+        zsp2 = sum( PACK(zu_tlin(:,:,:),.TRUE.) * &
          &                       PACK( zu_adout(:,:,:),.TRUE.) )
+
+        CALL mpp_sum( zsp1 )
+        CALL mpp_sum( zsp2 )
 
         cl_name = 'lbc_nfd  U  3d'
         CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 )
 
-        zsp1 = sum( &
-         &                       PACK(zv_tlout(:,:,:),.TRUE.) * &
+        zsp1 = sum( PACK(zv_tlout(:,:,:),.TRUE.) * &
          &                       PACK( zv_adin(:,:,:),.TRUE.) )
 
-        zsp2 = sum( &
-         &                       PACK(zv_tlin(:,:,:),.TRUE.) * &
+        zsp2 = sum( PACK(zv_tlin(:,:,:),.TRUE.) * &
          &                       PACK( zv_adout(:,:,:),.TRUE.) )
+
+        CALL mpp_sum( zsp1 )
+        CALL mpp_sum( zsp2 )
         cl_name = 'lbc_nfd  V  3d'
         CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 )
 
-        zsp1 = sum( &
-         &                       PACK(zt_tlout(:,:,:),.TRUE.) * &
+        zsp1 = sum( PACK(zt_tlout(:,:,:),.TRUE.) * &
          &                       PACK( zt_adin(:,:,:),.TRUE.) )
 
-        zsp2 = sum( &
-         &                       PACK(zt_tlin(:,:,:),.TRUE.) * &
+        zsp2 = sum( PACK(zt_tlin(:,:,:),.TRUE.) * &
          &                       PACK( zt_adout(:,:,:),.TRUE.) )
+
+        CALL mpp_sum( zsp1 )
+        CALL mpp_sum( zsp2 )
+
       cl_name = 'lbc_nfd  T  3d'
       CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 )
@@ -680,16 +703,4 @@
       & prntst_adj
    USE dom_oce       , ONLY: & ! Ocean space and time domain
-      & e1u,                 &
-      & e2u,                 &
-      & e1v,                 &
-      & e2v,                 &
-      & e1t,                 &
-      & e2t,                 &
-#if defined key_zco
-      & e3t_0,               &
-#else
-      & e3u,                 &
-      & e3v,                 &
-#endif
       & tmask,               &
       & umask,               &
@@ -752,5 +763,8 @@
       ! Allocate memory
 
-      zijpj = 4
+      SELECT CASE ( jpni )
+      CASE ( 1 )     ;   ijpj = nlcj      ! 1 proc only  along the i-direction
+      CASE DEFAULT   ;   ijpj = 4         ! several proc along the i-direction
+      END SELECT
 
       ALLOCATE( &
@@ -859,6 +873,5 @@
         END DO
 
-        zsp1 = sum( &
-         &                       PACK(zu_tlout(:,:),.TRUE.) * &
+        zsp1 = sum( PACK(zu_tlout(:,:),.TRUE.) * &
          &                       PACK( zu_adin(:,:),.TRUE.) )
         zu_ad(:,:) = zu_adin(:,:)
@@ -874,27 +887,34 @@
         zt_adout(:,:) = zt_ad(:,:)
 
-        zsp2 = sum( &
-         &                       PACK(zu_tlin(:,:),.TRUE.) * &
+        zsp2 = sum( PACK(zu_tlin(:,:),.TRUE.) * &
          &                       PACK( zu_adout(:,:),.TRUE.) )
+
+        CALL mpp_sum( zsp1 )
+        CALL mpp_sum( zsp2 )
+
         cl_name = 'lbc_nfd  U  2d'
         CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 )
 
-        zsp1 = sum( &
-         &                       PACK(zv_tlout(:,:),.TRUE.) * &
+        zsp1 = sum( PACK(zv_tlout(:,:),.TRUE.) * &
          &                       PACK( zv_adin(:,:),.TRUE.) )
 
-        zsp2 = sum( &
-         &                       PACK(zv_tlin(:,:),.TRUE.) * &
+        zsp2 = sum( PACK(zv_tlin(:,:),.TRUE.) * &
          &                       PACK( zv_adout(:,:),.TRUE.) )
+        
+        CALL mpp_sum( zsp1 )
+        CALL mpp_sum( zsp2 )
+
         cl_name = 'lbc_nfd  V  2d'
         CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 )
 
-        zsp1 = sum( &
-         &                       PACK(zt_tlout(:,:),.TRUE.) * &
+        zsp1 = sum( PACK(zt_tlout(:,:),.TRUE.) * &
          &                       PACK( zt_adin(:,:),.TRUE.) )
 
-        zsp2 = sum( &
-         &                       PACK(zt_tlin(:,:),.TRUE.) * &
+        zsp2 = sum( PACK(zt_tlin(:,:),.TRUE.) * &
          &                       PACK( zt_adout(:,:),.TRUE.) )
+
+        CALL mpp_sum( zsp1 )
+        CALL mpp_sum( zsp2 )
+
         cl_name = 'lbc_nfd  T  2d'
         CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 )
