Index: /trunk/NEMOGCM/ARCH/arch-openmpi_NAVITI_MERCATOR.fcm
===================================================================
--- /trunk/NEMOGCM/ARCH/arch-openmpi_NAVITI_MERCATOR.fcm	(revision 5929)
+++ /trunk/NEMOGCM/ARCH/arch-openmpi_NAVITI_MERCATOR.fcm	(revision 5930)
@@ -23,5 +23,5 @@
 %CPP	             cpp
 %FC                  mpif90
-%FCFLAGS             -O2 -fp-model precise  -traceback -r8  -convert big_endian -assume byterecl
+%FCFLAGS             -O1 -fp-model precise  -traceback -r8  -convert big_endian -assume byterecl
 %FFLAGS              %FCFLAGS
 %LD                   mpif90
Index: /trunk/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 5930)
@@ -70,11 +70,4 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
-   ln_bt_nn_auto =    .FALSE.          !  Set nn_baro automatically to be just below
-                                       !  a user defined maximum courant number (rn_bt_cmax)
-   nn_baro       =    30               !  Number of iterations of barotropic mode
 /
 !-----------------------------------------------------------------------
@@ -344,10 +337,10 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
-!                          !  explicit free surface                     ("key_dynspg_exp")
-!                          !  filtered free surface                     ("key_dynspg_flt")
-!                          !  split-explicit free surface               ("key_dynspg_ts")
-
+&namdyn_spg    !   surface pressure gradient 
+!-----------------------------------------------------------------------
+   ln_dynspg_ts   = .true.    ! split-explicit free surface
+      ln_bt_auto    = .false.   ! Number of sub-step defined from:
+         nn_baro      = 30        ! =F : the number of sub-step in rn_rdt seconds
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
@@ -408,8 +401,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm	(revision 5930)
@@ -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: /trunk/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 5930)
@@ -64,8 +64,4 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namcrs        !   Grid coarsening for dynamics output and/or
                !   passive tracer coarsened online simulations
@@ -264,6 +260,7 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
@@ -296,11 +293,4 @@
 !-----------------------------------------------------------------------
    ln_tmx_itf  = .false.   !  ITF specific parameterisation
-/
-!-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-   nn_solv     =      2    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
-   nn_nmin     =    210    !  minimum of iterations for the SOR solver
-   rn_sor      =  1.96     !  optimal coefficient for SOR solver (to be adjusted with the domain)
 /
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 5930)
@@ -64,8 +64,4 @@
    ppkth2      =  999999.0               !
    ppacr2      =  999999.0               !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -286,7 +282,8 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
-
+&namdyn_spg    !   surface pressure gradient 
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
@@ -341,11 +338,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-   nn_solv     =      2    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
-   nn_nmin     =    210    !  minimum of iterations for the SOR solver
-   rn_sor      =  1.96     !  optimal coefficient for SOR solver (to be adjusted with the domain)
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm	(revision 5930)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_dynspg_flt key_zdftke key_iomput key_mpp_mpi
+ bld::tool::fppkeys key_zdftke key_iomput key_mpp_mpi
Index: /trunk/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 5930)
@@ -67,8 +67,4 @@
    ppkth2      =  999999.0               !
    ppacr2      =  999999.0               !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -287,6 +283,8 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
@@ -345,11 +343,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-   nn_solv     =      2    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
-   nn_nmin     =    210    !  minimum of iterations for the SOR solver
-   rn_sor      =  1.96     !  optimal coefficient for SOR solver (to be adjusted with the domain)
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/GYRE_BFM/cpp_GYRE_BFM.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/GYRE_BFM/cpp_GYRE_BFM.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/GYRE_BFM/cpp_GYRE_BFM.fcm	(revision 5930)
@@ -1,2 +1,2 @@
-bld::tool::fppkeys key_dynspg_flt 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: /trunk/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 5930)
@@ -57,8 +57,4 @@
    ppkth2      =  999999.0               !
    ppacr2      =  999999.0               !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -206,4 +202,9 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
@@ -244,11 +245,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-   nn_solv     =      2    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
-   nn_nmin     =    210    !  minimum of iterations for the SOR solver
-   rn_sor      =  1.96     !  optimal coefficient for SOR solver (to be adjusted with the domain)
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 5930)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys  key_dynspg_flt key_zdftke key_top key_pisces_reduced key_mpp_mpi
+bld::tool::fppkeys key_zdftke key_top key_pisces_reduced key_mpp_mpi
Index: /trunk/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg	(revision 5930)
@@ -41,5 +41,4 @@
    nn_bathy    =    0      !  compute (=0) or read (=1) the bathymetry file
    rn_rdt      = 7200.     !  time step for the dynamics (and tracer if nn_acc=0)
-!   nn_baro     =   60      !  number of barotropic time step            ("key_dynspg_ts")
    rn_rdtmin   = 7200.           !  minimum time step on tracers (used if nn_acc=1)
    rn_rdtmax   = 7200.           !  maximum time step on tracers (used if nn_acc=1)
@@ -261,6 +260,8 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
@@ -300,11 +301,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-   nn_solv     =      2    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
-   nn_nmin     =    210    !  minimum of iterations for the SOR solver
-   rn_sor      =  1.96     !  optimal coefficient for SOR solver (to be adjusted with the domain)
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/GYRE_XIOS/cpp_GYRE_XIOS.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/GYRE_XIOS/cpp_GYRE_XIOS.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/GYRE_XIOS/cpp_GYRE_XIOS.fcm	(revision 5930)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_dynspg_flt key_zdftke key_iomput key_mpp_mpi
+ bld::tool::fppkeys key_zdftke key_iomput key_mpp_mpi
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 5930)
@@ -54,8 +54,4 @@
    rn_rdtmin   = 14400.          !  minimum time step on tracers (used if nn_acc=1)
    rn_rdtmax   = 14400.          !  maximum time step on tracers (used if nn_acc=1)
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -198,9 +194,13 @@
    ln_dynvor_een = .true.  !  energy & enstrophy scheme
       nn_een_e3f = 1             !  e3f = masked averaging of e3t divided by 4 (=0) or by the sum of mask (=1)
-   ln_dynvor_msk = .true.  !  vorticity multiplied by fmask (=T) or not (=F) (all vorticity schemes)
 /
 !-----------------------------------------------------------------------
 &namdyn_hpg    !   Hydrostatic pressure gradient option
 !-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
 /
 !-----------------------------------------------------------------------
@@ -246,8 +246,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface 
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 5930)
@@ -46,8 +46,4 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -188,4 +184,9 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
@@ -228,8 +229,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 5930)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt 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: /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 5930)
@@ -53,8 +53,4 @@
    rn_rdtmin   = 14400.          !  minimum time step on tracers (used if nn_acc=1)
    rn_rdtmax   = 14400.          !  maximum time step on tracers (used if nn_acc=1)
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -204,4 +200,9 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
@@ -245,8 +246,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface 
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 5930)
@@ -46,8 +46,4 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -186,10 +182,13 @@
 !-----------------------------------------------------------------------
    ln_hpg_zco  = .false.   !  z-coordinate - full steps
-   ln_hpg_zps  = .false.    !  z-coordinate - partial steps (interpolation)
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
    ln_hpg_sco  = .false.   !  s-coordinate (standard jacobian formulation)
    ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
-   ln_hpg_prj  = .true.   !  s-coordinate (Pressure Jacobian scheme)
-   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
-                                 !           centered      time scheme  (F)
+   ln_hpg_prj  = .true.    !  s-coordinate (Pressure Jacobian scheme)
+/
+!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
 /
 !-----------------------------------------------------------------------
@@ -236,8 +235,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm	(revision 5930)
@@ -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: /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg	(revision 5930)
@@ -11,5 +11,5 @@
 !!              8 - Verical physics  (namzdf, namzdf_ric, namzdf_tke, namzdf_kpp, namzdf_ddm, namzdf_tmx)
 !!              9 - diagnostics      (namnc4, namtrd, namspr, namflo, namptr, namhsb)
-!!             10 - miscellaneous    (namsol, nammpp, nammpp_dyndist, namctl)
+!!             10 - miscellaneous    (nammpp, nammpp_dyndist, namctl)
 !!             11 - Obs & Assim      (namobs, nam_asminc)
 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -86,5 +86,4 @@
                            !
    rn_rdt      = 2880.     !  time step for the dynamics (and tracer if nn_acc=0)
-   nn_baro     =   64      !  number of barotropic time step            ("key_dynspg_ts")
    rn_atfp     =    0.1    !  asselin time filter parameter
    nn_acc      =    0      !  acceleration of convergence : =1      used, rdt < rdttra(k)
@@ -552,14 +551,10 @@
    ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
    ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme)
-   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
-                                 !           centered      time scheme  (F)
-/
-!-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
-!                          !  explicit free surface                     ("key_dynspg_exp")
-!                          !  filtered free surface                     ("key_dynspg_flt")
-!                          !  split-explicit free surface               ("key_dynspg_ts")
-
+/
+!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
@@ -702,20 +697,6 @@
 !!   nammpp_dyndist    Massively Parallel domain decomposition          ("key_agrif" && "key_mpp_dyndist")
 !!   namctl            Control prints & Benchmark
-!!   namsol            elliptic solver / island / free surface 
-!!======================================================================
-!
-!-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface 
-!-----------------------------------------------------------------------
-   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
-                           !                   =2 successive-over-relaxation (sor)
-   nn_sol_arp  =      0    !  absolute/relative (0/1) precision convergence test
-   rn_eps      =  1.e-6    !  absolute precision of the solver
-   nn_nmin     =    300    !  minimum of iterations for the SOR solver
-   nn_nmax     =    800    !  maximum of iterations for the SOR solver
-   nn_nmod     =     10    !  frequency of test for the SOR solver
-   rn_resmax   =  1.e-10   !  absolute precision for the SOR solver
-   rn_sor      =  1.92     !  optimal coefficient for SOR solver (to be adjusted with the domain)
-/
+!!======================================================================
+!
 !-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg	(revision 5930)
@@ -65,8 +65,4 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -248,6 +244,8 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
@@ -299,8 +297,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface 
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/cpp_ORCA2_LIM_CFC_C14b.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/cpp_ORCA2_LIM_CFC_C14b.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/cpp_ORCA2_LIM_CFC_C14b.fcm	(revision 5930)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_zdftke key_zdfddm key_zdftmx key_top key_cfc key_c14b key_iomput key_mpp_mpi
+bld::tool::fppkeys key_trabbl key_lim2 key_zdftke key_zdfddm key_zdftmx key_top key_cfc key_c14b key_iomput key_mpp_mpi
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 5930)
@@ -46,8 +46,4 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -188,4 +184,9 @@
 /
 !-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_ts  = .true.  !  split-explicit free surface
+/
+!-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
 !-----------------------------------------------------------------------
@@ -228,8 +229,4 @@
 /
 !-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 5930)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt 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: /trunk/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg	(revision 5930)
@@ -53,8 +53,4 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
Index: /trunk/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg	(revision 5930)
@@ -50,8 +50,4 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namcrs        !   Grid coarsening for dynamics output and/or
                !   passive tracer coarsened online simulations
Index: /trunk/NEMOGCM/CONFIG/ORCA2_SAS_LIM/cpp_ORCA2_SAS_LIM.fcm
===================================================================
--- /trunk/NEMOGCM/CONFIG/ORCA2_SAS_LIM/cpp_ORCA2_SAS_LIM.fcm	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/ORCA2_SAS_LIM/cpp_ORCA2_SAS_LIM.fcm	(revision 5930)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt 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: /trunk/NEMOGCM/CONFIG/SHARED/field_def.xml
===================================================================
--- /trunk/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 5930)
@@ -672,7 +672,4 @@
       <field id="ketrd_hpg"     long_name="ke-trend: hydrostatic pressure gradient"          unit="W/s^3"                        />
       <field id="ketrd_spg"     long_name="ke-trend: surface     pressure gradient"          unit="W/s^3"                        />
-      <field id="ketrd_spgexp"  long_name="ke-trend: surface pressure gradient (explicit)"   unit="W/s^3"                        />
-      <field id="ketrd_spgflt"  long_name="ke-trend: surface pressure gradient (filter)"     unit="W/s^3"                        />
-      <field id="ssh_flt"       long_name="filtered contribution to ssh (dynspg_flt)"        unit="m"       grid_ref="grid_T_2D" />
       <field id="w0"            long_name="surface vertical velocity"                        unit="m/s"     grid_ref="grid_T_2D" />
       <field id="pw0_exp"       long_name="surface pressure flux due to ssh"                 unit="W/s^2"   grid_ref="grid_T_2D" />
@@ -716,6 +713,4 @@
      <field id="utrd_hpg"       long_name="i-trend: hydrostatic pressure gradient"          unit="m/s^2"                        />
      <field id="utrd_spg"       long_name="i-trend: surface     pressure gradient"          unit="m/s^2"                        />
-     <field id="utrd_spgexp"    long_name="i-trend: surface pressure gradient (explicit)"   unit="m/s^2"                        />
-     <field id="utrd_spgflt"    long_name="i-trend: surface pressure gradient (filtered)"   unit="m/s^2"                        />
      <field id="utrd_keg"       long_name="i-trend: KE gradient         or hor. adv."       unit="m/s^2"                        />
      <field id="utrd_rvo"       long_name="i-trend: relative  vorticity or metric term"     unit="m/s^2"                        />
@@ -736,6 +731,4 @@
      <field id="vtrd_hpg"       long_name="j-trend: hydrostatic pressure gradient"          unit="m/s^2"                        />
      <field id="vtrd_spg"       long_name="j-trend: surface     pressure gradient"          unit="m/s^2"                        />
-     <field id="vtrd_spgexp"    long_name="j-trend: surface pressure gradient (explicit)"   unit="m/s^2"                        />
-     <field id="vtrd_spgflt"    long_name="j-trend: surface pressure gradient (filtered)"   unit="m/s^2"                        />
      <field id="vtrd_keg"       long_name="j-trend: KE gradient         or hor. adv."       unit="m/s^2"                        />
      <field id="vtrd_rvo"       long_name="j-trend: relative  vorticity or metric term"     unit="m/s^2"                        />
Index: /trunk/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /trunk/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5929)
+++ /trunk/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5930)
@@ -13,5 +13,5 @@
 !!              8 - Verical physics  (namzdf, namzdf_ric, namzdf_tke, namzdf_ddm, namzdf_tmx)
 !!              9 - diagnostics      (namnc4, namtrd, namspr, namflo, namhsb, namsto)
-!!             10 - miscellaneous    (namsol, nammpp, namctl)
+!!             10 - miscellaneous    (nammpp, namctl)
 !!             11 - Obs & Assim      (namobs, nam_asminc)
 !!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
@@ -161,19 +161,4 @@
    ppkth2      =       48.029893720000 !
    ppacr2      =       13.000000000000 !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
-   ln_bt_fw      =    .TRUE.           !  Forward integration of barotropic equations
-   ln_bt_av      =    .TRUE.           !  Time filtering of barotropic variables
-   ln_bt_nn_auto =    .TRUE.           !  Set nn_baro automatically to be just below
-                                       !  a user defined maximum courant number (rn_bt_cmax)
-   nn_baro       =    30               !  Number of iterations of barotropic mode
-                                       !  during rn_rdt seconds. Only used if ln_bt_nn_auto=F
-   rn_bt_cmax    =    0.8              !  Maximum courant number allowed if ln_bt_nn_auto=T
-   nn_bt_flt     =    1                !  Time filter choice
-                                       !  = 0 None
-                                       !  = 1 Boxcar over   nn_baro barotropic steps
-                                       !  = 2 Boxcar over 2*nn_baro     "        "
 /
 !-----------------------------------------------------------------------
@@ -817,5 +802,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
 !!======================================================================
@@ -863,14 +848,19 @@
    ln_hpg_djc  = .false.   !  s-coordinate (Density Jacobian with Cubic polynomial)
    ln_hpg_prj  = .false.   !  s-coordinate (Pressure Jacobian scheme)
