Index: NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbc_lnk_multi_generic.h90
===================================================================
--- NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbc_lnk_multi_generic.h90	(revision 11692)
+++ NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbc_lnk_multi_generic.h90	(revision 11719)
@@ -19,5 +19,5 @@
       &                    , pt5, cdna5, psgn5, pt6 , cdna6 , psgn6 , pt7 , cdna7 , psgn7 , pt8, cdna8, psgn8   &
       &                    , pt9, cdna9, psgn9, pt10, cdna10, psgn10, pt11, cdna11, psgn11                      &
-      &                    , kfillmode, pfillval, lsend, lrecv, ihlcom )
+      &                    , kfillmode, pfillval, lsend, lrecv )
       !!---------------------------------------------------------------------
       CHARACTER(len=*)   ,                   INTENT(in   ) :: cdname  ! name of the calling subroutine
@@ -31,5 +31,4 @@
       REAL(wp)           , OPTIONAL        , INTENT(in   ) :: pfillval    ! background value (used at closed boundaries)
       LOGICAL, DIMENSION(4), OPTIONAL      , INTENT(in   ) :: lsend, lrecv   ! indicate how communications are to be carried out
-      INTEGER            , OPTIONAL        , INTENT(in   ) :: ihlcom         ! number of ranks and rows to be communicated
       !!
       INTEGER                          ::   kfld        ! number of elements that will be attributed
@@ -56,5 +55,5 @@
       IF( PRESENT(psgn11) )   CALL ROUTINE_LOAD( pt11, cdna11, psgn11, ptab_ptr, cdna_ptr, psgn_ptr, kfld )
       !
-      CALL lbc_lnk_ptr    ( cdname,               ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, lsend, lrecv, ihlcom )
+      CALL lbc_lnk_ptr    ( cdname,               ptab_ptr, cdna_ptr, psgn_ptr, kfld, kfillmode, pfillval, lsend, lrecv )
       !
    END SUBROUTINE ROUTINE_MULTI
Index: NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbc_nfd_nogather_generic.h90
===================================================================
--- NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbc_nfd_nogather_generic.h90	(revision 11692)
+++ NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbc_nfd_nogather_generic.h90	(revision 11719)
@@ -44,6 +44,6 @@
 #      define L_SIZE(ptab)          SIZE(ptab,4)
 #   endif
-#   define ARRAY2_IN(i,j,k,l,f)  ptab2(i,j,k,l)
 #   define J_SIZE(ptab2)             SIZE(ptab2,2)
+#   define ARRAY2_IN(i,j,k,l,f)   ptab2(i,j,k,l)
 #   define ARRAY_TYPE(i,j,k,l,f)     REAL(wp),INTENT(inout)::ARRAY_IN(i,j,k,l,f)
 #   define ARRAY2_TYPE(i,j,k,l,f)    REAL(wp),INTENT(inout)::ARRAY2_IN(i,j,k,l,f)
@@ -57,13 +57,13 @@
       !!
       !!----------------------------------------------------------------------
-      ARRAY_TYPE(:,:,:,:,:)                             ! array or pointer of arrays on which the boundary condition is applied
-      ARRAY2_TYPE(:,:,:,:,:)                            ! array or pointer of arrays on which the boundary condition is applied
+      ARRAY_TYPE(1-nn_hls+1:,1-nn_hls+1:,:,:,:)
+      ARRAY2_TYPE(1-nn_hls+1:,:,:,:,:) 
       CHARACTER(len=1) , INTENT(in   ) ::   NAT_IN(:)   ! nature of array grid-points
       REAL(wp)         , INTENT(in   ) ::   SGN_IN(:)   ! sign used across the north fold boundary
       INTEGER, OPTIONAL, INTENT(in   ) ::   kfld        ! number of pt3d arrays
       !
-      INTEGER  ::    ji,  jj,   jk,     jl,   jh,  jf   ! dummy loop indices
-      INTEGER  ::   ipi, ipj,  ipk,    ipl,  ipf        ! dimension of the input array
-      INTEGER  ::   ijt, iju, ijpj, ijpjp1, ijta, ijua, jia, startloop, endloop
+      INTEGER  ::    ji,  jj,   jk, jn, ii,   jl,   jh,  jf   ! dummy loop indices
+      INTEGER  ::   ipi, ipj,  ipk,    ipl,  ipf, ijj   ! dimension of the input array
+      INTEGER  ::   ijt, iju, ijta, ijua, jia, startloop, endloop
       LOGICAL  ::   l_fast_exchanges
       !!----------------------------------------------------------------------
@@ -75,8 +75,4 @@
       ! Security check for further developments
       IF ( ipf > 1 ) CALL ctl_stop( 'STOP', 'lbc_nfd_nogather: multiple fields not allowed. Revise implementation...' )
-      !
-      ijpj   = 1    ! index of first modified line 
-      ijpjp1 = 2    ! index + 1
-      
       ! 2nd dimension determines exchange speed
       IF (ipj == 1 ) THEN
@@ -95,25 +91,33 @@
             !
             CASE ( 'T' , 'W' )                         ! T-, W-point
-               IF ( nimpp /= 1 ) THEN   ;   startloop = 1
+               IF ( nimpp - nn_hls+1 /= 1 ) THEN  ;  startloop = 1 - nn_hls + 1
                ELSE                     ;   startloop = 2
                ENDIF
                !
                DO jl = 1, ipl; DO jk = 1, ipk
