Index: NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_neicoll_generic.h90
===================================================================
--- NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_neicoll_generic.h90	(revision 14339)
+++ NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_neicoll_generic.h90	(revision 14343)
@@ -39,4 +39,5 @@
       INTEGER  ::   idx
       INTEGER  ::   impi_nc
+      INTEGER  ::   ifill_nfd
       INTEGER, DIMENSION(4)  ::   iwewe, issnn
       INTEGER, DIMENSION(8)  ::   isizei, ishtsi, ishtri, ishtpi
@@ -109,6 +110,12 @@
       ! north fold treatment
       ll_IdoNFold = l_IdoNFold .AND. ifill(jpno) /= jpfillnothing
-      IF( ll_IdoNFold )   ifill( (/jpno,jpnw,jpne/) ) = jpfillnothing   ! we do north fold -> do nothing for northern halos
+      IF( ll_IdoNFold ) THEN
+         ifill_nfd = ifill(jpno)             ! if we are here, this means llrecv(jpno) = .false. and l_SelfPerio(jpno) = .false.
+         ifill( (/jpno/) ) = jpfillnothing   ! we do north fold -> do nothing for northern halo
+      ENDIF
       
+      ! We first define the localization and size of the parts of the array that will be sent (s), received (r)
+      ! or used for periodocity (p). The localization is defined as "the bottom left corner - 1" in i and j directions.
+      ! This is a shift that will be applied later in the do loops to pick-up the appropriate part of the array
       !                    !                       ________________________
       ip0i =          0    !          im0j = inner |__|________________|__|
Index: NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90
===================================================================
--- NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90	(revision 14339)
+++ NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_lnk_pt2pt_generic.h90	(revision 14343)
@@ -34,5 +34,5 @@
       INTEGER  ::   ip0j, ip1j, im0j, im1j
       INTEGER  ::   ishti, ishtj, ishti2, ishtj2
-      INTEGER  ::   icomm, ierr
+      INTEGER  ::   ifill_nfd, icomm, ierr
       INTEGER  ::   idxs, idxr
       INTEGER, DIMENSION(4)  ::   isizei, ishtsi, ishtri, ishtpi
@@ -90,6 +90,12 @@
       ! north fold treatment
       ll_IdoNFold = l_IdoNFold .AND. ifill(jpno) /= jpfillnothing
-      IF( ll_IdoNFold )   ifill( (/jpno/) ) = jpfillnothing   ! we do north fold -> do nothing for northern halo
+      IF( ll_IdoNFold ) THEN
+         ifill_nfd = ifill(jpno)             ! if we are here, this means llrecv(jpno) = .false. and l_SelfPerio(jpno) = .false.
+         ifill( (/jpno/) ) = jpfillnothing   ! we do north fold -> do nothing for northern halo
+      ENDIF
       
+      ! We first define the localization and size of the parts of the array that will be sent (s), received (r)
+      ! or used for periodocity (p). The localization is defined as "the bottom left corner - 1" in i and j directions.
+      ! This is a shift that will be applied later in the do loops to pick-up the appropriate part of the array
       !                    !                       ________________________
       ip0i =          0    !          im0j = inner |__|__|__________|__|__|
@@ -207,6 +213,6 @@
       !
       IF( ll_IdoNFold ) THEN
-         IF( jpni == 1 )  THEN   ;   CALL lbc_nfd( ptab, cd_nat, psgn                    , ipf )   ! self NFold
-         ELSE                    ;   CALL mpp_nfd( ptab, cd_nat, psgn, ifill(jpno), zland, ipf )   ! mpi  NFold
+         IF( jpni == 1 )  THEN   ;   CALL lbc_nfd( ptab, cd_nat, psgn                  , ipf )   ! self NFold
+         ELSE                    ;   CALL mpp_nfd( ptab, cd_nat, psgn, ifill_nfd, zland, ipf )   ! mpi  NFold
          ENDIF
       ENDIF
Index: NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_nogather_generic.h90
===================================================================
--- NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_nogather_generic.h90	(revision 14339)
+++ NEMO/branches/2021/dev_r14312_MPI_Interface/src/OCE/LBC/lbc_nfd_nogather_generic.h90	(revision 14343)
@@ -42,9 +42,5 @@
       !
       ! 2nd dimension determines exchange speed
-      IF ( SIZE(ptab2,2) == 1 ) THEN
-        l_fast_exchanges = .TRUE.
-      ELSE
-        l_fast_exchanges = .FALSE.
-      ENDIF
+      l_fast_exchanges = SIZE(ptab2,2) == 1
          !
          IF( c_NFtype == 'T' ) THEN          ! *  North fold  T-point pivot
