Index: branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90
===================================================================
--- branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90	(revision 4014)
+++ branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/LBC/lbclnk.F90	(revision 4015)
@@ -264,6 +264,4 @@
             END SELECT
             !                                          ! North fold
-            pt3d( 1 ,jpj,:) = zland
-            pt3d(jpi,jpj,:) = zland
             CALL lbc_nfd( pt3d(:,:,:), cd_type, psgn )
             !
@@ -386,7 +384,4 @@
             END SELECT
             !                                          ! North fold
-            pt2d( 1 ,1  ) = zland 
-            pt2d( 1 ,jpj) = zland 
-            pt2d(jpi,jpj) = zland
             CALL lbc_nfd( pt2d(:,:), cd_type, psgn )
             !
Index: branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/LBC/lbcnfd.F90
===================================================================
--- branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/LBC/lbcnfd.F90	(revision 4014)
+++ branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/LBC/lbcnfd.F90	(revision 4015)
@@ -71,4 +71,5 @@
                   pt3d(ji,ijpj,jk) = psgn * pt3d(ijt,ijpj-2,jk)
                END DO
+               pt3d(1,ijpj,jk) = psgn * pt3d(3,ijpj-2,jk)
                DO ji = jpiglo/2+1, jpiglo
                   ijt = jpiglo-ji+2
@@ -80,4 +81,6 @@
                   pt3d(ji,ijpj,jk) = psgn * pt3d(iju,ijpj-2,jk)
                END DO
+               pt3d(   1  ,ijpj,jk) = psgn * pt3d(    2   ,ijpj-2,jk)
+               pt3d(jpiglo,ijpj,jk) = psgn * pt3d(jpiglo-1,ijpj-2,jk) 
                DO ji = jpiglo/2, jpiglo-1
                   iju = jpiglo-ji+1
@@ -90,4 +93,5 @@
                   pt3d(ji,ijpj  ,jk) = psgn * pt3d(ijt,ijpj-3,jk)
                END DO
+               pt3d(1,ijpj,jk) = psgn * pt3d(3,ijpj-3,jk) 
             CASE ( 'F' )                               ! F-point
                DO ji = 1, jpiglo-1
@@ -96,4 +100,6 @@
                   pt3d(ji,ijpj  ,jk) = psgn * pt3d(iju,ijpj-3,jk)
                END DO
+               pt3d(   1  ,ijpj,jk) = psgn * pt3d(    2   ,ijpj-3,jk)
+               pt3d(jpiglo,ijpj,jk) = psgn * pt3d(jpiglo-1,ijpj-3,jk) 
             END SELECT
             !
@@ -111,4 +117,5 @@
                   pt3d(ji,ijpj,jk) = psgn * pt3d(iju,ijpj-1,jk)
                END DO
+               pt3d(jpiglo,ijpj,jk) = psgn * pt3d(1,ijpj-1,jk)
             CASE ( 'V' )                               ! V-point
                DO ji = 1, jpiglo
@@ -125,4 +132,5 @@
                   pt3d(ji,ijpj  ,jk) = psgn * pt3d(iju,ijpj-2,jk)
                END DO
+               pt3d(jpiglo,ijpj,jk) = psgn * pt3d(1,ijpj-2,jk)
                DO ji = jpiglo/2+1, jpiglo-1
                   iju = jpiglo-ji
@@ -199,4 +207,5 @@
                END DO
             END DO
+            pt2d(1,ijpj)   = psgn * pt2d(3,ijpj-2)
             DO ji = jpiglo/2+1, jpiglo
                ijt=jpiglo-ji+2
@@ -210,4 +219,7 @@
                END DO
             END DO
+            pt2d(   1  ,ijpj  ) = psgn * pt2d(    2   ,ijpj-2)
+            pt2d(jpiglo,ijpj  ) = psgn * pt2d(jpiglo-1,ijpj-2)
+            pt2d(1     ,ijpj-1) = psgn * pt2d(jpiglo  ,ijpj-1)   
             DO ji = jpiglo/2, jpiglo-1
                iju = jpiglo-ji+1
@@ -221,4 +233,5 @@
                END DO
             END DO
+            pt2d( 1 ,ijpj)   = psgn * pt2d( 3 ,ijpj-3) 
          CASE ( 'F' )                                     ! F-point
             DO jl = -1, ipr2dj
@@ -228,4 +241,8 @@
                END DO
             END DO
+            pt2d(   1  ,ijpj)   = psgn * pt2d(    2   ,ijpj-3)
+            pt2d(jpiglo,ijpj)   = psgn * pt2d(jpiglo-1,ijpj-3)
+            pt2d(jpiglo,ijpj-1) = psgn * pt2d(jpiglo-1,ijpj-2)      
+            pt2d(   1  ,ijpj-1) = psgn * pt2d(    2   ,ijpj-2)      
          CASE ( 'I' )                                     ! ice U-V point (I-point)
             DO jl = 0, ipr2dj
@@ -271,4 +288,5 @@
                END DO
             END DO
+            pt2d(jpiglo,ijpj) = psgn * pt2d(1,ijpj-1)
          CASE ( 'V' )                                     ! V-point
             DO jl = 0, ipr2dj
@@ -289,4 +307,5 @@
                END DO
             END DO
+            pt2d(jpiglo,ijpj) = psgn * pt2d(1,ijpj-2)
             DO ji = jpiglo/2+1, jpiglo-1
                iju = jpiglo-ji
Index: branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
===================================================================
--- branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 4014)
+++ branches/2013/dev_r3940_CNRS4_IOCRS/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 4015)
@@ -22,4 +22,5 @@
    !!                          'mpp_lnk_bdy_2d' and 'mpp_lnk_obc_2d' routines and update
    !!                          the mppobc routine to optimize the BDY and OBC communications
+   !!            3.6  !  2013  ( C. Ethe, G. Madec ) message passing arrays as local variables 
    !!----------------------------------------------------------------------
 
@@ -71,5 +72,4 @@
    PUBLIC   mppsize
    PUBLIC   mppsend, mpprecv                          ! needed by TAM and ICB routines
-   PUBLIC   lib_mpp_alloc   ! Called in nemogcm.F90
    PUBLIC   mpp_lnk_bdy_2d, mpp_lnk_bdy_3d
    PUBLIC   mpp_lnk_obc_2d, mpp_lnk_obc_3d
@@ -150,29 +150,4 @@
    REAL(wp), DIMENSION(:), ALLOCATABLE, SAVE :: tampon  ! buffer in case of bsend
 
-   ! message passing arrays
-   REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE, SAVE ::   t4ns, t4sn   ! 2 x 3d for north-south & south-north
-   REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE, SAVE ::   t4ew, t4we   ! 2 x 3d for east-west & west-east
-   REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE, SAVE ::   t4p1, t4p2   ! 2 x 3d for north fold
-   REAL(wp), DIMENSION(:,:,:,:)  , ALLOCATABLE, SAVE ::   t3ns, t3sn   ! 3d for north-south & south-north
-   REAL(wp), DIMENSION(:,:,:,:)  , ALLOCATABLE, SAVE ::   t3ew, t3we   ! 3d for east-west & west-east
-   REAL(wp), DIMENSION(:,:,:,:)  , ALLOCATABLE, SAVE ::   t3p1, t3p2   ! 3d for north fold
-   REAL(wp), DIMENSION(:,:,:)    , ALLOCATABLE, SAVE ::   t2ns, t2sn   ! 2d for north-south & south-north
-   REAL(wp), DIMENSION(:,:,:)    , ALLOCATABLE, SAVE ::   t2ew, t2we   ! 2d for east-west & west-east
-   REAL(wp), DIMENSION(:,:,:)    , ALLOCATABLE, SAVE ::   t2p1, t2p2   ! 2d for north fold
-
-   ! Arrays used in mpp_lbc_north_3d()
-   REAL(wp), DIMENSION(:,:,:)  , ALLOCATABLE, SAVE   ::   tab_3d, xnorthloc
-   REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE, SAVE   ::   xnorthgloio
-   REAL(wp), DIMENSION(:,:,:)  , ALLOCATABLE, SAVE   ::   foldwk      ! Workspace for message transfers avoiding mpi_allgather
-
-   ! Arrays used in mpp_lbc_north_2d()
-   REAL(wp), DIMENSION(:,:)  , ALLOCATABLE, SAVE    ::   tab_2d, xnorthloc_2d
-   REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE    ::   xnorthgloio_2d
-   REAL(wp), DIMENSION(:,:)  , ALLOCATABLE, SAVE    ::   foldwk_2d    ! Workspace for message transfers avoiding mpi_allgather
-
-   ! Arrays used in mpp_lbc_north_e()
-   REAL(wp), DIMENSION(:,:)  , ALLOCATABLE, SAVE    ::   tab_e, xnorthloc_e
-   REAL(wp), DIMENSION(:,:,:), ALLOCATABLE, SAVE    ::   xnorthgloio_e
-
    ! North fold arrays used to minimise the use of allgather operations. Set in nemo_northcomms (nemogcm) so need to be public
    INTEGER, PUBLIC,  PARAMETER :: jpmaxngh = 8                 ! Assumed maximum number of active neighbours
