Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/ARCH/arch-X64_MOBILIS.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/ARCH/arch-X64_MOBILIS.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/ARCH/arch-X64_MOBILIS.fcm	(revision 6138)
@@ -38,5 +38,5 @@
 %NCDF_HOME           /home/acc/shared
 %HDF5_HOME           /home/acc/shared
-%XIOS_HOME           /home/acc/XIOS_1.0_r777
+%XIOS_HOME           /home/acc/XIOS_1.0_r803
 %OASIS_HOME          
 
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/ARCH/arch-openmpi_NAVITI_MERCATOR.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/ARCH/arch-openmpi_NAVITI_MERCATOR.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/ARCH/arch-openmpi_NAVITI_MERCATOR.fcm	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/AMM12/cpp_AMM12.fcm	(revision 6138)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys  key_bdy key_tide key_dynspg_ts  key_zdfgls  key_vvl key_diainstant key_mpp_mpi key_iomput
+ bld::tool::fppkeys  key_bdy key_tide  key_zdfgls  key_vvl key_diainstant key_mpp_mpi key_iomput
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/C1D_PAPA/EXP00/namelist_cfg	(revision 6138)
@@ -64,8 +64,4 @@
 /
 !-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namcrs        !   Grid coarsening for dynamics output and/or
                !   passive tracer coarsened online simulations
@@ -141,4 +137,7 @@
 &namtra_qsr    !   penetrative solar radiation
 !-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_chl      ='chlorophyll_PAPASTATION', -1    , 'CHLA'    ,   .true.     , .true. , 'yearly'  , ''       , ''       , ''
 /
 !-----------------------------------------------------------------------
@@ -261,6 +260,7 @@
 /
 !-----------------------------------------------------------------------
-!namdyn_spg    !   surface pressure gradient   (CPP key only)
-!-----------------------------------------------------------------------
+&namdyn_spg    !   surface pressure gradient
+!-----------------------------------------------------------------------
+/
 !-----------------------------------------------------------------------
 &namdyn_ldf    !   lateral diffusion on momentum
@@ -293,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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE/cpp_GYRE.fcm	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_BFM/cpp_GYRE_BFM.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_BFM/cpp_GYRE_BFM.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_BFM/cpp_GYRE_BFM.fcm	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_XIOS/cpp_GYRE_XIOS.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_XIOS/cpp_GYRE_XIOS.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/GYRE_XIOS/cpp_GYRE_XIOS.fcm	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/1_namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM3/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM3/cpp_ORCA2_LIM3.fcm	(revision 6138)
@@ -1,1 +1,1 @@
- bld::tool::fppkeys key_trabbl key_lim3 key_vvl key_dynspg_ts key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi key_diaobs key_asminc key_iomput key_nosignedzero
+ bld::tool::fppkeys key_trabbl key_lim3 key_vvl key_zdftke key_zdfddm key_zdftmx  key_mpp_mpi key_diaobs key_asminc key_iomput key_nosignedzero
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/1_namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/cpp_ORCA2_LIM_CFC_C14b.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/cpp_ORCA2_LIM_CFC_C14b.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_CFC_C14b/cpp_ORCA2_LIM_CFC_C14b.fcm	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/cpp_ORCA2_LIM_PISCES.fcm	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist_cfg	(revision 6138)
@@ -53,8 +53,4 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-/
-!-----------------------------------------------------------------------
-&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_SAS_LIM/EXP00/namelist_cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_SAS_LIM/cpp_ORCA2_SAS_LIM.fcm
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_SAS_LIM/cpp_ORCA2_SAS_LIM.fcm	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/ORCA2_SAS_LIM/cpp_ORCA2_SAS_LIM.fcm	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/SHARED/field_def.xml
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/SHARED/field_def.xml	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_opa_interp.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_opa_update.F90	(revision 6138)
@@ -11,5 +11,4 @@
    USE lib_mpp
    USE wrk_nemo  
-   USE dynspg_oce
    USE zdf_oce        ! vertical physics: ocean variables 
 
@@ -107,6 +106,5 @@
 # endif
 
-# if defined key_dynspg_ts
-      IF (ln_bt_fw) THEN
+      IF ( ln_dynspg_ts.AND.ln_bt_fw ) THEN
          ! Update time integrated transports
          IF (mod(nbcline,nbclineupdate) == 0) THEN
@@ -128,5 +126,4 @@
          ENDIF
       END IF
-# endif
       !
       nbcline = nbcline + 1
@@ -360,10 +357,10 @@
                !
                ! Update barotropic velocities:
-#if defined key_dynspg_ts
-               IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
-                  zcorr = tabres(ji,jj) - un_b(ji,jj)
-                  ub_b(ji,jj) = ub_b(ji,jj) + atfp * zcorr * umask(ji,jj,1)
-               END IF
-#endif               
+               IF ( .NOT.ln_dynspg_ts .OR. (ln_dynspg_ts.AND.(.NOT.ln_bt_fw)) ) THEN
+                  IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
+                     zcorr = tabres(ji,jj) - un_b(ji,jj)
+                     ub_b(ji,jj) = ub_b(ji,jj) + atfp * zcorr * umask(ji,jj,1)
+                  END IF
+               ENDIF             
                un_b(ji,jj) = tabres(ji,jj) * umask(ji,jj,1)
                !       
@@ -425,10 +422,10 @@
                !
                ! Update barotropic velocities:
-#if defined key_dynspg_ts
-               IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
-                  zcorr = tabres(ji,jj) - vn_b(ji,jj)
-                  vb_b(ji,jj) = vb_b(ji,jj) + atfp * zcorr * vmask(ji,jj,1)
-               END IF
-#endif               
+               IF ( .NOT.ln_dynspg_ts .OR. (ln_dynspg_ts.AND.(.NOT.ln_bt_fw)) ) THEN
+                  IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN ! Add asselin part
+                     zcorr = tabres(ji,jj) - vn_b(ji,jj)
+                     vb_b(ji,jj) = vb_b(ji,jj) + atfp * zcorr * vmask(ji,jj,1)
+                  END IF
+               ENDIF              
                vn_b(ji,jj) = tabres(ji,jj) * vmask(ji,jj,1)
                !       
@@ -470,14 +467,15 @@
          END DO
       ELSE
-#if ! defined key_dynspg_ts
-         IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN
-            DO jj=j1,j2
-               DO ji=i1,i2
-                  sshb(ji,jj) =   sshb(ji,jj) &
-                        & + atfp * ( tabres(ji,jj) - sshn(ji,jj) ) * tmask(ji,jj,1)
-               END DO
-            END DO
+         IF ( .NOT.ln_dynspg_ts .OR. (ln_dynspg_ts.AND.(.NOT.ln_bt_fw)) ) THEN
+            IF (.NOT.(lk_agrif_fstep.AND.(neuler==0))) THEN
+               DO jj=j1,j2
+                  DO ji=i1,i2
+                     sshb(ji,jj) =   sshb(ji,jj) &
+                           & + atfp * ( tabres(ji,jj) - sshn(ji,jj) ) * tmask(ji,jj,1)
+                  END DO
+               END DO
+            ENDIF
          ENDIF
-#endif
+
          DO jj=j1,j2
             DO ji=i1,i2
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_top_interp.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_top_interp.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_top_interp.F90	(revision 6138)
@@ -4,5 +4,4 @@
    USE oce
    USE dom_oce      
-   USE sol_oce
    USE agrif_oce
    USE agrif_top_sponge
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 6138)
@@ -107,5 +107,5 @@
       USE oce, ONLY:  zts    => tsa
       USE oce, ONLY:  zuslp  => ua   , zvslp  => va
-      USE oce, ONLY:  zwslpi => ua_sv , zwslpj => va_sv
+      USE zdf_oce, ONLY:  zwslpi => avmu , zwslpj => avmv 
       USE oce, ONLY:  zu     => ub   , zv     => vb,  zw => rke
       !
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/ASM/asmbkg.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 6138)
@@ -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
@@ -430,4 +439,5 @@
       CHARACTER(len=100)                     ::   cn_dir        ! Root directory for location of data files
       CHARACTER(len=100), DIMENSION(nb_bdy)  ::   cn_dir_array  ! Root directory for location of data files
+      CHARACTER(len = 256)::   clname                           ! temporary file name
       LOGICAL                                ::   ln_full_vel   ! =T => full velocities in 3D boundary data
                                                                 ! =F => baroclinic velocities in 3D boundary data
@@ -669,12 +679,20 @@
             ! sea ice
             IF( nn_ice_lim_dta(ib_bdy) .eq. 1 ) THEN
-
                ! Test for types of ice input (lim2 or lim3) 
-               CALL iom_open ( bn_a_i%clname, inum )
-               id1 = iom_varid ( inum, bn_a_i%clvar, kdimsz=zdimsz, kndims=zndims, ldstop = .FALSE. )
+               ! Build file name to find dimensions 
+               clname=TRIM(bn_a_i%clname)
+               IF( .NOT. bn_a_i%ln_clim ) THEN   
+                                                  WRITE(clname, '(a,"_y",i4.4)' ) TRIM( bn_a_i%clname ), nyear    ! add year
+                  IF( bn_a_i%cltype /= 'yearly' ) WRITE(clname, '(a,"m" ,i2.2)' ) TRIM( clname        ), nmonth   ! add month
+               ELSE
+                  IF( bn_a_i%cltype /= 'yearly' ) WRITE(clname, '(a,"_m",i2.2)' ) TRIM( bn_a_i%clname ), nmonth   ! add month
+               ENDIF
+               IF( bn_a_i%cltype == 'daily' .OR. bn_a_i%cltype(1:4) == 'week' ) &
+               &                                  WRITE(clname, '(a,"d" ,i2.2)' ) TRIM( clname        ), nday     ! add day
+               !
+               CALL iom_open  ( clname, inum )
+               id1 = iom_varid( inum, bn_a_i%clvar, kdimsz=zdimsz, kndims=zndims, ldstop = .FALSE. )
                CALL iom_close ( inum )
-               !CALL fld_clopn ( bn_a_i, nyear, nmonth, nday, ldstop=.TRUE. )
-               !CALL iom_open ( bn_a_i%clname, inum )
-               !id1 = iom_varid ( bn_a_i%num, bn_a_i%clvar, kdimsz=zdimsz, kndims=zndims, ldstop = .FALSE. )
+
       	       IF ( zndims == 4 ) THEN
                  ll_bdylim3 = .TRUE.   ! lim3 input
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdydyn2d.F90	(revision 6138)
@@ -23,5 +23,4 @@
    USE bdy_oce         ! ocean open boundary conditions
    USE bdylib          ! BDY library routines
-   USE dynspg_oce      ! for barotropic variables
    USE phycst          ! physical constants
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 6138)
@@ -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
@@ -416,5 +414,5 @@
       ! Absolute time from model initialization:   
       IF( PRESENT(kit) ) THEN  
-         z_arg = ( kt + (kit+0.5_wp*(time_add-1)) / REAL(nn_baro,wp) ) * rdt
+         z_arg = ( kt + (kit+time_add-1) / REAL(nn_baro,wp) ) * rdt
       ELSE                              
          z_arg = ( kt + time_add ) * rdt
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/BDY/bdyvol.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/C1D/dynnxt_c1d.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/C1D/dynnxt_c1d.F90	(revision 6137)
+++ 	(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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 6138)
@@ -14,6 +14,4 @@
    USE dom_oce         ! ocean space and time domain
    USE phycst
-   USE dynspg_oce
-   USE dynspg_ts
    USE daymod
    USE tide_mod
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 6138)
@@ -28,5 +28,4 @@
    USE lbclnk          ! ocean lateral boundary conditions (or mpp link)
    USE lib_mpp
-   USE dynspg_oce      ! choice/control of key cpp for surface pressure gradient
    USE wrk_nemo        ! Memory allocation
    USE timing          ! Timing
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 6138)
@@ -38,4 +38,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
@@ -60,5 +61,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)
@@ -134,5 +134,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
       !!----------------------------------------------------------------------
       !
@@ -157,5 +157,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
       !
@@ -295,4 +294,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
@@ -561,4 +562,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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynnxt.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_exp.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90	(revision 6137)
+++ 	(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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_oce.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_oce.F90	(revision 6137)
+++ 	(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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 6138)
@@ -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
@@ -69,10 +68,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"
@@ -89,11 +82,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) )
@@ -102,8 +96,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
@@ -148,13 +148,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
@@ -163,8 +163,4 @@
       REAL(wp), POINTER, DIMENSION(:,:) :: wduflt1, wdvflt1           ! Wetting/Dying velocity filter coef.
       !!----------------------------------------------------------------------
-
-      ! tempoary debugging integer
-      INTEGER :: jidbg, jjdbg
-      jidbg = 163; jjdbg = 179
       !
       IF( nn_timing == 1 )  CALL timing_start('dyn_spg_ts')
@@ -172,6 +168,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                                   )
@@ -197,5 +193,5 @@
       !
                                      	                ! time offset in steps for bdy data update
-      IF (.NOT.ln_bt_fw) THEN ; noffset=-2*nn_baro ; ELSE ;  noffset = 0 ; ENDIF
+      IF (.NOT.ln_bt_fw) THEN ; noffset=-nn_baro ; ELSE ;  noffset = 0 ; ENDIF
       !
       IF( kt == nit000 ) THEN             	!* initialisation
@@ -558,8 +554,8 @@
       ENDIF
       !
-      IF (ln_bt_fw) THEN                  ! FORWARD integration: start from NOW fields
-         sshn_e(:,:) = sshn (:,:)
-         zun_e (:,:) = un_b (:,:)
-         zvn_e (:,:) = vn_b (:,:)
+      IF (ln_bt_fw) THEN                  ! FORWARD integration: start from NOW fields                    
+         sshn_e(:,:) = sshn (:,:)            
+         un_e  (:,:) = un_b (:,:)            
+         vn_e  (:,:) = vn_b (:,:)
          !
          hu_e  (:,:) = hu   (:,:)       
@@ -569,6 +565,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 (:,:)       
@@ -584,6 +580,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  !
@@ -593,6 +589,6 @@
          ! Update only tidal forcing at open boundaries
 #if defined key_tide
-         IF ( lk_bdy .AND. lk_tide )      CALL bdy_dta_tides( kt, kit=jn, time_offset=(noffset+1) )
-         IF ( ln_tide_pot .AND. lk_tide ) CALL upd_tide( kt, kit=jn, koffset=noffset )
+         IF ( lk_bdy .AND. lk_tide ) CALL bdy_dta_tides( kt, kit=jn, time_offset=(noffset+1) )
+         IF ( ln_tide_pot .AND. lk_tide ) CALL upd_tide( kt, kit=jn, time_offset=noffset )
 #endif
          !
@@ -609,6 +605,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)
@@ -677,6 +673,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:
@@ -861,6 +857,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:
@@ -893,5 +889,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)   &
@@ -899,5 +895,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)   &
@@ -922,11 +918,11 @@
                   zhvra = vmask(ji,jj,1)/(zhvra + 1._wp - vmask(ji,jj,1))
 
-                  ua_e(ji,jj) = (                hu_e(ji,jj)  *  zun_e(ji,jj)   &
-                            &     + rdtbt * ( zhust_e(ji,jj)  *    zwx(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)   &
                             &               +      hu(ji,jj)  * zu_frc(ji,jj) ) &
                             &   ) * 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)   &
@@ -958,5 +954,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                                                           
@@ -966,10 +962,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(:,:)
@@ -996,32 +992,18 @@
       ! -----------------------------------------------------------------------------
       !
-      ! 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)
-         DO jj = 1, jpjm1
-            DO ji = 1, jpim1      ! NO Vector Opt.
-               zsshu_a(ji,jj) = z1_2 * umask(ji,jj,1)  * r1_e1e2u(ji,jj) &
-                  &              * ( e1e2t(ji  ,jj) * ssha(ji  ,jj)      &
-                  &              +   e1e2t(ji+1,jj) * ssha(ji+1,jj) )
-               zsshv_a(ji,jj) = z1_2 * vmask(ji,jj,1)  * r1_e1e2v(ji,jj) &
-                  &              * ( e1e2t(ji,jj  ) * ssha(ji,jj  )      &
-                  &              +   e1e2t(ji,jj+1) * ssha(ji,jj+1) )
-            END DO
-         END DO
-         CALL lbc_lnk_multi( zsshu_a, 'U', 1._wp, zsshv_a, 'V', 1._wp ) ! Boundary conditions
-      ENDIF
-      !
       ! Set advection velocity correction:
+      zwx(:,:) = un_adv(:,:)
+      zwy(:,:) = vn_adv(:,:)
       IF (((kt==nit000).AND.(neuler==0)).OR.(.NOT.ln_bt_fw)) THEN     
-         un_adv(:,:) = zu_sum(:,:)*hur(:,:)
-         vn_adv(:,:) = zv_sum(:,:)*hvr(:,:)
+         un_adv(:,:) = zwx(:,:)*hur(:,:)
+         vn_adv(:,:) = zwy(:,:)*hvr(:,:)
       ELSE
-         un_adv(:,:) = z1_2 * ( ub2_b(:,:) + zu_sum(:,:)) * hur(:,:)
-         vn_adv(:,:) = z1_2 * ( vb2_b(:,:) + zv_sum(:,:)) * hvr(:,:)
+         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(:,:) = zu_sum(:,:)
-         vb2_b(:,:) = zv_sum(:,:)
+         ub2_b(:,:) = zwx(:,:)
+         vb2_b(:,:) = zwy(:,:)
       ENDIF
       !
@@ -1033,4 +1015,17 @@
          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.
+               zsshu_a(ji,jj) = z1_2 * umask(ji,jj,1)  * r1_e1e2u(ji,jj) &
+                  &              * ( e1e2t(ji  ,jj) * ssha(ji  ,jj)    &
+                  &              +   e1e2t(ji+1,jj) * ssha(ji+1,jj) )
+               zsshv_a(ji,jj) = z1_2 * vmask(ji,jj,1)  * r1_e1e2v(ji,jj) &
+                  &              * ( e1e2t(ji,jj  ) * ssha(ji,jj  )    &
+                  &              +   e1e2t(ji,jj+1) * ssha(ji,jj+1) )
+            END DO
+         END DO
+         CALL lbc_lnk_multi( zsshu_a, 'U', 1._wp, zsshv_a, 'V', 1._wp ) ! Boundary conditions
+         !
          DO jk=1,jpkm1
             ua(:,:,jk) = ua(:,:,jk) + hur(:,:) * ( ua_b(:,:) - ub_b(:,:) * hu_b(:,:) ) * z1_2dt_b
@@ -1071,6 +1066,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                                   )
@@ -1221,48 +1216,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
+      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
-      ELSE
-         DO jj = 1, jpj
-            DO ji =1, jpi
-               zxr2 = r1_e1t(ji,jj) * r1_e1t(ji,jj)
-               zyr2 = r1_e1t(ji,jj) * r1_e1t(ji,jj)
-               zcu(ji,jj) = SQRT( grav * ht(ji,jj) * (zxr2 + zyr2) )
-            END DO
-         END DO
-      ENDIF
-
+      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 )
@@ -1272,9 +1245,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
 
@@ -1321,27 +1294,4 @@
    END SUBROUTINE dyn_spg_ts_init
 
-#else
-   !!---------------------------------------------------------------------------
-   !!   Default case :   Empty module   No split explicit free surface
-   !!---------------------------------------------------------------------------
-CONTAINS
-   INTEGER FUNCTION dyn_spg_ts_alloc()    ! Dummy function
-      dyn_spg_ts_alloc = 0
-   END FUNCTION dyn_spg_ts_alloc
-   SUBROUTINE dyn_spg_ts( kt )            ! Empty routine
-      INTEGER, INTENT(in) :: kt
-      WRITE(*,*) 'dyn_spg_ts: You should not have seen this print! error?', kt
-   END SUBROUTINE dyn_spg_ts
-   SUBROUTINE ts_rst( kt, cdrw )          ! Empty routine
-      INTEGER         , INTENT(in) ::   kt         ! ocean time-step
-      CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag
-      WRITE(*,*) 'ts_rst    : You should not have seen this print! error?', kt, cdrw
-   END SUBROUTINE ts_rst  
-   SUBROUTINE dyn_spg_ts_init( kt )       ! Empty routine
-      INTEGER         , INTENT(in) ::   kt         ! ocean time-step
-      WRITE(*,*) 'dyn_spg_ts_init   : You should not have seen this print! error?', kt
-   END SUBROUTINE dyn_spg_ts_init
-#endif
-   
    !!======================================================================
 END MODULE dynspg_ts
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 6138)
@@ -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)
@@ -547,13 +548,13 @@
          END SELECT
          !
+         IF( ln_dynvor_msk ) THEN          !==  mask/unmask vorticity ==!
+            DO jj = 1, jpjm1
+               DO ji = 1, fs_jpim1   ! vector opt.
+                  zwz(ji,jj) = zwz(ji,jj) * fmask(ji,jj,jk)
+               END DO
+            END DO
+         ENDIF
+         !
          CALL lbc_lnk( zwz, 'F', 1. )
-         !
-         IF( ln_dynvor_msk ) THEN          !==  mask/unmask vorticity ==!
-            DO jj = 1, jpjm1
-               DO ji = 1, fs_jpim1   ! vector opt.
-                  zwz(ji,jj) = zwz(ji,jj) * fmask(ji,jj,jk)
-               END DO
-            END DO
-         ENDIF
          !
          !                                   !==  horizontal fluxes  ==!
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_exp.F90	(revision 6138)
@@ -8,4 +8,5 @@
    !!   NEMO     0.5  !  2002-08  (G. Madec)  F90: Free form and module
    !!            3.3  !  2010-04  (M. Leclair, G. Madec)  Forcing averaged over 2 time steps
+   !!            3.7  !  2015-11  (J. Chanut) output velocities instead of trends
    !!----------------------------------------------------------------------
 
@@ -18,4 +19,5 @@
    USE phycst          ! physical constants
    USE zdf_oce         ! ocean vertical physics
+   USE dynadv, ONLY: ln_dynadv_vec ! Momentum advection form
    USE sbc_oce         ! surface boundary condition: ocean
    USE lib_mpp         ! MPP library
@@ -118,4 +120,22 @@
          !
       END DO                           ! End of time splitting
+
+      ! Time step momentum here to be compliant with what is done in the implicit case
+      !
+      IF( ln_dynadv_vec .OR. .NOT. lk_vvl ) THEN      ! applied on velocity
+         DO jk = 1, jpkm1
+            ua(:,:,jk) = ( ub(:,:,jk) + p2dt * ua(:,:,jk) ) * umask(:,:,jk)
+            va(:,:,jk) = ( vb(:,:,jk) + p2dt * va(:,:,jk) ) * vmask(:,:,jk)
+         END DO
+      ELSE                                            ! applied on thickness weighted velocity
+         DO jk = 1, jpkm1
+            ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)      &
+               &           + p2dt * ua(:,:,jk) * fse3u_n(:,:,jk)  )   &
+               &         / fse3u_a(:,:,jk) * umask(:,:,jk)
+            va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)      &
+               &           + p2dt * va(:,:,jk) * fse3v_n(:,:,jk)  )   &
+               &         / fse3v_a(:,:,jk) * vmask(:,:,jk)
+         END DO
+      ENDIF
       !
       CALL wrk_dealloc( jpi,jpj,jpk, zwx, zwy, zwz, zww ) 
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/dynzdf_imp.F90	(revision 6138)
@@ -25,6 +25,5 @@
    USE wrk_nemo        ! Memory Allocation
    USE timing          ! Timing
-   USE dynadv          ! dynamics: vector invariant versus flux form
-   USE dynspg_oce, ONLY: lk_dynspg_ts
+   USE dynadv, ONLY: ln_dynadv_vec ! Momentum advection form
 
    IMPLICIT NONE
@@ -87,9 +86,24 @@
       ENDIF
 
-      ! 0. Local constant initialization
-      ! --------------------------------
-      z1_p2dt = 1._wp / p2dt      ! inverse of the timestep
-
-      ! 1. Apply semi-implicit bottom friction
+      ! 1. Time step dynamics
+      ! ---------------------
+
+      IF( ln_dynadv_vec .OR. .NOT. lk_vvl ) THEN      ! applied on velocity
+         DO jk = 1, jpkm1
+            ua(:,:,jk) = ( ub(:,:,jk) + p2dt * ua(:,:,jk) ) * umask(:,:,jk)
+            va(:,:,jk) = ( vb(:,:,jk) + p2dt * va(:,:,jk) ) * vmask(:,:,jk)
+         END DO
+      ELSE                                            ! applied on thickness weighted velocity
+         DO jk = 1, jpkm1
+            ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)      &
+               &           + p2dt * ua(:,:,jk) * fse3u_n(:,:,jk)  )   &
+               &                               / fse3u_a(:,:,jk) * umask(:,:,jk)
+            va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)      &
+               &           + p2dt * va(:,:,jk) * fse3v_n(:,:,jk)  )   &
+               &                               / fse3v_a(:,:,jk) * vmask(:,:,jk)
+         END DO
+      ENDIF
+
+      ! 2. Apply semi-implicit bottom friction
       ! --------------------------------------
       ! Only needed for semi-implicit bottom friction setup. The explicit
@@ -97,5 +111,4 @@
       ! column vector of the tri-diagonal matrix equation
       !
-
       IF( ln_bfrimp ) THEN
          DO jj = 2, jpjm1
@@ -119,22 +132,9 @@
       ENDIF
 
-#if defined key_dynspg_ts
-      IF( ln_dynadv_vec .OR. .NOT. lk_vvl ) THEN      ! applied on velocity
-         DO jk = 1, jpkm1
-            ua(:,:,jk) = ( ub(:,:,jk) + p2dt * ua(:,:,jk) ) * umask(:,:,jk)
-            va(:,:,jk) = ( vb(:,:,jk) + p2dt * va(:,:,jk) ) * vmask(:,:,jk)
-         END DO
-      ELSE                                            ! applied on thickness weighted velocity
-         DO jk = 1, jpkm1
-            ua(:,:,jk) = (          ub(:,:,jk) * fse3u_b(:,:,jk)      &
-               &           + p2dt * ua(:,:,jk) * fse3u_n(:,:,jk)  )   &
-               &                               / fse3u_a(:,:,jk) * umask(:,:,jk)
-            va(:,:,jk) = (          vb(:,:,jk) * fse3v_b(:,:,jk)      &
-               &           + p2dt * va(:,:,jk) * fse3v_n(:,:,jk)  )   &
-               &                               / fse3v_a(:,:,jk) * vmask(:,:,jk)
-         END DO
-      ENDIF
-
-      IF ( ln_bfrimp .AND.lk_dynspg_ts ) THEN
+      ! With split-explicit free surface, barotropic stress is treated explicitly
+      ! Update velocities at the bottom.
+      ! J. Chanut: The bottom stress is computed considering after barotropic velocities, which does 
+      !            not lead to the effective stress seen over the whole barotropic loop. 
+      IF ( ln_bfrimp .AND.ln_dynspg_ts ) THEN
          ! remove barotropic velocities:
          DO jk = 1, jpkm1
@@ -166,7 +166,6 @@
          END IF
       ENDIF
-#endif
-
-      ! 2. Vertical diffusion on u
+
+      ! 3. Vertical diffusion on u
       ! ---------------------------
       ! Matrix and second member construction
@@ -219,13 +218,7 @@
       DO jj = 2, jpjm1        !==  second recurrence:    SOLk = RHSk - Lk / Dk-1  Lk-1  ==
          DO ji = fs_2, fs_jpim1   ! vector opt.
-#if defined key_dynspg_ts
             ze3ua =  ( 1._wp - r_vvl ) * fse3u_n(ji,jj,1) + r_vvl   * fse3u_a(ji,jj,1) 
             ua(ji,jj,1) = ua(ji,jj,1) + p2dt * 0.5_wp * ( utau_b(ji,jj) + utau(ji,jj) )   &
                &                                      / ( ze3ua * rau0 ) * umask(ji,jj,1) 
-#else
-            ua(ji,jj,1) = ub(ji,jj,1) &
-               &                   + p2dt *(ua(ji,jj,1) +  0.5_wp * ( utau_b(ji,jj) + utau(ji,jj) )   &
-               &                                      / ( fse3u(ji,jj,1) * rau0     ) * umask(ji,jj,1) ) 
-#endif
          END DO
       END DO
@@ -233,9 +226,5 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1
-#if defined key_dynspg_ts
                zrhs = ua(ji,jj,jk)   ! zrhs=right hand side
-#else
-               zrhs = ub(ji,jj,jk) + p2dt * ua(ji,jj,jk)
-#endif
                ua(ji,jj,jk) = zrhs - zwi(ji,jj,jk) / zwd(ji,jj,jk-1) * ua(ji,jj,jk-1)
             END DO
@@ -256,16 +245,5 @@
       END DO
 
-#if ! defined key_dynspg_ts
-      ! Normalization to obtain the general momentum trend ua
-      DO jk = 1, jpkm1
-         DO jj = 2, jpjm1   
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               ua(ji,jj,jk) = ( ua(ji,jj,jk) - ub(ji,jj,jk) ) * z1_p2dt
-            END DO
-         END DO
-      END DO
-#endif
-
-      ! 3. Vertical diffusion on v
+      ! 4. Vertical diffusion on v
       ! ---------------------------
       ! Matrix and second member construction
@@ -317,14 +295,8 @@
       !
       DO jj = 2, jpjm1        !==  second recurrence:    SOLk = RHSk - Lk / Dk-1  Lk-1  ==
-         DO ji = fs_2, fs_jpim1   ! vector opt.
-#if defined key_dynspg_ts            
+         DO ji = fs_2, fs_jpim1   ! vector opt.          
             ze3va =  ( 1._wp - r_vvl ) * fse3v_n(ji,jj,1) + r_vvl   * fse3v_a(ji,jj,1) 
             va(ji,jj,1) = va(ji,jj,1) + p2dt * 0.5_wp * ( vtau_b(ji,jj) + vtau(ji,jj) )   &
                &                                      / ( ze3va * rau0 ) 
-#else
-            va(ji,jj,1) = vb(ji,jj,1) &
-               &                   + p2dt *(va(ji,jj,1) +  0.5_wp * ( vtau_b(ji,jj) + vtau(ji,jj) )   &
-               &                                                       / ( fse3v(ji,jj,1) * rau0     )  )
-#endif
          END DO
       END DO
@@ -332,9 +304,5 @@
          DO jj = 2, jpjm1
             DO ji = fs_2, fs_jpim1   ! vector opt.
