Index: utils/tools/NESTING/src/agrif_create_bathy.f90
===================================================================
--- utils/tools/NESTING/src/agrif_create_bathy.f90	(revision 12264)
+++ utils/tools/NESTING/src/agrif_create_bathy.f90	(revision 12273)
@@ -348,94 +348,94 @@
   ENDIF
   !
-  IF( new_topo ) THEN
-     ! 2nd step: copy parent bathymetry at the boundaries
-     DO jj=1,nyfin   ! West and East
-        IF ( gdepw_ps_interp(nbghostcellsfine+1,jj) > 0. ) THEN
-           G1%gdepw_ps(1:boundary,jj) = gdepw_ps_interp(1:boundary,jj) 
-           G1%wgt(1:boundary,jj) = 1.
-        ELSE
-           G1%gdepw_ps(1:nbghostcellsfine+1,jj)=0. 
-        ENDIF
-        !
-        IF ( gdepw_ps_interp(nxfin-nbghostcellsfine,jj) > 0.) THEN
-           G1%gdepw_ps(nxfin-boundary+1:nxfin,jj)=gdepw_ps_interp(nxfin-boundary+1:nxfin,jj)
-           G1%wgt(nxfin-boundary+1:nxfin,jj) = 1.
-        ELSE
-           G1%gdepw_ps(nxfin-nbghostcellsfine:nxfin,jj) = 0.
-        ENDIF
+!!$  IF( new_topo ) THEN ! clem: no, do it even when there is no new topo
+  ! 2nd step: copy parent bathymetry at the boundaries
+  DO jj=1,nyfin   ! West and East
+     IF ( gdepw_ps_interp(nbghostcellsfine+1,jj) > 0. ) THEN
+        G1%gdepw_ps(1:boundary,jj) = gdepw_ps_interp(1:boundary,jj) 
+        G1%wgt(1:boundary,jj) = 1.
+     ELSE
+        G1%gdepw_ps(1:nbghostcellsfine+1,jj)=0. 
+     ENDIF
+     !
+     IF ( gdepw_ps_interp(nxfin-nbghostcellsfine,jj) > 0.) THEN
+        G1%gdepw_ps(nxfin-boundary+1:nxfin,jj)=gdepw_ps_interp(nxfin-boundary+1:nxfin,jj)
+        G1%wgt(nxfin-boundary+1:nxfin,jj) = 1.
+     ELSE
+        G1%gdepw_ps(nxfin-nbghostcellsfine:nxfin,jj) = 0.
+     ENDIF
+  END DO
+  !
+  DO ji=1,nxfin    ! South and North
+     IF (gdepw_ps_interp(ji,nbghostcellsfine+1)>0.) THEN
+        G1%gdepw_ps(ji,1:boundary) = gdepw_ps_interp(ji,1:boundary)
+        G1%wgt(ji,1:boundary) = 1.
+     ELSE
+        G1%gdepw_ps(ji,1:nbghostcellsfine+1)=0. 
+     ENDIF
+     !
+     IF (gdepw_ps_interp(ji,nyfin-nbghostcellsfine)>0.) THEN
+        G1%gdepw_ps(ji,nyfin-boundary+1:nyfin)=gdepw_ps_interp(ji,nyfin-boundary+1:nyfin)
+        G1%wgt(ji,nyfin-boundary+1:nyfin) = 1.
+     ELSE
+        G1%gdepw_ps(ji,nyfin-nbghostcellsfine:nyfin) = 0.
+     ENDIF
+  END DO
+  !
+  !clem: recalculate interpolation everywhere before linear connection (useless to me??)
+  IF( ln_agrif_domain ) THEN                
+     gdepw_ps_interp = 0.
+     CALL Check_interp(G0,gdepw_ps_interp)
+  ENDIF
+  !
+  ! -------------------------------------------------------
+  ! Bathymetry between boundaries and interior (npt_connect)                 
+  ! --------------------------------------------------------
+  ! Make linear connection (on npt_connect*irafx points) between the boundaries and the interior
+  IF( ln_agrif_domain ) THEN
+     boundary = (npt_copy + npt_connect)*irafx + nbghostcellsfine + 1
+  ELSE
+     boundary = (npt_copy + npt_connect)*irafx
+  ENDIF
+
+  IF( npt_connect > 0 ) THEN
+     WRITE(*,*) ' linear connection on ',npt_connect,'coarse grid points'
+
+     wghts = 1.
+     DO ji = boundary - npt_connect*irafx + 1 , boundary
+        wghts = wghts - (1. / (npt_connect*irafx + 1. ) )
+        DO jj=1,nyfin
+           IF (G1%gdepw_ps(nbghostcellsfine+1,jj) > 0.)       G1%wgt(ji,jj) = MAX(wghts, G1%wgt(ji,jj))  
+        END DO
      END DO
