Index: branches/2017/dev_merge_2017/DOC/Namelists/nam_tide
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/nam_tide	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/nam_tide	(revision 9038)
@@ -2,8 +2,13 @@
 &nam_tide      !   tide parameters
 !-----------------------------------------------------------------------
-   ln_tide     = .false.
-   ln_tide_pot = .true.    !  use tidal potential forcing
-   ln_tide_ramp= .false.   !
-   rdttideramp =    0.     !
-   clname(1)   = 'DUMMY'   !  name of constituent - all tidal components must be set in namelist_cfg
+   ln_tide       = .false.                ! Activate tides
+      ln_tide_pot   = .true.                !  use tidal potential forcing
+         ln_scal_load  = .false.               ! Use scalar approximation for
+            rn_scal_load = 0.094               !     load potential
+         ln_read_load  = .false.               ! Or read load potential from file
+            cn_tide_load = 'tide_LOAD_grid_T.nc'  ! filename for load potential
+            !      
+      ln_tide_ramp  = .false.               !  Use linear ramp for tides at startup
+         rdttideramp   =    0.                 !  ramp duration in days
+      clname(1)     = 'DUMMY'               !  name of constituent - all tidal components must be set in namelist_cfg
 /
Index: branches/2017/dev_merge_2017/DOC/Namelists/namagrif
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/namagrif	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/namagrif	(revision 9038)
@@ -2,5 +2,4 @@
 &namagrif      !  AGRIF zoom                                            ("key_agrif")
 !-----------------------------------------------------------------------
-   nn_cln_update =    3    !  baroclinic update frequency
    ln_spc_dyn    = .true.  !  use 0 as special value for dynamics
    rn_sponge_tra = 2880.   !  coefficient for tracer   sponge layer [m2/s]
Index: branches/2017/dev_merge_2017/DOC/Namelists/namcfg
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/namcfg	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/namcfg	(revision 9038)
@@ -6,5 +6,5 @@
       cn_domcfg = "domain_cfg"         ! domain configuration filename
       !
-   ln_write_cfg= .false.   !  (=T) create the domain configuration file
+   ln_write_cfg= .true.   !  (=T) create the domain configuration file
       cn_domcfg_out = "domain_cfg_out" ! newly created domain configuration filename
       !
Index: branches/2017/dev_merge_2017/DOC/Namelists/namdyn_spg
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/namdyn_spg	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/namdyn_spg	(revision 9038)
@@ -12,3 +12,4 @@
          rn_bt_cmax   =  0.8        ! =T : the Maximum Courant Number allowed
          nn_baro      = 30          ! =F : the number of sub-step in rn_rdt seconds
+      rn_bt_alpha   = 0.         ! Temporal diffusion parameter (if ln_bt_av=F)
 /
Index: branches/2017/dev_merge_2017/DOC/Namelists/namobs
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/namobs	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/namobs	(revision 9038)
@@ -7,7 +7,9 @@
    ln_sla      = .false.             ! Logical switch for SLA observations
    ln_sst      = .false.             ! Logical switch for SST observations
+   ln_sss      = .false.             ! Logical swithc for SSS observations
    ln_sic      = .false.             ! Logical switch for Sea Ice observations
    ln_vel3d    = .false.             ! Logical switch for velocity observations
    ln_altbias  = .false.             ! Logical switch for altimeter bias correction
+   ln_sstbias  = .false.             ! Logical switch for SST bias correction
    ln_nea      = .false.             ! Logical switch for rejection of observations near land
    ln_grid_global = .true.           ! Logical switch for global distribution of observations
@@ -16,22 +18,38 @@
    ln_s_at_t   = .false.             ! Logical switch for computing model S at T obs if not there
    ln_sstnight = .false.             ! Logical switch for calculating night-time average for SST obs