-#if defined key_dynspg_ts
                zrhs = va(ji,jj,jk)   ! zrhs=right hand side
-#else
-               zrhs = vb(ji,jj,jk) + p2dt * va(ji,jj,jk)
-#endif
                va(ji,jj,jk) = zrhs - zwi(ji,jj,jk) / zwd(ji,jj,jk-1) * va(ji,jj,jk-1)
             END DO
@@ -355,17 +323,6 @@
       END DO
 
-      ! Normalization to obtain the general momentum trend va
-#if ! defined key_dynspg_ts
-      DO jk = 1, jpkm1
-         DO jj = 2, jpjm1   
-            DO ji = fs_2, fs_jpim1   ! vector opt.
-               va(ji,jj,jk) = ( va(ji,jj,jk) - vb(ji,jj,jk) ) * z1_p2dt
-            END DO
-         END DO
-      END DO
-#endif
-
       ! J. Chanut: Lines below are useless ?
-      !! restore bottom layer avmu(v) 
+      !! restore avmu(v)=0. at bottom (and top if ln_isfcav=T interfaces)
       IF( ln_bfrimp ) THEN
         DO jj = 2, jpjm1
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/DYN/sshwzv.F90	(revision 6138)
@@ -110,17 +110,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
@@ -254,9 +254,6 @@
       ENDIF
 
-# if defined key_dynspg_ts
-      IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ln_bt_fw ) THEN    !** Euler time-stepping: no filter
-# else
-      IF ( neuler == 0 .AND. kt == nit000 ) THEN   !** Euler time-stepping at first time-step : no filter
-#endif
+      IF( ( neuler == 0 .AND. kt == nit000 ) .OR. ( ln_bt_fw .AND. ln_dynspg_ts ) ) THEN 
+                                                   !** Euler time-stepping: no filter
          sshb(:,:) = sshn(:,:)                           ! before <-- now
          sshn(:,:) = ssha(:,:)                           ! now    <-- after  (before already = now)
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 6138)
@@ -12,5 +12,4 @@
    USE dom_oce         ! ocean space and time domain
    USE sbc_oce         ! surface boundary condition
-   USE dynspg_oce      ! surface pressure gradient variables
    USE phycst          ! physical constants
    USE fldread         ! read input fields
@@ -112,6 +111,5 @@
             IF(lwp) WRITE(numout,*) '         Inverse barometer added to OBC ssh data'
          ENDIF
-         IF( ( ln_apr_obc ) .AND. .NOT. lk_dynspg_ts )   &
-            CALL ctl_stop( 'sbc_apr: use inverse barometer ssh at open boundary ONLY possible with time-splitting' )
+!jc: stop below should rather be a warning 
          IF( ( ln_apr_obc ) .AND. .NOT. ln_apr_dyn   )   &
             CALL ctl_stop( 'sbc_apr: use inverse barometer ssh at open boundary ONLY requires ln_apr_dyn=T' )
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbctide.F90	(revision 6138)
@@ -10,5 +10,4 @@
    USE phycst
    USE daymod
-   USE dynspg_oce
    USE tideini
    !
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 6138)
@@ -10,5 +10,4 @@
    USE phycst
    USE daymod
-   USE dynspg_oce
    USE tide_mod
    !
@@ -96,5 +95,4 @@
           &   CALL ctl_stop('rdttideramp must be positive')
        !
-       IF( .NOT. lk_dynspg_ts )   CALL ctl_warn( 'sbc_tide : use of time splitting is recommended' )
        !
        ALLOCATE( ntide(nb_harmo) )
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/SBC/updtide.F90	(revision 6138)
@@ -31,5 +31,5 @@
 CONTAINS
 
-   SUBROUTINE upd_tide( kt, kit, kbaro, koffset )
+   SUBROUTINE upd_tide( kt, kit, time_offset )
       !!----------------------------------------------------------------------
       !!                 ***  ROUTINE upd_tide  ***
@@ -42,8 +42,8 @@
       !!----------------------------------------------------------------------      
       INTEGER, INTENT(in)           ::   kt      ! ocean time-step index
-      INTEGER, INTENT(in), OPTIONAL ::   kit     ! external mode sub-time-step index (lk_dynspg_ts=T only)
-      INTEGER, INTENT(in), OPTIONAL ::   kbaro   ! number of sub-time-step           (lk_dynspg_ts=T only)
-      INTEGER, INTENT(in), OPTIONAL ::   koffset ! time offset in number 
-                                                 ! of sub-time-steps                 (lk_dynspg_ts=T only)
+      INTEGER, INTENT(in), OPTIONAL ::   kit     ! external mode sub-time-step index (lk_dynspg_ts=T)
+      INTEGER, INTENT(in), OPTIONAL ::   time_offset ! time offset in number 
+                                                     ! of internal steps             (lk_dynspg_ts=F)
+                                                     ! of external steps             (lk_dynspg_ts=T)
       !
       INTEGER  ::   joffset      ! local integer
@@ -57,8 +57,8 @@
       !
       joffset = 0
-      IF( PRESENT( koffset ) )   joffset = koffset
+      IF( PRESENT( time_offset ) )   joffset = time_offset
       !
-      IF( PRESENT( kit ) .AND. PRESENT( kbaro ) )   THEN
-         zt = zt + ( kit + 0.5_wp * ( joffset - 1 ) ) * rdt / REAL( kbaro, wp )
+      IF( PRESENT( kit ) )   THEN
+         zt = zt + ( kit +  joffset - 1 ) * rdt / REAL( nn_baro, wp )
       ELSE
          zt = zt + joffset * rdt
@@ -74,5 +74,5 @@
       IF( ln_tide_ramp ) THEN         ! linear increase if asked
          zt = ( kt - nit000 ) * rdt
-         IF( PRESENT( kit ) .AND. PRESENT( kbaro ) )   zt = zt + kit * rdt / REAL( kbaro, wp )
+         IF( PRESENT( kit ) )   zt = zt + ( kit + joffset -1) * rdt / REAL( nn_baro, wp )
          zramp = MIN(  MAX( zt / (rdttideramp*rday) , 0._wp ) , 1._wp  )
          pot_astro(:,:) = zramp * pot_astro(:,:)
@@ -86,9 +86,8 @@
   !!----------------------------------------------------------------------
 CONTAINS
-  SUBROUTINE upd_tide( kt, kit, kbaro, koffset )          ! Empty routine
+  SUBROUTINE upd_tide( kt, kit, time_offset )  ! Empty routine
     INTEGER, INTENT(in)           ::   kt      !  integer  arg, dummy routine
     INTEGER, INTENT(in), OPTIONAL ::   kit     !  optional arg, dummy routine
-    INTEGER, INTENT(in), OPTIONAL ::   kbaro   !  optional arg, dummy routine
-    INTEGER, INTENT(in), OPTIONAL ::   koffset !  optional arg, dummy routine
+    INTEGER, INTENT(in), OPTIONAL ::   time_offset !  optional arg, dummy routine
     WRITE(*,*) 'upd_tide: You should not have seen this print! error?', kt
   END SUBROUTINE upd_tide
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_fct.F90	(revision 6138)
@@ -19,5 +19,4 @@
    USE trd_oce        ! trends: ocean variables
    USE trdtra         ! tracers trends
-   USE dynspg_oce     ! choice/control of key cpp for surface pressure gradient
    USE diaptr         ! poleward transport diagnostics
    !
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mus.F90	(revision 6138)
@@ -21,5 +21,4 @@
    USE trd_oce        ! trends: ocean variables
    USE trdtra         ! tracers trends manager
-   USE dynspg_oce     ! choice/control of key cpp for surface pressure gradient
    USE sbcrnf         ! river runoffs
    USE diaptr         ! poleward transport diagnostics
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 6138)
@@ -20,5 +20,4 @@
    USE trd_oce         ! trends: ocean variables
    USE trdtra          ! trends manager: tracers 
-   USE dynspg_oce      ! surface pressure gradient variables
    USE diaptr          ! poleward transport diagnostics
    !
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 6138)
@@ -18,5 +18,4 @@
    USE traadv_fct      ! acces to routine interp_4th_cpt 
    USE trdtra         ! trends manager: tracers 
-   USE dynspg_oce     ! choice/control of key cpp for surface pressure gradient
    USE diaptr         ! poleward transport diagnostics
    !
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90	(revision 6138)
@@ -18,5 +18,4 @@
    USE zdf_oce         ! ocean vertical physics variables
    USE sbc_oce         ! surface boundary condition: ocean
