It is an example of the invasion percolation model in which fluid is introduced in the system from any random site.
The top level traps no water because it is far above the percolation threshold for a square lattice, 0.592746.
Thus, the retention of a multilevel system can be related to a well-known quantity in percolation theory.
The retention is just the difference in the water level that a site was flooded minus the height of the terrain below it.
Likewise, one can make the surface height itself be a continuous function of the spatial variables.