ch4_prod

The central module containing code dealing with importing CH4 production data for eGon2035.

For eGon2035, the gas produced in Germany can be natural gas or biogas. The source productions are geolocalised potentials described as PyPSA generators. These generators are not extendable and their overall production over the year is limited directly in eTraGo by values from the Netzentwicklungsplan Gas 2020–2030 (36 TWh natural gas and 10 TWh biogas), also stored in the table scenario.egon_scenario_parameters.

class CH4Production(dependencies)[source]

Bases: egon.data.datasets.Dataset

Insert the CH4 productions into the database for eGon2035

Insert the CH4 productions into the database for eGon2035 by using the function import_gas_generators().

Dependencies
Resulting tables
name = 'CH4Production'
version = '0.0.7'
import_gas_generators(scn_name='eGon2035')[source]

Inserts list of gas production units into the database

To insert the gas production units into the database, the following steps are followed:

  • cleaning of the database table grid.egon_etrago_generator of the CH4 generators of the specific scenario (eGon2035),

  • call of the functions load_NG_generators() and load_biogas_generators() that respectively return dataframes containing the natural- an bio-gas production units in Germany,

  • attribution of the bus_id to which each generator is connected (call the function assign_gas_bus_id from egon.data.db),

  • aggregation of the CH4 productions with same properties at the same bus. The properties that should be the same in order that different generators are aggregated are:

    • scenario
    • carrier
    • marginal cost: this parameter differentiates the natural gas generators from the biogas generators,
  • addition of the missing columns: scn_name, carrier and generator_id,

  • insertion of the generators into the database.

Parameters:scn_name (str) – Name of the scenario.
Returns:None
load_NG_generators(scn_name)[source]

Define the fossil CH4 production units in Germany

This function reads from the SciGRID_gas dataset the fossil CH4 production units in Germany, adjusts and returns them. Natural gas production reference: SciGRID_gas dataset (datasets/gas_data/data/IGGIELGN_Production.csv downloaded in download_SciGRID_gas_data). For more information on this data, refer to the SciGRID_gas IGGIELGN documentation.

Parameters:scn_name (str) – Name of the scenario.
Returns:CH4_generators_list (pandas.DataFrame) – Dataframe containing the natural gas production units in Germany
load_biogas_generators(scn_name)[source]

Define the biogas production units in Germany

This function downloads the Biogaspartner Einspeiseatlas into (datasets/gas_data/Biogaspartner_Einspeiseatlas_Deutschland_2021.xlsx), reads the biogas production units in Germany data, adjusts and returns them. For more information on this data refer to the Einspeiseatlas website.

Parameters:scn_name (str) – Name of the scenario
Returns:CH4_generators_list (pandas.DataFrame) – Dataframe containing the biogas production units in Germany