Experiment: measured vs predicted
Press the button for four checks: dispersion root, shallow-water speed, Green's law and travel time.
The science
A surface gravity wave of angular frequency w over depth h has wavenumber k from the dispersion relation w^2 = g k tanh(k h), solved here by Newton iteration. In deep water (kh >> 1) the phase speed is g/w and longer waves run faster; in shallow water (kh << 1) it becomes c = sqrt(g h), independent of wavelength. That is why a tsunami (period of minutes, wavelength of tens of km) travels at jet speed in the open ocean and slows near the coast.
As the wave moves into shallower water its period stays fixed, the wavelength shortens, and energy flux E c_g conserved gives the shoaling law A = A0 sqrt(c_g0 / c_g), which in the shallow limit is Green's law A ~ h^(-1/4). The wave is assumed to break when the height reaches about 0.78 h (solitary-wave criterion); in the surf zone the height is then capped at 0.78 h, a crude saturation, not a breaking-wave model.
Simplifications: linear (small-amplitude) waves, a straight beach slope, normal incidence (no refraction), no reflection, no bottom friction; wave height is magnified on screen. Same physics as the 3D page.