@@ -189,38 +164,4 @@
    !!----------------------------------------------------------------------
 CONTAINS
-
-   INTEGER FUNCTION lib_mpp_alloc( kumout )
-      !!----------------------------------------------------------------------
-      !!              ***  routine lib_mpp_alloc  ***
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT(in) ::   kumout   ! ocean.output logical unit
-      !!----------------------------------------------------------------------
-      !
-      ALLOCATE( t4ns(jpi,jprecj,jpk,2,2) , t4sn(jpi,jprecj,jpk,2,2) ,                                            &
-         &      t4ew(jpj,jpreci,jpk,2,2) , t4we(jpj,jpreci,jpk,2,2) ,                                            &
-         &      t4p1(jpi,jprecj,jpk,2,2) , t4p2(jpi,jprecj,jpk,2,2) ,                                            &
-         &      t3ns(jpi,jprecj,jpk,2)   , t3sn(jpi,jprecj,jpk,2)   ,                                            &
-         &      t3ew(jpj,jpreci,jpk,2)   , t3we(jpj,jpreci,jpk,2)   ,                                            &
-         &      t3p1(jpi,jprecj,jpk,2)   , t3p2(jpi,jprecj,jpk,2)   ,                                            &
-         &      t2ns(jpi,jprecj    ,2)   , t2sn(jpi,jprecj    ,2)   ,                                            &
-         &      t2ew(jpj,jpreci    ,2)   , t2we(jpj,jpreci    ,2)   ,                                            &
-         &      t2p1(jpi,jprecj    ,2)   , t2p2(jpi,jprecj    ,2)   ,                                            &
-         !
-         &      tab_3d(jpiglo,4,jpk) , xnorthloc(jpi,4,jpk) , xnorthgloio(jpi,4,jpk,jpni) ,                        &
-         &      foldwk(jpi,4,jpk) ,                                                                             &
-         !
-         &      tab_2d(jpiglo,4)  , xnorthloc_2d(jpi,4)  , xnorthgloio_2d(jpi,4,jpni)  ,                        &
-         &      foldwk_2d(jpi,4)  ,                                                                             &
-         !
-         &      tab_e(jpiglo,4+2*jpr2dj) , xnorthloc_e(jpi,4+2*jpr2dj) , xnorthgloio_e(jpi,4+2*jpr2dj,jpni) ,   &
-         !
-         &      STAT=lib_mpp_alloc )
-         !
-      IF( lib_mpp_alloc /= 0 ) THEN
-         WRITE(kumout,cform_war)
-         WRITE(kumout,*) 'lib_mpp_alloc : failed to allocate arrays'
-      ENDIF
-      !
-   END FUNCTION lib_mpp_alloc
 
 
@@ -385,5 +326,12 @@
       REAL(wp) ::   zland
       INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend
-      !!----------------------------------------------------------------------
+      !
+      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::   zt3ns, zt3sn   ! 3d for north-south & south-north
+      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::   zt3ew, zt3we   ! 3d for east-west & west-east
+
+      !!----------------------------------------------------------------------
+
+      ALLOCATE( zt3ns(jpi,jprecj,jpk,2), zt3sn(jpi,jprecj,jpk,2),   &
+         &      zt3ew(jpj,jpreci,jpk,2), zt3we(jpj,jpreci,jpk,2)  )
 
       zland = 0.e0      ! zero by default
@@ -420,6 +368,6 @@
          iihom = nlci-nreci
          DO jl = 1, jpreci
-            t3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)
-            t3we(:,jl,:,1) = ptab(iihom +jl,:,:)
+            zt3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)
+            zt3we(:,jl,:,1) = ptab(iihom +jl,:,:)
          END DO
       END SELECT  
@@ -430,17 +378,17 @@
       SELECT CASE ( nbondi ) 
       CASE ( -1 )
-         CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req1 )
-         CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )
+         CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req1 )
+         CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       CASE ( 0 )
-         CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )
-         CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req2 )
-         CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )
-         CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 )
+         CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req2 )
+         CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea )
+         CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err)
       CASE ( 1 )
-         CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )
-         CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 )
+         CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       END SELECT
@@ -452,14 +400,14 @@
       CASE ( -1 )
          DO jl = 1, jpreci
-            ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)
+            ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jpreci
-            ptab(jl      ,:,:) = t3we(:,jl,:,2)
-            ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)
+            ptab(jl      ,:,:) = zt3we(:,jl,:,2)
+            ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jpreci
-            ptab(jl      ,:,:) = t3we(:,jl,:,2)
+            ptab(jl      ,:,:) = zt3we(:,jl,:,2)
          END DO
       END SELECT
@@ -475,6 +423,6 @@
          ijhom = nlcj-nrecj
          DO jl = 1, jprecj
-            t3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)
-            t3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)
+            zt3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)
+            zt3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)
          END DO
       ENDIF
@@ -485,17 +433,17 @@
       SELECT CASE ( nbondj )     
       CASE ( -1 )
-         CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req1 )
-         CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )
+         CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req1 )
+         CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       CASE ( 0 )
-         CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )
-         CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req2 )
-         CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )
-         CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )
+         CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 )
+         CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req2 )
+         CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono )
+         CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err)
       CASE ( 1 ) 
-         CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )
-         CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )
+         CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 )
+         CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       END SELECT
@@ -507,14 +455,14 @@
       CASE ( -1 )
          DO jl = 1, jprecj
-            ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)
+            ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jprecj
-            ptab(:,jl      ,:) = t3sn(:,jl,:,2)
-            ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)
+            ptab(:,jl      ,:) = zt3sn(:,jl,:,2)
+            ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jprecj
-            ptab(:,jl,:) = t3sn(:,jl,:,2)
+            ptab(:,jl,:) = zt3sn(:,jl,:,2)
          END DO
       END SELECT
@@ -533,4 +481,6 @@
          !
       ENDIF
+      !
+      DEALLOCATE( zt3ns, zt3sn, zt3ew, zt3we )
       !
    END SUBROUTINE mpp_lnk_obc_3d
@@ -567,5 +517,12 @@
       REAL(wp) ::   zland
       INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend
-      !!----------------------------------------------------------------------
+      !
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ns, zt2sn   ! 2d for north-south & south-north
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ew, zt2we   ! 2d for east-west & west-east
+
+      !!----------------------------------------------------------------------
+
+      ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2),  &
+         &      zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2)   )
 
       zland = 0.e0      ! zero by default
@@ -602,6 +559,6 @@
          iihom = nlci-nreci
          DO jl = 1, jpreci
-            t2ew(:,jl,1) = pt2d(jpreci+jl,:)
-            t2we(:,jl,1) = pt2d(iihom +jl,:)
+            zt2ew(:,jl,1) = pt2d(jpreci+jl,:)
+            zt2we(:,jl,1) = pt2d(iihom +jl,:)
          END DO
       END SELECT
@@ -612,17 +569,17 @@
       SELECT CASE ( nbondi )
       CASE ( -1 )
-         CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req1 )
-         CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )
+         CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 )
+         CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
       CASE ( 0 )
-         CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )
-         CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req2 )
-         CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )
-         CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
+         CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 )
+         CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
+         CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err)
       CASE ( 1 )
-         CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )
-         CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
+         CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
       END SELECT
