Index: /NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_oce_sponge.F90
===================================================================
--- /NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_oce_sponge.F90	(revision 11826)
+++ /NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_oce_sponge.F90	(revision 11827)
@@ -294,12 +294,12 @@
       DO jj = 2, jpjm1
          DO ji = 2, jpim1
-            IF ((fspu(ji-1,jj)==0._wp).AND.(fspu(ji,jj)==0._wp)) mbkt_parent(ji,jj) = 0
-            IF ((fspv(ji,jj-1)==0._wp).AND.(fspv(ji,jj)==0._wp)) mbkt_parent(ji,jj) = 0
+            IF ((fspu(ji-1,jj)==0._wp).AND.(fspu(ji,jj)==0._wp).AND. &
+            &   (fspv(ji,jj-1)==0._wp).AND.(fspv(ji,jj)==0._wp)) mbkt_parent(ji,jj) = 0
 !
-            IF ((fspt(ji+1,jj)==0._wp).AND.(fspt(ji,jj)==0._wp)) mbku_parent(ji,jj) = 0
-            IF ((fspt(ji,jj+1)==0._wp).AND.(fspt(ji,jj)==0._wp)) mbkv_parent(ji,jj) = 0
+            IF ((fspt(ji+1,jj)==0._wp).AND.(fspt(ji,jj)==0._wp).AND. &
+            &   (fspf(ji,jj-1)==0._wp).AND.(fspf(ji,jj)==0._wp)) mbku_parent(ji,jj) = 0
 !
-            IF ((fspf(ji,jj-1)==0._wp).AND.(fspf(ji,jj)==0._wp)) mbku_parent(ji,jj) = 0
-            IF ((fspf(ji-1,jj)==0._wp).AND.(fspf(ji,jj)==0._wp)) mbkv_parent(ji,jj) = 0
+            IF ((fspt(ji,jj+1)==0._wp).AND.(fspt(ji,jj)==0._wp).AND. &
+            &   (fspf(ji-1,jj)==0._wp).AND.(fspf(ji,jj)==0._wp)) mbkv_parent(ji,jj) = 0
 !
             IF (mbkt(ji,jj) == 0) mbkt_parent(ji,jj) = 0
@@ -310,9 +310,9 @@
       !
       ztabramp(:,:) = REAL( mbkt_parent(:,:), wp )   ;   CALL lbc_lnk( 'Agrif_Sponge', ztabramp, 'T', 1. )
-      mbkt_parent(:,:) = MAX( NINT( ztabramp(:,:) ), 1 )
+      mbkt_parent(:,:) = NINT( ztabramp(:,:) )
       ztabramp(:,:) = REAL( mbku_parent(:,:), wp )   ;   CALL lbc_lnk( 'Agrif_Sponge', ztabramp, 'U', 1. )
-      mbku_parent(:,:) = MAX( NINT( ztabramp(:,:) ), 1 )
+      mbku_parent(:,:) = NINT( ztabramp(:,:) )
       ztabramp(:,:) = REAL( mbkv_parent(:,:), wp )   ;   CALL lbc_lnk( 'Agrif_Sponge', ztabramp, 'V', 1. )
-      mbkv_parent(:,:) = MAX( NINT( ztabramp(:,:) ), 1 )
+      mbkv_parent(:,:) = NINT( ztabramp(:,:) )
 #endif
       !
@@ -393,5 +393,4 @@
                tabres_child(ji,jj,:,:) = 0._wp 
                N_in = mbkt_parent(ji,jj)
-!               IF (( tmask(ji,jj,1) == 0._wp ).OR.(fspt(ji,jj)==0._wp)) N_in = 0
                zhtot = 0._wp
                DO jk=1,N_in !k2 = jpk of parent grid
@@ -558,5 +557,4 @@
                tabres_child(ji,jj,:) = 0._wp
                N_in = mbku_parent(ji,jj)
-!               IF (( umask(ji,jj,1) == 0._wp ).OR.(fspu(ji,jj)==0._wp)) N_in = 0
                zhtot = 0._wp
                DO jk=1,N_in
@@ -735,5 +733,4 @@
                tabres_child(ji,jj,:) = 0._wp
                N_in = mbkv_parent(ji,jj)
-!               IF (( vmask(ji,jj,1) == 0._wp ).OR.(fspv(ji,jj)==0._wp)) N_in = 0
                zhtot = 0._wp
                DO jk=1,N_in
Index: /NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_oce_update.F90
===================================================================
--- /NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_oce_update.F90	(revision 11826)
+++ /NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_oce_update.F90	(revision 11827)
@@ -295,5 +295,6 @@
       !
       IF (before) THEN
-         AGRIF_SpecialValue = -999._wp
+!jc_alt
+!         AGRIF_SpecialValue = -999._wp
          DO jn = n1,n2-1
             DO jk=k1,k2
Index: /NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_user.F90
===================================================================
--- /NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_user.F90	(revision 11826)
+++ /NEMO/branches/2019/dev_r11233_AGRIF-05_jchanut_vert_coord_interp/src/NST/agrif_user.F90	(revision 11827)
@@ -383,7 +383,7 @@
       CALL Agrif_Set_bc( vn_interp_id, (/0,ind1-1/) )
 
-      CALL Agrif_Set_bc( tsn_sponge_id, (/-nn_sponge_len*Agrif_irhox(),0/) )  ! if west and rhox=3 and sponge=2 and ghost=1: columns 2 to 9 
-      CALL Agrif_Set_bc(  un_sponge_id, (/-nn_sponge_len*Agrif_irhox(),0/) )
-      CALL Agrif_Set_bc(  vn_sponge_id, (/-nn_sponge_len*Agrif_irhox(),0/) )
+      CALL Agrif_Set_bc( tsn_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) )  ! if west and rhox=3 and sponge=2 and ghost=1: columns 2 to 9 
+      CALL Agrif_Set_bc(  un_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) )
+      CALL Agrif_Set_bc(  vn_sponge_id, (/-nn_sponge_len*Agrif_irhox()-1,0/) )
 
       CALL Agrif_Set_bc(        sshn_id, (/0,ind1-1/) )
@@ -398,6 +398,6 @@
 # if defined key_vertical
       ! extend the interpolation zone by 1 more point than necessary:
-      CALL Agrif_Set_bc(  mbkt_id, (/-nn_sponge_len*Agrif_irhox()-1,ind1/) )
-      CALL Agrif_Set_bc(  ht0_id,  (/-nn_sponge_len*Agrif_irhox()-1,ind1/) )
+      CALL Agrif_Set_bc(  mbkt_id, (/-nn_sponge_len*Agrif_irhox()-2,ind1/) )
+      CALL Agrif_Set_bc(  ht0_id,  (/-nn_sponge_len*Agrif_irhox()-2,ind1/) )
 # endif
 
