Solution (source code)

= Solution
{c}

Use a shallow, homogeneous active upper layer of mean thickness $h_0$ and <mass density> $\rho_1$, over a much deeper, effectively stationary layer with <mass density> $\rho_2>\rho_1$. The <Boussinesq approximation> keeps the small density contrast only in <buoyancy>, giving <reduced gravity> $g'=g(\rho_2-\rho_1)/\rho_0$. The <hydrostatic approximation> and <shallow-water approximation> make horizontal <velocity> nearly depth independent and turn the interface slope into the horizontal force $-g'\nabla h$.

Linearize about rest and uniform $h_0$, with $|h-h_0|\ll h_0$, neglecting products of perturbations and <convective acceleration>. The <f-plane> approximation sets the <Coriolis parameter> to constant $f_0$. Neglect wind forcing, <viscosity>, entrainment and bottom drag. The two horizontal <momentum> equations then balance local <acceleration>, the <Coriolis force> and the <pressure gradient>. The signs $-f_0v$ and $+f_0u$ follow from eastward and northward coordinates.

The thickness equation is the linearized <conservation of mass> law: horizontal <divergence> decreases $h$, while horizontal convergence increases it. Here $h$ is active-layer thickness, not total ocean depth, and $g'$ rather than $g$ gives the restoring force because the motion principally displaces the <thermocline>.