Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 5902)
@@ -72,5 +72,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
    ln_bt_nn_auto =    .FALSE.          !  Set nn_baro automatically to be just below
@@ -344,9 +344,7 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
-!                          !  explicit free surface                     ("key_dynspg_exp")
-!                          !  split-explicit free surface               ("key_dynspg_ts")
-
+&namdyn_spg    !   surface pressure gradient 
+!-----------------------------------------------------------------------
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm	(revision 5902)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys  key_bdy key_tide key_dynspg_ts  key_zdfgls  key_vvl key_diainstant key_mpp_mpi key_iomput
+ bld::tool::fppkeys  key_bdy key_tide  key_zdfgls  key_vvl key_diainstant key_mpp_mpi key_iomput
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 5902)
@@ -64,5 +64,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
@@ -261,6 +261,9 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_exp  = .false.   !  explicit free surface
+   ln_dynspg_ts   = .false.   !  split-explicit free surface
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 5902)
@@ -66,5 +66,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
@@ -286,7 +286,7 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
-
+&namdyn_spg    !   surface pressure gradient 
+!-----------------------------------------------------------------------
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm	(revision 5902)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_dynspg_ts key_zdftke key_iomput key_mpp_mpi
+ bld::tool::fppkeys key_zdftke key_iomput key_mpp_mpi
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 5902)
@@ -69,5 +69,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
@@ -287,6 +287,7 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_BFM/cpp_GYRE_BFM.fcm
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_BFM/cpp_GYRE_BFM.fcm	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_BFM/cpp_GYRE_BFM.fcm	(revision 5902)
@@ -1,2 +1,2 @@
-bld::tool::fppkeys key_dynspg_ts key_zdftke key_top key_my_trc key_mpp_mpi key_iomput
+bld::tool::fppkeys key_zdftke key_top key_my_trc key_mpp_mpi key_iomput
 inc $BFMDIR/src/nemo/bfm.fcm
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 5902)
@@ -59,5 +59,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
@@ -206,4 +206,8 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 5902)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys  key_dynspg_ts key_zdftke key_top key_pisces_reduced key_mpp_mpi
+bld::tool::fppkeys key_zdftke key_top key_pisces_reduced key_mpp_mpi
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 5902)
@@ -56,5 +56,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
@@ -205,4 +205,8 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 5902)
@@ -48,5 +48,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
@@ -188,4 +188,8 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 5902)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_ts key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi key_iomput
+bld::tool::fppkeys key_trabbl key_lim2 key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi key_iomput
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 5902)
@@ -55,5 +55,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
@@ -204,4 +204,8 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 5902)
@@ -48,5 +48,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
@@ -194,4 +194,8 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm	(revision 5902)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_trabbl key_lim3 key_vvl key_dynspg_ts key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi key_diaobs key_asminc key_iomput key_nosignedzero
+ bld::tool::fppkeys key_trabbl key_lim3 key_vvl key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi key_diaobs key_asminc key_iomput key_nosignedzero
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 5902)
@@ -48,5 +48,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
@@ -188,4 +188,8 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 5902)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_ts key_zdftke key_zdfddm key_zdftmx key_top key_pisces key_mpp_mpi key_iomput
+bld::tool::fppkeys key_trabbl key_lim2 key_zdftke key_zdfddm key_zdftmx key_top key_pisces key_mpp_mpi key_iomput
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg	(revision 5902)
@@ -50,5 +50,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
 /
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_SAS_LIM/cpp_ORCA2_SAS_LIM.fcm
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_SAS_LIM/cpp_ORCA2_SAS_LIM.fcm	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/ORCA2_SAS_LIM/cpp_ORCA2_SAS_LIM.fcm	(revision 5902)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_ts key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi
+ bld::tool::fppkeys key_trabbl key_lim2 key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5902)
@@ -163,5 +163,5 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+&namsplit      !   time splitting parameters                            ("ln_dynspg_ts=T")
 !-----------------------------------------------------------------------
    ln_bt_fw      =    .TRUE.           !  Forward integration of barotropic equations
@@ -817,5 +817,5 @@
 !!   namdyn_vor    advection scheme
 !!   namdyn_hpg    hydrostatic pressure gradient
-!!   namdyn_spg    surface pressure gradient                            (CPP key only)
+!!   namdyn_spg    surface pressure gradient
 !!   namdyn_ldf    lateral diffusion scheme
 !!======================================================================
@@ -865,9 +865,9 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
-!                          !  explicit free surface                     ("key_dynspg_exp")
-!                          !  split-explicit free surface               ("key_dynspg_ts")
-
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_exp  = .false.   !  explicit free surface
+   ln_dynspg_ts   = .true.    !  split-explicit free surface
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90	(revision 5902)
@@ -28,5 +28,4 @@
    USE lib_mpp
    USE wrk_nemo
-   USE dynspg_oce
    USE zdf_oce
  
@@ -79,13 +78,10 @@
       !!
       INTEGER :: ji,jj,jk, j1,j2, i1,i2
-      REAL(wp) :: timeref
-      REAL(wp) :: z2dt, znugdt
-      REAL(wp) :: zrhox, zrhoy
-      REAL(wp), POINTER, DIMENSION(:,:) :: spgv1, spgu1
+      REAL(wp), POINTER, DIMENSION(:,:) :: zub, zvb
       !!----------------------------------------------------------------------  
 
       IF( Agrif_Root() )   RETURN
 
-      CALL wrk_alloc( jpi, jpj, spgv1, spgu1 )
+      CALL wrk_alloc( jpi, jpj, zub, zvb )
 
       Agrif_SpecialValue=0.
@@ -96,16 +92,5 @@
 
       Agrif_UseSpecialValue = .FALSE.
-
-      zrhox = Agrif_Rhox()
-      zrhoy = Agrif_Rhoy()
-
-      timeref = 1.
-      ! time step: leap-frog
-      z2dt = 2. * rdt
-      ! time step: Euler if restart from rest
-      IF( neuler == 0 .AND. kt == nit000 ) z2dt = rdt
-      ! coefficients
-      znugdt =  grav * z2dt    
-
+ 
       ! prevent smoothing in ghost cells
       i1=1
@@ -120,208 +105,279 @@
 
       IF((nbondi == -1).OR.(nbondi == 2)) THEN
-         spgu(2,:) = ua_b(2,:)
-
-         DO jk=1,jpkm1
+
+         ! Smoothing
+         ! ---------
+         IF ( .NOT.ln_dynspg_ts ) THEN ! Store transport
+            ua_b(2,:)=0._wp
+            DO jk=1,jpkm1
+               DO jj=1,jpj
+                  ua_b(2,jj) = ua_b(2,jj) + fse3u_a(2,jj,jk) * ua(2,jj,jk)
+               END DO
+            END DO
+            DO jj=1,jpj
+               ua_b(2,jj) = ua_b(2,jj) * hur_a(2,jj)            
+            END DO
+         ENDIF
+
+         DO jk=1,jpkm1                 ! Smooth
             DO jj=j1,j2
-               ua(2,jj,jk) = 0.25*(ua(1,jj,jk)+2.*ua(2,jj,jk)+ua(3,jj,jk))
+               ua(2,jj,jk) = 0.25_wp*(ua(1,jj,jk)+2._wp*ua(2,jj,jk)+ua(3,jj,jk))
                ua(2,jj,jk) = ua(2,jj,jk) * umask(2,jj,jk)
             END DO
          END DO
 
-         spgu1(2,:)=0.
-
+         zub(2,:)=0._wp                ! Correct transport
          DO jk=1,jpkm1
             DO jj=1,jpj
-               spgu1(2,jj)=spgu1(2,jj)+fse3u(2,jj,jk)*ua(2,jj,jk)
-            END DO
-         END DO
-
+               zub(2,jj) = zub(2,jj) + fse3u_a(2,jj,jk) * ua(2,jj,jk)
+            END DO
+         END DO
          DO jj=1,jpj
-            IF (umask(2,jj,1).NE.0.) THEN
-               spgu1(2,jj)=spgu1(2,jj)/hu(2,jj)
-            ENDIF
-         END DO
-
-         DO jk=1,jpkm1
+            zub(2,jj) = zub(2,jj) * hur_a(2,jj)
+         END DO
+
+         DO jk=1,jpkm1
+            DO jj=1,jpj
+               ua(2,jj,jk) = (ua(2,jj,jk)+ua_b(2,jj)-zub(2,jj))*umask(2,jj,jk)
+            END DO
+         END DO
+
+         ! Set tangential velocities to time splitting estimate
+         !-----------------------------------------------------
+         IF ( ln_dynspg_ts) THEN
+            zvb(2,:)=0._wp
+            DO jk=1,jpkm1
+               DO jj=1,jpj
+                  zvb(2,jj) = zvb(2,jj) + fse3v_a(2,jj,jk) * va(2,jj,jk)
+               END DO
+            END DO
+            DO jj=1,jpj
+               zvb(2,jj) = zvb(2,jj) * hvr_a(2,jj)
+            END DO
+            DO jk=1,jpkm1
+               DO jj=1,jpj
+                  va(2,jj,jk) = (va(2,jj,jk)+va_b(2,jj)-zvb(2,jj))*vmask(2,jj,jk)
+               END DO
+            END DO
+         ENDIF
+
+         ! Mask domain edges:
+         !-------------------
+         DO jk=1,jpkm1
+            DO jj=1,jpj
+               ua(1,jj,jk) = 0._wp
+               va(1,jj,jk) = 0._wp
+            END DO
+         END DO         
+
+      ENDIF
+
+      IF((nbondi == 1).OR.(nbondi == 2)) THEN
+
+         ! Smoothing
+         ! ---------
+         IF ( .NOT.ln_dynspg_ts ) THEN ! Store transport
+            ua_b(nlci-2,:)=0._wp
+            DO jk=1,jpkm1
+               DO jj=1,jpj
+                  ua_b(nlci-2,jj) = ua_b(nlci-2,jj) + fse3u_a(nlci-2,jj,jk) * ua(nlci-2,jj,jk)
+               END DO
+            END DO
+            DO jj=1,jpj
+               ua_b(nlci-2,jj) = ua_b(nlci-2,jj) * hur_a(nlci-2,jj)            
+            END DO
+         ENDIF
+
+         DO jk=1,jpkm1                 ! Smooth
             DO jj=j1,j2
-               ua(2,jj,jk) = (ua(2,jj,jk)+spgu(2,jj)-spgu1(2,jj))*umask(2,jj,jk)
-            END DO
-         END DO
-
-#if defined key_dynspg_ts
+               ua(nlci-2,jj,jk) = 0.25_wp*(ua(nlci-3,jj,jk)+2._wp*ua(nlci-2,jj,jk)+ua(nlci-1,jj,jk))
+               ua(nlci-2,jj,jk) = ua(nlci-2,jj,jk) * umask(nlci-2,jj,jk)
+            END DO
+         END DO
+
+         zub(nlci-2,:)=0._wp           ! Correct transport
+         DO jk=1,jpkm1
+            DO jj=1,jpj
+               zub(nlci-2,jj) = zub(nlci-2,jj) + fse3u_a(nlci-2,jj,jk) * ua(nlci-2,jj,jk)
+            END DO
+         END DO
+         DO jj=1,jpj
+            zub(nlci-2,jj) = zub(nlci-2,jj) * hur_a(nlci-2,jj)
+         END DO
+
+         DO jk=1,jpkm1
+            DO jj=1,jpj
+               ua(nlci-2,jj,jk) = (ua(nlci-2,jj,jk)+ua_b(nlci-2,jj)-zub(nlci-2,jj))*umask(nlci-2,jj,jk)
+            END DO
+         END DO
+
          ! Set tangential velocities to time splitting estimate
-         spgv1(2,:)=0.
-         DO jk=1,jpkm1
+         !-----------------------------------------------------
+         IF ( ln_dynspg_ts) THEN
+            zvb(nlci-1,:)=0._wp
+            DO jk=1,jpkm1
+               DO jj=1,jpj
+                  zvb(nlci-1,jj) = zvb(nlci-1,jj) + fse3v_a(nlci-1,jj,jk) * va(nlci-1,jj,jk)
+               END DO
+            END DO
             DO jj=1,jpj
-               spgv1(2,jj)=spgv1(2,jj)+fse3v_a(2,jj,jk)*va(2,jj,jk)
-            END DO
-         END DO
-         DO jj=1,jpj
-            spgv1(2,jj)=spgv1(2,jj)*hvr_a(2,jj)
-         END DO
+               zvb(nlci-1,jj) = zvb(nlci-1,jj) * hvr_a(nlci-1,jj)
+            END DO
+            DO jk=1,jpkm1
+               DO jj=1,jpj
+                  va(nlci-1,jj,jk) = (va(nlci-1,jj,jk)+va_b(nlci-1,jj)-zvb(nlci-1,jj))*vmask(nlci-1,jj,jk)
+               END DO
+            END DO
+         ENDIF
+
+         ! Mask domain edges:
+         !-------------------
          DO jk=1,jpkm1
             DO jj=1,jpj