-   USE dynspg_oce
    !
    USE ldftra          ! lateral diffusion: eddy diffusivity
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/oce.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/oce.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/oce.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/step_oce.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/step_oce.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/stpctl.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/OPA_SRC/stpctl.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/SAS_SRC/diawri.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/SAS_SRC/diawri.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/SETTE/sette.sh
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/SETTE/sette.sh	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/SETTE/sette.sh	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/batch/X64_ADA.sh
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/batch/X64_ADA.sh	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/batch/X64_ADA.sh	(revision 6138)
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# Nom de la requete
+# @ job_name = NEMO_CI
+# Type de travail
+# @ job_type = parallel
+# Fichier de sortie standard
+# @ output = $(job_name)_$(jobid)
+# Fichier de sortie erreur
+# @ error  = $(job_name)_$(jobid)
+# Nombre de processus demande
+# @ total_tasks = 32
+# Temps CPU max. par processus MPI hh:mm:ss
+# @ wall_clock_limit = 0:30:00
+# Fin de l entete
+# @ queue
+
+cd $LOADL_STEP_INITDIR
+
+# running the job in parallel mode
+poe ./opa
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/batch/X64_CURIE.sh
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/batch/X64_CURIE.sh	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/batch/X64_CURIE.sh	(revision 6138)
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+#Config ccc_msub
+#MSUB -A  gen7451
+#MSUB -r  NEMO_CI
+#MSUB -o  NEMO_CI_%I
+#MSUB -e  NEMO_CI_%I
+#MSUB -oe
+#MSUB -q  xlarge
+#MSUB -n  128
+#MSUB -N  1
+#MSUB -T  1800
+##MSUB -@  ntmlod@locean-ipsl.upmc.fr:begin,end
+ccc_mprun ./opa
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/X64_ADA.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/X64_ADA.cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/X64_ADA.cfg	(revision 6138)
@@ -0,0 +1,34 @@
+## Ada configuration
+##---------------------------------------------------
+
+
+## Default settings
+##---------------------------------------------------
+TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC}
+
+TRUS_CDOD='cdo diffn'
+
+[ -z "${TRUS_NPRO}" ] && TRUS_NPRO='16'
+[ -z "${TRUS_TOUT}" ] && TRUS_TOUT='10800'
+
+
+## (Super)computer environment
+##---------------------------------------------------
+TRUS_JSPT=${TRUS_HPCC}.sh
+TRUS_JSUB="llsubmit ${TRUS_JSPT} | grep -oe '\<[0-9]*\>'"
+TRUS_JINF="llq -x \${TRUS_JIDN}"
+TRUS_JSTA="llq      | grep \${TRUS_JIDN}"
+TRUS_JKIL="llcancel        \${TRUS_JIDN}"
+
+TRUS_JTIM="grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}'"
+TRUS_JPME="grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f3 | awk '{print \$3     ,\$4 }'"
+TRUS_JVME="grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f2 | awk '{print \$3     ,\$4 }'"
+
+TRUS_CMPV='ifort'
+TRUS_CDOR='cdo/'
+TRUS_MPIR='intel/impi/'
+TRUS_CDFR='netcdf/'
+
+PATH='/smplocal/pub/cdo/1.5.9/bin':$PATH
+## Not working with module delimiter ':'
+#WRAPPER_LDFLAGS='-L/smplocal/pub/IdrMemMPI/1.4/lib -lidrmem '${WRAPPER_LDFLAGS}
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/X64_CURIE.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/X64_CURIE.cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/X64_CURIE.cfg	(revision 6138)
@@ -0,0 +1,32 @@
+## Curie configuration
+##---------------------------------------------------
+
+
+## Default settings
+##---------------------------------------------------
+TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC}
+
+TRUS_CDOD='cdo diffn'
+
+[ -z "${TRUS_NPRO}" ] && TRUS_NPRO='16'
+[ -z "${TRUS_TOUT}" ] && TRUS_TOUT='10800'
+
+
+## (Super)computer environment
+##---------------------------------------------------
+TRUS_JSPT=${TRUS_HPCC}.sh
+TRUS_JSUB="ccc_msub ${TRUS_JSPT} | grep -oe '\<[0-9]*\>'"
+TRUS_JINF="ccc_macct \${TRUS_JIDN}"
+TRUS_JSTA="ccc_mpp  | grep \${TRUS_JIDN}"
+TRUS_JKIL="ccc_mdel        \${TRUS_JIDN}"
+
+TRUS_JTIM="ccc_macct \${TRUS_JIDN} | grep     \"\${TRUS_JIDN}.0 *opa\" | awk '{print               \$9      }'"
+TRUS_JPME="ccc_macct \${TRUS_JIDN} | grep -m1 \"\${TRUS_JIDN}.0\"      | awk '{printf \"%d Mo\n\", \$2; exit}'"
+TRUS_JVME="ccc_macct \${TRUS_JIDN} | grep -m1 \"\${TRUS_JIDN}.0\"      | awk '{printf \"%d Go\n\", \$7; exit}'"
+
+TRUS_CMPV='ifort'
+TRUS_CDOR='netcdf-utils-'
+TRUS_MPIR='bullxmpi/'
+TRUS_CDFR='netcdf-'
+
+PATH='/usr/local/netcdf-utils-4.3.3.1_hdf5/bin':$PATH
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/arch_template.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/arch_template.cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/arch_template.cfg	(revision 6138)
@@ -0,0 +1,50 @@
+## (Super)Computer configuration template
+##---------------------------------------------------
+
+## Copy to root, rename it and then fill in according to your (super)computer environment
+## Rules for completion: undefined variables (=) are mandatory & void variables (='') are optional
+## Look into other configuration file for examples
+
+
+## Default settings
+##---------------------------------------------------
+# (Super)Computer environment (${TRUS_XIOS} is already defined in the user configuration file)
+TRUS_ENVI=${TRUS_XIOS}/arch/arch-${TRUS_HPCC}
+## If `module` is available, ${TRUS_ENVI}.env will be sourced
+## If not (scheduled jobs), it will be ${TRUS_ENVI}.path or finally ${TRUS_ENVI}
+
+## Comparison command with restart files as argument (think to append $PATH by any way)
+TRUS_CDOD='cdo diffn'
+
+[ -z "${TRUS_NPRO}" ] && TRUS_NPRO=     ## Number of compiling processes
+[ -z "${TRUS_TOUT}" ] && TRUS_TOUT=     ## Timeout for computation (s)
+
+
+## (Super)computer environment
+##---------------------------------------------------
+## Job commands will almost always be used with `eval ${TRUS_JXXX}` because
+## they will certainly need job ID number as argument for working
+TRUS_JSPT=       ## Submission script contained ./batch folder, will be copied to testing folder
+TRUS_JSUB=	 ## Submit a job and get his ID on the fly (assigned to ${TRUS_JIDN})
+        	   ## ex: `llsubmit ${TRUS_JSPT} | grep -oe '\<[0-9]*\>'`
+TRUS_JSTA=   	 ## Test state of the submitted job (true -> pending/running or false -> completed/crashed)
+                   ## ex: "llq | grep \${TRUS_JIDN}"
+TRUS_JKIL=   	 ## Kill the submitted job
+                   ## ex: "llcancel   \${TRUS_JIDN}"
+
+## Computational performances of job (respectively elapsed time, max physical & virtual memory)
+TRUS_JTIM=''       ## ex: "grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f1 | awk '{print \$(NF-1),\$NF}"
+TRUS_JPME=''       ## ex: "grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f3 | awk '{print \$3     ,\$4 }"
+TRUS_JVME=''       ## ex: "grep IdrisMemMPI NEMO_CI_\${TRUS_JIDN} | cut -d, -f2 | awk '{print \$3     ,\$4 }"
+
+TRUS_JINF=''   	 ## Get job informations to fill in a logfile during computation
+                   ## ex: "llq -x \${TRUS_JIDN}"
+
+## Compiler (use with `${TRUS_CMPV} --version`)
+TRUS_CMPV=''       ## ex: 'ifort'|'gfortran'|'pgfortran'|...
+
+## Software/libraries (string pattern to match just before the release number in $PATH)
+## Respectively CDO (Climate Data Operators) / MPI libraries / NetCDF libraries
+TRUS_CDOR=''       ## ex: 'cdo/'|'netcdf-utils-'
+TRUS_MPIR=''       ## ex: 'intel/impi/'|'bullxmpi/'
+TRUS_CDFR=''       ## ex: 'netcdf/'|'netcdf-'
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/martin.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/martin.cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/martin.cfg	(revision 6138)
@@ -0,0 +1,35 @@
+## Installation for trusting tests on Curie Supercomputer
+##---------------------------------------------------
+
+
+## Default settings
+##---------------------------------------------------
+[ -z "${TRUS_BRAN}" ] && TRUS_BRAN='trunk'
+TRUS_CKOT=( 'ARCH           CONFIG          NEMO               \
+             EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL    \
+             TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO  ' )
+
+[ -z "${TRUS_REFE}" ] && TRUS_REFE='ORCA2_LIM_PISCES'
+TRUS_CONF=${TRUS_REFE}'_trust'
+
+[ -z "${TRUS_TARF}" ] && TRUS_TARF='ORCA2_LIM_nemo_v3.6.tar'
+[ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TARF='INPUTS_ORCA1_LIM3_PISCES_V6.tar'
+[ ${TRUS_REFE} == 'AMM12'             ] && TRUS_TARF='AMM12_v3.6.tar'
+
+TRUS_KEYA=''; TRUS_KEYD=''
+[ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_KEYA='key_add key_agrif' && TRUS_KEYD='key_del key_zdftmx'
+
+
+## User environment
+##---------------------------------------------------
+TRUS_WORK=$CCCWORKDIR/NEMO
+TRUS_SCRA=$SCRATCHDIR/NEMO/trusting/${TRUS_REFE}/${TRUS_BRAN}/${DATE}
+TRUS_STOR=$CCCSTOREDIR/NEMO/trusting_sav/${TRUS_REFE}/${TRUS_BRAN}
+TRUS_FORC=$CCCWORKDIR/NEMO/FORC
+TRUS_XIOS=$CCCWORKDIR/XIOS/xios-1.0
+
+[ ${TRUS_REFE} == 'ORCA2_LIM_PISCES'  ] && TRUS_CONF='O2LP_trust'
+[ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_CONF='O1L3P_trust'
+[ ${TRUS_REFE} == 'ORCA2_LIM'         ] && TRUS_CONF='O2LA_trust'
+
+[ -z "${TRUS_MAIL}" ] && TRUS_MAIL='ntmlod@locean-ipsl.upmc.fr'
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/romr005.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/romr005.cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/romr005.cfg	(revision 6138)
@@ -0,0 +1,35 @@
+## Installation for trusting tests on Ada Supercomputer
+##---------------------------------------------------
+
+
+## Default settings
+##---------------------------------------------------
+[ -z "${TRUS_BRAN}" ] && TRUS_BRAN='trunk'
+TRUS_CKOT=( 'ARCH           CONFIG          NEMO               \
+             EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL    \
+             TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO  ' )
+
+[ -z "${TRUS_REFE}" ] && TRUS_REFE='ORCA2_LIM_PISCES'
+TRUS_CONF=${TRUS_REFE}'_trust'
+
+[ -z "${TRUS_TARF}" ] && TRUS_TARF='ORCA2_LIM_nemo_v3.6.tar'
+[ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TARF='INPUTS_ORCA1_LIM3_PISCES_V6.tar'
+[ ${TRUS_REFE} == 'AMM12'             ] && TRUS_TARF='AMM12_v3.6.tar'
+
+TRUS_KEYA=''; TRUS_KEYD=''
+[ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_KEYA='key_add key_agrif' && TRUS_KEYD='key_del key_zdftmx'
+
+
+## User environment
+##---------------------------------------------------
+TRUS_WORK=$WORKDIR/NEMO
+TRUS_SCRA=$WORKDIR/NEMO/trusting/${TRUS_REFE}/${TRUS_BRAN}/${DATE}
+TRUS_STOR=$WORKDIR/NEMO/trusting_sav/${TRUS_REFE}/${TRUS_BRAN}
+TRUS_FORC=$WORKDIR/NEMO/FORC
+TRUS_XIOS=$WORKDIR/XIOS/xios-1.0
+
+[ ${TRUS_REFE} == 'ORCA2_LIM_PISCES'  ] && TRUS_CONF='O2LP_trust'
+[ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_CONF='O1L3P_trust'
+[ ${TRUS_REFE} == 'ORCA2_LIM'         ] && TRUS_CONF='O2LA_trust'
+
+[ -z "${TRUS_MAIL}" ] && TRUS_MAIL='ntmlod@locean-ipsl.upmc.fr'
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/user_template.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/user_template.cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/config/user_template.cfg	(revision 6138)
@@ -0,0 +1,49 @@
+## User configuration template
+##---------------------------------------------------
+
+## Copy to root, rename it and then fill in according to your user environment
+## Rules for completion: undefined variables (=) are mandatory & void variables (='') are optional
+## Look into other configuration file for examples
+
+
+## Default settings
+##---------------------------------------------------
+## These settings can be changed directly from command line to reduce number of user configuration file
+## See `./trusting.sh [-h|--help]`
+
+## SVN branch name ('trunk', 'nemo_v3_6_STABLE', development branches)
+[ -z "${TRUS_BRAN}" ] && TRUS_BRAN='trunk'
+
+## Minimal content for code checkout/update
+TRUS_CKOT=( 'ARCH           CONFIG          NEMO               \
+             EXTERNAL/AGRIF EXTERNAL/fcm    EXTERNAL/IOIPSL    \
+             TOOLS/COMPILE  TOOLS/maketools TOOLS/REBUILD_NEMO  ' )
+
+[ -z "${TRUS_REFE}" ] && TRUS_REFE='ORCA2_LIM_PISCES'     ## Reference configuration to test
+TRUS_CONF=${TRUS_REFE}'_trust'                            ## Testing configuration name
+
+## Forcing archive, let void if just need to copy the files inside ${TRUS_FORC}
+[ -z "${TRUS_TARF}" ] && TRUS_TARF='ORCA2_LIM_nemo_v3.6.tar'
+[ ${TRUS_REFE} == 'ORCA1_LIM3_PISCES' ] && TRUS_TARF='INPUTS_ORCA1_LIM3_PISCES_V6.tar'
+[ ${TRUS_REFE} == 'AMM12'             ] && TRUS_TARF='AMM12_v3.6.tar'
+
+## CPP keys to add or remove from reference configuration
+TRUS_KEYA=''; TRUS_KEYD=''
+[ ${TRUS_REFE} == 'ORCA2_LIM' ] && TRUS_KEYA='key_add key_agrif' && TRUS_KEYD='key_del key_zdftmx'
+
+
+## User environment
+##---------------------------------------------------
+TRUS_WORK=     ## Testing folder for compilation (branches checkouts & configuration compilation)
+TRUS_SCRA=     ##   " "     ""   " " computation
+                 ## ...../${TRUS_REFE}/${TRUS_BRAN}/${DATE} recommended
+TRUS_STOR=     ## Benchmark folder where target files for comparison have been stored, ie:
+               ## Inputs  (all) : CPP_*, namelist_*, *.xml et inputs_list.txt (created by initial test)
+               ## Outputs (any) : *.stat, ocean.output, restarts
+                 ## ...../${TRUS_REFE}/${TRUS_BRAN} recommended (same layout as ${TRUS_SCRA})
+TRUS_FORC=     ## Path to the forcing archive to extract (usage combined with ${TRUS_TARF}) or
+               ##    ""   all inputs files who will be copied into ${TRUS_SCRA}
+TRUS_XIOS=     ## XIOS installation
+
+## Mailing list to notify on failure (-p|--prod option required)
+[ -z "${TRUS_MAIL}" ] && TRUS_MAIL=''
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/cron/ada.env
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/cron/ada.env	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/cron/ada.env	(revision 6138)
@@ -0,0 +1,53 @@
+## Set Ada environment for trusting scheduled job
+
+## Equivalent of source arch-X64_ADA.env with module commands
+PATH='/smplocal/intel/composer_xe_2013.1.117/bin/intel64:/smplocal/intel/composer_xe_2013.1.117/bin/intel64_mic:/smplocal/intel/composer_xe_2013.1.117/debugger/gui/intel64:/smplocal/intel/composer_xe_2013.1.117/bin/intel64:/smplocal/intel/composer_xe_2013.1.117/mpirt/bin/intel64:/smplocal/intel/impi/4.1.0.024/intel64/bin:/smplocal/pub/Modules/IDRIS/wrappers:/smplocal/pub/NetCDF/4.1.3/mpi/bin':$PATH
+LD_LIBRARY_PATH='/smplocal/intel/composer_xe_2013.1.117/compiler/lib/intel64:/smplocal/intel/composer_xe_2013.1.117/mkl/lib/intel64:/smplocal/intel/composer_xe_2013.1.117/compiler/lib/intel64:/smplocal/intel/composer_xe_2013.1.117/mpirt/lib/intel64:/smplocal/intel/composer_xe_2013.1.117/ipp/../compiler/lib/intel64:/smplocal/intel/composer_xe_2013.1.117/ipp/lib/intel64:/smplocal/intel/composer_xe_2013.1.117/tbb/lib/intel64:/smplocal/intel/impi/4.1.0.024/intel64/lib':${LD_LIBRARY_PATH}
+INCLUDE='/smplocal/intel/composer_xe_2013.1.117/mkl/include':$INCLUDE
+
+## Wrapper flags
+WRAPPER_CXXFLAGS='-I/smplocal/pub/NetCDF/4.1.3/mpi/include'
+WRAPPER_FFLAGS='-I/smplocal/pub/NetCDF/4.1.3/mpi/include'
+WRAPPER_LDFLAGS='-L/smplocal/pub/NetCDF/4.1.3/mpi/lib -Bstatic -lnetcdff -lnetcdf -lnetcdf_c++ -Bdynamic -L/smplocal/pub/HDF5/1.8.9/par/lib -Bstatic -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz'
+
+## IDRIS files systems (no need with `at`)
+#WORKDIR=/workgpfs/rech/omr/$USER
+#COMMONDIR=/workgpfs/rech/omr/commun
+#TMPDIR=
+
+## Intel license
+INTEL_LICENSE_FILE='/smplocal/intel/composer_xe_2013.1.117/licenses:/smplocal/intel/licenses:/linkhome/rech/omr/romr005/intel/licenses'
+
+## Trusting
+TRUS_HPCC='X64_ADA'
+
+## Export to environment
+export PATH LD_LIBRARY_PATH INCLUDE
+export WRAPPER_CXXFLAGS WRAPPER_FFLAGS WRAPPER_LDFLAGS
+#export WORKDIR COMMONDIR TMPDIR
+export INTEL_LICENSE_FILE
+export TRUS_HPCC
+
+
+#-------------------------------------------------------------------
+#/smplocal/pub/Modules/IDRIS/modulefiles/environnement/intel/2013.0:
+#prepend-path	 PATH               /smplocal/intel/composer_xe_2013.1.117/bin/intel64:/smplocal/intel/composer_xe_2013.1.117/bin/intel64_mic:/smplocal/intel/composer_xe_2013.1.117/debugger/gui/intel64 
+#prepend-path	 PATH               /smplocal/intel/composer_xe_2013.1.117/bin/intel64:/smplocal/intel/composer_xe_2013.1.117/mpirt/bin/intel64 
+#prepend-path	 PATH               /smplocal/intel/impi/4.1.0.024/intel64/bin 
+#prepend-path	 PATH               /smplocal/pub/Modules/IDRIS/wrappers 
+#prepend-path	 LD_LIBRARY_PATH    /smplocal/intel/composer_xe_2013.1.117/tbb/lib/intel64 
+#prepend-path	 LD_LIBRARY_PATH    /smplocal/intel/composer_xe_2013.1.117/compiler/lib/intel64:/smplocal/intel/composer_xe_2013.1.117/mkl/lib/intel64 
+#prepend-path	 LD_LIBRARY_PATH    /smplocal/intel/composer_xe_2013.1.117/ipp/../compiler/lib/intel64:/smplocal/intel/composer_xe_2013.1.117/ipp/lib/intel64 
+#prepend-path	 LD_LIBRARY_PATH    /smplocal/intel/composer_xe_2013.1.117/compiler/lib/intel64:/smplocal/intel/composer_xe_2013.1.117/mpirt/lib/intel64 
+#prepend-path	 LD_LIBRARY_PATH    /smplocal/intel/impi/4.1.0.024/intel64/lib 
+#prepend-path	 INCLUDE            /smplocal/intel/composer_xe_2013.1.117/mkl/include 
+#append-path	 INTEL_LICENSE_FILE /smplocal/intel/composer_xe_2013.1.117/licenses:/smplocal/intel/licenses:/linkhome/rech/omr/romr005/intel/licenses 
+#-------------------------------------------------------------------
+#-------------------------------------------------------------------
+#/smplocal/pub/Modules/IDRIS/modulefiles/bibliotheques/netcdf/mpi/4.1.3:
+#prepend-path	 PATH               /smplocal/pub/NetCDF/4.1.3/mpi/bin 
+#prepend-path	 PATH               /smplocal/pub/Modules/IDRIS/wrappers 
+#prepend-path	 WRAPPER_FFLAGS     -I/smplocal/pub/NetCDF/4.1.3/mpi/include 
+#prepend-path	 WRAPPER_CXXFLAGS   -I/smplocal/pub/NetCDF/4.1.3/mpi/include 
+#prepend-path	 WRAPPER_LDFLAGS    -L/smplocal/pub/NetCDF/4.1.3/mpi/lib -Bstatic -lnetcdff -lnetcdf -lnetcdf_c++ -Bdynamic -L/smplocal/pub/HDF5/1.8.9/par/lib -Bstatic -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz
+#-------------------------------------------------------------------
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/cron/curie.env
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/cron/curie.env	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/cron/curie.env	(revision 6138)
@@ -0,0 +1,74 @@
+## Set Curie environment for trusting scheduled job
+
+## Equivalent of source arch-X64_CURIE.env with module commands
+PATH='/usr/local/ccc_users_env/bin:/opt/intel/14.0.3.174/bin/intel64:/opt/mpi/bullxmpi/1.2.8.2/bin:/usr/local/netcdf-4.3.3.1_hdf5_parallel/bin:/ccc/cont003/home/dsm/p86ipsl/bin':$PATH
+LD_LIBRARY_PATH='/lib64:/lib:/usr/lib64:/usr/lib:/opt/intel/14.0.3.174/compiler/lib/intel64:/usr/local/intel-14.0.3.174/14.0.3.174/mkl/lib/intel64:/opt/intel/14.0.3.174/debugger/lib/intel64:/opt/mpi/bullxmpi/1.2.8.2/lib:/usr/local/netcdf-4.3.3.1_hdf5_parallel/lib':${LD_LIBRARY_PATH}
+
+## NetCDF installation
+NETCDF_INCDIR='/usr/local/netcdf-4.3.3.1_hdf5_parallel/include'
+NETCDF_LDFLAGS='-L/usr/local/netcdf-4.3.3.1_hdf5_parallel/lib -lnetcdf'
+NETCDF_LIBDIR='/usr/local/netcdf-4.3.3.1_hdf5_parallel/lib'
+
+## TGCC files systems
+CCCWORKDIR=/ccc/work/cont003/gen7451/$USER
+SCRATCHDIR=/ccc/scratch/cont003/gen7451/$USER
+CCCSTOREDIR=/ccc/store/cont003/gen7451/$USER
+
+## Intel license
+LM_LICENSE_FILE='27000@licintel.ccc.cea.fr'
+
+## Trusting
+TRUS_HPCC='X64_CURIE'
+
+## Export to environment
+export PATH LD_LIBRARY_PATH
+export NETCDF_INCDIR NETCDF_LDFLAGS NETCDF_LIBDIR
+export CCCWORKDIR SCRATCHDIR CCCSTOREDIR
+export LM_LICENSE_FILE
+export TRUS_HPCC
+
+#-------------------------------------------------------------------
+#/opt/Modules/default/modulefiles/environment/ccc:
+#append-path	PATH    	/usr/local/ccc_users_env/bin
+#prepend-path	LD_LIBRARY_PATH	/lib64:/lib:/usr/lib64:/usr/lib
+#-------------------------------------------------------------------
+#-------------------------------------------------------------------
+#/opt/Modules/default/modulefiles/environment/dfldatadir/own:
+#setenv		CCCSTOREDIR	/ccc/store/cont003/gen7451/martin
+#setenv		CCCWORKDIR	/ccc/work/cont003/gen7451/martin
+#setenv		SCRATCHDIR	/ccc/scratch/cont003/gen7451/martin
+#-------------------------------------------------------------------
+#-------------------------------------------------------------------
+#/opt/Modules/default/modulefiles/environment/licsrv/intel:
+#append-path	LM_LICENSE_FILE	27000@licintel.ccc.cea.fr
+#-------------------------------------------------------------------
+#-------------------------------------------------------------------
+#/opt/Modules/default/modulefiles/compilers/intel/14.0.3.174:
+#module load	c/intel/14.0.3.174
+#prepend-path	PATH    	/opt/intel/14.0.3.174/bin/intel64
+#prepend-path	LD_LIBRARY_PATH	/opt/intel/14.0.3.174/compiler/lib/intel64
+#module load	c++/intel/14.0.3.174
+#prepend-path	PATH    	/opt/intel/14.0.3.174/bin/intel64
+#prepend-path	LD_LIBRARY_PATH	/opt/intel/14.0.3.174/compiler/lib/intel64
+#module load	fortran/intel/14.0.3.174
+#append-path	PATH    	/opt/intel/14.0.3.174/bin/intel64
+#prepend-path	LD_LIBRARY_PATH	/opt/intel/14.0.3.174/compiler/lib/intel64
+#module load	mkl/14.0.3.174
+#append-path	LD_LIBRARY_PATH	/usr/local/intel-14.0.3.174/14.0.3.174/mkl/lib/intel64
+#module load	idb/14.0.3.174
+#prepend-path	PATH    	/opt/intel/14.0.3.174/bin/intel64
+#append-path	LD_LIBRARY_PATH	/opt/intel/14.0.3.174/debugger/lib/intel64
+#-------------------------------------------------------------------
+#-------------------------------------------------------------------
+#/opt/Modules/default/modulefiles/parallel/bullxmpi/1.2.8.2:
+#prepend-path	PATH    	/opt/mpi/bullxmpi/1.2.8.2/bin
+#prepend-path	LD_LIBRARY_PATH	/opt/mpi/bullxmpi/1.2.8.2/lib
+#-------------------------------------------------------------------
+#-------------------------------------------------------------------
+#/opt/Modules/default/modulefiles/libraries/netcdf/4.3.3.1_hdf5_parallel:
+#prepend-path	PATH    	/usr/local/netcdf-4.3.3.1_hdf5_parallel/bin
+#prepend-path	LD_LIBRARY_PATH	/usr/local/netcdf-4.3.3.1_hdf5_parallel/lib
+#setenv		NETCDF_INCDIR	/usr/local/netcdf-4.3.3.1_hdf5_parallel/include
+#setenv		NETCDF_LIBDIR	/usr/local/netcdf-4.3.3.1_hdf5_parallel/lib
+#setenv		NETCDF_LDFLAGS	-L/usr/local/netcdf-4.3.3.1_hdf5_parallel/lib -lnetcdf
+#-------------------------------------------------------------------
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/banner.html
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/banner.html	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/banner.html	(revision 6138)
@@ -0,0 +1,33 @@
+<pre style="font: 2px/1px monospace;">
+@@@@@@O$$$$$$@@@@@@#$$$$$$&@#$$$$$$$$$$$$$$$&@O$$$$$$&@@@@@@@@@$$$$$$O@@@@@@@@@@@O$$%$O@@@@@@@@@@@@@
+@@@@@@?!!!!!!#@@@@@O!!!!!!#@$!!!!!!!!!!!!!!!#@%!!!!!!?&@@@@@@@$!!!!!!?@@@@@@@@&O#&&&&%??$#@@@@@@@@@@
+@@@@@@?!!!!!!?@@@@@O!!!!!!#@$!!!!!!!!!!!!!!!#@%!!!!!!!%@@@@@@O!!!!!!!?@@@@@@@O#@@&%??!!!!!$@@@@@@@@@
+@@@@@@?!!!!!!!O@@@@O!!!!!!#@$!!!!!!?????????&@%!!!!!!!!$@@@@#!!!!!!!!?@@@@@&O&@&&O$$?!!!!!!%&@@@@@@@
+@@@@@@?!!!!!!!!#@@@O!!!!!!#@$!!!!!!#&&&&&&&&@@%!!!!!!!!!$@@&?!!!!!!!!?@@@@@O&@&??&@@&O!!!!!!%@@@@@@@
+@@@@@@?!!!!!!!!?&@@O!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!!!!!O@%!!!!!!!!!?@@@@O&@@O!O@@@@&O!!!!!!$@@@@@@
+@@@@@@?!!!!!!!!!?#@O!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!!!!!!%!!!!!!!!!!?@@@&O@@$!!O&@@@@&O!!!!!!#@@@@@
+@@@@@@?!!!!!!!!!!!OO!!!!!!#@$!!!!!!$OOOOO@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@@O@&%!!!!!%#&&@&?!!!!!%@@@@@
+@@@@@@?!!!!!!!!!!!!!!!!!!!#@$!!!!!!!!!!!?@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@@O&!!!!!!%%eO&@$!!!!!!%&@@@@
+@@@@@@?!!!!!!!!!!!!!!!!!!!#@$!!!!!!!!!!!?@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@&&$!!!?$O$Oe$@@!!!!!!eO#@@@@
+@@@@@@?!!!!!!!!!!!!!!!!!!!#@$!!!!!!?%%%%$@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@O&!!!!$&$#%!#@@?!!!!!!$O@@@@
+@@@@@@?!!!!!!!!!!!!!!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@O&!!!!%?O@%&&&@$!!!!!!?O@@@@
+@@@@@@?!!!!!?#!!!!!!!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!#!!!!!!!!O?!!!!!?@@O#!!!!!!?@@@@@OO!!!!$e?O@@@@
+@@@@@@?!!!!!?@#?!!!!!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!&#!!!!!!%&?!!!!!?@@OOO?!!!%%@@@@@#?!%$#O%%$@@@@
+@@@@@@?!!!!!?@@&%!!!!!!!!!#@$!!!!!!?????????&@%!!!!!!&@O!!!!?&@?!!!!!?@@#&##%$&&&@@@@@@$%#&O!??O@@@@
+@@@@@@?!!!!!?@@@@#?!!!!!!!#@$!!!!!!!!!!!!!!!#@%!!!!!!&@@$!!!&@@?!!!!!?@@&#$&@@@@@@@@@@@?O%%?!!!#@@@@
+@@@@@@?!!!!!?@@@@@@#%!!!!!#@$!!!!!!!!!!!!!!!#@%!!!!!!&@@@$!O@@@?!!!!!?@@@O#&&@@@@@@@@@@O?!!!!!?&@@@@
+@@@@@@?!!!!!?@@@@@@@@&O$%%#@#O##&&&&&&&&##OO&@$!!!!!!&@@@@O@@@@?!!!!!?@@@O&&#&@@@@@@@@@$!!!!!!$@@@@@
+@@@@@@?!!!!!?@@@@@@@@@@@@@@&&#O$$$%%%%$$$OO#&@@&#O%?!&@@@@@@@@@?!!!!!?@@@@OOO@@@@@@@@@&!!!!!!!&@@@@@
+@@@@@@?!!!!!?@@@@@@@@@&#$%?!!!!!!!!!!!!!!!!!!!?%O#@@#@@@@@@@@@@?!!!!!?@@@@#!!%&@@@@@@@%!!!!!!O@@@@@@
+@@@@@@?!!!!!?@@@@@@#$?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%$&@@@@@@@@@?!!!!!?@@@@@#!!%@@@@@@@O!!$&$$@@@@@@@
+@@@@@@?!!!!!?@@@O%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?$#@@@@@@?!!!!!?@@@@@@O!!?@@@@@@@&&@#O@@@@@@&&
+@@@@@@?!!!?O&#$?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?$#@@@$?!!!!?@@@@@@@&%!?$#@@@@@&O#@@@@@#O&@
+@@@@@@?!?O&#%!!!!!!!!!??%%$$$OOOOOOOOOO$$%%??!!!!!!!!!!!!!!!?%O&&&O$%%@@@@@@@@@#%?%####O#@@@&#$$#@@@
+@@@@@@%O&#%!!!!!?%$O#&&@@@@@@@@@@@@@@@@@@@@@&&#O$%?!!!!!!!!!!!!!?$O&&&@@@@@@@@@@@&&&&&&&&#$%?%#@@@@@
+@@@@@@&#%!!!?$#&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&#O%?!!!!!!!!!!!!??%$OOO#######OO$%??!!?%#@@@@@@@
+@@@@@&$!?%O&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&#O$%?!!!!!!!!!!!!!!!!!!!!!!!!!?$#&@@@@@@@@@
+@@@@O?%O&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&#OO$%????!!!!!!!!??%%O#&@@@@@@@@@@@@@
+@@&$$&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&&&&&&&@@@@@@@@@@@@@@@@@@@@
+@#O&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+</pre>
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/banner.txt
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/banner.txt	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/banner.txt	(revision 6138)
@@ -0,0 +1,31 @@
+@@@@@@O$$$$$$@@@@@@#$$$$$$&@#$$$$$$$$$$$$$$$&@O$$$$$$&@@@@@@@@@$$$$$$O@@@@@@@@@@@O$$%$O@@@@@@@@@@@@@
+@@@@@@?!!!!!!#@@@@@O!!!!!!#@$!!!!!!!!!!!!!!!#@%!!!!!!?&@@@@@@@$!!!!!!?@@@@@@@@&O#&&&&%??$#@@@@@@@@@@
+@@@@@@?!!!!!!?@@@@@O!!!!!!#@$!!!!!!!!!!!!!!!#@%!!!!!!!%@@@@@@O!!!!!!!?@@@@@@@O#@@&%??!!!!!$@@@@@@@@@
+@@@@@@?!!!!!!!O@@@@O!!!!!!#@$!!!!!!?????????&@%!!!!!!!!$@@@@#!!!!!!!!?@@@@@&O&@&&O$$?!!!!!!%&@@@@@@@
+@@@@@@?!!!!!!!!#@@@O!!!!!!#@$!!!!!!#&&&&&&&&@@%!!!!!!!!!$@@&?!!!!!!!!?@@@@@O&@&??&@@&O!!!!!!%@@@@@@@
+@@@@@@?!!!!!!!!?&@@O!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!!!!!O@%!!!!!!!!!?@@@@O&@@O!O@@@@&O!!!!!!$@@@@@@
+@@@@@@?!!!!!!!!!?#@O!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!!!!!!%!!!!!!!!!!?@@@&O@@$!!O&@@@@&O!!!!!!#@@@@@
+@@@@@@?!!!!!!!!!!!OO!!!!!!#@$!!!!!!$OOOOO@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@@O@&%!!!!!%#&&@&?!!!!!%@@@@@
+@@@@@@?!!!!!!!!!!!!!!!!!!!#@$!!!!!!!!!!!?@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@@O&!!!!!!%%eO&@$!!!!!!%&@@@@
+@@@@@@?!!!!!!!!!!!!!!!!!!!#@$!!!!!!!!!!!?@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@&&$!!!?$O$Oe$@@!!!!!!eO#@@@@
+@@@@@@?!!!!!!!!!!!!!!!!!!!#@$!!!!!!?%%%%$@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@O&!!!!$&$#%!#@@?!!!!!!$O@@@@
+@@@@@@?!!!!!!!!!!!!!!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!!!!!!!!!!!!!!!!!?@@O&!!!!%?O@%&&&@$!!!!!!?O@@@@
+@@@@@@?!!!!!?#!!!!!!!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!#!!!!!!!!O?!!!!!?@@O#!!!!!!?@@@@@OO!!!!$e?O@@@@
+@@@@@@?!!!!!?@#?!!!!!!!!!!#@$!!!!!!#@@@@@@@@@@%!!!!!!&#!!!!!!%&?!!!!!?@@OOO?!!!%%@@@@@#?!%$#O%%$@@@@
+@@@@@@?!!!!!?@@&%!!!!!!!!!#@$!!!!!!?????????&@%!!!!!!&@O!!!!?&@?!!!!!?@@#&##%$&&&@@@@@@$%#&O!??O@@@@
+@@@@@@?!!!!!?@@@@#?!!!!!!!#@$!!!!!!!!!!!!!!!#@%!!!!!!&@@$!!!&@@?!!!!!?@@&#$&@@@@@@@@@@@?O%%?!!!#@@@@
+@@@@@@?!!!!!?@@@@@@#%!!!!!#@$!!!!!!!!!!!!!!!#@%!!!!!!&@@@$!O@@@?!!!!!?@@@O#&&@@@@@@@@@@O?!!!!!?&@@@@
+@@@@@@?!!!!!?@@@@@@@@&O$%%#@#O##&&&&&&&&##OO&@$!!!!!!&@@@@O@@@@?!!!!!?@@@O&&#&@@@@@@@@@$!!!!!!$@@@@@
+@@@@@@?!!!!!?@@@@@@@@@@@@@@&&#O$$$%%%%$$$OO#&@@&#O%?!&@@@@@@@@@?!!!!!?@@@@OOO@@@@@@@@@&!!!!!!!&@@@@@
+@@@@@@?!!!!!?@@@@@@@@@&#$%?!!!!!!!!!!!!!!!!!!!?%O#@@#@@@@@@@@@@?!!!!!?@@@@#!!%&@@@@@@@%!!!!!!O@@@@@@
+@@@@@@?!!!!!?@@@@@@#$?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!%$&@@@@@@@@@?!!!!!?@@@@@#!!%@@@@@@@O!!$&$$@@@@@@@
+@@@@@@?!!!!!?@@@O%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?$#@@@@@@?!!!!!?@@@@@@O!!?@@@@@@@&&@#O@@@@@@&&
+@@@@@@?!!!?O&#$?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!?$#@@@$?!!!!?@@@@@@@&%!?$#@@@@@&O#@@@@@#O&@
+@@@@@@?!?O&#%!!!!!!!!!??%%$$$OOOOOOOOOO$$%%??!!!!!!!!!!!!!!!?%O&&&O$%%@@@@@@@@@#%?%####O#@@@&#$$#@@@
+@@@@@@%O&#%!!!!!?%$O#&&@@@@@@@@@@@@@@@@@@@@@&&#O$%?!!!!!!!!!!!!!?$O&&&@@@@@@@@@@@&&&&&&&&#$%?%#@@@@@
+@@@@@@&#%!!!?$#&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&#O%?!!!!!!!!!!!!??%$OOO#######OO$%??!!?%#@@@@@@@
+@@@@@&$!?%O&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&#O$%?!!!!!!!!!!!!!!!!!!!!!!!!!?$#&@@@@@@@@@
+@@@@O?%O&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&#OO$%????!!!!!!!!??%%O#&@@@@@@@@@@@@@
+@@&$$&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&&&&&&&&@@@@@@@@@@@@@@@@@@@@
+@#O&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+&&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/svn_abstract.awk
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/svn_abstract.awk	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/svn_abstract.awk	(revision 6138)
@@ -0,0 +1,34 @@
+#!/bin/awk
+
+BEGIN{}
+
+func relative_path() { sub(/.*NEMOGCM\/[[:upper:]]*\//,//); return substr($0,2) }
+
+func array_loop(action,nb,array) {
+    if ( nb != 0 ) {
+	printf("\n%-10s: %3d\n\t",action,nb)
+	j = 0
+	for (i in array) {
+	    j += 1
+	    printf("%-45s\t",array[i])
+	    if ( j % 3 == 0 && j != nb ) { printf"\n\t" }
+	}
+    }
+}
+
+/^A[[:upper:] ]/ { acount += 1; aroutines[acount] = relative_path() }
+/^C[[:upper:] ]/ { ccount += 1; croutines[ccount] = relative_path() }
+/^D[[:upper:] ]/ { dcount += 1; droutines[dcount] = relative_path() }
+/^E[[:upper:] ]/ { ecount += 1; eroutines[ecount] = relative_path() }
+/^G[[:upper:] ]/ { gcount += 1; groutines[gcount] = relative_path() }
+/^U[[:upper:] ]/ { ucount += 1; uroutines[ucount] = relative_path() }
+
+END{
+    array_loop("added",     acount,aroutines)
+    array_loop("conflicted",ccount,croutines)
+    array_loop("deleted",   dcount,droutines)
+    array_loop("edited",    ecount,eroutines)
+    array_loop("merged",    gcount,groutines)
+    array_loop("updated",   ucount,uroutines)
+    printf "\n"
+}
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/trusting.env
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/trusting.env	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/trusting.env	(revision 6138)
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+
+## Global environment variables
+##--------------------------------------
+dat=$( date )
+export DATE=$( date -ud "$dat" +"%Y%m%d%Z%H%M" )
+export PATTERNAME=${TRUS_USER}'_'${TRUS_HPCC}
+export TRUS_SVNH='https://forge.ipsl.jussieu.fr/nemo/svn'
+
+
+## Source user configuration
+##---------------------------------------------------
+. ./config/${TRUS_USER}.cfg
+export TRUS_WORK TRUS_SCRA TRUS_STOR TRUS_XIOS TRUS_FORC
+export TRUS_BRAN TRUS_REFE
+export TRUS_CONF TRUS_TARF TRUS_KEYA TRUS_KEYD
+export TRUS_MAIL
+
+
+## Source (super)computer configuration
+##---------------------------------------------------
+. ./config/${TRUS_HPCC}.cfg
+export TRUS_ENVI TRUS_CDOD TRUS_NPRO TRUS_TOUT
+export TRUS_JSPT TRUS_JSUB TRUS_JSTA TRUS_JKIL
+export TRUS_JPME TRUS_JTIM TRUS_JVME TRUS_JINF
+export TRUS_CMPV TRUS_CDOR TRUS_MPIR TRUS_CDFR
+
+
+export TRUS_NGCM=${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/trusting_func.sh
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/trusting_func.sh	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/trusting_func.sh	(revision 6138)
@@ -0,0 +1,427 @@
+#!/bin/bash
+
+
+## Messenger filenames
+FILE_DATE=mesg_01_date_$PATTERNAME.txt  ; FILE_RSLT=mesg_02_result_$PATTERNAME.txt
+FILE_STAT=mesg_03_state_$PATTERNAME.txt ; FILE_NEMO=mesg_04_nemo_$PATTERNAME.txt
+FILE_XIOS=mesg_05_xios_$PATTERNAME.txt  ; FILE_CMPF=mesg_06_compiler_$PATTERNAME.txt
+FILE_LMPI=mesg_07_mpi_$PATTERNAME.txt   ; FILE_NCDF=mesg_08_netcdf_$PATTERNAME.txt
+FILE_INPT=mesg_09_inputs_$PATTERNAME.txt; FILE_TIME=mesg_10_time_$PATTERNAME.txt
+FILE_MEMY=mesg_11_memory_$PATTERNAME.txt; FILE_NOTE=mesg_12_comments_$PATTERNAME.txt
+
+## Trusting timestamped logfile & archive
+TRUS_FILE=trusting_${DATE}_$PATTERNAME.txt; TRUS_ARCH=trusting_${DATE}_$PATTERNAME.tgz
+
+
+## Functions in order of use
+print_step() {
+    local char_nb=$( echo "$1" | wc -c )
+    local outline=$( printf "%${char_nb}s" )
+
+    printf "\nStep.....\n%s\n%s\n" "$1" ${outline// /-}
+}
+
+init_files() {
+    echo 'Date'        	      > ${FILE_DATE}; echo 'Result'           > ${FILE_RSLT}
+    echo 'State'      	      > ${FILE_STAT}; echo 'NEMOGCM rev.'     > ${FILE_NEMO}
+    echo 'XIOS rev.'   	      > ${FILE_XIOS}; echo 'Fortran compiler' > ${FILE_CMPF}
+    echo 'MPI libs'    	      > ${FILE_LMPI}; echo 'NetCDF libs'      > ${FILE_NCDF}
+    echo 'Input files' 	      > ${FILE_INPT}; echo 'Elapsed time'     > ${FILE_TIME}
+    echo 'Memory usage (P/V)' > ${FILE_MEMY}; echo 'Comments'         > ${FILE_NOTE}
+
+    ## 'Failed' status with 'Unknown error' by default
+    echo ${TRUS_RSLT}      \
+	>> ${FILE_RSLT}
+    echo 'Unknown error' \
+	>> ${FILE_STAT}
+}
+
+get_date() {
+    ## UTC time zone for timestamping
+    local dat=$( date -ud "${DATE}" +"%F %R %Z" )
+
+    echo $dat           \
+	>> ${FILE_DATE}
+}
+
+get_nemo_rev() {
+    local dir rev_loc
+    local rev=0
+
+    ## Loop on essential NEMO directories
+    for dir in ${TRUS_CKOT} ${TRUS_XIOS}; do
+
+	## For time being, just get revision from XIOS with no action on directory
+	if [ $dir == ${TRUS_XIOS} ]; then
+	    rev_loc=$( svn info $dir | awk '/Last Changed Rev/ {print $NF}' )
+	    echo 'XIOS '${rev_loc} \
+		>> model.log
+	    echo "<a href=\"https://forge.ipsl.jussieu.fr/ioserver/changeset/${rev_loc}\" target=\"_blank\">${rev_loc}</a>" \
+		>> ${FILE_XIOS}
+	    continue
+	fi
+
+	echo $dir && ${TRUS_SVNA} ${TRUS_NGCM}/$dir
+	rev_loc=$( svn info ${TRUS_NGCM}/$dir | awk '/Last Changed Rev/ {print $NF}' )
+
+	## Keep last rev. nb
+	[ ${rev_loc} -gt $rev ] && rev=${rev_loc}
+    done
+
+    echo 'NEMOGCM '$rev \
+	>> model.log
+    echo "<a href=\"https://forge.ipsl.jussieu.fr/nemo/changeset/$rev\" target=\"_blank\">$rev</a>" \
+	>> ${FILE_NEMO}
+}
+
+get_soft_rel() {
+    local soft_rel str
+
+    ## Sourcing environment
+    if [ -n "${TRUS_ENVI}" ]; then
+	if [[  -e ${TRUS_ENVI}.env && $( declare -F | grep ' module' ) ]]; then
+            ## .env file if module function is available
+	    . ${TRUS_ENVI}.env
+	else
+            ## .path file if existing, if not the given file
+	    [ -e ${TRUS_ENVI}.path ] && . ${TRUS_ENVI}.path || . ${TRUS_ENVI}
+	fi
+    fi
+
+    ## Problem with `prepend-path` of modulefile that use ':' instead of ' ' as delimiter
+    [ $TRUS_HPCC == 'X64_ADA' ] && WRAPPER_LDFLAGS='-L/smplocal/pub/IdrMemMPI/1.4/lib -lidrmem '${WRAPPER_LDFLAGS}
+
+    for str in ${TRUS_CMPV} ${TRUS_MPIR} ${TRUS_CDFR} ${TRUS_CDOR}; do
+	[ -z "$str" ] && continue
+	soft_rel=''
+
+	## Software release: next word after "$soft" in $PATH (case-insensitive)
+	soft_rel=$( echo $PATH | sed "s#.*$str\([0-9.a-z_]*\).*#\1#i" )
+
+	## option --version would work for main compilers (gfortran, intel, pgfortran, ...)
+	[ $str == ${TRUS_CMPV} ] && soft_rel=$( $str --version | grep -m1 -oe '\<[0-9. ]*\>' )
+
+	## Cleaning characters string to display proper soft name
+	str=$( echo $str | sed 's#\\##g; s#[/-]$##' )
+
+	echo $str ${soft_rel} \
+	    >> model.log
+    done
+
+    sed -n 3p model.log \
+	>> ${FILE_CMPF}
+    sed -n 4p model.log \
+	>> ${FILE_LMPI}
+    sed -n 5p model.log \
+	>> ${FILE_NCDF}
+}
+
+get_inputs() {
+    ## Extract archive or copy files in case of personal inputs
+    [ -z "${TRUS_TARF}" ] && get_io="cp ${TRUS_FORC}/* ." || get_io="tar -vxf ${TRUS_FORC}/${TRUS_TARF}"
+
+    ${get_io} > /dev/null
+    [ $? -ne 0 ] && get_out 3 || echo 'Success'
+    [ $( find -name '*.gz' -print -quit ) ] && gunzip *.gz
+
+    ls -lh > inputs_list.txt
+}
+
+diff_inputs() {
+    local dif file
+    local files_list='' mesg='Same' 
+
+    ## Simple diff
+    for file in 'inputs_list.txt' *namelist_* *.xml cpp_*; do
+	dif=''
+
+	## Continue even if input file is not in here (see after)
+	if [ -e ${TRUS_STOR}/$file ]; then dif=$( diff -q $file ${TRUS_STOR}/$file ); else dif=0; fi
+
+	## Pass over useless file omission in benckmark directory
+	[[ -n "$dif" && "$dif" != '0' ]] && { mesg='Different'; echo $dif; files_list+=$file' '; }
+    done
+
+    [ $mesg == 'Same' ] && echo $mesg
+    echo $mesg          \
+	>> ${FILE_INPT}
+
+    ## List different files for web comment
+    [ -n "${files_list}" ] && echo 'Inputs  : '${files_list}'differ<br>' \
+	>> temp_${FILE_NOTE}
+}
+
+job_pending() {
+    local outline=$( printf "%100s" ) time_elapsed=0 time_increment=30
+
+    sleep ${time_increment}
+
+    ## Append a log file while pending
+    while [[ $( eval ${TRUS_JSTA} ) && ${time_elapsed} -lt ${TRUS_TOUT} ]]; do
+	printf "\n%s\n" ${outline// /#}          \
+	    >> computation.log
+	[ -n "${TRUS_JINF}" ] && eval ${JOB_INFO} \
+	    >> computation.log
+	sleep ${time_increment}
+	time_elapsed=$(( ${time_elapsed} + ${time_increment} ))
+    done
+
+    sleep ${time_increment}
+
+    ## Kill remaining job & stop the test if it's too long
+    [ ${time_elapsed} -eq ${TRUS_TOUT} ] && { eval ${JOB_DELE} &> /dev/null; get_out 6; }
+}
+
+diff_results() {
+    local file
+    local files_list='' mesg='Same'
+
+    ## Simple diff
+    for file in 'ocean.output' *.stat; do
+	## Stop if no benchmark files (ocean.output, eventual stat files)
+	[ ! -e ${TRUS_STOR}/$file ] && { TRUS_RSLT='FAILED'; get_out 7; }
+
+	diff -q $file ${TRUS_STOR}/$file
+
+	## Continue even if it differs
+	[ $? -ne 0 ] && { TRUS_RSLT='FAILED'; mesg='Different'; files_list+=$file' '; }
+    done
+
+    [ $mesg == 'Same' ] && echo $mesg
+
+    ## List different files for web comment
+    [ -n "${files_list}" ] && echo 'Results : '${files_list}'differ<br>' \
+	>> temp_${FILE_NOTE}
+}
+
+diff_restart() {
+    local base_name comp dif file list_comp list_tmsp nb_dom time_step tmsp
+    local files_list='' dif_sum=0
+
+    ## Stop if no benchmark files (ie time.step)
+    [ ! -e ${TRUS_STOR}/time.step ] && { TRUS_RSLT='FAILED'; get_out 7; }
+    time_step=$( cat ${TRUS_STOR}/time.step | tr -d [:space:] )
+
+    ## Find all restart files to rebuild
+    if [ $( find -regex ".*_restart.*[0-9]\.nc" -print -quit ) ]; then
+	base_name=$( find -regex ".*_restart.*[0-9]\.nc"                       \
+	             | sed "s#^\./\(.*\)_[0-9]*_restart.*#\1#"       | sort -u   )
+	list_comp=$( find -regex ".*_restart.*[0-9]\.nc"                       \
+	             | sed "s#^.*\(restart[a-z_]*\)_[0-9].*\.nc#\1#" | sort -u   )
+	list_tmsp=$( find -regex ".*_restart.*[0-9]\.nc"                       \
+	             | sed "s#^.*\([0-9]\{8\}\)_restart.*#\1#"       | sort -u   )
+
+	## Loop on each time step
+	for tmsp in ${list_tmsp}; do
+
+	    for comp in ${list_comp}; do
+		file=${base_name}_${tmsp}_${comp}
+		nb_dom=$( find -name "${file}_[0-9]*.nc" | wc -l | awk '{ print $1 }' )
+
+		if   [ ${nb_dom} -gt 1 ]; then
+		    ${TRUS_NGCM}/TOOLS/REBUILD_NEMO/rebuild_nemo -t ${TRUS_NPRO} $file ${nb_dom} \
+			> /dev/null
+
+		     ## Possibility of remaining decomposed restarts (even after rebuild)
+		    [ $? -eq 0 ] && rm -f ${file}_[0-9]*.nc \
+                        > /dev/null
+
+		elif [ ${nb_dom} -eq 0 ]; then
+		    TRUS_RSLT='FAILED' && get_out 8
+		fi
+
+		## Compare restart files at same time step
+		if [ $tmsp -eq ${time_step} ]; then
+
+                    ## Stop if no benchmark files (restart file)
+		    if [ -e ${TRUS_STOR}/$file.nc ]; then
+
+	                ## UNIX `cmp` not suitable (timestamp in .nc file)
+			dif=$( $TRUS_CDOD $file.nc ${TRUS_STOR}/$file.nc 2> /dev/null          \
+			       | awk '/records/ {print $0}' | sed '2 s/^/,/' | tr -d '\n' )
+
+			## CDO can return void stdout with no difference
+			if [[ -n "$dif" && $( echo $dif | awk '{print $1}' ) -ne 0 ]]; then
+			    TRUS_RSLT='FAILED'
+			    files_list+=$comp' ' && let dif_sum+=$( echo $dif | awk '{print $1}' )
+			    echo $file.nc': '$dif
+			fi
+
+		    else
+			TRUS_RSLT='FAILED' && get_out 7
+		    fi
+
+		else
+		    continue
+		fi
+
+	    done
+
+	done
+
+        ## List different files for web comment with sum of different records
+	if [ ${dif_sum} -ne 0 ]; then
+	    echo 'Restarts: '${files_list}${dif_sum}' record(s) differ<br>' \
+		>> temp_${FILE_NOTE}
+	else
+	    echo 'Same'
+	fi
+
+    else
+	TRUS_RSLT='FAILED'
+    fi
+
+}
+
+get_time() {
+    [ -z "${TRUS_JTIM}" ] && return
+
+    ## Interest for checking unusual time computation
+    local time_cpu=$( eval ${TRUS_JTIM} )
+
+    printf "Elapsed time: "
+    echo ${time_cpu} | tee -a ${FILE_TIME}
+}
+
+get_memy() {
+    [[ -z "${TRUS_JPME}" && -z "${TRUS_JVME}" ]] && return
+
+    ## Interest for checking unusual memory usage
+    local memory_pmax=$( eval ${TRUS_JPME} ) memory_vmax=$( eval ${TRUS_JVME} )
+
+    printf "Memory max usage (physical/virtual): "
+    echo ${memory_pmax}' / '${memory_vmax} | tee -a ${FILE_MEMY}
+}
+
+comments() {
+    local opat
+    local line='' state=$1
+
+    if [ -e ocean.output ]; then
+        ## 'W A R N I N G' pattern by default
+	opat="-A2 \"^ $state\""
+	[ "$state" == 'E R R O R' ] && opat="-A4 \"$state\""
+
+        ## Select first occurence for web comment
+	line=$( eval grep -m1 $opat ocean.output | tr -d '\n' )
+    fi
+
+    [ -n "$line" ] && ( echo $line; printf "$line<br>" \
+	>> temp_${FILE_NOTE} )
+}
+
+log_make() {
+    ## Format comments for web
+    [ -e temp_${FILE_NOTE} ] && cat temp_${FILE_NOTE} | tr -d '\n' | sed 's/<br>$//' \
+	>> ${FILE_NOTE}
+
+    ## Construct txt file with all messenger files
+    paste -d ';' mesg_*.txt | tee ${TRUS_FILE}
+}
+
+prod_publish() {
+    local cmd
+    local rev=$( awk '/NEMOGCM/ {print $NF}' model.log )
+
+    ## Production mode (-p|--prod)
+    if [ ${TRUS_PROD} -eq 1 ]; then
+
+	## Create or append trusting logfile
+	if [ -f ${TRUS_STOR}/trusting_$PATTERNAME.txt ]; then cmd='tail -1'; else cmd='cat'; fi
+
+	$cmd ${TRUS_FILE}                            \
+	    >> ${TRUS_STOR}/trusting_$PATTERNAME.txt
+
+        ## Send mail only when FAILED
+	if [[ ! -z "${TRUS_MAIL}" && ${TRUS_RSLT} == 'FAILED' ]]; then
+
+	    ## Content
+	    cat <<END_MAIL      \
+		> trusting.mail
+Dear all,
+
+
+The trusting sequence has not completed successfully on new configuration ${TRUS_CONF} based on ${TRUS_REFE}.
+
+Here is the model summary:
+`cat model.log`
+
+First checking would be on the trusting environment files:
+${TRUS_USER}.cfg & ${TRUS_HPCC}.cfg
+
+For more details, look into the testing folder at:
+${TRUS_SCRA}
+
+An archive has been created to share the questionable configuration for further studies:
+${TRUS_STOR}/${TRUS_ARCH}
+
+END_MAIL
+
+	    ## Send with detailed subject
+	    mail -s "[NEMO Trusting][$rev][${TRUS_BRAN}][${TRUS_REFE}] ${TRUS_RSLT} ${TRUS_RORR}" ${TRUS_MAIL} \
+		<  trusting.mail
+	fi
+
+    fi
+}
+
+get_out() {
+    local time_step=0
+
+    TRUS_RORR=$1
+
+    printf "\n\nEnd of test\n"
+
+    ## In case of compilation error
+    cd ${TRUS_SCRA}
+
+    if [ ${TRUS_RSLT} == 'FAILED' ]; then
+	echo 'Failure'
+
+        ## Error identification
+	case ${TRUS_RORR} in
+            ## Compilation
+	    '1') TRUS_RORR='XIOS compilation failed' ;; '2') TRUS_RORR='NEMO compilation failed';;
+	    ## Submission
+	    '3') TRUS_RORR='Missing input files'     ;; '4') TRUS_RORR='Job submission error'   ;;
+	    ## Computation
+	    '5') TRUS_RORR='Crashed at time step'    ;; '6') TRUS_RORR='Exceeded time limit'    ;;
+	    ## Results
+	    '7') TRUS_RORR='Missing previous outputs';; '8') TRUS_RORR='New outputs differ'     ;;
+	    ## Other
+	    '*') TRUS_RORR='Unknown error'           ;;
+	esac
+
+    else
+	echo 'Success' && TRUS_RORR='Code is reliable'
+    fi
+
+    ## Eventual comments from ocean.output
+    if [ "${TRUS_RORR}" == 'Crashed at time step' ]; then
+	comments 'E R R O R'
+	[ -e time.step ] && time_step=$( grep -o [0-9]* time.step )
+	TRUS_RORR+=' '$time_step
+    else
+	comments 'W A R N I N G'
+	[ "${TRUS_RORR}" == 'Exceeded time limit' ] && TRUS_RORR+=' '$(( ${TRUS_TOUT}/3600 ))'h'
+    fi
+
+    ## Last messenger files
+    #export TRUS_RORR
+    sed -i "2 s/.*/$TRUS_RSLT/" ${FILE_RSLT}; sed -i "2 s/.*/$TRUS_RORR/" ${FILE_STAT}
+
+    ## Save tested configuration if trusting failed in production mode (-p|--prod)
+    if [[ ${TRUS_RSLT} == 'FAILED' && ${TRUS_PROD} -eq 1 ]]; then
+	echo 'Creating archive '${TRUS_ARCH}' under '${TRUS_STOR}
+	tar -czf ${TRUS_STOR}/${TRUS_ARCH}               *                    \
+	    -C   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/MY_SRC .                    \
+	    -C   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}        cpp_${TRUS_CONF}.fcm
+    fi
+
+    ## Logfile construct & eventual sending of notification email
+    printf "\nTrusting digest:\n----------------\n"
+    log_make
+    prod_publish
+
+    exit 0
+}
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/trusting_help.txt
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/trusting_help.txt	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inc/trusting_help.txt	(revision 6138)
@@ -0,0 +1,42 @@
+Usage: ./trusting.sh        -u $USER -m $ARCH [OPTIONS]
+       ./install_new_branch -u $USER -m $ARCH [OPTIONS]
+
+./trusting.sh            Launch trusting test on $ARCH machine from $USER installation
+./install_new_branch     Install new branch in $USER installation for trusting test on $ARCH machine
+
+Examples: `./trusting.sh        -u romr005 -m X64_CURIE -p -b nemo_v3_6_STABLE`
+          `./install_new_branch -u romr005 -m X64_ADA   -w $HOME/NEMO         `
+
+Mandatory
+    Default settings to source in ./config, templates (arch_template.cfg & user_template.cfg)
+    -m,--machine      Architecture environment (compilation & computation settings)
+    -u,--user         User             ""      (NEMO & XIOS installation)		   
+
+
+Options (modify default settings)
+SVN
+    -b,--branch	      Branch name in working directory ('trunk'|'nemo_v3_6_stable'|...)
+    -v,--version      Action on working copy ('status' by default)
+  		           '{'YYYY-MM-DD'}'  Update to revision available at this date
+		           [0-9]*	       ""   ""    ""    number
+		           HEAD|up|update      ""   "" last revision
+		           st|status	     Show differences with repository
+    -w,--workdir      Installation directory for testing branches
+
+Inputs
+    -a,--archive      Forcing input files archive to extract, if void it will copy all files from given folder (see next line)
+    -f,--forcdir      Path to your personal folder of forcing inputs
+
+Testing configuration
+    -n,--new_conf     Testing   configuration folder created in ./CONFIG
+    -r,--ref_conf     Reference      " "      for trusting test
+
+Compiling & computation
+    -j,--job          Number of processes for compiling
+    -t,--time         Timeout for computation (s)
+
+Trusting output
+    -d,--debug        Verbose output for debugging purpose (`set -vx`)
+    -e,--email        Email trusting digest report to following addresses only on failure
+    -h,--help         Print this help & exit
+    -p,--prod         Production mode (append trusting logfile)
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/AMM12/iodef.xml
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/AMM12/iodef.xml	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/AMM12/iodef.xml	(revision 6138)
@@ -0,0 +1,157 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo" time_origin="1950-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->
+     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files -->
+
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="sst"          name="tos" />
+	  <field field_ref="sss"          name="sos" />
+	  <field field_ref="ssh"          name="zos" />
+	</file>
+
+	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="ssu"          name="uos" />
+	</file>
+	
+	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="ssv"          name="vos" />
+	</file>
+	
+      </file_group>
+
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+
+	<file id="file4" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="toce"         name="thetao" />
+	  <field field_ref="soce"         name="so"     />
+	  <field field_ref="sst"          name="tos"    />
+	  <field field_ref="sst2"         name="tossq"  />
+	  <field field_ref="sss"          name="sos"    />
+	  <field field_ref="ssh"          name="zos"    />
+	  <field field_ref="ssh2"         name="zossq"  />
+	  <field field_ref="empmr"        name="wfo"    />
+	  <field field_ref="qsr"          name="rsntds" />
+	  <field field_ref="qt"           name="tohfls" />
+	  <field field_ref="taum"     />
+	  <field field_ref="mldkz5"   />
+	  <field field_ref="mldr10_1" />
+	</file>
+	
+	<file id="file5" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="uoce"         name="uo"    />
+	  <field field_ref="ssu"          name="uos"   />
+	  <field field_ref="utau"         name="tauuo" />
+	</file>
+	
+	<file id="file6" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="voce"         name="vo"    />
+	  <field field_ref="ssv"          name="vos"   />
+	  <field field_ref="vtau"         name="tauvo" />
+	</file>
+	
+	<file id="file7" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="woce"         name="wo"     />
+	  <field field_ref="avt"          name="difvho" />
+	</file>
+	
+      </file_group>
+
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."/> <!-- real monthly files -->
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."/> <!-- real yearly files -->
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+    
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" />
+      <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" />
+      <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" />
+      <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" />
+      <axis id="nfloat"  long_name="Float number"       unit="1"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 />
+      <axis id="ncatice" long_name="Ice category"       unit="1"                 />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+     <grid id="gznl_T_2D" domain_ref="gznl"/>
+     <grid id="gznl_T_3D" domain_ref="gznl" axis_ref="deptht"/>
+     <grid id="gznl_W_3D" domain_ref="gznl" axis_ref="depthw"/>
+    </grid_definition>   
+  </context>
+  
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="buffer_size"               type="integer">10000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">0</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/AMM12/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/AMM12/namelist_cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/AMM12/namelist_cfg	(revision 6138)
@@ -0,0 +1,434 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  : AMM12 configuration namelist used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp      =  "AMM12_trust"  	!  experience name
+   nn_it000    =       1   	 	!  first time step
+   nn_itend    =     576   	 	!  last  time step (std 1 day = 144)
+   nn_date0    =  20120102 	 	!  date at nit_0000 (format yyyymmdd) used if ln_rstart=F or (ln_rstart=T and nn_rstctl=0 or 1)
+   nn_leapy    =       1   	 	!  Leap year calendar (1) or not (0)
+   ln_rstart   =  .true.         	!  start from rest (F) or from a restart file (T)
+   nn_euler    =       1   	 	!  = 0 : start with forward time step if ln_rstart=.true.
+   cn_ocerst_in   = "amm12_restart_oce" !  suffix of ocean restart name (input)
+   cn_ocerst_out  = "restart_oce_out"   !  suffix of ocean restart name (input)
+   nn_stock    =    1296   	 	!  frequency of creation of a restart file (modulo referenced to 1)
+   nn_write    =     144   	 	!  frequency of write in the output file   (modulo referenced to nit000) 
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "amm"                !  name of the configuration
+   jp_cfg      =     011               !  resolution of the configuration
+   jpidta      =     198               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     224               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      51               !  number of levels      ( >= jpk )
+   jpiglo      =     198               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     224               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       0               !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+   ln_zps      = .false.   !  z-coordinate - partial steps   (T/F)
+   ln_sco      = .true.    !  s- or hybrid z-s-coordinate    (T/F)
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+   ln_s_sh94   = .false.   !  Song & Haidvogel 1994 hybrid S-sigma   (T)|
+   ln_s_sf12   = .true.    !  Siddorn & Furner 2012 hybrid S-z-sigma (T)| if both are false the NEMO tanh stretching is applied
+   ln_sigcrit  = .true.    !  use sigma coordinates below critical depth (T) or Z coordinates (F) for Siddorn & Furner stretch
+                           !  stretching coefficients for all functions
+   rn_hc       =   50.0    !  critical depth for transition to stretched coordinates
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_msh      =       0               !  create (=1) a mesh file or not (=0)
+   rn_rdt      =   600.    !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_rdtmin   =   600.          !  minimum time step on tracers (used if nn_acc=1)
+   rn_rdtmax   =   600.          !  maximum time step on tracers (used if nn_acc=1)
+   rn_rdth     =   600.          !  depth variation of tracer time step  (used if nn_acc=1)
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =  999999.0             !  ORCA r4, r2 and r05 coefficients
+   ppa0        =  999999.0             ! (default coefficients)
+   ppa1        =  999999.0             !
+   ppkth       =      23.563           !
+   ppacr       =       9.0             !
+   ppdzmin     =       6.0             !  Minimum vertical spacing
+   pphmax      =    5720.              !  Maximum depth
+   ldbletanh   =  .FALSE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =  999999.              !  Double tanh function parameters
+   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
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+   ln_tsd_init   = .false.   !  Initialisation of ocean T & S with T &S input data (T) or not (F)
+   ln_tsd_tradmp = .false.   !  damping of ocean T & S toward T &S input data (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = 1         !  frequency of surface boundary condition computation
+                           !     (also = the frequency of sea-ice model call)
+   ln_flx      = .true.    !  flux formulation       (T => fill namsbc_flx )
+   ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core)
+   nn_ice      = 0         !  =0 no ice boundary condition   ,
+   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+   ln_apr_dyn  = .false.    !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr )
+
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+!          !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_utau     = 'amm12_utau'     ,          1        ,  'utau'      , .false.      , .false. , 'daily'   ,  ''      ,  ''  , ''
+   sn_vtau     = 'amm12_vtau'     ,          1        ,  'vtau'      , .false.      , .false. , 'daily'   ,  ''      ,  ''  , ''
+   sn_qtot     = 'amm12_flx'      ,          3        ,  'sonsfldo'  ,  .true.      , .false. , 'daily'   ,  ''      ,  ''  , ''
+   sn_qsr      = 'amm12_flx'      ,          3        ,  'soshfldo'  ,  .true.      , .false. , 'daily'   ,  ''      ,  ''  , ''
+   sn_emp      = 'amm12_flx'      ,          3        ,  'sowafldo'  ,  .true.      , .false. , 'daily'   ,  ''      ,  ''  , ''
+   cn_dir      = './fluxes/'        !  root directory for the location of the flux files
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_mfs   !   namsbc_mfs  MFS bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_oasis3")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+   ln_traqsr   = .false.   !  Light penetration (T) or not (F)
+   nn_chldta   =      0    !  RGB : Chl data (=1) or cst value (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+!          !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_rnf      = 'amm12_rivers'       ,        24         , 'rorunoff',   .false.    , .true. , 'yearly'  , ''       , ''  , ''
+   sn_cnf      = 'runoff_1m_nomask'   ,         0         , 'socoefr0',   .false.    , .true. , 'yearly'  , ''       , ''  , ''
+   sn_s_rnf    = 'amm12_rivers'       ,        24         , 'rosaline',   .false.    , .true. , 'yearly'  , ''       , ''  , ''
+   sn_t_rnf    = 'amm12_rivers'       ,        24         , 'rotemper',   .false.    , .true. , 'yearly'  , ''       , ''  , ''
+   sn_dep_rnf  = 'amm12_rivers'       ,        24         , 'rodepth' ,   .false.    , .true. , 'yearly'  , ''       , ''  , ''
+   ln_rnf_mouth = .false.   !  specific treatment at rivers mouths
+   ln_rnf_depth = .true.    !  read in depth information for runoff
+   ln_rnf_tem   = .true.    !  read in temperature information for runoff
+   ln_rnf_sal   = .true.    !  read in salinity information for runoff
+/
+!-----------------------------------------------------------------------
+&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
+!-----------------------------------------------------------------------
+!          !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_apr     = 'amm12_mslp'     ,          1        ,  'p_msl'      , .false.      , .false. , 'daily'   ,  ''      ,  ''  , ''
+
+   cn_dir      = './fluxes/' !  root directory for the location of the bulk files
+   rn_pref     = 101000.     !  reference atmospheric pressure   [N/m2]/
+   ln_ref_apr  = .false.    !  ref. pressure: global mean Patm (T) or a constant (F)
+   ln_apr_obc  = .true.    !  inverse barometer added to OBC ssh data
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!          !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_sst      = 'amm12_sstref'    ,        24         ,  'sst'     ,     .true.     , .false. , 'daily'   , .false. , ''       , '' , ''
+   sn_sss      = 'sss_data'        ,        -1         ,  'sss'     ,     .true.     , .true.  , 'yearly'  , .false. , ''       , '' , ''
+
+   cn_dir      = 'fluxes/' !  root directory for the location of the runoff files
+   nn_sstr     =     1     !  add a retroaction term in the surface heat       flux (=1) or not (=0)
+   nn_sssr     =     0     !  add a damping     term in the surface freshwater flux (=2)
+                           !  or to SSS only (=1) or no damping term (=0)
+   rn_deds     =  -27.7    !  magnitude of the damping on salinity   [mm/day]
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =     0     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+                           !  free slip  !   partial slip  !   no slip   ! strong slip
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobc        !   open boundaries parameters                           ("key_obc")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namagrif      !  AGRIF zoom                                            ("key_agrif")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_tide      !   tide parameters (#ifdef key_tide)
+!-----------------------------------------------------------------------
+   clname(1)     =   'Q1'   !  name of constituent
+   clname(2)     =   'O1'
+   clname(3)     =   'P1'
+   clname(4)     =   'S1'
+   clname(5)     =   'K1'
+   clname(6)     =   '2N2'
+   clname(7)     =   'MU2'
+   clname(8)     =   'N2'
+   clname(9)     =   'NU2'
+   clname(10)    =   'M2'
+   clname(11)    =   'L2'
+   clname(12)    =   'T2'
+   clname(13)    =   'S2'
+   clname(14)    =   'K2'
+   clname(15)    =   'M4'
+/
+!-----------------------------------------------------------------------
+&nambdy        !  unstructured open boundaries                          ("key_bdy")
+    nb_bdy         =  1
+    cn_dyn2d       = 'flather'
+    nn_dyn2d_dta   =  3
+    cn_tra         =  'frs'
+    nn_tra_dta    =   1 
+/
+!-----------------------------------------------------------------------
+&nambdy_dta      !  open boundaries - external data           ("key_bdy")
+!-----------------------------------------------------------------------
+!          !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   bn_ssh =     'amm12_bdyT_dyn2d' ,         24        , 'sossheig' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
+   bn_u2d =     'amm12_bdyU_dyn2d' ,         24        , 'vobtcrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
+   bn_v2d =     'amm12_bdyV_dyn2d' ,         24        , 'vobtcrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
+   bn_u3d  =    'amm12_bdyU_dyn3d' ,         24        , 'vozocrtx' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
+   bn_v3d  =    'amm12_bdyV_dyn3d' ,         24        , 'vomecrty' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
+   bn_tem  =    'amm12_bdyT_tra'   ,         24        , 'votemper' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
+   bn_sal  =    'amm12_bdyT_tra'   ,         24        , 'vosaline' ,     .true.     , .false. ,  'daily'  ,    ''    ,   ''  , ''
+   cn_dir  =    './bdydta/'
+   ln_full_vel = .false.
+/
+!-----------------------------------------------------------------------
+&nambdy_tide     ! tidal forcing at open boundaries
+!-----------------------------------------------------------------------
+   filtide      = 'bdydta/amm12_bdytide_'         !  file name root of tidal forcing files
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+   nn_bfr      =    2      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
+                           !                              = 2 : nonlinear friction
+   rn_bfri2    =    2.5e-3 !  bottom drag coefficient (non linear case)
+   rn_bfeb2    =    0.0e0  !  bottom turbulent kinetic energy background  (m2/s2)
+   ln_loglayer =    .true. !  loglayer bottom friction (only effect when nn_bfr = 2)
+   rn_bfrz0    =    0.003  !  bottom roughness (only effect when ln_loglayer = .true.)
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   ln_trabbc   = .false.   !  Apply a geothermal heating at the ocean bottom
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+   nn_bbl_ldf  =  0      !  diffusive bbl (=1)   or not (=0)
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   ln_traldf_hor    =  .true.   !  horizontal (geopotential)   (needs "key_ldfslp" when ln_sco=T)
+   ln_traldf_iso    =  .false.  !  iso-neutral                 (needs "key_ldfslp")
+   rn_aeiv_0        =     0.    !  eddy induced velocity coefficient [m2/s]
+   rn_aht_0         =    50.    !  horizontal eddy diffusivity for tracers [m2/s]
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+   ln_hpg_prj  = .true.   !  s-coordinate (Pressure Jacobian scheme)
+/
+!-----------------------------------------------------------------------
+!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_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   !                       !  Type of the operator :
+   ln_dynldf_bilap  =  .true.   !  bilaplacian operator
+   ln_dynldf_lap    =  .false.  !  bilaplacian operator
+   !                       !  Direction of action  :
+   ln_dynldf_level  =  .true.   !  iso-level
+   ln_dynldf_hor    =  .false.  !  horizontal (geopotential)            (require "key_ldfslp" in s-coord.)
+                           !  Coefficient
+   rn_ahm_0_lap     = 60.0      !  horizontal laplacian eddy viscosity   [m2/s]
+   rn_ahm_0_blp     = -1.0e+10  !  horizontal bilaplacian eddy viscosity [m4/s]
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+   rn_avm0     =   0.1e-6  !  vertical eddy viscosity   [m2/s]          (background Kz if not "key_zdfcst")
+   rn_avt0     =   0.1e-6  !  vertical eddy diffusivity [m2/s]          (background Kz if not "key_zdfcst")
+   ln_zdfevd   = .false.   !  enhanced vertical diffusion (evd) (T) or not (F)
+   nn_evdm     =    1      !  evd apply on tracer (=0) or on tracer and momentum (=1)
+/
+!-----------------------------------------------------------------------
+&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!------------------------------------------------------------------------
+&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally:
+!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")
+/
+!-----------------------------------------------------------------------
+&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
+!-----------------------------------------------------------------------
+   rn_charn =  100000.     !  Charnock constant for wb induced roughness length
+   nn_z0_met = 1           !  Method for surface roughness computation (0/1/2)
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+   ln_tmx_itf  = .FALSE.   !  ITF specific parameterisation
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrd        !   diagnostics on dynamics and/or tracer trends         ("key_trddyn" and/or "key_trdtra")
+!              !       or mixed-layer trends or barotropic vorticity    ("key_trdmld" or     "key_trdvor")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namflo       !   float parameters                                      ("key_float")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_diaharm   !   Harmonic analysis of tidal constituents ('key_diaharm')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdct        ! transports through sections
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobs       !  observation usage switch                               ('key_diaobs')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_wave   ! External fields from wave model
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsto       ! Stochastic parametrization of EOS
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+/
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/GYRE/iodef.xml
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/GYRE/iodef.xml	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/GYRE/iodef.xml	(revision 6138)
@@ -0,0 +1,284 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo" time_origin="1900-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+ 
+    
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->
+     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files -->
+
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="sst"          name="tos" />
+	  <field field_ref="sss"          name="sos" />
+	  <field field_ref="ssh"          name="zos" />
+	</file>
+
+	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="ssu"          name="uos" />
+	</file>
+	
+	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="ssv"          name="vos" />
+	</file>
+
+        <file id="file4" name_suffix="_bioscalar" description="pisces sms variables" >
+          <field field_ref="tdenit"   name="tdenit"   unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tnfix"    name="tnfix"    unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tcflx"    name="tcflx"    unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tcflxcum" name="tcflxcum" unit="PgC"    operation="instant" > tcflxcum * -1. * 12. / 1e15 </field>
+          <field field_ref="tcexp"    name="tcexp"    unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tintpp"   name="tintpp"   unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="pno3tot"  name="pno3tot"  unit="umolN"  > pno3tot * 16. / 122. * 1e6 </field>
+          <field field_ref="ppo4tot"  name="ppo4tot"  unit="umolP"  > ppo4tot * 1. / 122. * 1e6 </field>
+          <field field_ref="psiltot"  name="psiltot"  unit="umolC"  > psiltot * 1e6  </field>
+          <field field_ref="palktot"  name="palktot"  unit="umolC"  > palktot * 1e6  </field>
+        <field field_ref="pfertot"  name="pfertot"  unit="nmolFe" > pfertot * 1e9  </field>
+                                                                                                                             </file>
+      </file_group>
+
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+
+	<file id="file5" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="toce"         name="thetao" />
+	  <field field_ref="soce"         name="so"     />
+	  <field field_ref="sst"          name="tos"    />
+	  <field field_ref="sst2"         name="tossq"  />
+	  <field field_ref="sss"          name="sos"    />
+	  <field field_ref="ssh"          name="zos"    />
+	  <field field_ref="ssh2"         name="zossq"  />
+	  <field field_ref="empmr"        name="wfo"    />
+	  <field field_ref="qsr"          name="rsntds" />
+	  <field field_ref="qt"           name="tohfls" />
+	  <field field_ref="taum"     />
+	  <field field_ref="mldkz5"   />
+	  <field field_ref="mldr10_1" />
+	</file>
+	
+	<file id="file6" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="uoce"         name="uo"     />
+	  <field field_ref="ssu"          name="uos"    />
+	  <field field_ref="utau"         name="tauuo"  />
+	</file>
+	
+	<file id="file7" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="voce"         name="vo"     />
+	  <field field_ref="ssv"          name="vos"    />
+	  <field field_ref="vtau"         name="tauvo"  />
+	</file>
+	
+	<file id="file8" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="woce"         name="wo"     />
+	  <field field_ref="avt"          name="difvho" />
+	</file>
+	
+	<file id="file9" name_suffix="_icemod" description="ice variables" >
+	  <field field_ref="ice_pres"   />
+	  <field field_ref="snowthic_cea" name="snd"    />
+	  <field field_ref="icethic_cea"  name="sit"    />
+	  <field field_ref="iceprod_cea"  name="sip"    />
+	  <field field_ref="ist_ipa"    />
+	  <field field_ref="uice_ipa"   />
+	  <field field_ref="vice_ipa"   />
+	  <field field_ref="utau_ice"   />
+	  <field field_ref="vtau_ice"   />
+	  <field field_ref="qsr_io_cea" />
+	  <field field_ref="qns_io_cea" />
+	  <field field_ref="snowpre"    />
+	</file>
+	
+      </file_group>
+
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files -->
+
+	<file id="file10" name_suffix="_ptrc_T" description="pisces sms variables" >
+          <field field_ref="DIC"      />
+          <field field_ref="Alkalini" />
+          <field field_ref="O2"       />
+          <field field_ref="PO4"      />
+          <field field_ref="Si"       />
+          <field field_ref="Fer"      />
+          <field field_ref="NCHL"     />
+          <field field_ref="DCHL"     />
+          <field field_ref="NO3"      />
+	</file>
+	
+	<file id="file11" name_suffix="_diad_T" description="additional pisces diagnostics" >
+          <field field_ref="Cflx"     />
+          <field field_ref="Dpco2"    />
+	</file>
+
+      </file_group>
+
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files -->
+
+	<file id="file12" name_suffix="_ptrc_T" description="pisces sms variables" >
+          <field field_ref="DIC"      />
+          <field field_ref="Alkalini" />
+          <field field_ref="O2"       />
+          <field field_ref="CaCO3"    />
+          <field field_ref="PO4"      />
+          <field field_ref="POC"      />
+          <field field_ref="Si"       />
+          <field field_ref="PHY"      />
+          <field field_ref="ZOO"      />
+          <field field_ref="DOC"      />
+          <field field_ref="PHY2"     />
+          <field field_ref="ZOO2"     />
+          <field field_ref="DSi"      />
+          <field field_ref="Fer"      />
+          <field field_ref="BFe"      />
+          <field field_ref="GOC"      />
+          <field field_ref="SFe"      />
+          <field field_ref="DFe"      />
+          <field field_ref="GSi"      />
+          <field field_ref="NFe"      />
+          <field field_ref="NCHL"     />
+          <field field_ref="DCHL"     />
+          <field field_ref="NO3"      />
+          <field field_ref="NH4"      />
+	</file>
+
+	<file id="file13" name_suffix="_diad_T" description="additional pisces diagnostics" >
+          <field field_ref="PH"       />
+          <field field_ref="CO3"      />
+          <field field_ref="CO3sat"   />
+          <field field_ref="PAR"      />
+          <field field_ref="PPPHY"    />
+          <field field_ref="PPPHY2"   />
+          <field field_ref="PPNEWN"   />
+          <field field_ref="PPNEWD"   />
+          <field field_ref="PBSi"     />
+          <field field_ref="PFeN"     />
+          <field field_ref="PFeD"     />
+          <field field_ref="xfracal"  />
+          <field field_ref="PCAL"     />
+          <field field_ref="DCAL"     />
+          <field field_ref="GRAZ1"    />
+          <field field_ref="GRAZ2"    />
+          <field field_ref="EPC100"   />
+          <field field_ref="EPFE100"  />
+          <field field_ref="EPSI100"  />
+          <field field_ref="EPCAL100" />
+          <field field_ref="Cflx"     />
+          <field field_ref="Oflx"     />
+          <field field_ref="Kg"       />
+          <field field_ref="Dpco2"    />
+          <field field_ref="Dpo2"     />
+          <field field_ref="Heup"     />
+          <field field_ref="Irondep"  />
+          <field field_ref="Ironsed"  />
+          <field field_ref="Ironice"  />
+          <field field_ref="Nfix"     />
+          <field field_ref="MuN"      />
+          <field field_ref="MuD"      />
+          <field field_ref="LNnut"    />
+          <field field_ref="LDnut"    />
+          <field field_ref="LNFe"     />
+          <field field_ref="LDFe"     />
+          <field field_ref="LNlight"  />
+          <field field_ref="LDlight"  />
+          <field field_ref="pdust"    />
+          <field field_ref="Fe2"      />
+          <field field_ref="Fe3"      />
+          <field field_ref="FeL1"     />
+          <field field_ref="FeL2"     />
+          <field field_ref="FeP"      />
+          <field field_ref="TL1"      />
+          <field field_ref="TL2"      />
+          <field field_ref="Sdenit"   />
+          <field field_ref="Totlig"   />
+	</file>
+
+      </file_group>
+
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" />
+      <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" />
+      <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" />
+      <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" />
+      <axis id="nfloat"  long_name="Float number"       unit="1"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 />
+      <axis id="ncatice" long_name="Ice category"       unit="1"                 />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>  
+  
+  </context>
+  
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="buffer_size"               type="integer">50000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">0</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/GYRE/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/GYRE/namelist_cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/GYRE/namelist_cfg	(revision 6138)
@@ -0,0 +1,375 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  : GYRE_PISCES Configuration namelist to overwrite reference dynamical namelist
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp      =  'GYRE_trust'		 !  experience name
+   nn_it000    =       1   		 !  first time step
+   nn_itend    =     120   		 !  last  time step
+   nn_stock    =      60   		 !  frequency of creation of a restart file (modulo referenced to 1)
+/
+!-----------------------------------------------------------------------
+&namcfg     !   parameters of the configuration   
+!-----------------------------------------------------------------------
+   cp_cfg      =  "gyre"                 !  name of the configuration
+   jp_cfg      =       1                 !  resolution of the configuration
+   jpidta      =      32                 !  1st lateral dimension ( >= jpi ) = 30*jp_cfg+2
+   jpjdta      =      22                 !  2nd    "         "    ( >= jpj ) = 20*jp_cfg+2 
+   jpkdta      =      31                 !  number of levels      ( >= jpk )
+   jpiglo      =      32                 !  1st dimension of global domain --> i  = jpidta
+   jpjglo      =      22                 !  2nd    -                  -    --> j  = jpjdta
+   jpizoom     =       1                 !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1                 !  in data domain indices
+   jperio      =       0                 !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+   ln_zco      = .true.    !  z-coordinate - full    steps   (T/F)      ("key_zco" may also be defined)
+   ln_zps      = .false.   !  z-coordinate - partial steps   (T/F)
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   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)
+   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)
+   jphgr_msh   =       5                 !  type of horizontal mesh
+   ppglam0     =       0.0               !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =      29.0               ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0               !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0               !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0               !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0               !  meridional grid-spacing (degrees)
+   ppsur       =   -2033.194295283385    !  ORCA r4, r2 and r05 coefficients
+   ppa0        =     155.8325369664153   ! (default coefficients)
+   ppa1        =     146.3615918601890   !
+   ppkth       =      17.28520372419791  !
+   ppacr       =       5.0               !
+   ppdzmin     =  999999.0               !  Minimum vertical spacing
+   pphmax      =  999999.0               !  Maximum depth
+   ldbletanh   =  .FALSE.                !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =  999999.0               !  Double tanh function parameters
+   ppkth2      =  999999.0               !
+   ppacr2      =  999999.0               !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+   cn_dir        = './'      !  root directory for the location of the runoff files
+   ln_tsd_init   = .false.   !  Initialisation of ocean T & S with T &S input data (T) or not (F)
+   ln_tsd_tradmp = .false.   !  damping of ocean T & S toward T &S input data (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = 1         !  frequency of surface boundary condition computation
+   !                       !     (also = the frequency of sea-ice model call)
+   ln_ana      = .true.    !  analytical formulation                    (T => fill namsbc_ana )
+   ln_blk_core = .false.   !  CORE bulk formulation                     (T => fill namsbc_core)
+   nn_ice      = 0         !  =0 no ice boundary condition   ,
+   ln_rnf      = .false.   !  runoffs                                   (T => fill namsbc_rnf)
+   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+/
+!-----------------------------------------------------------------------
+&namsbc_ana    !   analytical surface boundary condition
+!-----------------------------------------------------------------------
+   nn_tau000   =   100     !  gently increase the stress over the first ntau_rst time-steps
+   rn_utau0    =   0.1e0   !  uniform value for the i-stress
+/
+!-----------------------------------------------------------------------
+&namsbc_flx    !   surface boundary condition : flux formulation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_clio   !   namsbc_clio  CLIO bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_mfs   !   namsbc_mfs  MFS bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_oasis3")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+   ln_qsr_rgb  = .false.   !  RGB (Red-Green-Blue) light penetration
+   ln_qsr_2bd  = .true.    !  2 bands              light penetration
+   nn_chldta   =      0    !  RGB : Chl data (=1) or cst value (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+   ln_rnf_mouth = .false.   !  specific treatment at rivers mouths
+/
+!-----------------------------------------------------------------------
+&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+   nn_sssr     =     0     !  add a damping     term in the surface freshwater flux (=2)
+   rn_deds     =   -27.7   !  magnitude of the damping on salinity   [mm/day]
+   ln_sssr_bnd =   .false. !  flag to bound erp term (associated with nn_sssr=2)
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    0.     !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobc        !   open boundaries parameters                           ("key_obc")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namagrif      !  AGRIF zoom                                            ("key_agrif")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_tide      !    tide parameters (#ifdef key_tide)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambdy        !  unstructured open boundaries                          ("key_bdy")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambdy_dta      !  open boundaries - external data           ("key_bdy")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambdy_tide     ! tidal forcing at open boundaries
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+   nn_bfr      =    2      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   ln_trabbc   = .false.   !  Apply a geothermal heating at the ocean bottom
+   nn_geoflx   =    0      !  geothermal heat flux: = 0 no flux
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+   nn_eos      =  0       !  type of equation of state and Brunt-Vaisala frequency
+                                 !  =-1, TEOS-10 
+                                 !  = 0, EOS-80 
+                                 !  = 1, S-EOS   (simplified eos)
+   ln_useCT    = .false.  ! use of Conservative Temp. ==> surface CT converted in Pot. Temp. in sbcssm
+   !                             !
+   !                      ! S-EOS coefficients :
+   !                             !  rd(T,S,Z)*rau0 = -a0*(1+.5*lambda*dT+mu*Z+nu*dS)*dT+b0*dS
+   rn_a0       =  1.6550e-1      !  thermal expension coefficient (nn_eos= 1)
+   rn_b0       =  7.6554e-1      !  saline  expension coefficient (nn_eos= 1)
+   rn_lambda1  =  5.9520e-2      !  cabbeling coeff in T^2  (=0 for linear eos)
+   rn_lambda2  =  7.4914e-4      !  cabbeling coeff in S^2  (=0 for linear eos)
+   rn_mu1      =  1.4970e-4      !  thermobaric coeff. in T (=0 for linear eos)
+   rn_mu2      =  1.1090e-5      !  thermobaric coeff. in S (=0 for linear eos)
+   rn_nu       =  2.4341e-3      !  cabbeling coeff in T*S  (=0 for linear eos)
+!!org GYRE   rn_alpha    =   2.0e-4  !  thermal expension coefficient (nn_eos= 1 or 2)
+!!org GYRE   rn_beta     =   7.7e-4  !  saline  expension coefficient (nn_eos= 2)
+!!org  caution  now a0 = alpha / rau0   with rau0 = 1026
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_cen2   =  .false.   !  2nd order centered scheme
+   ln_traadv_tvd    =  .true.    !  TVD scheme
+   ln_traadv_muscl  =  .false.   !  MUSCL scheme
+   ln_traadv_muscl2 =  .false.   !  MUSCL2 scheme + cen2 at boundaries
+   ln_traadv_ubs    =  .false.   !  UBS scheme
+   ln_traadv_qck    =  .false.   !  QUICKEST scheme
+   ln_traadv_msc_ups=  .false.   !  use upstream scheme within muscl
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   rn_aeiv_0        =     0.    !  eddy induced velocity coefficient [m2/s]
+   rn_aht_0         =  1000.    !  horizontal eddy diffusivity for tracers [m2/s]
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+   ln_dynvor_ene = .true.  !  energy    conserving scheme  
+   ln_dynvor_ens = .false. !  enstrophy conserving scheme    
+   ln_dynvor_een = .false. !  energy & enstrophy scheme
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zco  = .true.    !  z-coordinate - full steps
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+/
+!-----------------------------------------------------------------------
+!namdyn_spg    !   surface pressure gradient   (CPP key only)
+!-----------------------------------------------------------------------
+
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   rn_ahm_0_lap     = 100000.   !  horizontal laplacian eddy viscosity   [m2/s]
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+   nn_evdm     =    1      !  evd apply on tracer (=0) or on tracer and momentum (=1)
+/
+!-----------------------------------------------------------------------
+&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+   nn_etau     =   0       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
+/
+!------------------------------------------------------------------------
+&namzdf_kpp    !   K-Profile Parameterization dependent vertical mixing  ("key_zdfkpp", and optionally:
+!------------------------------------------------------------------------ "key_kppcustom" or "key_kpplktb")
+/
+!-----------------------------------------------------------------------
+&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+   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)
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrd        !   diagnostics on dynamics and/or tracer trends         ("key_trddyn" and/or "key_trdtra")
+!              !       or mixed-layer trends or barotropic vorticity    ("key_trdmld" or     "key_trdvor")
+!-----------------------------------------------------------------------
+   ln_glo_trd  = .false.   ! (T) global domain averaged diag for T, T^2, KE, and PE
+   ln_dyn_trd  = .false.   ! (T) 3D momentum trend output
+   ln_dyn_mxl  = .FALSE.   ! (T) 2D momentum trends averaged over the mixed layer (not coded yet)
+   ln_vor_trd  = .FALSE.   ! (T) 2D barotropic vorticity trends (not coded yet)
+   ln_KE_trd   = .false.   ! (T) 3D Kinetic   Energy     trends
+   ln_PE_trd   = .false.   ! (T) 3D Potential Energy     trends
+   ln_tra_trd  = .false.    ! (T) 3D tracer trend output
+   ln_tra_mxl  = .false.   ! (T) 2D tracer trends averaged over the mixed layer (not coded yet)
+   nn_trd      = 365       !  print frequency (ln_glo_trd=T) (unit=time step)
+/
+!!gm   nn_ctls     =   0       !  control surface type in mixed-layer trends (0,1 or n<jpk)
+!!gm   rn_ucf      =   1.      !  unit conversion factor (=1 -> /seconds ; =86400. -> /day)
+!!gm   cn_trdrst_in      = "restart_mld"   ! suffix of ocean restart name (input)
+!!gm   cn_trdrst_out     = "restart_mld"   ! suffix of ocean restart name (output)
+!!gm   ln_trdmld_restart = .false.         !  restart for ML diagnostics
+!!gm   ln_trdmld_instant = .false.         !  flag to diagnose trends of instantantaneous or mean ML T/S
+!!gm
+!-----------------------------------------------------------------------
+&namflo       !   float parameters                                      ("key_float")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdct        ! transports through sections
+!-----------------------------------------------------------------------
+    nn_dct      = 60       !  time step frequency for transports computing
+    nn_dctwri   = 60       !  time step frequency for transports writing
+    nn_secdebug = 0        !      0 : no section to debug
+/
+!-----------------------------------------------------------------------
+&namobs       !  observation usage switch                               ('key_diaobs')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_wave   ! External fields from wave model
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+   ln_neptramp       = .false.  ! ramp down Neptune velocity in shallow water
+/
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA1_LIM3_PISCES/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA1_LIM3_PISCES/namelist_cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA1_LIM3_PISCES/namelist_cfg	(revision 6138)
@@ -0,0 +1,331 @@
+
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp      =  "O1L3P_trust"        !  experience name
+   nn_itend    =     240               !  last  time step (std 5475)
+   nn_euler    =       0               !  = 0 : start with forward time step if ln_rstart=T
+   nn_stock    =     120               !  frequency of creation of a restart file (modulo referenced to 1)
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =       1               !  resolution of the configuration
+   jpidta      =     362               !  1st lateral dimension ( >= jpi )
+!   jpjdta      =     292               !  2nd    "         "    ( >= jpj )
+   jpjdta      =     332               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      75               !  number of levels      ( >= jpk )
+   jpiglo      =     362               !  1st dimension of global domain --> i =jpidta
+!   jpjglo      =     292               !  2nd    -                  -    --> j  =jpjdta
+   jpjglo      =     332               !  2nd    -                  -    --> j  =jpjdta
+   jperio      =       6               !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzgr_sco    !   s-coordinate or hybrid z-s-coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   jphgr_msh   =       0               !  type of horizontal mesh
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =   -3958.951371276829  !  ORCA r4, r2 and r05 coefficients
+   ppa0        =     103.9530096000000 ! (default coefficients)
+   ppa1        =       2.415951269000000   !
+   ppkth       =      15.35101370000000    !
+   ppacr       =       7.0             !
+   ppdzmin     =  999999.0             !  Minimum vertical spacing
+   pphmax      =  999999.0             !  Maximum depth
+   ppa2        =     100.7609285000000 !  Double tanh function parameters
+   ppkth2      =      48.02989372000000    !
+   ppacr2      =      13.00000000000   !
+   rn_rdt      =    3600.              !  time step for the dynamics (and tracer if nn_acc=0)
+   rn_hmin     =   20. 
+   nn_msh      =       0               !  create (=1) a mesh file or not (=0)
+/
+!-----------------------------------------------------------------------
+&namsplit       
+!----------------------------------------------------------------------- 
+   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     "        
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+   ln_tsd_tradmp = .false.  !  damping of ocean T & S toward T &S input data (T) or not (F)
+   sn_tem  = 'conservative_temperature_WOA13_decav_Reg1L75_clim', -1 ,'votemper' , .true. , .true. , 'yearly' , 'weights_3D_WOA13d1_2_eorca1_bilinear.nc'  ,   ''    ,    ''
+   sn_sal  = 'absolute_salinity_WOA13_decav_Reg1L75_clim'       , -1 ,'vosaline' , .true. , .true. , 'yearly' , 'weights_3D_WOA13d1_2_eorca1_bilinear.nc'  ,   ''    ,    ''
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fsbc     = 3         !  frequency of surface boundary condition computation
+   nn_ice_embd = 1         ! embedded sea-ice (full salt and mass exchanges and pressure)
+   ln_dm2dc    = .true.    !  Daily mean to diurnal cycle on short wave
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked
+   ln_rnf      = .true.    !  runoffs                                   (T   => fill namsbc_rnf)
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+!              !   file name                  ! frequency (hours) ! variable   ! time interpol. !  clim   ! 'yearly'/ ! weights              ! rotation !
+!              !                              !  (if <0  months)  !   name     !    (logical)   !  (T/F)  ! 'monthly' ! filename             ! pairing  !
+   sn_wndi     = 'u_10.15JUNE2009_fill'       ,         6         , 'U_10_MOD',   .true.     ,  .true. , 'yearly'  , 'weights_coreII_2_eorca1_bicubic.nc'  , 'U1'
+   sn_wndj     = 'v_10.15JUNE2009_fill'       ,         6         , 'V_10_MOD',   .true.     ,  .true. , 'yearly'  , 'weights_coreII_2_eorca1_bicubic.nc'  , 'V1'
+   sn_qsr      = 'ncar_rad.15JUNE2009_fill'   ,        24         , 'SWDN_MOD',   .false.    ,  .true. , 'yearly'  , 'weights_coreII_2_eorca1_bilinear.nc' , ''
+   sn_qlw      = 'ncar_rad.15JUNE2009_fill'   ,        24         , 'LWDN_MOD',   .true.     ,  .true. , 'yearly'  , 'weights_coreII_2_eorca1_bilinear.nc' , ''
+   sn_tair     = 't_10.15JUNE2009_fill'       ,         6         , 'T_10_MOD',   .false.    ,  .true. , 'yearly'  , 'weights_coreII_2_eorca1_bilinear.nc' , ''
+   sn_humi     = 'q_10.15JUNE2009_fill'       ,         6         , 'Q_10_MOD',   .false.    ,  .true. , 'yearly'  , 'weights_coreII_2_eorca1_bilinear.nc' , ''
+   sn_prec     = 'ncar_precip.15JUNE2009_fill',        -1         , 'PRC_MOD1',   .true.     ,  .true. , 'yearly'  , 'weights_coreII_2_eorca1_bilinear.nc' , ''
+   sn_snow     = 'ncar_precip.15JUNE2009_fill',        -1         , 'SNOW'    ,   .true.     ,  .true. , 'yearly'  , 'weights_coreII_2_eorca1_bilinear.nc' , ''
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+   sn_chl      ='merged_ESACCI_BIOMER4V1R1_CHL_REG05',  -1  , 'CHLA' , .true. , .true. , 'yearly' , 'weights_reg05_2_eorca1_bilinear.nc' , '' , ''
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+!              !  file name           ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !                      !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_rnf      = 'eORCA_R1_runoff_clim_v1.0_nomask',        -1         , 'sorunoff',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_cnf      = 'eORCA_R1_runoff_clim_v1.0_nomask',         0         , 'socoeff' ,   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+   sn_s_rnf    = 'runoffs'            ,        24         , 'rosaline',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_t_rnf    = 'runoffs'            ,        24         , 'rotemper',   .true.     , .true. , 'yearly'  , ''       , ''       , ''
+   sn_dep_rnf  = 'runoffs'            ,         0         , 'rodepth' ,   .false.    , .true. , 'yearly'  , ''       , ''       , ''
+
+   ln_rnf_mouth = .false.    !  specific treatment at rivers mouths
+   ln_rnf_depth = .false.    !  read in depth information for runoff
+   ln_rnf_tem   = .false.    !  read in temperature information for runoff
+   ln_rnf_sal   = .false.    !  read in salinity information for runoff
+   ln_rnf_depth_ini = .true. !  compute depth at initialisation from runoff file
+   rn_rnf_max   = 0.05       !  max value of the runoff climatology over global domain ( if ln_rnf_depth_ini = .true )
+   rn_dep_max = 150.         !  depth over which runoffs is spread ( ln_rnf_depth_ini = .true )
+   nn_rnf_depth_file = 1     ! create (=1) a runoff depth file or not (=0)
+/
+!-----------------------------------------------------------------------
+&namsbc_apr    !   Atmospheric pressure used as ocean forcing or in bulk
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+!              !   file name  ! frequency (hours) ! variable   ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation !
+!              !              !  (if <0  months)  !   name     !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  !
+   sn_sss      = 'sss_absolute_salinity_WOA13_decav_Reg1L75_clim', -1. , 'sosaline', .true. , .true. , 'yearly' , 'weights_WOA13d1_2_eorca1_bilinear.nc' , ''
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+      ln_icebergs              = .false.
+      ln_bergdia               = .false.              ! Calculate budgets
+      nn_verbose_level         = 0                    ! Turn on more verbose output if level > 0
+      nn_verbose_write         = 120                  ! Timesteps between verbose messages
+      nn_sample_rate           = 1                    ! Timesteps between sampling for trajectory storage
+                                                      ! Initial mass required for an iceberg of each class
+      rn_initial_mass          = 8.8e7, 4.1e8, 3.3e9, 1.8e10, 3.8e10, 7.5e10, 1.2e11, 2.2e11, 3.9e11, 7.4e11
+                                                      ! Proportion of calving mass to apportion to each class  
+      rn_distribution          = 0.24, 0.12, 0.15, 0.18, 0.12, 0.07, 0.03, 0.03, 0.03, 0.02
+                                                      ! Ratio between effective and real iceberg mass (non-dim)
+                                                      ! i.e. number of icebergs represented at a point         
+      rn_mass_scaling          = 2000, 200, 50, 20, 10, 5, 2, 1, 1, 1
+                                                      ! thickness of newly calved bergs (m)
+      rn_initial_thickness     = 40., 67., 133., 175., 250., 250., 250., 250., 250., 250.
+      rn_rho_bergs             = 850.                 ! Density of icebergs
+      rn_LoW_ratio             = 1.5                  ! Initial ratio L/W for newly calved icebergs
+      ln_operator_splitting    = .true.               ! Use first order operator splitting for thermodynamics
+      rn_bits_erosion_fraction = 0.                   ! Fraction of erosion melt flux to divert to bergy bits
+      rn_sicn_shift            = 0.                   ! Shift of sea-ice concn in erosion flux (0<sicn_shift<1)
+      ln_passive_mode          = .false.              ! iceberg - ocean decoupling   
+      nn_test_icebergs         =   8                  ! Create test icebergs of this class (-1 = no)
+                                                      ! Put a test iceberg at each gridpoint in box (lon1,lon2,lat1,lat2)
+      !rn_test_box              = 108.0,  116.0, -66.0, -58.0
+      rn_test_box              = -180.0,  180.0,  70.0,  90.0     !
+      rn_speed_limit           = 0.                   ! CFL speed limit for a berg   
+
+!              ! file name ! frequency (hours) !   variable   ! time interp.   !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!              !           !  (if <0  months)  !     name     !   (logical)    !  (T/F ) ! 'monthly' ! filename ! pairing  ! filename      !
+      sn_icb =  'calving' ,       -1           , 'calvingmask',  .true.        , .true.  , 'yearly'  , ''       , ''       , ''
+   
+      cn_dir = './' 
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+   rn_shlat    =    0.0    !  shlat = 0  !  0 < shlat < 2  !  shlat = 2  !  2 < shlat
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+   nn_bfr      =    2      !  type of bottom friction :   = 0 : free slip,  = 1 : linear friction
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+   sn_qgh      ='Goutorbe_ghflux.nc',  -12.  , 'gh_flux'    ,   .false.     , .true. , 'yearly'  , 'weights_Goutorbe1_2_eorca1_bilinear.nc'       , ''       , ''
+   !
+   cn_dir      = './'      !  root directory for the location of the runoff files
+   nn_geoflx   =    2      !  geothermal heat flux: = 0 no flux
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+   ln_traadv_tvd    =  .true.   !  TVD scheme
+   ln_traadv_ubs    =  .false.  !  UBS scheme
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+   ln_traldf_grif   =  .false.   !  griffies skew flux formulation       (require "key_ldfslp")
+   ln_traldf_gdia   =  .false.   !  griffies operator strfn diagnostics  (require "key_ldfslp")
+   ln_botmix_grif   =  .false.   !  griffies operator with lateral mixing on bottom (require "key_ldfslp")
+   rn_aht_0         =  1000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_aeiv_0        =  1000.    !  eddy induced velocity coefficient [m2/s]    (require "key_traldf_eiv")
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .false.  !  add a damping termn (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+   ln_dynadv_vec = .true.  !  vector form (T) or flux form (F)
+   ln_dynadv_cen2= .false. !  flux form - 2nd order centered scheme
+   ln_dynadv_ubs = .false. !  flux form - 3rd order UBS      scheme
+   nn_dynkeg     = 1       !  scheme for grad(KE): =0  C2  ; =1  Hollingsworth correction
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+   ln_hpg_zps  = .false.   !  z-coordinate - partial steps (interpolation)
+   ln_hpg_sco  = .true.    !  s-coordinate (standard jacobian formulation)
+   !ln_hpg_isf  = .true.    !  s-coordinate (sco ) adapted to isf
+   ln_dynhpg_imp = .false. !  time stepping: semi-implicit time scheme  (T)
+                           !           centered      time scheme  (F)
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   rn_ahm_0_lap     = 20000.    !  horizontal laplacian eddy viscosity   [m2/s]
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+   nn_solv     =       2               !  elliptic solver: =2 successive-over-relaxation (sor)
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!----------------------------------------------------------------------- 
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+   ln_diahsb  = .true.  
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_vvl    !   vertical coordinate options
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrd        !   diagnostics on dynamics and/or tracer trends
+!              !       and/or mixed-layer trends and/or barotropic vorticity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsto       ! Stochastic parametrization of EOS
+!-----------------------------------------------------------------------
+/
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA1_LIM3_PISCES/namelist_ice_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA1_LIM3_PISCES/namelist_ice_cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA1_LIM3_PISCES/namelist_ice_cfg	(revision 6138)
@@ -0,0 +1,42 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/LIM-3 : Ice configuration namelist. Overwrites SHARED/namelist_ice_lim3_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+
+!-----------------------------------------------------------------------
+&namicerun     !   Share parameters for dynamics/advection/thermo
+!-----------------------------------------------------------------------
+   ln_limdiahsb  = .false.         !  check the heat and salt budgets (T) or not (F)
+   ln_limdiaout  = .false.          !  output the heat and salt budgets (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namiceini     !   ice initialisation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedyn     !   ice dynamic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicethd     !   ice thermodynamic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicesal     !   ice salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namiceitdme   !   parameters for mechanical redistribution of ice 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namicedia     !   ice diagnostics
+!-----------------------------------------------------------------------
+/
+!------------------------------------------------------------------------------
+&namiceitd     !   Ice discretization
+!------------------------------------------------------------------------------
+/
+!------------------------------------------------------------------------------
+&namicehdf     !   Ice horizontal diffusion
+!------------------------------------------------------------------------------
+/
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM/1_namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM/1_namelist_cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM/1_namelist_cfg	(revision 6138)
@@ -0,0 +1,228 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  :  Configuration namelist used to overwrite SHARED/1_namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp      =   "O2LA_trust"        !  experience name 
+   nn_itend    =     300  	       !  last  time step
+   nn_stock    =     150               !  frequency of creation of a restart file (modulo referenced to 1)
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "default"             !  name of the configuration
+   jp_cfg      =      -1               !  resolution of the configuration
+   jpidta      =     182               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     149               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      31               !  number of levels      ( >= jpk )
+   jpiglo      =     182               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     149               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       0               !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------  
+   nn_msh      =       0               !  create (=1) a mesh file or not (=0)
+   jphgr_msh   =       0               !  type of horizontal mesh
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =   -4762.96143546300   !  ORCA r4, r2 and r05 coefficients
+   ppa0        =     255.58049070440   ! (default coefficients)
+   ppa1        =     245.58132232490   !
+   ppkth       =      21.43336197938   !
+   ppacr       =       3.0             !
+   ppdzmin     =  999999.              !  Minimum vertical spacing
+   pphmax      =  999999.              !  Maximum depth
+   ldbletanh   =  .FALSE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =  999999.              !  Double tanh function parameters
+   ppkth2      =  999999.              !
+   ppacr2      =  999999.              !
+   rn_rdt      = 2880.     !  time step for the dynamics (and tracer if nn_acc=0)
+   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")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_ice      = 0         !  =0 no ice boundary condition   ,
+                           !  =1 use observed ice-cover      ,
+                           !  =2 ice-model used                         ("key_lim3" or "key_lim2)
+   ln_rnf      = .false.   !  runoffs                                   (T => fill namsbc_rnf)
+   ln_ssr      = .false.   !  Sea Surface Restoring on T and/or S       (T => fill namsbc_ssr)
+   nn_fwb      = 0         !  FreshWater Budget: =0 unchecked 
+                           !     =1 global mean of e-p-r set to zero at each time step 
+                           !     =2 annual global mean of e-p-r set to zero
+                           !     =3 global emp set to zero and spread out over erp area
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+!              !  file name                    ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights                               ! rotation ! land/sea mask !
+!              !                               !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename                              ! pairing  ! filename      !
+   sn_wndi     = 'u_10.15JUNE2009_fill'        ,         6         , 'U_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core2_agrif_bicubic.nc'      , 'Uwnd'   , ''
+   sn_wndj     = 'v_10.15JUNE2009_fill'        ,         6         , 'V_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core2_agrif_bicubic.nc'      , 'Vwnd'   , ''
+   sn_qsr      = 'ncar_rad.15JUNE2009_fill'    ,        24         , 'SWDN_MOD',   .false.    , .true. , 'yearly'  , 'weights_core2_agrif_bilinear.nc'     , ''       , ''
+   sn_qlw      = 'ncar_rad.15JUNE2009_fill'    ,        24         , 'LWDN_MOD',   .false.    , .true. , 'yearly'  , 'weights_core2_agrif_bilinear.nc'     , ''       , ''
+   sn_tair     = 't_10.15JUNE2009_fill'        ,         6         , 'T_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core2_agrif_bilinear.nc'     , ''       , ''
+   sn_humi     = 'q_10.15JUNE2009_fill'        ,         6         , 'Q_10_MOD',   .false.    , .true. , 'yearly'  , 'weights_core2_agrif_bilinear.nc'     , ''       , ''
+   sn_prec     = 'ncar_precip.15JUNE2009_fill' ,        -1         , 'PRC_MOD1',   .false.    , .true. , 'yearly'  , 'weights_core2_agrif_bilinear.nc'     , ''       , ''
+   sn_snow     = 'ncar_precip.15JUNE2009_fill' ,        -1         , 'SNOW'    ,   .false.    , .true. , 'yearly'  , 'weights_core2_agrif_bilinear.nc'     , ''       , ''
+   sn_tdif     = 'taudif_core'                 ,        24         , 'taudif'  ,   .false.    , .true. , 'yearly'  , 'weights_core2_agrif_bilinear.nc'     , ''       , ''
+
+   cn_dir      = './'      !  root directory for the location of the bulk files
+   ln_taudif   = .false.   !  HF tau contribution: use "mean of stress module - module of the mean stress" data
+   rn_zqt      = 10.        !  Air temperature and humidity reference height (m)
+   rn_zu       = 10.        !  Wind vector reference height (m)
+   rn_pfac     = 1.        !  multiplicative factor for precipitation (total & snow)
+   rn_efac     = 1.        !  multiplicative factor for evaporation (0. or 1.)
+   rn_vfac     = 0.        !  multiplicative factor for ocean/ice velocity
+                           !  in the calculation of the wind stress (0.=absolute winds or 1.=relative winds)
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+!              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation !
+!              !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  !
+   sn_chl      ='chlorophyll',        -1         , 'CHLA'    ,   .true.     , .true. , 'yearly'  , 'weights_bilin.nc'       , ''
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namagrif      !  AGRIF zoom                                            ("key_agrif")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+   ln_tradmp   =  .false.   !  add a damping termn (T) or not (F)
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers 
+!-----------------------------------------------------------------------
+
+   rn_aht_0         =  1000.    !  horizontal eddy diffusivity for tracers [m2/s]
+   rn_aeiv_0        =     0.    !  eddy induced velocity coefficient [m2/s]    (require "key_traldf_eiv")
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/  
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+   !                       !  Type of the operator : 
+   ln_dynldf_lap    =  .false.  !  laplacian operator         
+   ln_dynldf_bilap  =  .true.   !  bilaplacian operator    
+   rn_ahm_0_blp     = -8.5e+11  !  horizontal bilaplacian eddy viscosity [m4/s] 
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+   ln_tmx_itf  = .false.   !  ITF specific parameterisation
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nammpp_dyndist !   Massively Parallel Distribution for AGRIF zoom      ("key_agrif" && "key_mpp_dyndist")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobs       !  observation usage                                      ('key_diaobs')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM/namelist_cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM/namelist_cfg	(revision 6138)
@@ -0,0 +1,203 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp      =   "O2LA_trust"        !  experience name 
+   nn_itend    =     150  	       !  last  time step
+   nn_stock    =      75               !  frequency of creation of a restart file (modulo referenced to 1)
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =       2               !  resolution of the configuration
+   jpidta      =     182               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     149               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      31               !  number of levels      ( >= jpk )
+   jpiglo      =     182               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     149               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       4               !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_msh      =       0               !  create (=1) a mesh file or not (=0)
+   jphgr_msh   =       0               !  type of horizontal mesh
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =   -4762.96143546300   !  ORCA r4, r2 and r05 coefficients
+   ppa0        =     255.58049070440   ! (default coefficients)
+   ppa1        =     245.58132232490   !
+   ppkth       =      21.43336197938   !
+   ppacr       =       3.0             !
+   ppdzmin     =  999999.              !  Minimum vertical spacing
+   pphmax      =  999999.              !  Maximum depth
+   ldbletanh   =  .FALSE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =  999999.              !  Double tanh function parameters
+   ppkth2      =  999999.              !
+   ppacr2      =  999999.              !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fwb      =       0               !  FreshWater Budget: =0 unchecked
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+   nn_solv     =      2    !  elliptic solver: =2 successive-over-relaxation (sor)
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namobs       !  observation usage                                      ('key_diaobs')
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nam_asminc   !   assimilation increments                               ('key_asminc')
+!-----------------------------------------------------------------------
+/
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/iodef.xml
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/iodef.xml	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/iodef.xml	(revision 6138)
@@ -0,0 +1,284 @@
+<?xml version="1.0"?>
+<simulation> 
+
+ <context id="nemo" time_origin="1900-01-01 00:00:00" >
+    
+    <!-- $id$ -->
+    
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    <field_definition src="./field_def.xml"/>
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+ 
+    
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+    
+      <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
+      <file_group id="1h" output_freq="1h"  output_level="10" enabled=".TRUE."/> <!-- 1h files -->
+      <file_group id="2h" output_freq="2h"  output_level="10" enabled=".TRUE."/> <!-- 2h files -->
+      <file_group id="3h" output_freq="3h"  output_level="10" enabled=".TRUE."/> <!-- 3h files -->     
+      <file_group id="4h" output_freq="4h"  output_level="10" enabled=".TRUE."/> <!-- 4h files -->
+      <file_group id="6h" output_freq="6h"  output_level="10" enabled=".TRUE."/> <!-- 6h files -->
+     
+      <file_group id="1d" output_freq="1d"  output_level="10" enabled=".TRUE."> <!-- 1d files -->
+
+	<file id="file1" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="sst"          name="tos" />
+	  <field field_ref="sss"          name="sos" />
+	  <field field_ref="ssh"          name="zos" />
+	</file>
+
+	<file id="file2" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="ssu"          name="uos" />
+	</file>
+	
+	<file id="file3" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="ssv"          name="vos" />
+	</file>
+
+        <file id="file4" name_suffix="_bioscalar" description="pisces sms variables" >
+          <field field_ref="tdenit"   name="tdenit"   unit="TgN/yr" operation="instant" > tdenit * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tnfix"    name="tnfix"    unit="TgN/yr" operation="instant" > tnfix * 14. * 86400. * 365. / 1e12 </field>
+          <field field_ref="tcflx"    name="tcflx"    unit="PgC/yr" operation="instant" > tcflx * -1. * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tcflxcum" name="tcflxcum" unit="PgC"    operation="instant" > tcflxcum * -1. * 12. / 1e15 </field>
+          <field field_ref="tcexp"    name="tcexp"    unit="PgC/yr" operation="instant" > tcexp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="tintpp"   name="tintpp"   unit="PgC/yr" operation="instant" > tintpp * 12. * 86400. * 365. / 1e15 </field>
+          <field field_ref="pno3tot"  name="pno3tot"  unit="umolN"  > pno3tot * 16. / 122. * 1e6 </field>
+          <field field_ref="ppo4tot"  name="ppo4tot"  unit="umolP"  > ppo4tot * 1. / 122. * 1e6 </field>
+          <field field_ref="psiltot"  name="psiltot"  unit="umolC"  > psiltot * 1e6  </field>
+          <field field_ref="palktot"  name="palktot"  unit="umolC"  > palktot * 1e6  </field>
+        <field field_ref="pfertot"  name="pfertot"  unit="nmolFe" > pfertot * 1e9  </field>
+                                                                                                                             </file>
+      </file_group>
+
+      <file_group id="3d" output_freq="3d"  output_level="10" enabled=".TRUE."/> <!-- 3d files -->    
+
+      <file_group id="5d" output_freq="5d"  output_level="10" enabled=".TRUE.">  <!-- 5d files -->   
+
+	<file id="file5" name_suffix="_grid_T" description="ocean T grid variables" >
+	  <field field_ref="toce"         name="thetao" />
+	  <field field_ref="soce"         name="so"     />
+	  <field field_ref="sst"          name="tos"    />
+	  <field field_ref="sst2"         name="tossq"  />
+	  <field field_ref="sss"          name="sos"    />
+	  <field field_ref="ssh"          name="zos"    />
+	  <field field_ref="ssh2"         name="zossq"  />
+	  <field field_ref="empmr"        name="wfo"    />
+	  <field field_ref="qsr"          name="rsntds" />
+	  <field field_ref="qt"           name="tohfls" />
+	  <field field_ref="taum"     />
+	  <field field_ref="mldkz5"   />
+	  <field field_ref="mldr10_1" />
+	</file>
+	
+	<file id="file6" name_suffix="_grid_U" description="ocean U grid variables" >
+	  <field field_ref="uoce"         name="uo"     />
+	  <field field_ref="ssu"          name="uos"    />
+	  <field field_ref="utau"         name="tauuo"  />
+	</file>
+	
+	<file id="file7" name_suffix="_grid_V" description="ocean V grid variables" >
+	  <field field_ref="voce"         name="vo"     />
+	  <field field_ref="ssv"          name="vos"    />
+	  <field field_ref="vtau"         name="tauvo"  />
+	</file>
+	
+	<file id="file8" name_suffix="_grid_W" description="ocean W grid variables" >
+	  <field field_ref="woce"         name="wo"     />
+	  <field field_ref="avt"          name="difvho" />
+	</file>
+	
+	<file id="file9" name_suffix="_icemod" description="ice variables" >
+	  <field field_ref="ice_pres"   />
+	  <field field_ref="snowthic_cea" name="snd"    />
+	  <field field_ref="icethic_cea"  name="sit"    />
+	  <field field_ref="iceprod_cea"  name="sip"    />
+	  <field field_ref="ist_ipa"    />
+	  <field field_ref="uice_ipa"   />
+	  <field field_ref="vice_ipa"   />
+	  <field field_ref="utau_ice"   />
+	  <field field_ref="vtau_ice"   />
+	  <field field_ref="qsr_io_cea" />
+	  <field field_ref="qns_io_cea" />
+	  <field field_ref="snowpre"    />
+	</file>
+	
+      </file_group>
+
+      <file_group id="1m" output_freq="1mo" output_level="10" enabled=".TRUE."> <!-- real monthly files -->
+
+	<file id="file10" name_suffix="_ptrc_T" description="pisces sms variables" >
+          <field field_ref="DIC"      />
+          <field field_ref="Alkalini" />
+          <field field_ref="O2"       />
+          <field field_ref="PO4"      />
+          <field field_ref="Si"       />
+          <field field_ref="Fer"      />
+          <field field_ref="NCHL"     />
+          <field field_ref="DCHL"     />
+          <field field_ref="NO3"      />
+	</file>
+	
+	<file id="file11" name_suffix="_diad_T" description="additional pisces diagnostics" >
+          <field field_ref="Cflx"     />
+          <field field_ref="Dpco2"    />
+	</file>
+
+      </file_group>
+
+      <file_group id="2m" output_freq="2mo" output_level="10" enabled=".TRUE."/> <!-- real 2m files -->
+      <file_group id="3m" output_freq="3mo" output_level="10" enabled=".TRUE."/> <!-- real 3m files -->
+      <file_group id="4m" output_freq="4mo" output_level="10" enabled=".TRUE."/> <!-- real 4m files -->
+      <file_group id="6m" output_freq="6mo" output_level="10" enabled=".TRUE."/> <!-- real 6m files -->
+
+      <file_group id="1y"  output_freq="1y" output_level="10" enabled=".TRUE."> <!-- real yearly files -->
+
+	<file id="file12" name_suffix="_ptrc_T" description="pisces sms variables" >
+          <field field_ref="DIC"      />
+          <field field_ref="Alkalini" />
+          <field field_ref="O2"       />
+          <field field_ref="CaCO3"    />
+          <field field_ref="PO4"      />
+          <field field_ref="POC"      />
+          <field field_ref="Si"       />
+          <field field_ref="PHY"      />
+          <field field_ref="ZOO"      />
+          <field field_ref="DOC"      />
+          <field field_ref="PHY2"     />
+          <field field_ref="ZOO2"     />
+          <field field_ref="DSi"      />
+          <field field_ref="Fer"      />
+          <field field_ref="BFe"      />
+          <field field_ref="GOC"      />
+          <field field_ref="SFe"      />
+          <field field_ref="DFe"      />
+          <field field_ref="GSi"      />
+          <field field_ref="NFe"      />
+          <field field_ref="NCHL"     />
+          <field field_ref="DCHL"     />
+          <field field_ref="NO3"      />
+          <field field_ref="NH4"      />
+	</file>
+
+	<file id="file13" name_suffix="_diad_T" description="additional pisces diagnostics" >
+          <field field_ref="PH"       />
+          <field field_ref="CO3"      />
+          <field field_ref="CO3sat"   />
+          <field field_ref="PAR"      />
+          <field field_ref="PPPHY"    />
+          <field field_ref="PPPHY2"   />
+          <field field_ref="PPNEWN"   />
+          <field field_ref="PPNEWD"   />
+          <field field_ref="PBSi"     />
+          <field field_ref="PFeN"     />
+          <field field_ref="PFeD"     />
+          <field field_ref="xfracal"  />
+          <field field_ref="PCAL"     />
+          <field field_ref="DCAL"     />
+          <field field_ref="GRAZ1"    />
+          <field field_ref="GRAZ2"    />
+          <field field_ref="EPC100"   />
+          <field field_ref="EPFE100"  />
+          <field field_ref="EPSI100"  />
+          <field field_ref="EPCAL100" />
+          <field field_ref="Cflx"     />
+          <field field_ref="Oflx"     />
+          <field field_ref="Kg"       />
+          <field field_ref="Dpco2"    />
+          <field field_ref="Dpo2"     />
+          <field field_ref="Heup"     />
+          <field field_ref="Irondep"  />
+          <field field_ref="Ironsed"  />
+          <field field_ref="Ironice"  />
+          <field field_ref="Nfix"     />
+          <field field_ref="MuN"      />
+          <field field_ref="MuD"      />
+          <field field_ref="LNnut"    />
+          <field field_ref="LDnut"    />
+          <field field_ref="LNFe"     />
+          <field field_ref="LDFe"     />
+          <field field_ref="LNlight"  />
+          <field field_ref="LDlight"  />
+          <field field_ref="pdust"    />
+          <field field_ref="Fe2"      />
+          <field field_ref="Fe3"      />
+          <field field_ref="FeL1"     />
+          <field field_ref="FeL2"     />
+          <field field_ref="FeP"      />
+          <field field_ref="TL1"      />
+          <field field_ref="TL2"      />
+          <field field_ref="Sdenit"   />
+          <field field_ref="Totlig"   />
+	</file>
+
+      </file_group>
+
+      <file_group id="2y"  output_freq="2y" output_level="10" enabled=".TRUE."/> <!-- real 2y files -->
+      <file_group id="5y"  output_freq="5y" output_level="10" enabled=".TRUE."/> <!-- real 5y files -->
+      <file_group id="10y" output_freq="10y" output_level="10" enabled=".TRUE."/> <!-- real 10y files -->
+
+   </file_definition>
+
+    <!-- 
+============================================================================================================
+= grid definition = = DO NOT CHANGE =
+============================================================================================================
+    -->
+    
+   <axis_definition>  
+      <axis id="deptht"  long_name="Vertical T levels"  unit="m" positive="down" />
+      <axis id="depthu"  long_name="Vertical U levels"  unit="m" positive="down" />
+      <axis id="depthv"  long_name="Vertical V levels"  unit="m" positive="down" />
+      <axis id="depthw"  long_name="Vertical W levels"  unit="m" positive="down" />
+      <axis id="nfloat"  long_name="Float number"       unit="1"                 />
+      <axis id="icbcla"  long_name="Iceberg class"      unit="1"                 />
+      <axis id="ncatice" long_name="Ice category"       unit="1"                 />
+      <axis id="iax_20C" long_name="20 degC isotherm"   unit="degC"              />
+      <axis id="iax_28C" long_name="28 degC isotherm"   unit="degC"              />
+   </axis_definition> 
+    
+   <domain_definition src="./domain_def.xml"/>
+   
+   <grid_definition>    
+     <grid id="grid_T_2D" domain_ref="grid_T"/>
+     <grid id="grid_T_3D" domain_ref="grid_T" axis_ref="deptht"/>
+     <grid id="grid_U_2D" domain_ref="grid_U"/>
+     <grid id="grid_U_3D" domain_ref="grid_U" axis_ref="depthu"/>
+     <grid id="grid_V_2D" domain_ref="grid_V"/>
+     <grid id="grid_V_3D" domain_ref="grid_V" axis_ref="depthv"/>
+     <grid id="grid_W_2D" domain_ref="grid_W"/>
+     <grid id="grid_W_3D" domain_ref="grid_W" axis_ref="depthw"/>
+    </grid_definition>  
+  
+  </context>
+  
+
+  <context id="xios">
+
+      <variable_definition>
+	
+     <!-- 
+        We must have buffer_size > jpi*jpj*jpk*8 (with jpi and jpj the subdomain size)
+-->
+	  <variable id="buffer_size"               type="integer">50000000</variable>
+	  <variable id="buffer_server_factor_size" type="integer">2</variable>
+	  <variable id="info_level"                type="integer">0</variable>
+	  <variable id="using_server"              type="boolean">false</variable>
+	  <variable id="using_oasis"               type="boolean">false</variable>
+	  <variable id="oasis_codes_id"            type="string" >oceanx</variable>
+	
+      </variable_definition>
+               
+  </context>
+  
+</simulation>
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/namelist_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/namelist_cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/namelist_cfg	(revision 6138)
@@ -0,0 +1,205 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/OPA  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_ref
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!
+!-----------------------------------------------------------------------
+&namrun        !   parameters of the run
+!-----------------------------------------------------------------------
+   cn_exp      =  "O2LP_trust"         !  experience name
+   nn_itend    =     150               !  last  time step (std 5475)
+   nn_euler    =       0               !  = 0 : start with forward time step if ln_rstart=T
+   nn_stock    =      75               !  frequency of creation of a restart file (modulo referenced to 1)
+/
+!-----------------------------------------------------------------------
+&namcfg        !   parameters of the configuration
+!-----------------------------------------------------------------------
+   cp_cfg      =  "orca"               !  name of the configuration
+   jp_cfg      =       2               !  resolution of the configuration
+   jpidta      =     182               !  1st lateral dimension ( >= jpi )
+   jpjdta      =     149               !  2nd    "         "    ( >= jpj )
+   jpkdta      =      31               !  number of levels      ( >= jpk )
+   jpiglo      =     182               !  1st dimension of global domain --> i =jpidta
+   jpjglo      =     149               !  2nd    -                  -    --> j  =jpjdta
+   jpizoom     =       1               !  left bottom (i,j) indices of the zoom
+   jpjzoom     =       1               !  in data domain indices
+   jperio      =       4               !  lateral cond. type (between 0 and 6)
+/
+!-----------------------------------------------------------------------
+&namzgr        !   vertical coordinate
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdom        !   space and time domain (bathymetry, mesh, timestep)
+!-----------------------------------------------------------------------
+   nn_msh      =       0               !  create (=1) a mesh file or not (=0)
+   jphgr_msh   =       0               !  type of horizontal mesh
+   ppglam0     =  999999.0             !  longitude of first raw and column T-point (jphgr_msh = 1)
+   ppgphi0     =  999999.0             ! latitude  of first raw and column T-point (jphgr_msh = 1)
+   ppe1_deg    =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_deg    =  999999.0             !  meridional grid-spacing (degrees)
+   ppe1_m      =  999999.0             !  zonal      grid-spacing (degrees)
+   ppe2_m      =  999999.0             !  meridional grid-spacing (degrees)
+   ppsur       =   -4762.96143546300   !  ORCA r4, r2 and r05 coefficients
+   ppa0        =     255.58049070440   ! (default coefficients)
+   ppa1        =     245.58132232490   !
+   ppkth       =      21.43336197938   !
+   ppacr       =       3.0             !
+   ppdzmin     =  999999.              !  Minimum vertical spacing
+   pphmax      =  999999.              !  Maximum depth
+   ldbletanh   =  .FALSE.              !  Use/do not use double tanf function for vertical coordinates
+   ppa2        =  999999.              !  Double tanh function parameters
+   ppkth2      =  999999.              !
+   ppacr2      =  999999.              !
+/
+!-----------------------------------------------------------------------
+&namsplit      !   time splitting parameters                            ("key_dynspg_ts")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcrs        !   Grid coarsening for dynamics output and/or
+               !   passive tracer coarsened online simulations
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtsd    !   data : Temperature  & Salinity
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc        !   Surface Boundary Condition (surface module)
+!-----------------------------------------------------------------------
+   nn_fwb      =       0               !  FreshWater Budget: =0 unchecked
+/
+!-----------------------------------------------------------------------
+&namsbc_core   !   namsbc_core  CORE bulk formulae
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_qsr    !   penetrative solar radiation
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_rnf    !   runoffs namelist surface boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_ssr    !   surface boundary condition : sea surface restoring
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsbc_alb    !   albedo parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namberg       !   iceberg parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namlbc        !   lateral momentum boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namcla        !   cross land advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambfr        !   bottom friction
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbc        !   bottom temperature boundary condition
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nambbl        !   bottom boundary layer scheme
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&nameos        !   ocean physical parameters
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv    !   advection scheme for tracer
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_adv_mle !  mixed layer eddy parametrisation (Fox-Kemper param)
+!-----------------------------------------------------------------------
+/
+!----------------------------------------------------------------------------------
+&namtra_ldf    !   lateral diffusion scheme for tracers
+!----------------------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtra_dmp    !   tracer: T & S newtonian damping
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_adv    !   formulation of the momentum advection
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_vor    !   option of physics/algorithm (not control by CPP keys)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_hpg    !   Hydrostatic pressure gradient option
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_ldf    !   lateral diffusion on momentum
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsol        !   elliptic solver / island / free surface
+!-----------------------------------------------------------------------
+   nn_solv     =       2               !  elliptic solver: =2 successive-over-relaxation (sor)
+/
+!-----------------------------------------------------------------------
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namctl        !   Control prints & Benchmark
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namhsb       !  Heat and salt budgets
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namdyn_nept  !   Neptune effect (simplified: lateral and vertical diffusions removed)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namsto       ! Stochastic parametrization of EOS
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrd        !   diagnostics on dynamics and/or tracer trends
+!              !       and/or mixed-layer trends and/or barotropic vorticity
+!-----------------------------------------------------------------------
+/
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/namelist_pisces_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/namelist_pisces_cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/namelist_pisces_cfg	(revision 6138)
@@ -0,0 +1,72 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! PISCES  :   Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_pis_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisext     !   air-sea exchange
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisatm     !  Atmospheric prrssure 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_presatm  = .false.   ! constant atmopsheric pressure (F) or from a file (T)
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisbio     !   biological parameters
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampislim     !   parameters for nutrient limitations
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisopt     !   parameters for optics
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_varpar   =  .false.  ! boolean for PAR variable
+/ 
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisprod     !   parameters for phytoplankton growth
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismort     !   parameters for phytoplankton sinks
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismes     !   parameters for mesozooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiszoo     !   parameters for microzooplankton
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisfer     !   parameters for iron chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/  
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisrem     !   parameters for remineralization
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampiscal     !   parameters for Calcite chemistry
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampissbc     !   parameters for inputs deposition
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_dust     =  .false.  ! boolean for dust input from the atmosphere
+   ln_solub    =  .false.  ! boolean for variable solubility of atm. Iron
+   ln_river    =  .false.  ! boolean for river input of nutrients
+   ln_ndepo    =  .false.  ! boolean for atmospheric deposition of N
+   ln_ironsed  =  .false.  ! boolean for Fe input from sediments
+   ln_hydrofe  =  .false.  ! boolean for from hydrothermal vents
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampisdmp     !  Damping 
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+   ln_pisdmp   =  .false.  !  Relaxation fo some tracers to a mean value
+/
+!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+&nampismass     !  Mass conservation
+!,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
+/
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/namelist_top_cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/namelist_top_cfg	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/inputs/ORCA2_LIM_PISCES/namelist_top_cfg	(revision 6138)
@@ -0,0 +1,97 @@
+!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!! NEMO/TOP1 :  Configuration namelist : used to overwrite defaults values defined in SHARED/namelist_top_ref
+!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+!-----------------------------------------------------------------------
+&namtrc_run     !   run information
+!-----------------------------------------------------------------------
+!   ln_top_euler  = .true.    !  use Euler time-stepping for TOP
+/
+!-----------------------------------------------------------------------
+&namtrc     !   tracers definition
+!-----------------------------------------------------------------------
+   ln_trcdta     =  .false.  !  Initialisation from data input file (T) or not (F)
+!                !    name   !           title of the field              ! initial data ! initial data ! save   !
+!                !           !                                           !  units       ! from file    ! or not ! 
+!                !           !                                           !              ! or not       !        !
+   sn_tracer(1)   = 'DIC     ' , 'Dissolved inorganic Concentration      ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(2)   = 'Alkalini' , 'Total Alkalinity Concentration         ',  'eq/L '   ,  .true.     ,  .true.
+   sn_tracer(3)   = 'O2      ' , 'Dissolved Oxygen Concentration         ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(4)   = 'CaCO3   ' , 'Calcite Concentration                  ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(5)   = 'PO4     ' , 'Phosphate Concentration                ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(6)   = 'POC     ' , 'Small organic carbon Concentration     ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(7)   = 'Si      ' , 'Silicate Concentration                 ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(8)   = 'PHY     ' , 'Nanophytoplankton Concentration        ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(9)   = 'ZOO     ' , 'Microzooplankton Concentration         ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(10)  = 'DOC     ' , 'Dissolved organic Concentration        ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(11)  = 'PHY2    ' , 'Diatoms Concentration                  ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(12)  = 'ZOO2    ' , 'Mesozooplankton Concentration          ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(13)  = 'DSi     ' , 'Diatoms Silicate Concentration         ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(14)  = 'Fer     ' , 'Dissolved Iron Concentration           ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(15)  = 'BFe     ' , 'Big iron particles Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(16)  = 'GOC     ' , 'Big organic carbon Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(17)  = 'SFe     ' , 'Small iron particles Concentration     ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(18)  = 'DFe     ' , 'Diatoms iron  Concentration            ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(19)  = 'GSi     ' , 'Sinking biogenic Silicate Concentration',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(20)  = 'NFe     ' , 'Nano iron Concentration                ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(21)  = 'NCHL    ' , 'Nano chlorophyl Concentration          ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(22)  = 'DCHL    ' , 'Diatoms chlorophyl Concentration       ',  'mol-C/L' ,  .false.    ,  .true.
+   sn_tracer(23)  = 'NO3     ' , 'Nitrates Concentration                 ',  'mol-C/L' ,  .true.     ,  .true.
+   sn_tracer(24)  = 'NH4     ' , 'Ammonium Concentration                 ',  'mol-C/L' ,  .false.    ,  .true.
+/
+!-----------------------------------------------------------------------
+&namtrc_dta      !    Initialisation from data input file
+!-----------------------------------------------------------------------
+!          !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
+!          !             !  (if <0  months)  !   name    !   (logical)  !  (T/F) ! 'monthly' ! filename ! pairing  ! filename      !
+   sn_trcdta(1)  = 'data_DIC_nomask'        ,        -12        ,  'DIC'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(2)  = 'data_Alkalini_nomask'   ,        -12        ,  'Alkalini',    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(3)  = 'data_O2_nomask'         ,        -1         ,  'O2'      ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(5)  = 'data_PO4_nomask'        ,        -1         ,  'PO4'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(7)  = 'data_Si_nomask'         ,        -1         ,  'Si'      ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(10) = 'data_DOC_nomask'        ,        -12        ,  'DOC'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(14) = 'data_Fer_nomask'        ,        -12        ,  'Fer'     ,    .false.   , .true. , 'yearly'  , ''       , ''   , ''
+   sn_trcdta(23) = 'data_NO3_nomask'        ,        -1         ,  'NO3'     ,    .true.    , .true. , 'yearly'  , ''       , ''   , ''
+   rn_trfac(1)   =   1.0e-06  !  multiplicative factor
+   rn_trfac(2)   =   1.0e-06  !  -      -      -     -
+   rn_trfac(3)   =  44.6e-06  !  -      -      -     -
+   rn_trfac(5)   = 122.0e-06  !  -      -      -     -
+   rn_trfac(7)   =   1.0e-06  !  -      -      -     -
+   rn_trfac(10)  =   1.0      !  -      -      -     -
+   rn_trfac(14)  =   1.0      !  -      -      -     -
+   rn_trfac(23)  =   7.6e-06  !  -      -      -     -
+/
+!-----------------------------------------------------------------------
+&namtrc_adv    !   advection scheme for passive tracer 
+!-----------------------------------------------------------------------
+   ln_trcadv_tvd     =  .false.  !  TVD scheme
+   ln_trcadv_muscl   =  .true.   !  MUSCL scheme
+/
+!-----------------------------------------------------------------------
+&namtrc_ldf    !   lateral diffusion scheme for passive tracer 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_zdf        !   vertical physics
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_rad        !  treatment of negative concentrations 
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_dia       !   parameters for passive tracer additional diagnostics
+!----------------------------------------------------------------------
+   ln_diatrc     =  .false.   !  save additional diag. (T) or not (F)
+/
+!----------------------------------------------------------------------
+&namtrc_bc        !   data for boundary conditions
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_dmp    !   passive tracer newtonian damping   
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namtrc_ice       !    Representation of sea ice growth & melt effects
+!-----------------------------------------------------------------------
+/
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/install_new_branch.sh
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/install_new_branch.sh	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/install_new_branch.sh	(revision 6138)
@@ -0,0 +1,99 @@
+#!/bin/bash
+
+
+cd $( dirname $0 )
+
+## Set defaults
+##---------------------------------------------------
+TRUS_DBUG=0; TRUS_PROD=0; TRUS_HELP=0
+
+
+## Get options (for replacing initials settings)
+##---------------------------------------------------
+while [ $# -ne 0 ]; do
+    case $1 in
+	'-d'|'--debug'  ) TRUS_DBUG=1 ; shift  ;; '-j'|'--job' 	  ) TRUS_NPRO=$2; shift 2;;
+	'-m'|'--machine') TRUS_HPCC=$2; shift 2;; '-h'|'--help'	  ) TRUS_HELP=1 ; shift  ;;
+	'-u'|'--user'   ) TRUS_USER=$2; shift 2;; "*"             ) TRUS_HELP=1 ; shift  ;;
+    esac
+done
+
+
+## Initialization (HPC & user environment)
+##---------------------------------------------------
+if [[ ! -e config/${TRUS_USER}.cfg || ! -e config/${TRUS_HPCC}.cfg || ${TRUS_HELP} -eq 1 ]]; then
+    cat ./inc/trusting_help.txt
+
+    if [ ${TRUS_HELP} -eq 0 ]; then
+	printf "\n\n\033[0;33m"
+	printf "At least one configuration (arch or user) file is missing or misspelled:"
+	printf "\t'%s'.cfg\t'%s'.cfg" ${TRUS_USER} ${TRUS_HPCC}
+	printf "\033[0m"
+    fi
+
+    printf "\n\nContent of 'config' folder:\n"
+    find config -name *.cfg | cut -d/ -f2 \
+	| xargs -n 4 printf "\t- %-25s\t- %-25s\t- %-25s\t- %-25s\n"
+    exit 1
+else
+    . ./inc/trusting.env
+    [ ${TRUS_DBUG} -eq 1 ] && set -vx
+fi
+
+
+## List last branches from NEMO Forge
+##---------------------------------------------------
+printf "\nWhat branch do you want to install in "${TRUS_WORK}" for trusting test ? "
+echo 'Enter 0 to abort'
+select branch in 'trunk' $( svn ls ${TRUS_SVNH}/branches/2015 | tr -d / | sort -r ); do
+
+    if [ $REPLY -eq 0 ]; then exit 1; else export TRUS_BRAN=$branch; fi
+
+    printf "\nInstallation of a working copy of '%s' branch in '%s'? " ${TRUS_BRAN} ${TRUS_WORK}
+    printf "\nType [Y|y|yes] to confirm, if not back to branches list number\n"
+    read answer
+    [[ $answer == 'Y' || $answer == 'y' || $answer == 'yes' ]] && break
+
+done
+
+echo
+
+
+## First checkout of selected branch
+##---------------------------------------------------
+echo 'Initial checkout of '${TRUS_BRAN}' branch'
+mkdir -p ${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM
+cd       ${TRUS_WORK}/${TRUS_BRAN}/NEMOGCM
+
+svn_bran=branches/2015/${TRUS_BRAN}
+[ ${TRUS_BRAN} == 'trunk' ] && svn_bran=${TRUS_BRAN}
+
+for elmt in ${TRUS_CKOT}; do
+    [ $elmt == '\' ] && continue
+    printf "%s " $elmt
+
+    if [ $elmt == 'TOOLS/maketools' ]; then
+	svn co -q ${TRUS_SVNH}/${svn_bran}/NEMOGCM/TOOLS --depth empty
+	svn up -q $elmt
+    else
+	svn co -q ${TRUS_SVNH}/${svn_bran}/NEMOGCM/$elmt $elmt
+    fi
+
+done
+
+printf "\n\n"
+
+
+## Compile rebuild_nemo.exe in anticipation
+##---------------------------------------------------
+if [ $( find ARCH -name arch-${TRUS_HPCC}.fcm ) ]; then
+    echo 'Compile NEMO rebuild tool'
+    cd TOOLS && ./maketools -n REBUILD_NEMO -m ${TRUS_HPCC} -j ${TRUS_NPRO} >& /dev/null
+    [ -e REBUILD_NEMO/rebuild_nemo.exe ] && printf "\033[0;32mOK\033[0m" || printf "\033[0;31mKO\033[0m"
+    printf "\n\n"
+else
+    printf "\033[0;31mNo arch file found to compile NEMO rebuild tool\033[0m\n\n"
+fi
+
+exit 0
+
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/trusting.sh
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/trusting.sh	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/trusting.sh	(revision 6138)
@@ -0,0 +1,181 @@
+#!/bin/bash
+
+
+cd $( dirname $0 )
+
+## Set defaults
+##---------------------------------------------------
+TRUS_DIRE=$PWD
+TRUS_DBUG=0; TRUS_PROD=0; TRUS_HELP=0
+## No update on SVN directories & 'FAILED' result for 'Unknown error' )
+TRUS_SVNA='svn status'; TRUS_RSLT='FAILED'; TRUS_RORR=0
+xios_mode='--full'; stdout_redir='>&'
+rev=$( svn info | awk '(NR == 9) {print $NF}' )
+
+
+## Get options (replacing initials settings)
+##---------------------------------------------------
+while [ $# -ne 0 ]; do
+    case $1 in
+	'-a'|'--archive') TRUS_TARF=$2; shift 2;; '-b'|'--branch' ) TRUS_BRAN=$2; shift 2;;
+	'-d'|'--debug'  ) TRUS_DBUG=1 ; shift  ;; '-e'|'--email'  ) TRUS_MAIL=$2; shift 2;;
+	'-f'|'--forcdir') TRUS_FORC=$2; shift 2;; '-j'|'--job'    ) TRUS_NPRO=$2; shift 2;;
+	'-h'|'--help'   ) TRUS_HELP=1 ; shift  ;; '-m'|'--machine') TRUS_HPCC=$2; shift 2;;
+	'-n'|'--newconf') TRUS_CONF=$2; shift 2;; '-r'|'--refconf') TRUS_REFE=$2; shift 2;;
+	'-t'|'--time'   ) TRUS_TOUT=$2; shift 2;; '-p'|'--prod'   ) TRUS_PROD=1 ; shift  ;;
+	'-u'|'--user'   ) TRUS_USER=$2; shift 2;; '-v'|'--version') TRUS_SVNV=$2; shift 2;;
+	'-w'|'--workdir') TRUS_WORK=$2; shift 2;; "*"             ) TRUS_HELP=1 ; shift  ;;
+    esac
+done
+
+
+## Initialization (HPC & user environment)
+##---------------------------------------------------
+if [[ ! -e config/${TRUS_USER}.cfg || ! -e config/${TRUS_HPCC}.cfg || ${TRUS_HELP} -eq 1 ]]; then
+    cat ./inc/trusting_help.txt
+
+    if [ ${TRUS_HELP} -eq 0 ]; then
+	printf "\n\n\033[0;33m"
+	printf "At least one configuration (arch or user) file is missing or misspelled:"
+	printf "\t'%s'.cfg\t'%s'.cfg" ${TRUS_USER} ${TRUS_HPCC}
+	printf "\033[0m"
+    fi
+
+    printf "\n\nContent of 'config' folder:"
+    find config -name *.cfg | cut -d/ -f2 \
+	| xargs -n 4 printf "%-25s\t%-25s\t%-25s\n"
+    exit 1
+else
+    . ./inc/trusting.env && . ./inc/trusting_func.sh
+
+    ## DEBUG option to speed up & expand verbosity of compilation
+    [ ${TRUS_DBUG} -eq 1 ] && { set -vx; xios_mode=''; stdout_redir='>'; }
+
+    ## If -v|--version option has been set, modify default SVN action on directories
+    if   [ $( echo ${TRUS_SVNV} | grep  "HEAD\|up\|update"                     ) ]; then
+	TRUS_SVNA='svn update -r HEAD'
+    elif [ $( echo ${TRUS_SVNV} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' ) ]; then
+	TRUS_SVNA='svn update -r     '$( echo ${TRUS_SVNV} | grep -o '{[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}}' )
+    elif [ $( echo ${TRUS_SVNV} | grep -o '[0-9]*'                             ) ]; then
+	TRUS_SVNA='svn update -r     '$( echo ${TRUS_SVNV} | grep -o '[0-9]*' )
+    fi
+
+fi
+
+
+## Display contextual summary of trusting test
+##---------------------------------------------------
+echo
+if [ -t 0 ]; then cat ./inc/banner.txt; else cat ./inc/banner.html; fi
+echo
+echo '****************************************************************************************************'
+echo '*                                                                                                  *'
+echo '*                           NEMO Trusting (Continuous Integration Tool)                            *'
+echo "*                                             ver.$rev                                             *"
+echo '*                                                                                                  *'
+echo '****************************************************************************************************'
+echo
+printf "\t§ Testing configuration\t\t%s based on %s\n" ${TRUS_CONF} ${TRUS_REFE}
+printf "\t§ SVN working copy\t\t%s/%s\n"               ${TRUS_WORK} ${TRUS_BRAN}
+printf "\t§ Benchmark folder\t\t%s\n"       	       ${TRUS_STOR}
+printf "\t§ (Super)Computer\t\t%s\n" 		       ${TRUS_HPCC}
+printf "\t§ User installation\t\t%s\n\n" 	       ${TRUS_USER}
+
+
+## Make timestamped directory with messenger files
+##---------------------------------------------------
+print_step 'Timestamped testing directory'
+mkdir -p ${TRUS_SCRA} ${TRUS_STOR}
+cd       ${TRUS_SCRA}
+echo     ${TRUS_SCRA}
+init_files
+get_date
+
+
+## Get SVN revision on XIOS & NEMO essentials directories
+##---------------------------------------------------
+print_step "SVN action on NEMO directories: ${TRUS_SVNA}"
+get_nemo_rev
+
+
+## Check softwares versions (after sourced arch environment)
+##---------------------------------------------------
+print_step 'Get testing environement'
+get_soft_rel
+cat model.log | awk '{printf "%-20s %s %s\n", $1, $2, $3}'
+env | sort > env.log
+
+
+## XIOS compilation from scratch
+##---------------------------------------------------
+print_step 'Compile XIOS'
+cd ${TRUS_XIOS}
+eval ./make_xios ${xios_mode} --arch ${TRUS_HPCC} --job ${TRUS_NPRO} \
+    ${stdout_redir} /dev/null
+[ ! -e lib/libxios.a ] && get_out 1 || echo 'Success'
+
+
+## NEMO compilation from scratch
+##---------------------------------------------------
+print_step "Compile ${TRUS_REFE} configuration"
+cd ${TRUS_NGCM}/CONFIG
+[[ -d ${TRUS_CONF} && ${TRUS_DBUG} -eq 0 ]] && ./makenemo -n ${TRUS_CONF} clean_config \
+    > /dev/null <<EOF
+y
+EOF
+
+eval ./makenemo -n ${TRUS_CONF} -r ${TRUS_REFE} -m ${TRUS_HPCC} -j ${TRUS_NPRO} \
+                ${TRUS_KEYA} ${TRUS_KEYD}                                       \
+    ${stdout_redir} /dev/null
+[ ! -e ${TRUS_CONF}/BLD/bin/nemo.exe ] && get_out 2 || echo 'Success'
+
+
+## Get all inputs for running
+##---------------------------------------------------
+print_step 'Set job (copying or extracting inputs)'
+cd ${TRUS_SCRA}
+get_inputs
+cp   ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/cpp_* .
+find ${TRUS_NGCM}/CONFIG/${TRUS_CONF}/EXP00 -regex '.*\(_cfg\|.in\|opa\|_ref\|.xml\)' \
+                                            -exec  cp {} . \;
+
+
+## Check inputs
+##---------------------------------------------------
+print_step 'Compare inputs'
+diff_inputs
+
+
+## Job submission & computation
+##---------------------------------------------------
+print_step 'Submit job'
+cp ${TRUS_DIRE}/batch/${TRUS_JSPT} ${TRUS_SCRA} ## Copy the submitting script to testing folder
+TRUS_JIDN=$( eval ${TRUS_JSUB} )
+[ $? -ne 0 ] && get_out 4 || printf "Success (job ID %s)\n" ${TRUS_JIDN}
+print_step 'Pending job'
+job_pending
+print_step 'Job finished'
+
+
+## Check job state & get computation performances if succeeded
+##---------------------------------------------------
+print_step 'Test job state'
+[[ ! -e time.step || $( grep 'E R R O R' ocean.output ) ]] && get_out 5 || echo 'Success' ## Must be reviewed
+print_step 'Get job performances'
+get_time
+get_memy
+
+
+## Check outputs
+##---------------------------------------------------
+TRUS_RSLT='OK' ## 'OK' by default
+print_step 'Compare outputs'
+diff_results
+print_step 'Compare restarts'
+diff_restart
+[ $TRUS_RSLT == 'FAILED' ] && get_out 8
+
+
+## End, at least nothing has changed ;-)
+##---------------------------------------------------
+get_out 0
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/sortabletable.css
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/sortabletable.css	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/sortabletable.css	(revision 6138)
@@ -0,0 +1,50 @@
+.sort-table {
+	font:		Icon;
+	border:		1px Solid ThreeDShadow;
+	background:	Window;
+	color:		WindowText;
+}
+
+.sort-table thead {
+	background:	ButtonFace;
+}
+
+.sort-table td {
+	padding:	2px 5px;
+}
+
+.sort-table thead td {
+	border:			1px solid;
+	border-color:	ButtonHighlight ButtonShadow
+					ButtonShadow ButtonHighlight;
+	cursor:			default;
+}
+
+.sort-table thead td:active {
+	border-color:	ButtonShadow ButtonHighlight
+					ButtonHighlight ButtonShadow;
+	padding:		3px 4px 1px 6px;
+}
+
+.sort-table thead td[_sortType=None]:active {
+	border-color:	ButtonHighlight ButtonShadow
+					ButtonShadow ButtonHighlight;
+	padding:		2px 5px;
+}
+
+.sort-arrow {
+	width:					11px;
+	height:					11px;
+	background-position:	center center;
+	background-repeat:		no-repeat;
+	margin:					0 2px;
+}
+
+.sort-arrow.descending {
+	background-image:		url("images/downsimple.png");
+
+}
+
+.sort-arrow.ascending {
+	background-image:		url("images/upsimple.png");
+}
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/sortabletable.js
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/sortabletable.js	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/sortabletable.js	(revision 6138)
@@ -0,0 +1,438 @@
+/*----------------------------------------------------------------------------\
+|                            Sortable Table 1.12                              |
+|-----------------------------------------------------------------------------|
+|                         Created by Erik Arvidsson                           |
+|                  (http://webfx.eae.net/contact.html#erik)                   |
+|                      For WebFX (http://webfx.eae.net/)                      |
+|-----------------------------------------------------------------------------|
+| A DOM 1 based script that allows an ordinary HTML table to be sortable.     |
+|-----------------------------------------------------------------------------|
+|                  Copyright (c) 1998 - 2006 Erik Arvidsson                   |
+|-----------------------------------------------------------------------------|
+| Licensed under the Apache License, Version 2.0 (the "License"); you may not |
+| use this file except in compliance with the License.  You may obtain a copy |
+| of the License at http://www.apache.org/licenses/LICENSE-2.0                |
+| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
+| Unless  required  by  applicable law or  agreed  to  in  writing,  software |
+| distributed under the License is distributed on an  "AS IS" BASIS,  WITHOUT |
+| WARRANTIES OR  CONDITIONS OF ANY KIND,  either express or implied.  See the |
+| License  for the  specific language  governing permissions  and limitations |
+| under the License.                                                          |
+|-----------------------------------------------------------------------------|
+| 2003-01-10 | First version                                                  |
+| 2003-01-19 | Minor changes to the date parsing                              |
+| 2003-01-28 | JScript 5.0 fixes (no support for 'in' operator)               |
+| 2003-02-01 | Sloppy typo like error fixed in getInnerText                   |
+| 2003-07-04 | Added workaround for IE cellIndex bug.                         |
+| 2003-11-09 | The bDescending argument to sort was not correctly working     |
+|            | Using onclick DOM0 event if no support for addEventListener    |
+|            | or attachEvent                                                 |
+| 2004-01-13 | Adding addSortType and removeSortType which makes it a lot     |
+|            | easier to add new, custom sort types.                          |
+| 2004-01-27 | Switch to use descending = false as the default sort order.    |
+|            | Change defaultDescending to suit your needs.                   |
+| 2004-03-14 | Improved sort type None look and feel a bit                    |
+| 2004-08-26 | Made the handling of tBody and tHead more flexible. Now you    |
+|            | can use another tHead or no tHead, and you can chose some      |
+|            | other tBody.                                                   |
+| 2006-04-25 | Changed license to Apache Software License 2.0                 |  
+|-----------------------------------------------------------------------------|
+| Created 2003-01-10 | All changes are in the log above. | Updated 2006-04-25 |
+\----------------------------------------------------------------------------*/
+
+
+function SortableTable(oTable, oSortTypes) {
+
+	this.sortTypes = oSortTypes || [];
+
+	this.sortColumn = null;
+	this.descending = null;
+
+	var oThis = this;
+	this._headerOnclick = function (e) {
+		oThis.headerOnclick(e);
+	};
+
+	if (oTable) {
+		this.setTable( oTable );
+		this.document = oTable.ownerDocument || oTable.document;
+	}
+	else {
+		this.document = document;
+	}
+
+
+	// only IE needs this
+	var win = this.document.defaultView || this.document.parentWindow;
+	this._onunload = function () {
+		oThis.destroy();
+	};
+	if (win && typeof win.attachEvent != "undefined") {
+		win.attachEvent("onunload", this._onunload);
+	}
+}
+
+SortableTable.gecko = navigator.product == "Gecko";
+SortableTable.msie = /msie/i.test(navigator.userAgent);
+// Mozilla is faster when doing the DOM manipulations on
+// an orphaned element. MSIE is not
+SortableTable.removeBeforeSort = SortableTable.gecko;
+
+SortableTable.prototype.onsort = function () {};
+
+// default sort order. true -> descending, false -> ascending
+SortableTable.prototype.defaultDescending = false;
+
+// shared between all instances. This is intentional to allow external files
+// to modify the prototype
+SortableTable.prototype._sortTypeInfo = {};
+
+SortableTable.prototype.setTable = function (oTable) {
+	if ( this.tHead )
+		this.uninitHeader();
+	this.element = oTable;
+	this.setTHead( oTable.tHead );
+	this.setTBody( oTable.tBodies[0] );
+};
+
+SortableTable.prototype.setTHead = function (oTHead) {
+	if (this.tHead && this.tHead != oTHead )
+		this.uninitHeader();
+	this.tHead = oTHead;
+	this.initHeader( this.sortTypes );
+};
+
+SortableTable.prototype.setTBody = function (oTBody) {
+	this.tBody = oTBody;
+};
+
+SortableTable.prototype.setSortTypes = function ( oSortTypes ) {
+	if ( this.tHead )
+		this.uninitHeader();
+	this.sortTypes = oSortTypes || [];
+	if ( this.tHead )
+		this.initHeader( this.sortTypes );
+};
+
+// adds arrow containers and events
+// also binds sort type to the header cells so that reordering columns does
+// not break the sort types
+SortableTable.prototype.initHeader = function (oSortTypes) {
+	if (!this.tHead) return;
+	var cells = this.tHead.rows[0].cells;
+	var doc = this.tHead.ownerDocument || this.tHead.document;
+	this.sortTypes = oSortTypes || [];
+	var l = cells.length;
+	var img, c;
+	for (var i = 0; i < l; i++) {
+		c = cells[i];
+		if (this.sortTypes[i] != null && this.sortTypes[i] != "None") {
+			img = doc.createElement("IMG");
+			img.src = "html/images/blank.png";
+			c.appendChild(img);
+			if (this.sortTypes[i] != null)
+				c._sortType = this.sortTypes[i];
+			if (typeof c.addEventListener != "undefined")
+				c.addEventListener("click", this._headerOnclick, false);
+			else if (typeof c.attachEvent != "undefined")
+				c.attachEvent("onclick", this._headerOnclick);
+			else
+				c.onclick = this._headerOnclick;
+		}
+		else
+		{
+			c.setAttribute( "_sortType", oSortTypes[i] );
+			c._sortType = "None";
+		}
+	}
+	this.updateHeaderArrows();
+};
+
+// remove arrows and events
+SortableTable.prototype.uninitHeader = function () {
+	if (!this.tHead) return;
+	var cells = this.tHead.rows[0].cells;
+	var l = cells.length;
+	var c;
+	for (var i = 0; i < l; i++) {
+		c = cells[i];
+		if (c._sortType != null && c._sortType != "None") {
+			c.removeChild(c.lastChild);
+			if (typeof c.removeEventListener != "undefined")
+				c.removeEventListener("click", this._headerOnclick, false);
+			else if (typeof c.detachEvent != "undefined")
+				c.detachEvent("onclick", this._headerOnclick);
+			c._sortType = null;
+			c.removeAttribute( "_sortType" );
+		}
+	}
+};
+
+SortableTable.prototype.updateHeaderArrows = function () {
+	if (!this.tHead) return;
+	var cells = this.tHead.rows[0].cells;
+	var l = cells.length;
+	var img;
+	for (var i = 0; i < l; i++) {
+		if (cells[i]._sortType != null && cells[i]._sortType != "None") {
+			img = cells[i].lastChild;
+			if (i == this.sortColumn)
+				img.className = "sort-arrow " + (this.descending ? "descending" : "ascending");
+			else
+				img.className = "sort-arrow";
+		}
+	}
+};
+
+SortableTable.prototype.headerOnclick = function (e) {
+	// find TD element
+	var el = e.target || e.srcElement;
+	while (el.tagName != "TD")
+		el = el.parentNode;
+
+	this.sort(SortableTable.msie ? SortableTable.getCellIndex(el) : el.cellIndex);
+};
+
+// IE returns wrong cellIndex when columns are hidden
+SortableTable.getCellIndex = function (oTd) {
+	var cells = oTd.parentNode.childNodes
+	var l = cells.length;
+	var i;
+	for (i = 0; cells[i] != oTd && i < l; i++)
+		;
+	return i;
+};
+
+SortableTable.prototype.getSortType = function (nColumn) {
+	return this.sortTypes[nColumn] || "String";
+};
+
+// only nColumn is required
+// if bDescending is left out the old value is taken into account
+// if sSortType is left out the sort type is found from the sortTypes array
+
+SortableTable.prototype.sort = function (nColumn, bDescending, sSortType) {
+	if (!this.tBody) return;
+	if (sSortType == null)
+		sSortType = this.getSortType(nColumn);
+
+	// exit if None
+	if (sSortType == "None")
+		return;
+
+	if (bDescending == null) {
+		if (this.sortColumn != nColumn)
+			this.descending = this.defaultDescending;
+		else
+			this.descending = !this.descending;
+	}
+	else
+		this.descending = bDescending;
+
+	this.sortColumn = nColumn;
+
+	if (typeof this.onbeforesort == "function")
+		this.onbeforesort();
+
+	var f = this.getSortFunction(sSortType, nColumn);
+	var a = this.getCache(sSortType, nColumn);
+	var tBody = this.tBody;
+
+	a.sort(f);
+
+	if (this.descending)
+		a.reverse();
+
+	if (SortableTable.removeBeforeSort) {
+		// remove from doc
+		var nextSibling = tBody.nextSibling;
+		var p = tBody.parentNode;
+		p.removeChild(tBody);
+	}
+
+	// insert in the new order
+	var l = a.length;
+	for (var i = 0; i < l; i++)
+		tBody.appendChild(a[i].element);
+
+	if (SortableTable.removeBeforeSort) {
+		// insert into doc
+		p.insertBefore(tBody, nextSibling);
+	}
+
+	this.updateHeaderArrows();
+
+	this.destroyCache(a);
+
+	if (typeof this.onsort == "function")
+		this.onsort();
+};
+
+SortableTable.prototype.asyncSort = function (nColumn, bDescending, sSortType) {
+	var oThis = this;
+	this._asyncsort = function () {
+		oThis.sort(nColumn, bDescending, sSortType);
+	};
+	window.setTimeout(this._asyncsort, 1);
+};
+
+SortableTable.prototype.getCache = function (sType, nColumn) {
+	if (!this.tBody) return [];
+	var rows = this.tBody.rows;
+	var l = rows.length;
+	var a = new Array(l);
+	var r;
+	for (var i = 0; i < l; i++) {
+		r = rows[i];
+		a[i] = {
+			value:		this.getRowValue(r, sType, nColumn),
+			element:	r
+		};
+	};
+	return a;
+};
+
+SortableTable.prototype.destroyCache = function (oArray) {
+	var l = oArray.length;
+	for (var i = 0; i < l; i++) {
+		oArray[i].value = null;
+		oArray[i].element = null;
+		oArray[i] = null;
+	}
+};
+
+SortableTable.prototype.getRowValue = function (oRow, sType, nColumn) {
+	// if we have defined a custom getRowValue use that
+	if (this._sortTypeInfo[sType] && this._sortTypeInfo[sType].getRowValue)
+		return this._sortTypeInfo[sType].getRowValue(oRow, nColumn);
+
+	var s;
+	var c = oRow.cells[nColumn];
+	if (typeof c.innerText != "undefined")
+		s = c.innerText;
+	else
+		s = SortableTable.getInnerText(c);
+	return this.getValueFromString(s, sType);
+};
+
+SortableTable.getInnerText = function (oNode) {
+	var s = "";
+	var cs = oNode.childNodes;
+	var l = cs.length;
+	for (var i = 0; i < l; i++) {
+		switch (cs[i].nodeType) {
+			case 1: //ELEMENT_NODE
+				s += SortableTable.getInnerText(cs[i]);
+				break;
+			case 3:	//TEXT_NODE
+				s += cs[i].nodeValue;
+				break;
+		}
+	}
+	return s;
+};
+
+SortableTable.prototype.getValueFromString = function (sText, sType) {
+	if (this._sortTypeInfo[sType])
+		return this._sortTypeInfo[sType].getValueFromString( sText );
+	return sText;
+	/*
+	switch (sType) {
+		case "Number":
+			return Number(sText);
+		case "CaseInsensitiveString":
+			return sText.toUpperCase();
+		case "Date":
+			var parts = sText.split("-");
+			var d = new Date(0);
+			d.setFullYear(parts[0]);
+			d.setDate(parts[2]);
+			d.setMonth(parts[1] - 1);
+			return d.valueOf();
+	}
+	return sText;
+	*/
+	};
+
+SortableTable.prototype.getSortFunction = function (sType, nColumn) {
+	if (this._sortTypeInfo[sType])
+		return this._sortTypeInfo[sType].compare;
+	return SortableTable.basicCompare;
+};
+
+SortableTable.prototype.destroy = function () {
+	this.uninitHeader();
+	var win = this.document.parentWindow;
+	if (win && typeof win.detachEvent != "undefined") {	// only IE needs this
+		win.detachEvent("onunload", this._onunload);
+	}
+	this._onunload = null;
+	this.element = null;
+	this.tHead = null;
+	this.tBody = null;
+	this.document = null;
+	this._headerOnclick = null;
+	this.sortTypes = null;
+	this._asyncsort = null;
+	this.onsort = null;
+};
+
+// Adds a sort type to all instance of SortableTable
+// sType : String - the identifier of the sort type
+// fGetValueFromString : function ( s : string ) : T - A function that takes a
+//    string and casts it to a desired format. If left out the string is just
+//    returned
+// fCompareFunction : function ( n1 : T, n2 : T ) : Number - A normal JS sort
+//    compare function. Takes two values and compares them. If left out less than,
+//    <, compare is used
+// fGetRowValue : function( oRow : HTMLTRElement, nColumn : int ) : T - A function
+//    that takes the row and the column index and returns the value used to compare.
+//    If left out then the innerText is first taken for the cell and then the
+//    fGetValueFromString is used to convert that string the desired value and type
+
+SortableTable.prototype.addSortType = function (sType, fGetValueFromString, fCompareFunction, fGetRowValue) {
+	this._sortTypeInfo[sType] = {
+		type:				sType,
+		getValueFromString:	fGetValueFromString || SortableTable.idFunction,
+		compare:			fCompareFunction || SortableTable.basicCompare,
+		getRowValue:		fGetRowValue
+	};
+};
+
+// this removes the sort type from all instances of SortableTable
+SortableTable.prototype.removeSortType = function (sType) {
+	delete this._sortTypeInfo[sType];
+};
+
+SortableTable.basicCompare = function compare(n1, n2) {
+	if (n1.value < n2.value)
+		return -1;
+	if (n2.value < n1.value)
+		return 1;
+	return 0;
+};
+
+SortableTable.idFunction = function (x) {
+	return x;
+};
+
+SortableTable.toUpperCase = function (s) {
+	return s.toUpperCase();
+};
+
+SortableTable.toDate = function (s) {
+	var parts = s.split("-");
+	var d = new Date(0);
+	d.setFullYear(parts[0]);
+	d.setDate(parts[2]);
+	d.setMonth(parts[1] - 1);
+	return d.valueOf();
+};
+
+
+// add sort types
+SortableTable.prototype.addSortType("Number", Number);
+SortableTable.prototype.addSortType("CaseInsensitiveString", SortableTable.toUpperCase);
+SortableTable.prototype.addSortType("Date", SortableTable.toDate);
+SortableTable.prototype.addSortType("String");
+// None is a special case
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/tab-view.css
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/tab-view.css	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/tab-view.css	(revision 6138)
@@ -0,0 +1,60 @@
+	.dhtmlgoodies_tabPane{
+		height:21px;	/* Height of tabs */
+		border-bottom:1px solid #919b9c;
+	}
+	.dhtmlgoodies_aTab{
+		border-left:1px solid #919b9c;
+		border-right:1px solid #919b9c;
+		border-bottom:1px solid #919b9c;
+		font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
+		padding:5px;		
+		
+	}
+	.dhtmlgoodies_tabPane DIV{
+		float:left;
+		height:100%;	/* Height of tabs */
+		padding-left:3px;
+		vertical-align:middle;
+		background-repeat:no-repeat;
+		background-position:bottom left;
+		cursor:pointer;
+		position:relative;
+		bottom:-1px;
+		margin-left:0px;
+		margin-right:0px;
+	}
+	.dhtmlgoodies_tabPane .tabActive{
+		background-image:url('../images/tab_left_active.gif');
+		margin-left:0px;
+		margin-right:0px;	
+		z-index:10;	
+	}
+	.dhtmlgoodies_tabPane .tabInactive{
+		background-image:url('../images/tab_left_inactive.gif');
+		margin-left:0px;
+		margin-right:0px;
+		z-index:1;
+	}
+
+	.dhtmlgoodies_tabPane .inactiveTabOver{
+		background-image:url('../images/tab_left_over.gif');
+		margin-left:0px;
+		margin-right:0px;
+	}
+	.dhtmlgoodies_tabPane span{
+		font-family:arial;
+		vertical-align:top;
+		font-size:11px;
+		padding-left:3px;
+		padding-right:3px;		
+		line-height:21px;
+		float:left;
+	}
+	.dhtmlgoodies_tabPane .tabActive span{
+		padding-bottom:1px;
+		line-height:20px;
+	}
+	
+	.dhtmlgoodies_tabPane img{
+		float:left;
+	}
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/tab-view.js
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/tab-view.js	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/html/tab-view.js	(revision 6138)
@@ -0,0 +1,375 @@
+	/************************************************************************************************************
+	(C) www.dhtmlgoodies.com, October 2005
+	
+	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
+	
+	Terms of use:
+	You are free to use this script as long as the copyright message is kept intact. However, you may not
+	redistribute, sell or repost it without our permission.
+	
+	Updated:
+		
+		March, 14th, 2006 - Create new tabs dynamically
+		March, 15th, 2006 - Dynamically delete a tab
+		
+	Thank you!
+	
+	www.dhtmlgoodies.com
+	Alf Magne Kalleland
+	
+	************************************************************************************************************/		
+	var textPadding = 3; // Padding at the left of tab text - bigger value gives you wider tabs
+	var strictDocType = true; 
+	var tabView_maxNumberOfTabs = 6;	// Maximum number of tabs
+	
+	/* Don't change anything below here */
+	var dhtmlgoodies_tabObj = new Array();
+	var activeTabIndex = new Array();
+	var MSIE = navigator.userAgent.indexOf('MSIE')>=0?true:false;
+	
+	var regExp = new RegExp(".*MSIE ([0-9]\.[0-9]).*","g");
+	var navigatorVersion = navigator.userAgent.replace(regExp,'$1');
+	
+	var ajaxObjects = new Array();
+	var tabView_countTabs = new Array();
+	var tabViewHeight = new Array();
+	var tabDivCounter = 0;
+	var closeImageHeight = 8;	// Pixel height of close buttons
+	var closeImageWidth = 8;	// Pixel height of close buttons
+	
+	
+	function setPadding(obj,padding){
+		var span = obj.getElementsByTagName('SPAN')[0];
+		span.style.paddingLeft = padding + 'px';	
+		span.style.paddingRight = padding + 'px';	
+	}
+	function showTab(parentId,tabIndex)
+	{
+		var parentId_div = parentId + "_";
+		if(!document.getElementById('tabView' + parentId_div + tabIndex)){
+			return;
+		}
+		if(activeTabIndex[parentId]>=0){
+			if(activeTabIndex[parentId]==tabIndex){
+				return;
+			}
+	
+			var obj = document.getElementById('tabTab'+parentId_div + activeTabIndex[parentId]);
+			
+			obj.className='tabInactive';
+			var img = obj.getElementsByTagName('IMG')[0];
+			if(img.src.indexOf('tab_')==-1)img = obj.getElementsByTagName('IMG')[1];
+			img.src = 'images/tab_right_inactive.gif';
+			document.getElementById('tabView' + parentId_div + activeTabIndex[parentId]).style.display='none';
+		}
+		
+		var thisObj = document.getElementById('tabTab'+ parentId_div +tabIndex);	
+			
+		thisObj.className='tabActive';
+		var img = thisObj.getElementsByTagName('IMG')[0];
+		if(img.src.indexOf('tab_')==-1)img = thisObj.getElementsByTagName('IMG')[1];
+		img.src = 'images/tab_right_active.gif';
+		
+		document.getElementById('tabView' + parentId_div + tabIndex).style.display='block';
+		activeTabIndex[parentId] = tabIndex;
+		
+
+		var parentObj = thisObj.parentNode;
+		var aTab = parentObj.getElementsByTagName('DIV')[0];
+		countObjects = 0;
+		var startPos = 2;
+		var previousObjectActive = false;
+		while(aTab){
+			if(aTab.tagName=='DIV'){
+				if(previousObjectActive){
+					previousObjectActive = false;
+					startPos-=2;
+				}
+				if(aTab==thisObj){
+					startPos-=2;
+					previousObjectActive=true;
+					setPadding(aTab,textPadding+1);
+				}else{
+					setPadding(aTab,textPadding);
+				}
+				
+				aTab.style.left = startPos + 'px';
+				countObjects++;
+				startPos+=2;
+			}			
+			aTab = aTab.nextSibling;
+		}
+		
+		return;
+	}
+	
+	function tabClick()
+	{
+		var idArray = this.id.split('_');		
+		showTab(this.parentNode.parentNode.id,idArray[idArray.length-1].replace(/[^0-9]/gi,''));
+		
+	}
+	
+	function rolloverTab()
+	{
+		if(this.className.indexOf('tabInactive')>=0){
+			this.className='inactiveTabOver';
+			var img = this.getElementsByTagName('IMG')[0];
+			if(img.src.indexOf('tab_')<=0)img = this.getElementsByTagName('IMG')[1];
+			img.src = 'images/tab_right_over.gif';
+		}
+		
+	}
+	function rolloutTab()
+	{
+		if(this.className ==  'inactiveTabOver'){
+			this.className='tabInactive';
+			var img = this.getElementsByTagName('IMG')[0];
+			if(img.src.indexOf('tab_')<=0)img = this.getElementsByTagName('IMG')[1];
+			img.src = 'images/tab_right_inactive.gif';
+		}
+		
+	}
+	
+	function hoverTabViewCloseButton()
+	{
+		this.src = this.src.replace('close.gif','close_over.gif');
+	}
+	
+	function stopHoverTabViewCloseButton()
+	{
+		this.src = this.src.replace('close_over.gif','close.gif');
+	}
+	
+	function initTabs(mainContainerID,tabTitles,activeTab,width,height,closeButtonArray,additionalTab)
+	{
+		if(!closeButtonArray)closeButtonArray = new Array();
+		
+		if(!additionalTab || additionalTab=='undefined'){			
+			dhtmlgoodies_tabObj[mainContainerID] = document.getElementById(mainContainerID);
+			width = width + '';
+			if(width.indexOf('%')<0)width= width + 'px';
+			dhtmlgoodies_tabObj[mainContainerID].style.width = width;
+						
+			height = height + '';
+			if(height.length>0){
+				if(height.indexOf('%')<0)height= height + 'px';
+				dhtmlgoodies_tabObj[mainContainerID].style.height = height;
+			}
+			
+
+			tabViewHeight[mainContainerID] = height;
+			
+			var tabDiv = document.createElement('DIV');		
+			var firstDiv = dhtmlgoodies_tabObj[mainContainerID].getElementsByTagName('DIV')[0];	
+			
+			dhtmlgoodies_tabObj[mainContainerID].insertBefore(tabDiv,firstDiv);	
+			tabDiv.className = 'dhtmlgoodies_tabPane';			
+			tabView_countTabs[mainContainerID] = 0;
+
+		}else{
+			var tabDiv = dhtmlgoodies_tabObj[mainContainerID].getElementsByTagName('DIV')[0];
+			var firstDiv = dhtmlgoodies_tabObj[mainContainerID].getElementsByTagName('DIV')[1];
+			height = tabViewHeight[mainContainerID];
+			activeTab = tabView_countTabs[mainContainerID];		
+	
+			
+		}
+		
+		
+		
+		for(var no=0;no<tabTitles.length;no++){
+			var aTab = document.createElement('DIV');
+			aTab.id = 'tabTab' + mainContainerID + "_" +  (no + tabView_countTabs[mainContainerID]);
+			aTab.onmouseover = rolloverTab;
+			aTab.onmouseout = rolloutTab;
+			aTab.onclick = tabClick;
+			aTab.className='tabInactive';
+			tabDiv.appendChild(aTab);
+			var span = document.createElement('SPAN');
+			span.innerHTML = tabTitles[no];
+			span.style.position = 'relative';
+			aTab.appendChild(span);
+			
+			if(closeButtonArray[no]){
+				var closeButton = document.createElement('IMG');
+				closeButton.src = 'images/close.gif';
+				closeButton.height = closeImageHeight + 'px';
+				closeButton.width = closeImageHeight + 'px';
+				closeButton.setAttribute('height',closeImageHeight);
+				closeButton.setAttribute('width',closeImageHeight);
+				closeButton.style.position='absolute';
+				closeButton.style.top = '6px';
+				closeButton.style.right = '0px';
+				closeButton.onmouseover = hoverTabViewCloseButton;
+				closeButton.onmouseout = stopHoverTabViewCloseButton;
+				
+				span.innerHTML = span.innerHTML + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';	
+				
+				var deleteTxt = span.innerHTML+'';
+
+				closeButton.onclick = function(){ deleteTab(this.parentNode.innerHTML) };
+				span.appendChild(closeButton);
+			}
+			
+			var img = document.createElement('IMG');
+			img.valign = 'bottom';
+			img.src = 'images/tab_right_inactive.gif';
+			// IE5.X FIX
+			if((navigatorVersion && navigatorVersion<6) || (MSIE && !strictDocType)){
+				img.style.styleFloat = 'none';
+				img.style.position = 'relative';	
+				img.style.top = '4px'
+				span.style.paddingTop = '4px';
+				aTab.style.cursor = 'hand';
+			}	// End IE5.x FIX
+			aTab.appendChild(img);
+		}
+
+		var tabs = dhtmlgoodies_tabObj[mainContainerID].getElementsByTagName('DIV');
+		var divCounter = 0;
+		for(var no=0;no<tabs.length;no++){
+			if(tabs[no].className=='dhtmlgoodies_aTab' && tabs[no].parentNode.id == mainContainerID){
+				if(height.length>0)tabs[no].style.height = height;
+				tabs[no].style.display='none';
+				tabs[no].id = 'tabView' + mainContainerID + "_" + divCounter;
+				divCounter++;
+			}			
+		}	
+		tabView_countTabs[mainContainerID] = tabView_countTabs[mainContainerID] + tabTitles.length;	
+		showTab(mainContainerID,activeTab);
+
+		return activeTab;
+	}	
+	
+	function showAjaxTabContent(ajaxIndex,parentId,tabId)
+	{
+		var obj = document.getElementById('tabView'+parentId + '_' + tabId);
+		obj.innerHTML = ajaxObjects[ajaxIndex].response;		
+	}
+	
+	function resetTabIds(parentId)
+	{
+		var tabTitleCounter = 0;
+		var tabContentCounter = 0;
+		
+		
+		var divs = dhtmlgoodies_tabObj[parentId].getElementsByTagName('DIV');
+
+		
+		for(var no=0;no<divs.length;no++){
+			if(divs[no].className=='dhtmlgoodies_aTab'){
+				divs[no].id = 'tabView' + parentId + '_' + tabTitleCounter;
+				tabTitleCounter++;
+			}
+			if(divs[no].id.indexOf('tabTab')>=0){
+				divs[no].id = 'tabTab' + parentId + '_' + tabContentCounter;	
+				tabContentCounter++;
+			}	
+			
+				
+		}
+	
+		tabView_countTabs[parentId] = tabContentCounter;
+	}
+	
+	
+	function createNewTab(parentId,tabTitle,tabContent,tabContentUrl,closeButton)
+	{
+		if(tabView_countTabs[parentId]>=tabView_maxNumberOfTabs)return;	// Maximum number of tabs reached - return
+		var div = document.createElement('DIV');
+		div.className = 'dhtmlgoodies_aTab';
+		dhtmlgoodies_tabObj[parentId].appendChild(div);		
+
+		var tabId = initTabs(parentId,Array(tabTitle),0,'','',Array(closeButton),true);
+		if(tabContent)div.innerHTML = tabContent;
+		if(tabContentUrl){		
+			var ajaxIndex = ajaxObjects.length;
+			ajaxObjects[ajaxIndex] = new sack();
+			ajaxObjects[ajaxIndex].requestFile = tabContentUrl;	// Specifying which file to get
+
+			ajaxObjects[ajaxIndex].onCompletion = function(){ showAjaxTabContent(ajaxIndex,parentId,tabId); };	// Specify function that will be executed after file has been found
+			ajaxObjects[ajaxIndex].runAJAX();		// Execute AJAX function	
+		
+		}
+				
+	}
+	
+	function getTabIndexByTitle(tabTitle)
+	{
+		var regExp = new RegExp("(.*?)&nbsp.*$","gi");
+		tabTitle = tabTitle.replace(regExp,'$1');
+		for(var prop in dhtmlgoodies_tabObj){
+			var divs = dhtmlgoodies_tabObj[prop].getElementsByTagName('DIV');
+			for(var no=0;no<divs.length;no++){
+				if(divs[no].id.indexOf('tabTab')>=0){
+					var span = divs[no].getElementsByTagName('SPAN')[0];
+					var regExp2 = new RegExp("(.*?)&nbsp.*$","gi");
+					var spanTitle = span.innerHTML.replace(regExp2,'$1');
+					
+					if(spanTitle == tabTitle){
+						
+						var tmpId = divs[no].id.split('_');						
+						return Array(prop,tmpId[tmpId.length-1].replace(/[^0-9]/g,'')/1);
+					}		
+				}
+			}
+		}
+		
+		return -1;
+		
+	}
+	
+	/* Call this function if you want to display some content from external file in one of the tabs 
+	Arguments: Title of tab and relative path to external file */
+	
+	function addAjaxContentToTab(tabTitle,tabContentUrl)
+	{
+		var index = getTabIndexByTitle(tabTitle);
+		if(index!=-1){
+			var ajaxIndex = ajaxObjects.length;
+			
+			tabId = index[1];
+			parentId = index[0];
+			
+			
+			ajaxObjects[ajaxIndex] = new sack();
+			ajaxObjects[ajaxIndex].requestFile = tabContentUrl;	// Specifying which file to get
+
+			ajaxObjects[ajaxIndex].onCompletion = function(){ showAjaxTabContent(ajaxIndex,parentId,tabId); };	// Specify function that will be executed after file has been found
+			ajaxObjects[ajaxIndex].runAJAX();		// Execute AJAX function				
+			
+		}	
+	}
+
+	
+	
+	function deleteTab(tabLabel,tabIndex,parentId)
+	{
+
+		if(tabLabel){
+			var index = getTabIndexByTitle(tabLabel);
+			if(index!=-1){
+				deleteTab(false,index[1],index[0]);
+			}
+			
+		}else if(tabIndex>=0){
+			if(document.getElementById('tabTab' + parentId + '_' + tabIndex)){
+				var obj = document.getElementById('tabTab' + parentId + '_' + tabIndex);
+				var id = obj.parentNode.parentNode.id;
+				obj.parentNode.removeChild(obj);
+				var obj2 = document.getElementById('tabView' + parentId + '_' + tabIndex);
+				obj2.parentNode.removeChild(obj2);
+				resetTabIds(parentId);
+				activeTabIndex[parentId]=-1;
+				showTab(parentId,'0');
+			}			
+		}
+		
+
+			
+		
+		
+	}
+	
+	
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/index.html
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/index.html	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/index.html	(revision 6138)
@@ -0,0 +1,354 @@
+<html>
+
+  <head>
+
+    <title>NEMO Trusting Dashboard</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <script type="text/javascript" src="html/sortabletable.js"></script>
+    <link type="text/css" rel="StyleSheet" href="html/sortabletable.css" />
+    <link rel="stylesheet" href="html/tab-view.css" type="text/css" media="screen">
+    <script type="text/javascript" src="html/tab-view.js"></script>
+    <style type="text/css">
+      body    { font-family:Helvetica, Arial, Sans-Serif;                      	    	      }
+      a1      { color:#000000; text-decoration:none;                           	    	      }
+      .title  { background:#AABBBB; font-weight:bold;                          	    	      }
+      .even   { background:#eee;                                               	    	      }
+      .odd    { background:#ddd;                                               	    	      }
+      td      { font-family:Arial    ; font-size:10pt; padding:1px 5px 1px 5px;	    	      }
+      .td1    { font-family:Monospace; font-size:10pt; padding:1px 5px 1px 5px;	    	      }
+      .table1 { background:#E6EEC9; border-collapse:collapse;                  	    	      }
+      .table2 { background:#E6EEC9; border-collapse:collapse;                  	    	      }
+      .myh3   { font-weight:bold; font-style:italic; font-family:Arial,Helvetica,sans-serif
+                background-color:#FFD700; border:2px outset #FFFFFF
+                padding: 1px 20px 1px 20px; width:120px; -moz-border-radius:6px 6px 6px 6px;  }
+    </style>
+
+  </head>
+
+  <body>
+
+    <?php
+       ini_set('display_errors', 'Off'); error_reporting(E_ALL);
+       include 'read_trusting.php';
+       $DODS_TGCC="http://dods.extra.cea.fr/store/martin/trusting"; $DODS_IDRIS="http://dodsp.idris.fr/romr005/trusting";
+       $file_headers=get_headers("${DODS_TGCC}/ORCA2_LIM_PISCES/nemo_v3_6_STABLE/trusting_info.html");
+       if ($file_headers[0] == '' ) { $LOCATION="./src/martin"; } else { $LOCATION="${DODS_TGCC}"; }
+    ?>
+
+       <!--$ctx=stream_context_create(array('http'=>array('timeout'=>1)));
+       $test=file_get_contents("${DODS_TGCC}/ORCA2_LIM_PISCES/nemo_v3_6_STABLE/trusting_info.html", 0, $ctx);
+       if ($test == FALSE ) { $LOCATION="./src/martin"; } else { $LOCATION="${DODS_TGCC}"; }-->
+
+    <!-----Begin NEMO trust----->
+    <div id="dhtmlgoodies_tabViewNEMO">
+
+      <!-----Begin v36 trust----->
+      <?php $BRANCH="nemo_v3_6_STABLE" ?>
+      <div class="dhtmlgoodies_aTab">
+	<div id="dhtmlgoodies_tabViewConf">
+
+	  <!-----Begin O2LP trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="ORCA2_LIM_PISCES"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html"); ?>
+	    <div id="dhtmlgoodies_tabViewHPCC">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-1" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-1"),
+	                   [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-2" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-2"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O2LP trust----->
+
+	  <!-----Begin O1L3P trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="ORCA1_LIM3_PISCES"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC2">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-3" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-3"),
+	                   [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-4" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-4"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O1L3P trust----->
+
+	  <!-----Begin AMM12 trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="AMM12"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC3">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-5" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-5"),
+	                   [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-6" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-6"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End AMM12 trust----->
+
+	</div>
+      </div>
+      <!-----End v36 trust----->
+
+
+      <!-----Begin trunk trust----->
+      <?php $BRANCH="trunk" ?>
+      <div class="dhtmlgoodies_aTab">
+	<div id="dhtmlgoodies_tabViewConf2">
+
+	  <!-----Begin O2LP trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="ORCA2_LIM_PISCES"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC4">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-7" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-7"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End   Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-8" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-8"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O2LP trust----->
+
+	  <!-----Begin O1L3P trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="ORCA1_LIM3_PISCES"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC5">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-9" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-9"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End   Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-10" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-10"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O1L3P trust----->
+
+	  <!-----Begin AMM12 trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="AMM12"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC6">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-11" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-11"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End   Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-12" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-12"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O1L3P trust----->
+
+	</div>
+      </div>
+      <!-----End trunk trust----->
+
+    </div>
+    <!-----End NEMO trust----->
+
+    <!-------------------------------------------------------------------------------------------->
+    <script type="text/javascript">
+      initTabs('dhtmlgoodies_tabViewNEMO'        ,
+               Array('<B>&nbsp;3.6&nbsp;  </B>',
+	             '<B>&nbsp;trunk&nbsp;</B>' 
+                                                ),
+               0,1820,15100                      ,
+               Array(false)                       )
+      initTabs('dhtmlgoodies_tabViewConf'                                        ,
+               Array('<B style="color: green">&nbsp;ORCA2_LIM_PISCES&nbsp;  </B>',
+	       	     '<B style="color: green">&nbsp;ORCA1_LIM3_PISCES&nbsp; </B>',
+	       	     '<B style="color: green">&nbsp;AMM12&nbsp;             </B>',
+	       	     '<B style="color: red  ">&nbsp;C1D_PAPA&nbsp;          </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE&nbsp;              </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_BFM&nbsp;          </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_PISCES&nbsp;       </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_XIOS&nbsp;         </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM&nbsp;         </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM3&nbsp;        </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM_CFC_C14b&nbsp;</B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_OFF_PISCES&nbsp;  </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_SAS_LIM&nbsp;     </B>' 
+	                                                                          ),
+               0,1810,15050                                                        ,
+               Array(false)                                                         )
+      initTabs('dhtmlgoodies_tabViewConf2'                                       ,
+               Array('<B style="color: green">&nbsp;ORCA2_LIM_PISCES&nbsp;  </B>',
+	       	     '<B style="color: green">&nbsp;ORCA1_LIM3_PISCES&nbsp; </B>',
+	       	     '<B style="color: green">&nbsp;AMM12&nbsp;             </B>',
+	       	     '<B style="color: red  ">&nbsp;C1D_PAPA&nbsp;          </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE&nbsp;              </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_BFM&nbsp;          </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_PISCES&nbsp;       </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_XIOS&nbsp;         </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM&nbsp;         </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM3&nbsp;        </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM_CFC_C14b&nbsp;</B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_OFF_PISCES&nbsp;  </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_SAS_LIM&nbsp;     </B>' 
+	                                                                          ),
+               0,1810,15050                                                        ,
+               Array(false)                                                         )
+      initTabs('dhtmlgoodies_tabViewHPCC'                         ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC2'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC3'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC4'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC5'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC6'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+    </script>
+    <!-------------------------------------------------------------------------------------------->
+
+  </body>
+
+</html>
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/index.php
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/index.php	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/index.php	(revision 6138)
@@ -0,0 +1,354 @@
+<html>
+
+  <head>
+
+    <title>Trusting Dashboard</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <script type="text/javascript" src="html/sortabletable.js"></script>
+    <link type="text/css" rel="StyleSheet" href="html/sortabletable.css" />
+    <link rel="stylesheet" href="html/tab-view.css" type="text/css" media="screen">
+    <script type="text/javascript" src="html/tab-view.js"></script>
+    <style type="text/css">
+      body    { font-family:Helvetica, Arial, Sans-Serif;                      	    	      }
+      a1      { color:#000000; text-decoration:none;                           	    	      }
+      .title  { background:#AABBBB; font-weight:bold;                          	    	      }
+      .even   { background:#eee;                                               	    	      }
+      .odd    { background:#ddd;                                               	    	      }
+      td      { font-family:Arial    ; font-size:10pt; padding:1px 5px 1px 5px;	    	      }
+      .td1    { font-family:Monospace; font-size:10pt; padding:1px 5px 1px 5px;	    	      }
+      .table1 { background:#E6EEC9; border-collapse:collapse;                  	    	      }
+      .table2 { background:#E6EEC9; border-collapse:collapse;                  	    	      }
+      .myh3   { font-weight:bold; font-style:italic; font-family:Arial,Helvetica,sans-serif
+                background-color:#FFD700; border:2px outset #FFFFFF
+                padding: 1px 20px 1px 20px; width:120px; -moz-border-radius:6px 6px 6px 6px;  }
+    </style>
+
+  </head>
+
+  <body>
+
+    <?php
+       ini_set('display_errors', 'Off'); error_reporting(E_ALL);
+       include 'read_trusting.php';
+       $DODS_TGCC="http://dods.extra.cea.fr/store/martin/trusting"; $DODS_IDRIS="http://dodsp.idris.fr/romr005/trusting";
+       $ctx=stream_context_create(array('http'=>array('timeout'=>1)));
+       $test=file_get_contents("${DODS_TGCC}/ORCA2_LIM_PISCES/nemo_v3_6_STABLE/trusting_info.html", 0, $ctx);
+       if ($test == FALSE ) { $LOCATION="./src/martin"; } else { $LOCATION="${DODS_TGCC}"; }
+    ?>
+
+    <!--$file_headers=get_headers("${DODS_TGCC}/ORCA2_LIM_PISCES/nemo_v3_6_STABLE/trusting_info.html");
+       if ($file_headers[0] == '' ) { $LOCATION="./src/martin"; } else { $LOCATION="${DODS_TGCC}"; }-->
+
+    <!-----Begin NEMO trust----->
+    <div id="dhtmlgoodies_tabViewNEMO">
+
+      <!-----Begin v36 trust----->
+      <?php $BRANCH="nemo_v3_6_STABLE" ?>
+      <div class="dhtmlgoodies_aTab">
+	<div id="dhtmlgoodies_tabViewConf">
+
+	  <!-----Begin O2LP trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="ORCA2_LIM_PISCES"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html"); ?>
+	    <div id="dhtmlgoodies_tabViewHPCC">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-1" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-1"),
+	                   [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-2" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-2"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O2LP trust----->
+
+	  <!-----Begin O1L3P trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="ORCA1_LIM3_PISCES"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC2">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-3" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-3"),
+	                   [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-4" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-4"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O1L3P trust----->
+
+	  <!-----Begin AMM12 trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="AMM12"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC3">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-5" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-5"),
+	                   [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-6" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-6"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End AMM12 trust----->
+
+	</div>
+      </div>
+      <!-----End v36 trust----->
+
+
+      <!-----Begin trunk trust----->
+      <?php $BRANCH="trunk" ?>
+      <div class="dhtmlgoodies_aTab">
+	<div id="dhtmlgoodies_tabViewConf2">
+
+	  <!-----Begin O2LP trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="ORCA2_LIM_PISCES"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC4">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-7" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-7"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End   Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-8" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-8"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O2LP trust----->
+
+	  <!-----Begin O1L3P trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="ORCA1_LIM3_PISCES"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC5">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-9" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-9"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End   Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-10" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-10"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O1L3P trust----->
+
+	  <!-----Begin AMM12 trust----->
+	  <div class="dhtmlgoodies_aTab">
+	    <?php $CONF="AMM12"; echo file_get_contents("$LOCATION/$CONF/$BRANCH/trusting_info.html") ?>
+	    <div id="dhtmlgoodies_tabViewHPCC6">
+
+	      <!-----Begin Curie trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-11" cellspacing="1">
+		  <?php read_trusting("$LOCATION/$CONF/$BRANCH/trusting_martin_X64_CURIE_cron.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-11"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End   Curie trust----->
+
+	      <!-----Begin Ada trust----->
+	      <div class="dhtmlgoodies_aTab">
+		<table class="sort-table" id="table-12" cellspacing="1">
+		  <?php read_trusting("${DODS_IDRIS}/$CONF/$BRANCH/trusting_romr005_X64_ADA_at.txt") ?>
+		</table>
+		<script type="text/javascript">
+		  var st = new SortableTable( document.getElementById("table-12"),
+		           [<?php print substr(str_repeat("\"String\",", $num),0,-1); ?>]);
+		  st.sort(0, true);
+		</script>
+	      </div>
+	      <!-----End Ada trust----->
+
+	    </div>
+	  </div>
+	  <!-----End O1L3P trust----->
+
+	</div>
+      </div>
+      <!-----End trunk trust----->
+
+    </div>
+    <!-----End NEMO trust----->
+
+    <!-------------------------------------------------------------------------------------------->
+    <script type="text/javascript">
+      initTabs('dhtmlgoodies_tabViewNEMO'        ,
+               Array('<B>&nbsp;3.6&nbsp;  </B>',
+	             '<B>&nbsp;trunk&nbsp;</B>' 
+                                                ),
+               0,1820,15100                      ,
+               Array(false)                       )
+      initTabs('dhtmlgoodies_tabViewConf'                                        ,
+               Array('<B style="color: green">&nbsp;ORCA2_LIM_PISCES&nbsp;  </B>',
+	       	     '<B style="color: green">&nbsp;ORCA1_LIM3_PISCES&nbsp; </B>',
+	       	     '<B style="color: green">&nbsp;AMM12&nbsp;             </B>',
+	       	     '<B style="color: red  ">&nbsp;C1D_PAPA&nbsp;          </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE&nbsp;              </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_BFM&nbsp;          </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_PISCES&nbsp;       </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_XIOS&nbsp;         </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM&nbsp;         </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM3&nbsp;        </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM_CFC_C14b&nbsp;</B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_OFF_PISCES&nbsp;  </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_SAS_LIM&nbsp;     </B>' 
+	                                                                          ),
+               0,1810,15050                                                        ,
+               Array(false)                                                         )
+      initTabs('dhtmlgoodies_tabViewConf2'                                       ,
+               Array('<B style="color: green">&nbsp;ORCA2_LIM_PISCES&nbsp;  </B>',
+	       	     '<B style="color: green">&nbsp;ORCA1_LIM3_PISCES&nbsp; </B>',
+	       	     '<B style="color: green">&nbsp;AMM12&nbsp;             </B>',
+	       	     '<B style="color: red  ">&nbsp;C1D_PAPA&nbsp;          </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE&nbsp;              </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_BFM&nbsp;          </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_PISCES&nbsp;       </B>',
+	       	     '<B style="color: red  ">&nbsp;GYRE_XIOS&nbsp;         </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM&nbsp;         </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM3&nbsp;        </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_LIM_CFC_C14b&nbsp;</B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_OFF_PISCES&nbsp;  </B>',
+	       	     '<B style="color: red  ">&nbsp;ORCA2_SAS_LIM&nbsp;     </B>' 
+	                                                                          ),
+               0,1810,15050                                                        ,
+               Array(false)                                                         )
+      initTabs('dhtmlgoodies_tabViewHPCC'                         ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC2'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC3'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC4'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC5'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+      initTabs('dhtmlgoodies_tabViewHPCC6'                        ,
+               Array('<B>&nbsp;TGCC&nbsp;/&nbsp;curie&nbsp;</B>',
+	             '<B>&nbsp;IDRIS&nbsp;/&nbsp;ada&nbsp; </B>' ),
+               0,1800,15000                                       ,
+               Array(false)                                        )
+    </script>
+    <!-------------------------------------------------------------------------------------------->
+
+  </body>
+
+</html>
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/read_trusting.php
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/read_trusting.php	(revision 6138)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/TRUST/web/read_trusting.php	(revision 6138)
@@ -0,0 +1,52 @@
+
+<?php
+
+$num=1;
+
+function read_trusting ($file) { 
+
+  global $num;
+  $row = 1;
+
+  if (($handle = fopen($file, "r")) !== FALSE) {
+
+    while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) {
+
+      switch ($row) {
+        case 1: 
+	  $num1 = count($data);
+	  print("<thead>\n\n"); print("<tr class=\"title\">\n");
+	  break;
+        default:	
+	  if   ( $row % 2 == 1 ) { print("<tr class=\"odd\">\n") ; }
+	  else                   { print("<tr class=\"even\">\n"); }
+      }
+
+      $num = count($data);
+      #echo "<p> $num champs ligne $row: <br /></p>\n";
+
+      for ($c=0; $c<$num1; $c++) {
+        #echo $data[$c] . "<br />\n";
+	if ($c > $num ) { $var=""; } else { $var=trim($data[$c]); }
+
+	switch ($var) { 
+	  case "FAILED"   : print("<td bgcolor=\"#FF6666\">".$var."</td>\n"); break;
+	  case "Different": print("<td bgcolor=\"#FFFF99\">".$var."</td>\n"); break;
+	  case "OK"       : print("<td bgcolor=\"#92CA89\">".$var."</td>\n"); break;
+	  default         : print("<td>".$var."</td>\n")                           ;
+	}
+
+      }
+
+      print("</tr>\n\n");
+      if ( $row == 1 ) { print("</thead>\n\n");	print("<tbody>\n\n"); }
+      $row++;
+    }
+
+    fclose($handle);
+  }
+
+  print("</tbody>\n");
+}
+
+?>
Index: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-amm12.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-amm12.cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-amm12.cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-gyre.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-gyre.cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-gyre.cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-gyre_pisces.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-gyre_pisces.cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-gyre_pisces.cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim.cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim.cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim3.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim3.cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim3.cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim_cfc.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim_cfc.cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim_cfc.cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim_pisces.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim_pisces.cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_lim_pisces.cfg	(revision 6138)
@@ -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: branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_sas_lim.cfg
===================================================================
--- branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_sas_lim.cfg	(revision 6137)
+++ branches/2015/dev_r5803_NOC_WAD/NEMOGCM/fcm-make/inc/keys-orca2_sas_lim.cfg	(revision 6138)
@@ -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