@@ -634,14 +591,14 @@
       CASE ( -1 )
          DO jl = 1, jpreci
-            pt2d(iihom+jl,:) = t2ew(:,jl,2)
+            pt2d(iihom+jl,:) = zt2ew(:,jl,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jpreci
-            pt2d(jl      ,:) = t2we(:,jl,2)
-            pt2d(iihom+jl,:) = t2ew(:,jl,2)
+            pt2d(jl      ,:) = zt2we(:,jl,2)
+            pt2d(iihom+jl,:) = zt2ew(:,jl,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jpreci
-            pt2d(jl      ,:) = t2we(:,jl,2)
+            pt2d(jl      ,:) = zt2we(:,jl,2)
          END DO
       END SELECT
@@ -655,6 +612,6 @@
          ijhom = nlcj-nrecj
          DO jl = 1, jprecj
-            t2sn(:,jl,1) = pt2d(:,ijhom +jl)
-            t2ns(:,jl,1) = pt2d(:,jprecj+jl)
+            zt2sn(:,jl,1) = pt2d(:,ijhom +jl)
+            zt2ns(:,jl,1) = pt2d(:,jprecj+jl)
          END DO
       ENDIF
@@ -665,17 +622,17 @@
       SELECT CASE ( nbondj )
       CASE ( -1 )
-         CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req1 )
-         CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )
+         CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 )
+         CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
       CASE ( 0 )
-         CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )
-         CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req2 )
-         CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )
-         CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )
+         CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
+         CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 )
+         CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
+         CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err)
       CASE ( 1 )
-         CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )
-         CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )
+         CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
+         CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
       END SELECT
@@ -687,14 +644,14 @@
       CASE ( -1 )
          DO jl = 1, jprecj
-            pt2d(:,ijhom+jl) = t2ns(:,jl,2)
+            pt2d(:,ijhom+jl) = zt2ns(:,jl,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jprecj
-            pt2d(:,jl      ) = t2sn(:,jl,2)
-            pt2d(:,ijhom+jl) = t2ns(:,jl,2)
+            pt2d(:,jl      ) = zt2sn(:,jl,2)
+            pt2d(:,ijhom+jl) = zt2ns(:,jl,2)
          END DO
       CASE ( 1 ) 
          DO jl = 1, jprecj
-            pt2d(:,jl      ) = t2sn(:,jl,2)
+            pt2d(:,jl      ) = zt2sn(:,jl,2)
          END DO
       END SELECT
@@ -712,4 +669,6 @@
          !
       ENDIF
+      !
+      DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we )
       !
    END SUBROUTINE mpp_lnk_obc_2d
@@ -749,6 +708,14 @@
       REAL(wp) ::   zland
       INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend
-      !!----------------------------------------------------------------------
-
+      !
+      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::   zt3ns, zt3sn   ! 3d for north-south & south-north
+      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::   zt3ew, zt3we   ! 3d for east-west & west-east
+
+      !!----------------------------------------------------------------------
+      
+      ALLOCATE( zt3ns(jpi,jprecj,jpk,2), zt3sn(jpi,jprecj,jpk,2),   &
+         &      zt3ew(jpj,jpreci,jpk,2), zt3we(jpj,jpreci,jpk,2)  )
+
+      !
       IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value
       ELSE                         ;   zland = 0.e0      ! zero by default
@@ -798,6 +765,6 @@
          iihom = nlci-nreci
          DO jl = 1, jpreci
-            t3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)
-            t3we(:,jl,:,1) = ptab(iihom +jl,:,:)
+            zt3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)
+            zt3we(:,jl,:,1) = ptab(iihom +jl,:,:)
          END DO
       END SELECT
@@ -808,17 +775,17 @@
       SELECT CASE ( nbondi )
       CASE ( -1 )
-         CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req1 )
-         CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )
+         CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req1 )
+         CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       CASE ( 0 )
-         CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )
-         CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req2 )
-         CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )
-         CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 )
+         CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req2 )
+         CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea )
+         CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err)
       CASE ( 1 )
-         CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )
-         CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 )
+         CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       END SELECT
@@ -830,14 +797,14 @@
       CASE ( -1 )
          DO jl = 1, jpreci
-            ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)
+            ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jpreci
-            ptab(jl      ,:,:) = t3we(:,jl,:,2)
-            ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)
+            ptab(jl      ,:,:) = zt3we(:,jl,:,2)
+            ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jpreci
-            ptab(jl      ,:,:) = t3we(:,jl,:,2)
+            ptab(jl      ,:,:) = zt3we(:,jl,:,2)
          END DO
       END SELECT
@@ -851,6 +818,6 @@
          ijhom = nlcj-nrecj
          DO jl = 1, jprecj
-            t3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)
-            t3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)
+            zt3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)
+            zt3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)
          END DO
       ENDIF
@@ -861,17 +828,17 @@
       SELECT CASE ( nbondj )
       CASE ( -1 )
-         CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req1 )
-         CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )
+         CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req1 )
+         CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       CASE ( 0 )
-         CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )
-         CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req2 )
-         CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )
-         CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )
+         CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 )
+         CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req2 )
+         CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono )
+         CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err)
       CASE ( 1 )
-         CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )
-         CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )
+         CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 )
+         CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       END SELECT
@@ -883,14 +850,14 @@
       CASE ( -1 )
          DO jl = 1, jprecj
-            ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)
+            ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jprecj
-            ptab(:,jl      ,:) = t3sn(:,jl,:,2)
-            ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)
+            ptab(:,jl      ,:) = zt3sn(:,jl,:,2)
+            ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jprecj
-            ptab(:,jl,:) = t3sn(:,jl,:,2)
+            ptab(:,jl,:) = zt3sn(:,jl,:,2)
          END DO
       END SELECT
@@ -908,4 +875,6 @@
          !
       ENDIF
+      !
+      DEALLOCATE( zt3ns, zt3sn, zt3ew, zt3we )
       !
    END SUBROUTINE mpp_lnk_3d
@@ -944,6 +913,14 @@
       REAL(wp) ::   zland
       INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend
-      !!----------------------------------------------------------------------
-
+      !
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ns, zt2sn   ! 2d for north-south & south-north
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ew, zt2we   ! 2d for east-west & west-east
+
+      !!----------------------------------------------------------------------
+
+      ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2),  &
+         &      zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2)   )
+
+      !
       IF( PRESENT( pval ) ) THEN   ;   zland = pval      ! set land value
       ELSE                         ;   zland = 0.e0      ! zero by default
@@ -992,6 +969,6 @@
          iihom = nlci-nreci
          DO jl = 1, jpreci
-            t2ew(:,jl,1) = pt2d(jpreci+jl,:)
-            t2we(:,jl,1) = pt2d(iihom +jl,:)
+            zt2ew(:,jl,1) = pt2d(jpreci+jl,:)
+            zt2we(:,jl,1) = pt2d(iihom +jl,:)
          END DO
       END SELECT
@@ -1002,17 +979,17 @@
       SELECT CASE ( nbondi )
       CASE ( -1 )
-         CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req1 )
-         CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )
+         CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 )
+         CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
       CASE ( 0 )
-         CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )
-         CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req2 )
-         CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )
-         CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
+         CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 )
+         CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
+         CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err)
       CASE ( 1 )
-         CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )
-         CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
+         CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
       END SELECT
@@ -1024,14 +1001,14 @@
       CASE ( -1 )
          DO jl = 1, jpreci
-            pt2d(iihom+jl,:) = t2ew(:,jl,2)
+            pt2d(iihom+jl,:) = zt2ew(:,jl,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jpreci
-            pt2d(jl      ,:) = t2we(:,jl,2)
-            pt2d(iihom+jl,:) = t2ew(:,jl,2)
+            pt2d(jl      ,:) = zt2we(:,jl,2)
+            pt2d(iihom+jl,:) = zt2ew(:,jl,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jpreci
-            pt2d(jl      ,:) = t2we(:,jl,2)
+            pt2d(jl      ,:) = zt2we(:,jl,2)
          END DO
       END SELECT
@@ -1045,6 +1022,6 @@
          ijhom = nlcj-nrecj
          DO jl = 1, jprecj
-            t2sn(:,jl,1) = pt2d(:,ijhom +jl)
-            t2ns(:,jl,1) = pt2d(:,jprecj+jl)
+            zt2sn(:,jl,1) = pt2d(:,ijhom +jl)
+            zt2ns(:,jl,1) = pt2d(:,jprecj+jl)
          END DO
       ENDIF
@@ -1055,17 +1032,17 @@
       SELECT CASE ( nbondj )
       CASE ( -1 )
-         CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req1 )
-         CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )
+         CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 )
+         CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
       CASE ( 0 )
