# Exercise 2: scale the cooling by the amount of sulfur dioxide import math PEAK_PER_20MT = 0.5 # degrees C of peak cooling per 20 Mt SO2 (invented, Pinatubo-like) TAU = 1.0 # e-folding time of the aerosol veil, years (invented) def cooling(so2_mt, year): peak = PEAK_PER_20MT * so2_mt / 20 return peak * math.exp(-year / TAU) for name, so2 in (("Pinatubo-like", 20), ("Tambora-like", 60)): row = ", ".join(f"{cooling(so2, y):.2f}" for y in range(4)) print(f"{name:14s} years 0-3: {row}") # Pinatubo-like years 0-3: 0.50, 0.18, 0.07, 0.02 # Tambora-like years 0-3: 1.50, 0.55, 0.20, 0.07 # Real cooling is not this simple: latitude, season, particle size and ocean heat # all change the result, and a linear scale overstates large eruptions (check).