-               va(2,jj,jk) = (va(2,jj,jk)+va_b(2,jj)-spgv1(2,jj))*vmask(2,jj,jk)
-            END DO
-         END DO
-#endif
-
-      ENDIF
-
-      IF((nbondi == 1).OR.(nbondi == 2)) THEN
-         spgu(nlci-2,:) = ua_b(nlci-2,:)
-
-         DO jk=1,jpkm1
-            DO jj=j1,j2
-               ua(nlci-2,jj,jk) = 0.25*(ua(nlci-3,jj,jk)+2.*ua(nlci-2,jj,jk)+ua(nlci-1,jj,jk))
-
-               ua(nlci-2,jj,jk) = ua(nlci-2,jj,jk) * umask(nlci-2,jj,jk)
-
-            END DO
-         END DO
-         spgu1(nlci-2,:)=0.
-         DO jk=1,jpkm1
-            DO jj=1,jpj
-               spgu1(nlci-2,jj)=spgu1(nlci-2,jj)+fse3u(nlci-2,jj,jk)*ua(nlci-2,jj,jk)*umask(nlci-2,jj,jk)
-            END DO
-         END DO
-         DO jj=1,jpj
-            IF (umask(nlci-2,jj,1).NE.0.) THEN
-               spgu1(nlci-2,jj)=spgu1(nlci-2,jj)/hu(nlci-2,jj)
-            ENDIF
-         END DO
-         DO jk=1,jpkm1
-            DO jj=j1,j2
-               ua(nlci-2,jj,jk) = (ua(nlci-2,jj,jk)+spgu(nlci-2,jj)-spgu1(nlci-2,jj))*umask(nlci-2,jj,jk)
-            END DO
-         END DO
-
-#if defined key_dynspg_ts
+               ua(nlci-1,jj,jk) = 0._wp
+               va(nlci  ,jj,jk) = 0._wp
+            END DO
+         END DO 
+
+      ENDIF
+
+      IF((nbondj == -1).OR.(nbondj == 2)) THEN
+
+         ! Smoothing
+         ! ---------
+         IF ( .NOT.ln_dynspg_ts ) THEN ! Store transport
+            va_b(:,2)=0._wp
+            DO jk=1,jpkm1
+               DO ji=1,jpi
+                  va_b(ji,2) = va_b(ji,2) + fse3v_a(ji,2,jk) * va(ji,2,jk)
+               END DO
+            END DO
+            DO ji=1,jpi
+               va_b(ji,2) = va_b(ji,2) * hvr_a(ji,2)            
+            END DO
+         ENDIF
+
+         DO jk=1,jpkm1                 ! Smooth
+            DO ji=i1,i2
+               va(ji,2,jk)=0.25_wp*(va(ji,1,jk)+2._wp*va(ji,2,jk)+va(ji,3,jk))
+               va(ji,2,jk)=va(ji,2,jk)*vmask(ji,2,jk)
+            END DO
+         END DO
+
+         zvb(:,2)=0._wp                ! Correct transport
+         DO jk=1,jpkm1
+            DO ji=1,jpi
+               zvb(ji,2) = zvb(ji,2) + fse3v_a(ji,2,jk) * va(ji,2,jk) * vmask(ji,2,jk)
+            END DO
+         END DO
+         DO ji=1,jpi
+            zvb(ji,2) = zvb(ji,2) * hvr_a(ji,2)
+         END DO
+         DO jk=1,jpkm1
+            DO ji=1,jpi
+               va(ji,2,jk) = (va(ji,2,jk)+va_b(ji,2)-zvb(ji,2))*vmask(ji,2,jk)
+            END DO
+         END DO
+
          ! Set tangential velocities to time splitting estimate
-         spgv1(nlci-1,:)=0._wp
-         DO jk=1,jpkm1
-            DO jj=1,jpj
-               spgv1(nlci-1,jj)=spgv1(nlci-1,jj)+fse3v_a(nlci-1,jj,jk)*va(nlci-1,jj,jk)*vmask(nlci-1,jj,jk)
-            END DO
-         END DO
-
-         DO jj=1,jpj
-            spgv1(nlci-1,jj)=spgv1(nlci-1,jj)*hvr_a(nlci-1,jj)
-         END DO
-
-         DO jk=1,jpkm1
-            DO jj=1,jpj
-               va(nlci-1,jj,jk) = (va(nlci-1,jj,jk)+va_b(nlci-1,jj)-spgv1(nlci-1,jj))*vmask(nlci-1,jj,jk)
-            END DO
-         END DO
-#endif
-
-      ENDIF
-
-      IF((nbondj == -1).OR.(nbondj == 2)) THEN
-         spgv(:,2)=va_b(:,2)
-
-         DO jk=1,jpkm1
+         !-----------------------------------------------------
+         IF ( ln_dynspg_ts ) THEN
+            zub(:,2)=0._wp
+            DO jk=1,jpkm1
+               DO ji=1,jpi
+                  zub(ji,2) = zub(ji,2) + fse3u_a(ji,2,jk) * ua(ji,2,jk) * umask(ji,2,jk)
+               END DO
+            END DO
+            DO ji=1,jpi
+               zub(ji,2) = zub(ji,2) * hur_a(ji,2)
+            END DO
+
+            DO jk=1,jpkm1
+               DO ji=1,jpi
+                  ua(ji,2,jk) = (ua(ji,2,jk)+ua_b(ji,2)-zub(ji,2))*umask(ji,2,jk)
+               END DO
+            END DO
+         ENDIF
+
+         ! Mask domain edges:
+         !-------------------
+         DO jk=1,jpkm1
+            DO ji=1,jpi
+               ua(ji,1,jk) = 0._wp
+               va(ji,1,jk) = 0._wp
+            END DO
+         END DO 
+
+      ENDIF
+
+      IF((nbondj == 1).OR.(nbondj == 2)) THEN
+         ! Smoothing
+         ! ---------
+         IF ( .NOT.ln_dynspg_ts ) THEN ! Store transport
+            va_b(:,nlcj-2)=0._wp
+            DO jk=1,jpkm1
+               DO ji=1,jpi
+                  va_b(ji,nlcj-2) = va_b(ji,nlcj-2) + fse3v_a(ji,nlcj-2,jk) * va(ji,nlcj-2,jk)
+               END DO
+            END DO
+            DO ji=1,jpi
+               va_b(ji,nlcj-2) = va_b(ji,nlcj-2) * hvr_a(ji,nlcj-2)            
+            END DO
+         ENDIF
+
+         DO jk=1,jpkm1                 ! Smooth
             DO ji=i1,i2
-               va(ji,2,jk)=0.25*(va(ji,1,jk)+2.*va(ji,2,jk)+va(ji,3,jk))
-               va(ji,2,jk)=va(ji,2,jk)*vmask(ji,2,jk)
-            END DO
-         END DO
-
-         spgv1(:,2)=0.
-
+               va(ji,nlcj-2,jk)=0.25_wp*(va(ji,nlcj-3,jk)+2._wp*va(ji,nlcj-2,jk)+va(ji,nlcj-1,jk))
+               va(ji,nlcj-2,jk)=va(ji,nlcj-2,jk)*vmask(ji,nlcj-2,jk)
+            END DO
+         END DO
+
+         zvb(:,nlcj-2)=0._wp           ! Correct transport
          DO jk=1,jpkm1
             DO ji=1,jpi
-               spgv1(ji,2)=spgv1(ji,2)+fse3v(ji,2,jk)*va(ji,2,jk)*vmask(ji,2,jk)
-            END DO
-         END DO
-
+               zvb(ji,nlcj-2) = zvb(ji,nlcj-2) + fse3v_a(ji,nlcj-2,jk) * va(ji,nlcj-2,jk) * vmask(ji,nlcj-2,jk)
+            END DO
+         END DO
          DO ji=1,jpi
-            IF (vmask(ji,2,1).NE.0.) THEN
-               spgv1(ji,2)=spgv1(ji,2)/hv(ji,2)
-            ENDIF
-         END DO
-
+            zvb(ji,nlcj-2) = zvb(ji,nlcj-2) * hvr_a(ji,nlcj-2)
+         END DO
          DO jk=1,jpkm1
             DO ji=1,jpi
-               va(ji,2,jk) = (va(ji,2,jk)+spgv(ji,2)-spgv1(ji,2))*vmask(ji,2,jk)
-            END DO
-         END DO
-
-#if defined key_dynspg_ts
+               va(ji,nlcj-2,jk) = (va(ji,nlcj-2,jk)+va_b(ji,nlcj-2)-zvb(ji,nlcj-2))*vmask(ji,nlcj-2,jk)
+            END DO
+         END DO
+
          ! Set tangential velocities to time splitting estimate
-         spgu1(:,2)=0._wp
-         DO jk=1,jpkm1
+         !-----------------------------------------------------
+         IF ( ln_dynspg_ts ) THEN
+            zub(:,nlcj-1)=0._wp
+            DO jk=1,jpkm1
+               DO ji=1,jpi
+                  zub(ji,nlcj-1) = zub(ji,nlcj-1) + fse3u_a(ji,nlcj-1,jk) * ua(ji,nlcj-1,jk) * umask(ji,nlcj-1,jk)
+               END DO
+            END DO
             DO ji=1,jpi
-               spgu1(ji,2)=spgu1(ji,2)+fse3u_a(ji,2,jk)*ua(ji,2,jk)*umask(ji,2,jk)
-            END DO
-         END DO
-
-         DO ji=1,jpi
-            spgu1(ji,2)=spgu1(ji,2)*hur_a(ji,2)
-         END DO
-
+               zub(ji,nlcj-1) = zub(ji,nlcj-1) * hur_a(ji,nlcj-1)
+            END DO
+
+            DO jk=1,jpkm1
+               DO ji=1,jpi
+                  ua(ji,nlcj-1,jk) = (ua(ji,nlcj-1,jk)+ua_b(ji,nlcj-1)-zub(ji,nlcj-1))*umask(ji,nlcj-1,jk)
+               END DO
+            END DO
+         ENDIF
+
+         ! Mask domain edges:
+         !-------------------
          DO jk=1,jpkm1
             DO ji=1,jpi
-               ua(ji,2,jk) = (ua(ji,2,jk)+ua_b(ji,2)-spgu1(ji,2))*umask(ji,2,jk)
-            END DO
-         END DO
-#endif
-      ENDIF
-
-      IF((nbondj == 1).OR.(nbondj == 2)) THEN
-
-         spgv(:,nlcj-2)=va_b(:,nlcj-2)
-
-         DO jk=1,jpkm1
-            DO ji=i1,i2
-               va(ji,nlcj-2,jk)=0.25*(va(ji,nlcj-3,jk)+2.*va(ji,nlcj-2,jk)+va(ji,nlcj-1,jk))
-               va(ji,nlcj-2,jk) = va(ji,nlcj-2,jk) * vmask(ji,nlcj-2,jk)
-            END DO
-         END DO
-
-         spgv1(:,nlcj-2)=0.
-
-         DO jk=1,jpkm1
-            DO ji=1,jpi
-               spgv1(ji,nlcj-2)=spgv1(ji,nlcj-2)+fse3v(ji,nlcj-2,jk)*va(ji,nlcj-2,jk)
-            END DO
-         END DO
-
-         DO ji=1,jpi
-            IF (vmask(ji,nlcj-2,1).NE.0.) THEN
-               spgv1(ji,nlcj-2)=spgv1(ji,nlcj-2)/hv(ji,nlcj-2)
-            ENDIF
-         END DO
-
-         DO jk=1,jpkm1
-            DO ji=1,jpi
-               va(ji,nlcj-2,jk) = (va(ji,nlcj-2,jk)+spgv(ji,nlcj-2)-spgv1(ji,nlcj-2))*vmask(ji,nlcj-2,jk)
-            END DO
-         END DO
-
-#if defined key_dynspg_ts
-         ! Set tangential velocities to time splitting estimate
-         spgu1(:,nlcj-1)=0._wp
-         DO jk=1,jpkm1
-            DO ji=1,jpi
-               spgu1(ji,nlcj-1)=spgu1(ji,nlcj-1)+fse3u_a(ji,nlcj-1,jk)*ua(ji,nlcj-1,jk)
-            END DO
-         END DO
-
-         DO ji=1,jpi
-            spgu1(ji,nlcj-1)=spgu1(ji,nlcj-1)*hur_a(ji,nlcj-1)
-         END DO
-
-         DO jk=1,jpkm1
-            DO ji=1,jpi
-               ua(ji,nlcj-1,jk) = (ua(ji,nlcj-1,jk)+ua_b(ji,nlcj-1)-spgu1(ji,nlcj-1))*umask(ji,nlcj-1,jk)
-            END DO
-         END DO
-#endif
-
-      ENDIF
-      !
-      CALL wrk_dealloc( jpi, jpj, spgv1, spgu1 )
+               ua(ji,nlcj  ,jk) = 0._wp
+               va(ji,nlcj-1,jk) = 0._wp
+            END DO
+         END DO 
+
+      ENDIF
+      !
+      CALL wrk_dealloc( jpi, jpj, zub, zvb )
       !
    END SUBROUTINE Agrif_dyn