-   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
-                                 !           centered      time scheme  (F)
-/
-!-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
-!                          !  explicit free surface                     ("key_dynspg_exp")
-!                          !  filtered free surface                     ("key_dynspg_flt")
-!                          !  split-explicit free surface               ("key_dynspg_ts")
-
+/
+!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+   ln_dynspg_exp  = .false.   ! explicit free surface
+   ln_dynspg_ts   = .false.   ! split-explicit free surface
+      ln_bt_fw      = .true.    ! Forward integration of barotropic Eqs.
+      ln_bt_av      = .true.    ! Time filtering of barotropic variables
+         nn_bt_flt    =  1        ! Time filter choice  = 0 None
+         !                        !                     = 1 Boxcar over   nn_baro sub-steps
+         !                        !                     = 2 Boxcar over 2*nn_baro  "    "
+      ln_bt_auto    = .true.    ! Number of sub-step defined from:
+         rn_bt_cmax   =  0.8      ! =T : the Maximum Courant Number allowed
+         nn_baro      = 30        ! =F : the number of sub-step in rn_rdt seconds
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
@@ -1005,5 +995,4 @@
 !!                  ***  Miscellaneous namelists  ***
 !!======================================================================
-!!   namsol            elliptic solver / island / free surface
 !!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi)
 !!   namctl            Control prints & Benchmark
@@ -1014,17 +1003,4 @@
 !!======================================================================
 !
-!-----------------------------------------------------------------------
-&namsol        !   elliptic solver / island / free surface
-!-----------------------------------------------------------------------
-   nn_solv     =      1    !  elliptic solver: =1 preconditioned conjugate gradient (pcg)
-                           !                   =2 successive-over-relaxation (sor)
-   nn_sol_arp  =      0    !  absolute/relative (0/1) precision convergence test
-   rn_eps      =  1.e-6    !  absolute precision of the solver
-   nn_nmin     =    300    !  minimum of iterations for the SOR solver
-   nn_nmax     =    800    !  maximum of iterations for the SOR solver
-   nn_nmod     =     10    !  frequency of test for the SOR solver
-   rn_resmax   =  1.e-10   !  absolute precision for the SOR solver
-   rn_sor      =  1.92     !  optimal coefficient for SOR solver (to be adjusted with the domain)
-/
 !-----------------------------------------------------------------------
 &nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
Index: /trunk/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90	(revision 5930)
@@ -22,5 +22,4 @@
    USE oce
    USE dom_oce      
-   USE sol_oce
    USE agrif_oce
    USE phycst
@@ -29,5 +28,4 @@
    USE lib_mpp
    USE wrk_nemo
-   USE dynspg_oce
    USE zdf_oce
  
@@ -38,5 +36,5 @@
 
    PUBLIC   Agrif_tra, Agrif_dyn, Agrif_ssh, Agrif_dyn_ts, Agrif_ssh_ts, Agrif_dta_ts
-   PUBLIC   interpun, interpvn, interpun2d, interpvn2d 
+   PUBLIC   interpun, interpvn
    PUBLIC   interptsn,  interpsshn
    PUBLIC   interpunb, interpvnb, interpub2b, interpvb2b
@@ -80,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,22 +91,6 @@
       CALL Agrif_Bc_variable(vn_interp_id,procname=interpvn)
 
-#if defined key_dynspg_flt
-      CALL Agrif_Bc_variable(e1u_id,calledweight=1., procname=interpun2d)
-      CALL Agrif_Bc_variable(e2v_id,calledweight=1., procname=interpvn2d)
-#endif
-
       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
@@ -126,295 +105,279 @@
 
       IF((nbondi == -1).OR.(nbondi == 2)) THEN
-#if defined key_dynspg_flt
-         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) = (ua(2,jj,jk) - z2dt * znugdt * laplacu(2,jj))*umask(2,jj,jk)
-            END DO
-         END DO
-
-         spgu(2,:)=0.
-
+               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
+
+         zub(2,:)=0._wp                ! Correct transport
          DO jk=1,jpkm1
             DO jj=1,jpj
-               spgu(2,jj)=spgu(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
-               spgu(2,jj)=spgu(2,jj)/hu(2,jj)
-            ENDIF
-         END DO
-#else
-         spgu(2,:) = ua_b(2,:)
-#endif
-
-         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) = 0.25*(ua(1,jj,jk)+2.*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.
-
+               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
-               spgu1(2,jj)=spgu1(2,jj)+fse3u(2,jj,jk)*ua(2,jj,jk)
-            END DO
-         END DO
-
+               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
-            IF (umask(2,jj,1).NE.0.) THEN
-               spgu1(2,jj)=spgu1(2,jj)/hu(2,jj)
-            ENDIF
-         END DO
-
-         DO jk=1,jpkm1
-            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
+            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
-#if defined key_dynspg_flt
-         DO jk=1,jpkm1
-            DO jj=j1,j2
-               ua(nlci-2,jj,jk) = (ua(nlci-2,jj,jk)- z2dt * znugdt * laplacu(nlci-2,jj))*umask(nlci-2,jj,jk)
-            END DO
-         END DO
-         spgu(nlci-2,:)=0.
-         DO jk=1,jpkm1
-            DO jj=1,jpj
-               spgu(nlci-2,jj)=spgu(nlci-2,jj)+fse3u(nlci-2,jj,jk)*ua(nlci-2,jj,jk)
-            ENDDO
-         ENDDO
-         DO jj=1,jpj
-            IF (umask(nlci-2,jj,1).NE.0.) THEN
-               spgu(nlci-2,jj)=spgu(nlci-2,jj)/hu(nlci-2,jj)
-            ENDIF
-         END DO
-#else
-         spgu(nlci-2,:) = ua_b(nlci-2,:)
-#endif
-         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
-
-#if defined key_dynspg_flt
-         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
-               va(ji,2,jk) = (va(ji,2,jk) - z2dt * znugdt * laplacv(ji,2))*vmask(ji,2,jk)
-            END DO
-         END DO
-
-         spgv(:,2)=0.
-
+               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
-               spgv(ji,2)=spgv(ji,2)+fse3v(ji,2,jk)*va(ji,2,jk)
-            END DO
-         END DO
-
+               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,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
+               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
-               spgv(ji,2)=spgv(ji,2)/hv(ji,2)
-            ENDIF
-         END DO
-#else
-         spgv(:,2)=va_b(:,2)
-#endif
-
-         DO jk=1,jpkm1
-            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.
-
+            zvb(ji,nlcj-2) = zvb(ji,nlcj-2) * hvr_a(ji,nlcj-2)
+         END DO
          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
-
-         DO ji=1,jpi
-            IF (vmask(ji,2,1).NE.0.) THEN
-               spgv1(ji,2)=spgv1(ji,2)/hv(ji,2)
-            ENDIF
-         END DO
-
-         DO jk=1,jpkm1
+               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
+         !-----------------------------------------------------
+         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
-               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
-         ! Set tangential velocities to time splitting estimate
-         spgu1(:,2)=0._wp
+               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
-               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
-
-         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
-
-#if defined key_dynspg_flt
-         DO jk=1,jpkm1
-            DO ji=1,jpi
-               va(ji,nlcj-2,jk) = (va(ji,nlcj-2,jk)-z2dt * znugdt * laplacv(ji,nlcj-2))*vmask(ji,nlcj-2,jk)
-            END DO
-         END DO
-
-
-         spgv(:,nlcj-2)=0.
-
-         DO jk=1,jpkm1
-            DO ji=1,jpi
-               spgv(ji,nlcj-2)=spgv(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
-               spgv(ji,nlcj-2)=spgv(ji,nlcj-2)/hv(ji,nlcj-2)
-            ENDIF
-         END DO
-
-#else
-         spgv(:,nlcj-2)=va_b(:,nlcj-2)
-#endif
-
-         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
@@ -687,4 +650,5 @@
                   END DO
                END DO
+               tsa(nlci,j1:j2,k1:k2,jn) = 0._wp
             ENDDO
          ENDIF
@@ -706,4 +670,5 @@
                   END DO
                END DO
+               tsa(i1:i2,nlcj,k1:k2,jn) = 0._wp
             ENDDO
          ENDIF
@@ -724,4 +689,5 @@
                   END DO
                END DO
+               tsa(1,j1:j2,k1:k2,jn) = 0._wp
             END DO
          ENDIF
@@ -742,4 +708,5 @@
                   END DO
                END DO
+               tsa(i1:i2,1,k1:k2,jn) = 0._wp
             ENDDO
          ENDIF
@@ -828,37 +795,4 @@
    END SUBROUTINE interpun
 
-
-   SUBROUTINE interpun2d(ptab,i1,i2,j1,j2,before)
-      !!---------------------------------------------
-      !!   *** ROUTINE interpun ***
-      !!---------------------------------------------    
-      !
-      INTEGER, INTENT(in) :: i1,i2,j1,j2
-      REAL(wp), DIMENSION(i1:i2,j1:j2), INTENT(inout) :: ptab
-      LOGICAL, INTENT(in) :: before
-      !
-      INTEGER :: ji,jj
-      REAL(wp) :: ztref
-      REAL(wp) :: zrhoy	
-      !!---------------------------------------------    
-      !
-      ztref = 1.
-
-      IF (before) THEN 
-         DO jj=j1,j2
-            DO ji=i1,MIN(i2,nlci-1)
-               ptab(ji,jj) = e2u(ji,jj) * ((gcx(ji+1,jj) - gcx(ji,jj))/e1u(ji,jj)) 
-            END DO
-         END DO
-      ELSE
-         zrhoy = Agrif_Rhoy()
-         DO jj=j1,j2
-            laplacu(i1:i2,jj) = ztref * (ptab(i1:i2,jj)/(zrhoy*e2u(i1:i2,jj))) !*umask(i1:i2,jj,1)
-         END DO
-      ENDIF
-      ! 
-   END SUBROUTINE interpun2d
-
-
    SUBROUTINE interpvn(ptab,i1,i2,j1,j2,k1,k2, before)
       !!---------------------------------------------
@@ -895,35 +829,4 @@
       !        
    END SUBROUTINE interpvn
-
-   SUBROUTINE interpvn2d(ptab,i1,i2,j1,j2,before)
-      !!---------------------------------------------
-      !!   *** ROUTINE interpvn ***
-      !!---------------------------------------------    
-      !
-      INTEGER, INTENT(in) :: i1,i2,j1,j2
-      REAL(wp), DIMENSION(i1:i2,j1:j2), INTENT(inout) :: ptab
-      LOGICAL, INTENT(in) :: before
-      !
-      INTEGER :: ji,jj
-      REAL(wp) :: zrhox	
-      REAL(wp) :: ztref
-      !!---------------------------------------------    
-      ! 
-      ztref = 1.    
-      IF (before) THEN 
-         !interpv entre 1 et k2 et interpv2d en jpkp1
-         DO jj=j1,MIN(j2,nlcj-1)
-            DO ji=i1,i2
-               ptab(ji,jj) = e1v(ji,jj) * ((gcx(ji,jj+1) - gcx(ji,jj))/e2v(ji,jj)) * vmask(ji,jj,1)
-            END DO
-         END DO
-      ELSE           
-         zrhox = Agrif_Rhox()
-         DO ji=i1,i2
-            laplacv(ji,j1:j2) = ztref * (ptab(ji,j1:j2)/(zrhox*e1v(ji,j1:j2)))
-         END DO
-      ENDIF
-      !      
-   END SUBROUTINE interpvn2d
 
    SUBROUTINE interpunb(ptab,i1,i2,j1,j2,before,nb,ndir)
Index: /trunk/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/NST_SRC/agrif_top_interp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/NST_SRC/agrif_top_interp.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/NST_SRC/agrif_top_interp.F90	(revision 5930)
@@ -4,5 +4,4 @@
    USE oce
    USE dom_oce      
-   USE sol_oce
    USE agrif_oce
    USE agrif_top_sponge
Index: /trunk/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 5930)
@@ -104,5 +104,4 @@
    USE dom_oce
    USE nemogcm
-   USE sol_oce
    USE in_out_manager
    USE agrif_opa_update
@@ -172,5 +171,4 @@
    USE dom_oce
    USE nemogcm
-   USE sol_oce
    USE lib_mpp
    USE in_out_manager
@@ -210,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. 
@@ -278,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
@@ -319,5 +330,5 @@
    !
    Agrif_UseSpecialValueInUpdate = .FALSE.
-   nbcline = 0
+   nbcline = 0 
    lk_agrif_doupd = .FALSE.
    !
Index: /trunk/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90	(revision 5930)
@@ -34,5 +34,4 @@
    USE zdfmxl             ! Mixed layer depth
    USE dom_oce, ONLY :   ndastp
-   USE sol_oce, ONLY :   gcx   ! Solver variables defined in memory
    USE in_out_manager     ! I/O manager
    USE iom                ! I/O module
@@ -114,5 +113,4 @@
             CALL iom_rstput( kt, nitbkg_r, inum, 'en'     , en                )
 #endif
-            CALL iom_rstput( kt, nitbkg_r, inum, 'gcx'    , gcx               )
             !
             CALL iom_close( inum )
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 5930)
@@ -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
@@ -388,10 +387,21 @@
       END DO  ! ib_bdy
 
-      ! bg jchanut tschanges
 #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 )
-#endif
-      ! end jchanut tschanges
+      IF (ln_dynspg_ts) THEN      ! Fill temporary arrays with slow-varying bdy data                           
+         DO ib_bdy = 1, nb_bdy    ! Tidal component added in ts loop
+            IF ( nn_dyn2d_dta(ib_bdy) .ge. 2 ) THEN
+               nblen => idx_bdy(ib_bdy)%nblen
+               nblenrim => idx_bdy(ib_bdy)%nblenrim
+               IF( cn_dyn2d(ib_bdy) == 'frs' ) THEN; ilen1(:)=nblen(:) ; ELSE ; ilen1(:)=nblenrim(:) ; ENDIF 
+               IF ( dta_bdy(ib_bdy)%ll_ssh ) dta_bdy_s(ib_bdy)%ssh(1:ilen1(1)) = dta_bdy(ib_bdy)%ssh(1:ilen1(1))
+               IF ( dta_bdy(ib_bdy)%ll_u2d ) dta_bdy_s(ib_bdy)%u2d(1:ilen1(2)) = dta_bdy(ib_bdy)%u2d(1:ilen1(2))
+               IF ( dta_bdy(ib_bdy)%ll_v2d ) dta_bdy_s(ib_bdy)%v2d(1:ilen1(3)) = dta_bdy(ib_bdy)%v2d(1:ilen1(3))
+            ENDIF
+         END DO
+      ELSE ! Add tides if not split-explicit free surface else this is done in ts loop
+         !
+         CALL bdy_dta_tides( kt=kt, time_offset=time_offset )
+      ENDIF
+#endif
 
       IF ( ln_apr_obc ) THEN
@@ -423,5 +433,4 @@
       !!                
       !!----------------------------------------------------------------------
-      USE dynspg_oce, ONLY: lk_dynspg_ts
       !!
       INTEGER     ::  ib_bdy, jfld, jstart, jend, ierror  ! local indices
@@ -670,5 +679,5 @@
             ! sea ice
             IF( nn_ice_lim_dta(ib_bdy) .eq. 1 ) THEN
-               ! Test for types of ice input (lim2 or lim3)
+               ! Test for types of ice input (lim2 or lim3) 
                ! Build file name to find dimensions 
                clname=TRIM(bn_a_i%clname)
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 5930)
@@ -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
@@ -35,6 +34,5 @@
    PRIVATE
 
-   PUBLIC   bdy_dyn     ! routine called in dynspg_flt (if lk_dynspg_flt) or 
-                        ! dyn_nxt (if lk_dynspg_ts or lk_dynspg_exp)
+   PUBLIC   bdy_dyn    ! routine called in dyn_nxt
 
 #  include "domzgr_substitute.h90"
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 5930)
@@ -33,5 +33,4 @@
 !   USE tide_mod       ! Useless ??
    USE fldread
-   USE dynspg_oce, ONLY: lk_dynspg_ts
 
    IMPLICIT NONE
@@ -54,5 +53,5 @@
    TYPE(TIDES_DATA), PUBLIC, DIMENSION(jp_bdy), TARGET :: tides  !: External tidal harmonics data
 !$AGRIF_END_DO_NOT_TREAT
-   TYPE(OBC_DATA)  , PRIVATE, DIMENSION(jp_bdy) :: dta_bdy_s  !: bdy external data (slow component)
+   TYPE(OBC_DATA)  , PUBLIC, DIMENSION(jp_bdy) :: dta_bdy_s  !: bdy external data (slow component)
 
    !!----------------------------------------------------------------------