-         CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )
-         CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req2 )
-         CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )
-         CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )
+         CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
+         CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 )
+         CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
+         CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2,ml_stat,ml_err)
       CASE ( 1 )
-         CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )
-         CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )
+         CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
+         CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1,ml_stat,ml_err)
       END SELECT
@@ -1077,14 +1054,14 @@
       CASE ( -1 )
          DO jl = 1, jprecj
-            pt2d(:,ijhom+jl) = t2ns(:,jl,2)
+            pt2d(:,ijhom+jl) = zt2ns(:,jl,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jprecj
-            pt2d(:,jl      ) = t2sn(:,jl,2)
-            pt2d(:,ijhom+jl) = t2ns(:,jl,2)
+            pt2d(:,jl      ) = zt2sn(:,jl,2)
+            pt2d(:,ijhom+jl) = zt2ns(:,jl,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jprecj
-            pt2d(:,jl      ) = t2sn(:,jl,2)
+            pt2d(:,jl      ) = zt2sn(:,jl,2)
          END DO
       END SELECT
@@ -1102,4 +1079,6 @@
          !
       ENDIF
+      !
+      DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we )
       !
    END SUBROUTINE mpp_lnk_2d
@@ -1137,5 +1116,12 @@
       INTEGER  ::   ml_req1, ml_req2, ml_err   ! for key_mpi_isend
       INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend
-      !!----------------------------------------------------------------------
+      !
+      REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE ::   zt4ns, zt4sn   ! 2 x 3d for north-south & south-north
+      REAL(wp), DIMENSION(:,:,:,:,:), ALLOCATABLE ::   zt4ew, zt4we   ! 2 x 3d for east-west & west-east
+
+      !!----------------------------------------------------------------------
+      ALLOCATE( zt4ns(jpi,jprecj,jpk,2,2), zt4sn(jpi,jprecj,jpk,2,2) ,    &
+         &      zt4ew(jpj,jpreci,jpk,2,2), zt4we(jpj,jpreci,jpk,2,2) )
+
 
       ! 1. standard boundary treatment
@@ -1171,8 +1157,8 @@
          iihom = nlci-nreci
          DO jl = 1, jpreci
-            t4ew(:,jl,:,1,1) = ptab1(jpreci+jl,:,:)
-            t4we(:,jl,:,1,1) = ptab1(iihom +jl,:,:)
-            t4ew(:,jl,:,2,1) = ptab2(jpreci+jl,:,:)
-            t4we(:,jl,:,2,1) = ptab2(iihom +jl,:,:)
+            zt4ew(:,jl,:,1,1) = ptab1(jpreci+jl,:,:)
+            zt4we(:,jl,:,1,1) = ptab1(iihom +jl,:,:)
+            zt4ew(:,jl,:,2,1) = ptab2(jpreci+jl,:,:)
+            zt4we(:,jl,:,2,1) = ptab2(iihom +jl,:,:)
          END DO
       END SELECT
@@ -1183,17 +1169,17 @@
       SELECT CASE ( nbondi )
       CASE ( -1 )
-         CALL mppsend( 2, t4we(1,1,1,1,1), imigr, noea, ml_req1 )
-         CALL mpprecv( 1, t4ew(1,1,1,1,2), imigr, noea )
+         CALL mppsend( 2, zt4we(1,1,1,1,1), imigr, noea, ml_req1 )
+         CALL mpprecv( 1, zt4ew(1,1,1,1,2), imigr, noea )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       CASE ( 0 )
-         CALL mppsend( 1, t4ew(1,1,1,1,1), imigr, nowe, ml_req1 )
-         CALL mppsend( 2, t4we(1,1,1,1,1), imigr, noea, ml_req2 )
-         CALL mpprecv( 1, t4ew(1,1,1,1,2), imigr, noea )
-         CALL mpprecv( 2, t4we(1,1,1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt4ew(1,1,1,1,1), imigr, nowe, ml_req1 )
+         CALL mppsend( 2, zt4we(1,1,1,1,1), imigr, noea, ml_req2 )
+         CALL mpprecv( 1, zt4ew(1,1,1,1,2), imigr, noea )
+         CALL mpprecv( 2, zt4we(1,1,1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err)
       CASE ( 1 )
-         CALL mppsend( 1, t4ew(1,1,1,1,1), imigr, nowe, ml_req1 )
-         CALL mpprecv( 2, t4we(1,1,1,1,2), imigr, nowe )
+         CALL mppsend( 1, zt4ew(1,1,1,1,1), imigr, nowe, ml_req1 )
+         CALL mpprecv( 2, zt4we(1,1,1,1,2), imigr, nowe )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       END SELECT
@@ -1205,18 +1191,18 @@
       CASE ( -1 )
          DO jl = 1, jpreci
-            ptab1(iihom+jl,:,:) = t4ew(:,jl,:,1,2)
-            ptab2(iihom+jl,:,:) = t4ew(:,jl,:,2,2)
+            ptab1(iihom+jl,:,:) = zt4ew(:,jl,:,1,2)
+            ptab2(iihom+jl,:,:) = zt4ew(:,jl,:,2,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jpreci
-            ptab1(jl      ,:,:) = t4we(:,jl,:,1,2)
-            ptab1(iihom+jl,:,:) = t4ew(:,jl,:,1,2)
-            ptab2(jl      ,:,:) = t4we(:,jl,:,2,2)
-            ptab2(iihom+jl,:,:) = t4ew(:,jl,:,2,2)
+            ptab1(jl      ,:,:) = zt4we(:,jl,:,1,2)
+            ptab1(iihom+jl,:,:) = zt4ew(:,jl,:,1,2)
+            ptab2(jl      ,:,:) = zt4we(:,jl,:,2,2)
+            ptab2(iihom+jl,:,:) = zt4ew(:,jl,:,2,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jpreci
-            ptab1(jl      ,:,:) = t4we(:,jl,:,1,2)
-            ptab2(jl      ,:,:) = t4we(:,jl,:,2,2)
+            ptab1(jl      ,:,:) = zt4we(:,jl,:,1,2)
+            ptab2(jl      ,:,:) = zt4we(:,jl,:,2,2)
          END DO
       END SELECT
@@ -1230,8 +1216,8 @@
          ijhom = nlcj - nrecj
          DO jl = 1, jprecj
-            t4sn(:,jl,:,1,1) = ptab1(:,ijhom +jl,:)
-            t4ns(:,jl,:,1,1) = ptab1(:,jprecj+jl,:)
-            t4sn(:,jl,:,2,1) = ptab2(:,ijhom +jl,:)
-            t4ns(:,jl,:,2,1) = ptab2(:,jprecj+jl,:)
+            zt4sn(:,jl,:,1,1) = ptab1(:,ijhom +jl,:)
+            zt4ns(:,jl,:,1,1) = ptab1(:,jprecj+jl,:)
+            zt4sn(:,jl,:,2,1) = ptab2(:,ijhom +jl,:)
+            zt4ns(:,jl,:,2,1) = ptab2(:,jprecj+jl,:)
          END DO
       ENDIF
@@ -1242,17 +1228,17 @@
       SELECT CASE ( nbondj )
       CASE ( -1 )
-         CALL mppsend( 4, t4sn(1,1,1,1,1), imigr, nono, ml_req1 )
-         CALL mpprecv( 3, t4ns(1,1,1,1,2), imigr, nono )
+         CALL mppsend( 4, zt4sn(1,1,1,1,1), imigr, nono, ml_req1 )
+         CALL mpprecv( 3, zt4ns(1,1,1,1,2), imigr, nono )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       CASE ( 0 )
-         CALL mppsend( 3, t4ns(1,1,1,1,1), imigr, noso, ml_req1 )
-         CALL mppsend( 4, t4sn(1,1,1,1,1), imigr, nono, ml_req2 )
-         CALL mpprecv( 3, t4ns(1,1,1,1,2), imigr, nono )
-         CALL mpprecv( 4, t4sn(1,1,1,1,2), imigr, noso )
+         CALL mppsend( 3, zt4ns(1,1,1,1,1), imigr, noso, ml_req1 )
+         CALL mppsend( 4, zt4sn(1,1,1,1,1), imigr, nono, ml_req2 )
+         CALL mpprecv( 3, zt4ns(1,1,1,1,2), imigr, nono )
+         CALL mpprecv( 4, zt4sn(1,1,1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
          IF(l_isend) CALL mpi_wait(ml_req2, ml_stat, ml_err)
       CASE ( 1 )
-         CALL mppsend( 3, t4ns(1,1,1,1,1), imigr, noso, ml_req1 )
-         CALL mpprecv( 4, t4sn(1,1,1,1,2), imigr, noso )
+         CALL mppsend( 3, zt4ns(1,1,1,1,1), imigr, noso, ml_req1 )
+         CALL mpprecv( 4, zt4sn(1,1,1,1,2), imigr, noso )
          IF(l_isend) CALL mpi_wait(ml_req1, ml_stat, ml_err)
       END SELECT
@@ -1264,18 +1250,18 @@
       CASE ( -1 )
          DO jl = 1, jprecj
-            ptab1(:,ijhom+jl,:) = t4ns(:,jl,:,1,2)
-            ptab2(:,ijhom+jl,:) = t4ns(:,jl,:,2,2)
+            ptab1(:,ijhom+jl,:) = zt4ns(:,jl,:,1,2)
+            ptab2(:,ijhom+jl,:) = zt4ns(:,jl,:,2,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jprecj
-            ptab1(:,jl      ,:) = t4sn(:,jl,:,1,2)
-            ptab1(:,ijhom+jl,:) = t4ns(:,jl,:,1,2)
-            ptab2(:,jl      ,:) = t4sn(:,jl,:,2,2)
-            ptab2(:,ijhom+jl,:) = t4ns(:,jl,:,2,2)
+            ptab1(:,jl      ,:) = zt4sn(:,jl,:,1,2)
+            ptab1(:,ijhom+jl,:) = zt4ns(:,jl,:,1,2)
+            ptab2(:,jl      ,:) = zt4sn(:,jl,:,2,2)
+            ptab2(:,ijhom+jl,:) = zt4ns(:,jl,:,2,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jprecj
-            ptab1(:,jl,:) = t4sn(:,jl,:,1,2)
-            ptab2(:,jl,:) = t4sn(:,jl,:,2,2)
+            ptab1(:,jl,:) = zt4sn(:,jl,:,1,2)
+            ptab2(:,jl,:) = zt4sn(:,jl,:,2,2)
          END DO
       END SELECT
@@ -1296,4 +1282,6 @@
          !
       ENDIF
+      !
+      DEALLOCATE( zt4ns, zt4sn, zt4ew, zt4we )
       !
    END SUBROUTINE mpp_lnk_3d_gather
@@ -2148,6 +2136,13 @@
       INTEGER ::   ml_stat(MPI_STATUS_SIZE)    ! for key_mpi_isend
       REAL(wp), POINTER, DIMENSION(:,:) ::   ztab   ! temporary workspace
+      !
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ns, zt2sn   ! 2d for north-south & south-north
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ew, zt2we   ! 2d for east-west & west-east
       LOGICAL :: lmigr ! is true for those processors that have to migrate the OB
-      !!----------------------------------------------------------------------
+
+      !!----------------------------------------------------------------------
+
+      ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2),   &
+         &      zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2)   )
 
       CALL wrk_alloc( jpi,jpj, ztab )
@@ -2213,6 +2208,6 @@
          IF( nbondi /= 2 ) THEN         ! Read Dirichlet lateral conditions
             iihom = nlci-nreci
-            t2ew(1:jpreci,1,1) = ztab(jpreci+1:nreci, ijpt0)
-            t2we(1:jpreci,1,1) = ztab(iihom+1:iihom+jpreci, ijpt0)
+            zt2ew(1:jpreci,1,1) = ztab(jpreci+1:nreci, ijpt0)
+            zt2we(1:jpreci,1,1) = ztab(iihom+1:iihom+jpreci, ijpt0)
          ENDIF
          !
@@ -2221,17 +2216,17 @@
          !
          IF( nbondi == -1 ) THEN
-            CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req1 )
-            CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )
+            CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 )
+            CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
             IF(l_isend)   CALL mpi_wait( ml_req1, ml_stat, ml_err )
          ELSEIF( nbondi == 0 ) THEN
-            CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )
-            CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req2 )
-            CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )
-            CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )
+            CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
+            CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 )
+            CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
+            CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
             IF(l_isend)   CALL mpi_wait( ml_req1, ml_stat, ml_err )
             IF(l_isend)   CALL mpi_wait( ml_req2, ml_stat, ml_err )
          ELSEIF( nbondi == 1 ) THEN