@@ -594,4 +650,5 @@
                   END DO
                END DO
+               tsa(nlci,j1:j2,k1:k2,jn) = 0._wp
             ENDDO
          ENDIF
@@ -613,4 +670,5 @@
                   END DO
                END DO
+               tsa(i1:i2,nlcj,k1:k2,jn) = 0._wp
             ENDDO
          ENDIF
@@ -631,4 +689,5 @@
                   END DO
                END DO
+               tsa(1,j1:j2,k1:k2,jn) = 0._wp
             END DO
          ENDIF
@@ -649,4 +708,5 @@
                   END DO
                END DO
+               tsa(i1:i2,1,k1:k2,jn) = 0._wp
             ENDDO
          ENDIF
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 5902)
@@ -11,5 +11,4 @@
    USE lib_mpp
    USE wrk_nemo  
-   USE dynspg_oce
    USE zdf_oce        ! vertical physics: ocean variables 
 
@@ -107,6 +106,5 @@
 # endif
 
-# if defined key_dynspg_ts
-      IF (ln_bt_fw) THEN
+      IF ( ln_dynspg_ts.AND.ln_bt_fw ) THEN
          ! Update time integrated transports
          IF (mod(nbcline,nbclineupdate) == 0) THEN
@@ -128,5 +126,4 @@
          ENDIF
       END IF
-# endif
       !
       nbcline = nbcline + 1
@@ -360,10 +357,10 @@
                !
                ! Update barotropic velocities:
-#if defined key_dynspg_ts
-               IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
-                  zcorr = tabres(ji,jj) - un_b(ji,jj)
-                  ub_b(ji,jj) = ub_b(ji,jj) + atfp * zcorr * umask(ji,jj,1)
-               END IF
-#endif               
+               IF ( .NOT.ln_dynspg_ts .OR. (ln_dynspg_ts.AND.(.NOT.ln_bt_fw)) ) THEN
+                  IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
+                     zcorr = tabres(ji,jj) - un_b(ji,jj)
+                     ub_b(ji,jj) = ub_b(ji,jj) + atfp * zcorr * umask(ji,jj,1)
+                  END IF
+               ENDIF             
                un_b(ji,jj) = tabres(ji,jj) * umask(ji,jj,1)
                !       
@@ -425,10 +422,10 @@
                !
                ! Update barotropic velocities:
-#if defined key_dynspg_ts
-               IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
-                  zcorr = tabres(ji,jj) - vn_b(ji,jj)
-                  vb_b(ji,jj) = vb_b(ji,jj) + atfp * zcorr * vmask(ji,jj,1)
-               END IF
-#endif               
+               IF ( .NOT.ln_dynspg_ts .OR. (ln_dynspg_ts.AND.(.NOT.ln_bt_fw)) ) THEN
+                  IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
+                     zcorr = tabres(ji,jj) - vn_b(ji,jj)
+                     vb_b(ji,jj) = vb_b(ji,jj) + atfp * zcorr * vmask(ji,jj,1)
+                  END IF
+               ENDIF              
                vn_b(ji,jj) = tabres(ji,jj) * vmask(ji,jj,1)
                !       
@@ -470,14 +467,15 @@
          END DO
       ELSE
-#if ! defined key_dynspg_ts
-         IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN
-            DO jj=j1,j2
-               DO ji=i1,i2
-                  sshb(ji,jj) =   sshb(ji,jj) &
-                        & + atfp * ( tabres(ji,jj) - sshn(ji,jj) ) * tmask(ji,jj,1)
-               END DO
-            END DO
+         IF ( .NOT.ln_dynspg_ts .OR. (ln_dynspg_ts.AND.(.NOT.ln_bt_fw)) ) THEN
+            IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN
+               DO jj=j1,j2
+                  DO ji=i1,i2
+                     sshb(ji,jj) =   sshb(ji,jj) &
+                           & + atfp * ( tabres(ji,jj) - sshn(ji,jj) ) * tmask(ji,jj,1)
+                  END DO
+               END DO
+            ENDIF
          ENDIF
-#endif
+
          DO jj=j1,j2
             DO ji=i1,i2
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 5902)
@@ -208,18 +208,18 @@
    CALL Agrif_Bc_variable(vn_sponge_id,calledweight=1.,procname=interpvn_sponge)
 
-#if defined key_dynspg_ts
    Agrif_UseSpecialValue = .TRUE.
    CALL Agrif_Bc_variable(sshn_id,calledweight=1., procname=interpsshn )
 
-   Agrif_UseSpecialValue = ln_spc_dyn
-   CALL Agrif_Bc_variable(unb_id,calledweight=1.,procname=interpunb)
-   CALL Agrif_Bc_variable(vnb_id,calledweight=1.,procname=interpvnb)
-   CALL Agrif_Bc_variable(ub2b_interp_id,calledweight=1.,procname=interpub2b)
-   CALL Agrif_Bc_variable(vb2b_interp_id,calledweight=1.,procname=interpvb2b)
-   ubdy_w(:) = 0.e0 ; vbdy_w(:) = 0.e0 ; hbdy_w(:) =0.e0
-   ubdy_e(:) = 0.e0 ; vbdy_e(:) = 0.e0 ; hbdy_e(:) =0.e0 
-   ubdy_n(:) = 0.e0 ; vbdy_n(:) = 0.e0 ; hbdy_n(:) =0.e0 
-   ubdy_s(:) = 0.e0 ; vbdy_s(:) = 0.e0 ; hbdy_s(:) =0.e0
-#endif
+   IF ( ln_dynspg_ts ) THEN
+      Agrif_UseSpecialValue = ln_spc_dyn
+      CALL Agrif_Bc_variable(unb_id,calledweight=1.,procname=interpunb)
+      CALL Agrif_Bc_variable(vnb_id,calledweight=1.,procname=interpvnb)
+      CALL Agrif_Bc_variable(ub2b_interp_id,calledweight=1.,procname=interpub2b)
+      CALL Agrif_Bc_variable(vb2b_interp_id,calledweight=1.,procname=interpvb2b)
+      ubdy_w(:) = 0.e0 ; vbdy_w(:) = 0.e0 ; hbdy_w(:) =0.e0
+      ubdy_e(:) = 0.e0 ; vbdy_e(:) = 0.e0 ; hbdy_e(:) =0.e0 
+      ubdy_n(:) = 0.e0 ; vbdy_n(:) = 0.e0 ; hbdy_n(:) =0.e0 
+      ubdy_s(:) = 0.e0 ; vbdy_s(:) = 0.e0 ; hbdy_s(:) =0.e0
+   ENDIF
 
    Agrif_UseSpecialValue = .FALSE. 
@@ -276,4 +276,17 @@
          ENDIF
       ENDIF
+
+      ! Check free surface scheme
+      IF ( ( Agrif_Parent(ln_dynspg_ts ).AND.ln_dynspg_exp ).OR.&
+         & ( Agrif_Parent(ln_dynspg_exp).AND.ln_dynspg_ts ) ) THEN
+         WRITE(*,*) 'incompatible free surface scheme between grids'
+         WRITE(*,*) 'parent grid ln_dynspg_ts  :', Agrif_Parent(ln_dynspg_ts )
+         WRITE(*,*) 'parent grid ln_dynspg_exp :', Agrif_Parent(ln_dynspg_exp)
+         WRITE(*,*) 'child grid  ln_dynspg_ts  :', ln_dynspg_ts
+         WRITE(*,*) 'child grid  ln_dynspg_exp :', ln_dynspg_exp
+         WRITE(*,*) 'those logicals should be identical'                  
+         STOP
+      ENDIF
+
       ! check if masks and bathymetries match
       IF(ln_chk_bathy) THEN
@@ -317,5 +330,5 @@
    !
    Agrif_UseSpecialValueInUpdate = .FALSE.
-   nbcline = 0
+   nbcline = 0 
    lk_agrif_doupd = .FALSE.
    !
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 5902)
@@ -107,5 +107,5 @@
       USE oce, ONLY:  zts    => tsa
       USE oce, ONLY:  zuslp  => ua   , zvslp  => va
-      USE oce, ONLY:  zwslpi => ua_sv , zwslpj => va_sv
+      USE zdf_oce, ONLY:  zwslpi => avmu , zwslpj => avmv 
       USE oce, ONLY:  zu     => ub   , zv     => vb,  zw => rke
       !
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 5902)
@@ -29,5 +29,4 @@
    USE iom             ! IOM library
    USE in_out_manager  ! I/O logical units
-   USE dynspg_oce, ONLY: lk_dynspg_ts ! Split-explicit free surface flag
 #if defined key_lim2
    USE ice_2
@@ -391,5 +390,5 @@
 #if defined key_tide
       ! Add tides if not split-explicit free surface else this is done in ts loop
-      IF (.NOT.lk_dynspg_ts) CALL bdy_dta_tides( kt=kt, time_offset=time_offset )
+      IF (.NOT.ln_dynspg_ts) CALL bdy_dta_tides( kt=kt, time_offset=time_offset )
 #endif
       ! end jchanut tschanges
@@ -423,5 +422,4 @@
       !!                
       !!----------------------------------------------------------------------
-      USE dynspg_oce, ONLY: lk_dynspg_ts
       !!
       INTEGER     ::  ib_bdy, jfld, jstart, jend, ierror  ! local indices
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 5902)
@@ -24,5 +24,4 @@
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain
-   USE dynspg_oce      
    USE bdy_oce         ! ocean open boundary conditions
    USE bdydyn2d        ! open boundary conditions for barotropic solution
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90	(revision 5902)
@@ -23,5 +23,4 @@
    USE bdy_oce         ! ocean open boundary conditions
    USE bdylib          ! BDY library routines
-   USE dynspg_oce      ! for barotropic variables
    USE phycst          ! physical constants
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5902)
@@ -33,5 +33,4 @@
 !   USE tide_mod       ! Useless ??
    USE fldread
-   USE dynspg_oce, ONLY: lk_dynspg_ts
 
    IMPLICIT NONE
@@ -270,5 +269,5 @@
             ENDIF
             !
-            IF ( lk_dynspg_ts ) THEN ! Allocate arrays to save slowly varying boundary data during
+            IF ( ln_dynspg_ts ) THEN ! Allocate arrays to save slowly varying boundary data during
                                      ! time splitting integration
                ALLOCATE( dta_bdy_s(ib_bdy)%ssh ( ilen0(1) ) )
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 5902)
@@ -14,6 +14,4 @@
    USE dom_oce         ! ocean space and time domain
    USE phycst
-   USE dynspg_oce
-   USE dynspg_ts
    USE daymod
    USE tide_mod
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5902)
@@ -45,5 +45,4 @@
    USE iom
    USE ioipsl
-   USE dynspg_oce, ONLY: un_adv, vn_adv ! barotropic velocities     
 
 #if defined key_lim2
@@ -205,9 +204,10 @@
          CALL iom_put( "sbu", z2d )                ! bottom i-current
       ENDIF
-#if defined key_dynspg_ts
-      CALL iom_put(  "ubar", un_adv(:,:)      )    ! barotropic i-current
-#else
-      CALL iom_put(  "ubar", un_b(:,:)        )    ! barotropic i-current
-#endif
+
+      IF ( ln_dynspg_ts ) THEN
+         CALL iom_put(  "ubar", un_adv(:,:)      )    ! barotropic i-current
+      ELSE
+         CALL iom_put(  "ubar", un_b(:,:)        )    ! barotropic i-current
+      ENDIF
       
       CALL iom_put( "voce", vn(:,:,:)         )    ! 3D j-current
@@ -222,9 +222,10 @@
          CALL iom_put( "sbv", z2d )                ! bottom j-current
       ENDIF