+   ln_sla_fp_indegs = .true.         ! Logical for SLA: T=> averaging footprint is in degrees, F=> in metres
+   ln_sst_fp_indegs = .true.         ! Logical for SST: T=> averaging footprint is in degrees, F=> in metres
+   ln_sss_fp_indegs = .true.         ! Logical for SSS: T=> averaging footprint is in degrees, F=> in metres
+   ln_sic_fp_indegs = .true.         ! Logical for SIC: T=> averaging footprint is in degrees, F=> in metres
 ! All of the *files* variables below are arrays. Use namelist_cfg to add more files
    cn_profbfiles = 'profiles_01.nc'  ! Profile feedback input observation file names
    cn_slafbfiles = 'sla_01.nc'       ! SLA feedback input observation file names
    cn_sstfbfiles = 'sst_01.nc'       ! SST feedback input observation file names
+   cn_sssfbfiles = 'sss_01.nc'       ! SSS feedback input observation file names
    cn_sicfbfiles = 'sic_01.nc'       ! SIC feedback input observation file names
    cn_velfbfiles = 'vel_01.nc'       ! Velocity feedback input observation file names
    cn_altbiasfile = 'altbias.nc'     ! Altimeter bias input file name
+   cn_sstbiasfiles = 'sstbias.nc'    ! SST bias input file name
    cn_gridsearchfile='gridsearch.nc' ! Grid search file name
    rn_gridsearchres = 0.5            ! Grid search resolution
+   rn_mdtcorr  = 1.61                ! MDT  correction
+   rn_mdtcutoff = 65.0               ! MDT cutoff for computed correction
    rn_dobsini  = 00010101.000000     ! Initial date in window YYYYMMDD.HHMMSS
    rn_dobsend  = 00010102.000000     ! Final date in window YYYYMMDD.HHMMSS
-   nn_1dint    = 0                   ! Type of vertical interpolation method
-   nn_2dint    = 0                   ! Type of horizontal interpolation method
+   rn_sla_avglamscl = 0.             ! E/W diameter of SLA observation footprint (metres/degrees)
+   rn_sla_avgphiscl = 0.             ! N/S diameter of SLA observation footprint (metres/degrees)
+   rn_sst_avglamscl = 0.             ! E/W diameter of SST observation footprint (metres/degrees)
+   rn_sst_avgphiscl = 0.             ! N/S diameter of SST observation footprint (metres/degrees)
+   rn_sss_avglamscl = 0.             ! E/W diameter of SSS observation footprint (metres/degrees)
+   rn_sss_avgphiscl = 0.             ! N/S diameter of SSS observation footprint (metres/degrees)
+   rn_sic_avglamscl = 0.             ! E/W diameter of SIC observation footprint (metres/degrees)
+   rn_sic_avgphiscl = 0.             ! N/S diameter of SIC observation footprint (metres/degrees)
+   nn_1dint = 0                      ! Type of vertical interpolation method
+   nn_2dint = 0                      ! Default horizontal interpolation method
+   nn_2dint_sla = 0                  ! Horizontal interpolation method for SLA
+   nn_2dint_sst = 0                  ! Horizontal interpolation method for SST
+   nn_2dint_sss = 0                  ! Horizontal interpolation method for SSS
+   nn_2dint_sic = 0                  ! Horizontal interpolation method for SIC
    nn_msshc    = 0                   ! MSSH correction scheme
-   rn_mdtcorr  = 1.61                ! MDT  correction
-   rn_mdtcutoff = 65.0               ! MDT cutoff for computed correction
    nn_profdavtypes = -1              ! Profile daily average types - array
-   ln_sstbias  = .false.             !
-   cn_sstbias_files = 'sstbias.nc'   !
 /
Index: branches/2017/dev_merge_2017/DOC/Namelists/namsbc
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/namsbc	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/namsbc	(revision 9038)
@@ -16,5 +16,5 @@
                            !  =2 opa-sas OASIS coupling: multi executable config., SAS component 
                      ! Sea-ice :
-   nn_ice      = 0         !  =0 no ice boundary condition   ,
+   nn_ice      = 2         !  =0 no ice boundary condition   ,
                            !  =1 use observed ice-cover      ,
                            !  =2 or 3 automatically for LIM3 or CICE    ("key_lim3" or "key_cice")
