3.1 Pressure & Wind

Wind is air in motion, driven primarily by pressure differences. The pressure gradient force is the fundamental driver of atmospheric circulation.

Pressure Gradient Force

$$\vec{F}_{PGF} = -\frac{1}{\rho}\nabla p = -\frac{1}{\rho}\left(\frac{\partial p}{\partial x}\hat{i} + \frac{\partial p}{\partial y}\hat{j} + \frac{\partial p}{\partial z}\hat{k}\right)$$

Force per unit mass directed from high to low pressure

Horizontal PGF

Drives winds from high to low pressure centers

Typical: 10⁻³ to 10⁻² m/s²

Vertical PGF

Nearly balanced by gravity (hydrostatic)

$-\frac{1}{\rho}\frac{\partial p}{\partial z} \approx g$

Equation of Motion

$$\frac{D\vec{v}}{Dt} = -\frac{1}{\rho}\nabla p - 2\vec{\Omega} \times \vec{v} + \vec{g} + \vec{F}_{friction}$$

Term 1: Acceleration (rate of change of velocity)

Term 2: Pressure gradient force

Term 3: Coriolis force

Term 4: Gravitational force

Term 5: Friction

Python: Pressure & Wind Fields

#!/usr/bin/env python3
"""
pressure_wind.py - Visualize pressure gradient and wind

Run: python3 pressure_wind.py
Requires: pip install numpy matplotlib
"""
import numpy as np
import matplotlib.pyplot as plt

# Create a grid
nx, ny = 50, 50
x = np.linspace(-1000, 1000, nx)  # km
y = np.linspace(-1000, 1000, ny)  # km
X, Y = np.meshgrid(x, y)

# Create a pressure field (high and low pressure centers)
# High pressure center at (300, 200) km
# Low pressure center at (-300, -200) km
p_high = 1020 * np.exp(-((X-300)**2 + (Y-200)**2) / (400**2))
p_low = -15 * np.exp(-((X+300)**2 + (Y+200)**2) / (300**2))
p = 1013 + p_high + p_low  # hPa

# Calculate pressure gradient (in hPa/km)
dp_dx = np.gradient(p, x[1]-x[0], axis=1)
dp_dy = np.gradient(p, y[1]-y[0], axis=0)

# Pressure gradient force (proportional, simplified)
# F_pgf = -1/rho * grad(p)
rho = 1.2  # kg/m³
# Convert hPa/km to Pa/m: 1 hPa/km = 0.1 Pa/m
pgf_x = -dp_dx * 0.1 / rho
pgf_y = -dp_dy * 0.1 / rho

# In the absence of other forces, wind would flow down the pressure gradient
# (simplified - no Coriolis)
wind_speed = np.sqrt(pgf_x**2 + pgf_y**2) * 100  # arbitrary scaling

# Plot
fig, axes = plt.subplots(1, 2, figsize=(14, 6))

# Pressure field with isobars
ax1 = axes[0]
cs = ax1.contour(X, Y, p, levels=np.arange(1000, 1030, 2), colors='black')
ax1.clabel(cs, inline=True, fontsize=8, fmt='%.0f')
cf = ax1.contourf(X, Y, p, levels=20, cmap='RdBu_r', alpha=0.7)
plt.colorbar(cf, ax=ax1, label='Pressure (hPa)')
ax1.set_xlabel('x (km)')
ax1.set_ylabel('y (km)')
ax1.set_title('Pressure Field with Isobars')
ax1.set_aspect('equal')

# Mark H and L
ax1.annotate('H', (300, 200), fontsize=20, fontweight='bold', color='blue', ha='center')
ax1.annotate('L', (-300, -200), fontsize=20, fontweight='bold', color='red', ha='center')

# Wind vectors (pressure gradient direction)
ax2 = axes[1]
# Subsample for cleaner arrows
skip = 3
ax2.quiver(X[::skip, ::skip], Y[::skip, ::skip],
           pgf_x[::skip, ::skip], pgf_y[::skip, ::skip],
           wind_speed[::skip, ::skip], cmap='viridis', scale=0.5)
ax2.contour(X, Y, p, levels=np.arange(1000, 1030, 4), colors='gray', alpha=0.5)
ax2.set_xlabel('x (km)')
ax2.set_ylabel('y (km)')
ax2.set_title('Pressure Gradient Force (simplified wind)')
ax2.set_aspect('equal')
ax2.annotate('H', (300, 200), fontsize=20, fontweight='bold', color='blue', ha='center')
ax2.annotate('L', (-300, -200), fontsize=20, fontweight='bold', color='red', ha='center')

plt.tight_layout()
plt.savefig('pressure_wind.png', dpi=150, bbox_inches='tight')
plt.show()

# Calculate typical values
print("Typical pressure gradient force values:")
print(f"  Horizontal gradient: {np.mean(np.abs(dp_dx)):.3f} hPa/km")
print(f"  PGF magnitude: {np.mean(np.sqrt(pgf_x**2 + pgf_y**2))*1000:.2f} × 10⁻³ m/s²")