How rotation and stratification organise the atmosphere and ocean — why the wind blows along the pressure contours rather than across them, why weather systems and ocean eddies come out the size they do, and why a fluid on a spinning planet behaves unlike any fluid in a laboratory. An interactive textbook, with every chapter runnable in the browser.
Twenty-four chapters across seven parts: from kinematics and the governing equations, through geostrophic balance, quasi-geostrophy and stratified waves, to the instabilities that make storms and eddies, geostrophic turbulence, and the wind-driven and overturning circulations. Every chapter runs Python in your browser — nothing to install, no account, no server. Free and open, for anyone.
The two notebooks below are chapters 6 and 16 of the interactive textbook, reproduced here. Open the book for the full table of contents.
Perturb a rotating fluid away from rest and two things happen at once: fast inertia-gravity waves radiate the imbalance outward, while rotation traps part of the disturbance behind as a standing, balanced flow. This is how almost every localized disturbance in the atmosphere or ocean — a convective burst, a wind-stress event, an eddy shed from an unstable current — settles into the slowly evolving balanced motion. The deformation radius decides the outcome, and the conserved potential vorticity predicts the balanced end state before you integrate a single time step.
The download installs its own dependencies in the
first cell. Its sliders are static — edit value= and re-run to
change a parameter.
Mid-latitude storms and ocean mesoscale eddies do not draw their energy from horizontal shear. They draw it from the potential energy locked up in a sloping temperature surface — the same thermal-wind shear that balances the mean flow. This chapter builds both classic models: the Eady problem, whose eigenvalue solution gives a closed growth-rate curve from stratification and shear alone, and the two-layer Phillips model, whose nonlinear evolution shows what the instability actually does — grow, peak, break and equilibrate. Arguably the single most consequential instability in geophysical fluid dynamics.
The download installs its dependencies and fetches
the precomputed life cycle in its first cells. Its sliders are static — edit
value= and re-run to change a parameter.