Earth
Coastal upwelling
Let an equatorward wind blow along a rocky eastern-boundary coast in the low evening sun and watch the sea turn cold: the Earth’s rotation turns the wind-driven surface water to the right of the wind, offshore, at Ekman’s transport τ/(ρf), and cold deep water comes up to replace it. In the cut-away ocean the interface between the warm layer and the deep water tilts up towards the coast within a Rossby radius sqrt(g’H)/f, rising steadily as Gill’s closed form τt/(ρfR) e^(−x/R), and a geostrophic jet runs along the shore. The surface cools where the mixed layer reaches the cold water, fog gathers over it, boats and seabirds come, and plankton bloom days later. Reverse the wind, turn the coast round or move it to the other hemisphere and the water sinks instead; the volume exported offshore balances to round-off.

What happens
A warm upper layer 50 m thick at 18 °C over deep, motionless water at 10 °C (g’ = gα(T_w − T_d) = 0.0157 m/s², α = 2×10^-4 per K) across 300 km of ocean off a straight coast at 35° N, uniform alongshore, in 300 cells of 1 km: the layer thickness at cell centres, both velocities at the faces. Forward-backward steps of 300 s update the thickness from the face transports, then the velocities from the new interface slope and a wind stress of 0.08 N/m² spread over the layer, with Coriolis taken Crank-Nicolson and an optional linear drag implicitly; the coast is a wall (u = 0), the last face is the open ocean with its Ekman drift and inertial oscillation, and what crosses it is the volume ledger. The wind comes on over two days, blows to day 5 and goes off over two more. Gill’s spin-up: the interface rises at the coast as I(t)/(ρfR) e^(−x/R), R = √(g’H)/f = 10.6 km, the jet grows as I/(ρH); far out the layer drifts offshore at τ/(ρf) = 0.93 m²/s. The surface temperature comes from a wind-mixed layer 40 m deep that mixes in deep water wherever the interface is shallower; plankton grow on the nutrients it brings, at 2 per day, and die back at 0.2 per day. The nonlinear layer carries h·u upwind with momentum advection and lets the wind go where the layer has outcropped.
Try this
Watch the interface tilt up and the coast cool as Gill’s line says; reverse the wind or the coast for downwelling; move the coast south and blow the wind north; change the latitude and see the band narrow while the rise stays; add friction and calm the wind to let the front relax; make the layer thin and nonlinear and let it outcrop.
The model and its limits
One cross-shore section, uniform alongshore: no alongshore pressure gradient, so after the wind the front relaxes only by friction - the coastal Kelvin waves that carry relaxation along a real coast are not modelled. A flat bottom and an infinitely deep, motionless lower layer; no heat exchange with the air. Gill’s formula is a long-time asymptote and holds while the rise is small against the layer; within 10° of the equator Ekman’s balance fails and the latitude is held at ±10°. Plankton do not drift. Boats, birds and fog are not to scale.
Equations used in the module
Equations ∂u/∂t − f·v = −g’·∂h/∂x − r·u, ∂v/∂t + f·u = τ/(ρ·h) − r·v, g’ = g·α·(T_w − T_d) ∂h/∂t + ∂(h·u)/∂x = 0, u = 0 at the coast, R = √(g’·H)/f Ekman: h·u = τ/(ρ·f) offshore; Gill: Δh(x, t) = −I(t)/(ρ·f·R)·e^(−x/R), v(0, t) = I(t)/(ρ·H), I = ∫τ dt SST = T_w − (T_w − T_d)·max(0, 1 − h/D), dP/dt = μ·(1 − h/D)·P·(1 − P) − m·(P − P0)


