pycontrails.models.emissions.Emissions

class pycontrails.models.emissions.Emissions(met=None, params=None, **params_kwargs)

Bases: Model

Emissions handling using ICAO Emissions Databank (EDB) and black carbon correlations.

Parameters:
  • met (MetDataset | None, optional) – Met data, by default None.

  • params (dict[str, Any] | None, optional) – Model parameters, by default None.

  • params_kwargs (Any) – Model parameters passed as keyword arguments.

References

__init__(met=None, params=None, **params_kwargs)

Methods

__init__([met, params])

downselect_met()

Downselect met domain to the max/min bounds of source.

eval([source])

Calculate the emissions data for source.

get_source_param(key[, default, set_attr])

Get source data with default set by parameter key.

require_met()

Ensure that met is a MetDataset.

require_source_type(type_)

Ensure that source is type_.

set_source([source])

Attach original or copy of input source to source.

set_source_met([optional, variable])

Ensure or interpolate each required met_variables on source .

transfer_met_source_attrs([source])

Transfer met source metadata from met to source.

update_params([params])

Update model parameters on params.

Attributes

params

Instantiated model parameters, in dictionary form

met

Meteorology data

source

Data evaluated in model

hash

Generate a unique hash for model instance.

interp_kwargs

Shortcut to create interpolation arguments from params.

long_name

met_required

Require meteorology is not None on __init__()

met_variables

Required meteorology pressure level variables.

name

processed_met_variables

Set of required parameters if processing already complete on met input.

optional_met_variables

Optional meteorology variables

default_params

alias of EmissionsParams

eval(source=None, **params)

Calculate the emissions data for source.

Parameter source must contain each of the variables:
  • air_temperature

  • specific_humidity

  • true_airspeed

  • fuel_flow

If ‘engine_uid’ is not provided in source.attrs or not available in the ICAO EDB, constant emission indices will be assumed for NOx, CO, HC, and nvPM mass and number.

The computed pollutants include carbon dioxide (CO2), nitrogen oxide (NOx), carbon monoxide (CO), hydrocarbons (HC), non-volatile particulate matter (nvPM) mass and number, sulphur oxides (SOx), sulphates (S) and organic carbon (OC).

Changed in version 0.47.0: Support GeoVectorDataset for the source parameter.

Parameters:
  • source (GeoVectorDataset) – Flight to evaluate

  • **params (Any) – Overwrite model parameters before eval

Returns:

GeoVectorDataset – Flight with attached emissions data

long_name = 'ICAO Emissions Databank (EDB)'
met

Meteorology data

met_variables = (MetVariable(short_name='t', standard_name='air_temperature', long_name='Air Temperature', level_type='isobaricInhPa', ecmwf_id=130, grib1_id=11, grib2_id=(0, 0, 0), units='K', amip='ta', description='Air temperature is the bulk temperature of the air, not the surface (skin) temperature.'), MetVariable(short_name='q', standard_name='specific_humidity', long_name='Specific Humidity', level_type='isobaricInhPa', ecmwf_id=133, grib1_id=51, grib2_id=(0, 1, 0), units='kg kg**-1', amip='hus', description='Specific means per unit mass. Specific humidity is the mass fraction of water vapor in (moist) air.'))

Required meteorology pressure level variables. Each element in the list is a MetVariable or a tuple[MetVariable]. If element is a tuple[MetVariable], the variable depends on the data source. Only one variable in the tuple is required.

name = 'emissions'
params

Instantiated model parameters, in dictionary form

source

Data evaluated in model