power_plants

The central module containing all code dealing with the distribution and allocation of data on conventional and renewable power plants.

class EgonPowerPlants(**kwargs)[source]

Bases: Base

bus_id
carrier
el_capacity
geom
id
scenario
source_id
sources
voltage_level
weather_cell_id
class PowerPlants(dependencies)[source]

Bases: Dataset

name: str = 'PowerPlants'
sources: DatasetSources = DatasetSources(tables={'geom_federal_states': 'boundaries.vg250_lan', 'geom_germany': 'boundaries.vg250_sta_union', 'egon_mv_grid_district': 'grid.egon_mv_grid_district', 'ehv_voronoi': 'grid.egon_ehv_substation_voronoi', 'capacities': 'supply.egon_scenario_capacities', 'hydro': 'supply.egon_power_plants_hydro', 'biomass': 'supply.egon_power_plants_biomass', 'pv': 'supply.egon_power_plants_pv', 'wind': 'supply.egon_power_plants_wind', 'mastr_combustion_without_chp': 'supply.egon_mastr_conventional_without_chp', 'nep_conv': 'supply.egon_nep_2021_conventional_powerplants', 'buses_data': 'osmtgmod_results.bus_data', 'storages': 'supply.egon_storages', 'wind_potential_areas': 'supply.egon_re_potential_area_wind', 'hvmv_substation': 'grid.egon_hvmv_substation', 'electricity_demand': 'demand.egon_demandregio_zensus_electricity', 'map_zensus_grid_districts': 'boundaries.egon_map_zensus_grid_districts', 'map_grid_boundaries': 'boundaries.egon_map_mvgriddistrict_vg250', 'federal_states': 'boundaries.vg250_lan', 'scenario_capacities': 'supply.egon_scenario_capacities', 'weather_cells': 'supply.egon_era5_weather_cells', 'solar_feedin': 'supply.egon_era5_renewable_feedin', 'potential_area_pv_road_railway': 'supply.egon_re_potential_area_pv_road_railway', 'potential_area_pv_agriculture': 'supply.egon_re_potential_area_pv_agriculture'}, files={'mastr_biomass': './bnetza_mastr/dump_2025-02-09/bnetza_mastr_biomass_cleaned.csv', 'mastr_combustion': './bnetza_mastr/dump_2025-02-09/bnetza_mastr_combustion_cleaned.csv', 'mastr_gsgk': './bnetza_mastr/dump_2025-02-09/bnetza_mastr_gsgk_cleaned.csv', 'mastr_hydro': './bnetza_mastr/dump_2025-02-09/bnetza_mastr_hydro_cleaned.csv', 'mastr_location': './bnetza_mastr/dump_2025-02-09/location_elec_generation_raw.csv', 'mastr_nuclear': './bnetza_mastr/dump_2025-02-09/bnetza_mastr_nuclear_cleaned.csv', 'mastr_pv': './bnetza_mastr/dump_2025-02-09/bnetza_mastr_solar_cleaned.csv', 'mastr_storage': './bnetza_mastr/dump_2025-02-09/bnetza_mastr_storage_cleaned.csv', 'mastr_wind': './bnetza_mastr/dump_2025-02-09/bnetza_mastr_wind_cleaned.csv', 'osm_config': 'https://download.geofabrik.de/europe/germany-240101.osm.pbf', 'nep_2035': 'NEP2035_V2021_scnC2035.xlsx', 'mastr_deposit_id': '14783581', 'wind_offshore_status2019': 'windoffshore_status2019.xlsx', 'data_bundle_deposit_id': '16576506', 'status2023_date_max': '2023-12-31 23:59:00', 'status2019_date_max': '2019-12-31 23:59:00', 'egon2021_date_max': '2021-12-31 23:59:00', 'eGon2035_date_max': '2035-01-01', 'eGon100RE_date_max': '2050-01-01', 'mastr_geocoding_path': 'mastr_geocoding'}, urls={})

The sources used by the datasets. Could be tables, files and urls

targets: DatasetTargets = DatasetTargets(tables={'power_plants': 'supply.egon_power_plants', 'generators': 'grid.egon_etrago_generator', 'generator_timeseries': 'grid.egon_etrago_generator_timeseries', 'mastr_geocoded': 'supply.egon_mastr_geocoded', 'power_plants_pv': 'supply.egon_power_plants_pv', 'power_plants_wind': 'supply.egon_power_plants_wind', 'power_plants_biomass': 'supply.egon_power_plants_biomass', 'power_plants_hydro': 'supply.egon_power_plants_hydro', 'power_plants_combustion': 'supply.egon_power_plants_combustion', 'power_plants_gsgk': 'supply.egon_power_plants_gsgk', 'power_plants_nuclear': 'supply.egon_power_plants_nuclear', 'power_plants_storage': 'supply.egon_power_plants_storage'}, files={})