-                  DO ji = startloop, nlci
-                     ijt = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 4
-                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,ijpj,jk,jl,jf)
-                  END DO
-               END DO; END DO
-               IF( nimpp == 1 ) THEN
-                  DO jl = 1, ipl; DO jk = 1, ipk
-                     ARRAY_IN(1,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(3,nlcj-2,jk,jl,jf)
-                  END DO; END DO
-               ENDIF
-               !
-               IF ( .NOT. l_fast_exchanges ) THEN
-                  IF( nimpp >= jpiglo/2+1 ) THEN
-                     startloop = 1
-                  ELSEIF( nimpp+nlci-1 >= jpiglo/2+1 .AND. nimpp < jpiglo/2+1 ) THEN
-                     startloop = jpiglo/2+1 - nimpp + 1
+               	  DO jj = 1, nn_hls
+               	  	ijj = nlcj -jj +1
+                  	DO ji = startloop, nlci
+                    	ijt = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 4
+                     	ARRAY_IN(ji,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,jj,jk,jl,jf)
+                    END DO
+                  END DO
+               END DO; END DO
+               IF( nimpp - nn_hls+1 == 1 ) THEN
+                  DO jl = 1, ipl; DO jk = 1, ipk
+                  	DO jj = 1, nn_hls
+               	  		ijj = nlcj -jj +1
+               	  		DO ii = 1, nn_hls
+                     		ARRAY_IN(1-ii+1,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ii+2,nlcj-2*nn_hls+jj-1,jk,jl,jf)
+                   		END DO
+                   	END DO
+                  END DO; END DO
+               ENDIF              
+               !
+               IF ( .NOT. l_fast_exchanges ) THEN
+                  IF( nimpp - nn_hls +1 >= jpiglo/2+1 ) THEN
+                     startloop = 1 - nn_hls +1
+                ELSEIF( nimpp+nlci-1 >= jpiglo/2+1 .AND. nimpp - nn_hls +1 < jpiglo/2+1 ) THEN
+                     startloop = jpiglo/2+1 - nimpp + nn_hls
                   ELSE
                      startloop = nlci + 1
@@ -126,7 +130,7 @@
                            ijta = jpiglo - jia + 2
                            IF( ijta >= startloop+nimpp-1 .AND. ijta < jia ) THEN
-                              ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ijta-nimpp+1,nlcj-1,jk,jl,jf)
+                              ARRAY_IN(ji,nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ijta-nimpp+1,nlcj-nn_hls,jk,jl,jf)
                            ELSE
-                              ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,ijpjp1,jk,jl,jf)
+                              ARRAY_IN(ji,nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,nn_hls+1,jk,jl,jf)
                            ENDIF
                         END DO
@@ -134,5 +138,163 @@
                   ENDIF
                ENDIF
