Skip to main content

Python package to perform calculations with the FaIR simple climate model

Project description

Build Status
Binder
Documentation Status
Zenodo
Codecov

FaIR

Finite Amplitude Impulse-Response simple climate-carbon-cycle model

Installation

  1. Make sure you have Python 3.6+ and pip installed

  2. From terminal/command prompt pip install fair

Usage

FaIR takes emissions of greenhouse gases, aerosol and ozone precursors, and converts these into greenhouse gas concentrations, radiative forcing and temperature change.

There are two ways to run FaIR:

  1. Carbon dioxide emissions only with all other radiative forcings specified externally (specify useMultigas=False in the call to fair_scm);

  2. All species included in the RCP emissions datasets, with, optionally, solar and volcanic forcing still specified externally. For convenience, the RCP datasets are provided in the RCP subdirectory and can be imported:

from fair.forward import fair_scm
from fair.RCPs import rcp85
emissions = rcp85.Emissions.emissions
C,F,T = fair_scm(emissions=emissions)

The main engine of the model is the fair_scm function in forward.py. This function can be imported into a Python script or iPython session. The most important keyword to fair_scm is the emissions. This should be either a (nt, 40) numpy array (in multigas mode) or (nt,) numpy array (in CO2 only mode), where nt is the number of model timesteps. The outputs are a tuple of (C, F, T) arrays which are GHG concentrations ((nt, 31) in multigas mode, (nt,) in CO2-only mode), forcing ((nt, 13) or (nt,)) and temperature change (nt,). The index numbers corresponding to each species will be given in tables 1 to 3 of the revised version of the Smith et al. paper reference below (we hope to make this object-oriented in the future). For now, note that the input emissions follow the ordering of the RCP datasets, which are included under fair/RCPs, and the GHG concentrations output are in the same order, except that we don’t output the year, only use one column for total CO2, and the short-lived species (input indices 5 to 11 inclusive) are not included, reducing the number of columns from 40 to 31. In multigas mode the forcing output indices are:

  1. CO2

  2. CH4

  3. N2O

  4. Minor GHGs (CFCs, HFCs etc)

  5. Tropospheric ozone

  6. Stratospheric ozone

  7. Stratospheric water vapour from methane oxidation

  8. Contrails

  9. Aerosols

  10. Black carbon on snow

  11. Land use

  12. Volcanic

  13. Solar

For further information, see the example ipython notebook contained in the GitHub repo at https://github.com/OMS-NetZero/FAIR.

References:

Smith, C. J., Forster, P. M., Allen, M., Leach, N., Millar, R. J., Passerello, G. A., and Regayre, L. A.: FAIR v1.3: A simple emissions-based impulse response and carbon cycle model, Geosci. Model Dev., https://doi.org/10.5194/gmd-11-2273-2018, 2018.

Millar, R. J., Nicholls, Z. R., Friedlingstein, P., and Allen, M. R.: A modified impulse-response representation of the global near-surface air temperature and atmospheric concentration response to carbon dioxide emissions, Atmos. Chem. Phys., 17, 7213-7228, https://doi.org/10.5194/acp-17-7213-2017, 2017.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fair-1.6.0rc0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

fair-1.6.0rc0-py3-none-any.whl (1.3 MB view details)

Uploaded Python 3

File details

Details for the file fair-1.6.0rc0.tar.gz.

File metadata

  • Download URL: fair-1.6.0rc0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for fair-1.6.0rc0.tar.gz
Algorithm Hash digest
SHA256 39b6ad4249bcd018c952039d36053fc144b34ca8b6459a7d00a2f32c3026875a
MD5 10a2be695e5b9bc57ec1417c9b4116f2
BLAKE2b-256 942b5a950f2f2bcbf639906bc270020990a4f9a4f1107b71df136d7f0f1e285e

See more details on using hashes here.

Provenance

File details

Details for the file fair-1.6.0rc0-py3-none-any.whl.

File metadata

  • Download URL: fair-1.6.0rc0-py3-none-any.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for fair-1.6.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c38bf848e5a2fd3088a752a24c078318d9e1e5a31d8f91d68186452d13727da
MD5 b504c09c6110e973b448cf3b0d30391d
BLAKE2b-256 29aff507399bd0d3d20ecbd4967cb57f7293a8fce07bc24318a1b31f11cb49a0

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page