@@ -270,13 +269,12 @@
             ENDIF
             !
-            IF ( lk_dynspg_ts ) THEN ! Allocate arrays to save slowly varying boundary data during
-                                     ! time splitting integration
-               ALLOCATE( dta_bdy_s(ib_bdy)%ssh ( ilen0(1) ) )
-               ALLOCATE( dta_bdy_s(ib_bdy)%u2d ( ilen0(2) ) )
-               ALLOCATE( dta_bdy_s(ib_bdy)%v2d ( ilen0(3) ) )
-               dta_bdy_s(ib_bdy)%ssh(:) = 0.e0
-               dta_bdy_s(ib_bdy)%u2d(:) = 0.e0
-               dta_bdy_s(ib_bdy)%v2d(:) = 0.e0
-            ENDIF
+            ! Allocate slow varying data in the case of time splitting:
+            ! Do it anyway because at this stage knowledge of free surface scheme is unknown
+            ALLOCATE( dta_bdy_s(ib_bdy)%ssh ( ilen0(1) ) )
+            ALLOCATE( dta_bdy_s(ib_bdy)%u2d ( ilen0(2) ) )
+            ALLOCATE( dta_bdy_s(ib_bdy)%v2d ( ilen0(3) ) )
+            dta_bdy_s(ib_bdy)%ssh(:) = 0.e0
+            dta_bdy_s(ib_bdy)%u2d(:) = 0.e0
+            dta_bdy_s(ib_bdy)%v2d(:) = 0.e0
             !
          ENDIF ! nn_dyn2d_dta(ib_bdy) .ge. 2
@@ -397,5 +395,5 @@
       !!
       LOGICAL  :: lk_first_btstp  ! =.TRUE. if time splitting and first barotropic step
-      INTEGER,          DIMENSION(jpbgrd) :: ilen0 
+      INTEGER, DIMENSION(jpbgrd) :: ilen0 
       INTEGER, DIMENSION(1:jpbgrd) :: nblen, nblenrim  ! short cuts
       INTEGER  :: itide, ib_bdy, ib, igrd                     ! loop indices
@@ -456,16 +454,9 @@
             zoff = -kt_tide * rdt ! time offset relative to nodal factor computation time
             !
-            ! If time splitting, save data at first barotropic iteration
-            IF ( PRESENT(kit) ) THEN
-               IF ( lk_first_btstp ) THEN ! Save slow varying open boundary data:
-                  IF ( dta_bdy(ib_bdy)%ll_ssh ) dta_bdy_s(ib_bdy)%ssh(1:ilen0(1)) = dta_bdy(ib_bdy)%ssh(1:ilen0(1))
-                  IF ( dta_bdy(ib_bdy)%ll_u2d ) dta_bdy_s(ib_bdy)%u2d(1:ilen0(2)) = dta_bdy(ib_bdy)%u2d(1:ilen0(2))
-                  IF ( dta_bdy(ib_bdy)%ll_v2d ) dta_bdy_s(ib_bdy)%v2d(1:ilen0(3)) = dta_bdy(ib_bdy)%v2d(1:ilen0(3))
-
-               ELSE ! Initialize arrays from slow varying open boundary data:            
-                  IF ( dta_bdy(ib_bdy)%ll_ssh ) dta_bdy(ib_bdy)%ssh(1:ilen0(1)) = dta_bdy_s(ib_bdy)%ssh(1:ilen0(1))
-                  IF ( dta_bdy(ib_bdy)%ll_u2d ) dta_bdy(ib_bdy)%u2d(1:ilen0(2)) = dta_bdy_s(ib_bdy)%u2d(1:ilen0(2))
-                  IF ( dta_bdy(ib_bdy)%ll_v2d ) dta_bdy(ib_bdy)%v2d(1:ilen0(3)) = dta_bdy_s(ib_bdy)%v2d(1:ilen0(3))
-               ENDIF
+            ! If time splitting, initialize arrays from slow varying open boundary data:
+            IF ( PRESENT(kit) ) THEN           
+               IF ( dta_bdy(ib_bdy)%ll_ssh ) dta_bdy(ib_bdy)%ssh(1:ilen0(1)) = dta_bdy_s(ib_bdy)%ssh(1:ilen0(1))
+               IF ( dta_bdy(ib_bdy)%ll_u2d ) dta_bdy(ib_bdy)%u2d(1:ilen0(2)) = dta_bdy_s(ib_bdy)%u2d(1:ilen0(2))
+               IF ( dta_bdy(ib_bdy)%ll_v2d ) dta_bdy(ib_bdy)%v2d(1:ilen0(3)) = dta_bdy_s(ib_bdy)%v2d(1:ilen0(3))
             ENDIF
             !
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 5930)
@@ -10,8 +10,7 @@
    !!            3.4  !  2011     (D. Storkey) rewrite in preparation for OBC-BDY merge
    !!----------------------------------------------------------------------
-#if   defined key_bdy   &&   defined key_dynspg_flt
+#if   defined key_bdy
    !!----------------------------------------------------------------------
-   !!   'key_bdy'            AND      unstructured open boundary conditions
-   !!   'key_dynspg_flt'                              filtered free surface
+   !!   'key_bdy'      unstructured open boundary conditions
    !!----------------------------------------------------------------------
    USE oce             ! ocean dynamics and tracers 
@@ -30,5 +29,5 @@
    PRIVATE
 
-   PUBLIC bdy_vol        ! routine called by dynspg_flt.h90
+   PUBLIC bdy_vol      
 
    !! * Substitutions
@@ -45,6 +44,6 @@
       !!                      ***  ROUTINE bdyvol  ***
       !!
-      !! ** Purpose :   This routine is called in dynspg_flt to control 
-      !!      the volume of the system. A correction velocity is calculated
+      !! ** Purpose :   This routine controls the volume of the system. 
+      !!      A correction velocity is calculated
       !!      to correct the total transport through the unstructured OBC. 
       !!      The total depth used is constant (H0) to be consistent with the 
Index: unk/NEMOGCM/NEMO/OPA_SRC/C1D/dynnxt_c1d.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dynnxt_c1d.F90	(revision 5929)
+++ 	(revision )
@@ -1,103 +1,0 @@
-MODULE dynnxt_c1d
-   !!======================================================================
-   !!                       ***  MODULE  dynnxt_c1d  ***
-   !! Ocean dynamics: time stepping in 1D configuration
-   !!======================================================================
-   !! History :  2.0  !  2004-10  (C. Ethe)  Original code from dynnxt.F90
-   !!            3.0  !  2008-04  (G.madec)  Style only
-   !!----------------------------------------------------------------------
-#if defined key_c1d
-   !!----------------------------------------------------------------------
-   !!   'key_c1d'                                          1D Configuration
-   !!----------------------------------------------------------------------  
-   !!   dyn_nxt_c1d : update the horizontal velocity from the momentum trend
-   !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers
-   USE dom_oce         ! ocean space and time domain
-   USE in_out_manager  ! I/O manager
-   USE lbclnk          ! lateral boundary condition (or mpp link)
-   USE prtctl          ! Print control
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC dyn_nxt_c1d                ! routine called by step.F90
-   !!----------------------------------------------------------------------
-   !! NEMO/C1D 3.3 , NEMO Consortium (2010)
-   !! $Id$ 
-   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-CONTAINS
-
-   SUBROUTINE dyn_nxt_c1d ( kt )
-      !!----------------------------------------------------------------------
-      !!                  ***  ROUTINE dyn_nxt_c1d  ***
-      !!                   
-      !! ** Purpose :   Compute the after horizontal velocity from the momentum trend.
-      !!
-      !! ** Method  :   Apply lateral boundary conditions on the trends (ua,va) 
-      !!      through calls to routine lbc_lnk.
-      !!      After velocity is compute using a leap-frog scheme environment:
-      !!         (ua,va) = (ub,vb) + 2 rdt (ua,va)
-      !!      Time filter applied on now horizontal velocity to avoid the
-      !!      divergence of two consecutive time-steps and swap of dynamics
-      !!      arrays to start the next time step:
-      !!         (ub,vb) = (un,vn) + atfp [ (ub,vb) + (ua,va) - 2 (un,vn) ]
-      !!         (un,vn) = (ua,va) 
-      !!
-      !! ** Action : - Update ub,vb arrays, the before horizontal velocity
-      !!             - Update un,vn arrays, the now horizontal velocity
-      !!----------------------------------------------------------------------
-      INTEGER, INTENT( in ) ::   kt      ! ocean time-step index
-      !!
-      INTEGER  ::   jk           ! dummy loop indices
-      REAL(wp) ::   z2dt         ! temporary scalar
-      !!----------------------------------------------------------------------
-
-      IF( kt == nit000 ) THEN
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'dyn_nxt_c1d : time stepping on 1D configuation'
-         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
-      ENDIF
-
-      z2dt = 2._wp * rdt                                                   ! Local constant initialization
-      IF( neuler == 0 .AND. kt == nit000 )  z2dt = rdt
-
-      CALL lbc_lnk( ua, 'U', -1. )   ;   CALL lbc_lnk( va, 'V', -1. )      ! Lateral boundary conditions
-
-      DO jk = 1, jpkm1                                                     ! Next Velocity
-         ua(:,:,jk) = ( ub(:,:,jk) + z2dt * ua(:,:,jk) ) * umask(:,:,jk)
-         va(:,:,jk) = ( vb(:,:,jk) + z2dt * va(:,:,jk) ) * vmask(:,:,jk)
-      END DO 
- 
-      DO jk = 1, jpkm1                                                     ! Time filter and swap of dynamics arrays
-         IF( neuler == 0 .AND. kt == nit000 ) THEN                               ! Euler (forward) time stepping
-             ub(:,:,jk) = un(:,:,jk)
-             vb(:,:,jk) = vn(:,:,jk)
-             un(:,:,jk) = ua(:,:,jk)
-             vn(:,:,jk) = va(:,:,jk)
-         ELSE                                                                    ! Leap-frog time stepping
-             ub(:,:,jk) = atfp * ( ub(:,:,jk) + ua(:,:,jk) ) + atfp1 * un(:,:,jk)
-             vb(:,:,jk) = atfp * ( vb(:,:,jk) + va(:,:,jk) ) + atfp1 * vn(:,:,jk)
-             un(:,:,jk) = ua(:,:,jk)
-             vn(:,:,jk) = va(:,:,jk)
-         ENDIF
-      END DO
-
-      IF(ln_ctl)   CALL prt_ctl( tab3d_1=un, clinfo1=' nxt_c1d  - Un: ', mask1=umask,   &
-         &                       tab3d_2=vn, clinfo2=' Vn: '           , mask2=vmask )
-      !
-   END SUBROUTINE dyn_nxt_c1d
-
-#else
-   !!----------------------------------------------------------------------
-   !!   Default key                                     NO 1D Config
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE dyn_nxt_c1d ( kt )
-      WRITE(*,*) 'dyn_nxt_c1d: You should not have seen this print! error?', kt
-   END SUBROUTINE dyn_nxt_c1d
-#endif
-
-   !!======================================================================
-END MODULE dynnxt_c1d
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90	(revision 5930)
@@ -18,5 +18,5 @@
 #endif
    USE dyncor_c1d      ! Coriolis term (c1d case)         (dyn_cor_1d     )
-   USE dynnxt_c1d      ! time-stepping                    (dyn_nxt routine)
+   USE dynnxt          ! time-stepping                    (dyn_nxt routine)
    USE dyndmp          ! U & V momentum damping           (dyn_dmp routine)
    USE restart         ! restart 
@@ -139,5 +139,5 @@
                         CALL dyn_cor_c1d( kstp )   ! vorticity term including Coriolis
                         CALL dyn_zdf    ( kstp )   ! vertical diffusion
-                        CALL dyn_nxt_c1d( kstp )   ! lateral velocity at next time step
+                        CALL dyn_nxt    ( kstp )   ! lateral velocity at next time step
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 5930)
@@ -30,5 +30,4 @@
    USE zdf_oce         ! ocean vertical physics
    USE ldftra          ! lateral physics: eddy diffusivity coef.
-   USE sol_oce         ! solver variables
    USE sbc_oce         ! Surface boundary condition: ocean fields
    USE sbc_ice         ! Surface boundary condition: ice fields
@@ -46,5 +45,4 @@
    USE iom
    USE ioipsl
-   USE dynspg_oce, ONLY: un_adv, vn_adv ! barotropic velocities     
 
 #if defined key_lim2
@@ -206,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
@@ -223,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: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 5930)
@@ -45,12 +45,17 @@
    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
    !! =========================
    LOGICAL,  PUBLIC :: ln_bt_fw          !: Forward integration of barotropic sub-stepping
    LOGICAL,  PUBLIC :: ln_bt_av          !: Time averaging of barotropic variables
-   LOGICAL,  PUBLIC :: ln_bt_nn_auto     !: Set number of barotropic iterations automatically
+   LOGICAL,  PUBLIC :: ln_bt_auto        !: Set number of barotropic iterations automatically
    INTEGER,  PUBLIC :: nn_bt_flt         !: Filter choice
    INTEGER,  PUBLIC :: nn_baro           !: Number of barotropic iterations during one baroclinic step (rdt)
-   REAL(wp), PUBLIC :: rn_bt_cmax        !: Maximum allowed courant number (used if ln_bt_nn_auto=T)
+   REAL(wp), PUBLIC :: rn_bt_cmax        !: Maximum allowed courant number (used if ln_bt_auto=T)
 
    !! Horizontal grid parameters for domhgr
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 5930)
@@ -35,7 +35,4 @@
    USE dtauvd          ! data: U & V current             (dta_uvd routine)
    USE domvvl          ! varying vertical mesh
-   USE dynspg_oce      ! pressure gradient schemes
-   USE dynspg_flt      ! filtered free surface
-   USE sol_oce         ! ocean solver variables
    !
    USE in_out_manager  ! I/O manager
@@ -133,14 +130,4 @@
       ENDIF
       !
-      IF( lk_agrif ) THEN                  ! read free surface arrays in restart file
-         IF( ln_rstart ) THEN
-            IF( lk_dynspg_flt )  THEN      ! read or initialize the following fields
-               !                           ! gcx, gcxb for agrif_opa_init
-               IF( sol_oce_alloc()  > 0 )   CALL ctl_stop('agrif sol_oce_alloc: allocation of arrays failed')
-               CALL flt_rst( nit000, 'READ' )
-            ENDIF
-         ENDIF                             ! explicit case not coded yet with AGRIF
-      ENDIF
-      !
       ! 
       ! Initialize "now" and "before" barotropic velocities:
@@ -445,10 +432,8 @@
       !!                 p=integral [ rau*g dz ]
       !!----------------------------------------------------------------------
-      USE dynspg          ! surface pressure gradient             (dyn_spg routine)
       USE divhor          ! hor. divergence                       (div_hor routine)
       USE lbclnk          ! ocean lateral boundary condition (or mpp link)
       !
       INTEGER ::   ji, jj, jk        ! dummy loop indices
-      INTEGER ::   indic             ! ???
       REAL(wp) ::   zmsv, zphv, zmsu, zphu, zalfg     ! temporary scalars
       REAL(wp), POINTER, DIMENSION(:,:,:) :: zprn
@@ -517,31 +502,4 @@
       vb(:,:,:) = vn(:,:,:)
       
-      ! WARNING !!!!!
-      ! after initializing u and v, we need to calculate the initial streamfunction bsf.
-      ! Otherwise, only the trend will be computed and the model will blow up (inconsistency).
-      ! to do that, we call dyn_spg with a special trick:
-      ! we fill ua and va with the velocities divided by dt, and the streamfunction will be brought to the
-      ! right value assuming the velocities have been set up in one time step.
-      ! we then set bsfd to zero (first guess for next step is d(psi)/dt = 0.)
-      !  sets up s false trend to calculate the barotropic streamfunction.
-
-      ua(:,:,:) = ub(:,:,:) / rdt
-      va(:,:,:) = vb(:,:,:) / rdt
-
-      ! calls dyn_spg. we assume euler time step, starting from rest.
-      indic = 0
-      CALL dyn_spg( nit000, indic )       ! surface pressure gradient
-      !
-      ! the new velocity is ua*rdt
-      !
-      CALL lbc_lnk( ua, 'U', -1. )
-      CALL lbc_lnk( va, 'V', -1. )
-
-      ub(:,:,:) = ua(:,:,:) * rdt
-      vb(:,:,:) = va(:,:,:) * rdt
-      ua(:,:,:) = 0.e0
-      va(:,:,:) = 0.e0
-      un(:,:,:) = ub(:,:,:)
-      vn(:,:,:) = vb(:,:,:)
       !
 !!gm  Check  here call to div_hor should not be necessary
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 5930)
@@ -36,4 +36,5 @@
    USE trd_oce         ! trends: ocean variables
    USE trddyn          ! trend manager: dynamics