-            CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )
-            CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )
+            CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
+            CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
             IF(l_isend) CALL mpi_wait( ml_req1, ml_stat, ml_err )
          ENDIF
@@ -2241,8 +2236,8 @@
          !
          IF( nbondi == 0 .OR. nbondi == 1 ) THEN
-            ztab(1:jpreci, ijpt0) = t2we(1:jpreci,1,2)
+            ztab(1:jpreci, ijpt0) = zt2we(1:jpreci,1,2)
          ENDIF
          IF( nbondi == -1 .OR. nbondi == 0 ) THEN
-            ztab(iihom+1:iihom+jpreci, ijpt0) = t2ew(1:jpreci,1,2)
+            ztab(iihom+1:iihom+jpreci, ijpt0) = zt2ew(1:jpreci,1,2)
          ENDIF
        ENDIF  ! (ktype == 1)
@@ -2254,6 +2249,6 @@
          IF( nbondj /= 2 ) THEN         ! Read Dirichlet lateral conditions
             ijhom = nlcj-nrecj
-            t2sn(1:jprecj,1,1) = ztab(iipt0, ijhom+1:ijhom+jprecj)
-            t2ns(1:jprecj,1,1) = ztab(iipt0, jprecj+1:nrecj)
+            zt2sn(1:jprecj,1,1) = ztab(iipt0, ijhom+1:ijhom+jprecj)
+            zt2ns(1:jprecj,1,1) = ztab(iipt0, jprecj+1:nrecj)
          ENDIF
          !
@@ -2262,17 +2257,17 @@
          !
          IF( nbondj == -1 ) THEN
-            CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req1 )
-            CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )
+            CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 )
+            CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
             IF(l_isend) CALL mpi_wait( ml_req1, ml_stat, ml_err )
          ELSEIF( nbondj == 0 ) THEN
-            CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )
-            CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req2 )
-            CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )
-            CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )
+            CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
+            CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 )
+            CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
+            CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
             IF( l_isend )   CALL mpi_wait( ml_req1, ml_stat, ml_err )
             IF( l_isend )   CALL mpi_wait( ml_req2, ml_stat, ml_err )
          ELSEIF( nbondj == 1 ) THEN
-            CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )
-            CALL mpprecv( 4, t2sn(1,1,2), imigr, noso)
+            CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
+            CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso)
             IF( l_isend )   CALL mpi_wait( ml_req1, ml_stat, ml_err )
          ENDIF
@@ -2281,8 +2276,8 @@
          ijhom = nlcj - jprecj
          IF( nbondj == 0 .OR. nbondj == 1 ) THEN
-            ztab(iipt0,1:jprecj) = t2sn(1:jprecj,1,2)
+            ztab(iipt0,1:jprecj) = zt2sn(1:jprecj,1,2)
          ENDIF
          IF( nbondj == 0 .OR. nbondj == -1 ) THEN
-            ztab(iipt0, ijhom+1:ijhom+jprecj) = t2ns(1:jprecj,1,2)
+            ztab(iipt0, ijhom+1:ijhom+jprecj) = zt2ns(1:jprecj,1,2)
          ENDIF
          ENDIF    ! (ktype == 2)
@@ -2304,4 +2299,6 @@
       !
       ENDIF ! ( lmigr )
+      !
+      DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we )
       CALL wrk_dealloc( jpi,jpj, ztab )
       !