-
+            CASE ( 'U' )                                     ! U-point
+               IF( nimpp + nlci - nn_hls /= jpiglo ) THEN
+                  endloop = nlci
+               ELSE
+                  endloop = nlci - nn_hls
+               ENDIF
+               DO jl = 1, ipl; DO jk = 1, ipk
+				  DO jj = 1, nn_hls
+               	  	ijj = nlcj -jj +1
+                  	DO ji = 1-nn_hls+1, endloop
+                    	iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
+                     	ARRAY_IN(ji,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,jj,jk,jl,jf)
+                  	END DO
+                  END DO
+               END DO; END DO
+               IF (nimpp - nn_hls+1 .eq. 1) THEN
+					DO jj = 1, nn_hls
+						ijj = nlcj -jj +1
+						DO ii = 1, nn_hls
+							ARRAY_IN(2-ii,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(ii+1,nlcj-2*nn_hls+jj-1,:,:,jf)
+						END DO
+                  	END DO
+               ENDIF
+               IF((nimpp + nlci - nn_hls) .eq. jpiglo) THEN
+                  	DO jj = 1, nn_hls
+               	  		ijj = nlcj -jj +1
+						DO ii = 1, nn_hls
+							ARRAY_IN(nlci-ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(nlci-2*nn_hls+ii,nlcj-2*nn_hls+jj-1,:,:,jf)
+						END DO
+					END DO
+               ENDIF
+               !
+               IF ( .NOT. l_fast_exchanges ) THEN
+                  IF( nimpp + nlci - nn_hls /= jpiglo ) THEN
+                     endloop = nlci
+                  ELSE
+                     endloop = nlci - nn_hls
+                  ENDIF
+                  IF( nimpp - nn_hls+1 >= jpiglo/2 ) THEN
+                     startloop = 1- nn_hls + 1
+                     ELSEIF( ( nimpp+nlci-1 >= jpiglo/2 ) .AND. ( nimpp - nn_hls+1 < jpiglo/2 ) ) THEN
+                     startloop = jpiglo/2 - nimpp + nn_hls
+                  ELSE
+                     startloop = endloop + 1
+                  ENDIF
+                  IF( startloop <= endloop ) THEN
+                  DO jl = 1, ipl; DO jk = 1, ipk
+                     DO ji = startloop, endloop
+                        iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
+                        jia = ji + nimpp - 1
+                        ijua = jpiglo - jia + 1
+                        IF( ijua >= startloop+nimpp-1 .AND. ijua < jia ) THEN
+                           ARRAY_IN(ji,nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ijua-nimpp+1,nlcj-nn_hls,jk,jl,jf)
+                        ELSE
+                           ARRAY_IN(ji,nlcj-nn_hls,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,nn_hls+1,jk,jl,jf)
+                        ENDIF
+                     END DO
+                  END DO; END DO
+                  ENDIF
+               ENDIF
+               !
+            CASE ( 'V' )                                     ! V-point
+               IF( nimpp - nn_hls+1 /= 1 ) THEN
+                 startloop = 1 - nn_hls + 1
+               ELSE
+                 startloop = 2
+               ENDIF
+               IF ( .NOT. l_fast_exchanges ) THEN
+                  DO jl = 1, ipl; DO jk = 1, ipk
+               	  	DO jj = 2, nn_hls+1
+               	  		ijj = nlcj -jj +1
+                     	DO ji = startloop, nlci
+                        	ijt=jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 4
+                        	ARRAY_IN(ji,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,jj,jk,jl,jf)
+                     	END DO
+                    END DO
+                  END DO; END DO
+               ENDIF
+               DO jl = 1, ipl; DO jk = 1, ipk
+                  DO ji = startloop, nlci
+                     ijt=jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 4
+                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,1,jk,jl,jf)
+                  END DO
+               END DO; END DO
+               IF (nimpp - nn_hls+1.eq. 1) THEN
+					DO jj = 1, nn_hls
+               			ijj = nlcj-jj+1
+               			DO ii = 1, nn_hls
+    	           			ARRAY_IN(1-ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(ii+2,nlcj-2*nn_hls+jj-1,:,:,jf)
+						END DO
+					END DO
+               ENDIF
+            CASE ( 'F' )                                     ! F-point
+               IF( nimpp + nlci - nn_hls /= jpiglo ) THEN
+                  endloop = nlci
+               ELSE
+                  endloop = nlci - nn_hls
+               ENDIF
+               IF ( .NOT. l_fast_exchanges ) THEN
+                  DO jl = 1, ipl; DO jk = 1, ipk
+               	  	DO jj = 2, nn_hls+1
+               	  		ijj = nlcj -jj +1
+                     	DO ji = 1 - nn_hls +1, endloop
+                        	iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
+                        	ARRAY_IN(ji,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,jj,jk,jl,jf)
+                     	END DO
+                    END DO
+                  END DO; END DO
+               ENDIF
+               DO jl = 1, ipl; DO jk = 1, ipk
+                  DO ji = 1- nn_hls +1, endloop
+                     iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
+                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,1,jk,jl,jf)
+                  END DO
+               END DO; END DO
+		IF (nimpp - nn_hls+1.eq. 1) THEN               
+			DO ii = 1, nn_hls
+	                	ARRAY_IN(2-ii,nlcj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(ii+1,nlcj-2*nn_hls-1,:,:,jf)
+			END DO
+			IF ( .NOT. l_fast_exchanges ) THEN
+				DO jj = 1, nn_hls
+               				ijj = nlcj -jj
+               				DO ii = 1, nn_hls
+                    			ARRAY_IN(2-ii,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(ii+1,nlcj-2*nn_hls+jj-1,:,:,jf)
+                 	   	   	END DO
+                  		END DO
+               		ENDIF
+		ENDIF
+		IF((nimpp + nlci - nn_hls ) .eq. jpiglo) THEN
+               		DO ii = 1, nn_hls
+	                	ARRAY_IN(nlci-ii+1,nlcj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(nlci-2*nn_hls+ii,nlcj-2*nn_hls-1,:,:,jf)
+			END DO
+			IF ( .NOT. l_fast_exchanges ) THEN
+				DO jj = 1, nn_hls
+               				ijj = nlcj -jj
+	               			DO ii = 1, nn_hls
+                    			ARRAY_IN(nlci-ii+1,ijj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(nlci-2*nn_hls+ii,nlcj-2*nn_hls+jj-1,:,:,jf)
+                    			END DO
+                   		END DO
+               		ENDIF
+               	ENDIF
+               	!
+	    END SELECT
+            !
+         CASE ( 5, 6 )                        ! *  North fold  F-point pivot
+            !
+         	WRITE(*,*) 'extrahalo not handled in this case', __FILE__, __LINE__
+            SELECT CASE ( NAT_IN(jf) )
+            CASE ( 'T' , 'W' )                               ! T-, W-point
+               DO jl = 1, ipl; DO jk = 1, ipk
+				  DO jj = 1, nn_hls
+               		 ijj = nlcj -jj+1
+                  DO ji = 1, nlci
+                     ijt = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
+                     ARRAY_IN(ji,ijj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,jj,jk,jl,jf)
+                  END DO
+				  END DO
+               END DO; END DO
+               !
             CASE ( 'U' )                                     ! U-point
                IF( nimpp + nlci - 1 /= jpiglo ) THEN
@@ -143,134 +305,19 @@
                DO jl = 1, ipl; DO jk = 1, ipk
                   DO ji = 1, endloop
-                     iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
-                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpj,jk,jl,jf)
-                  END DO
-               END DO; END DO
-               IF (nimpp .eq. 1) THEN
-                  ARRAY_IN(1,nlcj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2,nlcj-2,:,:,jf)
-               ENDIF
+                     iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 2
+                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpj-1,jk,jl,jf)
+                  END DO
+               END DO; END DO
                IF((nimpp + nlci - 1) .eq. jpiglo) THEN
-                  ARRAY_IN(nlci,nlcj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(nlci-1,nlcj-2,:,:,jf)
-               ENDIF
-               !
-               IF ( .NOT. l_fast_exchanges ) THEN
-                  IF( nimpp + nlci - 1 /= jpiglo ) THEN
-                     endloop = nlci
-                  ELSE
-                     endloop = nlci - 1
-                  ENDIF
-                  IF( nimpp >= jpiglo/2 ) THEN
-                     startloop = 1
-                     ELSEIF( ( nimpp+nlci-1 >= jpiglo/2 ) .AND. ( nimpp < jpiglo/2 ) ) THEN
-                     startloop = jpiglo/2 - nimpp + 1
-                  ELSE
-                     startloop = endloop + 1
-                  ENDIF
-                  IF( startloop <= endloop ) THEN
-                  DO jl = 1, ipl; DO jk = 1, ipk
-                     DO ji = startloop, endloop
-                        iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
-                        jia = ji + nimpp - 1
-                        ijua = jpiglo - jia + 1
-                        IF( ijua >= startloop+nimpp-1 .AND. ijua < jia ) THEN
-                           ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(ijua-nimpp+1,nlcj-1,jk,jl,jf)
-                        ELSE
-                           ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpjp1,jk,jl,jf)
-                        ENDIF
-                     END DO
-                  END DO; END DO
-                  ENDIF
+                  DO jl = 1, ipl; DO jk = 1, ipk
+                     ARRAY_IN(nlci,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(nlci-2,nlcj-1,jk,jl,jf)
+                  END DO; END DO
                ENDIF
                !
             CASE ( 'V' )                                     ! V-point
-               IF( nimpp /= 1 ) THEN
-                 startloop = 1
-               ELSE
-                 startloop = 2
-               ENDIF
-               IF ( .NOT. l_fast_exchanges ) THEN
-                  DO jl = 1, ipl; DO jk = 1, ipk
-                     DO ji = startloop, nlci
-                        ijt=jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 4
-                        ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,ijpjp1,jk,jl,jf)
-                     END DO
-                  END DO; END DO
-               ENDIF
-               DO jl = 1, ipl; DO jk = 1, ipk
-                  DO ji = startloop, nlci
-                     ijt=jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 4
-                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,ijpj,jk,jl,jf)
-                  END DO
-               END DO; END DO
-               IF (nimpp .eq. 1) THEN
-                  ARRAY_IN(1,nlcj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(3,nlcj-3,:,:,jf)
-               ENDIF
-            CASE ( 'F' )                                     ! F-point
-               IF( nimpp + nlci - 1 /= jpiglo ) THEN
-                  endloop = nlci
-               ELSE
-                  endloop = nlci - 1
-               ENDIF
-               IF ( .NOT. l_fast_exchanges ) THEN
-                  DO jl = 1, ipl; DO jk = 1, ipk
-                     DO ji = 1, endloop
-                        iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
-                        ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpjp1,jk,jl,jf)
-                     END DO
-                  END DO; END DO
-               ENDIF
-               DO jl = 1, ipl; DO jk = 1, ipk
-                  DO ji = 1, endloop
-                     iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
-                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpj,jk,jl,jf)
-                  END DO
-               END DO; END DO
-               IF (nimpp .eq. 1) THEN
-                  ARRAY_IN(1,nlcj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2,nlcj-3,:,:,jf)
-                  IF ( .NOT. l_fast_exchanges ) &
-                     ARRAY_IN(1,nlcj-1,:,:,jf) = SGN_IN(jf) * ARRAY_IN(2,nlcj-2,:,:,jf)
-               ENDIF
-               IF((nimpp + nlci - 1) .eq. jpiglo) THEN
-                  ARRAY_IN(nlci,nlcj,:,:,jf) = SGN_IN(jf) * ARRAY_IN(nlci-1,nlcj-3,:,:,jf)
-                  IF ( .NOT. l_fast_exchanges ) &
-                     ARRAY_IN(nlci,nlcj-1,:,:,jf) = SGN_IN(jf) * ARRAY_IN(nlci-1,nlcj-2,:,:,jf)
-               ENDIF
-               !
-            END SELECT
-            !
-         CASE ( 5, 6 )                        ! *  North fold  F-point pivot
-            !
-            SELECT CASE ( NAT_IN(jf) )
-            CASE ( 'T' , 'W' )                               ! T-, W-point
                DO jl = 1, ipl; DO jk = 1, ipk
                   DO ji = 1, nlci
                      ijt = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
-                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,ijpj,jk,jl,jf)
-                  END DO
-               END DO; END DO
-               !
-            CASE ( 'U' )                                     ! U-point
-               IF( nimpp + nlci - 1 /= jpiglo ) THEN
-                  endloop = nlci
-               ELSE
-                  endloop = nlci - 1
-               ENDIF
-               DO jl = 1, ipl; DO jk = 1, ipk
-                  DO ji = 1, endloop
-                     iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 2
-                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpj,jk,jl,jf)
-                  END DO
-               END DO; END DO
-               IF((nimpp + nlci - 1) .eq. jpiglo) THEN
-                  DO jl = 1, ipl; DO jk = 1, ipk
-                     ARRAY_IN(nlci,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY_IN(nlci-2,nlcj-1,jk,jl,jf)
-                  END DO; END DO
-               ENDIF
-               !
-            CASE ( 'V' )                                     ! V-point
-               DO jl = 1, ipl; DO jk = 1, ipk
-                  DO ji = 1, nlci
-                     ijt = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
-                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,ijpj,jk,jl,jf)
+                     ARRAY_IN(ji,nlcj,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,ijpj-1,jk,jl,jf)
                   END DO
                END DO; END DO
