Index: /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/BDY/bdyini.F90
===================================================================
--- /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/BDY/bdyini.F90	(revision 13251)
+++ /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/BDY/bdyini.F90	(revision 13252)
@@ -1378,8 +1378,6 @@
          DO ji = 1, jpi
             DO jj = 1, jpj             
-              IF (((ji + nimpp - 1) == jpiwob(ib)).AND. & 
-               &  ((jj + njmpp - 1) == jpjwdt(ib))) ztestmask(1)=tmask(ji,jj,1)
-              IF (((ji + nimpp - 1) == jpiwob(ib)).AND. & 
-               &  ((jj + njmpp - 1) == jpjwft(ib))) ztestmask(2)=tmask(ji,jj,1)  
+              IF( mig(ji) == jpiwob(ib) .AND. mjg(jj) == jpjwdt(ib) )   ztestmask(1) = tmask(ji,jj,1)
+              IF( mig(ji) == jpiwob(ib) .AND. mjg(jj) == jpjwft(ib) )   ztestmask(2) = tmask(ji,jj,1)  
             END DO
          END DO
@@ -1416,8 +1414,6 @@
          DO ji = 1, jpi
             DO jj = 1, jpj             
-              IF (((ji + nimpp - 1) == jpieob(ib)+1).AND. & 
-               &  ((jj + njmpp - 1) == jpjedt(ib))) ztestmask(1)=tmask(ji,jj,1)
-              IF (((ji + nimpp - 1) == jpieob(ib)+1).AND. & 
-               &  ((jj + njmpp - 1) == jpjeft(ib))) ztestmask(2)=tmask(ji,jj,1)  
+              IF( mig(ji) == jpieob(ib)+1 .AND. mjg(jj) == jpjedt(ib) )   ztestmask(1) = tmask(ji,jj,1)
+              IF( mig(ji) == jpieob(ib)+1 .AND. mjg(jj) == jpjeft(ib) )   ztestmask(2) = tmask(ji,jj,1)  
             END DO
          END DO
@@ -1454,8 +1450,6 @@
          DO ji = 1, jpi
             DO jj = 1, jpj             
-              IF (((jj + njmpp - 1) == jpjsob(ib)).AND. & 
-               &  ((ji + nimpp - 1) == jpisdt(ib))) ztestmask(1)=tmask(ji,jj,1)
-              IF (((jj + njmpp - 1) == jpjsob(ib)).AND. & 
-               &  ((ji + nimpp - 1) == jpisft(ib))) ztestmask(2)=tmask(ji,jj,1)  
+              IF( mjg(jj) == jpjsob(ib) .AND. mig(ji) == jpisdt(ib) )   ztestmask(1) = tmask(ji,jj,1)
+              IF( mjg(jj) == jpjsob(ib) .AND. mig(ji) == jpisft(ib) )   ztestmask(2) = tmask(ji,jj,1)  
             END DO
          END DO
@@ -1478,8 +1472,6 @@
          DO ji = 1, jpi
             DO jj = 1, jpj             
-              IF (((jj + njmpp - 1) == jpjnob(ib)+1).AND. & 
-               &  ((ji + nimpp - 1) == jpindt(ib))) ztestmask(1)=tmask(ji,jj,1)
-              IF (((jj + njmpp - 1) == jpjnob(ib)+1).AND. & 
-               &  ((ji + nimpp - 1) == jpinft(ib))) ztestmask(2)=tmask(ji,jj,1)  
+               IF( mjg(jj) == jpjnob(ib)+1 .AND. mig(ji) == jpindt(ib) )   ztestmask(1) = tmask(ji,jj,1)
+               IF( mjg(jj) == jpjnob(ib)+1 .AND. mig(ji) == jpinft(ib) )   ztestmask(2) = tmask(ji,jj,1)  
             END DO
          END DO
Index: /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/lbc_nfd_generic.h90
===================================================================
--- /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/lbc_nfd_generic.h90	(revision 13251)
+++ /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/lbc_nfd_generic.h90	(revision 13252)
@@ -150,5 +150,5 @@
                         ARRAY_IN(ii1,ij1,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ii2,ij2,jk,jl,jf)
                      END DO
-                     !                            ! points jpiglo - nn_hls + 1 to jpiglo : have been / will done by e-w periodicity 
+                     !                            ! last nn_hls-1 points: have been / will done by e-w periodicity 
                   END DO
                   !
