Index: branches/2017/dev_r7963_nemo_v3_6_AGRIF-3_AGRIFVVL/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90
===================================================================
--- branches/2017/dev_r7963_nemo_v3_6_AGRIF-3_AGRIFVVL/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 7977)
+++ branches/2017/dev_r7963_nemo_v3_6_AGRIF-3_AGRIFVVL/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 7988)
@@ -228,4 +228,14 @@
                   & Agrif_Fixed(), 'Step', Agrif_Nb_Step()
 
+      ! Save "old" scale factor (prior update) for subsequent asselin correction
+      ! of prognostic variables (needed to update initial state only)
+      fse3u_a(:,:,:) = fse3u_n(:,:,:)
+      fse3v_a(:,:,:) = fse3v_n(:,:,:)
+      hu_a(:,:) = hu(:,:)
+      hv_a(:,:) = hv(:,:)
+
+      ! Vertical scale factor interpolations
+      ! ------------------------------------
+      !
       CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3u_n(:,:,:),  'U'  )
       CALL dom_vvl_interpol( fse3t_n(:,:,:), fse3v_n(:,:,:),  'V'  )
@@ -310,8 +320,8 @@
                      DO ji=i1,i2
                         IF( tabres(ji,jj,jk,jn) .NE. 0. ) THEN
-                           tsb(ji,jj,jk,jn) = tsb(ji,jj,jk,jn) & 
-                                 & + atfp * ( tabres(ji,jj,jk,jn) &
-                                 &             - tsn(ji,jj,jk,jn)*fse3t_a(ji,jj,jk) ) & 
-                                 & * tmask(ji,jj,jk) / fse3t_b(ji,jj,jk)
+                           tsb(ji,jj,jk,jn) = ( tsb(ji,jj,jk,jn)*fse3t_b(ji,jj,jk)   & ! jc: should be fse3t_b prior update
+                                & + atfp * ( tabres(ji,jj,jk,jn)                     &
+                                &             - tsn(ji,jj,jk,jn)*fse3t_a(ji,jj,jk) ) & 
+                                & * tmask(ji,jj,jk) ) / fse3t_b(ji,jj,jk)
                         ENDIF
                      ENDDO
@@ -367,8 +377,8 @@
                   !
                   IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
-                     ub(ji,jj,jk) = ub(ji,jj,jk) & 
-                           & + atfp * ( tabres(ji,jj,jk)                     & 
+                     ub(ji,jj,jk) = (       ub(ji,jj,jk)*fse3u_b(ji,jj,jk)   & ! jc: should be fse3u_b prior update
+                           & + atfp * ( tabres(ji,jj,jk)                     &
                            &              - un(ji,jj,jk)*fse3u_a(ji,jj,jk) ) & 
-                           & * umask(ji,jj,jk) / fse3u_b(ji,jj,jk)
+                           & * umask(ji,jj,jk) ) / fse3u_b(ji,jj,jk)
                   ENDIF
                   !
@@ -413,8 +423,8 @@
                   !
                   IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
-                     vb(ji,jj,jk) = vb(ji,jj,jk) & 
+                     vb(ji,jj,jk) = (       vb(ji,jj,jk)*fse3v_b(ji,jj,jk)   & ! jc: should be fse3v_b prior update
                            & + atfp * ( tabres(ji,jj,jk)                     & 
                            &              - vn(ji,jj,jk)*fse3v_a(ji,jj,jk) ) & 
-                           & * vmask(ji,jj,jk) / fse3v_b(ji,jj,jk)
+                           & * vmask(ji,jj,jk) ) / fse3v_b(ji,jj,jk)
                   ENDIF
                   !
@@ -809,5 +819,5 @@
             fsdept_b(i1:i2,j1:j2,1) = 0.5_wp * fse3w_b(i1:i2,j1:j2,1)
             !
-            DO jk = 2, jpkm1
+            DO jk = 2, jpk
                DO jj = j1,j2
                   DO ji = i1,i2            
@@ -823,8 +833,13 @@
                END DO
             END DO
+            !
          ENDIF        
          !
          ! 2) Updates at now time step:
          ! ----------------------------
+         !
+         ! Save "old" scale factor (prior update) for subsequent asselin correction
+         ! of prognostic variables (needed to update initial state only)
+         fse3t_a(i1:i2,j1:j2,k1:k2) = fse3t_n(i1:i2,j1:j2,k1:k2)
          !
          ! Update vertical scale factor at T-points:
@@ -843,5 +858,5 @@
          fsde3w_n(i1:i2,j1:j2,1) = fsdept_n(i1:i2,j1:j2,1) - (ht(i1:i2,j1:j2)-ht_0(i1:i2,j1:j2)) ! Last term in the rhs is ssh
          !
-         DO jk = 2, jpkm1
+         DO jk = 2, jpk
             DO jj = j1,j2
                DO ji = i1,i2            
