lair.inventories.EDGARv7#

class lair.inventories.EDGARv7(pollutant, inventory_dir=None, start=None, end=None)[source]#

Bases: EDGAR

EDGAR v7 - Global Greenhouse Gas Emissions

https://edgar.jrc.ec.europa.eu/dataset_ghg70

EDGAR (Emissions Database for Global Atmospheric Research) Community GHG Database (a collaboration between the European Commission, Joint Research Centre (JRC), the International Energy Agency (IEA), and comprising IEA-EDGAR CO2, EDGAR CH4, EDGAR N2O, EDGAR F-GASES version 7.0, (2022) European Commission, JRC (Datasets).

Parameters:
  • pollutant (str) – The pollutant, as the name of its folder ('CH4').

  • inventory_dir (str, optional) – Root of the inventory archive, by default $LAIR_INVENTORY_DIR.

  • start (int, optional) – The first year to read, by default the first year the archive has.

  • end (int, optional) – The last year to read (included), by default the last year the archive has. Only the files of the years from start to end are opened, as EDGAR says.

Raises:
  • FileNotFoundError – If there are no files for the years from start to end.

  • TypeError – If start or end is not an integer year.

Notes

The folder is the pollutant’s name as typed ('CH4'), below the inventory root (inventory_dir, default $LAIR_INVENTORY_DIR), with one folder per sector. lair takes the year from each file name and does not read the TOTALS folder:

EDGAR/v7/CH4/
  AGS/v7.0_FT2021_CH4_2021_AGS.0.1x0.1.nc
  AWB/v7.0_FT2021_CH4_2021_AWB.0.1x0.1.nc
  ...

A .nc file in the folder whose name does not end with _<year>_<sector>.0.1x0.1.nc (a copy, a partial download) is left out, and a warning names it; if no file is left, the class raises FileNotFoundError.

See also

EDGARv8

The next version, with monthly files too.

Examples

It reads $LAIR_INVENTORY_DIR, so these lines are not run when the docs build:

>>> from lair.inventories import EDGARv7
>>> inv = EDGARv7("CH4", start=2021)
>>> "Enteric_fermentation" in inv.data
True

Inherited

From EDGAR: get_files, get_sector_name

From Inventory: absolute_emissions, collapsed, convert_units, data, get_standard_name, get_units, integrate, plot, quantify, regrid, reproject, resample, total_emissions

From BaseGrid: clip, copy, gridcell_area