Index: utils/tools/NESTING/src/agrif_create_bathy.f90
===================================================================
--- utils/tools/NESTING/src/agrif_create_bathy.f90	(revision 9628)
+++ utils/tools/NESTING/src/agrif_create_bathy.f90	(revision 9694)
@@ -172,5 +172,5 @@
      CALL init_constant_bathy(G0%bathy_meter,bathy_fin_constant)
      !
-     boundary = connectionsize*irafx + nbghostcellsfine + 1 
+     boundary = npt_copy*irafx + nbghostcellsfine + 1 
      !
      ! connection carried out by copying parent grid values for the fine points
@@ -285,5 +285,5 @@
               Cell_lonmax = MAX(G1%glamf(ji-1,jj-1),G1%glamf(ji,jj-1),G1%glamf(ji,jj),G1%glamf(ji-1,jj))
               Cell_latmin = MIN(G1%gphif(ji-1,jj-1),G1%gphif(ji,jj-1),G1%gphif(ji,jj),G1%gphif(ji-1,jj))
-              Cell_latmax = MAX(G1%gphif(ji-1,jj-1),G1%gphif(ji,jj-1),G1%gphif(ji,jj),G1%gphif(ji-1,jj))	                   
+              Cell_latmax = MAX(G1%gphif(ji-1,jj-1),G1%gphif(ji,jj-1),G1%gphif(ji,jj),G1%gphif(ji-1,jj)) 
               !               
               ! SEARCH FOR ALL POINTS CONTAINED IN THIS CELL
@@ -329,5 +329,5 @@
                  ALLOCATE( vardep(nxhr,nyhr) )
                  ALLOCATE( mask_oce(nxhr,nyhr) )
-                 mask_oce = 0	       
+                 mask_oce = 0       
 
                  vardep(:,:) = G0%bathy_meter(iimin:iimax,jjmin:jjmax)
@@ -356,5 +356,5 @@
                           G1%bathy_meter(ji,jj) = ( vardep1d(SUM(mask_oce)/2) + vardep1d(SUM(mask_oce)/2+1) )/2.0
                        END IF
-                       DEALLOCATE(vardep1d)		   
+                       DEALLOCATE(vardep1d)   
                     ENDIF
                  ENDIF
@@ -458,5 +458,5 @@
         CALL Check_interp(G0,gdepw_ps_interp)      ! interpolation in connection zone (3 coarse grid cells)
         !
-        boundary = connectionsize*irafx + nbghostcellsfine + 1                     
+        boundary = npt_copy*irafx + nbghostcellsfine + 1                     
 ! J chanut: exclude matching if no open boundaries
         IF (.NOT.ASSOCIATED(G1%wgt)) &
@@ -504,7 +504,6 @@
 
         IF(.NOT. smoothing) WRITE(*,*) 'No smoothing process only connection is carried out'
-        WRITE(*,*) ' linear connection on ',nb_connection_pts,'coarse grid points'
-
-        connectionsize = 2 + nb_connection_pts 
+        WRITE(*,*) ' linear connection on ',npt_connect,'coarse grid points'
+
         !            
         gdepw_ps_interp = 0.
@@ -521,6 +520,6 @@
         !
         wghts = 1.
-        DO ji = boundary + 1 , boundary + nb_connection_pts * irafx
-            wghts = wghts - (1. / (nb_connection_pts*irafx - 1. ) )
+        DO ji = boundary + 1 , boundary + npt_connect * irafx
+            wghts = wghts - (1. / (npt_connect*irafx - 1. ) )
             DO jj=1,nyfin
                IF (G1%gdepw_ps(nbghostcellsfine+1,jj) > 0.) THEN
@@ -531,6 +530,6 @@
       
         wghts = 1.
-        DO ji = nxfin - boundary , nxfin - boundary - nb_connection_pts * irafx +1 , -1
-            wghts = wghts - (1. / (nb_connection_pts*irafx - 1. ) )
+        DO ji = nxfin - boundary , nxfin - boundary - npt_connect * irafx +1 , -1
+            wghts = wghts - (1. / (npt_connect*irafx - 1. ) )
             DO jj=1,nyfin
                IF (G1%gdepw_ps(nxfin-nbghostcellsfine,jj) > 0.) THEN
@@ -541,6 +540,6 @@
 
         wghts = 1.
-        DO jj = boundary + 1 , boundary + nb_connection_pts * irafy
-            wghts = wghts - (1. / (nb_connection_pts*irafy - 1. ) )
+        DO jj = boundary + 1 , boundary + npt_connect * irafy
+            wghts = wghts - (1. / (npt_connect*irafy - 1. ) )
             DO ji=1,nxfin
                IF (G1%gdepw_ps(ji,nbghostcellsfine+1) > 0.) THEN
@@ -551,6 +550,6 @@
 
         wghts = 1.
-        DO jj = nyfin - boundary , nyfin - boundary - nb_connection_pts * irafy +1, -1
-            wghts = wghts - (1. / (nb_connection_pts*irafy - 1. ) )
+        DO jj = nyfin - boundary , nyfin - boundary - npt_connect * irafy +1, -1
+            wghts = wghts - (1. / (npt_connect*irafy - 1. ) )
             DO ji=1,nxfin
                IF (G1%gdepw_ps(ji,nyfin-nbghostcellsfine) > 0.) THEN
@@ -564,5 +563,4 @@
         G1%bathy_meter = G1%gdepw_ps
         !                     
-        connectionsize = 2 
         ! 
 ! Chanut: remove smoothing if child grid bathymetry is found to already exist
@@ -570,10 +568,10 @@
 
            !
-           ! Smoothing to connect the connection zone (3 + nb_connection_pts coarse grid cells) and the interior domain
+           ! Smoothing to connect the connection zone (3 + npt_connect coarse grid cells) and the interior domain
            !
 ! Chanut: smoothing everywhere then discard result in connection zone
            CALL smooth_topo(G1%gdepw_ps(1:nxfin,1:nyfin),nbiter)
            WHERE (G1%wgt(:,:)==0.) G1%bathy_meter(:,:) = G1%gdepw_ps(:,:)
-!           boundary = (connectionsize+nb_connection_pts)*irafx + nbghostcellsfine + 1 
+!           boundary = (npt_copy+npt_connect)*irafx + nbghostcellsfine + 1 
 !           CALL smooth_topo(G1%gdepw_ps(boundary:nxfin-boundary+1,boundary:nyfin-boundary+1),nbiter)
 !           G1%bathy_meter = G1%gdepw_ps                         
@@ -658,5 +656,5 @@
      CALL init_constant_bathy(G0%bathy_meter,bathy_fin_constant)
      !
-     boundary = connectionsize*irafx + nbghostcellsfine + 1   
+     boundary = npt_copy*irafx + nbghostcellsfine + 1   
      !             
      G1%bathy_meter(1:boundary,:) = bathy_fin_constant(1:boundary,:)