-     !
-     DO ji=1,nxfin    ! South and North
-        IF (gdepw_ps_interp(ji,nbghostcellsfine+1)>0.) THEN
-           G1%gdepw_ps(ji,1:boundary) = gdepw_ps_interp(ji,1:boundary)
-           G1%wgt(ji,1:boundary) = 1.
-        ELSE
-           G1%gdepw_ps(ji,1:nbghostcellsfine+1)=0. 
-        ENDIF
-        !
-        IF (gdepw_ps_interp(ji,nyfin-nbghostcellsfine)>0.) THEN
-           G1%gdepw_ps(ji,nyfin-boundary+1:nyfin)=gdepw_ps_interp(ji,nyfin-boundary+1:nyfin)
-           G1%wgt(ji,nyfin-boundary+1:nyfin) = 1.
-        ELSE
-           G1%gdepw_ps(ji,nyfin-nbghostcellsfine:nyfin) = 0.
-        ENDIF
+
+     wghts = 1.
+     DO ji = nxfin - (boundary - npt_connect*irafx), nxfin - boundary +1 , -1
+        wghts = wghts - (1. / (npt_connect*irafx + 1. ) )
+        DO jj=1,nyfin
+           IF (G1%gdepw_ps(nxfin-nbghostcellsfine,jj) > 0.)   G1%wgt(ji,jj) = MAX(wghts, G1%wgt(ji,jj))
+        END DO
      END DO
-     !
-     !clem: recalculate interpolation everywhere before linear connection (useless to me??)
-     IF( ln_agrif_domain ) THEN                
-        gdepw_ps_interp = 0.
-        CALL Check_interp(G0,gdepw_ps_interp)
-     ENDIF
-     !
-     ! -------------------------------------------------------
-     ! Bathymetry between boundaries and interior (npt_connect)                 
-     ! --------------------------------------------------------
-     ! Make linear connection (on npt_connect*irafx points) between the boundaries and the interior
-     IF( ln_agrif_domain ) THEN
-        boundary = (npt_copy + npt_connect)*irafx + nbghostcellsfine + 1
-     ELSE
-        boundary = (npt_copy + npt_connect)*irafx
-     ENDIF
-
-     IF( npt_connect > 0 ) THEN
-        WRITE(*,*) ' linear connection on ',npt_connect,'coarse grid points'
-
-        wghts = 1.
-        DO ji = boundary - npt_connect*irafx + 1 , boundary
-           wghts = wghts - (1. / (npt_connect*irafx + 1. ) )
-           DO jj=1,nyfin
-              IF (G1%gdepw_ps(nbghostcellsfine+1,jj) > 0.)       G1%wgt(ji,jj) = MAX(wghts, G1%wgt(ji,jj))  
-           END DO
+
+     wghts = 1.
+     DO jj = boundary - npt_connect*irafy + 1 , boundary
+        wghts = wghts - (1. / (npt_connect*irafy + 1. ) )
+        DO ji=1,nxfin
+           IF (G1%gdepw_ps(ji,nbghostcellsfine+1) > 0.)       G1%wgt(ji,jj) = MAX(wghts, G1%wgt(ji,jj))
         END DO
-
-        wghts = 1.
-        DO ji = nxfin - (boundary - npt_connect*irafx), nxfin - boundary +1 , -1
-           wghts = wghts - (1. / (npt_connect*irafx + 1. ) )
-           DO jj=1,nyfin
-              IF (G1%gdepw_ps(nxfin-nbghostcellsfine,jj) > 0.)   G1%wgt(ji,jj) = MAX(wghts, G1%wgt(ji,jj))
-           END DO
+     END DO
+
+     wghts = 1.
+     DO jj = nyfin - (boundary - npt_connect*irafy) , nyfin - boundary +1, -1
+        wghts = wghts - (1. / (npt_connect*irafy + 1. ) )
+        DO ji=1,nxfin
+           IF (G1%gdepw_ps(ji,nyfin-nbghostcellsfine) > 0.)   G1%wgt(ji,jj) = MAX(wghts, G1%wgt(ji,jj))
         END DO
-
-        wghts = 1.
-        DO jj = boundary - npt_connect*irafy + 1 , boundary
-           wghts = wghts - (1. / (npt_connect*irafy + 1. ) )
-           DO ji=1,nxfin
-              IF (G1%gdepw_ps(ji,nbghostcellsfine+1) > 0.)       G1%wgt(ji,jj) = MAX(wghts, G1%wgt(ji,jj))
-           END DO
-        END DO
-
-        wghts = 1.
-        DO jj = nyfin - (boundary - npt_connect*irafy) , nyfin - boundary +1, -1
-           wghts = wghts - (1. / (npt_connect*irafy + 1. ) )
-           DO ji=1,nxfin
-              IF (G1%gdepw_ps(ji,nyfin-nbghostcellsfine) > 0.)   G1%wgt(ji,jj) = MAX(wghts, G1%wgt(ji,jj))
-           END DO
-        END DO
-        IF (.NOT.identical_grids) THEN
-           G1%gdepw_ps(:,:) = (1.-G1%wgt(:,:)) * G1%gdepw_ps(:,:) + gdepw_ps_interp(:,:)*G1%wgt(:,:)
-        ENDIF
-
-     ENDIF
-  ENDIF
+     END DO
+     IF (.NOT.identical_grids) THEN
+        G1%gdepw_ps(:,:) = (1.-G1%wgt(:,:)) * G1%gdepw_ps(:,:) + gdepw_ps_interp(:,:)*G1%wgt(:,:)
+     ENDIF
+
+  ENDIF
+!!$  ENDIF
 
   ! replace G1%bathy_meter by G1%gdepw_ps
