Index: /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/field_def.xml
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/field_def.xml	(revision 9050)
+++ /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/field_def.xml	(revision 9051)
@@ -98,33 +98,5 @@
          <field id="tpt_dep"      long_name="T-point depth"                  standard_name="depth_below_geoid"   unit="m"   grid_ref="grid_T_3D" />
          <field id="e3tdef"       long_name="T-cell thickness deformation"                                       unit="%"   grid_ref="grid_T_3D" />
-       </field_group>
-
-       <!-- OSMOSIS diagnostics -->
-       <field_group id="OSMOSIS_T" grid_ref="grid_T_2D" operation="instant" >
-         <field id="ghamt"          long_name="non-local temperature flux"    grid_ref="grid_T_3D"  unit="deg m/s"        />
-         <field id="ghams"          long_name="non-local salinity flux"        grid_ref="grid_T_3D"   unit="psu m/s"        />
-         <field id="zwth0"          long_name="surface non-local temperature flux"                             unit="deg m/s"        />
-         <field id="zws0"          long_name="surface non-local salinity flux"                                     unit="psu m/s"        />
-         <field id="hbl"          long_name="boundary layer depth"                                                unit="m"        />
-         <field id="hbli"          long_name="initial boundary layer depth"                                     unit="m"        />
-         <field id="dstokes"          long_name="stokes drift  depth scale"                                     unit="m"        />
-         <field id="zustke"          long_name="magnitude of stokes drift  at T-points"                     unit="m/s"        />
-         <field id="zwstrc"          long_name="convective velocity scale"                                  unit="m/s"        />
-         <field id="zwstrl"          long_name="langmuir velocity scale"                                   unit="m/s"        />
-         <field id="zustar"          long_name="friction velocity"                                           unit="m/s"        />
-         <field id="zhbl"          long_name="boundary layer depth"                                           unit="m"        />
-         <field id="zhml"          long_name="mixed layer depth"                                           unit="m"        />
-       </field_group>
-    
-       <field_group id="OSMOSIS_U" grid_ref="grid_U_2D" >
-         <field id="ghamu"          long_name="non-local u-momentum flux"        grid_ref="grid_U_3D"   unit="m^2/s^2"        />
-         <field id="us_x"          long_name="i component of Stokes drift"                             unit="m/s"        />
-       </field_group>
-   
-       <field_group id="OSMOSIS_V" grid_ref="grid_V_2D" >
-         <field id="ghamv"          long_name="non-local v-momentum flux"        grid_ref="grid_V_3D"   unit="m^2/s^2"        />
-         <field id="us_y"          long_name="j component of Stokes drift"                             unit="m/s"        />
-       </field_group>
-
+      </field_group>
 
       <!-- Tides -->
Index: /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/namelist_cfg
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/namelist_cfg	(revision 9050)
+++ /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/namelist_cfg	(revision 9051)
@@ -58,5 +58,4 @@
    ppkth2      =  999999.              !
    ppacr2      =  999999.              !
-   rn_wd_ref_depth   =    0.0          !  Reference Depth for WAD cases (0 all other cases)
 /
 !-----------------------------------------------------------------------
Index: /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/namelist_ref
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/namelist_ref	(revision 9050)
+++ /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/namelist_ref	(revision 9051)
@@ -170,6 +170,13 @@
    ppkth2      =       48.029893720000 !
    ppacr2      =       13.000000000000 !
-   ln_wd       =             .false.   !  T/F activation of wetting and drying
-   rn_wd_ref_depth   =    0.0          !  Reference Depth for WAD cases (0 all other cases)
+/
+!-----------------------------------------------------------------------
+&namwad        !   Wetting and drying                                   (default F)
+!-----------------------------------------------------------------------
+   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
 /
 !-----------------------------------------------------------------------
@@ -265,8 +272,13 @@
                            !  =1 opa-sas OASIS coupling: multi executable configuration, OPA component
                            !  =2 opa-sas OASIS coupling: multi executable configuration, SAS component 