-#if defined key_dynspg_ts
-      CALL iom_put(  "vbar", vn_adv(:,:)      )    ! barotropic j-current
-#else
-      CALL iom_put(  "vbar", vn_b(:,:)        )    ! barotropic j-current
-#endif
+
+      IF ( ln_dynspg_ts ) THEN
+         CALL iom_put(  "vbar", vn_adv(:,:)      )    ! barotropic j-current
+      ELSE
+         CALL iom_put(  "vbar", vn_b(:,:)        )    ! barotropic j-current
+      ENDIF
 
       CALL iom_put( "woce", wn )                   ! vertical velocity
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5902)
@@ -44,4 +44,9 @@
    INTEGER , PUBLIC ::   nn_euler        !: =0 start with forward time step or not (=1)
    LOGICAL , PUBLIC ::   ln_crs          !: Apply grid coarsening to dynamical model output or online passive tracers
+
+   !! Free surface parameters
+   !! =======================
+   LOGICAL, PUBLIC :: ln_dynspg_exp !: Explicit free surface flag
+   LOGICAL, PUBLIC :: ln_dynspg_ts  !: Split-Explicit free surface flag
 
    !! Time splitting parameters
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 5902)
@@ -28,5 +28,4 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp
-   USE dynspg_oce      ! choice/control of key cpp for surface pressure gradient
    USE wrk_nemo        ! Memory allocation
    USE timing          ! Timing
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 5902)
@@ -19,4 +19,5 @@
    !!            3.5  !  2013-07  (J. Chanut) Compliant with time splitting changes
    !!            3.7  !  2014-04  (G. Madec) add the diagnostic of the time filter trends
+   !!            3.7  !  2015-11  (J. Chanut) Free surface simplification
    !!-------------------------------------------------------------------------
   
@@ -28,5 +29,4 @@
    USE sbc_oce         ! Surface boundary condition: ocean fields
    USE phycst          ! physical constants
-   USE dynspg_oce      ! type of surface pressure gradient
    USE dynadv          ! dynamics: vector invariant versus flux form
    USE domvvl          ! variable volume
@@ -68,14 +68,11 @@
       !!                  ***  ROUTINE dyn_nxt  ***
       !!                   
-      !! ** Purpose :   Compute the after horizontal velocity. Apply the boundary 
-      !!             condition on the after velocity, achieved the time stepping 
+      !! ** Purpose :   Finalize after horizontal velocity. Apply the boundary 
+      !!             condition on the after velocity, achieve the time stepping 
       !!             by applying the Asselin filter on now fields and swapping 
       !!             the fields.
       !!
-      !! ** Method  : * After velocity is compute using a leap-frog scheme:
-      !!                       (ua,va) = (ub,vb) + 2 rdt (ua,va)
-      !!             Note that with flux form advection and variable volume layer
-      !!             (lk_vvl=T), the leap-frog is applied on thickness weighted
-      !!             velocity.
+      !! ** Method  : * Ensure after velocities transport matches time splitting
+      !!             estimate (ln_dynspg_ts=T)
       !!
       !!              * Apply lateral boundary conditions on after velocity 
@@ -99,6 +96,5 @@
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       INTEGER  ::   iku, ikv     ! local integers
-      REAL(wp) ::   z2dt         ! temporary scalar
-      REAL(wp) ::   zue3a, zue3n, zue3b, zuf, zec      ! local scalars
+      REAL(wp) ::   zue3a, zue3n, zue3b, zuf           ! local scalars
       REAL(wp) ::   zve3a, zve3n, zve3b, zvf, z1_2dt   !   -      -
       REAL(wp), POINTER, DIMENSION(:,:)   ::  zue, zve
@@ -108,6 +104,7 @@
       IF( nn_timing == 1 )   CALL timing_start('dyn_nxt')
       !
-      CALL wrk_alloc( jpi,jpj,jpk,  ze3u_f, ze3v_f, zua, zva )
-      IF( lk_dynspg_ts )   CALL wrk_alloc( jpi,jpj, zue, zve )
+      IF( ln_dynspg_ts )   CALL wrk_alloc( jpi,jpj, zue, zve )
+      IF( lk_vvl.AND.(.NOT.ln_dynadv_vec ) ) CALL wrk_alloc( jpi,jpj,jpk, ze3u_f, ze3v_f )
+      IF( l_trddyn     )   CALL wrk_alloc( jpi,jpj,jpk, zua, zva )
       !
       IF( kt == nit000 ) THEN
@@ -117,73 +114,48 @@
       ENDIF
 
-# if defined key_dynspg_exp
-      ! Next velocity :   Leap-frog time stepping
-      ! -------------
-      z2dt = 2. * rdt                                 ! Euler or leap-frog time step 
-      IF( neuler == 0 .AND. kt == nit000 )  z2dt = rdt
-      !
-      IF( ln_dynadv_vec .OR. .NOT. lk_vvl ) THEN      ! applied on velocity
+      IF ( ln_dynspg_ts ) THEN
+         ! Ensure below that barotropic velocities match time splitting estimate
+         ! Compute actual transport and replace it with ts estimate at "after" time step
+         zue(:,:) = fse3u_a(:,:,1) * ua(:,:,1) * umask(:,:,1)
+         zve(:,:) = fse3v_a(:,:,1) * va(:,:,1) * vmask(:,:,1)
+         DO jk = 2, jpkm1
+            zue(:,:) = zue(:,:) + fse3u_a(:,:,jk) * ua(:,:,jk) * umask(:,:,jk)
+            zve(:,:) = zve(:,:) + fse3v_a(:,:,jk) * va(:,:,jk) * vmask(:,:,jk)
+         END DO
          DO jk = 1, jpkm1
-            ua(:,:,jk) = ( ub(:,:,jk) + z2dt * ua(:,:,jk) ) * umask(:,:,jk)
-            va(:,:,jk) = ( vb(:,:,jk) + z2dt * va(:,:,jk) ) * vmask(:,:,jk)
-         END DO
-      ELSE                                            ! applied on thickness weighted velocity
-         DO jk = 1, jpkm1
-            ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)      &
-               &           + z2dt * ua(:,:,jk) * fse3u_n(:,:,jk)  )   &
-               &         / fse3u_a(:,:,jk) * umask(:,:,jk)
-            va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)      &
-               &           + z2dt * va(:,:,jk) * fse3v_n(:,:,jk)  )   &
-               &         / fse3v_a(:,:,jk) * vmask(:,:,jk)
-         END DO
-      ENDIF
-# endif
-
-# if defined key_dynspg_ts
-!!gm IF ( lk_dynspg_ts ) THEN ....
-      ! Ensure below that barotropic velocities match time splitting estimate
-      ! Compute actual transport and replace it with ts estimate at "after" time step
-      zue(:,:) = fse3u_a(:,:,1) * ua(:,:,1) * umask(:,:,1)
-      zve(:,:) = fse3v_a(:,:,1) * va(:,:,1) * vmask(:,:,1)
-      DO jk = 2, jpkm1
-         zue(:,:) = zue(:,:) + fse3u_a(:,:,jk) * ua(:,:,jk) * umask(:,:,jk)
-         zve(:,:) = zve(:,:) + fse3v_a(:,:,jk) * va(:,:,jk) * vmask(:,:,jk)
-      END DO
-      DO jk = 1, jpkm1
-         ua(:,:,jk) = ( ua(:,:,jk) - zue(:,:) * hur_a(:,:) + ua_b(:,:) ) * umask(:,:,jk)
-         va(:,:,jk) = ( va(:,:,jk) - zve(:,:) * hvr_a(:,:) + va_b(:,:) ) * vmask(:,:,jk)
-      END DO
-
-      IF (lk_dynspg_ts.AND.(.NOT.ln_bt_fw)) THEN
-         ! Remove advective velocity from "now velocities" 
-         ! prior to asselin filtering     
-         ! In the forward case, this is done below after asselin filtering   
-         ! so that asselin contribution is removed at the same time 
-         DO jk = 1, jpkm1
-            un(:,:,jk) = ( un(:,:,jk) - un_adv(:,:) + un_b(:,:) )*umask(:,:,jk)
-            vn(:,:,jk) = ( vn(:,:,jk) - vn_adv(:,:) + vn_b(:,:) )*vmask(:,:,jk)
-         END DO  
-      ENDIF
-!!gm ENDIF
-# endif
+            ua(:,:,jk) = ( ua(:,:,jk) - zue(:,:) * hur_a(:,:) + ua_b(:,:) ) * umask(:,:,jk)
+            va(:,:,jk) = ( va(:,:,jk) - zve(:,:) * hvr_a(:,:) + va_b(:,:) ) * vmask(:,:,jk)
+         END DO
+
+         IF ( .NOT.ln_bt_fw ) THEN
+            ! Remove advective velocity from "now velocities" 
+            ! prior to asselin filtering     
+            ! In the forward case, this is done below after asselin filtering   
+            ! so that asselin contribution is removed at the same time 
+            DO jk = 1, jpkm1
+               un(:,:,jk) = ( un(:,:,jk) - un_adv(:,:) + un_b(:,:) )*umask(:,:,jk)
+               vn(:,:,jk) = ( vn(:,:,jk) - vn_adv(:,:) + vn_b(:,:) )*vmask(:,:,jk)
+            END DO  
+         ENDIF
+      ENDIF
 
       ! Update after velocity on domain lateral boundaries
       ! --------------------------------------------------      
-      CALL lbc_lnk( ua, 'U', -1. )     !* local domain boundaries
-      CALL lbc_lnk( va, 'V', -1. ) 
-      !
-# if defined key_bdy
-      !                                !* BDY open boundaries
-      IF( lk_bdy .AND. lk_dynspg_exp ) CALL bdy_dyn( kt )
-      IF( lk_bdy .AND. lk_dynspg_ts  ) CALL bdy_dyn( kt, dyn3d_only=.true. )
-
-!!$   Do we need a call to bdy_vol here??
-      !
-# endif
-      !
 # if defined key_agrif
       CALL Agrif_dyn( kt )             !* AGRIF zoom boundaries
 # endif
-
+      !
+      CALL lbc_lnk( ua, 'U', -1. )     !* local domain boundaries
+      CALL lbc_lnk( va, 'V', -1. ) 
+      !
+# if defined key_bdy
+      !                                !* BDY open boundaries
+      IF( lk_bdy .AND. ln_dynspg_exp ) CALL bdy_dyn( kt )
+      IF( lk_bdy .AND. ln_dynspg_ts  ) CALL bdy_dyn( kt, dyn3d_only=.true. )
+
+!!$   Do we need a call to bdy_vol here??
+      !
+# endif
+      !
       IF( l_trddyn ) THEN             ! prepare the atf trend computation + some diagnostics
          z1_2dt = 1._wp / (2. * rdt)        ! Euler or leap-frog time step 
@@ -242,7 +214,7 @@
             ! (used as a now filtered scale factor until the swap)
             ! ----------------------------------------------------
-            IF (lk_dynspg_ts.AND.ln_bt_fw) THEN
+            IF (ln_dynspg_ts.AND.ln_bt_fw) THEN
                ! No asselin filtering on thicknesses if forward time splitting
-                  fse3t_b(:,:,:) = fse3t_n(:,:,:)
+               fse3t_b(:,:,:) = fse3t_n(:,:,:)
             ELSE
                fse3t_b(:,:,:) = fse3t_n(:,:,:) + atfp * ( fse3t_b(:,:,:) - 2._wp * fse3t_n(:,:,:) + fse3t_a(:,:,:) )
@@ -319,5 +291,5 @@
          ENDIF
          !
-         IF (lk_dynspg_ts.AND.ln_bt_fw) THEN
+         IF (ln_dynspg_ts.AND.ln_bt_fw) THEN
             ! Revert "before" velocities to time split estimate
             ! Doing it here also means that asselin filter contribution is removed  
@@ -383,7 +355,8 @@
       IF(ln_ctl)   CALL prt_ctl( tab3d_1=un, clinfo1=' nxt  - Un: ', mask1=umask,   &
          &                       tab3d_2=vn, clinfo2=' Vn: '       , mask2=vmask )
-      ! 
-      CALL wrk_dealloc( jpi,jpj,jpk,  ze3u_f, ze3v_f, zua, zva )
-      IF( lk_dynspg_ts )   CALL wrk_dealloc( jpi,jpj, zue, zve )
+      !
+      IF( ln_dynspg_ts )   CALL wrk_dealloc( jpi,jpj, zue, zve )
+      IF( lk_vvl.AND.(.NOT.ln_dynadv_vec ) ) CALL wrk_dealloc( jpi,jpj,jpk, ze3u_f, ze3v_f )
+      IF( l_trddyn     )   CALL wrk_dealloc( jpi,jpj,jpk, zua, zva )
       !
       IF( nn_timing == 1 )  CALL timing_stop('dyn_nxt')
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 5902)
@@ -6,9 +6,10 @@
    !! History :  1.0  ! 2005-12  (C. Talandier, G. Madec, V. Garnier)  Original code
    !!            3.2  ! 2009-07  (R. Benshila)  Suppression of rigid-lid option
