lair.air.inventories#
Emissions Inventories
An emission(s) inventory is an accounting of the amount of pollutants discharged into the atmosphere. An emission inventory usually contains the total emissions for one or more specific greenhouse gases or air pollutants, originating from all source categories in a certain geographical area and within a specified time span, usually a specific year.
Module Attributes
Inventory directory |
|
Default destination units |
Functions
|
Calculate the molecular weight of a pollutant. |
|
Sum emissions from all sectors in the dataset. |
Classes
|
EDGAR - Emissions Database for Global Atmospheric Research |
|
EDGAR v7 - Global Greenhouse Gas Emissions |
|
EDGAR v8 - Global Greenhouse Gas Emissions |
|
United States Environmental Protection Agency (EPA) Gridded Methane Emissions |
|
EPA Gridded 2012 Methane Emissions |
|
EPA U.S. |
|
Global Fuel Exploitation Inventory (GFEI) |
|
Global Fuel Exploitation Inventory v1 |
|
Global Fuel Exploitation Inventory v2 |
|
Base class for inventories. |
|
Base class for inventories that are multi-model. |
|
The Vulcan Project |
|
WetCHARTs - Wetland Methane Emissions and Uncertainty |
- lair.air.inventories.INVENTORY_DIR = '/uufs/chpc.utah.edu/common/home/lin-group11/group_data/inventories'#
Inventory directory
- lair.air.inventories.molecular_weight(pollutant: str) Quantity [source]#
Calculate the molecular weight of a pollutant.
- Parameters:
- pollutantstr
The pollutant.
- Returns:
- pint.Quantity
The molecular weight.
- lair.air.inventories.sum_sectors(data: Dataset) DataArray [source]#
Sum emissions from all sectors in the dataset.
- Parameters:
- dataxr.Dataset
The inventory data with emissions from multiple sectors as different variables.
- Returns:
- xr.DataArray
The sum of emissions from all sectors.
- class lair.air.inventories.Inventory(data: str | Path | Dataset, pollutant: str, src_units: str | None = None, time_step: str = 'annual', crs: str = 'EPSG:4326', version: str | None = None)[source]#
Base class for inventories.
- __init__(data: str | Path | Dataset, pollutant: str, src_units: str | None = None, time_step: str = 'annual', crs: str = 'EPSG:4326', version: str | None = None) None [source]#
Initialize the inventory.
- Parameters:
- datastr | Path | xr.Dataset
The inventory data. If a string or Path, the path to the data. If an xr.Dataset, the data itself. Data should have dimensions of time, lat, lon and each variable should be a different emissions sector. If the source data is not in the correct format, the _process method should be overridden.
- pollutantstr
The pollutant.
- src_unitsstr, optional
The source units of the data, by default None. If None, the units are extracted from the data attributes.
- time_stepstr, optional
The time step of the data, by default ‘annual’.
- crsstr, optional
The CRS of the data, by default ‘EPSG:4326’.
- versionstr, optional
The version of the inventory, by default None.
- get_standard_name() str [source]#
Get the standard name of the inventory.
- Returns:
- str
The standard name.
- get_files() None | list[Path] [source]#
Get the inventory files.
- Returns:
- None | list[Path]
The inventory files.
- property gridcell_area: DataArray#
Calculate the grid cell area in km^2.
- Returns:
- xr.DataArray
The grid cell area.
- property absolute_emissions: Dataset#
Calculate the absolute emissions (total per gridcell for time step by variable).
- Returns:
- xr.DataArray
The absolute emissions.
- property total_emissions: DataArray#
Calculate the total emissions by summation over all variables.
- Returns:
- xr.DataArray
The total emissions.
- property data: Dataset#
The inventory data.
Note
pint units have been dequantified and stored in variable attributes.
- Returns:
- xr.DataArray | xr.Dataset
The inventory data.
- quantify() Dataset [source]#
Quantify the data using pint units for each variable.
- Returns:
- xr.Dataset
The quantified data.
- convert_units(dst_units: Any) Self [source]#
Convert the units of the data to the desired output units.
- Parameters:
- dst_unitsAny
The destination units.
- Returns:
- xr.Dataset
The data with the units converted.
- clip(bbox: tuple[float, float, float, float] | None = None, extent: tuple[float, float, float, float] | None = None, geom: Polygon | None = None, crs: Any = None, **kwargs: Any) Self [source]#
Clip the data to the given bounds. Modifies the data in place.
Input bounds must be in the same CRS as the data.
Note
The result can be slightly different between supplying a geom and a bbox/extent. Clipping with a geom seems to be exclusive of the bounds, while clipping with a bbox/extent seems to be inclusive of the bounds.
- Parameters:
- bboxtuple[minx, miny, maxx, maxy]
The bounding box to clip the data to.
- extenttuple[minx, maxx, miny, maxy]
The extent to clip the data to.
- geomshapely.Polygon
The geometry to clip the data to.
- crsAny
The CRS of the input geometries. If not provided, the CRS of the data is used.
- kwargsAny
Additional keyword arguments to pass to the rioxarray clip method.
- Returns:
- Inventory
The clipped inventory.
- regrid(out_grid: Dataset, method: Literal['conservative', 'conservative_normed'] = 'conservative') Self [source]#
Regrid the data to a new grid. Uses xesmf for regridding.
Note
At present, xesmf only supports regridding lat-lon grids. self.data must be on a lat-lon grid. Possibly could use xesmf.frontend.BaseRegridder to regrid to a generic grid.
Warning
xarray.Dataset.cf.add_bounds is known to have issues, including near the 180th meridian. Care should be taken when using this method, especially with global datasets.
- Parameters:
- out_gridxr.DataArray
The new grid to resample to. Must be a lat-lon grid.
- methodstr, optional
The regridding method, by default ‘conservative’.
Note
Other xesmf regrid methods can be passed, but it is highly encouraged to use a conservative method for fluxes.
- Returns:
- Inventory
The regridded inventory.
- resample(resolution: float | tuple[float, float], regrid_method: Literal['conservative', 'conservative_normed'] = 'conservative') Self [source]#
Resample the data to a new resolution.
- Parameters:
- resolutionfloat | tuple[x_res, y_res]
The new resolution in degrees. If a single value is provided, the resolution is assumed to be the same in both dimensions.
- regrid_methodstr, optional
The regridding method, by default ‘conservative’.
- Returns:
- Inventory
The resampled inventory.
- reproject(resolution: float | tuple[float, float], regrid_method: Literal['conservative', 'conservative_normed'] = 'conservative') Self [source]#
Reproject the data to a lat lon rectilinear grid.
- Parameters:
- resolutionfloat | tuple[x_res, y_res]
The new resolution in degrees. If a single value is provided, the resolution is assumed to be the same in both dimensions.
- regrid_methodstr, optional
The regridding method, by default ‘conservative’.
- Returns:
- Inventory
The reprojected inventory.
- integrate() DataArray [source]#
Integrate the data over the spatial dimensions to get the total emissions per time step.
- Returns:
- xr.DataArray
The integrated data.
- plot(ax: Axes | None = None, time: str | int = 'mean', sector: str | None = None, **kwargs) Axes [source]#
Plot the inventory data.
- Parameters:
- axmatplotlib.axes.Axes
The axes to plot on.
- timestr | int, optional
The time step to plot, by default ‘mean’. If ‘mean’, the mean emissions are plotted. Otherwise pass a string selector or integer index.
- sectorstr, optional
The sector to plot, by default None. If None, the total emissions are plotted.
- kwargsdict
Additional keyword arguments to pass to xarray’s plot method.
- Returns:
- matplotlib.axes.Axes
The axes with the plot.
- class lair.air.inventories.MultiModelInventory(data: str | Path | Dataset, pollutant: str, src_units: str | None = None, time_step: str = 'annual', crs: str = 'EPSG:4326', version: str | None = None, model: str | None = None)[source]#
Base class for inventories that are multi-model.
- __init__(data: str | Path | Dataset, pollutant: str, src_units: str | None = None, time_step: str = 'annual', crs: str = 'EPSG:4326', version: str | None = None, model: str | None = None) None [source]#
Initialize the multi-model inventory.
- Parameters:
- datastr | Path | xr.Dataset
The inventory data. If a string or Path, the path to the data. If an xr.Dataset, the data itself. Data should have dimensions of time, lat, lon and each variable should be a different emissions sector. If the source data is not in the correct format, the _process method should be overridden.
- pollutantstr
The pollutant.
- src_unitsstr, optional
The source units of the data, by default None. If None, the units are extracted from the data attributes.
- time_stepstr, optional
The time step of the data, by default ‘annual’.
- crsstr, optional
The CRS of the data, by default ‘EPSG:4326’.
- versionstr, optional
The version of the inventory, by default None.
- modelstr, optional
The model to select from the multimodel data, by default None. If None, the mean of all models is used.
- class lair.air.inventories.EDGAR(data: str | Path | Dataset, pollutant: str, src_units: str | None = None, time_step: str = 'annual', crs: str = 'EPSG:4326', version: str | None = None)[source]#
EDGAR - Emissions Database for Global Atmospheric Research
https://edgar.jrc.ec.europa.eu/
EDGAR is a multipurpose, independent, global database of anthropogenic emissions of greenhouse gases and air pollution on Earth. EDGAR provides independent emission estimates compared to what reported by European Member States or by Parties under the United Nations Framework Convention on Climate Change (UNFCCC), using international statistics and a consistent IPCC methodology.
EDGAR provides both emissions as national totals and gridmaps at 0.1 x 0.1 degree resolution at global level, with yearly, monthly and up to hourly data.
- class lair.air.inventories.EDGARv7(pollutant: str)[source]#
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).
- class lair.air.inventories.EDGARv8(pollutant: str, time_step: Literal['annual', 'monthly'] = 'annual')[source]#
EDGAR v8 - Global Greenhouse Gas Emissions
https://edgar.jrc.ec.europa.eu/dataset_ghg80
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 8.0, (2023) European Commission, JRC (Datasets).
- class lair.air.inventories.EPA(data: str | Path | Dataset, pollutant: str, src_units: str | None = None, time_step: str = 'annual', crs: str = 'EPSG:4326', version: str | None = None)[source]#
United States Environmental Protection Agency (EPA) Gridded Methane Emissions
https://www.epa.gov/ghgemissions/us-gridded-methane-emissions
The gridded EPA U.S. methane greenhouse gas inventory (gridded methane GHGI) includes time series of annual methane emission maps with 0.1° x 0.1° (~ 10 x 10 km) spatial and monthly temporal resolution for the contiguous United State (CONUS). This gridded methane inventory is designed to be consistent with methane emissions from the U.S. EPA Inventory of U.S. Greenhouse Gas Emissions and Sinks (U.S. GHGI).
- class lair.air.inventories.EPAv1(time_step='Annual')[source]#
EPA Gridded 2012 Methane Emissions
https://www.epa.gov/ghgemissions/gridded-2012-methane-emissions
Maasakkers JD, Jacob DJ, Sulprizio MP, Turner AJ, Weitz M, Wirth T, Hight C, DeFigueiredo M, Desai M, Schmeltz R, Hockstad L, Bloom AA, Bowman KW, Jeong S, Fischer ML. Gridded National Inventory of U.S. Methane Emissions. Environ Sci Technol. 2016 Dec 6;50(23):13123-13133. doi: 10.1021/acs.est.6b02878. Epub 2016 Nov 16. PMID: 27934278.
- class lair.air.inventories.EPAv2(express: bool = False, scale_by_month: bool = False)[source]#
EPA U.S. Anthropogenic Methane Greenhouse Gas Inventory
https://zenodo.org/records/8367082
McDuffie, Erin, E., Maasakkers, Joannes, D., Sulprizio, Melissa, P., Chen, C., Schultz, M., Brunelle, L., Thrush, R., Steller, J., Sherry, C., Jacob, Daniel, J., Jeong, S., Irving, B., & Weitz, M. (2023). Gridded EPA U.S. Anthropogenic Methane Greenhouse Gas Inventory (gridded GHGI) (v1.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.8367082
- class lair.air.inventories.GFEI[source]#
Global Fuel Exploitation Inventory (GFEI)
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/HH4EUM
This is the Global Fuel Exploitation Inventory (GFEI) which provides a 0.1 x 0.1 degree grid of methane emissions of fugitive emissions related to oil, gas, and coal activities (IPCC Sector 1B1 and 1B2).
- class lair.air.inventories.GFEIv1[source]#
Global Fuel Exploitation Inventory v1
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/HH4EUM&version=1.0
Scarpelli, T. R., Jacob, D. J., Maasakkers, J. D., Sulprizio, M. P., Sheng, J.-X., Rose, K., Romeo, L., Worden, J. R., and Janssens-Maenhout, G.: A global gridded (0.1° × 0.1°) inventory of methane emissions from oil, gas, and coal exploitation based on national reports to the United Nations Framework Convention on Climate Change, Earth Syst. Sci. Data, 12, 563–575, https://doi.org/10.5194/essd-12-563-2020, 2020a.
- class lair.air.inventories.GFEIv2[source]#
Global Fuel Exploitation Inventory v2
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/HH4EUM&version=2.0
Scarpelli, T. R., Jacob, D. J., Grossman, S., Lu, X., Qu, Z., Sulprizio, M. P., Zhang, Y., Reuland, F., Gordon, D., and Worden, J. R.: Updated Global Fuel Exploitation Inventory (GFEI) for methane emissions from the oil, gas, and coal sectors: evaluation with inversions of atmospheric methane observations, Atmos. Chem. Phys., 22, 3235–3249, https://doi.org/10.5194/acp-22-3235-2022, 2022.
- class lair.air.inventories.Vulcan(time_step: Literal['annual', 'hourly'] = 'annual', region: Literal['US', 'AK'] = 'US')[source]#
The Vulcan Project
https://vulcan.rc.nau.edu/ v3: https://daac.ornl.gov/NACP/guides/Vulcan_V3_Annual_Emissions.html
The Vulcan Project quantifies all fossil fuel CO2 emissions for the entire United States at high space- and time-resolution with details on economic sector, fuel, and combustion process. It was created by the research team of Dr. Kevin Robert Gurney at Northern Arizona University.
Gurney, K.R., J. Liang, R. Patarasuk, Y. Song, J. Huang, and G. Roest. 2019. Vulcan: High-Resolution Annual Fossil Fuel CO2 Emissions in USA, 2010-2015, Version 3. ORNL DAAC, Oak Ridge, Tennessee, USA. https://doi.org/10.3334/ORNLDAAC/1741
- __init__(time_step: Literal['annual', 'hourly'] = 'annual', region: Literal['US', 'AK'] = 'US') None [source]#
Initialize the Vulcan inventory.
- Parameters:
- time_stepLiteral[‘annual’, ‘hourly’], optional
The time step of the data, by default ‘annual’.
- regionLiteral[‘US’, ‘AK’], optional
The region of the data, by default ‘US’.
- get_files(uncertainty='central') list[Path] [source]#
Get the inventory files.
- Returns:
- None | list[Path]
The inventory files.
- reproject(resolution: float | tuple[float, float] = 0.01, regrid_method: Literal['conservative', 'conservative_normed'] = 'conservative', force: bool = False) Self [source]#
Reproject the data to a lat lon rectilinear grid.
Tip
This method is memory intensive and may require a lot of RAM. It is highly recommended to clip the data first.
- Parameters:
- resolutionfloat | tuple[x_res, y_res]
The new resolution in degrees. If a single value is provided, the resolution is assumed to be the same in both dimensions.
- forcebool
Whether to override the clipping requirement
- Returns:
- Inventory
The reprojected inventory.
- class lair.air.inventories.WetCHARTs(model: str | None = None)[source]#
WetCHARTs - Wetland Methane Emissions and Uncertainty
https://daac.ornl.gov/CMS/guides/MonthlyWetland_CH4_WetCHARTs.html
This dataset provides global monthly wetland methane (CH4) emissions estimates at 0.5 by 0.5-degree resolution for the period 2001-2019 that were derived from an ensemble of multiple terrestrial biosphere models, wetland extent scenarios, and CH4:C temperature dependencies that encompass the main sources of uncertainty in wetland CH4 emissions. There are 18 model configurations. WetCHARTs v1.3.1 is an updated product of WetCHARTs v1.0 Extended Ensemble.
Bloom, A.A., K.W. Bowman, M. Lee, A.J. Turner, R. Schroeder, J.R. Worden, R.J. Weidner, K.C. McDonald, and D.J. Jacob. 2021. CMS: Global 0.5-deg Wetland Methane Emissions and Uncertainty (WetCHARTs v1.3.1). ORNL DAAC, Oak Ridge, Tennessee, USA. https://doi.org/10.3334/ORNLDAAC/1915