This dataset deals with the distribution and allocation of power plants

For the distribution and allocation of power plants to their corresponding grid connection point different technology-specific methods are applied. In a first step separate tables are created for wind, pv, hydro and biomass based power plants by running create_tables(). Different methods rely on the locations of existing power plants retrieved from the official power plant registry ‘Marktstammdatenregister’ applying function ìmport_mastr().

Hydro and Biomass Hydro and biomass power plants are distributed based on the status quo locations of existing power plants assuming that no further expansion of these technologies is to be expected in Germany. Hydro power plants include reservoir and run-of-river plants. Power plants without a correct geolocation are not taken into account. To compensate this, the installed capacities of the suitable plants are scaled up to meet the target value using function scale_prox2now()

Conventional power plants without CHP The distribution of conventional plants, excluding CHPs, takes place in function allocate_conventional_non_chp_power_plants(). Therefore information about future power plants from the grid development plan function as the target value and are matched with actual existing power plants with correct geolocations from MaStR registry.

Wind onshore

Wind offshore

PV ground-mounted

PV rooftop

others

Dependencies
  • Chp

  • :py:class:`CtsElectricityDemand

<egon.data.datasets.electricity_demand.CtsElectricityDemand>` * HouseholdElectricityDemand * mastr_data * define_mv_grid_districts * RePotentialAreas * ZensusVg250 * ScenarioCapacities * ScenarioParameters * Setup * substation_extraction * Vg250MvGridDistricts * ZensusMvGridDistricts

Resulting tables
  • :py:class:`supply.egon_power_plants

<egon.data.datasets.power_plants.EgonPowerPlants>` is filled

version: str = '0.0.37'
allocate_conventional_non_chp_power_plants()[source]

Allocate conventional power plants without CHPs based on the NEP target values and data from power plant registry (MaStR) by assigning them in a cascaded manner.

Returns:

None.

allocate_other_power_plants()[source]
assign_bus_id(power_plants, sources, drop_missing=False)[source]

Assigns bus_ids to power plants according to location and voltage level

Parameters:

power_plants (pandas.DataFrame) – Power plants including voltage level

Returns:

power_plants (pandas.DataFrame) – Power plants including voltage level and bus_id

assign_voltage_level(mastr_loc, sources)[source]

Assigns voltage level to power plants.

If location data inluding voltage level is available from Marktstammdatenregister, this is used. Otherwise the voltage level is assigned according to the electrical capacity.

Parameters:

mastr_loc (pandas.DataFrame) – Power plants listed in MaStR with geometry inside German boundaries

Returns:

pandas.DataFrame – Power plants including voltage_level

assign_voltage_level_by_capacity(mastr_loc)[source]
create_tables()[source]

Create tables for power plant data :returns: None.

discard_not_available_generators(gen, max_date)[source]
fill_missing_bus_and_geom(gens, carrier, geom_municipalities, mv_grid_districts)[source]
filter_mastr_geometry(mastr, federal_state=None)[source]

Filter data from MaStR by geometry

Parameters:
  • mastr (pandas.DataFrame) – All power plants listed in MaStR

  • federal_state (str or None) – Name of federal state whoes power plants are returned. If None, data for Germany is returned

Returns:

mastr_loc (pandas.DataFrame) – Power plants listed in MaStR with geometry inside German boundaries

get_conventional_power_plants_non_chp(scn_name)[source]
import_gas_gen_egon100()[source]
insert_biomass_plants(scenario)[source]

Insert biomass power plants of future scenario

Parameters:

scenario (str) – Name of scenario.

Returns:

None.

insert_hydro_biomass()[source]

Insert hydro and biomass power plants in database

Returns:

None.

insert_hydro_plants(scenario)[source]

Insert hydro power plants of future scenario.

Hydro power plants are diveded into run_of_river and reservoir plants according to Marktstammdatenregister. Additional hydro technologies (e.g. turbines inside drinking water systems) are not considered.

Parameters:

scenario (str) – Name of scenario.

Returns:

None.

power_plants_status_quo(scn_name='status2019')[source]
scale_prox2now(df, target, level='federal_state')[source]

Scale installed capacities linear to status quo power plants

Parameters:
  • df (pandas.DataFrame) – Status Quo power plants

  • target (pandas.Series) – Target values for future scenario

  • level (str, optional) – Scale per ‘federal_state’ or ‘country’. The default is ‘federal_state’.

Returns:

df (pandas.DataFrame) – Future power plants

select_target(carrier, scenario)[source]

Select installed capacity per scenario and carrier

Parameters:
  • carrier (str) – Name of energy carrier

  • scenario (str) – Name of scenario

Returns:

pandas.Series – Target values for carrier and scenario