-   !!----------------------------------------------------------------------
-
-   !!----------------------------------------------------------------------
-   !!   dyn_spg     : update the dynamics trend with the lateral diffusion
-   !!   dyn_spg_ctl : initialization, namelist read, and parameters control
+   !!            3.7  ! 2015-11  (J. Chanut) Suppression of filtered free surface 
+   !!----------------------------------------------------------------------
+
+   !!----------------------------------------------------------------------
+   !!   dyn_spg     : update the dynamics trend with surface pressure gradient 
+   !!   dyn_spg_init: initialization, namelist read, and parameters control
    !!----------------------------------------------------------------------
    USE oce            ! ocean dynamics and tracers variables
@@ -18,8 +19,6 @@
    USE sbc_oce        ! surface boundary condition: ocean
    USE sbcapr         ! surface boundary condition: atmospheric pressure
-   USE dynspg_oce     ! surface pressure gradient variables
    USE dynspg_exp     ! surface pressure gradient     (dyn_spg_exp routine)
    USE dynspg_ts      ! surface pressure gradient     (dyn_spg_ts  routine)
-   USE dynadv         ! dynamics: vector invariant versus flux form
    USE sbctide
    USE updtide
@@ -40,5 +39,5 @@
    PUBLIC   dyn_spg_init   ! routine called by opa module
 
-   INTEGER ::   nspg = 0   ! type of surface pressure gradient scheme defined from lk_dynspg_... 
+   INTEGER ::   nspg = 0   ! type of surface pressure gradient scheme defined from ln_dynspg_... 
 
    !! * Substitutions
@@ -63,7 +62,6 @@
       !!gm            the after velocity, in the 2 other (ua,va) are still the trends
       !!
-      !! ** Method  :   Three schemes:
+      !! ** Method  :   Two schemes:
       !!              - explicit computation      : the spg is evaluated at now
-      !!              - filtered computation      : the Roulet & madec (2000) technique is used
       !!              - split-explicit computation: a time splitting technique is used
       !!
@@ -99,5 +97,5 @@
 
       IF(      ln_apr_dyn                                                &   ! atmos. pressure
-         .OR.  ( .NOT.lk_dynspg_ts .AND. (ln_tide_pot .AND. lk_tide) )   &   ! tide potential (no time slitting)
+         .OR.  ( .NOT.ln_dynspg_ts .AND. (ln_tide_pot .AND. lk_tide) )   &   ! tide potential (no time slitting)
          .OR.  nn_ice_embd == 2  ) THEN                                      ! embedded sea-ice
          !
@@ -109,5 +107,5 @@
          END DO         
          !
-         IF( ln_apr_dyn .AND. (.NOT. lk_dynspg_ts) ) THEN                    !==  Atmospheric pressure gradient (added later in time-split case) ==!
+         IF( ln_apr_dyn .AND. (.NOT. ln_dynspg_ts) ) THEN                    !==  Atmospheric pressure gradient (added later in time-split case) ==!
             zg_2 = grav * 0.5
             DO jj = 2, jpjm1                          ! gradient of Patm using inverse barometer ssh
@@ -122,5 +120,5 @@
          !
          !                                    !==  tide potential forcing term  ==!
-         IF( .NOT.lk_dynspg_ts .AND. ( ln_tide_pot .AND. lk_tide )  ) THEN   ! N.B. added directly at sub-time-step in ts-case
+         IF( .NOT.ln_dynspg_ts .AND. ( ln_tide_pot .AND. lk_tide )  ) THEN   ! N.B. added directly at sub-time-step in ts-case
             !
             CALL upd_tide( kt )                      ! update tide potential
@@ -190,25 +188,34 @@
       !!                  ***  ROUTINE dyn_spg_init  ***
       !!                
-      !! ** Purpose :   Control the consistency between cpp options for 
+      !! ** Purpose :   Control the consistency between namelist options for 
       !!              surface pressure gradient schemes
       !!----------------------------------------------------------------------
-      INTEGER ::   ioptio
+      INTEGER ::   ioptio, ios
+      !
+      NAMELIST/namdyn_spg/ ln_dynspg_exp, ln_dynspg_ts
       !!----------------------------------------------------------------------
       !
       IF( nn_timing == 1 )  CALL timing_start('dyn_spg_init')
       !
-      IF(lwp) THEN             ! Control print
+      REWIND( numnam_ref )              ! Namelist namdyn_spg in reference namelist : Free surface
+      READ  ( numnam_ref, namdyn_spg, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_spg in reference namelist', lwp )
+
+      REWIND( numnam_cfg )              ! Namelist namdyn_spg in configuration namelist : Free surface
+      READ  ( numnam_cfg, namdyn_spg, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_spg in configuration namelist', lwp )
+      IF(lwm) WRITE ( numond, namdyn_spg )
+      !
+      IF(lwp) THEN             ! Namelist print
          WRITE(numout,*)
          WRITE(numout,*) 'dyn_spg_init : choice of the surface pressure gradient scheme'
          WRITE(numout,*) '~~~~~~~~~~~'
-         WRITE(numout,*) '     Explicit free surface                  lk_dynspg_exp = ', lk_dynspg_exp
-         WRITE(numout,*) '     Free surface with time splitting       lk_dynspg_ts  = ', lk_dynspg_ts
-      ENDIF
-
-      IF( lk_dynspg_ts ) CALL dyn_spg_ts_init( nit000 )
-      ! (do it now, to set nn_baro, used to allocate some arrays later on)
-      !                        ! allocate dyn_spg arrays
-      IF( lk_dynspg_ts ) THEN
-         IF( dynspg_oce_alloc() /= 0 )   CALL ctl_stop('STOP', 'dyn_spg_init: failed to allocate dynspg_oce arrays')
+         WRITE(numout,*) '     Explicit free surface                  ln_dynspg_exp = ', ln_dynspg_exp
+         WRITE(numout,*) '     Free surface with time splitting       ln_dynspg_ts  = ', ln_dynspg_ts
+      ENDIF
+
+      IF( ln_dynspg_ts ) THEN
+         CALL dyn_spg_ts_init( nit000  ) ! do it first, to set nn_baro, used to allocate some arrays later on
+         !                               ! allocate dyn_spg arrays
          IF( dyn_spg_ts_alloc() /= 0 )   CALL ctl_stop('STOP', 'dyn_spg_init: failed to allocate dynspg_ts  arrays')
          IF ((neuler/=0).AND.(ln_bt_fw)) CALL ts_rst( nit000, 'READ' )
@@ -217,15 +224,14 @@
       !                        ! Control of surface pressure gradient scheme options
       ioptio = 0
-      IF(lk_dynspg_exp)   ioptio = ioptio + 1
-      IF(lk_dynspg_ts )   ioptio = ioptio + 1
+      IF(ln_dynspg_exp)   ioptio = ioptio + 1
+      IF(ln_dynspg_ts )   ioptio = ioptio + 1
       !
       IF(  ioptio > 1  .OR. ( ioptio == 0 .AND. .NOT. lk_c1d ) )   &
-           &   CALL ctl_stop( ' Choose only one surface pressure gradient scheme with a key cpp' )
-      IF( ( lk_dynspg_ts .OR. lk_dynspg_exp ) .AND. ln_isfcav )   &
-           &   CALL ctl_stop( ' dynspg_ts and dynspg_exp not tested with ice shelf cavity ' )
-      !
-      IF( lk_dynspg_exp)   nspg =  0
-      IF( lk_dynspg_ts )   nspg =  1
-
+           &   CALL ctl_stop( ' Choose only one surface pressure gradient scheme' )
+      IF( ln_dynspg_ts .AND. ln_isfcav )   &
+           &   CALL ctl_stop( ' dynspg_ts not tested with ice shelf cavity ' )
+      !
+      IF( ln_dynspg_exp)   nspg =  0
+      IF( ln_dynspg_ts )   nspg =  1
       !
       IF(lwp) THEN
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 5902)
@@ -7,7 +7,6 @@
    !!            3.2  !  2009-06  (G. Madec, M. Leclair, R. Benshila) introduce sshwzv module
    !!----------------------------------------------------------------------
-#if defined key_dynspg_exp
    !!----------------------------------------------------------------------
-   !!   'key_dynspg_exp'                              explicit free surface
+   !!                     explicit free surface
    !!----------------------------------------------------------------------
    !!   dyn_spg_exp  : update the momentum trend with the surface 
@@ -31,5 +30,5 @@
    PRIVATE
 
-   PUBLIC   dyn_spg_exp   ! routine called by step.F90
+   PUBLIC   dyn_spg_exp   ! routine called by dyn_spg 
 
    !! * Substitutions
@@ -101,14 +100,4 @@
    END SUBROUTINE dyn_spg_exp
 
-#else
-   !!----------------------------------------------------------------------
-   !!   Default case :   Empty module   No standart explicit free surface 
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE dyn_spg_exp( kt )       ! Empty routine
-      WRITE(*,*) 'dyn_spg_exp: You should not have seen this print! error?', kt
-   END SUBROUTINE dyn_spg_exp
-#endif
-
    !!======================================================================
 END MODULE dynspg_exp
Index: anches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_oce.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_oce.F90	(revision 5901)
+++ 	(revision )
@@ -1,65 +1,0 @@
-MODULE dynspg_oce
-   !!======================================================================
-   !!                       ***  MODULE dynspg_oce  ***
-   !!       
-   !! Ocean dynamics: Define in memory some surface pressure gradient variables
-   !!======================================================================
-   !! History :  1.0  ! 2005-12  (C. Talandier, G. Madec)  Original code
-   !!            3.2  ! 2009-07  (R. Benshila) Suppression of rigid-lid option
-   !!----------------------------------------------------------------------
-   USE par_oce        ! ocean parameters
-   USE lib_mpp        ! MPP library
-
-   IMPLICIT NONE
-   PUBLIC           
-
-   PUBLIC   dynspg_oce_alloc   ! called in dynspg.F90
-   
-   !                                                       !!! Surface pressure gradient logicals
-#if   defined key_dynspg_exp
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_exp = .TRUE.   !: Explicit free surface flag
-#else
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_exp = .FALSE.  !: Explicit free surface flag
-#endif
-#if   defined key_dynspg_ts
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_ts  = .TRUE.   !: Free surface with time splitting flag
-#else
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_ts  = .FALSE.  !: Free surface with time splitting flag
-#endif
-  !                                                                         !!! Time splitting scheme (key_dynspg_ts) 
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sshn_e, ssha_e   ! sea surface heigth (now, after)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ua_e  , va_e     ! barotropic velocities (after)
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hu_e  , hv_e     ! now ocean depth ( = Ho+sshn_e )
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hur_e , hvr_e    ! inverse of hu_e and hv_e
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   un_adv, vn_adv   ! Advection vel. at "now" barocl. step
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ub2_b,  vb2_b    ! Half step fluxes (ln_bt_fw=T)
-#if defined key_agrif
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ub2_i_b,  vb2_i_b! Half step time integrated fluxes 
-#endif
-
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 4.0 , NEMO Consortium (2011)
-   !! $Id$
-   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-CONTAINS
-
-   INTEGER FUNCTION dynspg_oce_alloc()
-      !!----------------------------------------------------------------------
-      !!                  ***  routine dynspg_oce_alloc  ***
-      !!----------------------------------------------------------------------
-      ALLOCATE( sshn_e(jpi,jpj) , ua_e(jpi,jpj) , hu_e(jpi,jpj) , hur_e(jpi,jpj) ,      &
-         &      ssha_e(jpi,jpj) , va_e(jpi,jpj) , hv_e(jpi,jpj) , hvr_e(jpi,jpj) ,      &
-         &      ub2_b(jpi,jpj)  , vb2_b(jpi,jpj)                                 ,      &
-#if defined key_agrif
-         &      ub2_i_b(jpi,jpj), vb2_i_b(jpi,jpj)                               ,      &
-#endif
-         &      un_adv(jpi,jpj) , vn_adv(jpi,jpj)                                , STAT = dynspg_oce_alloc )
-         !
-      IF( lk_mpp                )   CALL mpp_sum ( dynspg_oce_alloc )
-      IF( dynspg_oce_alloc /= 0 )   CALL ctl_warn('dynspg_oce_alloc: failed to allocate arrays')
-      !
-   END FUNCTION dynspg_oce_alloc
-
-   !!======================================================================
-END MODULE dynspg_oce
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 5902)
@@ -11,8 +11,8 @@
    !!             3.5  ! 2013-07  (J. Chanut) Switch to Forward-backward time stepping
    !!             3.6  ! 2013-11  (A. Coward) Update for z-tilde compatibility
