In the formation of a rip current, a wave propagates over a sandbar with a gap in it. When this happens, most of the wave breaks on the sandbar, leading to "setup". However, the part of the wave that propagates over the gap does not break, and thus the "setdown" continues in that part. Because of this phenomenon, the mean water surface over the rest of the sandbar is higher than that which is over the gap, and the result is that a strong flow issues outward through the gap. This strong flow is the rip current.