@@ -2593,17 +2590,24 @@
       INTEGER                                ::   ml_err             ! for mpi_isend when avoiding mpi_allgather
       INTEGER, DIMENSION(MPI_STATUS_SIZE)    ::   ml_stat            ! for mpi_isend when avoiding mpi_allgather
-      !!----------------------------------------------------------------------
-      !
+      !                                                              ! Workspace for message transfers avoiding mpi_allgather
+      REAL(wp), DIMENSION(:,:,:)  , ALLOCATABLE   :: ztab
+      REAL(wp), DIMENSION(:,:,:)  , ALLOCATABLE   :: znorthloc, zfoldwk      
+      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE   :: znorthgloio
+
+      !!----------------------------------------------------------------------
+      !
+      ALLOCATE( ztab(jpiglo,4,jpk), znorthloc(jpi,4,jpk), zfoldwk(jpi,4,jpk), znorthgloio(jpi,4,jpk,jpni) )
+
       ijpj   = 4
       ityp = -1
       ijpjm1 = 3
-      tab_3d(:,:,:) = 0.e0
-      !
-      DO jj = nlcj - ijpj +1, nlcj          ! put in xnorthloc the last 4 jlines of pt3d
+      ztab(:,:,:) = 0.e0
+      !
+      DO jj = nlcj - ijpj +1, nlcj          ! put in znorthloc the last 4 jlines of pt3d
          ij = jj - nlcj + ijpj
-         xnorthloc(:,ij,:) = pt3d(:,jj,:)
+         znorthloc(:,ij,:) = pt3d(:,jj,:)
       END DO
       !
-      !                                     ! Build in procs of ncomm_north the xnorthgloio
+      !                                     ! Build in procs of ncomm_north the znorthgloio
       itaille = jpi * jpk * ijpj
       IF ( l_north_nogather ) THEN
@@ -2615,5 +2619,5 @@
             ij = jj - nlcj + ijpj
             DO ji = 1, nlci
-               tab_3d(ji+nimpp-1,ij,:) = pt3d(ji,jj,:)
+               ztab(ji+nimpp-1,ij,:) = pt3d(ji,jj,:)
             END DO
          END DO
@@ -2640,8 +2644,8 @@
 
             DO jr = 1,nsndto(ityp)
-               CALL mppsend(5, xnorthloc, itaille, isendto(jr,ityp), ml_req_nf(jr) )
+               CALL mppsend(5, znorthloc, itaille, isendto(jr,ityp), ml_req_nf(jr) )
             END DO
             DO jr = 1,nsndto(ityp)
-               CALL mpprecv(5, foldwk, itaille, isendto(jr,ityp))
+               CALL mpprecv(5, zfoldwk, itaille, isendto(jr,ityp))
                iproc = isendto(jr,ityp) + 1
                ildi = nldit (iproc)
@@ -2650,5 +2654,5 @@
                DO jj = 1, ijpj
                   DO ji = ildi, ilei
-                     tab_3d(ji+iilb-1,jj,:) = foldwk(ji,jj,:)
+                     ztab(ji+iilb-1,jj,:) = zfoldwk(ji,jj,:)
                   END DO
                END DO
@@ -2665,6 +2669,6 @@
 
       IF ( ityp .lt. 0 ) THEN
-         CALL MPI_ALLGATHER( xnorthloc  , itaille, MPI_DOUBLE_PRECISION,                &
-            &                xnorthgloio, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )
+         CALL MPI_ALLGATHER( znorthloc  , itaille, MPI_DOUBLE_PRECISION,                &
+            &                znorthgloio, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )
          !
          DO jr = 1, ndim_rank_north         ! recover the global north array
@@ -2675,5 +2679,5 @@
             DO jj = 1, ijpj
                DO ji = ildi, ilei
-                  tab_3d(ji+iilb-1,jj,:) = xnorthgloio(ji,jj,:,jr)
+                  ztab(ji+iilb-1,jj,:) = znorthgloio(ji,jj,:,jr)
                END DO
             END DO
@@ -2681,5 +2685,5 @@
       ENDIF
       !
-      ! The tab_3d array has been either:
+      ! The ztab array has been either:
       !  a. Fully populated by the mpi_allgather operation or
       !  b. Had the active points for this domain and northern neighbours populated
@@ -2688,12 +2692,14 @@
       ! this domain will be identical.
       !
-      CALL lbc_nfd( tab_3d, cd_type, psgn )   ! North fold boundary condition
+      CALL lbc_nfd( ztab, cd_type, psgn )   ! North fold boundary condition
       !
       DO jj = nlcj-ijpj+1, nlcj             ! Scatter back to pt3d
          ij = jj - nlcj + ijpj
          DO ji= 1, nlci
-            pt3d(ji,jj,:) = tab_3d(ji+nimpp-1,ij,:)
+            pt3d(ji,jj,:) = ztab(ji+nimpp-1,ij,:)
          END DO
       END DO
+      !
+      DEALLOCATE( ztab, znorthloc, zfoldwk, znorthgloio )
       !
    END SUBROUTINE mpp_lbc_north_3d
@@ -2725,17 +2731,23 @@
       INTEGER                            ::   ml_err             ! for mpi_isend when avoiding mpi_allgather
       INTEGER, DIMENSION(MPI_STATUS_SIZE)::   ml_stat            ! for mpi_isend when avoiding mpi_allgather
-      !!----------------------------------------------------------------------
+      !                                                              ! Workspace for message transfers avoiding mpi_allgather
+      REAL(wp), DIMENSION(:,:)  , ALLOCATABLE   :: ztab
+      REAL(wp), DIMENSION(:,:)  , ALLOCATABLE   :: znorthloc, zfoldwk      
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   :: znorthgloio
+      !!----------------------------------------------------------------------
+      !
+      ALLOCATE( ztab(jpiglo,4), znorthloc(jpi,4), zfoldwk(jpi,4), znorthgloio(jpi,4,jpni) )
       !
       ijpj   = 4
       ityp = -1
       ijpjm1 = 3
-      tab_2d(:,:) = 0.e0
-      !
-      DO jj = nlcj-ijpj+1, nlcj             ! put in xnorthloc_2d the last 4 jlines of pt2d
+      ztab(:,:) = 0.e0
+      !
+      DO jj = nlcj-ijpj+1, nlcj             ! put in znorthloc the last 4 jlines of pt2d
          ij = jj - nlcj + ijpj
-         xnorthloc_2d(:,ij) = pt2d(:,jj)
+         znorthloc(:,ij) = pt2d(:,jj)
       END DO
 
-      !                                     ! Build in procs of ncomm_north the xnorthgloio_2d
+      !                                     ! Build in procs of ncomm_north the znorthgloio
       itaille = jpi * ijpj
       IF ( l_north_nogather ) THEN
@@ -2747,5 +2759,5 @@
             ij = jj - nlcj + ijpj
             DO ji = 1, nlci
-               tab_2d(ji+nimpp-1,ij) = pt2d(ji,jj)
+               ztab(ji+nimpp-1,ij) = pt2d(ji,jj)
             END DO
          END DO
@@ -2773,8 +2785,8 @@
 
             DO jr = 1,nsndto(ityp)
-               CALL mppsend(5, xnorthloc_2d, itaille, isendto(jr,ityp), ml_req_nf(jr) )
+               CALL mppsend(5, znorthloc, itaille, isendto(jr,ityp), ml_req_nf(jr) )
             END DO
             DO jr = 1,nsndto(ityp)
-               CALL mpprecv(5, foldwk_2d, itaille, isendto(jr,ityp))
+               CALL mpprecv(5, zfoldwk, itaille, isendto(jr,ityp))
                iproc = isendto(jr,ityp) + 1
                ildi = nldit (iproc)
@@ -2783,5 +2795,5 @@
                DO jj = 1, ijpj
                   DO ji = ildi, ilei
-                     tab_2d(ji+iilb-1,jj) = foldwk_2d(ji,jj)
+                     ztab(ji+iilb-1,jj) = zfoldwk(ji,jj)
                   END DO
                END DO
@@ -2798,6 +2810,6 @@
 
       IF ( ityp .lt. 0 ) THEN
