Index: NEMO/branches/2020/tickets_icb_1900/src/OCE/LBC/mpp_lnk_generic.h90
===================================================================
--- NEMO/branches/2020/tickets_icb_1900/src/OCE/LBC/mpp_lnk_generic.h90	(revision 13277)
+++ NEMO/branches/2020/tickets_icb_1900/src/OCE/LBC/mpp_lnk_generic.h90	(revision 13899)
@@ -72,8 +72,8 @@
 
 #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
@@ -84,5 +84,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
@@ -92,6 +91,5 @@
       INTEGER  ::   ierr
       INTEGER  ::   ifill_we, ifill_ea, ifill_so, ifill_no
-      INTEGER  ::   ihl                          ! number of ranks and rows to be communicated 
-      REAL(PRECISION) ::   zland
+      REAL(wp) ::   zland
       INTEGER , DIMENSION(MPI_STATUS_SIZE)        ::   istat          ! for mpi_isend
       REAL(PRECISION), DIMENSION(:,:,:,:,:), ALLOCATABLE ::   zsnd_we, zrcv_we, zsnd_ea, zrcv_ea   ! east -west  & west - east  halos
@@ -109,8 +107,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. )
@@ -175,23 +169,23 @@
       !
       ! 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 * 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,jpj,ipk,ipl,ipf) )
+      IF( llsend_ea )   ALLOCATE( zsnd_ea(nn_hls,jpj,ipk,ipl,ipf) )
+      IF( llrecv_we )   ALLOCATE( zrcv_we(nn_hls,jpj,ipk,ipl,ipf) )
+      IF( llrecv_ea )   ALLOCATE( zrcv_ea(nn_hls,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
+         ishift = nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 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 * 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 = jpi - 2 * nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 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
@@ -215,56 +209,48 @@
       ! 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
-         END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, nn_hls
+            ARRAY_IN(ji,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
+         ishift2 = jpi - 2 * nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, nn_hls
             ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ishift2+ji,jj,jk,jl,jf)
-         END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
+         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)
-               END DO   ;   END DO   ;   END DO   ;   END DO
-            ENDIF
-         END DO
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, nn_hls
+            ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(nn_hls+1,jj,jk,jl,jf)
+         END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillcst   )                 ! filling with constant value
-         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
-               END DO;   END DO   ;   END DO   ;   END DO
-            ENDIF
-         END DO
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, nn_hls
+            ARRAY_IN(ji,jj,jk,jl,jf) = zland
+         END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       END SELECT
       !
       ! 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, 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 = nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 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
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, jpj   ;   DO ji = 1, nn_hls
             ARRAY_IN(ishift+ji,jj,jk,jl,jf) = ARRAY_IN(ishift,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, 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
+         END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       END SELECT
       !
@@ -278,6 +264,6 @@
          !
          SELECT CASE ( jpni )
-         CASE ( 1 )     ;   CALL lbc_nfd( ptab, NAT_IN(:), SGN_IN(:) OPT_K(:) )   ! only 1 northern proc, no mpp
-         CASE DEFAULT   ;   CALL mpp_nfd( ptab, NAT_IN(:), SGN_IN(:) OPT_K(:) )   ! for all northern procs.
+         CASE ( 1 )     ;   CALL lbc_nfd( ptab, NAT_IN(:), SGN_IN(:)                  OPT_K(:) )   ! only 1 northern proc, no mpp
+         CASE DEFAULT   ;   CALL mpp_nfd( ptab, NAT_IN(:), SGN_IN(:), ifill_no, zland OPT_K(:) )   ! for all northern procs.
          END SELECT
          !
@@ -290,23 +276,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(jpi,nn_hls,ipk,ipl,ipf) )
+      IF( llsend_no )   ALLOCATE( zsnd_no(jpi,nn_hls,ipk,ipl,ipf) )
+      IF( llrecv_so )   ALLOCATE( zrcv_so(jpi,nn_hls,ipk,ipl,ipf) )
+      IF( llrecv_no )   ALLOCATE( zrcv_no(jpi,nn_hls,ipk,ipl,ipf) )
+      !
+      isize = jpi * 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 = nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 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, 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
@@ -329,56 +315,48 @@
       ! 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
-         END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1, jpi
+            ARRAY_IN(ji,jj,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
+         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, jpi
             ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ji,ishift2+jj,jk,jl,jf)
-         END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
+         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)
-               END DO   ;   END DO   ;   END DO   ;   END DO
-            ENDIF
-         END DO
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1, jpi
+            ARRAY_IN(ji,jj,jk,jl,jf) = ARRAY_IN(ji,nn_hls+1,jk,jl,jf)
+         END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       CASE ( jpfillcst   )                 ! filling with constant value
-         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
-               END DO;   END DO   ;   END DO   ;   END DO
-            ENDIF
-         END DO
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1, jpi 
+            ARRAY_IN(ji,jj,jk,jl,jf) = zland
+         END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       END SELECT
       !
       ! 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, 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 = nn_hls
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 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
+         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
+         DO jf = 1, ipf   ;   DO jl = 1, ipl   ;   DO jk = 1, ipk   ;   DO jj = 1, nn_hls   ;   DO ji = 1, jpi
             ARRAY_IN(ji,ishift+jj,jk,jl,jf) = ARRAY_IN(ji,ishift,jk,jl,jf)
-         END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
+         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, jpi
             ARRAY_IN(ji,ishift+jj,jk,jl,jf) = zland
-         END DO;   END DO   ;   END DO   ;   END DO   ;   END DO
+         END DO   ;   END DO   ;   END DO   ;   END DO   ;   END DO
       END SELECT
       !
@@ -410,5 +388,7 @@
       !
    END SUBROUTINE ROUTINE_LNK
-
+#undef PRECISION
+#undef SENDROUTINE
+#undef RECVROUTINE
 #undef ARRAY_TYPE
 #undef NAT_IN