+!jc   USE zpshde          ! partial step: hor. derivative     (zps_hde routine)
    !
    USE in_out_manager  ! I/O manager
@@ -58,5 +59,4 @@
    LOGICAL , PUBLIC ::   ln_hpg_prj      !: s-coordinate (Pressure Jacobian scheme)
    LOGICAL , PUBLIC ::   ln_hpg_isf      !: s-coordinate similar to sco modify for isf
-   LOGICAL , PUBLIC ::   ln_dynhpg_imp   !: semi-implicite hpg flag
 
    INTEGER , PUBLIC ::   nhpg  =  0   ! = 0 to 7, type of pressure gradient scheme used ! (deduced from ln_hpg_... flags) (PUBLIC for TAM)
@@ -132,5 +132,5 @@
       !!
       NAMELIST/namdyn_hpg/ ln_hpg_zco, ln_hpg_zps, ln_hpg_sco,     &
-         &                 ln_hpg_djc, ln_hpg_prj, ln_hpg_isf, ln_dynhpg_imp
+         &                 ln_hpg_djc, ln_hpg_prj, ln_hpg_isf
       !!----------------------------------------------------------------------
       !
@@ -155,5 +155,4 @@
          WRITE(numout,*) '      s-coord. (Density Jacobian: Cubic polynomial)     ln_hpg_djc    = ', ln_hpg_djc
          WRITE(numout,*) '      s-coord. (Pressure Jacobian: Cubic polynomial)    ln_hpg_prj    = ', ln_hpg_prj
-         WRITE(numout,*) '      time stepping: centered (F) or semi-implicit (T)  ln_dynhpg_imp = ', ln_dynhpg_imp
       ENDIF
       !
@@ -293,4 +292,6 @@
       ENDIF
 
+      ! Partial steps: bottom before horizontal gradient of t, s, rd at the last ocean level
+!jc      CALL zps_hde    ( kt, jpts, tsn, gtsu, gtsv, rhd, gru , grv )
 
       ! Local constant initialization
@@ -491,4 +492,9 @@
       ! iniitialised to 0. zhpi zhpi 
       zhpi(:,:,:)=0._wp ; zhpj(:,:,:)=0._wp
+
+      ! Partial steps: top & bottom before horizontal gradient
+!jc      CALL zps_hde_isf( kt, jpts, tsn, gtsu, gtsv, gtui, gtvi,   & 
+!jc               &       rhd, gru , grv , aru , arv , gzu , gzv , ge3ru , ge3rv ,   &
+!jc               &      grui, grvi, arui, arvi, gzui, gzvi, ge3rui, ge3rvi  )
 
 !==================================================================================     
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 5930)
@@ -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,16 +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.
-      !!             Note also that in filtered free surface (lk_dynspg_flt=T),
-      !!             the time stepping has already been done in dynspg module
+      !! ** Method  : * Ensure after velocities transport matches time splitting
+      !!             estimate (ln_dynspg_ts=T)
       !!
       !!              * Apply lateral boundary conditions on after velocity 
@@ -101,8 +96,5 @@
       INTEGER  ::   ji, jj, jk   ! dummy loop indices
       INTEGER  ::   iku, ikv     ! local integers
-#if ! defined key_dynspg_flt
-      REAL(wp) ::   z2dt         ! temporary scalar
-#endif
-      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
@@ -112,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
@@ -121,86 +114,48 @@
       ENDIF
 
-#if defined key_dynspg_flt
-      !
-      ! Next velocity :   Leap-frog time stepping already done in dynspg_flt.F routine
-      ! -------------
-
-      ! Update after velocity on domain lateral boundaries      (only local domain required)
-      ! --------------------------------------------------
-      CALL lbc_lnk( ua, 'U', -1. )         ! local domain boundaries
-      CALL lbc_lnk( va, 'V', -1. ) 
-      !
-#else
-
-# 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
-#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 
@@ -259,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(:,:,:) )
@@ -336,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  
@@ -400,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: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 5930)
@@ -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,10 +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 dynspg_flt     ! surface pressure gradient     (dyn_spg_flt routine)
-   USE dynadv         ! dynamics: vector invariant versus flux form
-   USE dynhpg, ONLY: ln_dynhpg_imp
    USE sbctide
    USE updtide
@@ -32,5 +29,4 @@
    USE in_out_manager ! I/O manager
    USE lib_mpp        ! MPP library
-   USE solver         ! solver initialization
    USE wrk_nemo       ! Memory Allocation
    USE timing         ! Timing
@@ -43,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
@@ -55,5 +51,5 @@
 CONTAINS
 
-   SUBROUTINE dyn_spg( kt, kindic )
+   SUBROUTINE dyn_spg( kt )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE dyn_spg  ***
@@ -66,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
       !!
@@ -80,5 +75,4 @@
       !
       INTEGER, INTENT(in   ) ::   kt       ! ocean time-step index
-      INTEGER, INTENT(  out) ::   kindic   ! solver flag
       !
       INTEGER  ::   ji, jj, jk                             ! dummy loop indices
@@ -103,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
          !
@@ -113,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
@@ -126,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
@@ -171,19 +165,10 @@
       CASE (  0 )   ;   CALL dyn_spg_exp( kt )              ! explicit
       CASE (  1 )   ;   CALL dyn_spg_ts ( kt )              ! time-splitting
-      CASE (  2 )   ;   CALL dyn_spg_flt( kt, kindic )      ! filtered
       !                                                    
       END SELECT
       !                    
       IF( l_trddyn )   THEN                      ! save the surface pressure gradient trends for further diagnostics
-         SELECT CASE ( nspg )
-         CASE ( 0, 1 )
-            ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
-            ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
-         CASE( 2 )
-            z2dt = 2. * rdt
-            IF( neuler == 0 .AND. kt == nit000 )   z2dt = rdt
-            ztrdu(:,:,:) = ( ua(:,:,:) - ub(:,:,:) ) / z2dt - ztrdu(:,:,:)
-            ztrdv(:,:,:) = ( va(:,:,:) - vb(:,:,:) ) / z2dt - ztrdv(:,:,:)
-         END SELECT
+         ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:)
+         ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:)
          CALL trd_dyn( ztrdu, ztrdv, jpdyn_spg, kt )
          !
@@ -203,26 +188,36 @@
       !!                  ***  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, &
+      &                    ln_bt_fw, ln_bt_av, ln_bt_auto, &
+      &                    nn_baro, rn_bt_cmax, nn_bt_flt
       !!----------------------------------------------------------------------
       !
       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
-         WRITE(numout,*) '     Filtered free surface cst volume       lk_dynspg_flt = ', lk_dynspg_flt
-      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' )
@@ -231,16 +226,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(lk_dynspg_flt)   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
-      IF( lk_dynspg_flt)   nspg =  2
+           &   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
@@ -248,12 +241,5 @@
          IF( nspg ==  0 )   WRITE(numout,*) '     explicit free surface'
          IF( nspg ==  1 )   WRITE(numout,*) '     free surface with time splitting scheme'
