Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/AMM12/EXP00/namelist_cfg	(revision 7953)
@@ -29,9 +29,4 @@
 !-----------------------------------------------------------------------
    rn_rdt      =   600.    !  time step for the dynamics (and tracer if nn_acc=0)
-/
-!-----------------------------------------------------------------------
-&namcrs        !   Grid coarsening for dynamics output and/or
-!              !   passive tracer coarsened online simulations
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg	(revision 7953)
@@ -12,7 +12,4 @@
 !!                   ***  Run management namelists  ***
 !!======================================================================
-!!   namrun        parameters of the run
-!!======================================================================
-!
 !-----------------------------------------------------------------------
 &namrun        !   parameters of the run
@@ -25,4 +22,7 @@
    nn_write    =      60   !  frequency of write in the output file   (modulo referenced to nn_it000)
 /
+!!======================================================================
+!!                      ***  Domain namelists  ***
+!!======================================================================
 !-----------------------------------------------------------------------
 &namcfg     !   parameters of the configuration   
@@ -37,13 +37,6 @@
 !-----------------------------------------------------------------------
    ln_linssh   = .true.    !  =T  linear free surface  ==>>  model level are fixed in time
-   !
    nn_msh      =    0      !  create (>0) a mesh file or not (=0)
-   !
    rn_rdt      = 7200.     !  time step for the dynamics (and tracer if nn_acc=0)
-/
-!-----------------------------------------------------------------------
-&namcrs        !   Grid coarsening for dynamics output and/or
-!              !   passive tracer coarsened online simulations
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -56,4 +49,8 @@
    ln_tsd_tradmp = .false.   !  damping of ocean T & S toward T &S input data (T) or not (F)
 /
+
+!!======================================================================
+!!            ***  Surface Boundary Condition namelists  ***
+!!======================================================================
 !-----------------------------------------------------------------------
 &namsbc        !   Surface Boundary Condition (surface module)
@@ -76,25 +73,4 @@
 /
 !-----------------------------------------------------------------------
-&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
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&namsbc_alb    !   albedo parameters
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&namberg       !   iceberg parameters
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namlbc        !   lateral momentum boundary condition
 !-----------------------------------------------------------------------
@@ -102,31 +78,7 @@
 /
 !-----------------------------------------------------------------------
-&namagrif      !  AGRIF zoom                                            ("key_agrif")
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&nam_tide      !    tide parameters
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&nambdy        !  unstructured open boundaries                          
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&nambdy_dta      !  open boundaries - external data           
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&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                (default: NO)
-!-----------------------------------------------------------------------
 /
 !-----------------------------------------------------------------------
@@ -282,22 +234,22 @@
 /
 !-----------------------------------------------------------------------
-&namzdf_ric    !   richardson number dependent vertical diffusion       ("key_zdfric" )
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
+&namzdf_ric    !   richardson number dependent vertical diffusion       (ln_zdfric=T)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  (ln_zdftke=T)
 !-----------------------------------------------------------------------
    nn_etau     =   0       !  penetration of tke below the mixed layer (ML) due to internal & intertial waves
 /
 !-----------------------------------------------------------------------
-&namzdf_gls                !   GLS vertical diffusion                   ("key_zdfgls")
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
+&namzdf_gls                !   GLS vertical diffusion                   (ln_zdfgls=T)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_ddm    !   double diffusive mixing parameterization             (ln_zdfddm=T)
+!-----------------------------------------------------------------------
+/
+!-----------------------------------------------------------------------
+&namzdf_tmx    !   tidal mixing parameterization                        (ln_zdftmx=T)
 !-----------------------------------------------------------------------
    ln_tmx_itf  = .false.   !  ITF specific parameterisation
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_top_cfg	(revision 7953)
@@ -43,8 +43,4 @@
 /
 !-----------------------------------------------------------------------
-&namtrc_zdf        !   vertical physics
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namtrc_rad        !  treatment of negative concentrations
 !-----------------------------------------------------------------------
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/GYRE_PISCES/cpp_GYRE_PISCES.fcm	(revision 7953)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_zdftke key_top key_mpp_mpi
+bld::tool::fppkeys key_zdftke key_top key_mpp_mpi key_nosignedzero
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_cfg	(revision 7953)
@@ -235,13 +235,37 @@
 /
 !-----------------------------------------------------------------------
