← All models

FAIR — Finite Amplitude Impulse-Response

Loading runs...

#What this model assumes

  • The temperature shown is the mean across an internal ensemble of 66 parameter sets, not a single physics run.
  • Methane's warming effect is computed with one specific published calculation method (Thornhill et al. 2021).
  • Every quantity is a single global average, with no spatial resolution.
  • It covers 1750-2100 annually and has no data beyond 2100.

#Changelog

  • v2.2.2 (2024) — Fixed a bug in direct aerosol forcing scaling and quieted unnecessary warning/debug logging.
  • v2.1.0 (2021) — The FaIR v2.0 rewrite (Leach et al., GMD 14, 3007-3036, 2021): a vectorized, fully recalibrated reimplementation replacing the original FaIR v1.x impulse-response model.
  • v1.0 — Original Finite Amplitude Impulse Response (FaIR) model (Smith et al. 2018).

#How to run FAIR locally

  1. FAIR is a plain Python package. It needs no compiled extension and no system packages.

    pip install fair
  2. Define a scenario, configure it, and run it. This is the shortest version that runs end to end, using illustrative (not calibrated) climate parameters -- see FAIR's own docs (linked above) for the full calibrated walkthrough.

    from fair import FAIR
    from fair.io import read_properties
    from fair.interface import initialise, fill
    
    f = FAIR()
    f.define_time(2000, 2050, 1)
    f.define_scenarios(["ssp245"])
    f.define_configs(["central"])
    
    species, properties = read_properties()
    f.define_species(species, properties)
    f.allocate()
    
    f.fill_species_configs()
    f.fill_from_rcmip()  # downloads standard SSP emissions/concentrations
    
    # illustrative (not calibrated) ocean heat response
    fill(f.climate_configs["ocean_heat_capacity"], [5, 20, 100], config="central")
    fill(f.climate_configs["ocean_heat_transfer"], [1.0, 2.0, 1.0], config="central")
    fill(f.climate_configs["deep_ocean_efficacy"], 1.29, config="central")
    
    initialise(f.concentration, f.species_configs["baseline_concentration"])
    initialise(f.forcing, 0)
    initialise(f.temperature, 0)
    initialise(f.cumulative_emissions, 0)
    initialise(f.airborne_emissions, 0)
    
    f.run()
    print(f.temperature.sel(layer=0, scenario="ssp245", config="central").values[-5:])
  3. Resource footprint

    Installing FAIR takes about 450MB of disk space (mostly numpy/scipy/pandas/xarray, not FAIR's own code). Running the full ssp245 ensemble above (66 climate configs) takes about 13 to 19 seconds on 1 to 2 CPUs, with no meaningful memory requirement.

#How to run FAIR through the REST API

  1. Submit a run with your API key, then poll it until it finishes.

    curl -X POST https://possibleplanets.org/v1/models/fair/runs \
      -H "Authorization: Bearer YOUR_API_KEY" \
      -d '{"params": {"scenarios": ["ssp245"]}}'
    # -> {"run_id": "a1b2c3d4-5e6f-4789-9abc-def012345678", "status": "queued"}
    
    curl https://possibleplanets.org/v1/runs/a1b2c3d4-5e6f-4789-9abc-def012345678 \
      -H "Authorization: Bearer YOUR_API_KEY"
    # -> {
    #   "status": "succeeded",
    #   "result": {
            "timebounds": [1750.0, 1751.0, ..., 2099.0, 2100.0],  // 351 years
            "temperature": { "ssp245": [ [0.0, ...66 configs...], ..., [2.38, 2.29, 2.58, 4.13, ...] ] }
          },
    #   "duration_seconds": 14.63
    # }
    # year 2100, mean across 66 climate configs: 3.61°C

    Cached results don't need an API key.

  2. Cost

    This model runs on 2 vCPUs and 1 GiB of memory for about 15 seconds per run, which costs roughly $0.48 per 1,000 runs on Daytona. Results that are already cached are free.