-         IF( nspg ==  2 )   WRITE(numout,*) '     filtered free surface'
-      ENDIF
-
-#if defined key_dynspg_flt
-      CALL solver_init( nit000 )   ! Elliptic solver initialisation
-#endif
-      !			       ! Control of hydrostatic pressure choice
-      IF( lk_dynspg_ts .AND. ln_dynhpg_imp )   CALL ctl_stop( 'Semi-implicit hpg not compatible with time splitting' )
+      ENDIF
       !
       IF( nn_timing == 1 )  CALL timing_stop('dyn_spg_init')
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 5930)
@@ -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: unk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 5929)
+++ 	(revision )
@@ -1,425 +1,0 @@
-MODULE dynspg_flt
-   !!======================================================================
-   !!                   ***  MODULE  dynspg_flt  ***
-   !! Ocean dynamics:  surface pressure gradient trend
-   !!======================================================================
-   !! History    OPA  !  1998-05  (G. Roullet)  free surface
-   !!                 !  1998-10  (G. Madec, M. Imbard)  release 8.2
-   !!   NEMO     O.1  !  2002-08  (G. Madec)  F90: Free form and module
-   !!             -   !  2002-11  (C. Talandier, A-M Treguier) Open boundaries
-   !!            1.0  !  2004-08  (C. Talandier) New trends organization
-   !!             -   !  2005-11  (V. Garnier) Surface pressure gradient organization
-   !!            2.0  !  2006-07  (S. Masson)  distributed restart using iom
-   !!             -   !  2006-08  (J.Chanut, A.Sellar) Calls to BDY routines. 
-   !!            3.2  !  2009-03  (G. Madec, M. Leclair, R. Benshila) introduce sshwzv module
-   !!            3.7  !  2014-04  (F. Roquet, G. Madec)  add some trends diag
-   !!             -   !  2014-12  (G. Madec) remove cross-land advection (cla)
-   !!----------------------------------------------------------------------
-#if defined key_dynspg_flt  
-   !!----------------------------------------------------------------------
-   !!   'key_dynspg_flt'                              filtered free surface
-   !!----------------------------------------------------------------------
-   !!   dyn_spg_flt  : update the momentum trend with the surface pressure gradient in the filtered free surface case 
-   !!   flt_rst      : read/write the time-splitting restart fields in the ocean restart file
-   !!----------------------------------------------------------------------
-   USE oce             ! ocean dynamics and tracers 
-   USE dom_oce         ! ocean space and time domain 
-   USE zdf_oce         ! ocean vertical physics
-   USE sbc_oce         ! surface boundary condition: ocean
-   USE bdy_oce         ! Lateral open boundary condition
-   USE sol_oce         ! ocean elliptic solver
-   USE phycst          ! physical constants
-   USE domvvl          ! variable volume
-   USE dynadv          ! advection 
-   USE solmat          ! matrix construction for elliptic solvers
-   USE solpcg          ! preconditionned conjugate gradient solver
-   USE solsor          ! Successive Over-relaxation solver
-   USE bdydyn          ! ocean open boundary condition on dynamics
-   USE bdyvol          ! ocean open boundary condition (bdy_vol routine)
-   USE trd_oce         ! trends: ocean variables
-   USE trddyn          ! trend manager: dynamics
-   !
-   USE in_out_manager  ! I/O manager
-   USE lib_mpp         ! distributed memory computing library
-   USE wrk_nemo        ! Memory Allocation
-   USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
-   USE prtctl          ! Print control
-   USE iom
-   USE lib_fortran
-   USE timing          ! Timing
-#if defined key_agrif
-   USE agrif_opa_interp
-#endif
-
-   IMPLICIT NONE
-   PRIVATE
-
-   PUBLIC   dyn_spg_flt  ! routine called by step.F90
-   PUBLIC   flt_rst      ! routine called by istate.F90
-
-   !! * Substitutions
-#  include "domzgr_substitute.h90"
-#  include "vectopt_loop_substitute.h90"
-   !!----------------------------------------------------------------------
-   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
-   !! $Id$
-   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
-   !!----------------------------------------------------------------------
-CONTAINS
-
-   SUBROUTINE dyn_spg_flt( kt, kindic )
-      !!----------------------------------------------------------------------
-      !!                  ***  routine dyn_spg_flt  ***
-      !!
-      !! ** Purpose :   Compute the now trend due to the surface pressure 
-      !!      gradient in case of filtered free surface formulation  and add
-      !!      it to the general trend of momentum equation.
-      !!
-      !! ** Method  :   Filtered free surface formulation. The surface
-      !!      pressure gradient is given by:
-      !!         spgu = 1/rau0 d/dx(ps) =  1/e1u di( sshn + btda )
-      !!         spgv = 1/rau0 d/dy(ps) =  1/e2v dj( sshn + btda )
-      !!      where sshn is the free surface elevation and btda is the after
-      !!      time derivative of the free surface elevation
-      !!       -1- evaluate the surface presure trend (including the addi-
-      !!      tional force) in three steps:
-      !!        a- compute the right hand side of the elliptic equation:
-      !!            gcb = 1/(e1t e2t) [ di(e2u spgu) + dj(e1v spgv) ]
-      !!         where (spgu,spgv) are given by:
-      !!            spgu = vertical sum[ e3u (ub+ 2 rdt ua ) ]
-      !!                 - grav 2 rdt hu /e1u di[sshn + (emp-rnf)]
-      !!            spgv = vertical sum[ e3v (vb+ 2 rdt va) ]
-      !!                 - grav 2 rdt hv /e2v dj[sshn + (emp-rnf)]
-      !!         and define the first guess from previous computation :
-      !!            zbtd = btda
-      !!            btda = 2 zbtd - btdb
-      !!            btdb = zbtd
-      !!        b- compute the relative accuracy to be reached by the
-      !!         iterative solver
-      !!        c- apply the solver by a call to sol... routine
-      !!       -2- compute and add the free surface pressure gradient inclu-
-      !!      ding the additional force used to stabilize the equation.
-      !!
-      !! ** Action : - Update (ua,va) with the surf. pressure gradient trend
-      !!
-      !! References : Roullet and Madec, JGR, 2000.
-      !!---------------------------------------------------------------------
-      INTEGER, INTENT(in   ) ::   kt       ! ocean time-step index
-      INTEGER, INTENT(  out) ::   kindic   ! solver convergence flag (<0 if not converge)
-      !
-      INTEGER  ::   ji, jj, jk   ! dummy loop indices
-      REAL(wp) ::   z2dt, z2dtg, zgcb, zbtd, ztdgu, ztdgv   ! local scalars
-      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv
-      REAL(wp), POINTER, DIMENSION(:,:)   ::  zpw
-      !!----------------------------------------------------------------------
-      !
-      IF( nn_timing == 1 )  CALL timing_start('dyn_spg_flt')
-      !
-      IF( kt == nit000 ) THEN
-         IF(lwp) WRITE(numout,*)
-         IF(lwp) WRITE(numout,*) 'dyn_spg_flt : surface pressure gradient trend'
-         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   (free surface constant volume case)'
-       
-         ! set to zero free surface specific arrays
-         spgu(:,:) = 0._wp                     ! surface pressure gradient (i-direction)
-         spgv(:,:) = 0._wp                     ! surface pressure gradient (j-direction)
-
-         ! read filtered free surface arrays in restart file
-         ! when using agrif, sshn, gcx have to be read in istate
-         IF(.NOT. lk_agrif)   CALL flt_rst( nit000, 'READ' )      ! read or initialize the following fields:
-         !                                                        ! gcx, gcxb
-      ENDIF
-
-      ! Local constant initialization
-      z2dt = 2. * rdt                                             ! time step: leap-frog
-      IF( neuler == 0 .AND. kt == nit000   )   z2dt = rdt         ! time step: Euler if restart from rest
-      IF( neuler == 0 .AND. kt == nit000+1 )   CALL sol_mat( kt )
-      z2dtg  = grav * z2dt
-
-      ! Evaluate the masked next velocity (effect of the additional force not included)
-      ! ---------------------------------  
-      IF( lk_vvl ) THEN          ! variable volume  (surface pressure gradient already included in dyn_hpg)
-         !
-         IF( ln_dynadv_vec ) THEN      ! vector form : applied on velocity
-            DO jk = 1, jpkm1
-               DO jj = 2, jpjm1
-                  DO ji = fs_2, fs_jpim1   ! vector opt.
-                     ua(ji,jj,jk) = (  ub(ji,jj,jk) + z2dt * ua(ji,jj,jk)  ) * umask(ji,jj,jk)
-                     va(ji,jj,jk) = (  vb(ji,jj,jk) + z2dt * va(ji,jj,jk)  ) * vmask(ji,jj,jk)
-                  END DO
-               END DO
-            END DO
-            !
-         ELSE                          ! flux form : applied on thickness weighted velocity
-            DO jk = 1, jpkm1
-               DO jj = 2, jpjm1
-                  DO ji = fs_2, fs_jpim1   ! vector opt.
-                     ua(ji,jj,jk) = (        ub(ji,jj,jk) * fse3u_b(ji,jj,jk)      &
-                        &           + z2dt * ua(ji,jj,jk) * fse3u_n(ji,jj,jk)  )   &
-                        &         / fse3u_a(ji,jj,jk) * umask(ji,jj,jk)
-                     va(ji,jj,jk) = (        vb(ji,jj,jk) * fse3v_b(ji,jj,jk)      &
-                        &           + z2dt * va(ji,jj,jk) * fse3v_n(ji,jj,jk)  )   &
-                        &         / fse3v_a(ji,jj,jk) * vmask(ji,jj,jk)
-                 END DO
-               END DO
-            END DO
-            !
-         ENDIF
-         !
-      ELSE                       ! fixed volume  (add the surface pressure gradient + unweighted time stepping)
-         !
-         DO jj = 2, jpjm1              ! Surface pressure gradient (now)
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               spgu(ji,jj) = - grav * ( sshn(ji+1,jj) - sshn(ji,jj) ) / e1u(ji,jj)
-               spgv(ji,jj) = - grav * ( sshn(ji,jj+1) - sshn(ji,jj) ) / e2v(ji,jj)
-            END DO 
-         END DO 
-         DO jk = 1, jpkm1              ! unweighted time stepping 
-            DO jj = 2, jpjm1
-               DO ji = fs_2, fs_jpim1   ! vector opt.
-                  ua(ji,jj,jk) = (  ub(ji,jj,jk) + z2dt * ( ua(ji,jj,jk) + spgu(ji,jj) )  ) * umask(ji,jj,jk)
-                  va(ji,jj,jk) = (  vb(ji,jj,jk) + z2dt * ( va(ji,jj,jk) + spgv(ji,jj) )  ) * vmask(ji,jj,jk)
-               END DO
-            END DO
-         END DO
-         !
-         IF( l_trddyn )   THEN                      ! temporary save of spg trends
-            CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv )
-            DO jk = 1, jpkm1              ! unweighted time stepping 
-               DO jj = 2, jpjm1
-                  DO ji = fs_2, fs_jpim1   ! vector opt.
-                     ztrdu(ji,jj,jk) = spgu(ji,jj) * umask(ji,jj,jk)
-                     ztrdv(ji,jj,jk) = spgv(ji,jj) * vmask(ji,jj,jk)
-                  END DO
-               END DO
-            END DO
-            CALL trd_dyn( ztrdu, ztrdv, jpdyn_spgexp, kt )
-         ENDIF
-         !
-      ENDIF
-
-#if defined key_bdy
-      IF( lk_bdy ) CALL bdy_dyn( kt )   ! Update velocities on each open boundary
-      IF( lk_bdy ) CALL bdy_vol( kt )   ! Correction of the barotropic component velocity to control the volume of the system
-#endif
-#if defined key_agrif
-      CALL Agrif_dyn( kt )    ! Update velocities on each coarse/fine interfaces 
-#endif
-
-      ! compute the next vertically averaged velocity (effect of the additional force not included)
-      ! ---------------------------------------------
-      DO jj = 2, jpjm1
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-            spgu(ji,jj) = fse3u_a(ji,jj,1) * ua(ji,jj,1)
-            spgv(ji,jj) = fse3v_a(ji,jj,1) * va(ji,jj,1)
-         END DO
-      END DO
-      DO jk = 2, jpkm1                     ! vertical sum
-         DO jj = 2, jpjm1
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               spgu(ji,jj) = spgu(ji,jj) + fse3u_a(ji,jj,jk) * ua(ji,jj,jk)
-               spgv(ji,jj) = spgv(ji,jj) + fse3v_a(ji,jj,jk) * va(ji,jj,jk)
-            END DO
-         END DO
-      END DO
-
-      DO jj = 2, jpjm1                     ! transport: multiplied by the horizontal scale factor
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-            spgu(ji,jj) = spgu(ji,jj) * e2u(ji,jj)
-            spgv(ji,jj) = spgv(ji,jj) * e1v(ji,jj)
-         END DO
-      END DO
-      CALL lbc_lnk( spgu, 'U', -1. )       ! lateral boundary conditions 
-      CALL lbc_lnk( spgv, 'V', -1. )
-
-      IF( lk_vvl ) CALL sol_mat( kt )      ! build the matrix at kt (vvl case only)
-
-      ! Right hand side of the elliptic equation and first guess
-      ! --------------------------------------------------------
-      DO jj = 2, jpjm1
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-            ! Divergence of the after vertically averaged velocity
-            zgcb =  spgu(ji,jj) - spgu(ji-1,jj)   &
-                  + spgv(ji,jj) - spgv(ji,jj-1)
-            gcb(ji,jj) = gcdprc(ji,jj) * zgcb
-            ! First guess of the after barotropic transport divergence
-            zbtd = gcx(ji,jj)
-            gcx (ji,jj) = 2. * zbtd   - gcxb(ji,jj)
-            gcxb(ji,jj) =      zbtd
-         END DO
-      END DO
-      ! applied the lateral boundary conditions
-      IF( nn_solv == 2 .AND. MAX( jpr2di, jpr2dj ) > 0 )   CALL lbc_lnk_e( gcb, c_solver_pt, 1., jpr2di, jpr2dj )   
-
-#if defined key_agrif
-      IF( .NOT. AGRIF_ROOT() ) THEN
-         ! add contribution of gradient of after barotropic transport divergence 
-         IF( nbondi == -1 .OR. nbondi == 2 )   gcb(3     ,:) =   &
-            &    gcb(3     ,:) - z2dtg * z2dt * laplacu(2     ,:) * gcdprc(3     ,:) * hu(2     ,:) * e2u(2     ,:)
-         IF( nbondi ==  1 .OR. nbondi == 2 )   gcb(nlci-2,:) =   &
-            &    gcb(nlci-2,:) + z2dtg * z2dt * laplacu(nlci-2,:) * gcdprc(nlci-2,:) * hu(nlci-2,:) * e2u(nlci-2,:)
-         IF( nbondj == -1 .OR. nbondj == 2 )   gcb(:     ,3) =   &
-            &    gcb(:,3     ) - z2dtg * z2dt * laplacv(:,2     ) * gcdprc(:,3     ) * hv(:,2     ) * e1v(:,2     )
-         IF( nbondj ==  1 .OR. nbondj == 2 )   gcb(:,nlcj-2) =   &
-            &    gcb(:,nlcj-2) + z2dtg * z2dt * laplacv(:,nlcj-2) * gcdprc(:,nlcj-2) * hv(:,nlcj-2) * e1v(:,nlcj-2)
-      ENDIF
-#endif
-
-
-      ! Relative precision (computation on one processor)
-      ! ------------------
-      rnorme =0.e0
-      rnorme = GLOB_SUM( gcb(1:jpi,1:jpj) * gcdmat(1:jpi,1:jpj) * gcb(1:jpi,1:jpj) * bmask(:,:) )
-
-      epsr = eps * eps * rnorme
-      ncut = 0
-      ! if rnorme is 0, the solution is 0, the solver is not called
-      IF( rnorme == 0._wp ) THEN
-         gcx(:,:) = 0._wp
-         res   = 0._wp
-         niter = 0
-         ncut  = 999
-      ENDIF
-
-      ! Evaluate the next transport divergence
-      ! --------------------------------------
-      !    Iterarive solver for the elliptic equation (except IF sol.=0)
-      !    (output in gcx with boundary conditions applied)
-      kindic = 0
-      IF( ncut == 0 ) THEN
-         IF    ( nn_solv == 1 ) THEN   ;   CALL sol_pcg( kindic )      ! diagonal preconditioned conjuguate gradient
-         ELSEIF( nn_solv == 2 ) THEN   ;   CALL sol_sor( kindic )      ! successive-over-relaxation
-         ENDIF
-      ENDIF
-
-      ! Transport divergence gradient multiplied by z2dt
-      ! --------------------------------------------====
-      DO jj = 2, jpjm1
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-            ! trend of Transport divergence gradient
-            ztdgu = z2dtg * (gcx(ji+1,jj  ) - gcx(ji,jj) ) / e1u(ji,jj)
-            ztdgv = z2dtg * (gcx(ji  ,jj+1) - gcx(ji,jj) ) / e2v(ji,jj)
-            ! multiplied by z2dt
-#if defined key_bdy
-            IF(lk_bdy) THEN
-            ! caution : grad D = 0 along open boundaries
-               spgu(ji,jj) = z2dt * ztdgu * bdyumask(ji,jj)
-               spgv(ji,jj) = z2dt * ztdgv * bdyvmask(ji,jj)
-            ELSE
-               spgu(ji,jj) = z2dt * ztdgu
-               spgv(ji,jj) = z2dt * ztdgv
-            ENDIF
-#else
-            spgu(ji,jj) = z2dt * ztdgu
-            spgv(ji,jj) = z2dt * ztdgv
-#endif
-         END DO
-      END DO
-
-#if defined key_agrif      
-      IF( .NOT. Agrif_Root() ) THEN
-         ! caution : grad D (fine) = grad D (coarse) at coarse/fine interface
-         IF( nbondi == -1 .OR. nbondi == 2 ) spgu(2     ,:) = z2dtg * z2dt * laplacu(2     ,:) * umask(2     ,:,1)
-         IF( nbondi ==  1 .OR. nbondi == 2 ) spgu(nlci-2,:) = z2dtg * z2dt * laplacu(nlci-2,:) * umask(nlci-2,:,1)
-         IF( nbondj == -1 .OR. nbondj == 2 ) spgv(:,2     ) = z2dtg * z2dt * laplacv(:,2     ) * vmask(:     ,2,1)
-         IF( nbondj ==  1 .OR. nbondj == 2 ) spgv(:,nlcj-2) = z2dtg * z2dt * laplacv(:,nlcj-2) * vmask(:,nlcj-2,1)
-      ENDIF
-#endif      
-
-      IF( l_trddyn )   THEN                     
-         ztrdu(:,:,:) = ua(:,:,:)                 ! save the after velocity before the filtered SPG
-         ztrdv(:,:,:) = va(:,:,:)
-         !
-         CALL wrk_alloc( jpi, jpj, zpw )
-         !
-         zpw(:,:) = - z2dt * gcx(:,:)
-         CALL iom_put( "ssh_flt" , zpw )          ! output equivalent ssh modification due to implicit filter
-         !
-         !                                        ! save surface pressure flux: -pw at z=0
-         zpw(:,:) = - rau0 * grav * sshn(:,:) * wn(:,:,1) * tmask(:,:,1)
-         CALL iom_put( "pw0_exp" , zpw )
-         zpw(:,:) = wn(:,:,1)
-         CALL iom_put( "w0" , zpw )
-         zpw(:,:) =  rau0 * z2dtg * gcx(:,:) * wn(:,:,1) * tmask(:,:,1)
-         CALL iom_put( "pw0_flt" , zpw )
-         !
-         CALL wrk_dealloc( jpi, jpj, zpw ) 
-         !                                   
-      ENDIF
-      
-      ! Add the trends multiplied by z2dt to the after velocity
-      ! -------------------------------------------------------
-      !     ( c a u t i o n : (ua,va) here are the after velocity not the
-      !                       trend, the leap-frog time stepping will not
-      !                       be done in dynnxt.F90 routine)
-      DO jk = 1, jpkm1
-         DO jj = 2, jpjm1
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               ua(ji,jj,jk) = ( ua(ji,jj,jk) + spgu(ji,jj) ) * umask(ji,jj,jk)
-               va(ji,jj,jk) = ( va(ji,jj,jk) + spgv(ji,jj) ) * vmask(ji,jj,jk)
-            END DO
-         END DO
-      END DO
-
-      IF( l_trddyn )   THEN                      ! save the explicit SPG trends for further diagnostics
-         ztrdu(:,:,:) = ( ua(:,:,:) - ztrdu(:,:,:) ) / z2dt
-         ztrdv(:,:,:) = ( va(:,:,:) - ztrdv(:,:,:) ) / z2dt
-         CALL trd_dyn( ztrdu, ztrdv, jpdyn_spgflt, kt )
-         !
-         CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv ) 
-      ENDIF
-
-      IF( lrst_oce )   CALL flt_rst( kt, 'WRITE' )      ! write filtered free surface arrays in restart file
-      !
-      IF( nn_timing == 1 )   CALL timing_stop('dyn_spg_flt')
-      !
-   END SUBROUTINE dyn_spg_flt
-
-
-   SUBROUTINE flt_rst( kt, cdrw )
-      !!---------------------------------------------------------------------
-      !!                   ***  ROUTINE ts_rst  ***
-      !!
-      !! ** Purpose : Read or write filtered free surface arrays in restart file
-      !!----------------------------------------------------------------------
-      INTEGER         , INTENT(in) ::   kt     ! ocean time-step
-      CHARACTER(len=*), INTENT(in) ::   cdrw   ! "READ"/"WRITE" flag
-      !!----------------------------------------------------------------------
-      !
-      IF( TRIM(cdrw) == 'READ' ) THEN
-         IF( iom_varid( numror, 'gcx', ldstop = .FALSE. ) > 0 ) THEN
-! Caution : extra-hallow
-! gcx and gcxb are defined as: DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)
-            CALL iom_get( numror, jpdom_autoglo, 'gcx' , gcx (1:jpi,1:jpj) )
-            CALL iom_get( numror, jpdom_autoglo, 'gcxb', gcxb(1:jpi,1:jpj) )
-            IF( neuler == 0 )   gcxb(:,:) = gcx (:,:)
-         ELSE
-            gcx (:,:) = 0.e0
-            gcxb(:,:) = 0.e0
-         ENDIF
-      ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN
-! Caution : extra-hallow
-! gcx and gcxb are defined as: DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj)
-         CALL iom_rstput( kt, nitrst, numrow, 'gcx' , gcx (1:jpi,1:jpj) )
-         CALL iom_rstput( kt, nitrst, numrow, 'gcxb', gcxb(1:jpi,1:jpj) )
-      ENDIF
-      !
-   END SUBROUTINE flt_rst
-
-#else
-   !!----------------------------------------------------------------------
-   !!   Default case :   Empty module   No standart free surface cst volume
-   !!----------------------------------------------------------------------
-CONTAINS
-   SUBROUTINE dyn_spg_flt( kt, kindic )       ! Empty routine
-      WRITE(*,*) 'dyn_spg_flt: You should not have seen this print! error?', kt, kindic
-   END SUBROUTINE dyn_spg_flt
-   SUBROUTINE flt_rst    ( kt, cdrw )         ! Empty routine
-      INTEGER         , INTENT(in) ::   kt         ! ocean time-step
-      CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag
-      WRITE(*,*) 'flt_rst: You should not have seen this print! error?', kt, cdrw
-   END SUBROUTINE flt_rst
-#endif
-   
-   !!======================================================================
-END MODULE dynspg_flt
Index: unk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_oce.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_oce.F90	(revision 5929)
+++ 	(revision )
@@ -1,70 +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
-#if   defined key_dynspg_flt
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_flt = .TRUE.   !: Filtered free surface cst volume flag
-#else
-   LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_flt = .FALSE.  !: Filtered free surface cst volume 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: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 5930)
@@ -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,8 @@
    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 bdytides        ! open boundary condition data
    USE bdydyn2d        ! open boundary conditions on barotropic variables
    USE sbctide         ! tides
@@ -68,10 +67,4 @@
    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
 #  include "domzgr_substitute.h90"
@@ -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),    un_e(jpi,jpj),   ub_e(jpi,jpj),   ubb_e(jpi,jpj), &
+         &        va_e(jpi,jpj),    vn_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
@@ -146,13 +146,13 @@
       INTEGER  ::   ikbu, ikbv, noffset    	! local integers
       REAL(wp) ::   zraur, z1_2dt_b, z2dt_bf  	! local scalars