-&namzdf        !   vertical physics
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  ("key_zdftke")
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
-&namzdf_ddm    !   double diffusive mixing parameterization             ("key_zdfddm")
+&namzdf        !   vertical physics                                     (default: NO selection)
+!-----------------------------------------------------------------------
+   !                       ! type of vertical closure
+   ln_zdfcst   = .false.      !  constant mixing
+   ln_zdfric   = .false.      !  local Richardson dependent formulation (T =>   fill namzdf_ric)
+   ln_zdftke   = .true.       !  Turbulent Kinetic Energy closure       (T =>   fill namzdf_tke)
+   ln_zdfgls   = .false.      !  Generic Length Scale closure           (T =>   fill namzdf_gls)
+   !
+   !                       ! convection
+   ln_zdfevd   = .true.       !  Enhanced Vertical Diffusion scheme
+      nn_evdm  =    0            !  evd apply on tracer (=0) or on tracer and momentum (=1)
+      rn_evd   =  100.           !  evd mixing coefficient [m2/s]
+   !
+   ln_zdfddm   = .true.    ! double diffusive mixing
+      rn_avts  =    1.e-4     !  maximum avs (vertical mixing on salinity)
+      rn_hsbfr =    1.6       !  heat/salt buoyancy flux ratio
+   !
+   ln_zdftmx   = .true.    ! tidal mixing parameterization              (T =>   fill namzdf_tmx)
+   !
+   ln_zdfqiao  = .false.   ! enhanced wave vertical mixing Qiao (2010) (T => ln_wave=T & ln_sdw=T & fill namsbc_wave)
+   !
+   !                       ! time-stepping
+   ln_zdfexp   = .false.   ! split-explicit (T) or implicit (F) time stepping scheme
+      nn_zdfexp=    3         !  number of sub-timestep for ln_zdfexp=T
+   !
+   !                       !  Coefficients
+   rn_avm0     =   1.2e-4     !  vertical eddy viscosity   [m2/s]       (background Kz if ln_zdfcst=F)
+   rn_avt0     =   1.2e-5     !  vertical eddy diffusivity [m2/s]       (background Kz if ln_zdfcst=F)
+   nn_avb      =    0         !  profile for background avt & avm (=1) or not (=0)
+   nn_havtb    =    1         !  horizontal shape for avtb (=1) or not (=0)
+/
+!-----------------------------------------------------------------------
+&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion 
 !-----------------------------------------------------------------------
 /
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_top_cfg
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_top_cfg	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/EXP00/namelist_top_cfg	(revision 7953)
@@ -81,8 +81,4 @@
 /
 !-----------------------------------------------------------------------
-&namtrc_zdf        !   vertical physics
-!-----------------------------------------------------------------------
-/
-!-----------------------------------------------------------------------
 &namtrc_rad        !  treatment of negative concentrations 
 !-----------------------------------------------------------------------
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/cpp_ORCA2_LIM3_PISCES.fcm
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/cpp_ORCA2_LIM3_PISCES.fcm	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/ORCA2_LIM3_PISCES/cpp_ORCA2_LIM3_PISCES.fcm	(revision 7953)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim3 key_zdftke key_zdfddm key_zdftmx_new key_iomput key_mpp_mpi key_top key_nosignedzero
+bld::tool::fppkeys key_trabbl key_lim3 key_zdftke key_zdftmx_new key_iomput key_mpp_mpi key_top key_nosignedzero
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/SHARED/field_def_nemo-opa.xml
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/SHARED/field_def_nemo-opa.xml	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/SHARED/field_def_nemo-opa.xml	(revision 7953)
@@ -390,5 +390,5 @@
          <field id="avm"          long_name="vertical eddy viscosity"     standard_name="ocean_vertical_momentum_diffusivity"   unit="m2/s" />
 
