Emission quantification#

To quantify the emissions, five modules are provided implementing a Gaussian plume inversion, two cross-sectional flux methods, integrated mass enhancement and divergence method.

Gaussian plume (GP) inversion#

ddeq.gauss.estimate_emissions(data, winds, sources, curves, gases, priors=None, variable='{gas}_minus_estimated_background_mass', fit_decay_times=False, skip_overlapping_plumes=True, verbose=False)#

Estimate emissions using Gaussian plume (GP) inversion.

Parameters:
  • data (xr.Dataset) – Remote sensing data from pre-processing.

  • winds (xr.Dataset) – Wind for each source.

  • sources (xr.Dataset) – Source dataset for which emissions will be estimated.

  • curves (dict) – Dictionary with center curves.

  • gases (str or list of strings) – Gases for which emissions will be estimated.

  • priors (dict, optional) –

    A dictionary with prior informatio for each source with source strength and decay time. For example:

    >>> priors = {'Matimba': {
    >>>    'NO2': {
    >>>        'Q': 3.0,       # in kg/s
    >>>        'tau': 4*60**2  # in seconds
    >>>   }
    >>> }}
    

  • variable (str, optional) – Name of variable in data with gas enhancement above background in mass columns (units: kg m-2).

  • fit_decay_times (boolean or list of booleans, optional) – If True, the decay time will be included and fitted in the Gaussian plume model.

  • skip_overlapping_plumes (boolean) – If True, do not process overlapping plumes.

  • verbose (boolean) – If True, provide more information.

Returns:

  • xr.Dataset – The remote sensing dataset with added data arrays with Gaussian plume models for each trace gas and source.

  • xr.Dataset – The results dataset with estimated emissions and other parameters.

Cross sectional flux (CSF)#

ddeq.csf.estimate_emissions(data, winds, sources, curves, gases, t_max=None, method='gauss', variable='{gas}_minus_estimated_background_mass', crs=None, pixel_size=None, f_model=None, use_wind_timeseries=False)#

Estimate emissions using the cross sectional flux (CSF) method.

Parameters:
  • data (xr.Dataset) – Remote sensing data from pre-processing.

  • winds (xr.Dataset) – Wind for each source.

  • sources (xr.Dataset) – Source dataset for which emissions will be estimated.

  • curves (dict) – Dictionary with center curves.

  • gases (str or list of strings) – Gases for which emissions will be estimated.

  • t_max (float, optional) – Maximum along-plume distance (in seconds) that will be used for computing line densities (currently not implemented!)

  • method (str, optional) – Method used for computing the line density with “gauss” fitting Gaussian curve and “sub-area” summing mass in sub-polygons. In the upstream polygon “sub-area” is always used.

  • variable (str, optional) – Name of variable in data with gas enhancement above background in mass columns (units: kg m-2).

  • crs (cartopy.crs, optional) – The coordinate reference system used for the center curves.

  • pixel_size (float, optional) – Size of the ground pixel (in meters). If None, pixel size is computed from the mean “plume_area” variable in data.

  • f_model (float or callable, optional) – A number or a a function to convert NO2 to NOx line densites as a function of time since emissions. Will only be used uf NO2 in gases to convert line densities from NO2 to NOx.

  • use_wind_timeseries (bool (default: False)) – Wind speed at each polygon is computed by integrating backwards in time (experimental).

Light cross sectional flux (LCSF)#

ddeq.lcsf.estimate_emissions(data, winds, sources, gases, fit_backgrounds=True, priors=None, lcs_params={}, all_diags=False)#

Estimate emissions using the light cross sectional flux (LCSF) method.

