6.4 Climate Models
Climate models (GCMs/ESMs) simulate Earth's climate system by solving equations for atmosphere, ocean, land, and ice on a 3D grid.
Model Hierarchy
EBM
Energy Balance Model: 0D-1D, fast, conceptual
GCM
General Circulation Model: 3D atmosphere + ocean
ESM
Earth System Model: GCM + carbon cycle, vegetation, chemistry
Python: Simple EBM
#!/usr/bin/env python3
"""climate_models.py - 0D Energy Balance Model"""
import numpy as np
import matplotlib.pyplot as plt
sigma = 5.67e-8; C = 4e8 # Heat capacity J/(mยฒยทK)
S0 = 1361; alpha = 0.30
T = np.zeros(200); T[0] = 250; dt = 3.15e7 # 1 year
for i in range(1, len(T)):
F_in = S0*(1-alpha)/4
F_out = sigma * T[i-1]**4
T[i] = T[i-1] + dt/C * (F_in - F_out)
plt.plot(T); plt.xlabel('Years'); plt.ylabel('T (K)')
plt.title('EBM Equilibration'); plt.grid(True)
plt.savefig('climate_models.png'); plt.show()