lair.pollutants.Pollutant#

class lair.pollutants.Pollutant(name, long_name, latex, units, latex_units, expected_range, formula=None)[source]#

Metadata for one pollutant.

Each field is also an attribute of the same name.

Parameters:
  • name (str) – Canonical short name, e.g. 'CH4', 'NOx', 'PM2.5'.

  • long_name (str) – Plain-language name, e.g. 'methane'.

  • latex (str) – Matplotlib mathtext for the name, e.g. r'$\mathrm{CH_4}$'.

  • units (str) – Usual units for ambient values, as plain text ('ppm', 'ppb', 'ug/m3', 'ng/m3'). Gases are dry-air mole fractions.

  • latex_units (str) – units as matplotlib mathtext.

  • expected_range (tuple[float, float]) – Loose bounds on surface ambient values anywhere in the world, in units: from clean background (and daytime CO2 drawdown over vegetation) up to polluted megacities, wildfire smoke and dust events. Meant for plot limits and quick sanity checks, not as QC thresholds.

  • formula (str | None) – Chemical formula used for the molar mass; None for aerosols. NOx is given as NO2, the usual reporting basis for NOx mass.

See also

get_pollutant

Look one up by name, whatever its case.

POLLUTANTS

The registry.

Examples

>>> from lair.pollutants import get_pollutant
>>> ch4 = get_pollutant("CH4")
>>> ch4.long_name, ch4.units, ch4.expected_range
('methane', 'ppm', (1.7, 5.0))

Attributes

molar_mass

Molar mass in g/mol.

Methods

label([units, latex])

Build an axis label, e.g. '$\mathrm{CH_4}$ [ppm]'.