+   !!             3.7  ! 2015-11  (J. Chanut) free surface simplification
    !!---------------------------------------------------------------------
-#if defined key_dynspg_ts
    !!----------------------------------------------------------------------
-   !!   'key_dynspg_ts'         split explicit free surface
+   !!                       split explicit free surface
    !!----------------------------------------------------------------------
    !!   dyn_spg_ts  : compute surface pressure gradient trend using a time-
@@ -23,9 +23,7 @@
    USE sbc_oce         ! surface boundary condition: ocean
    USE sbcisf          ! ice shelf variable (fwfisf)
-   USE dynspg_oce      ! surface pressure gradient variables
    USE phycst          ! physical constants
    USE dynvor          ! vorticity term
    USE bdy_par         ! for lk_bdy
-   USE bdytides        ! open boundary condition data     
    USE bdydyn2d        ! open boundary conditions on barotropic variables
    USE sbctide         ! tides
@@ -42,4 +40,5 @@
    USE sbcapr          ! surface boundary condition: atmospheric pressure
    USE dynadv, ONLY: ln_dynadv_vec
+   USE bdytides
 #if defined key_agrif
    USE agrif_opa_interp ! agrif
@@ -67,10 +66,4 @@
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  ftnw, ftne   ! triad of coriolis parameter
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  ftsw, ftse   ! (only used with een vorticity scheme)
-
-   ! Arrays below are saved to allow testing of the "no time averaging" option
-   ! If this option is not retained, these could be replaced by temporary arrays
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) ::  sshbb_e, sshb_e, & ! Instantaneous barotropic arrays
-                                                   ubb_e, ub_e,     &
-                                                   vbb_e, vb_e
 
    !! * Substitutions
@@ -88,11 +81,12 @@
       !!                  ***  routine dyn_spg_ts_alloc  ***
       !!----------------------------------------------------------------------
-      INTEGER :: ierr(3)
+      INTEGER :: ierr(4)
       !!----------------------------------------------------------------------
       ierr(:) = 0
 
-      ALLOCATE( sshb_e(jpi,jpj), sshbb_e(jpi,jpj), &
-         &      ub_e(jpi,jpj)  , vb_e(jpi,jpj)   , &
-         &      ubb_e(jpi,jpj) , vbb_e(jpi,jpj)  , STAT= ierr(1) )
+      ALLOCATE( ssha_e(jpi,jpj),  sshn_e(jpi,jpj), sshb_e(jpi,jpj), sshbb_e(jpi,jpj), &
+         &        ua_e(jpi,jpj),    ub_e(jpi,jpj),   ubb_e(jpi,jpj), &
+         &        va_e(jpi,jpj),    vb_e(jpi,jpj),   vbb_e(jpi,jpj), &
+         &        hu_e(jpi,jpj),   hur_e(jpi,jpj),   hv_e(jpi,jpj),   hvr_e(jpi,jpj), STAT= ierr(1) )
 
       ALLOCATE( wgtbtp1(3*nn_baro), wgtbtp2(3*nn_baro), zwz(jpi,jpj), STAT= ierr(2) )
@@ -101,8 +95,14 @@
          &                          ftsw(jpi,jpj) , ftse(jpi,jpj) , STAT=ierr(3) )
 
+      ALLOCATE( ub2_b(jpi,jpj), vb2_b(jpi,jpj), un_adv(jpi,jpj), vn_adv(jpi,jpj), &
+#if defined key_agrif
+         &      ub2_i_b(jpi,jpj), vb2_i_b(jpi,jpj)                              , &
+#endif
+         &      STAT= ierr(4))
+
       dyn_spg_ts_alloc = MAXVAL(ierr(:))
 
       IF( lk_mpp                )   CALL mpp_sum( dyn_spg_ts_alloc )
-      IF( dyn_spg_ts_alloc /= 0 )   CALL ctl_warn('dynspg_oce_alloc: failed to allocate arrays')
+      IF( dyn_spg_ts_alloc /= 0 )   CALL ctl_warn('dyn_spg_ts_alloc: failed to allocate arrays')
       !
    END FUNCTION dyn_spg_ts_alloc
@@ -1164,27 +1164,4 @@
    END SUBROUTINE dyn_spg_ts_init
 
-#else
-   !!---------------------------------------------------------------------------
-   !!   Default case :   Empty module   No split explicit free surface
-   !!---------------------------------------------------------------------------
-CONTAINS
-   INTEGER FUNCTION dyn_spg_ts_alloc()    ! Dummy function
-      dyn_spg_ts_alloc = 0
-   END FUNCTION dyn_spg_ts_alloc
-   SUBROUTINE dyn_spg_ts( kt )            ! Empty routine
-      INTEGER, INTENT(in) :: kt
-      WRITE(*,*) 'dyn_spg_ts: You should not have seen this print! error?', kt
-   END SUBROUTINE dyn_spg_ts
-   SUBROUTINE ts_rst( kt, cdrw )          ! Empty routine
-      INTEGER         , INTENT(in) ::   kt         ! ocean time-step
-      CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag
-      WRITE(*,*) 'ts_rst    : You should not have seen this print! error?', kt, cdrw
-   END SUBROUTINE ts_rst  
-   SUBROUTINE dyn_spg_ts_init( kt )       ! Empty routine
-      INTEGER         , INTENT(in) ::   kt         ! ocean time-step
-      WRITE(*,*) 'dyn_spg_ts_init   : You should not have seen this print! error?', kt
-   END SUBROUTINE dyn_spg_ts_init
-#endif
-   
    !!======================================================================
 END MODULE dynspg_ts
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 5902)
@@ -8,4 +8,5 @@
    !!   NEMO     0.5  !  2002-08  (G. Madec)  F90: Free form and module
    !!            3.3  !  2010-04  (M. Leclair, G. Madec)  Forcing averaged over 2 time steps
+   !!            3.7  !  2015-11  (J. Chanut) output velocities instead of trends
    !!----------------------------------------------------------------------
 
@@ -18,4 +19,5 @@
    USE phycst          ! physical constants
    USE zdf_oce         ! ocean vertical physics
+   USE dynadv, ONLY: ln_dynadv_vec ! Momentum advection form
    USE sbc_oce         ! surface boundary condition: ocean
    USE lib_mpp         ! MPP library
@@ -118,4 +120,22 @@
          !
       END DO                           ! End of time splitting
+
+      ! Time step momentum here to be compliant with what is done in the implicit case
+      !
+      IF( ln_dynadv_vec .OR. .NOT. lk_vvl ) THEN      ! applied on velocity
+         DO jk = 1, jpkm1
+            ua(:,:,jk) = ( ub(:,:,jk) + p2dt * ua(:,:,jk) ) * umask(:,:,jk)
+            va(:,:,jk) = ( vb(:,:,jk) + p2dt * va(:,:,jk) ) * vmask(:,:,jk)
+         END DO
+      ELSE                                            ! applied on thickness weighted velocity
+         DO jk = 1, jpkm1
+            ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)      &
+               &           + p2dt * ua(:,:,jk) * fse3u_n(:,:,jk)  )   &
+               &         / fse3u_a(:,:,jk) * umask(:,:,jk)
+            va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)      &
+               &           + p2dt * va(:,:,jk) * fse3v_n(:,:,jk)  )   &
+               &         / fse3v_a(:,:,jk) * vmask(:,:,jk)
+         END DO
+      ENDIF
       !
       CALL wrk_dealloc( jpi,jpj,jpk, zwx, zwy, zwz, zww ) 
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 5902)
@@ -25,6 +25,5 @@
    USE wrk_nemo        ! Memory Allocation
    USE timing          ! Timing
-   USE dynadv          ! dynamics: vector invariant versus flux form
-   USE dynspg_oce, ONLY: lk_dynspg_ts
+   USE dynadv, ONLY: ln_dynadv_vec ! Momentum advection form
 
    IMPLICIT NONE
@@ -87,9 +86,24 @@
       ENDIF
 
-      ! 0. Local constant initialization
-      ! --------------------------------
-      z1_p2dt = 1._wp / p2dt      ! inverse of the timestep
-
-      ! 1. Apply semi-implicit bottom friction
+      ! 1. Time step dynamics
+      ! ---------------------
+
+      IF( ln_dynadv_vec .OR. .NOT. lk_vvl ) THEN      ! applied on velocity
+         DO jk = 1, jpkm1
+            ua(:,:,jk) = ( ub(:,:,jk) + p2dt * ua(:,:,jk) ) * umask(:,:,jk)
+            va(:,:,jk) = ( vb(:,:,jk) + p2dt * va(:,:,jk) ) * vmask(:,:,jk)
+         END DO
+      ELSE                                            ! applied on thickness weighted velocity
+         DO jk = 1, jpkm1
+            ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)      &
+               &           + p2dt * ua(:,:,jk) * fse3u_n(:,:,jk)  )   &
+               &                               / fse3u_a(:,:,jk) * umask(:,:,jk)
+            va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)      &
+               &           + p2dt * va(:,:,jk) * fse3v_n(:,:,jk)  )   &
+               &                               / fse3v_a(:,:,jk) * vmask(:,:,jk)
+         END DO
+      ENDIF
+
+      ! 2. Apply semi-implicit bottom friction
       ! --------------------------------------
       ! Only needed for semi-implicit bottom friction setup. The explicit
@@ -97,5 +111,4 @@
       ! column vector of the tri-diagonal matrix equation
       !
-
       IF( ln_bfrimp ) THEN
          DO jj = 2, jpjm1
@@ -119,22 +132,9 @@
       ENDIF
 
-#if defined key_dynspg_ts
-      IF( ln_dynadv_vec .OR. .NOT. lk_vvl ) THEN      ! applied on velocity
-         DO jk = 1, jpkm1
-            ua(:,:,jk) = ( ub(:,:,jk) + p2dt * ua(:,:,jk) ) * umask(:,:,jk)
-            va(:,:,jk) = ( vb(:,:,jk) + p2dt * va(:,:,jk) ) * vmask(:,:,jk)
-         END DO
-      ELSE                                            ! applied on thickness weighted velocity
-         DO jk = 1, jpkm1
-            ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)      &
-               &           + p2dt * ua(:,:,jk) * fse3u_n(:,:,jk)  )   &
-               &                               / fse3u_a(:,:,jk) * umask(:,:,jk)
-            va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)      &
-               &           + p2dt * va(:,:,jk) * fse3v_n(:,:,jk)  )   &
-               &                               / fse3v_a(:,:,jk) * vmask(:,:,jk)
-         END DO
-      ENDIF
-
-      IF ( ln_bfrimp .AND.lk_dynspg_ts ) THEN
+      ! With split-explicit free surface, barotropic stress is treated explicitly
+      ! Update velocities at the bottom.
+      ! J. Chanut: The bottom stress is computed considering after barotropic velocities, which does 
+      !            not lead to the effective stress seen over the whole barotropic loop. 
+      IF ( ln_bfrimp .AND.ln_dynspg_ts ) THEN
          ! remove barotropic velocities:
          DO jk = 1, jpkm1
@@ -166,7 +166,6 @@
          END IF
       ENDIF
-#endif
-
-      ! 2. Vertical diffusion on u
+
+      ! 3. Vertical diffusion on u
       ! ---------------------------
       ! Matrix and second member construction
@@ -219,13 +218,7 @@
       DO jj = 2, jpjm1        !==  second recurrence:    SOLk = RHSk - Lk / Dk-1  Lk-1  ==
          DO ji = fs_2, fs_jpim1   ! vector opt.
-#if defined key_dynspg_ts
             ze3ua =  ( 1._wp - r_vvl ) * fse3u_n(ji,jj,1) + r_vvl   * fse3u_a(ji,jj,1) 
             ua(ji,jj,1) = ua(ji,jj,1) + p2dt * 0.5_wp * ( utau_b(ji,jj) + utau(ji,jj) )   &
                &                                      / ( ze3ua * rau0 ) * umask(ji,jj,1) 
-#else
-            ua(ji,jj,1) = ub(ji,jj,1) &
-               &                   + p2dt *(ua(ji,jj,1) +  0.5_wp * ( utau_b(ji,jj) + utau(ji,jj) )   &
-               &                                      / ( fse3u(ji,jj,1) * rau0     ) * umask(ji,jj,1) ) 
-#endif
          END DO
       END DO
@@ -233,9 +226,5 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1
-#if defined key_dynspg_ts
                zrhs = ua(ji,jj,jk)   ! zrhs=right hand side