-         <!-- avs: available with key_zdfddm -->
+         <!-- avs: if ln_zdfddm=F avs=avt -->
          <field id="avs"          long_name="salt vertical eddy diffusivity"   standard_name="ocean_vertical_salt_diffusivity"   unit="m2/s" />
          <field id="logavs"       long_name="logarithm of salt vertical eddy diffusivity"   standard_name="ocean_vertical_heat_diffusivity"       unit="m2/s" />
@@ -398,8 +398,5 @@
          <field id="avm_evd"      long_name="convective enhancement of vertical viscosity"     standard_name="ocean_vertical_momentum_diffusivity_due_to_convection"   unit="m2/s" />
 
-         <!-- avt_tide: available with key_zdftmx -->
-         <field id="av_tide"      long_name="tidal vertical diffusivity"   standard_name="ocean_vertical_tracer_diffusivity_due_to_tides"   unit="m2/s" />
-
-         <!-- variables available with key_zdftmx_new -->
+         <!-- variables available with ln_zdftmx =T -->
          <field id="av_ratio"     long_name="S over T diffusivity ratio"            standard_name="salinity_over_temperature_diffusivity_ratio"                     unit="1"    />
          <field id="av_wave"      long_name="wave-induced vertical diffusivity"     standard_name="ocean_vertical_tracer_diffusivity_due_to_internal_waves"         unit="m2/s" />
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 7953)
@@ -236,5 +236,5 @@
 /
 !-----------------------------------------------------------------------
-&namsbc_blk   !   namsbc_blk  generic Bulk formula                      (ln_blk = T)
+&namsbc_blk   !   namsbc_blk  generic Bulk formula                      (ln_blk =T)
 !-----------------------------------------------------------------------
 !              !  file name                   ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights                              ! rotation ! land/sea mask !
@@ -326,5 +326,5 @@
 /
 !-----------------------------------------------------------------------
-&namtra_qsr    !   penetrative solar radiation                          (ln_traqsr=T)
+&namtra_qsr    !   penetrative solar radiation                          (ln_traqsr =T)
 !-----------------------------------------------------------------------
 !              !  file name  ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
@@ -343,5 +343,5 @@
 /
 !-----------------------------------------------------------------------
-&namsbc_rnf    !   runoffs namelist surface boundary condition          (ln_rnf=T)
+&namsbc_rnf    !   runoffs namelist surface boundary condition          (ln_rnf =T)
 !-----------------------------------------------------------------------
 !              !  file name           ! frequency (hours) ! variable  ! time interp. !  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
@@ -419,5 +419,5 @@
 /
 !-----------------------------------------------------------------------
-&namsbc_ssr    !   surface boundary condition : sea surface restoring   (ln_ssr=T)
+&namsbc_ssr    !   surface boundary condition : sea surface restoring   (ln_ssr =T)
 !-----------------------------------------------------------------------
 !              ! file name ! frequency (hours) ! variable ! time interp.!  clim  ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
@@ -448,5 +448,5 @@
 /
 !-----------------------------------------------------------------------
-&namsbc_wave   ! External fields from wave model                        (ln_wave=T)
+&namsbc_wave   ! External fields from wave model                        (ln_wave =T)
 !-----------------------------------------------------------------------
 !              !  file name  ! frequency (hours) ! variable     ! time interp. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask !
@@ -667,5 +667,5 @@
 !
 !-----------------------------------------------------------------------
-&nameos        !   ocean Equation Of State                              (default: NO)
+&nameos        !   ocean Equation Of Seawater                           (default: NO)
 !-----------------------------------------------------------------------
    ln_teos10   = .false.         !  = Use TEOS-10 equation of state
@@ -894,5 +894,4 @@
       nn_npc      =    1         ! frequency of application of npc
       nn_npcp     =  365         ! npc control print frequency
-!!gm new
    !
    ln_zdfddm   = .false.   ! double diffusive mixing
@@ -902,6 +901,4 @@
    ln_zdftmx   = .false.   ! tidal mixing parameterization              (T =>   fill namzdf_tmx)
    !