-         CALL MPI_ALLGATHER( xnorthloc_2d  , itaille, MPI_DOUBLE_PRECISION,        &
-            &                xnorthgloio_2d, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )
+         CALL MPI_ALLGATHER( znorthloc  , itaille, MPI_DOUBLE_PRECISION,        &
+            &                znorthgloio, itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )
          !
          DO jr = 1, ndim_rank_north            ! recover the global north array
@@ -2808,5 +2820,5 @@
             DO jj = 1, ijpj
                DO ji = ildi, ilei
-                  tab_2d(ji+iilb-1,jj) = xnorthgloio_2d(ji,jj,jr)
+                  ztab(ji+iilb-1,jj) = znorthgloio(ji,jj,jr)
                END DO
             END DO
@@ -2814,5 +2826,5 @@
       ENDIF
       !
-      ! The tab array has been either:
+      ! The ztab array has been either:
       !  a. Fully populated by the mpi_allgather operation or
       !  b. Had the active points for this domain and northern neighbours populated
@@ -2821,5 +2833,5 @@
       ! this domain will be identical.
       !
-      CALL lbc_nfd( tab_2d, cd_type, psgn )   ! North fold boundary condition
+      CALL lbc_nfd( ztab, cd_type, psgn )   ! North fold boundary condition
       !
       !
@@ -2827,7 +2839,9 @@
          ij = jj - nlcj + ijpj
          DO ji = 1, nlci
-            pt2d(ji,jj) = tab_2d(ji+nimpp-1,ij)
+            pt2d(ji,jj) = ztab(ji+nimpp-1,ij)
          END DO
       END DO
+      !
+      DEALLOCATE( ztab, znorthloc, zfoldwk, znorthgloio )
       !
    END SUBROUTINE mpp_lbc_north_2d
@@ -2857,21 +2871,28 @@
       INTEGER ::   ierr, itaille, ildi, ilei, iilb
       INTEGER ::   ijpj, ij, iproc
-      !!----------------------------------------------------------------------
+      !
+      REAL(wp), DIMENSION(:,:)  , ALLOCATABLE  ::  ztab_e, znorthloc_e
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE  ::  znorthgloio_e
+
+      !!----------------------------------------------------------------------
+      !
+      ALLOCATE( ztab_e(jpiglo,4+2*jpr2dj), znorthloc_e(jpi,4+2*jpr2dj), znorthgloio_e(jpi,4+2*jpr2dj,jpni) )
+
       !
       ijpj=4
-      tab_e(:,:) = 0.e0
+      ztab_e(:,:) = 0.e0
 
       ij=0
-      ! put in xnorthloc_e the last 4 jlines of pt2d
+      ! put in znorthloc_e the last 4 jlines of pt2d
       DO jj = nlcj - ijpj + 1 - jpr2dj, nlcj +jpr2dj
          ij = ij + 1
          DO ji = 1, jpi
-            xnorthloc_e(ji,ij)=pt2d(ji,jj)
+            znorthloc_e(ji,ij)=pt2d(ji,jj)
          END DO
       END DO
       !
       itaille = jpi * ( ijpj + 2 * jpr2dj )
-      CALL MPI_ALLGATHER( xnorthloc_e(1,1)  , itaille, MPI_DOUBLE_PRECISION,    &
-         &                xnorthgloio_e(1,1,1), itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )
+      CALL MPI_ALLGATHER( znorthloc_e(1,1)  , itaille, MPI_DOUBLE_PRECISION,    &
+         &                znorthgloio_e(1,1,1), itaille, MPI_DOUBLE_PRECISION, ncomm_north, ierr )
       !
       DO jr = 1, ndim_rank_north            ! recover the global north array
@@ -2882,5 +2903,5 @@
          DO jj = 1, ijpj+2*jpr2dj
             DO ji = ildi, ilei
-               tab_e(ji+iilb-1,jj) = xnorthgloio_e(ji,jj,jr)
+               ztab_e(ji+iilb-1,jj) = znorthgloio_e(ji,jj,jr)
             END DO
          END DO
@@ -2890,5 +2911,5 @@
       ! 2. North-Fold boundary conditions
       ! ----------------------------------
-      CALL lbc_nfd( tab_e(:,:), cd_type, psgn, pr2dj = jpr2dj )
+      CALL lbc_nfd( ztab_e(:,:), cd_type, psgn, pr2dj = jpr2dj )
 
       ij = jpr2dj
@@ -2897,7 +2918,9 @@
       ij  = ij +1
          DO ji= 1, nlci
-            pt2d(ji,jj) = tab_e(ji+nimpp-1,ij)
+            pt2d(ji,jj) = ztab_e(ji+nimpp-1,ij)
          END DO
       END DO
+      !
+      DEALLOCATE( ztab_e, znorthloc_e, znorthgloio_e )
       !
    END SUBROUTINE mpp_lbc_north_e
@@ -2940,5 +2963,12 @@
       REAL(wp) ::   zland
       INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend
-      !!----------------------------------------------------------------------
+      !
+      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::   zt3ns, zt3sn   ! 3d for north-south & south-north
+      REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::   zt3ew, zt3we   ! 3d for east-west & west-east
+
+      !!----------------------------------------------------------------------
+      
+      ALLOCATE( zt3ns(jpi,jprecj,jpk,2), zt3sn(jpi,jprecj,jpk,2),   &
+         &      zt3ew(jpj,jpreci,jpk,2), zt3we(jpj,jpreci,jpk,2)  )
 
       zland = 0.e0
@@ -2980,6 +3010,6 @@
          iihom = nlci-nreci
          DO jl = 1, jpreci
-            t3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)
-            t3we(:,jl,:,1) = ptab(iihom +jl,:,:)
+            zt3ew(:,jl,:,1) = ptab(jpreci+jl,:,:)
+            zt3we(:,jl,:,1) = ptab(iihom +jl,:,:)
          END DO
       END SELECT
@@ -2990,20 +3020,20 @@
       SELECT CASE ( nbondi_bdy(ib_bdy) )
       CASE ( -1 )
-         CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req1 )
-      CASE ( 0 )
-         CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )
-         CALL mppsend( 2, t3we(1,1,1,1), imigr, noea, ml_req2 )
+         CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req1 )
+      CASE ( 0 )
+         CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 )
+         CALL mppsend( 2, zt3we(1,1,1,1), imigr, noea, ml_req2 )
       CASE ( 1 )
-         CALL mppsend( 1, t3ew(1,1,1,1), imigr, nowe, ml_req1 )
+         CALL mppsend( 1, zt3ew(1,1,1,1), imigr, nowe, ml_req1 )
       END SELECT
       !
       SELECT CASE ( nbondi_bdy_b(ib_bdy) )
       CASE ( -1 )
-         CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )
-      CASE ( 0 )
-         CALL mpprecv( 1, t3ew(1,1,1,2), imigr, noea )
-         CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )
+         CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea )
+      CASE ( 0 )
+         CALL mpprecv( 1, zt3ew(1,1,1,2), imigr, noea )
+         CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe )
       CASE ( 1 )
-         CALL mpprecv( 2, t3we(1,1,1,2), imigr, nowe )
+         CALL mpprecv( 2, zt3we(1,1,1,2), imigr, nowe )
       END SELECT
       !
@@ -3024,14 +3054,14 @@
       CASE ( -1 )
          DO jl = 1, jpreci
-            ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)
+            ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jpreci
-            ptab(jl      ,:,:) = t3we(:,jl,:,2)
-            ptab(iihom+jl,:,:) = t3ew(:,jl,:,2)
+            ptab(jl      ,:,:) = zt3we(:,jl,:,2)
+            ptab(iihom+jl,:,:) = zt3ew(:,jl,:,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jpreci
-            ptab(jl      ,:,:) = t3we(:,jl,:,2)
+            ptab(jl      ,:,:) = zt3we(:,jl,:,2)
          END DO
       END SELECT
@@ -3045,6 +3075,6 @@
          ijhom = nlcj-nrecj
          DO jl = 1, jprecj
-            t3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)
-            t3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)
+            zt3sn(:,jl,:,1) = ptab(:,ijhom +jl,:)
+            zt3ns(:,jl,:,1) = ptab(:,jprecj+jl,:)
          END DO
       ENDIF