-#else
-               zrhs = ub(ji,jj,jk) + p2dt * ua(ji,jj,jk)
-#endif
                ua(ji,jj,jk) = zrhs - zwi(ji,jj,jk) / zwd(ji,jj,jk-1) * ua(ji,jj,jk-1)
             END DO
@@ -256,16 +245,5 @@
       END DO
 
-#if ! defined key_dynspg_ts
-      ! Normalization to obtain the general momentum trend ua
-      DO jk = 1, jpkm1
-         DO jj = 2, jpjm1   
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               ua(ji,jj,jk) = ( ua(ji,jj,jk) - ub(ji,jj,jk) ) * z1_p2dt
-            END DO
-         END DO
-      END DO
-#endif
-
-      ! 3. Vertical diffusion on v
+      ! 4. Vertical diffusion on v
       ! ---------------------------
       ! Matrix and second member construction
@@ -317,14 +295,8 @@
       !
       DO jj = 2, jpjm1        !==  second recurrence:    SOLk = RHSk - Lk / Dk-1  Lk-1  ==
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-#if defined key_dynspg_ts            
+         DO ji = fs_2, fs_jpim1   ! vector opt.          
             ze3va =  ( 1._wp - r_vvl ) * fse3v_n(ji,jj,1) + r_vvl   * fse3v_a(ji,jj,1) 
             va(ji,jj,1) = va(ji,jj,1) + p2dt * 0.5_wp * ( vtau_b(ji,jj) + vtau(ji,jj) )   &
                &                                      / ( ze3va * rau0 ) 
-#else
-            va(ji,jj,1) = vb(ji,jj,1) &
-               &                   + p2dt *(va(ji,jj,1) +  0.5_wp * ( vtau_b(ji,jj) + vtau(ji,jj) )   &
-               &                                                       / ( fse3v(ji,jj,1) * rau0     )  )
-#endif
          END DO
       END DO
@@ -332,9 +304,5 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-#if defined key_dynspg_ts
                zrhs = va(ji,jj,jk)   ! zrhs=right hand side
-#else
-               zrhs = vb(ji,jj,jk) + p2dt * va(ji,jj,jk)
-#endif
                va(ji,jj,jk) = zrhs - zwi(ji,jj,jk) / zwd(ji,jj,jk-1) * va(ji,jj,jk-1)
             END DO
@@ -355,17 +323,6 @@
       END DO
 
-      ! Normalization to obtain the general momentum trend va
-#if ! defined key_dynspg_ts
-      DO jk = 1, jpkm1
-         DO jj = 2, jpjm1   
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               va(ji,jj,jk) = ( va(ji,jj,jk) - vb(ji,jj,jk) ) * z1_p2dt
-            END DO
-         END DO
-      END DO
-#endif
-
       ! J. Chanut: Lines below are useless ?
-      !! restore bottom layer avmu(v) 
+      !! restore avmu(v)=0. at bottom (and top if ln_isfcav=T interfaces)
       IF( ln_bfrimp ) THEN
         DO jj = 2, jpjm1
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 5902)
@@ -106,17 +106,17 @@
       ssha(:,:) = (  sshb(:,:) - z2dt * ( zcoef * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * ssmask(:,:)
 
-#if ! defined key_dynspg_ts
-      ! These lines are not necessary with time splitting since
-      ! boundary condition on sea level is set during ts loop
+      IF ( .NOT.ln_dynspg_ts ) THEN
+         ! These lines are not necessary with time splitting since
+         ! boundary condition on sea level is set during ts loop
 # if defined key_agrif
-      CALL agrif_ssh( kt )
+         CALL agrif_ssh( kt )
 # endif
 # if defined key_bdy
-      IF( lk_bdy ) THEN
-         CALL lbc_lnk( ssha, 'T', 1. )    ! Not sure that's necessary
-         CALL bdy_ssh( ssha )             ! Duplicate sea level across open boundaries
-      ENDIF
+         IF( lk_bdy ) THEN
+            CALL lbc_lnk( ssha, 'T', 1. )    ! Not sure that's necessary
+            CALL bdy_ssh( ssha )             ! Duplicate sea level across open boundaries
+         ENDIF
 # endif
-#endif
+      ENDIF
 
 #if defined key_asminc
@@ -250,9 +250,6 @@
       ENDIF
 
-# if defined key_dynspg_ts
-      IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ln_bt_fw ) THEN    !** Euler time-stepping: no filter
-# else
-      IF ( neuler == 0 .AND. kt == nit000 ) THEN   !** Euler time-stepping at first time-step : no filter
-#endif
+      IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ( ln_bt_fw .AND. ln_dynspg_ts ) ) THEN 
+                                                   !** Euler time-stepping: no filter
          sshb(:,:) = sshn(:,:)                           ! before <-- now
          sshn(:,:) = ssha(:,:)                           ! now    <-- after  (before already = now)
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 5902)
@@ -12,5 +12,4 @@
    USE dom_oce         ! ocean space and time domain
    USE sbc_oce         ! surface boundary condition
-   USE dynspg_oce      ! surface pressure gradient variables
    USE phycst          ! physical constants
    USE fldread         ! read input fields
@@ -112,6 +111,5 @@
             IF(lwp) WRITE(numout,*) '         Inverse barometer added to OBC ssh data'
          ENDIF
-         IF( ( ln_apr_obc ) .AND. .NOT. lk_dynspg_ts )   &
-            CALL ctl_stop( 'sbc_apr: use inverse barometer ssh at open boundary ONLY possible with time-splitting' )
+!jc: stop below should rather be a warning 
          IF( ( ln_apr_obc ) .AND. .NOT. ln_apr_dyn   )   &
             CALL ctl_stop( 'sbc_apr: use inverse barometer ssh at open boundary ONLY requires ln_apr_dyn=T' )
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 5902)
@@ -10,5 +10,4 @@
    USE phycst
    USE daymod
-   USE dynspg_oce
    USE tideini
    !
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 5902)
@@ -10,5 +10,4 @@
    USE phycst
    USE daymod
-   USE dynspg_oce
    USE tide_mod
    !
@@ -96,5 +95,4 @@
           &   CALL ctl_stop('rdttideramp must be positive')
        !
-       IF( .NOT. lk_dynspg_ts )   CALL ctl_warn( 'sbc_tide : use of time splitting is recommended' )
        !
        ALLOCATE( ntide(nb_harmo) )
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90	(revision 5902)
@@ -42,8 +42,8 @@
       !!----------------------------------------------------------------------      
       INTEGER, INTENT(in)           ::   kt      ! ocean time-step index
-      INTEGER, INTENT(in), OPTIONAL ::   kit     ! external mode sub-time-step index (lk_dynspg_ts=T only)
-      INTEGER, INTENT(in), OPTIONAL ::   kbaro   ! number of sub-time-step           (lk_dynspg_ts=T only)
+      INTEGER, INTENT(in), OPTIONAL ::   kit     ! external mode sub-time-step index (time split only)
+      INTEGER, INTENT(in), OPTIONAL ::   kbaro   ! number of sub-time-step           (time split only)
       INTEGER, INTENT(in), OPTIONAL ::   koffset ! time offset in number 
-                                                 ! of sub-time-steps                 (lk_dynspg_ts=T only)
+                                                 ! of sub-time-steps                 (time split only)
       !
       INTEGER  ::   joffset      ! local integer
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 5902)
@@ -19,5 +19,4 @@
    USE trd_oce        ! trends: ocean variables
    USE trdtra         ! tracers trends
-   USE dynspg_oce     ! choice/control of key cpp for surface pressure gradient
    USE diaptr         ! poleward transport diagnostics
    !
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 5902)
@@ -21,5 +21,4 @@
    USE trd_oce        ! trends: ocean variables
    USE trdtra         ! tracers trends manager
-   USE dynspg_oce     ! choice/control of key cpp for surface pressure gradient
    USE sbcrnf         ! river runoffs
    USE diaptr         ! poleward transport diagnostics
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5902)
@@ -20,5 +20,4 @@
    USE trd_oce         ! trends: ocean variables
    USE trdtra          ! trends manager: tracers 
-   USE dynspg_oce      ! surface pressure gradient variables
    USE diaptr          ! poleward transport diagnostics
    !
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5902)
@@ -18,5 +18,4 @@
    USE traadv_fct      ! acces to routine interp_4th_cpt 
    USE trdtra         ! trends manager: tracers 
-   USE dynspg_oce     ! choice/control of key cpp for surface pressure gradient
    USE diaptr         ! poleward transport diagnostics
    !
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 5902)
@@ -31,5 +31,4 @@
    USE zdf_oce         ! ocean vertical mixing
    USE domvvl          ! variable volume
-   USE dynspg_oce      ! surface     pressure gradient variables
    USE trd_oce         ! trends: ocean variables
    USE trdtra          ! trends manager: tracers 
@@ -107,4 +106,5 @@
       ! Update after tracer on domain lateral boundaries
       ! 
+      !
 #if defined key_agrif
       CALL Agrif_tra                     ! AGRIF zoom boundaries
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 5902)
@@ -18,5 +18,4 @@
    USE zdf_oce         ! ocean vertical physics variables
    USE sbc_oce         ! surface boundary condition: ocean
-   USE dynspg_oce
    !
    USE ldftra          ! lateral diffusion: eddy diffusivity
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/oce.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/oce.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/oce.F90	(revision 5902)
@@ -21,5 +21,4 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::   ub   ,  un    , ua     !: i-horizontal velocity        [m/s]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::   vb   ,  vn    , va     !: j-horizontal velocity        [m/s]
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::   ua_sv,  va_sv          !: Saved trends (time spliting) [m/s2]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::           wn             !: vertical velocity            [m/s]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)   ::           hdivn          !: horizontal divergence        [s-1]
@@ -38,4 +37,20 @@
    !
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   spgu, spgv               !: horizontal surface pressure gradient
+
+   !! Specific to split explicit free surface (allocated in dynspg_ts module):
+   !
+   !! Time filtered arrays at baroclinic time step:
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   un_adv, vn_adv    ! Advection vel. at "now" barocl. step
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ub2_b , vb2_b     ! Half step fluxes (ln_bt_fw=T)
+#if defined key_agrif
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ub2_i_b,  vb2_i_b ! Half step time integrated fluxes 
+#endif
+
+   !! Arrays at barotropic time step:
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::  & 
+                                                            sshbb_e, sshb_e, sshn_e, ssha_e, & 
+                                                            ubb_e,     ub_e,           ua_e, &
+                                                            vbb_e,     vb_e,           va_e, &
+                                                            hu_e,  hur_e,   hv_e,  hvr_e
 
    !! interpolated gradient (only used in zps case)
@@ -85,6 +100,5 @@
       !
       ALLOCATE( ub   (jpi,jpj,jpk)      , un   (jpi,jpj,jpk)      , ua(jpi,jpj,jpk)       ,     &
-         &      vb   (jpi,jpj,jpk)      , vn   (jpi,jpj,jpk)      , va(jpi,jpj,jpk)       ,     &      
-         &      ua_sv(jpi,jpj,jpk)      , va_sv(jpi,jpj,jpk)      ,                             &      
+         &      vb   (jpi,jpj,jpk)      , vn   (jpi,jpj,jpk)      , va(jpi,jpj,jpk)       ,     &          
          &      wn   (jpi,jpj,jpk)      , hdivn(jpi,jpj,jpk)      ,                             &
          &      tsb  (jpi,jpj,jpk,jpts) , tsn  (jpi,jpj,jpk,jpts) , tsa(jpi,jpj,jpk,jpts) ,     &
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5902)
@@ -179,61 +179,61 @@
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      !  Ocean dynamics : hdiv, ssh, e3, wn
-      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !  Ocean dynamics : hdiv, ssh, e3, u, v, w
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+                         ua(:,:,:) = 0._wp            ! set dynamics trends to zero
+                         va(:,:,:) = 0._wp
+
                          CALL ssh_nxt       ( kstp )  ! after ssh (includes call to div_hor)
       IF( lk_vvl     )   CALL dom_vvl_sf_nxt( kstp )  ! after vertical scale factors 
                          CALL wzv           ( kstp )  ! now cross-level velocity 
 
-      IF( lk_dynspg_ts ) THEN 
-          ! In case the time splitting case, update almost all momentum trends here:
-          ! Note that the computation of vertical velocity above, hence "after" sea level
-          ! is necessary to compute momentum advection for the rhs of barotropic loop:
 !!gm : why also here ????
-            IF(ln_sto_eos ) CALL sto_pts( tsn )                             ! Random T/S fluctuations
+      IF(ln_sto_eos  )   CALL sto_pts( tsn )                             ! Random T/S fluctuations
 !!gm
-                            CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation
+                         CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) ) ! now in situ density for hpg computation
                             