@@ -35,5 +35,10 @@
    ln_cdgw     = .false.   !  Neutral drag coefficient read from wave model (T => ln_wave=.true. & fill namsbc_wave)
    ln_sdw      = .false.   !  Read 2D Surf Stokes Drift & Computation of 3D stokes drift (T => ln_wave=.true. & fill namsbc_wave) 
-   ln_tauoc    = .false.   !  Activate ocean stress modified by external wave induced stress (T => ln_wave=.true. & fill namsbc_wave)
+   nn_sdrift   =  0        !  Parameterization for the calculation of 3D-Stokes drift from the surface Stokes drift
+                           !   = 0 Breivik 2015 parameterization: v_z=v_0*[exp(2*k*z)/(1-8*k*z)]
+                           !   = 1 Phillips:                      v_z=v_o*[exp(2*k*z)-beta*sqrt(-2*k*pi*z)*erfc(sqrt(-2*k*z))]
+                           !   = 2 Phillips as (1) but using the wave frequency from a wave model
+   ln_tauwoc   = .false.   !  Activate ocean stress modified by external wave induced stress (T => ln_wave=.true. & fill namsbc_wave)
+   ln_tauw     = .false.   !  Activate ocean stress components from wave model
    ln_stcor    = .false.   !  Activate Stokes Coriolis term (T => ln_wave=.true. & ln_sdw=.true. & fill namsbc_wave)
    nn_lsm      = 0         !  =0 land/sea mask for input fields is not applied (keep empty land/sea mask filename field) ,
Index: branches/2017/dev_merge_2017/DOC/Namelists/namsbc_cpl
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/namsbc_cpl	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/namsbc_cpl	(revision 9038)
@@ -10,31 +10,43 @@
    sn_snd_crt    =   'none'                 ,    'no'    , 'spherical' , 'eastward-northward' ,  'T'
    sn_snd_co2    =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
-   sn_snd_crtw   =       'none'                 ,    'no'    ,     ''      ,         ''           , 'U,V'
-   sn_snd_ifrac  =       'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
-   sn_snd_wlev   =       'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_crtw   =   'none'                 ,    'no'    ,     ''      ,         ''           , 'U,V'
+   sn_snd_ifrac  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_wlev   =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_cond   =   'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_thick1 =   'ice and snow'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_mpnd   =   'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_sstfrz =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_snd_ttilyr =   'weighted ice'         ,    'no'    ,     ''      ,         ''           ,   ''
 ! receive
-   sn_rcv_w10m   =   'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_taumod =   'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_tau    =   'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward',  'U,V'
-   sn_rcv_dqnsdt =   'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_qsr    =   'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_qns    =   'oce and ice'          ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_emp    =   'conservative'         ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_rnf    =   'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_cal    =   'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_co2    =   'coupled'              ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_hsig   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_iceflx =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_mslp   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_phioc  =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_sdrfx  =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_sdrfy  =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_wper   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_wnum   =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_wstrf  =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
-   sn_rcv_wdrag  =       'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_w10m   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_taumod =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_tau    =   'oce only'             ,    'no'    , 'cartesian' , 'eastward-northward' ,  'U,V'
+   sn_rcv_dqnsdt =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_qsr    =   'oce and ice'          ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_qns    =   'oce and ice'          ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_emp    =   'conservative'         ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_rnf    =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_cal    =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_co2    =   'coupled'              ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_hsig   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_iceflx =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_mslp   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_phioc  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_sdrfx  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_sdrfy  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_wper   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_wnum   =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_wstrf  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_wdrag  =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_ts_ice =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_isf    =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_icb    =   'none'                 ,    'no'    ,     ''      ,         ''           ,   ''
+   sn_rcv_tauwoc =   'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_tauw   =   'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
+   sn_rcv_wdrag  =   'none'                 ,    'no'    ,     ''      ,         ''          ,   ''
 !
    nn_cplmodel   =     1   !  Maximum number of models to/from which NEMO is potentialy sending/receiving data
    ln_usecplmask = .false. !  use a coupling mask file to merge data received from several models
    !                       !   -> file cplmask.nc with the float variable called cplmask (jpi,jpj,nn_cplmodel)
