3D Ocean Currents: Wind-Driven Gyre and Western Boundary Current | mysimulator.uk

A Blender diorama of an ocean basin: trade winds and westerlies drive a gyre on a rotating planet and the beta effect squeezes the return flow into a western boundary current (Stommel model).

Switch to 2D

Presets

Playback

Parameters

Camera

Layers

Quality

Model check

The science

What is modelled

The ocean basin is a rectangular box on a rotating planet. Winds blow westward in the south (trade winds) and eastward in the north (westerlies); their twist, the wind-stress curl, drives the whole upper ocean around a huge clockwise gyre. Because the Coriolis effect grows with latitude (the "beta effect"), the return flow is squeezed into a narrow, fast current on the western side, like the Gulf Stream. The page solves the vorticity equation of this classical model (Stommel, 1948) both as a time-stepped simulation that starts from rest and as the exact steady solution, and compares them.

Equations

  • Vertically integrated transport streamfunction ψ (m³/s): U = −∂ψ/∂y, V = ∂ψ/∂x, relative vorticity ζ = ∇²ψ.
  • Vorticity budget with linear bottom friction: ∂ζ/∂t = −β ∂ψ/∂x − R ζ + curl(τ)/ρ, with β = 2Ω cos(lat)/a.
  • Wind stress τx = −τ₀ cos(πy/Ly), so curl(τ) = −τ₀ (π/Ly) sin(πy/Ly); the coast is a wall: ψ = 0 on all four sides.
  • Steady state (Stommel): β ∂ψ/∂x + R ∇²ψ = curl(τ)/ρ. Its exact solution is ψ = f(x) sin(πy/Ly) with f = fp(1 + A em₁x + B em₂x), where m₁,₂ are the roots of R m² + β m − R k² = 0 and fp = τ₀ / (ρ R k); the western boundary layer has width R/β.
  • Away from the wall, with weak friction, the interior obeys Sverdrup balance β V = curl(τ)/ρ.
  • Sea-surface height from geostrophy: η = f ψ / (g H); currents are the transport divided by an effective layer depth of 1000 m.

Checks run in the page

  • The analytic solution satisfies the finite-difference form of the vorticity equation on the page grid to within grid-truncation error.
  • The time-stepped solver (Heun scheme with an SOR Poisson solve) started from rest converges to the analytic steady solution.
  • As the friction coefficient falls, the exact interior flow approaches the Sverdrup value.
  • In the steady state, the wind torque on the basin equals the bottom-friction torque (the integral of vorticity from the wall shear), a global conservation law.
  • Halving the time step changes the spun-up field by less than 0.1 %.

Honest simplifications

  • One layer of constant effective depth, linear bottom drag, a flat beta plane, a rectangular basin and a sinusoidal wind pattern. The model has no eddies, no temperature or salinity, no deep thermohaline circulation, no continents with realistic shapes and no Antarctic Circumpolar Current.
  • Because friction is linear and there is no nonlinearity, the western current is weaker and wider than the real Gulf Stream (a depth-averaged few centimetres per second here, against about a metre per second at the surface in the real ocean); the transport of tens of sverdrups is the right order of magnitude. The friction coefficient is a tuning knob, not a measured quantity.
  • The sea-surface height shown is the geostrophic part driven by the wind only (about 0.2 m), drawn with an enormous vertical exaggeration; the real signal also has a baroclinic part of about a metre.
  • The coastlines, mountains and ocean floor are a Blender-made diorama chosen for looks; only the flat basin outline enters the equations. One second of animation is several days of ocean time.

What to try

  • Press Restart and watch the gyre spin up; then press Snap to steady state and compare the two curves.
  • Choose Low friction: the western current narrows and speeds up, the interior barely changes.
  • Choose Near the equator and High latitude to see how the beta effect sets the width of the current.
  • Switch off the wind arrows and tracers to see only the sea-surface hump, which sits west of the basin centre.

Independent educational model; not an operational ocean forecast.

Loading model...
Loading Blender model...
Transport streamfunction along the middle of the basin
North-south current speed across the basin
Spin-up of the gyre transport
Made with 🟠 Blender · Three.js