-            IF( ln_zps .AND. .NOT. ln_isfcav)   &                           ! Partial steps: bottom before horizontal gradient
-               &            CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &  ! of t, s, rd at the last ocean level
+      IF( ln_zps .AND. .NOT. ln_isfcav)   &                              ! Partial steps: bottom before horizontal gradient
+               &         CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &  ! of t, s, rd at the last ocean level
                &                                          rhd, gru , grv    )
-            IF( ln_zps .AND.       ln_isfcav)   &                           ! Partial steps: top & bottom before horizontal gradient
-               &            CALL zps_hde_isf( kstp, jpts, tsn, gtsu, gtsv, gtui, gtvi,   & 
-               &                                          rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
-               &                                               grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi    )
-
-                                  ua(:,:,:) = 0._wp            ! set dynamics trends to zero
-                                  va(:,:,:) = 0._wp
-          IF(  lk_asminc .AND. ln_asmiau .AND. &
-             & ln_dyninc       )  CALL dyn_asm_inc  ( kstp )   ! apply dynamics assimilation increment
-          IF( lk_bdy           )  CALL bdy_dyn3d_dmp( kstp )   ! bdy damping trends
-                                  CALL dyn_adv      ( kstp )   ! advection (vector or flux form)
-                                  CALL dyn_vor      ( kstp )   ! vorticity term including Coriolis
-                                  CALL dyn_ldf      ( kstp )   ! lateral mixing
-#if defined key_agrif
-          IF(.NOT. Agrif_Root())  CALL Agrif_Sponge_dyn        ! momentum sponge
-#endif
-                                  CALL dyn_hpg( kstp )         ! horizontal gradient of Hydrostatic pressure
-                                  CALL dyn_spg( kstp )         ! surface pressure gradient
-
-                                  ua_sv(:,:,:) = ua(:,:,:)     ! Save trends (barotropic trend has been fully updated at this stage)
-                                  va_sv(:,:,:) = va(:,:,:)
-
-                                  CALL div_hor( kstp )         ! Horizontal divergence  (2nd call in time-split case)
-          IF( lk_vvl     )        CALL dom_vvl_sf_nxt( kstp, kcall=2 )  ! after vertical scale factors (update depth average component)
-                                  CALL wzv           ( kstp )  ! now cross-level velocity 
-      ENDIF
-
-      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! diagnostics and outputs             (ua, va, tsa used as workspace)
-      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      IF( lk_floats  )   CALL flo_stp( kstp )         ! drifting Floats
-      IF( lk_diahth  )   CALL dia_hth( kstp )         ! Thermocline depth (20 degres isotherm depth)
-      IF(.NOT.ln_cpl )   CALL dia_fwb( kstp )         ! Fresh water budget diagnostics
-      IF( lk_diadct  )   CALL dia_dct( kstp )         ! Transports
-      IF( lk_diaar5  )   CALL dia_ar5( kstp )         ! ar5 diag
-      IF( lk_diaharm )   CALL dia_harm( kstp )        ! Tidal harmonic analysis
-                         CALL dia_wri( kstp )         ! ocean model: outputs
-      !
-      IF( ln_crs     )   CALL crs_fld( kstp )         ! ocean model: online field coarsening & output
+      IF( ln_zps .AND.       ln_isfcav)   &                              ! Partial steps: top & bottom before horizontal gradient
+               &         CALL zps_hde_isf( kstp, jpts, tsn, gtsu, gtsv, gtui, gtvi,   & 
+               &                                       rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
+               &                                            grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi    )
+
+
+      IF(  lk_asminc .AND. ln_asmiau .AND. ln_dyninc )   &
+                         CALL dyn_asm_inc   ( kstp )  ! apply dynamics assimilation increment
+      IF( lk_bdy     )   CALL bdy_dyn3d_dmp ( kstp )  ! bdy damping trends
+#if defined key_agrif
+      IF(.NOT. Agrif_Root())  & 
+               &         CALL Agrif_Sponge_dyn        ! momentum sponge
+#endif
+                         CALL dyn_adv       ( kstp )  ! advection (vector or flux form)
+                         CALL dyn_vor       ( kstp )  ! vorticity term including Coriolis
+                         CALL dyn_ldf       ( kstp )  ! lateral mixing
+                         CALL dyn_hpg       ( kstp )  ! horizontal gradient of Hydrostatic pressure
+                         CALL dyn_spg       ( kstp )  ! surface pressure gradient
+                         CALL dyn_bfr       ( kstp )  ! bottom friction
+                         CALL dyn_zdf       ( kstp )  ! vertical diffusion
+
+                                                      ! With split-explicit free surface, since now transports have been updated and ssha as well
+      IF( ln_dynspg_ts ) THEN                         ! vertical scale factors and vertical velocity need to be updated
+                            CALL div_hor    ( kstp )  ! Horizontal divergence  (2nd call in time-split case)
+         IF( lk_vvl     )   CALL dom_vvl_sf_nxt( kstp, kcall=2 )  ! after vertical scale factors (update depth average component)
+                            CALL wzv        ( kstp )  ! now cross-level velocity 
+      ENDIF
+
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! diagnostics and outputs             
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      IF( lk_floats  )   CALL flo_stp       ( kstp )  ! drifting Floats
+      IF( lk_diahth  )   CALL dia_hth       ( kstp )  ! Thermocline depth (20 degres isotherm depth)
+      IF(.NOT.ln_cpl )   CALL dia_fwb       ( kstp )  ! Fresh water budget diagnostics
+      IF( lk_diadct  )   CALL dia_dct       ( kstp )  ! Transports
+      IF( lk_diaar5  )   CALL dia_ar5       ( kstp )  ! ar5 diag
+      IF( lk_diaharm )   CALL dia_harm      ( kstp )  ! Tidal harmonic analysis
+                         CALL dia_wri       ( kstp )  ! ocean model: outputs
+      !
+      IF( ln_crs     )   CALL crs_fld       ( kstp )  ! ocean model: online field coarsening & output
 
 #if defined key_top
@@ -241,9 +241,9 @@
       ! Passive Tracer Model
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-                         CALL trc_stp( kstp )         ! time-stepping
-#endif
-
-      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! Active tracers                              (ua, va used as workspace)
+                         CALL trc_stp       ( kstp )  ! time-stepping
+#endif
+
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! Active tracers                              
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                              tsa(:,:,:,:) = 0._wp           ! set tracer trends to zero
@@ -257,4 +257,7 @@
       IF( ln_tradmp      )   CALL tra_dmp    ( kstp )       ! internal damping trends
       IF( lk_bdy         )   CALL bdy_tra_dmp( kstp )       ! bdy damping trends
+#if defined key_agrif
+      IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_tra          ! tracers sponge
+#endif
                              CALL tra_adv    ( kstp )       ! horizontal & vertical advection
                              CALL tra_ldf    ( kstp )       ! lateral mixing
@@ -263,65 +266,36 @@
       IF( ln_diaptr      )   CALL dia_ptr                   ! Poleward adv/ldf TRansports diagnostics
 !!gm
-
-#if defined key_agrif
-      IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_tra          ! tracers sponge
-#endif
                              CALL tra_zdf    ( kstp )       ! vertical mixing and after tracer fields
-                                                ! centered hpg  (eos then time stepping)
-      IF ( .NOT. lk_dynspg_ts ) THEN                     ! eos already called in time-split case
-!!gm : why again a call to sto_pts ???
-         IF( ln_sto_eos )    CALL sto_pts( tsn )    ! Random T/S fluctuations
-!!gm
-                             CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )  ! now in situ density for hpg computation
-         IF( ln_zps .AND. .NOT. ln_isfcav)                                   &
-               &             CALL zps_hde    ( kstp, jpts, tsn, gtsu, gtsv,  &    ! Partial steps: bottom before horizontal gradient
-               &                                           rhd, gru , grv    )    ! of t, s, rd at the last ocean level
-         IF( ln_zps .AND.       ln_isfcav)                                   & 
-               &             CALL zps_hde_isf( kstp, jpts, tsn, gtsu, gtsv, gtui, gtvi,   &    ! Partial steps for top/bottom cells
-               &                                           rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
-               &                                    grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi    ) ! of t, s, rd at the last ocean level
-      ENDIF
-      IF( ln_zdfnpc   )      CALL tra_npc( kstp )                ! update after fields by non-penetrative convection
-                             CALL tra_nxt( kstp )                ! tracer fields at next time step
-
-      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! Dynamics                                    (tsa used as workspace)
-      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      IF( lk_dynspg_ts   )  THEN
-                                                             ! revert to previously computed momentum tendencies
-                                                             ! (not using ua, va as temporary arrays during tracers' update could avoid that)
-                               ua(:,:,:) = ua_sv(:,:,:)
-                               va(:,:,:) = va_sv(:,:,:)
-
-                               CALL dyn_bfr( kstp )         ! bottom friction
-                               CALL dyn_zdf( kstp )         ! vertical diffusion
-      ELSE
-                               ua(:,:,:) = 0._wp            ! set dynamics trends to zero
-                               va(:,:,:) = 0._wp
-
-        IF(  lk_asminc .AND. ln_asmiau .AND. &
-           & ln_dyninc      )  CALL dyn_asm_inc( kstp )     ! apply dynamics assimilation increment
-        IF( ln_bkgwri )        CALL asm_bkg_wri( kstp )     ! output background fields
-        IF( lk_bdy          )  CALL bdy_dyn3d_dmp(kstp )    ! bdy damping trends
-                               CALL dyn_adv( kstp )         ! advection (vector or flux form)
-                               CALL dyn_vor( kstp )         ! vorticity term including Coriolis
-                               CALL dyn_ldf( kstp )         ! lateral mixing
-#if defined key_agrif
-        IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_dyn        ! momemtum sponge
-#endif
-                               CALL dyn_hpg( kstp )         ! horizontal gradient of Hydrostatic pressure
-                               CALL dyn_bfr( kstp )         ! bottom friction
-                               CALL dyn_zdf( kstp )         ! vertical diffusion
-                               CALL dyn_spg( kstp )         ! surface pressure gradient
-      ENDIF
-                               CALL dyn_nxt( kstp )         ! lateral velocity at next time step
-
-                               CALL ssh_swp( kstp )         ! swap of sea surface height
-      IF( lk_vvl           )   CALL dom_vvl_sf_swp( kstp )  ! swap of vertical scale factors
+      IF( ln_zdfnpc      )   CALL tra_npc    ( kstp )       ! update after fields by non-penetrative convection
+
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! Set boundary conditions and Swap
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+!!jc1: For agrif, it would be much better to finalize tracers/momentum here (e.g. bdy conditions) and move the swap 
+!!    (and time filtering) after Agrif update. Then restart would be done after and would contain updated fields. 
+!!    If so: 
+!!    (i) no need to call agrif update at initialization time
+!!    (ii) no need to update "before" fields 
+!!
+!!    Apart from creating new tra_swp/dyn_swp routines, this however: 
+!!    (i) makes boundary conditions at initialization time computed from updated fields which is not the case between 
+!!    two restarts => restartability issue. One can circumvent this, maybe, by assuming "interface separation", 
+!!    e.g. a shift of the feedback interface inside child domain. 
+!!    (ii) requires that all restart outputs of updated variables by agrif (e.g. passive tracers/tke/barotropic arrays) are done at the same
+!!    place.
+!! 
+!!jc2: dynnxt must be the latest call. fse3t_b are indeed updated in that routine
+                             CALL tra_nxt    ( kstp )       ! tracer fields at next time step
+                             CALL dyn_nxt    ( kstp )       ! lateral velocity at next time step
+                             CALL ssh_swp    ( kstp )       ! swap of sea surface height
+      IF( lk_vvl         )   CALL dom_vvl_sf_swp( kstp )    ! swap of vertical scale factors
       !
 
 !!gm : This does not only concern the dynamics ==>>> add a new title
 !!gm2: why ouput restart before AGRIF update?
-      IF( lrst_oce         )   CALL rst_write( kstp )       ! write output ocean restart file
+!!
+!!jc: That would be better, but see comment above
+!!
+      IF( lrst_oce       )   CALL rst_write( kstp )       ! write output ocean restart file
 
 #if defined key_agrif
Index: /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
===================================================================
--- /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 5901)
+++ /branches/2015/dev_r5847_MERCATOR9_solveur_simplification/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 5902)
@@ -40,5 +40,4 @@
    USE dynldf           ! lateral momentum diffusion       (dyn_ldf routine)
    USE dynzdf           ! vertical diffusion               (dyn_zdf routine)
-   USE dynspg_oce       ! surface pressure gradient        (dyn_spg routine)
    USE dynspg           ! surface pressure gradient        (dyn_spg routine)
 