+   nn_limflx = -1          !  LIM3 Multi-category heat flux formulation (use -1 if LIM3 is not used)
+                           !  =-1  Use per-category fluxes, bypass redistributor, forced mode only, not yet implemented coupled
+                           !  = 0  Average per-category fluxes (forced and coupled mode)
+                           !  = 1  Average and redistribute per-category fluxes, forced mode only, not yet implemented coupled
+                           !  = 2  Redistribute a single flux over categories (coupled mode only)
                      ! Sea-ice :
    nn_ice      = 2         !  =0 no ice boundary condition   ,
                            !  =1 use observed ice-cover      ,
-                           !  =2-3 ice-model used                       ("key_lim3", "key_cice")
+                           !  =2 ice-model used                         ("key_lim3", "key_lim2", "key_cice")
    nn_ice_embd = 1         !  =0 levitating ice (no mass exchange, concentration/dilution effect)
                            !  =1 levitating ice with mass and salt exchange but no presure effect
@@ -658,4 +670,8 @@
    bn_tem      = 'amm12_bdyT_tra',         24        , 'votemper',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,     ''
    bn_sal      = 'amm12_bdyT_tra',         24        , 'vosaline',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,     ''
+! for lim2
+!   bn_frld    = 'amm12_bdyT_ice',         24        , 'ileadfra',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,     ''
+!   bn_hicif   = 'amm12_bdyT_ice',         24        , 'iicethic',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,     ''
+!   bn_hsnif   = 'amm12_bdyT_ice',         24        , 'isnowthi',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,     ''
 ! for lim3
 !   bn_a_i     = 'amm12_bdyT_ice',         24        , 'ileadfra',    .true.   , .false. ,  'daily'  ,    ''    ,   ''     ,     ''
Index: /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/src/dom_oce.f90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/src/dom_oce.f90	(revision 9050)
+++ /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/src/dom_oce.f90	(revision 9051)
@@ -31,6 +31,4 @@
    !                                    !!* Namelist namdom : time & space domain *
    INTEGER , PUBLIC ::   nn_bathy        !: = 0/1 ,compute/read the bathymetry file
-   LOGICAL   PUBLIC ::   ln_wd           !: Is it a WAD domain? T/F Default T
-   REAL(wp), PUBLIC ::   rn_wd_ref_depth !: Reference depth for Wet and Dry
    REAL(wp), PUBLIC ::   rn_bathy        !: depth of flat bottom (active if nn_bathy=0; if =0 depth=jpkm1)
    REAL(wp), PUBLIC ::   rn_hmin         !: minimum ocean depth (>0) or minimum number of ocean levels (<0)
Index: /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/src/domain.f90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/src/domain.f90	(revision 9050)
+++ /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/src/domain.f90	(revision 9051)
@@ -160,5 +160,5 @@
          &             ppglam0, ppgphi0, ppe1_deg, ppe2_deg, ppe1_m, ppe2_m,                         &
          &             ppsur, ppa0, ppa1, ppkth, ppacr, ppdzmin, pphmax, ldbletanh,                  &
-         &             ppa2, ppkth2, ppacr2, rn_wd_ref_depth, ln_wd
+         &             ppa2, ppkth2, ppacr2
 
 
@@ -272,6 +272,4 @@
          WRITE(numout,*) '      flag read/compute bathymetry      nn_bathy     = ', nn_bathy
          WRITE(numout,*) '      Depth (if =0 bathy=jpkm1)         rn_bathy     = ', rn_bathy
-         WRITE(numout,*) '      WAD Domain?                       ln_wd        = ', ln_wd
-         WRITE(numout,*) '      WAD Reference depth)              rn_wd_ref_depth     = ', rn_wd_ref_depth
          WRITE(numout,*) '      min depth of the ocean    (>0) or    rn_hmin   = ', rn_hmin
          WRITE(numout,*) '      min number of ocean level (<0)       '