@@ -288,5 +335,5 @@
                      DO ji = startloop, nlci
                         ijt = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 3
-                        ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,ijpjp1,jk,jl,jf)
+                        ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(ijt,ijpj,jk,jl,jf)
                      END DO
                   END DO; END DO
@@ -303,5 +350,5 @@
                   DO ji = 1, endloop
                      iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 2
-                     ARRAY_IN(ji,nlcj ,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpj,jk,jl,jf)
+                     ARRAY_IN(ji,nlcj ,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpj-1,jk,jl,jf)
                   END DO
                END DO; END DO
@@ -329,5 +376,5 @@
                         DO ji = startloop, endloop
                            iju = jpiglo - ji - nimpp - nfiimpp(isendto(1),jpnj) + 2
-                           ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpjp1,jk,jl,jf)
+                           ARRAY_IN(ji,nlcj-1,jk,jl,jf) = SGN_IN(jf) * ARRAY2_IN(iju,ijpj,jk,jl,jf)
                         END DO
                      END DO; END DO
Index: NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbcnfd.F90
===================================================================
--- NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbcnfd.F90	(revision 11692)
+++ NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/lbcnfd.F90	(revision 11719)
@@ -53,6 +53,7 @@
 
    INTEGER, PUBLIC, PARAMETER            ::   jpmaxngh = 3               !:
-   INTEGER, PUBLIC                       ::   nsndto, nfsloop, nfeloop   !:
+   INTEGER, PUBLIC                       ::   nsndto                     !:
    INTEGER, PUBLIC, DIMENSION (jpmaxngh) ::   isendto                    !: processes to which communicate
+   INTEGER, PUBLIC                       ::   ijpj             
 
    !!----------------------------------------------------------------------
Index: NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/mpp_lnk_generic.h90
===================================================================
--- NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/mpp_lnk_generic.h90	(revision 11692)
+++ NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/mpp_lnk_generic.h90	(revision 11719)
@@ -46,10 +46,10 @@
 
 #if defined MULTI
-   SUBROUTINE ROUTINE_LNK( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, lsend, lrecv, ihlcom )
+   SUBROUTINE ROUTINE_LNK( cdname, ptab, cd_nat, psgn, kfld, kfillmode, pfillval, lsend, lrecv )
       INTEGER             , INTENT(in   ) ::   kfld        ! number of pt3d arrays
 #else
-   SUBROUTINE ROUTINE_LNK( cdname, ptab, cd_nat, psgn      , kfillmode, pfillval, lsend, lrecv, ihlcom )
+   SUBROUTINE ROUTINE_LNK( cdname, ptab, cd_nat, psgn      , kfillmode, pfillval, lsend, lrecv )
 #endif
-      ARRAY_TYPE(:,:,:,:,:)                                        ! array or pointer of arrays on which the boundary condition is applied
+      ARRAY_TYPE(1-nn_hls+1:,1-nn_hls+1:,:,:,:)                                        ! array or pointer of arrays on which the boundary condition is applied
       CHARACTER(len=*)              , INTENT(in   ) ::   cdname      ! name of the calling subroutine
       CHARACTER(len=1)              , INTENT(in   ) ::   NAT_IN(:)   ! nature of array grid-points
@@ -58,5 +58,4 @@
       REAL(wp),             OPTIONAL, INTENT(in   ) ::   pfillval    ! background value (used at closed boundaries)
       LOGICAL, DIMENSION(4),OPTIONAL, INTENT(in   ) ::   lsend, lrecv  ! communication with other 4 proc
-      INTEGER              ,OPTIONAL, INTENT(in   ) ::   ihlcom        ! number of ranks and rows to be communicated
       !
       INTEGER  ::    ji,  jj,  jk,  jl,  jf      ! dummy loop indices
@@ -66,5 +65,4 @@
       INTEGER  ::   ierr
       INTEGER  ::   ifill_we, ifill_ea, ifill_so, ifill_no
-      INTEGER  ::   ihl                          ! number of ranks and rows to be communicated 
       REAL(wp) ::   zland
       INTEGER , DIMENSION(MPI_STATUS_SIZE)        ::   istat          ! for mpi_isend
@@ -83,8 +81,4 @@
       ipl = L_SIZE(ptab)   ! 4th    -
       ipf = F_SIZE(ptab)   ! 5th    -      use in "multi" case (array of pointers)
-      !
-      IF( PRESENT(ihlcom) ) THEN   ;   ihl = ihlcom
-      ELSE                         ;   ihl = 1
-      END IF
       !
       IF( narea == 1 .AND. numcom == -1 ) CALL mpp_report( cdname, ipk, ipl, ipf, ld_lbc = .TRUE. )