@@ -3055,20 +3085,20 @@
       SELECT CASE ( nbondj_bdy(ib_bdy) )
       CASE ( -1 )
-         CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req1 )
-      CASE ( 0 )
-         CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )
-         CALL mppsend( 4, t3sn(1,1,1,1), imigr, nono, ml_req2 )
+         CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req1 )
+      CASE ( 0 )
+         CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 )
+         CALL mppsend( 4, zt3sn(1,1,1,1), imigr, nono, ml_req2 )
       CASE ( 1 )
-         CALL mppsend( 3, t3ns(1,1,1,1), imigr, noso, ml_req1 )
+         CALL mppsend( 3, zt3ns(1,1,1,1), imigr, noso, ml_req1 )
       END SELECT
       !
       SELECT CASE ( nbondj_bdy_b(ib_bdy) )
       CASE ( -1 )
-         CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )
-      CASE ( 0 )
-         CALL mpprecv( 3, t3ns(1,1,1,2), imigr, nono )
-         CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )
+         CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono )
+      CASE ( 0 )
+         CALL mpprecv( 3, zt3ns(1,1,1,2), imigr, nono )
+         CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso )
       CASE ( 1 )
-         CALL mpprecv( 4, t3sn(1,1,1,2), imigr, noso )
+         CALL mpprecv( 4, zt3sn(1,1,1,2), imigr, noso )
       END SELECT
       !
@@ -3089,14 +3119,14 @@
       CASE ( -1 )
          DO jl = 1, jprecj
-            ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)
+            ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jprecj
-            ptab(:,jl      ,:) = t3sn(:,jl,:,2)
-            ptab(:,ijhom+jl,:) = t3ns(:,jl,:,2)
+            ptab(:,jl      ,:) = zt3sn(:,jl,:,2)
+            ptab(:,ijhom+jl,:) = zt3ns(:,jl,:,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jprecj
-            ptab(:,jl,:) = t3sn(:,jl,:,2)
+            ptab(:,jl,:) = zt3sn(:,jl,:,2)
          END DO
       END SELECT
@@ -3114,4 +3144,6 @@
          !
       ENDIF
+      !
+      DEALLOCATE( zt3ns, zt3sn, zt3ew, zt3we  )
       !
    END SUBROUTINE mpp_lnk_bdy_3d
@@ -3154,5 +3186,12 @@
       REAL(wp) ::   zland
       INTEGER, DIMENSION(MPI_STATUS_SIZE) ::   ml_stat   ! for key_mpi_isend
-      !!----------------------------------------------------------------------
+      !
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ns, zt2sn   ! 2d for north-south & south-north
+      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  zt2ew, zt2we   ! 2d for east-west & west-east
+
+      !!----------------------------------------------------------------------
+
+      ALLOCATE( zt2ns(jpi,jprecj,2), zt2sn(jpi,jprecj,2),  &
+         &      zt2ew(jpj,jpreci,2), zt2we(jpj,jpreci,2)   )
 
       zland = 0.e0
@@ -3194,6 +3233,6 @@
          iihom = nlci-nreci
          DO jl = 1, jpreci
-            t2ew(:,jl,1) = ptab(jpreci+jl,:)
-            t2we(:,jl,1) = ptab(iihom +jl,:)
+            zt2ew(:,jl,1) = ptab(jpreci+jl,:)
+            zt2we(:,jl,1) = ptab(iihom +jl,:)
          END DO
       END SELECT
@@ -3204,20 +3243,20 @@
       SELECT CASE ( nbondi_bdy(ib_bdy) )
       CASE ( -1 )
-         CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req1 )
-      CASE ( 0 )
-         CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )
-         CALL mppsend( 2, t2we(1,1,1), imigr, noea, ml_req2 )
+         CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req1 )
+      CASE ( 0 )
+         CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
+         CALL mppsend( 2, zt2we(1,1,1), imigr, noea, ml_req2 )
       CASE ( 1 )
-         CALL mppsend( 1, t2ew(1,1,1), imigr, nowe, ml_req1 )
+         CALL mppsend( 1, zt2ew(1,1,1), imigr, nowe, ml_req1 )
       END SELECT
       !
       SELECT CASE ( nbondi_bdy_b(ib_bdy) )
       CASE ( -1 )
-         CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )
-      CASE ( 0 )
-         CALL mpprecv( 1, t2ew(1,1,2), imigr, noea )
-         CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )
+         CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
+      CASE ( 0 )
+         CALL mpprecv( 1, zt2ew(1,1,2), imigr, noea )
+         CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
       CASE ( 1 )
-         CALL mpprecv( 2, t2we(1,1,2), imigr, nowe )
+         CALL mpprecv( 2, zt2we(1,1,2), imigr, nowe )
       END SELECT
       !
@@ -3238,14 +3277,14 @@
       CASE ( -1 )
          DO jl = 1, jpreci
-            ptab(iihom+jl,:) = t2ew(:,jl,2)
+            ptab(iihom+jl,:) = zt2ew(:,jl,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jpreci
-            ptab(jl      ,:) = t2we(:,jl,2)
-            ptab(iihom+jl,:) = t2ew(:,jl,2)
+            ptab(jl      ,:) = zt2we(:,jl,2)
+            ptab(iihom+jl,:) = zt2ew(:,jl,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jpreci
-            ptab(jl      ,:) = t2we(:,jl,2)
+            ptab(jl      ,:) = zt2we(:,jl,2)
          END DO
       END SELECT
@@ -3259,6 +3298,6 @@
          ijhom = nlcj-nrecj
          DO jl = 1, jprecj
-            t2sn(:,jl,1) = ptab(:,ijhom +jl)
-            t2ns(:,jl,1) = ptab(:,jprecj+jl)
+            zt2sn(:,jl,1) = ptab(:,ijhom +jl)
+            zt2ns(:,jl,1) = ptab(:,jprecj+jl)
          END DO
       ENDIF
@@ -3269,20 +3308,20 @@
       SELECT CASE ( nbondj_bdy(ib_bdy) )
       CASE ( -1 )
-         CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req1 )
-      CASE ( 0 )
-         CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )
-         CALL mppsend( 4, t2sn(1,1,1), imigr, nono, ml_req2 )
+         CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req1 )
+      CASE ( 0 )
+         CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
+         CALL mppsend( 4, zt2sn(1,1,1), imigr, nono, ml_req2 )
       CASE ( 1 )
-         CALL mppsend( 3, t2ns(1,1,1), imigr, noso, ml_req1 )
+         CALL mppsend( 3, zt2ns(1,1,1), imigr, noso, ml_req1 )
       END SELECT
       !
       SELECT CASE ( nbondj_bdy_b(ib_bdy) )
       CASE ( -1 )
-         CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )
-      CASE ( 0 )
-         CALL mpprecv( 3, t2ns(1,1,2), imigr, nono )
-         CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )
+         CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
+      CASE ( 0 )
+         CALL mpprecv( 3, zt2ns(1,1,2), imigr, nono )
+         CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
       CASE ( 1 )
-         CALL mpprecv( 4, t2sn(1,1,2), imigr, noso )
+         CALL mpprecv( 4, zt2sn(1,1,2), imigr, noso )
       END SELECT
       !
@@ -3303,14 +3342,14 @@
       CASE ( -1 )
          DO jl = 1, jprecj
-            ptab(:,ijhom+jl) = t2ns(:,jl,2)
+            ptab(:,ijhom+jl) = zt2ns(:,jl,2)
          END DO
       CASE ( 0 )
          DO jl = 1, jprecj
-            ptab(:,jl      ) = t2sn(:,jl,2)
-            ptab(:,ijhom+jl) = t2ns(:,jl,2)
+            ptab(:,jl      ) = zt2sn(:,jl,2)
+            ptab(:,ijhom+jl) = zt2ns(:,jl,2)
          END DO
       CASE ( 1 )
          DO jl = 1, jprecj
-            ptab(:,jl) = t2sn(:,jl,2)
+            ptab(:,jl) = zt2sn(:,jl,2)
          END DO
       END SELECT
@@ -3328,4 +3367,6 @@
          !
       ENDIF
+      !
+      DEALLOCATE( zt2ns, zt2sn, zt2ew, zt2we  )
       !
    END SUBROUTINE mpp_lnk_bdy_2d