@@ -195,5 +195,5 @@
                         ARRAY_IN(ii1,ij1,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ii2,ij2,jk,jl,jf)
                      END DO
-                     !                            ! points jpiglo - nn_hls + 1 to jpiglo : have been / will done by e-w periodicity 
+                     !                            ! last nn_hls-1 points: have been / will done by e-w periodicity 
                   END DO
                   !
@@ -392,5 +392,5 @@
                         ARRAY_IN(ii1,ij1,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ii2,ij2,jk,jl,jf)
                      END DO
-                     !                            ! points jpiglo - nn_hls + 1 to jpiglo : have been / will done by e-w periodicity 
+                     !                            ! last nn_hls points: have been / will done by e-w periodicity 
                   END DO
                   !
@@ -447,5 +447,5 @@
                         ARRAY_IN(ii1,ij1,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ii2,ij2,jk,jl,jf)
                      END DO
-                     !                            ! points jpiglo - nn_hls + 1 to jpiglo : have been / will done by e-w periodicity 
+                     !                            ! last nn_hls points: have been / will done by e-w periodicity 
                   END DO
                   !
Index: /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mpp_nfd_generic.h90
===================================================================
--- /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mpp_nfd_generic.h90	(revision 13251)
+++ /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/LBC/mpp_nfd_generic.h90	(revision 13252)
@@ -85,8 +85,9 @@
       LOGICAL  ::   ll_add_line
       INTEGER  ::   ji,  jj,  jk,  jl, jh, jf, jr   ! dummy loop indices
-      INTEGER  ::   ipi, ipk, ipl, ipf         ! dimension of the input array
+      INTEGER  ::   ipi, ipj, ipj2, ipk, ipl, ipf   ! dimension of the input array
       INTEGER  ::   imigr, iihom, ijhom             ! local integers
-      INTEGER  ::   ierr, ibuffsize, ijpi, iis0, iie0, iilb
-      INTEGER  ::   ijbs, ijbe, ipimax2
+      INTEGER  ::   ierr, ibuffsize, iis0, iie0, impp
+      INTEGER  ::   ii1, ii2, ij1, ij2
+      INTEGER  ::   ipimax, i0max
       INTEGER  ::   ij, iproc, ipni
       INTEGER, DIMENSION (jpmaxngh)       ::   ml_req_nf   ! for mpi_isend when avoiding mpi_allgather
@@ -95,5 +96,4 @@
       !                                                    ! Workspace for message transfers avoiding mpi_allgather
       INTEGER                             ::   ipj_b       ! sum of lines for all multi fields
-      INTEGER                             ::   ijs, ijb    ! j-counter for send and buffer
       INTEGER                             ::   i012        ! 0, 1 or 2
       INTEGER , DIMENSION(:,:)        , ALLOCATABLE ::   jj_s  ! position of sent lines
@@ -101,6 +101,6 @@
       INTEGER , DIMENSION(:)          , ALLOCATABLE ::   ipj_s ! number of sent lines
       REAL(PRECISION), DIMENSION(:,:,:,:)    , ALLOCATABLE ::   ztabb, ztabr, ztabw  ! buffer, receive and work arrays
-      REAL(PRECISION), DIMENSION(:,:,:,:,:)  , ALLOCATABLE ::   ztab, znorthloc
-      REAL(PRECISION), DIMENSION(:,:,:,:,:,:), ALLOCATABLE ::   znorthgloio
+      REAL(PRECISION), DIMENSION(:,:,:,:,:)  , ALLOCATABLE ::   ztabglo, znorthloc
+      REAL(PRECISION), DIMENSION(:,:,:,:,:,:), ALLOCATABLE ::   znorthglo
       !!----------------------------------------------------------------------
       !
@@ -145,10 +145,10 @@
          ENDIF
          
-         ijpj  = MAXVAL(ipj_s(:))            ! Max 2nd dimension of message transfers (last two j-line only)
+         ipj   = MAXVAL(ipj_s(:))            ! Max 2nd dimension of message transfers
          ipj_b = SUM(   ipj_s(:))            ! Total number of lines to be exchanged
-         ALLOCATE( jj_s(ijpj, ipf), jj_b(ijpj, ipf) )
+         ALLOCATE( jj_s(ipj, ipf), jj_b(ipj, ipf) )
 
          ! Index of modifying lines in input