@@ -148,24 +142,25 @@
       ! -------------------------------------------------- !
       !
+
       ! Must exchange the whole column (from 1 to jpj) to get the corners if we have no south/north neighbourg
-      isize = ihl * jpj * ipk * ipl * ipf      
+      isize = nn_hls * ( jpj + nn_hls - 1 ) * ipk * ipl * ipf      
       !
       ! Allocate local temporary arrays to be sent/received. Fill arrays to be sent
-      IF( llsend_we )   ALLOCATE( zsnd_we(ihl,jpj,ipk,ipl,ipf) )
-      IF( llsend_ea )   ALLOCATE( zsnd_ea(ihl,jpj,ipk,ipl,ipf) )
-      IF( llrecv_we )   ALLOCATE( zrcv_we(ihl,jpj,ipk,ipl,ipf) )
-      IF( llrecv_ea )   ALLOCATE( zrcv_ea(ihl,jpj,ipk,ipl,ipf) )
+      IF( llsend_we )   ALLOCATE( zsnd_we(nn_hls,1-nn_hls+1:jpj,ipk,ipl,ipf) )
+      IF( llsend_ea )   ALLOCATE( zsnd_ea(nn_hls,1-nn_hls+1:jpj,ipk,ipl,ipf) )
+      IF( llrecv_we )   ALLOCATE( zrcv_we(nn_hls,1-nn_hls+1:jpj,ipk,ipl,ipf) )
+      IF( llrecv_ea )   ALLOCATE( zrcv_ea(nn_hls,1-nn_hls+1:jpj,ipk,ipl,ipf) )
       !
       IF( llsend_we ) THEN   ! copy western side of the inner mpi domain in local temporary array to be sent by MPI
-         ishift = ihl
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, ihl
-            zsnd_we(ji,jj,jk,jl,jf) = ARRAY_IN(ishift+ji,jj,jk,jl,jf)   ! ihl + 1 -> 2*ihl
-         END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
-      ENDIF
-      !
-      IF(llsend_ea  ) THEN   ! copy eastern side of the inner mpi domain in local temporary array to be sent by MPI
-         ishift = jpi - 2 * ihl
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, ihl
-            zsnd_ea(ji,jj,jk,jl,jf) = ARRAY_IN(ishift+ji,jj,jk,jl,jf)   ! jpi - 2*ihl + 1 -> jpi - ihl
+         ishift = 1
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
+            zsnd_we(ji,jj,jk,jl,jf) = ARRAY_IN(ishift+ji,jj,jk,jl,jf)   ! nn_hls + 1 -> 2*nn_hls
+         END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
+      ENDIF
+      !
+      IF( llsend_ea ) THEN   ! copy eastern side of the inner mpi domain in local temporary array to be sent by MPI
+         ishift = jpi -  2 * nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
+            zsnd_ea(ji,jj,jk,jl,jf) = ARRAY_IN(ishift+ji,jj,jk,jl,jf)   ! jpi - 2*nn_hls + 1 -> jpi - nn_hls
          END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       ENDIF
@@ -174,9 +169,9 @@
       !
       ! non-blocking send of the western/eastern side using local temporary arrays
-      IF( llsend_we )   CALL mppsend( 1, zsnd_we(1,1,1,1,1), isize, nowe, ireq_we )
-      IF( llsend_ea )   CALL mppsend( 2, zsnd_ea(1,1,1,1,1), isize, noea, ireq_ea )
+      IF( llsend_we )   CALL mppsend( 1, zsnd_we(1,1-nn_hls+1,1,1,1), isize, nowe, ireq_we )
+      IF( llsend_ea )   CALL mppsend( 2, zsnd_ea(1,1-nn_hls+1,1,1,1), isize, noea, ireq_ea )
       ! blocking receive of the western/eastern halo in local temporary arrays
-      IF( llrecv_we )   CALL mpprecv( 2, zrcv_we(1,1,1,1,1), isize, nowe )
-      IF( llrecv_ea )   CALL mpprecv( 1, zrcv_ea(1,1,1,1,1), isize, noea )
+      IF( llrecv_we )   CALL mpprecv( 2, zrcv_we(1,1-nn_hls+1,1,1,1), isize, nowe )
+      IF( llrecv_ea )   CALL mpprecv( 1, zrcv_ea(1,1-nn_hls+1,1,1,1), isize, noea )
       !
       IF( ln_timing ) CALL tic_tac(.FALSE.)
@@ -189,21 +184,21 @@
       ! 2.1 fill weastern halo
       ! ----------------------
-      ! ishift = 0                         ! fill halo from ji = 1 to ihl
+      ! ishift = 0                         ! fill halo from ji = 1 to nn_hls
       SELECT CASE ( ifill_we )
       CASE ( jpfillnothing )               ! no filling 
       CASE ( jpfillmpi   )                 ! use data received by MPI 
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, ihl
-            ARRAY_IN(ji,jj,jk,jl,jf) = zrcv_we(ji,jj,jk,jl,jf)   ! 1 -> ihl
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
+            ARRAY_IN(ji-nn_hls+1,jj,jk,jl,jf) = zrcv_we(ji,jj,jk,jl,jf)   ! 1 -> nn_hls
          END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillperio )                 ! use east-weast periodicity
-         ishift2 = jpi - 2 * ihl
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, ihl
-            ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ishift2+ji,jj,jk,jl,jf)
+         ishift2 = jpi - 2 * nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
+            ARRAY_IN(ji-nn_hls+1,jj,jk,jl,jf) = ARRAY_IN(ishift2+ji,jj,jk,jl,jf)
          END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillcopy  )                 ! filling with inner domain values
          DO jf = 1, ipf                               ! number of arrays to be treated
             IF( .NOT. NAT_IN(jf) == 'F' ) THEN        ! do nothing for F point
-               DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, ihl
-                  ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ihl+1,jj,jk,jl,jf)
+               DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
+                  ARRAY_IN(ji-nn_hls+1,jj,jk,jl,jf) = ARRAY_IN(1+ji,jj,jk,jl,jf)
                END DO   ;   END DO   ;   END DO   ;   END DO
             ENDIF
@@ -212,6 +207,6 @@
          DO jf = 1, ipf                               ! number of arrays to be treated
             IF( .NOT. NAT_IN(jf) == 'F' ) THEN        ! do nothing for F point
-               DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, ihl
-                  ARRAY_IN(ji,jj,jk,jl,jf) = zland
+               DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
+                  ARRAY_IN(ji-nn_hls+1,jj,jk,jl,jf) = zland
                END DO;   END DO   ;   END DO   ;   END DO
             ENDIF