@@ -433,14 +431,4 @@
       IF( ln_isfcav ) THEN   ;   icav = 1   ;   ELSE   ;   icav = 0   ;   ENDIF
       CALL iom_rstput( 0, 0, inum, 'ln_isfcav', REAL( icav, wp), ktype = jp_i4 )
-      z2d(:,:) = hbatt(:,:) ! add back on reference height to get appox dep
-                                 !this is later corrected for with specified min depth bg user for above greoid
-                                 ! WAD points
-      !where (z2d   (:,:).lte.1e-5)  z2d(:,:) = -10.0
-      where (tmask  (:,:,1).eq.0)  z2d(:,:) = 0.0
-      IF( ln_wd ) THEN
-          CALL iom_rstput( 0, 0, inum, 'rn_wd_ref_depth'   , rn_wd_ref_depth  ) ! replace this later with variable
-          CALL iom_rstput( 0, 0, inum, 'ht_wd', z2d )        !    ht_wd
-      ENDIF
-
       !
       !                             !==  horizontal mesh  !
Index: /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/src/domzgr.f90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/src/domzgr.f90	(revision 9050)
+++ /branches/2017/dev_merge_2017/NEMOGCM/TOOLS/DOMAINcfg/src/domzgr.f90	(revision 9051)
@@ -1957,32 +1957,5 @@
          WRITE(numout,*) '        Bottom cell (Zb) (m) = H*rn_zb_a + rn_zb_b'
       ENDIF
-      ! CEOD
-      ! Add on some reference level to make nagative bathy positive to create
-      ! sensible e3t_0's
-! Can used commented code here to force bathy near open bdy not to have any WAD
-! points
-
-!CEOD MAKE points on the perimeter assuming a bondary is here on shallower than
-!10m so that tide can be specified here.
-!      DO jj = 1, jpj
-!         DO ji = 1, jpi
-!            !CEODIF( mig(ji) <= 2 .or. mjg(jj) <= 2  .or. mig(ji) >= jpiglo-2 .or.  mjg(jj) >=jpjglo-2) then
-!            IF( mig(ji) <= 10   .or. mjg(jj) <=10  .or.  mjg(ji) >=jpiglo-10+1 .or. mjg(jj) >=jpjglo-10+1   ) then
-!               IF( bathy(ji,jj) + rn_wd_ref_depth  > 0.0)   then
-!                  bathy(ji,jj) = max(5.0,bathy(ji,jj)) !
-!               ENDIF
-!               IF( bathy(ji,jj)  + rn_wd_ref_depth   <= 0.0)   then
-!                  bathy(ji,jj) =  -rn_wd_ref_depth*2._wp ! Make sure it is land
-!               ENDIF
-!            ENDIF
-!         END DO
-!      END DO
-
-      IF( ln_wd) THEN
-         bathy(:,:) = bathy(:,:) + rn_wd_ref_depth !  Arbitrary reference level for WAD, This needs
-      ELSE
-         bathy(:,:) = bathy(:,:)  !  Arbitrary reference level for WAD, This needs
-      ENDIF
-                                                !  to be accounted for in istate in the actual model and bdys etc.
+
       hift(:,:) = rn_sbot_min                     ! set the minimum depth for the s-coordinate
       hifu(:,:) = rn_sbot_min
@@ -2105,6 +2078,4 @@
       hbatt(:,:) = zenv(:,:) 
       IF( MINVAL( gphit(:,:) ) * MAXVAL( gphit(:,:) ) <= 0._wp ) THEN
-          IF ( jphgr_msh == 2 .OR. jphgr_msh == 3) CALL ctl_stop( 'dom:zgr_sco:  if jphgr_msh = 2 or 3 and  & 
-                                      & s-coordinates stop, if not correction at Equator is applied, but it is wrong')
          CALL ctl_warn( ' s-coordinates are tapered in vicinity of the Equator' )
          DO jj = 1, jpj
