lair.noaa.CarbonTracker#

class lair.noaa.CarbonTracker(version, carbon_tracker_directory=None, cache=True)[source]#

NOAA CarbonTracker

The base of CarbonTrackerCH4 and CarbonTrackerCO2, which are the classes to make (or from_version()).

Parameters:
  • version (str) – The version of CarbonTracker data to download. Visit https://gml.noaa.gov/aftp/products/carbontracker/ to see available versions.

  • carbon_tracker_directory (str, optional) – The CarbonTracker data root, by default $LAIR_CARBONTRACKER_DIR.

  • cache (bool, optional) – Whether to cache the data, by default True. The cache is a file in LAIR_CACHE_DIR (default ~/.cache/lair), and the folder is made the first time the data is read, so cache=False needs no writable folder.

Raises:

TypeError – If made as CarbonTracker itself, which has no gas.

Variables:
  • specie (Literal['ch4', 'co2']) – The greenhouse gas specie.

  • version (str) – The CarbonTracker version.

  • directory (str) – The directory for the version: <root>/<specie>/<version>.

  • cache (bool) – Whether to cache the data (in LAIR_CACHE_DIR).

See also

CarbonTrackerCH4

CarbonTracker-CH4.

CarbonTrackerCO2

CarbonTracker for CO2.

Attributes

molefractions_dir

Directory of the molefraction (concentration-field) files.

units

Units of the molefraction field ('ppb' for CH4, 'ppm' for CO2)

Methods

background(points[, by])

Background mole fraction [ppm]: mean of the sampled field over points.

download([sub_dirs, pattern])

Download CarbonTracker data from the NOAA GML FTP server.

from_version(version[, carbon_tracker_directory])

Create a CarbonTracker object from the version.

get_specie_from_version(version)

Get the specie from the version.

sample(points)

Sample the molefraction field at points.