@@ -221,22 +216,23 @@
       ! 2.2 fill eastern halo
       ! ---------------------
-      ishift = jpi - ihl                ! fill halo from ji = jpi-ihl+1 to jpi 
+      ishift = jpi - nn_hls                ! fill halo from ji = jpi-nn_hls+1 to jpi 
       SELECT CASE ( ifill_ea )
       CASE ( jpfillnothing )               ! no filling 
       CASE ( jpfillmpi   )                 ! use data received by MPI 
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, ihl
-            ARRAY_IN(ishift+ji,jj,jk,jl,jf) = zrcv_ea(ji,jj,jk,jl,jf)   ! jpi - ihl + 1 -> jpi
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
+            ARRAY_IN(ishift+ji,jj,jk,jl,jf) = zrcv_ea(ji,jj,jk,jl,jf)   ! jpi - nn_hls + 1 -> jpi
          END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillperio )                 ! use east-weast periodicity
-         ishift2 = ihl
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, ihl
+         ishift2 = 1
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
             ARRAY_IN(ishift+ji,jj,jk,jl,jf) = ARRAY_IN(ishift2+ji,jj,jk,jl,jf)
          END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillcopy  )                 ! filling with inner domain values
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, ihl
-            ARRAY_IN(ishift+ji,jj,jk,jl,jf) = ARRAY_IN(ishift,jj,jk,jl,jf)
+		 ishift2 = jpi - 2*nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
+            ARRAY_IN(ishift+ji,jj,jk,jl,jf) = ARRAY_IN(ishift2+ji,jj,jk,jl,jf)
          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, jpj   ;   DO ji = 1, ihl
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1-nn_hls+1, jpj   ;   DO ji = 1, nn_hls
             ARRAY_IN(ishift+ji,jj,jk,jl,jf) = zland
          END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
@@ -264,23 +260,23 @@
       ! ---------------------------------------------------- !
       !
-      IF( llsend_so )   ALLOCATE( zsnd_so(jpi,ihl,ipk,ipl,ipf) )
-      IF( llsend_no )   ALLOCATE( zsnd_no(jpi,ihl,ipk,ipl,ipf) )
-      IF( llrecv_so )   ALLOCATE( zrcv_so(jpi,ihl,ipk,ipl,ipf) )
-      IF( llrecv_no )   ALLOCATE( zrcv_no(jpi,ihl,ipk,ipl,ipf) )
-      !
-      isize = jpi * ihl * ipk * ipl * ipf      
+      IF( llsend_so )   ALLOCATE( zsnd_so(1-nn_hls+1:jpi,nn_hls,ipk,ipl,ipf) )
+      IF( llsend_no )   ALLOCATE( zsnd_no(1-nn_hls+1:jpi,nn_hls,ipk,ipl,ipf) )
+      IF( llrecv_so )   ALLOCATE( zrcv_so(1-nn_hls+1:jpi,nn_hls,ipk,ipl,ipf) )
+      IF( llrecv_no )   ALLOCATE( zrcv_no(1-nn_hls+1:jpi,nn_hls,ipk,ipl,ipf) )
+      !
+      isize = ( jpi + nn_hls - 1 ) * nn_hls * ipk * ipl * ipf      
 
       ! allocate local temporary arrays to be sent/received. Fill arrays to be sent
       IF( llsend_so ) THEN   ! copy sourhern side of the inner mpi domain in local temporary array to be sent by MPI
-         ishift = ihl
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, ihl   ;   DO ji = 1, jpi
-            zsnd_so(ji,jj,jk,jl,jf) = ARRAY_IN(ji,ishift+jj,jk,jl,jf)   ! ihl+1 -> 2*ihl
+         ishift = 1
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi
+            zsnd_so(ji,jj,jk,jl,jf) = ARRAY_IN(ji,ishift+jj,jk,jl,jf)   ! nn_hls+1 -> 2*nn_hls
          END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       ENDIF
       !
       IF( llsend_no ) THEN   ! copy eastern side of the inner mpi domain in local temporary array to be sent by MPI
-         ishift = jpj - 2 * ihl
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, ihl   ;   DO ji = 1, jpi
-            zsnd_no(ji,jj,jk,jl,jf) = ARRAY_IN(ji,ishift+jj,jk,jl,jf)   ! jpj-2*ihl+1 -> jpj-ihl
+         ishift = jpj - 2 * nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi
+            zsnd_no(ji,jj,jk,jl,jf) = ARRAY_IN(ji,ishift+jj,jk,jl,jf)   ! jpj-2*nn_hls+1 -> jpj-nn_hls
          END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       ENDIF
@@ -289,9 +285,9 @@
       !
       ! non-blocking send of the southern/northern side
-      IF( llsend_so )   CALL mppsend( 3, zsnd_so(1,1,1,1,1), isize, noso, ireq_so )
-      IF( llsend_no )   CALL mppsend( 4, zsnd_no(1,1,1,1,1), isize, nono, ireq_no )
+      IF( llsend_so )   CALL mppsend( 3, zsnd_so(1-nn_hls+1,1,1,1,1), isize, noso, ireq_so )
+      IF( llsend_no )   CALL mppsend( 4, zsnd_no(1-nn_hls+1,1,1,1,1), isize, nono, ireq_no )
       ! blocking receive of the southern/northern halo
-      IF( llrecv_so )   CALL mpprecv( 4, zrcv_so(1,1,1,1,1), isize, noso )
-      IF( llrecv_no )   CALL mpprecv( 3, zrcv_no(1,1,1,1,1), isize, nono )
+      IF( llrecv_so )   CALL mpprecv( 4, zrcv_so(1-nn_hls+1,1,1,1,1), isize, noso )
+      IF( llrecv_no )   CALL mpprecv( 3, zrcv_no(1-nn_hls+1,1,1,1,1), isize, nono )
       !
       IF( ln_timing ) CALL tic_tac(.FALSE.)
@@ -303,21 +299,21 @@
       ! 5.1 fill southern halo
       ! ----------------------
-      ! ishift = 0                         ! fill halo from jj = 1 to ihl
+      ! ishift = 0                         ! fill halo from jj = 1 to nn_hls
       SELECT CASE ( ifill_so )
       CASE ( jpfillnothing )               ! no filling 
       CASE ( jpfillmpi   )                 ! use data received by MPI 
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, ihl   ;   DO ji = 1, jpi
-            ARRAY_IN(ji,jj,jk,jl,jf) = zrcv_so(ji,jj,jk,jl,jf)   ! 1 -> ihl
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi
+            ARRAY_IN(ji,jj-nn_hls+1,jk,jl,jf) = zrcv_so(ji,jj,jk,jl,jf)   ! 1 -> nn_hls
          END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillperio )                 ! use north-south periodicity
