Index: branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 7587)
+++ branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 7588)
@@ -30,4 +30,5 @@
    USE usrdef_zgr     ! user defined vertical coordinate system
    USE depth_e3       ! depth <=> e3
+   USE wet_dry, ONLY: ln_wd, ht_wd
    !
    USE in_out_manager ! I/O manager
@@ -256,4 +257,7 @@
       CALL iom_get( inum, jpdom_data, 'bottom_level' , z2d  , lrowattr=ln_use_jattr )   ! last wet T-points
       k_bot(:,:) = INT( z2d(:,:) )
+      !
+      ! bathymetry with orography (wetting and drying only)
+      IF( ln_wd )  CALL iom_get( inum, jpdom_data, 'ht_wd' , ht_wd  , lrowattr=ln_use_jattr )
       !
       CALL iom_close( inum )
Index: branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC/DYN/wet_dry.F90
===================================================================
--- branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC/DYN/wet_dry.F90	(revision 7587)
+++ branches/2016/dev_merge_2016/NEMOGCM/NEMO/OPA_SRC/DYN/wet_dry.F90	(revision 7588)
@@ -170,6 +170,9 @@
               zdep2 = ht_wd(ji,jj) + sshb1(ji,jj) - rn_wdmin1
               IF(zdep2 .le. 0._wp) THEN  !add more safty, but not necessary
-                !zdep2 = 0._wp
                 sshb1(ji,jj) = rn_wdmin1 - ht_wd(ji,jj)
+                IF(zflxu(ji,  jj) > 0._wp) zwdlmtu(ji  ,jj) = 0._wp
+                IF(zflxu(ji-1,jj) < 0._wp) zwdlmtu(ji-1,jj) = 0._wp
+                IF(zflxv(ji,  jj) > 0._wp) zwdlmtv(ji  ,jj) = 0._wp
+                IF(zflxv(ji,jj-1) < 0._wp) zwdlmtv(ji,jj-1) = 0._wp 
                 wdmask(ji,jj) = 0._wp
               END IF
@@ -202,10 +205,16 @@
                  zdep2 = ht_wd(ji,jj) + sshb1(ji,jj) - rn_wdmin1 - z2dt * sshemp(ji,jj)
           
-                 IF(zdep1 > zdep2) THEN
-                   jflag = 1
+                 IF( zdep1 > zdep2 ) THEN
                    wdmask(ji, jj) = 0
                    zcoef = ( ( zdep2 - rn_wdmin2 ) * ztmp - zzflxn * z2dt ) / ( zflxp(ji,jj) * z2dt )
                    !zcoef = ( ( zdep2 - rn_wdmin2 ) * ztmp - zzflxn * z2dt ) / ( zzflxp * z2dt )
-                   zcoef = max(zcoef, 0._wp)
+                   ! flag if the limiter has been used but stop flagging if the only
+                   ! changes have zeroed the coefficient since further iterations will
+                   ! not change anything
+                   IF( zcoef > 0._wp ) THEN
+                      jflag = 1 
+                   ELSE
+                      zcoef = 0._wp
+                   ENDIF
                    IF(jk1 > nn_wdit) zcoef = 0._wp
                    IF(zflxu1(ji,  jj) > 0._wp) zwdlmtu(ji  ,jj) = zcoef
@@ -316,6 +325,10 @@
 
               zdep2 = ht_wd(ji,jj) + sshn_e(ji,jj) - rn_wdmin1
-              IF(zdep2 .le. 0._wp) THEN  !add more safty, but not necessary
+              IF(zdep2 .le. 0._wp) THEN  !add more safety, but not necessary
                 sshn_e(ji,jj) = rn_wdmin1 - ht_wd(ji,jj)
+                IF(zflxu(ji,  jj) > 0._wp) zwdlmtu(ji  ,jj) = 0._wp
+                IF(zflxu(ji-1,jj) < 0._wp) zwdlmtu(ji-1,jj) = 0._wp
+                IF(zflxv(ji,  jj) > 0._wp) zwdlmtv(ji  ,jj) = 0._wp
+                IF(zflxv(ji,jj-1) < 0._wp) zwdlmtv(ji,jj-1) = 0._wp 
               END IF
            ENDDO
@@ -348,8 +361,14 @@
           
                  IF(zdep1 > zdep2) THEN
-                   jflag = 1
                    zcoef = ( ( zdep2 - rn_wdmin2 ) * ztmp - zzflxn * z2dt ) / ( zflxp(ji,jj) * z2dt )
                    !zcoef = ( ( zdep2 - rn_wdmin2 ) * ztmp - zzflxn * z2dt ) / ( zzflxp * z2dt )
-                   zcoef = max(zcoef, 0._wp)
+                   ! flag if the limiter has been used but stop flagging if the only
+                   ! changes have zeroed the coefficient since further iterations will
+                   ! not change anything
+                   IF( zcoef > 0._wp ) THEN
+                      jflag = 1 
+                   ELSE
+                      zcoef = 0._wp
+                   ENDIF
                    IF(jk1 > nn_wdit) zcoef = 0._wp
                    IF(zflxu1(ji,  jj) > 0._wp) zwdlmtu(ji  ,jj) = zcoef