-!!gm
-   !
    ln_zdfqiao  = .false.   ! surface wave-induced mixing (Qiao et al. 2010) (T =>   ln_wave=ln_sdw=T. & fill namsbc_wave)
    !
@@ -909,4 +906,5 @@
    ln_zdfexp   = .false.   ! split-explicit (T) or implicit (F) scheme
       nn_zdfexp=    3         !  number of sub-timestep for ln_zdfexp=T
+   !
    !                       ! coefficients
    rn_avm0     =   1.2e-4     !  vertical eddy viscosity   [m2/s]       (background Kz if ln_zdfcst=F)
@@ -977,15 +975,5 @@
 /
 !-----------------------------------------------------------------------
-&namzdf_tmx    !   tidal mixing parameterization                        ("key_zdftmx")
-!-----------------------------------------------------------------------
-   rn_htmx     = 500.      !  vertical decay scale for turbulence (meters)
-   rn_n2min    = 1.e-8     !  threshold of the Brunt-Vaisala frequency (s-1)
-   rn_tfe      = 0.333     !  tidal dissipation efficiency
-   rn_me       = 0.2       !  mixing efficiency
-   ln_tmx_itf  = .true.    !  ITF specific parameterisation
-   rn_tfe_itf  = 1.        !  ITF tidal dissipation efficiency
-/
-!-----------------------------------------------------------------------
-&namzdf_tmx_new !   internal wave-driven mixing parameterization        ("key_zdftmx_new" & "key_zdfddm")
+&namzdf_tmx    !    internal wave-driven mixing parameterization        (ln_zdftmx =T)
 !-----------------------------------------------------------------------
    nn_zpyc     = 1         !  pycnocline-intensified dissipation scales as N (=1) or N^2 (=2)
@@ -996,5 +984,5 @@
 !!                  ***  Miscellaneous namelists  ***
 !!======================================================================
-!!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi)
+!!   nammpp            Massively Parallel Processing                    ("key_mpp_mpi")
 !!   namctl            Control prints 
 !!   namsto            Stochastic parametrization of EOS
@@ -1002,5 +990,5 @@
 !
 !-----------------------------------------------------------------------
-&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi)
+&nammpp        !   Massively Parallel Processing                        ("key_mpp_mpi")
 !-----------------------------------------------------------------------
    cn_mpi_send =  'I'      !  mpi send/recieve type   ='S', 'B', or 'I' for standard send,
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/SHARED/namelist_top_ref
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/SHARED/namelist_top_ref	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/SHARED/namelist_top_ref	(revision 7953)
@@ -95,10 +95,4 @@
 /
 !-----------------------------------------------------------------------
-&namtrc_zdf      !   vertical physics
-!-----------------------------------------------------------------------
-   ln_trczdf_exp =  .false.  !  split explicit (T) or implicit (F) time stepping
-   nn_trczdf_exp =   3       !  number of sub-timestep for ln_trczdfexp=T
-/
-!-----------------------------------------------------------------------
 &namtrc_rad      !  treatment of negative concentrations 
 !-----------------------------------------------------------------------
Index: branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/cfg.txt
===================================================================
--- branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/cfg.txt	(revision 7931)
+++ branches/2017/dev_r7881_HPC09_ZDF/NEMOGCM/CONFIG/cfg.txt	(revision 7953)
@@ -1,8 +1,9 @@
 AMM12 OPA_SRC
 C1D_PAPA OPA_SRC
-GYRE_PISCES OPA_SRC TOP_SRC
 GYRE_BFM OPA_SRC TOP_SRC
 ORCA2_SAS_LIM3 OPA_SRC SAS_SRC LIM_SRC_3 NST_SRC
 ORCA2_OFF_PISCES OPA_SRC OFF_SRC TOP_SRC
 ORCA2_OFF_TRC OPA_SRC OFF_SRC TOP_SRC
+GYRE_PISCES OPA_SRC TOP_SRC
 ORCA2_LIM3_PISCES OPA_SRC LIM_SRC_3 TOP_SRC NST_SRC
+GYRE_PISCES_XIOS OPA_SRC TOP_SRC