-         ishift2 = jpj - 2 * ihl
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, ihl   ;   DO ji = 1, jpi
-            ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ji,ishift2+jj,jk,jl,jf)
+         ishift2 = jpj - 2 * nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi
+            ARRAY_IN(ji,jj-nn_hls+1,jk,jl,jf) = ARRAY_IN(ji,ishift2+jj,jk,jl,jf)
          END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillcopy  )                 ! filling with inner domain values
          DO jf = 1, ipf                               ! number of arrays to be treated
             IF( .NOT. NAT_IN(jf) == 'F' ) THEN        ! do nothing for F point
-               DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, ihl   ;   DO ji = 1, jpi
-                  ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ji,ihl+1,jk,jl,jf)
+               DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi
+                  ARRAY_IN(ji,jj-nn_hls+1,jk,jl,jf) = ARRAY_IN(ji,1+jj,jk,jl,jf)
                END DO   ;   END DO   ;   END DO   ;   END DO
             ENDIF
@@ -326,6 +322,6 @@
          DO jf = 1, ipf                               ! number of arrays to be treated
             IF( .NOT. NAT_IN(jf) == 'F' ) THEN        ! do nothing for F point
-               DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, ihl   ;   DO ji = 1, jpi 
-                  ARRAY_IN(ji,jj,jk,jl,jf) = zland
+               DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi 
+                  ARRAY_IN(ji,jj-nn_hls+1,jk,jl,jf) = zland
                END DO;   END DO   ;   END DO   ;   END DO
             ENDIF
@@ -335,22 +331,23 @@
       ! 5.2 fill northern halo
       ! ----------------------
-      ishift = jpj - ihl                ! fill halo from jj = jpj-ihl+1 to jpj 
+      ishift = jpj - nn_hls                ! fill halo from jj = jpj-nn_hls+1 to jpj 
       SELECT CASE ( ifill_no )
       CASE ( jpfillnothing )               ! no filling 
       CASE ( jpfillmpi   )                 ! use data received by MPI 
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, ihl   ;   DO ji = 1, jpi
-            ARRAY_IN(ji,ishift+jj,jk,jl,jf) = zrcv_no(ji,jj,jk,jl,jf)   ! jpj-ihl+1 -> jpj
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi
+            ARRAY_IN(ji,ishift+jj,jk,jl,jf) = zrcv_no(ji,jj,jk,jl,jf)   ! jpj-nn_hls+1 -> jpj
          END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillperio )                 ! use north-south periodicity
-         ishift2 = ihl
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, ihl   ;   DO ji = 1, jpi
+         ishift2 = 1
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi
             ARRAY_IN(ji,ishift+jj,jk,jl,jf) = ARRAY_IN(ji,ishift2+jj,jk,jl,jf)
          END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillcopy  )                 ! filling with inner domain values
-         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, ihl   ;   DO ji = 1, jpi
-            ARRAY_IN(ji,ishift+jj,jk,jl,jf) = ARRAY_IN(ji,ishift,jk,jl,jf)
+      	 ishift2 = jpj - 2*nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi
+            ARRAY_IN(ji,ishift+jj,jk,jl,jf) = ARRAY_IN(ji,ishift2+jj,jk,jl,jf)
          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, ihl   ;   DO ji = 1, jpi
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1-nn_hls+1, jpi
             ARRAY_IN(ji,ishift+jj,jk,jl,jf) = zland
          END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
Index: NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/mpp_nfd_generic.h90
===================================================================
--- NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/mpp_nfd_generic.h90	(revision 11692)
+++ NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/mpp_nfd_generic.h90	(revision 11719)
@@ -48,5 +48,5 @@
    SUBROUTINE ROUTINE_NFD( ptab, cd_nat, psgn, kfld )
       !!----------------------------------------------------------------------
-      ARRAY_TYPE(:,:,:,:,:)   ! array or pointer of arrays on which the boundary condition is applied
+      ARRAY_TYPE(1-nn_hls+1:,1-nn_hls+1:,:,:,:)   ! array or pointer of arrays on which the boundary condition is applied
       CHARACTER(len=1) , INTENT(in   ) ::   NAT_IN(:)   ! nature of array grid-points
       REAL(wp)         , INTENT(in   ) ::   SGN_IN(:)   ! sign used across the north fold boundary
@@ -54,5 +54,5 @@
       !
       INTEGER  ::   ji,  jj,  jk,  jl, jh, jf, jr   ! dummy loop indices
-      INTEGER  ::   ipi, ipj, ipk, ipl, ipf         ! dimension of the input array
+      INTEGER  ::   ipi, ipk, ipl, ipf         ! dimension of the input array
       INTEGER  ::   imigr, iihom, ijhom             ! local integers
       INTEGER  ::   ierr, ibuffsize, ilci, ildi, ilei, iilb
@@ -80,9 +80,9 @@
          ALLOCATE(ipj_s(ipf))
 
-         ipj      = 2            ! Max 2nd dimension of message transfers (last two j-line only)
-         ipj_s(:) = 1            ! Real 2nd dimension of message transfers (depending on perf requirement)
+         ijpj      = 2 + nn_hls - 1           ! Max 2nd dimension of message transfers (last two j-line only)
+         ipj_s(:) = 1 + nn_hls - 1           ! Real 2nd dimension of message transfers (depending on perf requirement)
                                  ! by default, only one line is exchanged
 
-         ALLOCATE( jj_s(ipf,2) )
+         ALLOCATE( jj_s(ipf,ijpj) )
 
          ! re-define number of exchanged lines :
@@ -98,5 +98,5 @@
          IF ( l_full_nf_update .OR.                          &    ! if coupling fields
               ( ncom_stp == nit000 .AND. .NOT. ln_rstart ) ) &    ! at first time step, if not restart
-            ipj_s(:) = 2
+            ipj_s(:) = 2 + nn_hls - 1 
 
          ! Index of modifying lines in input
@@ -110,7 +110,11 @@
                !
                CASE ( 'T' , 'W' ,'U' )                            ! T-, U-, W-point
-                  jj_s(jf,1) = nlcj - 2 ;  jj_s(jf,2) = nlcj - 1
+   	            	DO ji = 1, nn_hls+1
+						jj_s(jf,ji) = nlcj - 2*nn_hls +ji -1
+					ENDDO
                CASE ( 'V' , 'F' )                                 ! V-, F-point
