lair.noaa.CarbonTrackerCH4#

class lair.noaa.CarbonTrackerCH4(version='CT-CH4-2025', carbon_tracker_directory=None, cache=True, parallel_parse=True)[source]#

Bases: CarbonTracker

NOAA CarbonTracker-CH4

Mole fractions are in ppb. The CarbonTracker example shows the folder.

Each parameter is also an attribute of the same name.

Parameters:
  • version (str, optional) – The version, by default 'CT-CH4-2025'.

  • 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 (see CarbonTracker).

  • parallel_parse (bool, optional) – Whether molefractions opens the files in worker processes, one for each CPU this process may use (default True), or one at a time. The workers import the calling script again, so a script that reads molefractions needs the if __name__ == "__main__": guard. Inside a worker process, such as one of parallelize(), the files are opened one at a time whatever this says.

See also

CarbonTrackerCO2

The same for CO2.

Examples

Nothing is read until the data is used:

>>> from lair.noaa import CarbonTrackerCH4
>>> print(CarbonTrackerCH4(carbon_tracker_directory="carbontracker"))
CarbonTrackerCH4(CT-CH4-2025)

Attributes

molefractions

Molefractions Dataset of every file of the version.

Methods

calc_molefractions_pressure(molefractions)

Calculate the pressure at each level in the molefractions Dataset.

Inherited

From CarbonTracker: background, download, from_version, get_specie_from_version, molefractions_dir, sample, units