-      REAL(wp) ::   zx1, zy1, zx2, zy2         !   -      -
-      REAL(wp) ::   z1_12, z1_8, z1_4, z1_2 	  !   -      -
-      REAL(wp) ::   zu_spg, zv_spg             !   -      -
-      REAL(wp) ::   zhura, zhvra         	     !   -      -
-      REAL(wp) ::   za0, za1, za2, za3		       !   -      -
-      !
-      REAL(wp), POINTER, DIMENSION(:,:) :: zun_e, zvn_e, zsshp2_e
+      REAL(wp) ::   zx1, zy1, zx2, zy2          !   -      -
+      REAL(wp) ::   z1_12, z1_8, z1_4, z1_2 	!   -      -
+      REAL(wp) ::   zu_spg, zv_spg              !   -      -
+      REAL(wp) ::   zhura, zhvra         	!   -      -
+      REAL(wp) ::   za0, za1, za2, za3		!   -      -
+      !
+      REAL(wp), POINTER, DIMENSION(:,:) :: zsshp2_e
       REAL(wp), POINTER, DIMENSION(:,:) :: zu_trd, zv_trd, zu_frc, zv_frc, zssh_frc
-      REAL(wp), POINTER, DIMENSION(:,:) :: zu_sum, zv_sum, zwx, zwy, zhdiv
+      REAL(wp), POINTER, DIMENSION(:,:) :: zwx, zwy, zhdiv
       REAL(wp), POINTER, DIMENSION(:,:) :: zhup2_e, zhvp2_e, zhust_e, zhvst_e
       REAL(wp), POINTER, DIMENSION(:,:) :: zsshu_a, zsshv_a
@@ -164,6 +164,6 @@
       !                                         !* Allocate temporary arrays
       CALL wrk_alloc( jpi, jpj, zsshp2_e, zhdiv )
-      CALL wrk_alloc( jpi, jpj, zu_trd, zv_trd, zun_e, zvn_e  )
-      CALL wrk_alloc( jpi, jpj, zwx, zwy, zu_sum, zv_sum, zssh_frc, zu_frc, zv_frc)
+      CALL wrk_alloc( jpi, jpj, zu_trd, zv_trd)
+      CALL wrk_alloc( jpi, jpj, zwx, zwy, zssh_frc, zu_frc, zv_frc)
       CALL wrk_alloc( jpi, jpj, zhup2_e, zhvp2_e, zhust_e, zhvst_e)
       CALL wrk_alloc( jpi, jpj, zsshu_a, zsshv_a                                   )
@@ -485,6 +485,6 @@
       IF (ln_bt_fw) THEN                  ! FORWARD integration: start from NOW fields                    
          sshn_e(:,:) = sshn (:,:)            
-         zun_e (:,:) = un_b (:,:)            
-         zvn_e (:,:) = vn_b (:,:)
+         un_e  (:,:) = un_b (:,:)            
+         vn_e  (:,:) = vn_b (:,:)
          !
          hu_e  (:,:) = hu   (:,:)       
@@ -494,6 +494,6 @@
       ELSE                                ! CENTRED integration: start from BEFORE fields
          sshn_e(:,:) = sshb (:,:)
-         zun_e (:,:) = ub_b (:,:)         
-         zvn_e (:,:) = vb_b (:,:)
+         un_e  (:,:) = ub_b (:,:)         
+         vn_e  (:,:) = vb_b (:,:)
          !
          hu_e  (:,:) = hu_b (:,:)       
@@ -509,6 +509,6 @@
       va_b  (:,:) = 0._wp
       ssha  (:,:) = 0._wp       ! Sum for after averaged sea level
-      zu_sum(:,:) = 0._wp       ! Sum for now transport issued from ts loop
-      zv_sum(:,:) = 0._wp
+      un_adv(:,:) = 0._wp       ! Sum for now transport issued from ts loop
+      vn_adv(:,:) = 0._wp
       !                                             ! ==================== !
       DO jn = 1, icycle                             !  sub-time-step loop  !
@@ -534,6 +534,6 @@
 
          ! Extrapolate barotropic velocities at step jit+0.5:
-         ua_e(:,:) = za1 * zun_e(:,:) + za2 * ub_e(:,:) + za3 * ubb_e(:,:)
-         va_e(:,:) = za1 * zvn_e(:,:) + za2 * vb_e(:,:) + za3 * vbb_e(:,:)
+         ua_e(:,:) = za1 * un_e(:,:) + za2 * ub_e(:,:) + za3 * ubb_e(:,:)
+         va_e(:,:) = za1 * vn_e(:,:) + za2 * vb_e(:,:) + za3 * vbb_e(:,:)
 
          IF( lk_vvl ) THEN                                !* Update ocean depth (variable volume case only)
@@ -597,6 +597,6 @@
          ! Sum over sub-time-steps to compute advective velocities
          za2 = wgtbtp2(jn)
-         zu_sum(:,:) = zu_sum(:,:) + za2 * zwx(:,:) * r1_e2u(:,:)
-         zv_sum(:,:) = zv_sum(:,:) + za2 * zwy(:,:) * r1_e1v(:,:)
+         un_adv(:,:) = un_adv(:,:) + za2 * zwx(:,:) * r1_e2u(:,:)
+         vn_adv(:,:) = vn_adv(:,:) + za2 * zwy(:,:) * r1_e1v(:,:)
          !
          ! Set next sea level:
@@ -733,6 +733,6 @@
          !
          ! Add bottom stresses:
-         zu_trd(:,:) = zu_trd(:,:) + bfrua(:,:) * zun_e(:,:) * hur_e(:,:)
-         zv_trd(:,:) = zv_trd(:,:) + bfrva(:,:) * zvn_e(:,:) * hvr_e(:,:)
+         zu_trd(:,:) = zu_trd(:,:) + bfrua(:,:) * un_e(:,:) * hur_e(:,:)
+         zv_trd(:,:) = zv_trd(:,:) + bfrva(:,:) * vn_e(:,:) * hvr_e(:,:)
          !
          ! Surface pressure trend:
@@ -751,5 +751,5 @@
             DO jj = 2, jpjm1
                DO ji = fs_2, fs_jpim1   ! vector opt.
-                  ua_e(ji,jj) = (                                zun_e(ji,jj)   & 
+                  ua_e(ji,jj) = (                                 un_e(ji,jj)   & 
                             &     + rdtbt * (                      zwx(ji,jj)   &
                             &                                 + zu_trd(ji,jj)   &
@@ -757,5 +757,5 @@
                             &   ) * umask(ji,jj,1)
 
-                  va_e(ji,jj) = (                                zvn_e(ji,jj)   &
+                  va_e(ji,jj) = (                                 vn_e(ji,jj)   &
                             &     + rdtbt * (                      zwy(ji,jj)   &
                             &                                 + zv_trd(ji,jj)   &
@@ -772,5 +772,5 @@
                   zhvra = vmask(ji,jj,1)/(hv_0(ji,jj) + zsshv_a(ji,jj) + 1._wp - vmask(ji,jj,1))
 
-                  ua_e(ji,jj) = (                hu_e(ji,jj)  *  zun_e(ji,jj)   & 
+                  ua_e(ji,jj) = (                hu_e(ji,jj)  *   un_e(ji,jj)   & 
                             &     + rdtbt * ( zhust_e(ji,jj)  *    zwx(ji,jj)   & 
                             &               + zhup2_e(ji,jj)  * zu_trd(ji,jj)   &
@@ -778,5 +778,5 @@
                             &   ) * zhura
 
-                  va_e(ji,jj) = (                hv_e(ji,jj)  *  zvn_e(ji,jj)   &
+                  va_e(ji,jj) = (                hv_e(ji,jj)  *   vn_e(ji,jj)   &
                             &     + rdtbt * ( zhvst_e(ji,jj)  *    zwy(ji,jj)   &
                             &               + zhvp2_e(ji,jj)  * zv_trd(ji,jj)   &
@@ -802,5 +802,5 @@
 #if defined key_bdy  
                                                            ! open boundaries
-         IF( lk_bdy ) CALL bdy_dyn2d( jn, ua_e, va_e, zun_e, zvn_e, hur_e, hvr_e, ssha_e )
+         IF( lk_bdy ) CALL bdy_dyn2d( jn, ua_e, va_e, un_e, vn_e, hur_e, hvr_e, ssha_e )
 #endif
 #if defined key_agrif                                                           
@@ -810,10 +810,10 @@
          !                                             !  ----
          ubb_e  (:,:) = ub_e  (:,:)
-         ub_e   (:,:) = zun_e (:,:)
-         zun_e  (:,:) = ua_e  (:,:)
+         ub_e   (:,:) = un_e  (:,:)
+         un_e   (:,:) = ua_e  (:,:)
          !
          vbb_e  (:,:) = vb_e  (:,:)
-         vb_e   (:,:) = zvn_e (:,:)
-         zvn_e  (:,:) = va_e  (:,:)
+         vb_e   (:,:) = vn_e  (:,:)
+         vn_e   (:,:) = va_e  (:,:)
          !
          sshbb_e(:,:) = sshb_e(:,:)
@@ -840,7 +840,28 @@
       ! -----------------------------------------------------------------------------
       !
-      ! At this stage ssha holds a time averaged value
-      !                                                ! Sea Surface Height at u-,v- and f-points
-      IF( lk_vvl ) THEN                                ! (required only in key_vvl case)
+      ! Set advection velocity correction:
+      zwx(:,:) = un_adv(:,:)
+      zwy(:,:) = vn_adv(:,:)
+      IF (((kt==nit000).AND.(neuler==0)).OR.(.NOT.ln_bt_fw)) THEN     
+         un_adv(:,:) = zwx(:,:)*hur(:,:)
+         vn_adv(:,:) = zwy(:,:)*hvr(:,:)
+      ELSE
+         un_adv(:,:) = z1_2 * ( ub2_b(:,:) + zwx(:,:)) * hur(:,:)
+         vn_adv(:,:) = z1_2 * ( vb2_b(:,:) + zwy(:,:)) * hvr(:,:)
+      END IF
+
+      IF (ln_bt_fw) THEN ! Save integrated transport for next computation
+         ub2_b(:,:) = zwx(:,:)
+         vb2_b(:,:) = zwy(:,:)
+      ENDIF
+      !
+      ! Update barotropic trend:
+      IF (( ln_dynadv_vec ).OR. (.NOT. lk_vvl)) THEN
+         DO jk=1,jpkm1
+            ua(:,:,jk) = ua(:,:,jk) + ( ua_b(:,:) - ub_b(:,:) ) * z1_2dt_b
+            va(:,:,jk) = va(:,:,jk) + ( va_b(:,:) - vb_b(:,:) ) * z1_2dt_b
+         END DO
+      ELSE
+         ! At this stage, ssha has been corrected: compute new depths at velocity points
          DO jj = 1, jpjm1
             DO ji = 1, jpim1      ! NO Vector Opt.
@@ -854,27 +875,5 @@
          END DO
          CALL lbc_lnk_multi( zsshu_a, 'U', 1._wp, zsshv_a, 'V', 1._wp ) ! Boundary conditions
-      ENDIF
-      !
-      ! Set advection velocity correction:
-      IF (((kt==nit000).AND.(neuler==0)).OR.(.NOT.ln_bt_fw)) THEN     
-         un_adv(:,:) = zu_sum(:,:)*hur(:,:)
-         vn_adv(:,:) = zv_sum(:,:)*hvr(:,:)
-      ELSE
-         un_adv(:,:) = z1_2 * ( ub2_b(:,:) + zu_sum(:,:)) * hur(:,:)
-         vn_adv(:,:) = z1_2 * ( vb2_b(:,:) + zv_sum(:,:)) * hvr(:,:)
-      END IF
-
-      IF (ln_bt_fw) THEN ! Save integrated transport for next computation
-         ub2_b(:,:) = zu_sum(:,:)
-         vb2_b(:,:) = zv_sum(:,:)
-      ENDIF
-      !
-      ! Update barotropic trend:
-      IF (( ln_dynadv_vec ).OR. (.NOT. lk_vvl)) THEN
-         DO jk=1,jpkm1
-            ua(:,:,jk) = ua(:,:,jk) + ( ua_b(:,:) - ub_b(:,:) ) * z1_2dt_b
-            va(:,:,jk) = va(:,:,jk) + ( va_b(:,:) - vb_b(:,:) ) * z1_2dt_b
-         END DO
-      ELSE
+         !
          DO jk=1,jpkm1
             ua(:,:,jk) = ua(:,:,jk) + hur(:,:) * ( ua_b(:,:) - ub_b(:,:) * hu_b(:,:) ) * z1_2dt_b
@@ -915,6 +914,6 @@
       !
       CALL wrk_dealloc( jpi, jpj, zsshp2_e, zhdiv )
-      CALL wrk_dealloc( jpi, jpj, zu_trd, zv_trd, zun_e, zvn_e )
-      CALL wrk_dealloc( jpi, jpj, zwx, zwy, zu_sum, zv_sum, zssh_frc, zu_frc, zv_frc )
+      CALL wrk_dealloc( jpi, jpj, zu_trd, zv_trd )
+      CALL wrk_dealloc( jpi, jpj, zwx, zwy, zssh_frc, zu_frc, zv_frc )
       CALL wrk_dealloc( jpi, jpj, zhup2_e, zhvp2_e, zhust_e, zhvst_e )
       CALL wrk_dealloc( jpi, jpj, zsshu_a, zsshv_a                                   )
@@ -1064,48 +1063,26 @@
       !
       INTEGER  :: ji ,jj
-      INTEGER  ::   ios                 ! Local integer output status for namelist read
       REAL(wp) :: zxr2, zyr2, zcmax
       REAL(wp), POINTER, DIMENSION(:,:) :: zcu
       !!
-      NAMELIST/namsplit/ ln_bt_fw, ln_bt_av, ln_bt_nn_auto, &
-      &                  nn_baro, rn_bt_cmax, nn_bt_flt
       !!----------------------------------------------------------------------
       !
-      REWIND( numnam_ref )              ! Namelist namsplit in reference namelist : time splitting parameters
-      READ  ( numnam_ref, namsplit, IOSTAT = ios, ERR = 901)
-901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsplit in reference namelist', lwp )
-
-      REWIND( numnam_cfg )              ! Namelist namsplit in configuration namelist : time splitting parameters
-      READ  ( numnam_cfg, namsplit, IOSTAT = ios, ERR = 902 )
-902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsplit in configuration namelist', lwp )
-      IF(lwm) WRITE ( numond, namsplit )
-      !
-      !         ! Max courant number for ext. grav. waves
+      ! Max courant number for ext. grav. waves
       !
       CALL wrk_alloc( jpi, jpj, zcu )
       !
-      IF (lk_vvl) THEN 
-         DO jj = 1, jpj
-            DO ji =1, jpi
-               zxr2 = r1_e1t(ji,jj) * r1_e1t(ji,jj)
-               zyr2 = r1_e2t(ji,jj) * r1_e2t(ji,jj)
-               zcu(ji,jj) = SQRT( grav * ht_0(ji,jj) * (zxr2 + zyr2) )
-            END DO
-         END DO
-      ELSE
-         DO jj = 1, jpj
-            DO ji =1, jpi
-               zxr2 = r1_e1t(ji,jj) * r1_e1t(ji,jj)
-               zyr2 = r1_e2t(ji,jj) * r1_e2t(ji,jj)
-               zcu(ji,jj) = SQRT( grav * ht(ji,jj) * (zxr2 + zyr2) )
-            END DO
-         END DO
-      ENDIF
-
+      DO jj = 1, jpj
+         DO ji =1, jpi
+            zxr2 = r1_e1t(ji,jj) * r1_e1t(ji,jj)
+            zyr2 = r1_e2t(ji,jj) * r1_e2t(ji,jj)
+            zcu(ji,jj) = SQRT( grav * ht_0(ji,jj) * (zxr2 + zyr2) )
+         END DO
+      END DO
+      !
       zcmax = MAXVAL( zcu(:,:) )
       IF( lk_mpp )   CALL mpp_max( zcmax )
 
       ! Estimate number of iterations to satisfy a max courant number= rn_bt_cmax
-      IF (ln_bt_nn_auto) nn_baro = CEILING( rdt / rn_bt_cmax * zcmax)
+      IF (ln_bt_auto) nn_baro = CEILING( rdt / rn_bt_cmax * zcmax)
       
       rdtbt = rdt / REAL( nn_baro , wp )
@@ -1115,9 +1092,9 @@
       IF(lwp) WRITE(numout,*) 'dyn_spg_ts : split-explicit free surface'
       IF(lwp) WRITE(numout,*) '~~~~~~~~~~'
-      IF( ln_bt_nn_auto ) THEN
-         IF(lwp) WRITE(numout,*) '     ln_ts_nn_auto=.true. Automatically set nn_baro '
+      IF( ln_bt_auto ) THEN
+         IF(lwp) WRITE(numout,*) '     ln_ts_auto=.true. Automatically set nn_baro '
          IF(lwp) WRITE(numout,*) '     Max. courant number allowed: ', rn_bt_cmax
       ELSE
-         IF(lwp) WRITE(numout,*) '     ln_ts_nn_auto=.false.: Use nn_baro in namelist '
+         IF(lwp) WRITE(numout,*) '     ln_ts_auto=.false.: Use nn_baro in namelist '
       ENDIF
 
@@ -1164,27 +1141,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: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 5930)
@@ -32,4 +32,5 @@
    USE trd_oce        ! trends: ocean variables
    USE trddyn         ! trend manager: dynamics
+   USE c1d            ! 1D vertical configuration
    !
    USE lbclnk         ! ocean lateral boundary conditions (or mpp link)
@@ -662,5 +663,5 @@
       IF( ln_dynvor_een ) THEN   ;   ioptio = ioptio + 1   ;    nvor_scheme = np_EEN   ;   ENDIF
       !
-      IF( ioptio /= 1 ) CALL ctl_stop( ' use ONE and ONLY one vorticity scheme' )
+      IF( ( ioptio /= 1).AND.( .NOT.lk_c1d ) ) CALL ctl_stop( ' use ONE and ONLY one vorticity scheme' )
       !                      
       IF(lwp) WRITE(numout,*)        ! type of calculated vorticity (set ncor, nrvm, ntot)
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 5930)
@@ -10,5 +10,4 @@
    USE phycst
    USE daymod
-   USE dynspg_oce
    USE tideini
    !
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 5930)
@@ -26,4 +26,5 @@
    USE ldftra         ! lateral diffusion: eddy diffusivity & EIV coeff.
    USE ldfslp         ! Lateral diffusion: slopes of neutral surfaces
+   USE c1d            ! 1D vertical configuration
    !
    USE in_out_manager ! I/O manager
@@ -214,5 +215,6 @@
          CALL ctl_warn( 'tra_adv_init: You are running without tracer advection.' )
       ENDIF
-      IF( ioptio /= 1 )   CALL ctl_stop( 'tra_adv_init: Choose ONE advection scheme in namelist namtra_adv' )
+      IF( (ioptio /= 1).AND. (.NOT. lk_c1d ) ) & 
+        CALL ctl_stop( 'tra_adv_init: Choose ONE advection scheme in namelist namtra_adv' )
       !
       IF( ln_traadv_cen .AND. ( nn_cen_h /= 2 .AND. nn_cen_h /= 4 )   &          ! Centered
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 5930)
@@ -31,6 +31,4 @@
    USE zdf_oce         ! ocean vertical mixing
    USE domvvl          ! variable volume
-   USE dynspg_oce      ! surface     pressure gradient variables
-   USE dynhpg          ! hydrostatic pressure gradient 
    USE trd_oce         ! trends: ocean variables
    USE trdtra          ! trends manager: tracers 
@@ -58,5 +56,4 @@
    PUBLIC   tra_nxt_vvl   ! to be used in trcnxt
 
-   REAL(wp) ::   rbcp   ! Brown & Campana parameters for semi-implicit hpg
 
    !! * Substitutions
@@ -90,5 +87,5 @@
       !!
       !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step
-      !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T)
+      !!
       !!----------------------------------------------------------------------
       INTEGER, INTENT(in) ::   kt    ! ocean time-step index
@@ -105,10 +102,9 @@
          IF(lwp) WRITE(numout,*) 'tra_nxt : achieve the time stepping by Asselin filter and array swap'
          IF(lwp) WRITE(numout,*) '~~~~~~~'
-         !
-         rbcp = 0.25_wp * (1._wp + atfp) * (1._wp + atfp) * ( 1._wp - atfp)      ! Brown & Campana parameter for semi-implicit hpg
       ENDIF
 
       ! Update after tracer on domain lateral boundaries
       ! 
+      !
 #if defined key_agrif
       CALL Agrif_tra                     ! AGRIF zoom boundaries
@@ -181,18 +177,8 @@
       !! 
       !! ** Method  : - Apply a Asselin time filter on now fields.
-      !!              - save in (ta,sa) an average over the three time levels 
-      !!             which will be used to compute rdn and thus the semi-implicit
-      !!             hydrostatic pressure gradient (ln_dynhpg_imp = T)
       !!              - swap tracer fields to prepare the next time_step.
-      !!                This can be summurized for tempearture as:
-      !!             ztm = tn + rbcp * [ta -2 tn + tb ]       ln_dynhpg_imp = T
-      !!             ztm = 0                                   otherwise
-      !!                   with rbcp=1/4 * (1-atfp^4) / (1-atfp)
-      !!             tb  = tn + atfp*[ tb - 2 tn + ta ]
-      !!             tn  = ta  
-      !!             ta  = ztm       (NB: reset to 0 after eos_bn2 call)
       !!
       !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step
-      !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T)
+      !!              
       !!----------------------------------------------------------------------
       INTEGER         , INTENT(in   )                               ::   kt       ! ocean time-step index
@@ -205,5 +191,4 @@
       !
       INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices
-      LOGICAL  ::   ll_tra_hpg       ! local logical
       REAL(wp) ::   ztn, ztd         ! local scalars
       !!----------------------------------------------------------------------
@@ -215,7 +200,4 @@
       ENDIF
       !
-      IF( cdtype == 'TRA' )  THEN   ;   ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg    
-      ELSE                          ;   ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg
-      ENDIF
       !
       DO jn = 1, kjpt
@@ -230,5 +212,4 @@
                   ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)                       ! ptn <-- pta
                   !
-                  IF( ll_tra_hpg )   pta(ji,jj,jk,jn) = ztn + rbcp * ztd    ! pta <-- Brown & Campana average
                END DO
            END DO
@@ -248,19 +229,9 @@
       !! 
       !! ** Method  : - Apply a thickness weighted Asselin time filter on now fields.
-      !!              - save in (ta,sa) a thickness weighted average over the three 
-      !!             time levels which will be used to compute rdn and thus the semi-
-      !!             implicit hydrostatic pressure gradient (ln_dynhpg_imp = T)
       !!              - swap tracer fields to prepare the next time_step.
       !!                This can be summurized for tempearture as:
-      !!             ztm = ( e3t_n*tn + rbcp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] )   ln_dynhpg_imp = T
-      !!                  /( e3t_n    + rbcp*[ e3t_b    - 2 e3t_n    + e3t_a    ] )   
-      !!             ztm = 0                                                       otherwise
-      !!             tb  = ( e3t_n*tn + atfp*[ e3t_b*tb - 2 e3t_n*tn + e3t_a*ta ] )
-      !!                  /( e3t_n    + atfp*[ e3t_b    - 2 e3t_n    + e3t_a    ] )
-      !!             tn  = ta 
-      !!             ta  = zt        (NB: reset to 0 after eos_bn2 call)
       !!
       !! ** Action  : - (tb,sb) and (tn,sn) ready for the next time step
-      !!              - (ta,sa) time averaged (t,s)   (ln_dynhpg_imp = T)
+      !!
       !!----------------------------------------------------------------------
       INTEGER         , INTENT(in   )                               ::  kt       ! ocean time-step index
@@ -276,5 +247,5 @@
 
       !!     
-      LOGICAL  ::   ll_tra_hpg, ll_traqsr, ll_rnf, ll_isf   ! local logical
+      LOGICAL  ::   ll_traqsr, ll_rnf, ll_isf   ! local logical
       INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices
       REAL(wp) ::   zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar
@@ -289,5 +260,4 @@
       !
       IF( cdtype == 'TRA' )  THEN   
-         ll_tra_hpg = ln_dynhpg_imp    ! active  tracers case  and  semi-implicit hpg
          ll_traqsr  = ln_traqsr        ! active  tracers case  and  solar penetration
          ll_rnf     = ln_rnf           ! active  tracers case  and  river runoffs
@@ -298,5 +268,4 @@
          END IF
       ELSE                          
-         ll_tra_hpg = .FALSE.          ! passive tracers case or NO semi-implicit hpg
          ll_traqsr  = .FALSE.          ! active  tracers case and NO solar penetration
          ll_rnf     = .FALSE.          ! passive tracers or NO river runoffs
@@ -356,8 +325,4 @@
                   ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)     ! ptn <-- pta
                   !
-                  IF( ll_tra_hpg ) THEN        ! semi-implicit hpg (T & S only)
-                     ze3t_d           = 1.e0   / ( ze3t_n + rbcp * ze3t_d )
-                     pta(ji,jj,jk,jn) = ze3t_d * ( ztc_n  + rbcp * ztc_d  )   ! ta <-- Brown & Campana average
-                  ENDIF
                END DO
             END DO
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 5930)
@@ -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: /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90	(revision 5930)
@@ -71,6 +71,4 @@
    INTEGER, PUBLIC, PARAMETER ::   jpdyn_bfri = 12     !: implicit bottom friction (ln_bfrimp=.TRUE.)
    INTEGER, PUBLIC, PARAMETER ::   jpdyn_ken  = 13     !: use for calculation of KE
-   INTEGER, PUBLIC, PARAMETER ::   jpdyn_spgflt  = 14  !: filter contribution to surface pressure gradient (spg_flt)
-   INTEGER, PUBLIC, PARAMETER ::   jpdyn_spgexp  = 15  !: explicit contribution to surface pressure gradient (spg_flt)
    !
    !!----------------------------------------------------------------------
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90	(revision 5930)
@@ -113,8 +113,4 @@
       CASE( jpdyn_spg )   ;   CALL iom_put( "utrd_spg", putrd )    ! surface pressure gradient
                               CALL iom_put( "vtrd_spg", pvtrd )
-      CASE( jpdyn_spgexp );   CALL iom_put( "utrd_spgexp", putrd ) ! surface pressure gradient (explicit)
-                              CALL iom_put( "vtrd_spgexp", pvtrd )
-      CASE( jpdyn_spgflt );   CALL iom_put( "utrd_spgflt", putrd ) ! surface pressure gradient (filtered)
-                              CALL iom_put( "vtrd_spgflt", pvtrd )
       CASE( jpdyn_pvo )   ;   CALL iom_put( "utrd_pvo", putrd )    ! planetary vorticity
                               CALL iom_put( "vtrd_pvo", pvtrd )
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 5930)
@@ -120,6 +120,4 @@
          CASE( jpdyn_hpg )   ;   CALL iom_put( "ketrd_hpg", zke )    ! hydrostatic pressure gradient
          CASE( jpdyn_spg )   ;   CALL iom_put( "ketrd_spg", zke )    ! surface pressure gradient