-                  jj_s(jf,1) = nlcj - 3 ;  jj_s(jf,2) = nlcj - 2
+					DO ji = 1, nn_hls+1
+						jj_s(jf,ji) = nlcj - 2*nn_hls +ji - 2
+					ENDDO
                END SELECT
             !
@@ -119,8 +123,12 @@
                !
                CASE ( 'T' , 'W' ,'U' )                            ! T-, U-, W-point
-                  jj_s(jf,1) = nlcj - 1      
-                  ipj_s(jf) = 1                  ! need only one line anyway
+					DO ji = 1, nn_hls
+						jj_s(jf,ji) = nlcj - 2*nn_hls + ji     
+					ENDDO
+					ipj_s(jf) = nn_hls                  ! need only one line anyway
                CASE ( 'V' , 'F' )                                 ! V-, F-point
-                  jj_s(jf,1) = nlcj - 2 ;  jj_s(jf,2) = nlcj - 1
+					DO ji = 1, nn_hls+1
+						jj_s(jf,ji) = nlcj - 2*nn_hls +ji -1
+					ENDDO
                END SELECT
             !
@@ -131,5 +139,5 @@
          ipf_j = sum (ipj_s(:))      ! Total number of lines to be exchanged
          !
-         ALLOCATE( znorthloc(jpimax,ipf_j,ipk,ipl,1) )
+         ALLOCATE( znorthloc(1-nn_hls+1:jpimax,ipf_j,ipk,ipl,1) )
          !
          js = 0
@@ -139,5 +147,5 @@
                DO jl = 1, ipl
                   DO jk = 1, ipk
-                     znorthloc(1:jpi,js,jk,jl,1) = ARRAY_IN(1:jpi,jj_s(jf,jj),jk,jl,jf)
+                     znorthloc(1-nn_hls+1:jpi,js,jk,jl,1) = ARRAY_IN(1-nn_hls+1:jpi,jj_s(jf,jj),jk,jl,jf)
                   END DO
                END DO
@@ -145,8 +153,8 @@
          END DO
          !
-         ibuffsize = jpimax * ipf_j * ipk * ipl
-         !
-         ALLOCATE( zfoldwk(jpimax,ipf_j,ipk,ipl,1) )
-         ALLOCATE( ztabr(jpimax*jpmaxngh,ipj,ipk,ipl,ipf) ) 
+         ibuffsize = (jpimax + nn_hls -1) * ipf_j * ipk * ipl
+         !
+         ALLOCATE( zfoldwk(1-nn_hls+1:jpimax,ipf_j,ipk,ipl,1) )
+         ALLOCATE( ztabr(1-nn_hls+1:(jpi+nn_hls-1)*jpmaxngh-nn_hls+1,ijpj,ipk,ipl,ipf) ) 
          ! when some processors of the north fold are suppressed, 
          ! values of ztab* arrays corresponding to these suppressed domain won't be defined 
@@ -218,13 +226,13 @@
       ELSE                             !==  allgather exchanges  ==!
          !
-         ipj   = 4            ! 2nd dimension of message transfers (last j-lines)
-         !
-         ALLOCATE( znorthloc(jpimax,ipj,ipk,ipl,ipf) )
-         !
-         DO jf = 1, ipf                ! put in znorthloc the last ipj j-lines of ptab
+         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 = nlcj - ipj +1, nlcj
-                     ij = jj - nlcj + ipj
+                  DO jj = nlcj - ijpj +1, nlcj
+                     ij = jj - nlcj + ijpj
                      znorthloc(1:jpi,ij,jk,jl,jf) = ARRAY_IN(1:jpi,jj,jk,jl,jf)
                   END DO
@@ -233,8 +241,8 @@
          END DO
          !
-         ibuffsize = jpimax * ipj * ipk * ipl * ipf
-         !
-         ALLOCATE( ztab       (jpiglo,ipj,ipk,ipl,ipf     ) )
-         ALLOCATE( znorthgloio(jpimax,ipj,ipk,ipl,ipf,jpni) )
+         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,
@@ -263,5 +271,5 @@
                DO jl = 1, ipl
                   DO jk = 1, ipk
-                     DO jj = 1, ipj
+                     DO jj = 1, ijpj
                         DO ji = ildi, ilei
                            ztab(ji+iilb-1,jj,jk,jl,jf) = znorthgloio(ji,jj,jk,jl,jf,jr)
@@ -279,6 +287,6 @@
             DO jl = 1, ipl
                DO jk = 1, ipk
-                  DO jj = nlcj-ipj+1, nlcj             ! Scatter back to ARRAY_IN
-                     ij = jj - nlcj + ipj
+                  DO jj = nlcj-ijpj+1, nlcj             ! Scatter back to ARRAY_IN
+                     ij = jj - nlcj + ijpj
                      DO ji= 1, nlci
                         ARRAY_IN(ji,jj,jk,jl,jf) = ztab(ji+nimpp-1,ij,jk,jl,jf)
Index: NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/mppini.F90
===================================================================
--- NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/mppini.F90	(revision 11692)
+++ NEMO/branches/2019/dev_r11514_HPC-02_single-core-extrahalo/src/OCE/LBC/mppini.F90	(revision 11719)
@@ -25,5 +25,5 @@
    USE bdy_oce        ! open BounDarY  
    !
-   USE lbcnfd  , ONLY : isendto, nsndto, nfsloop, nfeloop   ! Setup of north fold exchanges 
+   USE lbcnfd  , ONLY : isendto, nsndto   ! Setup of north fold exchanges 
    USE lib_mpp        ! distribued memory computing library
    USE iom            ! nemo I/O library 
@@ -703,6 +703,4 @@
             WRITE(inum,*)
             WRITE(inum,*) 'north fold exchanges with explicit point-to-point messaging :'
-            WRITE(inum,*) 'nfsloop : ', nfsloop
-            WRITE(inum,*) 'nfeloop : ', nfeloop
             WRITE(inum,*) 'nsndto : ', nsndto
             WRITE(inum,*) 'isendto : ', isendto
@@ -1265,12 +1263,4 @@
             !
          END DO
-         nfsloop = 1
-         nfeloop = nlci
-         DO jn = 2,jpni-1
-            IF( nfipproc(jn,jpnj) == (narea - 1) ) THEN
-               IF( nfipproc(jn-1,jpnj) == -1 )   nfsloop = nldi
-               IF( nfipproc(jn+1,jpnj) == -1 )   nfeloop = nlei
-            ENDIF
-         END DO
          !
       ENDIF
