Examples
Some examples of easy-to-run climate simulations
Running longterm
with no arguments is boring because it will generate a time series representing a continuation of the preindustrial steady state. Below are some examples of more interesting simulations.
Constant radiative forcing
This simulation turns on a 1 W/m2 top-of-atmosphere radiative forcing at t=0 and holds it on for all time thereafter.
output <- longterm(sources=list(rad=1))
output = longterm.run(sources={"rad":1})
Nuclear winter
This simulation turns on a -500 W/m2 top-of-atmosphere radiative forcing at t=0 that then decays with an e-folding timescale of 5 years, representing the effects of a severe nuclear winter.
output <- longterm(sources=list(rad=function(t){ -500*(1-exp(-t/5)) }))
import math
output = longterm.run(sources={"rad": lambda t: -500*(1-math.exp(-t/5))})
Slug of fossil fuel
This simulation releases 5000 GtC of fossil carbon into the atmosphere as CO2 at t=0.
output <- longterm(sources=list(Cas=function(t){ if (t>0) { 5000 } else { 0 } }))
output = longterm.run(sources={"Cas": lambda t: 5000 if t > 0 else 0})