Hello,
Your 2 pictures are different. For the first one it is just that free surface = bottom + depth, so to show the flooded areas you must choose a threshold, like e.g. 5 cm, and show only the zones where depth > 5 cm.
The second picture shows a well known problem of wrong overflowing of dykes which are discretised with only one point. The best solution is to have several dry points at the top of the dyke, with a clear summit so that when water reaches a dry zone, the free surface gradient takes it back to water (a dry point near water may be influenced and get some small depth, then this depth will flow somewhere and if this point is at the top of a dyke it may flow on the other side of the dyke). Another solution if you cannot change the depth is to use the keyword :
THRESHOLD DEPTH FOR RECEDING PROCEDURE = ...
a value of about a few centimeters will hopefully cure the problem. It works also with tracers. With this procedure dubious small depths (less than the threshold) in dry zones areas are put back in nearby deep waters.
With best regards,
Jean-Michel Hervouet