Parameters:
  • data (xr.Dataset) – Remote sensing data.

  • winds (xr.Dataset) – 2D wind field.

  • sources (xr.Dataset) – Source dataset for which emissions will be estimated.

  • gases (str or list of strings) – Gases for which emissions will be estimated.

  • fig_backgrounds (boolean or list of booleans, optional) – If a linear background is fitted with the Gaussian curve for estimating line densities.

  • priors (dict, optional) –

    A dictionary with prior informatio for each source with source strength and decay time. For example:

    >>> priors = {'Matimba': {
    >>>    'NO2': {
    >>>        'Q': 3.0,       # in kg/s
    >>>        'tau': 4*60**2  # in seconds
    >>>   }
    >>> }}
    

  • lcsf_params (dict, optional) – A dictionary with additional parameters. See code for details.

Returns:

Results dataset with estimated emissions for each source and other parameters.

Return type:

xr.Dataset

Integrated mass enhancement (IME)#

ddeq.ime.estimate_emissions(data, winds, sources, curves, gas, variable='{gas}_minus_estimated_background_mass', L_min=0, L_max=None, decay_time=nan, min_pixel_number=10)#

Estimate emissions using the integrated mass enhancement (IME) method.

Parameters:
  • data (xr.Dataset) – Remote sensing data from pre-processing.

  • winds (xr.Dataset) – Wind for each source.

  • sources (xr.Dataset) – Source dataset for which emissions will be estimated.

  • curves (dict) – Dictionary with center curves.

  • gas (str) – Gas for which emissions will be estimated.

  • variable (str, optional) – Name of variable in data with gas enhancement above background in mass columns (units: kg m-2).

  • L_min (float, optional) – Along-plume distance where mass integration starts. Default is the source location, i.e. L_min = 0.0.

  • L_max (float, optional) – Along-plume distance where mass integration ends. Default is the plume length minus 10 km, but at least 10 km.

  • decay_time (float, optional) – The decay time of the gas in seconds. If np.nan, no decay time is used.

  • min_pixel_number (int, optional) – Minimum number of pixels needed for estimating emissions.

Returns:

Results dataset with estimated emissions for each source with additional parameters.

Return type:

xr.Dataset

Diverence method (DIV)#

ddeq.div.estimate_emissions(datasets, wind_folder, sources, lon_km=50, lat_km=50, grid_reso=5, varnames=['CO2'], wind_product='ERA5', pattern='ERA5-gnfra-%Y%m%dt%H00.nc', start_date='2015-01-01', end_date='2015-12-24', hour=11, AM_options={'samples': 100000, 'warmup': 10000}, trace_gases=['CO2'], smooth_data=[True], remove_background=[True])#

Estimate emissions using the divergence (DIV) method for given sources over the chosen time period. The method computes first the divergence map and second the emissions using a peak fitting model.

Parameters:
  • datasets (object) – A dataset class such as ddeq.sats.Level2TropomiDataset or ddeq.smartcarb.Level2Dataset with a read_date method that returns a list of remote sensing datasets for a given day.

  • wind_folder (str) – The data path to the wind product.

  • sources (xr.Dataset) – Source dataset for which emissions will be estimated.

  • lon_km (float, optional) – The east-west extension of the grid around a source in kilometers.

  • lat_km (float, optional) – The south-north extension of the grid around a source in kilometers.

  • grid_reso (float, optional) – The resolution of the grid in kilometers.

  • wind_product (str, optional) – Name of the wind product (“ERA5” or “SMARTCARB”)

  • pattern (str, optional) – File pattern with data format to match filename of wind product to date.

  • start_date (str, optional) – The first date processed in string format (‘%Y-%m-%d’).

  • end_date (str, optional) – The last date processed in string format (‘%Y-%m-%d’).

  • hour (int, optional) – The hour of the wind product that is used instead of the exact measurement time of the remote sensing images.

  • AM_options (dict, optional) – Options for the peak fitting algoritm (see code for details).

  • trace_gases (list of str, optional) – List of trace gases for which emissions are estimated.

  • smooth_data (list of boolean, optional) – List of boolean if data should be smoothed

  • remove_background (list of boolean, optional) – List of boolean if background should be removed

Returns:

The results dataset with the estimated emissions of each sources as well as the divergence and flux maps for visualization.

Return type:

xr.Dataset