-         CASE( jpdyn_spgexp );   CALL iom_put( "ketrd_spgexp", zke ) ! surface pressure gradient (explicit)
-         CASE( jpdyn_spgflt );   CALL iom_put( "ketrd_spgflt", zke ) ! surface pressure gradient (filter)
          CASE( jpdyn_pvo )   ;   CALL iom_put( "ketrd_pvo", zke )    ! planetary vorticity
          CASE( jpdyn_rvo )   ;   CALL iom_put( "ketrd_rvo", zke )    ! relative  vorticity     (or metric term)
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/oce.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/oce.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/oce.F90	(revision 5930)
@@ -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,22 @@
    !
    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:                   ! bef before !   before   !    now     !   after    !
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ubb_e    ,    ub_e    ,    un_e    ,    ua_e 
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   vbb_e    ,    vb_e    ,    vn_e    ,    va_e 
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   sshbb_e  ,    sshb_e  ,    sshn_e  ,    ssha_e 
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::                              hu_e
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::                              hv_e                                                
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::                              hur_e
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::                              hvr_e 
 
    !! interpolated gradient (only used in zps case)
@@ -85,6 +102,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: /trunk/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5930)
@@ -28,4 +28,5 @@
    !!            3.7  !  2014-10  (G. Madec)  LDF simplication 
    !!             -   !  2014-12  (G. Madec) remove KPP scheme
+   !!             -   !  2015-11  (J. Chanut) free surface simplification
    !!----------------------------------------------------------------------
 
@@ -179,19 +180,20 @@
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      !  Ocean dynamics : hdiv, ssh, e3, wn
-      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+      !  Ocean dynamics : hdiv, ssh, e3, u, v, w
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
                          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
+
+!!jc: fs simplification
+!!jc: lines below are useless if lk_vvl=T. Keep them here (which maintains a bug if lk_vvl=F and ln_zps=T, cf ticket #1636) 
+!!                                         but ensures reproductible results
+!!                                         with previous versions using split-explicit free surface          
             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
@@ -201,39 +203,44 @@
                &                                          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, indic )  ! 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
+!!jc: fs simplification
+                            
+                         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
+#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
+
+                                                      ! 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
+
+                         CALL dyn_bfr       ( kstp )  ! bottom friction
+                         CALL dyn_zdf       ( kstp )  ! vertical diffusion
+
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! 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,103 +248,62 @@
       ! Passive Tracer Model
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-                         CALL trc_stp( kstp )         ! time-stepping
-#endif
-
-      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! Active tracers                              (ua, va used as workspace)
-      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-                             tsa(:,:,:,:) = 0._wp           ! set tracer trends to zero
+                         CALL trc_stp       ( kstp )  ! time-stepping
+#endif
+
+      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+      ! Active tracers                              
+      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+                         tsa(:,:,:,:) = 0._wp         ! set tracer trends to zero
 
       IF(  lk_asminc .AND. ln_asmiau .AND. &
-         & ln_trainc     )   CALL tra_asm_inc( kstp )       ! apply tracer assimilation increment
-                             CALL tra_sbc    ( kstp )       ! surface boundary condition
-      IF( ln_traqsr      )   CALL tra_qsr    ( kstp )       ! penetrative solar radiation qsr
-      IF( ln_trabbc      )   CALL tra_bbc    ( kstp )       ! bottom heat flux
-      IF( lk_trabbl      )   CALL tra_bbl    ( kstp )       ! advective (and/or diffusive) bottom boundary layer scheme
-      IF( ln_tradmp      )   CALL tra_dmp    ( kstp )       ! internal damping trends
-      IF( lk_bdy         )   CALL bdy_tra_dmp( kstp )       ! bdy damping trends
-                             CALL tra_adv    ( kstp )       ! horizontal & vertical advection
-                             CALL tra_ldf    ( kstp )       ! lateral mixing
+         & ln_trainc )   CALL tra_asm_inc   ( kstp )  ! apply tracer assimilation increment
+                         CALL tra_sbc       ( kstp )  ! surface boundary condition
+      IF( ln_traqsr  )   CALL tra_qsr       ( kstp )  ! penetrative solar radiation qsr
+      IF( ln_trabbc  )   CALL tra_bbc       ( kstp )  ! bottom heat flux
+      IF( lk_trabbl  )   CALL tra_bbl       ( kstp )  ! advective (and/or diffusive) bottom boundary layer scheme
+      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
 
 !!gm : why CALL to dia_ptr has been moved here??? (use trends info?)