+   nn_cats_cpl   =     5   !  Number of sea ice categories over which coupling is to be carried out (if not 1)
 /
Index: branches/2017/dev_merge_2017/DOC/Namelists/namsbc_wave
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/namsbc_wave	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/namsbc_wave	(revision 9038)
@@ -9,6 +9,9 @@
    sn_hsw      =  'sdw_wave' ,        1          , 'hs'         ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
    sn_wmp      =  'sdw_wave' ,        1          , 'wmp'        ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_wfr      =  'sdw_wave' ,        1          , 'wfr'        ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
    sn_wnum     =  'sdw_wave' ,        1          , 'wave_num'   ,     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
-   sn_tauoc    =  'sdw_wave' ,        1          , 'wave_stress',     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_tauwoc   =  'sdw_wave' ,        1          , 'wave_stress',     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_tauwx    =  'sdw_wave' ,        1          , 'wave_stress',     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
+   sn_tauwy    =  'sdw_wave' ,        1          , 'wave_stress',     .true.   , .false. , 'daily'   ,  ''      , ''       , ''
 !
    cn_dir  = './'  !  root directory for the location of drag coefficient files
Index: branches/2017/dev_merge_2017/DOC/Namelists/namwad
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/namwad	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/namwad	(revision 9038)
@@ -1,9 +1,13 @@
 !-----------------------------------------------------------------------
-&namwad        !   Wetting and drying                                   (default F)
+&namwad  !   Wetting and drying  default it no WAD
 !-----------------------------------------------------------------------
-   ln_wd       = .false.   !  T/F activation of wetting and drying
-   rn_wdmin1   =  0.1      !  Minimum wet depth on dried cells
-   rn_wdmin2   =  0.01     !  Tolerance of min wet depth on dried cells
-   rn_wdld     =  20.0     !  Land elevation below which wetting/drying is allowed
-   nn_wdit     =  10       !  Max iterations for W/D limiter
+   ln_wd_il          = .false   ! T/F activation of iterative limiter for  wetting and drying scheme
+   ln_wd_dl          = .false.   ! T/F activation of directional llimiter for wetting drying scheme
+   ln_wd_dl_bc       = .false.   ! T/F Directional limiteer Baroclinic option
+   ln_wd_dl_rmp      = .false.   ! T/F Turn on directional limiter ramp
+   rn_wdmin0         =  0.30    ! dpoth at which wetting/drying starts
+   rn_wdmin1         =  0.2     ! Minimum wet depth on dried cells
+   rn_wdmin2         =  0.0001  ! Tolerance of min wet depth on dried cells
+   rn_wdld           =  2.5     ! Land elevation below which wetting/drying is allowed
+   nn_wdit           =   20     ! Max iterations for W/D limiter
 /
Index: branches/2017/dev_merge_2017/DOC/Namelists/namzdf_osm
===================================================================
--- branches/2017/dev_merge_2017/DOC/Namelists/namzdf_osm	(revision 9019)
+++ branches/2017/dev_merge_2017/DOC/Namelists/namzdf_osm	(revision 9038)
@@ -1,8 +1,8 @@
 !-----------------------------------------------------------------------
-&namzdf_osm                !   OSM vertical diffusion                   ("key_zdfosm")
+&namzdf_osm                !   OSM vertical diffusion                   (ln_zdfosm =T)
 !-----------------------------------------------------------------------
-   ln_use_osm_la = .false.     ! Use namelist  rn_osm_la
-   rn_osm_la     = 0.3         ! Turbulent Langmuir number
-   rn_osm_dstokes     = 5.     ! Depth scale of Stokes drift (m)
+   ln_use_osm_la = .false.      !  Use namelist  rn_osm_la
+   rn_osm_la     = 0.3         !  Turbulent Langmuir number
+   rn_osm_dstokes     = 5.     !  Depth scale of Stokes drift (m)
    nn_ave = 0                  ! choice of horizontal averaging on avt, avmu, avmv
    ln_dia_osm = .true.         ! output OSMOSIS-OBL variables