-         ijb = 0
+         ij1 = 0
          DO jf = 1, ipf                      ! Loop over the number of arrays to be processed
             !
@@ -167,6 +167,6 @@
                !
             DO jj = 1, ipj_s(jf)
-               ijb = ijb + 1
-               jj_b(jj,jf) = ijb
+               ij1 = ij1 + 1
+               jj_b(jj,jf) = ij1
                jj_s(jj,jf) = jpj - 2*nn_hls + jj - i012
             END DO
@@ -179,8 +179,12 @@
          DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk
             DO jj = 1, ipj_s(jf)
-               ijb = jj_b(jj,jf)
-               ijs = jj_s(jj,jf)
-               ztabb(    1:jpi   ,ijb,jk,jl) = ARRAY_IN(1:jpi,ijs,jk,jl,jf)
-               ztabb(jpi+1:jpimax,ijb,jk,jl) = 0._wp  ! needed? to avoid sending uninitialized values
+               ij1 = jj_b(jj,jf)
+               ij2 = jj_s(jj,jf)
+               DO ji = 1, jpi
+                  ztabb(ji,ij1,jk,jl) = ARRAY_IN(ji,ij2,jk,jl,jf)
+               END DO
+               DO ji = jpi+1, jpimax
+                  ztabb(ji,ij1,jk,jl) = HUGE(0._wp)   ! avoid sending uninitialized values (make sure we don't use it)
+               END DO
             END DO
          END DO   ;   END DO   ;   END DO
@@ -197,6 +201,6 @@
          END DO
          !
-         ipimax2 = jpimax * jpmaxngh
-         ALLOCATE( ztabw(jpimax,ipj_b,ipk,ipl), ztabr(ipimax2,ipj_b,ipk,ipl) ) 
+         ipimax = jpimax * jpmaxngh
+         ALLOCATE( ztabw(jpimax,ipj_b,ipk,ipl), ztabr(ipimax,ipj_b,ipk,ipl) ) 
          !
          DO jr = 1, nsndto
@@ -204,13 +208,13 @@
             ipni  = isendto(jr)
             iproc = nfproc(ipni)
-            ijpi  = nfjpi (ipni)
-            !
-            IF( ipni ==   1  ) THEN   ;   iis0 =   1             ! domain  left side: as e-w comm already done -> from 1st column
-            ELSE                      ;   iis0 =   1  + nn_hls   ! default: -> from inner domain 
-            ENDIF
-            IF( ipni == jpni ) THEN   ;   iie0 = ijpi            ! domain right side: as e-w comm already done -> until last column
-            ELSE                      ;   iie0 = ijpi - nn_hls   ! default: -> until inner domain 
-            ENDIF
-            iilb = nfimpp(ipni) - nfimpp(isendto(1))
+            ipi   = nfjpi (ipni)
+            !
+            IF( ipni ==   1  ) THEN   ;   iis0 =   1            ! domain  left side: as e-w comm already done -> from 1st column
+            ELSE                      ;   iis0 =   1 + nn_hls   ! default: -> from inner domain 
+            ENDIF
+            IF( ipni == jpni ) THEN   ;   iie0 = ipi            ! domain right side: as e-w comm already done -> until last column
+            ELSE                      ;   iie0 = ipi - nn_hls   ! default: -> until inner domain 
+            ENDIF
+            impp = nfimpp(ipni) - nfimpp(isendto(1))
             !
             IF(           iproc == -1 ) THEN   ! No neighbour (land proc that was suppressed)
@@ -221,8 +225,8 @@
                   DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk
                      DO jj = 1, ipj_s(jf)
-                        ijb = jj_b(jj,jf)
-                        ijs = jj_s(jj,jf)
+                        ij1 = jj_b(jj,jf)
+                        ij2 = jj_s(jj,jf)
                         DO ji = iis0, iie0
-                           ztabr(iilb+ji,ijb,jk,jl) = ARRAY_IN(nn_hls+1,ijs,jk,jl,jf)   ! chose to take the 1st iner domain point
+                           ztabr(impp+ji,ij1,jk,jl) = ARRAY_IN(Nis0,ij2,jk,jl,jf)   ! chose to take the 1st iner domain point
                         END DO
                      END DO
@@ -232,5 +236,5 @@
                      DO jj = 1, ipj_b
                         DO ji = iis0, iie0
-                           ztabr(iilb+ji,jj,jk,jl) = pfillval
+                           ztabr(impp+ji,jj,jk,jl) = pfillval
                         END DO
                      END DO
@@ -242,8 +246,8 @@
                DO jf = 1, ipf   ;   DO jl = 1, ipl  ;   DO jk = 1, ipk
                   DO jj = 1, ipj_s(jf)
-                     ijb = jj_b(jj,jf)
-                     ijs = jj_s(jj,jf)
+                     ij1 = jj_b(jj,jf)
+                     ij2 = jj_s(jj,jf)
                      DO ji = iis0, iie0
-                        ztabr(iilb+ji,ijb,jk,jl) = ARRAY_IN(ji,ijs,jk,jl,jf)
+                        ztabr(impp+ji,ij1,jk,jl) = ARRAY_IN(ji,ij2,jk,jl,jf)
                      END DO
                   END DO
@@ -256,5 +260,5 @@
                   DO jj = 1, ipj_b
                      DO ji = iis0, iie0
-                        ztabr(iilb+ji,jj,jk,jl) = ztabw(ji,jj,jk,jl)
+                        ztabr(impp+ji,jj,jk,jl) = ztabw(ji,jj,jk,jl)
                      END DO
                   END DO
@@ -262,5 +266,6 @@
                
             ENDIF
-         END DO
+            !
+         END DO   ! nsndto
          !
          IF( ln_timing ) CALL tic_tac(.FALSE.)
@@ -269,7 +274,7 @@
          !
          DO jf = 1, ipf
-            ijbs = jj_b(       1 ,jf)
-            ijbe = jj_b(ipj_s(jf),jf)
-            CALL lbc_nfd_nogather( ARRAY_IN(:,:,:,:,jf), ztabr(:,ijbs:ijbe,:,:), cd_nat LBC_ARG, psgn LBC_ARG )
+            ij1 = jj_b(       1 ,jf)
+            ij2 = jj_b(ipj_s(jf),jf)
+            CALL lbc_nfd_nogather( ARRAY_IN(:,:,:,:,jf), ztabr(:,ij1:ij2,:,:), cd_nat LBC_ARG, psgn LBC_ARG )
          END DO
          !
@@ -286,78 +291,103 @@
       ELSE                             !==  allgather exchanges  ==!
          !
-         ijpj   = 4            ! 2nd dimension of message transfers (last j-lines)
-         !
-         ALLOCATE( znorthloc(jpimax,ijpj,ipk,ipl,ipf) )
-         !
-         DO jf = 1, ipf                ! put in znorthloc the last ijpj j-lines of ptab
-            DO jl = 1, ipl
-               DO jk = 1, ipk
-                  DO jj = jpj - ijpj +1, jpj
-                     ij = jj - jpj + ijpj
-                     znorthloc(1:jpi,ij,jk,jl,jf) = ARRAY_IN(1:jpi,jj,jk,jl,jf)
-                  END DO
+         ! how many lines do we exchange at max? -> ipj    (no further optimizations in this case...)
+         ipj =      nn_hls + 2
+         ! how many lines do we     need at max? -> ipj2   (no further optimizations in this case...)
+         ipj2 = 2 * nn_hls + 2
+         !
+         i0max = jpimax - 2 * nn_hls
+         ibuffsize = i0max * ipj * ipk * ipl * ipf
+         ALLOCATE( znorthloc(i0max,ipj,ipk,ipl,ipf), znorthglo(i0max,ipj,ipk,ipl,ipf,jpni) )
+         !
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk               ! put in znorthloc ipj j-lines of ptab
+            DO jj = 1, ipj
+               ij2 = jpj - ipj2 + jj                        ! the first ipj lines of the last ipj2 lines
+               DO ji = 1, Ni_0
+                  ii2 = Nis0 - 1 + ji                       ! inner domain: Nis0 to Nie0
+                  znorthloc(ji,jj,jk,jl,jf) = ARRAY_IN(ii2,ij2,jk,jl,jf)
+               END DO
+               DO ji = Nie0+1, i0max
+                  znorthloc(ji,jj,jk,jl,jf) = HUGE(0._wp)   ! avoid sending uninitialized values (make sure we don't use it)
                END DO
             END DO
-         END DO
-         !
-         ibuffsize = jpimax * ijpj * ipk * ipl * ipf
-         !
-         ALLOCATE( ztab       (jpiglo,ijpj,ipk,ipl,ipf     ) )
-         ALLOCATE( znorthgloio(jpimax,ijpj,ipk,ipl,ipf,jpni) )
-         !
-         ! when some processors of the north fold are suppressed,
-         ! values of ztab* arrays corresponding to these suppressed domain won't be defined
-         ! and we need a default definition to 0.
-         ! a better test should be: a testing if "suppressed land-processors" belongs to the north-pole folding
-         IF ( jpni*jpnj /= jpnij ) ztab(:,:,:,:,:) = 0._wp
+         END DO   ;   END DO   ;   END DO
          !
          ! start waiting time measurement
          IF( ln_timing ) CALL tic_tac(.TRUE.)
-         CALL MPI_ALLGATHER( znorthloc  , ibuffsize, MPI_TYPE,                &
-            &                znorthgloio, ibuffsize, MPI_TYPE, ncomm_north, ierr )
-         !
+         CALL MPI_ALLGATHER( znorthloc, ibuffsize, MPI_TYPE, znorthglo, ibuffsize, MPI_TYPE, ncomm_north, ierr )
          ! stop waiting time measurement
          IF( ln_timing ) CALL tic_tac(.FALSE.)
-         !
-         DO jr = 1, ndim_rank_north         ! recover the global north array
-            iproc = nrank_north(jr) + 1
-            iilb  =  nimppt(iproc)
-            ijpi  =  jpiall(iproc)
-            iis0  = nis0all(iproc)
-            iie0  = nie0all(iproc)
-            IF( iilb            ==      1 )   iis0 = 1      ! e-w boundary already done -> force to take all from 1st column
-            IF( iilb + ijpi - 1 == jpiglo )   iie0 = ijpi   ! e-w boundary already done -> force to take all until last column
-            DO jf = 1, ipf
-               DO jl = 1, ipl
-                  DO jk = 1, ipk
-                     DO jj = 1, ijpj
-                        DO ji = iis0, iie0
-                           ztab(ji+iilb-1,jj,jk,jl,jf) = znorthgloio(ji,jj,jk,jl,jf,jr)
+         DEALLOCATE( znorthloc )
+         ALLOCATE( ztabglo(jpiglo,ipj2,ipk,ipl,ipf) )
+         !
+         ! need to fill only the first ipj lines of ztabglo as lbc_nfd don't use the last nn_hls lines
+         DO jr = 1, jpni                                                        ! recover the global north array
+            iproc = nfproc(jr)
+            impp  = nfimpp(jr)
+            ipi   = nfjpi( jr) - 2 * nn_hls                       ! corresponds to Ni_0 but for subdomain iproc
+            IF( iproc == -1 ) THEN   ! No neighbour (land proc that was suppressed)
+              !
+               SELECT CASE ( kfillmode )
+               CASE ( jpfillnothing )               ! no filling 
+               CASE ( jpfillcopy    )               ! filling with inner domain values
+                  DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk
+                     DO jj = 1, ipj
+                        ij2 = jpj - ipj2 + jj                    ! the first ipj lines of the last ipj2 lines
+                        DO ji = 1, ipi
+                           ii1 = impp + nn_hls + ji - 1          ! corresponds to mig(nn_hls + ji) but for subdomain iproc
+                           ztabglo(ii1,jj,jk,jl,jf) = ARRAY_IN(Nis0,ij2,jk,jl,jf)   ! chose to take the 1st iner domain point
                         END DO
                      END DO
+                  END DO   ;   END DO   ;   END DO
+               CASE ( jpfillcst     )               ! filling with constant value
+                  DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk
+                     DO jj = 1, ipj
+                        DO ji = 1, ipi
+                           ii1 = impp + nn_hls + ji - 1          ! corresponds to mig(nn_hls + ji) but for subdomain iproc
+                           ztabglo(ii1,jj,jk,jl,jf) = pfillval
+                        END DO
+                     END DO
+                 END DO   ;   END DO   ;   END DO
+               END SELECT
+               !
+            ELSE
+               DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk
+                  DO jj = 1, ipj
+                     DO ji = 1, ipi
+                        ii1 = impp + nn_hls + ji - 1             ! corresponds to mig(nn_hls + ji) but for subdomain iproc
+                        ztabglo(ii1,jj,jk,jl,jf) = znorthglo(ji,jj,jk,jl,jf,jr)
+                     END DO
                   END DO
+               END DO   ;   END DO   ;   END DO
+            ENDIF
+            !
+         END DO   ! jpni
+         DEALLOCATE( znorthglo )
+         !
+         DO jf = 1, ipf
+            CALL lbc_nfd( ztabglo(:,:,:,:,jf), cd_nat LBC_ARG, psgn LBC_ARG )   ! North fold boundary condition
+            DO jl = 1, ipl   ;   DO jk = 1, ipk                  ! e-w periodicity
+               DO jj = 1, nn_hls + 1
+                  ij1 = ipj2 - (nn_hls + 1) + jj                 ! need only the last nn_hls + 1 lines until ipj2
+                  ztabglo(              1:nn_hls,ij1,jk,jl,jf) = ztabglo(jpiglo-2*nn_hls+1:jpiglo-nn_hls,ij1,jk,jl,jf)
+                  ztabglo(jpiglo-nn_hls+1:jpiglo,ij1,jk,jl,jf) = ztabglo(         nn_hls+1:     2*nn_hls,ij1,jk,jl,jf)
+               END DO
+            END DO   ;   END DO
+         END DO     
+         !
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk               ! Scatter back to ARRAY_IN
+            DO jj = 1, nn_hls + 1
+               ij1 = jpj  - (nn_hls + 1) + jj   ! last nn_hls + 1 lines until jpj
+               ij2 = ipj2 - (nn_hls + 1) + jj   ! last nn_hls + 1 lines until ipj2
+               DO ji= 1, jpi
+                  ii2 = mig(ji)
+                  ARRAY_IN(ji,ij1,jk,jl,jf) = ztabglo(ii2,ij2,jk,jl,jf)
                END DO
             END DO
-         END DO
-         DO jf = 1, ipf
-            CALL lbc_nfd( ztab(:,:,:,:,jf), cd_nat LBC_ARG, psgn LBC_ARG )   ! North fold boundary condition
-         END DO
-         !
-         DO jf = 1, ipf
-            DO jl = 1, ipl
-               DO jk = 1, ipk
-                  DO jj = jpj-ijpj+1, jpj             ! Scatter back to ARRAY_IN
-                     ij = jj - jpj + ijpj
-                     DO ji= 1, jpi
-                        ARRAY_IN(ji,jj,jk,jl,jf) = ztab(ji+nimpp-1,ij,jk,jl,jf)
-                     END DO
-                  END DO
-               END DO
-            END DO
-         END DO
-         !
-      !
-         DEALLOCATE( ztab, znorthgloio, znorthloc )
-      ENDIF
+         END DO   ;   END DO   ;   END DO
+         !
+         DEALLOCATE( ztabglo )
+         !
+      ENDIF   ! l_north_nogather
       !
    END SUBROUTINE ROUTINE_NFD
Index: /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/nemogcm.F90
===================================================================
--- /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/nemogcm.F90	(revision 13251)
+++ /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OCE/nemogcm.F90	(revision 13252)
@@ -47,5 +47,4 @@
    USE usrdef_nam     ! user defined configuration
    USE tide_mod, ONLY : tide_init ! tidal components initialization   (tide_init routine)
-   USE bdy_oce,  ONLY : ln_bdy
    USE bdyini         ! open boundary cond. setting       (bdy_init routine)
    USE istate         ! initial state setting          (istate_init routine)
Index: /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OFF/nemogcm.F90
===================================================================
--- /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OFF/nemogcm.F90	(revision 13251)
+++ /NEMO/branches/2020/dev_r12558_HPC-08_epico_Extra_Halo/src/OFF/nemogcm.F90	(revision 13252)
@@ -31,6 +31,5 @@
    USE domqco         ! tools for scale factor         (dom_qco_r3c  routine)
 #endif
-   USE bdy_oce,  ONLY : ln_bdy
-   USE bdyini         ! open boundary cond. setting       (bdy_init routine)
+   USE bdyini         ! open boundary cond. setting        (bdy_init routine)
    !              ! ocean physics
    USE ldftra         ! lateral diffusivity setting    (ldf_tra_init routine)