-      IF( ln_diaptr      )   CALL dia_ptr                   ! Poleward adv/ldf TRansports diagnostics
+      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
-
-      IF( ln_dynhpg_imp  ) THEN                             ! semi-implicit hpg (time stepping then eos)
-         IF( ln_zdfnpc   )   CALL tra_npc( kstp )                ! update after fields by non-penetrative convection
-                             CALL tra_nxt( kstp )                ! tracer fields at next time step
-!!gm : why again a call to sto_pts ???
-            IF( ln_sto_eos ) CALL sto_pts( tsn )                 ! Random T/S fluctuations
-!!gm
-                             CALL eos    ( tsa, rhd, rhop, fsdept_n(:,:,:) )  ! Time-filtered in situ density for hpg computation
-            IF( ln_zps .AND. .NOT. ln_isfcav)                                &
-               &             CALL zps_hde    ( kstp, jpts, tsa, gtsu, gtsv,  &    ! Partial steps: 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, tsa, 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    )
-      ELSE                                                  ! 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
-      ENDIF
-
-      !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
-      ! 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, indic )  ! 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
+                         CALL tra_zdf       ( kstp )  ! vertical mixing and after tracer fields
+      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 )  ! finalize (bcs) tracer fields at next time step and swap
+                         CALL dyn_nxt       ( kstp )  ! finalize (bcs) velocities at next time step and swap
+                         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
@@ -345,23 +311,24 @@
       ! AGRIF
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<      
-                               CALL Agrif_Integrate_ChildGrids( stp )  
-
-      IF ( Agrif_NbStepint().EQ.0 ) THEN
-                               CALL Agrif_Update_Tra()      ! Update active tracers
-                               CALL Agrif_Update_Dyn()      ! Update momentum
-      ENDIF
-#endif
-      IF( ln_diahsb        )   CALL dia_hsb( kstp )         ! - ML - global conservation diagnostics
-      IF( lk_diaobs  )         CALL dia_obs( kstp )         ! obs-minus-model (assimilation) diagnostics (call after dynamics update)
+                         CALL Agrif_Integrate_ChildGrids( stp )  
+
+      IF ( Agrif_NbStepint().EQ.0 ) THEN              ! AGRIF Update 
+!!jc in fact update i useless at last time step, but do it for global diagnostics
+                         CALL Agrif_Update_Tra()      ! Update active tracers
+                         CALL Agrif_Update_Dyn()      ! Update momentum
+      ENDIF
+#endif
+      IF( ln_diahsb  )   CALL dia_hsb       ( kstp )  ! - ML - global conservation diagnostics
+      IF( lk_diaobs  )   CALL dia_obs       ( kstp )  ! obs-minus-model (assimilation) diagnostics (call after dynamics update)
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
       ! Control
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-                               CALL stp_ctl( kstp, indic )
-      IF( indic < 0        )   THEN
-                               CALL ctl_stop( 'step: indic < 0' )
-                               CALL dia_wri_state( 'output.abort', kstp )
-      ENDIF
-      IF( kstp == nit000   )   THEN
+                         CALL stp_ctl       ( kstp, indic )
+      IF( indic < 0  )   THEN
+                         CALL ctl_stop( 'step: indic < 0' )
+                         CALL dia_wri_state( 'output.abort', kstp )
+      ENDIF
+      IF( kstp == nit000 )   THEN
                  CALL iom_close( numror )     ! close input  ocean restart file
          IF(lwm) CALL FLUSH    ( numond )     ! flush output namelist oce
@@ -374,5 +341,5 @@
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 !!gm why lk_oasis and not lk_cpl ????
-      IF( lk_oasis         )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges
+      IF( lk_oasis   )   CALL sbc_cpl_snd( kstp )     ! coupled mode : field exchanges
       !
 #if defined key_iomput
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 5930)
@@ -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)
 
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/stpctl.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/stpctl.F90	(revision 5930)
@@ -16,9 +16,7 @@
    USE oce             ! ocean dynamics and tracers variables
    USE dom_oce         ! ocean space and time domain variables 
-   USE sol_oce         ! ocean space and time domain variables 
    USE in_out_manager  ! I/O manager
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp         ! distributed memory computing
-   USE dynspg_oce      ! pressure gradient schemes 
    USE c1d             ! 1D vertical configuration
 
@@ -43,6 +41,5 @@
       !! ** Method  : - Save the time step in numstp
       !!              - Print it each 50 time steps
-      !!              - Print solver statistics in numsol 
-      !!              - Stop the run IF problem for the solver ( indec < 0 )
+      !!              - Stop the run IF problem ( indic < 0 )
       !!
       !! ** Actions :   'time.step' file containing the last ocean time-step
@@ -50,5 +47,5 @@
       !!----------------------------------------------------------------------
       INTEGER, INTENT( in ) ::   kt         ! ocean time-step index
-      INTEGER, INTENT( inout ) ::   kindic  ! indicator of solver convergence
+      INTEGER, INTENT( inout ) ::   kindic  ! error indicator
       !!
       INTEGER  ::   ji, jj, jk              ! dummy loop indices
@@ -143,32 +140,15 @@
       IF( lk_c1d )  RETURN          ! No log file in case of 1D vertical configuration
 
-      ! log file (solver or ssh statistics)
-      ! --------
-      IF( lk_dynspg_flt ) THEN      ! elliptic solver statistics (if required)
-         !
-         IF(lwp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps       ! Solver
-         !
-         IF( kindic < 0 .AND. zsmin > 0.e0 .AND. zumax <= 20.e0 ) THEN   ! create a abort file if problem found 
-            IF(lwp) THEN
-               WRITE(numout,*) ' stpctl: the elliptic solver DO not converge or explode'
-               WRITE(numout,*) ' ====== '
-               WRITE(numout,9200) kt, niter, res, sqrt(epsr)/eps
-               WRITE(numout,*)
-               WRITE(numout,*) ' stpctl: output of last fields'
-               WRITE(numout,*) ' ======  '
-            ENDIF
-         ENDIF
-         !
-      ELSE                                   !* ssh statistics (and others...)
-         IF( kt == nit000 .AND. lwp ) THEN   ! open ssh statistics file (put in solver.stat file)
-            CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
-         ENDIF
-         !
-         zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) )
-         IF( lk_mpp )   CALL mpp_sum( zssh2 )      ! sum over the global domain
-         !
-         IF(lwp) WRITE(numsol,9300) kt, zssh2, zumax, zsmin      ! ssh statistics
-         !
+      ! log file (ssh statistics)
+      ! --------                                   !* ssh statistics (and others...)
+      IF( kt == nit000 .AND. lwp ) THEN   ! open ssh statistics file (put in solver.stat file)
+         CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea )
       ENDIF
+      !
+      zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) )
+      IF( lk_mpp )   CALL mpp_sum( zssh2 )      ! sum over the global domain
+      !
+      IF(lwp) WRITE(numsol,9300) kt, zssh2, zumax, zsmin      ! ssh statistics
+      !
 
 9200  FORMAT('it:', i8, ' iter:', i4, ' r: ',e16.10, ' b: ',e16.10 )
Index: /trunk/NEMOGCM/NEMO/SAS_SRC/diawri.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 5930)
@@ -26,5 +26,4 @@
    USE dom_oce         ! ocean space and time domain
    USE zdf_oce         ! ocean vertical physics
-   USE sol_oce         ! solver variables
    USE sbc_oce         ! Surface boundary condition: ocean fields
    USE sbc_ice         ! Surface boundary condition: ice fields
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 5929)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 5930)
@@ -502,5 +502,5 @@
       z1_rau0 = 0.5 / rau0
       ssha(:,:) = (  sshb(:,:) - z2dt * ( z1_rau0 * ( emp_b(:,:) + emp(:,:) ) + zhdiv(:,:) )  ) * tmask(:,:,1)
-#if ! defined key_dynspg_ts
+
       ! These lines are not necessary with time splitting since
       ! boundary condition on sea level is set during ts loop
@@ -512,6 +512,4 @@
       CALL lbc_lnk( ssha, 'T', 1. ) 
 #endif
-#endif
-
 
       !                                           !------------------------------!
Index: /trunk/NEMOGCM/SETTE/sette.sh
===================================================================
--- /trunk/NEMOGCM/SETTE/sette.sh	(revision 5929)
+++ /trunk/NEMOGCM/SETTE/sette.sh	(revision 5930)
@@ -168,5 +168,4 @@
     set_namelist namelist_cfg ln_clobber .true.
     set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg jpni 2
     set_namelist namelist_cfg jpnj 2
@@ -192,5 +191,4 @@
     set_namelist namelist_cfg ln_clobber .true.
     set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg jpni 2
     set_namelist namelist_cfg jpnj 2
@@ -238,5 +236,4 @@
     set_namelist namelist_cfg ln_ctl .false.
     set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg jpni 1
     set_namelist namelist_cfg jpnj 4
@@ -265,5 +262,4 @@
     set_namelist namelist_cfg ln_ctl .false.
     set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg jpni 2
     set_namelist namelist_cfg jpnj 2
@@ -304,5 +300,4 @@
     set_namelist namelist_cfg jpnj 4
     set_namelist namelist_cfg jpnij 8
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_top_cfg ln_trcdta .false.
     set_namelist namelist_top_cfg ln_diatrc .false.
@@ -340,5 +335,4 @@
     set_namelist namelist_cfg jpnj 4
     set_namelist namelist_cfg jpnij 8
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_top_cfg ln_diatrc .false.
     set_namelist namelist_top_cfg ln_rsttr .true.
@@ -398,5 +392,4 @@
     set_namelist namelist_cfg jpnj 4
     set_namelist namelist_cfg jpnij 16
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_top_cfg ln_trcdta .false.
     set_namelist namelist_top_cfg ln_diatrc .false.
@@ -437,5 +430,4 @@
     set_namelist namelist_cfg jpnj 8
     set_namelist namelist_cfg jpnij 16
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_top_cfg ln_trcdta .false.
     set_namelist namelist_top_cfg ln_diatrc .false.
@@ -658,5 +650,4 @@
     set_namelist namelist_cfg jpnj 2
     set_namelist namelist_cfg jpnij 4
-    set_namelist namelist_cfg nn_solv 2
     if [ ${USING_MPMD} == "yes" ] ; then
        set_xio_using_server iodef.xml true
@@ -682,5 +673,4 @@
     set_namelist namelist_cfg jpnj 2
     set_namelist namelist_cfg jpnij 4
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg cn_ocerst_in \"O2L3_LONG_00000075_restart\"
     set_namelist namelist_ice_cfg cn_icerst_in \"O2L3_LONG_00000075_restart_ice\"
@@ -723,5 +713,4 @@
     set_namelist namelist_cfg jpnj 4
     set_namelist namelist_cfg jpnij 16
-    set_namelist namelist_cfg nn_solv 2
     if [ ${USING_MPMD} == "yes" ] ; then
        set_xio_using_server iodef.xml true
@@ -748,5 +737,4 @@
     set_namelist namelist_cfg jpnj 8
     set_namelist namelist_cfg jpnij 16
-    set_namelist namelist_cfg nn_solv 2
     if [ ${USING_MPMD} == "yes" ] ; then
        set_xio_using_server iodef.xml true
@@ -1019,5 +1007,4 @@
     set_namelist namelist_cfg ln_clobber .true.
     set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg jpni 2
     set_namelist namelist_cfg jpnj 2
@@ -1043,5 +1030,4 @@
     set_namelist namelist_cfg ln_clobber .true.
     set_namelist namelist_cfg nn_fwb 0
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg jpni 2
     set_namelist namelist_cfg jpnj 2
@@ -1088,5 +1074,4 @@
     set_namelist namelist_cfg ln_ctl .false.
     set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg jpni 1
     set_namelist namelist_cfg jpnj 4
@@ -1115,5 +1100,4 @@
     set_namelist namelist_cfg ln_ctl .false.
     set_namelist namelist_cfg ln_clobber .true.
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg jpni 2
     set_namelist namelist_cfg jpnj 2
@@ -1154,5 +1138,4 @@
     set_namelist namelist_cfg jpnj 4
     set_namelist namelist_cfg jpnij 16
-    set_namelist namelist_cfg nn_solv 2   
     set_namelist namelist_cfg ln_t3d .true.
     set_namelist namelist_cfg ln_s3d .true.
@@ -1193,5 +1176,4 @@
     set_namelist namelist_cfg jpnj 8
     set_namelist namelist_cfg jpnij 16
-    set_namelist namelist_cfg nn_solv 2
     set_namelist namelist_cfg ln_t3d .true.
     set_namelist namelist_cfg ln_s3d .true.
@@ -1347,5 +1329,4 @@
     set_namelist namelist_cfg jpnj 2
     set_namelist namelist_cfg jpnij 4
-    set_namelist namelist_cfg nn_solv 2
 #
     set_namelist 1_namelist_cfg cn_exp \"O2LP_LONG\"
@@ -1380,5 +1361,4 @@
 
     set_namelist namelist_cfg jpnij 4
-    set_namelist namelist_cfg nn_solv 2
     set_namelist 1_namelist_cfg cn_exp \"O2LP_SHORT\"
     set_namelist 1_namelist_cfg nn_it000 151
@@ -1432,5 +1412,4 @@
     set_namelist namelist_cfg jpnj 4
     set_namelist namelist_cfg jpnij 16
-    set_namelist namelist_cfg nn_solv 2
 #
     set_namelist 1_namelist_cfg nn_it000 1
@@ -1464,5 +1443,4 @@
     set_namelist namelist_cfg jpnj 8
     set_namelist namelist_cfg jpnij 16
-    set_namelist namelist_cfg nn_solv 2
 #
     set_namelist 1_namelist_cfg nn_it000 1
Index: /trunk/NEMOGCM/fcm-make/inc/keys-amm12.cfg
===================================================================
--- /trunk/NEMOGCM/fcm-make/inc/keys-amm12.cfg	(revision 5929)
+++ /trunk/NEMOGCM/fcm-make/inc/keys-amm12.cfg	(revision 5930)
@@ -1,2 +1,2 @@
 preprocess.prop{fpp.defs} = \
-  key_bdy key_tide key_dynspg_ts key_ldfslp key_zdfgls key_vvl key_diainstant key_mpp_mpi key_iomput
+  key_bdy key_tide key_ldfslp key_zdfgls key_vvl key_diainstant key_mpp_mpi key_iomput
Index: /trunk/NEMOGCM/fcm-make/inc/keys-gyre.cfg
===================================================================
--- /trunk/NEMOGCM/fcm-make/inc/keys-gyre.cfg	(revision 5929)
+++ /trunk/NEMOGCM/fcm-make/inc/keys-gyre.cfg	(revision 5930)
@@ -1,2 +1,2 @@
 preprocess.prop{fpp.defs} = \
-  key_dynspg_flt key_ldfslp key_zdftke key_iomput key_mpp_mpi key_nosignedzero
+  key_ldfslp key_zdftke key_iomput key_mpp_mpi key_nosignedzero
Index: /trunk/NEMOGCM/fcm-make/inc/keys-gyre_pisces.cfg
===================================================================
--- /trunk/NEMOGCM/fcm-make/inc/keys-gyre_pisces.cfg	(revision 5929)
+++ /trunk/NEMOGCM/fcm-make/inc/keys-gyre_pisces.cfg	(revision 5930)
@@ -1,2 +1,2 @@
 preprocess.prop{fpp.defs} = \
-  key_dynspg_flt key_ldfslp key_zdftke key_top key_pisces_reduced key_iomput key_mpp_mpi
+  key_ldfslp key_zdftke key_top key_pisces_reduced key_iomput key_mpp_mpi
Index: /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim.cfg
===================================================================
--- /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim.cfg	(revision 5929)
+++ /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim.cfg	(revision 5930)
@@ -1,2 +1,2 @@
 preprocess.prop{fpp.defs} = \
-  key_trabbl key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc
+  key_trabbl key_lim2 key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc
Index: /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim3.cfg
===================================================================
--- /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim3.cfg	(revision 5929)
+++ /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim3.cfg	(revision 5930)
@@ -1,2 +1,2 @@
 preprocess.prop{fpp.defs} = \
-  key_trabbl key_lim3 key_vvl key_dynspg_ts key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc
+  key_trabbl key_lim3 key_vvl key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc
Index: /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim_cfc.cfg
===================================================================
--- /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim_cfc.cfg	(revision 5929)
+++ /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim_cfc.cfg	(revision 5930)
@@ -1,2 +1,2 @@
 preprocess.prop{fpp.defs} = \
-  key_trabbl key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_top key_cfc key_c14b key_iomput key_mpp_mpi
+  key_trabbl key_lim2 key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_top key_cfc key_c14b key_iomput key_mpp_mpi
Index: /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim_pisces.cfg
===================================================================
--- /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim_pisces.cfg	(revision 5929)
+++ /trunk/NEMOGCM/fcm-make/inc/keys-orca2_lim_pisces.cfg	(revision 5930)
@@ -1,2 +1,2 @@
 preprocess.prop{fpp.defs} = \
-  key_trabbl key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_top key_pisces key_iomput key_mpp_mpi
+  key_trabbl key_lim2 key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_top key_pisces key_iomput key_mpp_mpi
Index: /trunk/NEMOGCM/fcm-make/inc/keys-orca2_sas_lim.cfg
===================================================================
--- /trunk/NEMOGCM/fcm-make/inc/keys-orca2_sas_lim.cfg	(revision 5929)
+++ /trunk/NEMOGCM/fcm-make/inc/keys-orca2_sas_lim.cfg	(revision 5930)
@@ -1,2 +1,2 @@
 preprocess.prop{fpp.defs} = \
-  key_trabbl key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi
+  key_trabbl key_lim2 key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi
