# The tide maths

Tidepool predicts the water level the same way tide tables have been made since the 1870s: as a sum of cosine waves, one for each astronomical cycle that moves the sea.

## The harmonic formula

The predicted height at time $t$ is

$$
h(t) = Z_0 + \sum_{i=1}^{n} f_i H_i \cos\left(\omega_i t + (V_0 + u)_i - \kappa_i\right)
$$

where $Z_0$ is the mean water level above chart datum, $H_i$ and $\kappa_i$ are the amplitude and phase lag of constituent $i$ measured at the station, $\omega_i$ is its speed in degrees per hour, and $f_i$ and $(V_0+u)_i$ are the node factor and equilibrium argument for the year.

## The four biggest constituents

| Symbol | Name | Period (hours) | Speed (°/h) |
| :---: | :--- | ---: | ---: |
| M2 | Principal lunar semidiurnal | 12.42 | 28.984 |
| S2 | Principal solar semidiurnal | 12.00 | 30.000 |
| K1 | Lunar diurnal | 23.93 | 15.041 |
| O1 | Lunar diurnal | 25.82 | 13.943 |

The speed is just $360°$ divided by the period, so for M2: $360 / 12.42 \approx 28.98$.

## Spring and neap tides

When M2 and S2 line up their crests add; half a cycle later they partly cancel. The time between two spring tides is

$$
T = \frac{360°}{\omega_{S2} - \omega_{M2}} = \frac{360}{30.000 - 28.984} \approx 354 \text{ hours} \approx 14.8 \text{ days}
$$

which is why spring tides come about twice a month, near new and full moon.

## Why predictions miss

The formula only knows about the Sun and the Moon. A storm surge, a strong onshore wind or low air pressure (roughly 1 cm of extra water for every hPa below normal) are not in it.
