Frequency ω = 2π/T is conserved as a wave train travels toward shore over a sloping bottom, but the local wavenumber k must satisfy the full finite-depth dispersion relation ω² = gk·tanh(kd) at every depth d — solved here numerically (Newton iteration) at each point along the profile, not approximated. As d shrinks, k grows, so wavelength λ = 2π/k shortens and phase speed c = ω/k slows.
Wave height follows from conservation of energy flux: H(x) = H₀·√(cg(0)/cg(x)), where group speed cg = (c/2)·(1 + 2kd/sinh 2kd) itself falls as the wave shoals — so the wave visibly grows taller and steeper as it slows down, the real mechanism behind "waves standing up" near a beach.
Breaking is flagged where H/d exceeds ≈0.78 (the standard spilling-breaker criterion); past that point this model can no longer be trusted and the profile is capped and marked with foam. Compare a gentle 1:150 slope against a steep 1:15 shelf, or a long 150 m swell against short 15 m chop, to see how differently each shoals and where it breaks.
- Long, low-steepness swell over a gentle slope: shoals gradually, breaks close to shore.
- Short, steep wind waves over a steep shelf: shoal and break abruptly, far from the beach.