Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/egon/data/airflow/dags/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from egon.data.datasets.heat_supply.individual_heating import (
HeatPumpsStatusQuo,
HeatPumps2035,
HeatPumps2037_2025,
HeatPumps2050,
HeatPumpsPypsaEur,
)
Expand All @@ -70,6 +71,7 @@
IndustrialGasDemand,
IndustrialGasDemandeGon100RE,
IndustrialGasDemandeGon2035,
IndustrialGasDemandeGon2037_2025,
)
from egon.data.datasets.industrial_sites import MergeIndustrialSites
from egon.data.datasets.industry import IndustrialDemandCurves
Expand Down Expand Up @@ -431,6 +433,7 @@
dependencies=[setup_etrago, insert_hydrogen_buses, vg250]
)


# Insert hydrogen grid
insert_h2_grid = HydrogenGridEtrago(
dependencies=[
Expand Down Expand Up @@ -482,6 +485,11 @@
dependencies=[create_gas_polygons, industrial_gas_demand]
)

# Assign industrial gas demand nep2037_2025
IndustrialGasDemandeGon2037_2025(
dependencies=[create_gas_polygons, industrial_gas_demand]
)

# Assign industrial gas demand eGon100RE
IndustrialGasDemandeGon100RE(
dependencies=[create_gas_polygons, industrial_gas_demand, run_pypsaeur,]
Expand Down Expand Up @@ -614,6 +622,18 @@
]
)

# Heat pump disaggregation for nep2037_2025
heat_pumps_2037_2025 = HeatPumps2037_2025(
dependencies=[
cts_demand_buildings,
DistrictHeatingAreas,
heat_supply,
heat_time_series,
heat_pumps_pypsa_eur,
power_plants,
]
)

# HTS to eTraGo table
hts_etrago_table = HtsEtragoTable(
dependencies=[
Expand Down
2 changes: 1 addition & 1 deletion src/egon/data/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
)
@click.option(
"--scenarios",
default=["status2023", "eGon2035"],
default=["status2023","nep2037_2025" , "eGon2035"],
metavar="SCENARIOS",
help=("List of scenario names for which a data model shall be created."),
multiple=True,
Expand Down
27 changes: 24 additions & 3 deletions src/egon/data/datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ demandregio_cts_ind_demand:
schema: 'boundaries'
table: 'vg250_krs'
new_consumers_2035: 'new_largescale_consumers_nep.csv'
new_consumers_2037_2025: 'new_largescale_consumers_nep.csv'
new_consumers_2050:
"pes-demand-today": "industrial_energy_demand_per_country_today.csv"
"pes-production-tomorrow": "industrial_production_per_country_tomorrow_2050.csv"
Expand All @@ -177,7 +178,7 @@ electrical_demands_households:
demandregio:
schema: 'demand'
table: 'egon_demandregio_hh'
scenarios: ["eGon2035", "eGon100RE"]
scenarios: ["eGon2035", "nep2037_2025", "eGon100RE"]
population_prognosis_zensus:
schema: 'society'
table: 'egon_population_prognosis'
Expand All @@ -194,7 +195,7 @@ electrical_demands_cts:
demandregio:
schema: 'demand'
table: 'egon_demandregio_cts_ind'
scenarios: ["eGon2035", "eGon100RE"]
scenarios: ["eGon2035", "nep2037_2025", "eGon100RE"]
demandregio_wz:
schema: 'demand'
table: 'egon_demandregio_wz'
Expand Down Expand Up @@ -283,6 +284,9 @@ scenario_input:
eGon2035:
capacities: "NEP2035_V2021_scnC2035.xlsx"
list_conv_pp: "Kraftwerksliste_NEP_2021_konv.csv"
nep2037_2025:
capacities: "NEP2037_V2025_scnC2037.xlsx"
list_conv_pp: "Kraftwerksliste_NEP_2025_konv.csv"
eGon100RE:
capacities: "nodal_capacities.csv"
boundaries:
Expand Down Expand Up @@ -403,6 +407,7 @@ power_plants:
pv: 'supply.egon_power_plants_pv'
wind: 'supply.egon_power_plants_wind'
nep_2035: "NEP2035_V2021_scnC2035.xlsx"
nep_2037_2025: "NEP2037_V2025_scnC2037.xlsx"
wind_offshore_status2019: "windoffshore_status2019.xlsx"
storages: 'supply.egon_storages'
target:
Expand All @@ -419,6 +424,7 @@ storages:
ehv_voronoi: "grid.egon_ehv_substation_voronoi"
nep_conv: "supply.egon_nep_2021_conventional_powerplants"
nep_capacities: "NEP2035_V2021_scnC2035.xlsx"
nep_capacities: "NEP2037_V2025_scnC2037.xlsx"
generators: "grid.egon_etrago_generator"
bus: "grid.egon_etrago_bus"
target:
Expand Down Expand Up @@ -731,7 +737,7 @@ distributed_industrial_demand:
demandregio:
schema: 'demand'
table: 'egon_demandregio_cts_ind'
scenarios: ["status2019","eGon2021", "eGon2035", "eGon100RE"]
scenarios: ["status2019","eGon2021", "eGon2035", "nep2037_2025", "eGon100RE"]
wz:
schema: 'demand'
table: 'egon_demandregio_wz'
Expand Down Expand Up @@ -1161,6 +1167,9 @@ emobility_mit:
eGon2035:
file: "eGon2035_RS7_min2k_2022-06-01_175429_simbev_run.tar.gz"
file_metadata: "metadata_simbev_run.json"
nep2037_2025:
file: "eGon2035_RS7_min2k_2022-06-01_175429_simbev_run.tar.gz"
file_metadata: "metadata_simbev_run.json"
eGon100RE:
file: "eGon100RE_RS7_min2k_2022-06-01_175444_simbev_run.tar.gz"
file_metadata: "metadata_simbev_run.json"
Expand All @@ -1170,12 +1179,14 @@ emobility_mit:
status2019: "status2019"
status2023: "status2023"
eGon2035: "NEP C 2035"
nep2037_2025: "NEP C 2037"
eGon100RE: "Reference 2050"
# name of low-flex scenario
lowflex:
create_lowflex_scenario: True
names:
eGon2035: "eGon2035_lowflex"
nep2037_2025: "nep2037_2025_lowflex"
eGon100RE: "eGon100RE_lowflex"

model_timeseries:
Expand Down Expand Up @@ -1243,6 +1254,7 @@ mobility_hgv:
fcev_share: 1.
scenarios:
- "eGon2035"
- "nep2037_2025"
- "eGon100RE"
carrier: "H2_hgv_load"
energy_value_h2: 39.4 # kWh/kg
Expand All @@ -1257,6 +1269,14 @@ mobility_hgv:
# hgv_mean_mileage = 100000
# Total mileage
eGon2035: 10000000000
# NEP data
# https://www.netzentwicklungsplan.de/sites/default/files/paragraphs-files/NEP_2035_V2021_2_Entwurf_Teil1.pdf
# total amount of HGVs - Scenario C 2035
# hgv_amount = 100000
# HGV traffic annual mileage per vehicle
# hgv_mean_mileage = 100000
# Total mileage
nep2037_2025: 10000000000
# Langfristszenarien
# https://www.langfristszenarien.de/enertile-explorer-wAssets/docs/LFS3_Langbericht_Verkehr_final.pdf#page=17
eGon100RE: 40000000000
Expand All @@ -1265,6 +1285,7 @@ home_batteries:
constants:
scenarios:
- "eGon2035"
- "nep2037_2025"
- "eGon100RE"
# Mean ratio between the storage capacity and the power of the pv rooftop system
cbat_ppv_ratio: 1
Expand Down
58 changes: 40 additions & 18 deletions src/egon/data/datasets/DSM_cts_ind.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,10 @@ def ind_sites_data_import():
if "eGon2035" in scenarios:
dsm_2035 = calc_ind_site_timeseries("eGon2035").reset_index()
dsm = pd.concat([dsm, dsm_2035], ignore_index=True)
# scenario nep2037_2025
if "nep2037_2025" in scenarios:
dsm_2037_2025 = calc_ind_site_timeseries("nep2037_2025").reset_index()
dsm = pd.concat([dsm, dsm_2037_2025], ignore_index=True)
# scenario eGon100RE
if "eGon100RE" in scenarios:
dsm_100 = calc_ind_site_timeseries("eGon100RE").reset_index()
Expand Down Expand Up @@ -904,12 +908,18 @@ def create_dsm_components(
dsm_id, dsm_id + rows_per_scenario.get("eGon2035", 0)
)

bus_id.iloc[
rows_per_scenario.get("eGon2035", 0) : rows_per_scenario.get(
"eGon2035", 0
)
+ rows_per_scenario.get("eGon100RE", 0)
] = range(dsm_id, dsm_id + rows_per_scenario.get("eGon100RE", 0))
bus_id.iloc[rows_per_scenario.get("eGon2035", 0) : rows_per_scenario.get(
"eGon2035", 0) + rows_per_scenario.get("nep2037_2025", 0)] = range(
dsm_id, dsm_id + rows_per_scenario.get("nep2037_2025", 0)
)

bus_id.iloc[rows_per_scenario.get("eGon2035", 0) + rows_per_scenario.get(
"nep2037_2025", 0) : rows_per_scenario.get(
"eGon2035", 0) + rows_per_scenario.get("nep2037_2025",
0) + rows_per_scenario.get("eGon100RE",
0)] = range(
dsm_id, dsm_id + rows_per_scenario.get("eGon100RE", 0)
)

dsm_buses["bus_id"] = bus_id

Expand All @@ -935,12 +945,18 @@ def create_dsm_components(
dsm_id, dsm_id + rows_per_scenario.get("eGon2035", 0)
)

link_id.iloc[
rows_per_scenario.get("eGon2035", 0) : rows_per_scenario.get(
"eGon2035", 0
)
+ rows_per_scenario.get("eGon100RE", 0)
] = range(dsm_id, dsm_id + rows_per_scenario.get("eGon100RE", 0))
link_id.iloc[rows_per_scenario.get("eGon2035", 0): rows_per_scenario.get(
"eGon2035", 0) + rows_per_scenario.get("nep2037_2025", 0)] = range(
dsm_id, dsm_id + rows_per_scenario.get("nep2037_2025", 0)
)

link_id.iloc[rows_per_scenario.get("eGon2035", 0) + rows_per_scenario.get(
"nep2037_2025", 0): rows_per_scenario.get(
"eGon2035", 0) + rows_per_scenario.get("nep2037_2025",
0) + rows_per_scenario.get("eGon100RE",
0)] = range(
dsm_id, dsm_id + rows_per_scenario.get("eGon100RE", 0)
)

dsm_links["link_id"] = link_id

Expand Down Expand Up @@ -972,12 +988,18 @@ def create_dsm_components(
dsm_id, dsm_id + rows_per_scenario.get("eGon2035", 0)
)

store_id.iloc[
rows_per_scenario.get("eGon2035", 0) : rows_per_scenario.get(
"eGon2035", 0
)
+ rows_per_scenario.get("eGon100RE", 0)
] = range(dsm_id, dsm_id + rows_per_scenario.get("eGon100RE", 0))
store_id.iloc[rows_per_scenario.get("eGon2035", 0): rows_per_scenario.get(
"eGon2035", 0) + rows_per_scenario.get("nep2037_2025", 0)] = range(
dsm_id, dsm_id + rows_per_scenario.get("nep2037_2025", 0)
)

store_id.iloc[rows_per_scenario.get("eGon2035", 0) + rows_per_scenario.get(
"nep2037_2025", 0): rows_per_scenario.get(
"eGon2035", 0) + rows_per_scenario.get("nep2037_2025",
0) + rows_per_scenario.get("eGon100RE",
0)] = range(
dsm_id, dsm_id + rows_per_scenario.get("eGon100RE", 0)
)

dsm_stores["store_id"] = store_id

Expand Down
14 changes: 8 additions & 6 deletions src/egon/data/datasets/ch4_prod.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
"""
The central module containing code dealing with importing CH4 production data for eGon2035.
The central module containing code dealing with importing CH4 production data for
nep2037_2025 and eGon2035.

For eGon2035, the gas produced in Germany can be natural gas or biogas.
For nep2037_2025 and 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
Expand All @@ -27,12 +28,13 @@

class CH4Production(Dataset):
"""
Insert the CH4 productions into the database for eGon2035
Insert the CH4 productions into the database for nep2037_2025 and eGon2035

Insert the CH4 productions into the database for eGon2035 by using
Insert the CH4 productions into the database for nep2037_2025 and eGon2035 by using
the function :py:func:`import_gas_generators`.

*Dependencies*
* :py:class:`GasAreasnep2037_2025 <egon.data.datasets.gas_areas.GasAreasnep2037_2025>`
* :py:class:`GasAreaseGon2035 <egon.data.datasets.gas_areas.GasAreaseGon2035>`
* :py:class:`GasNodesAndPipes <egon.data.datasets.gas_grid.GasNodesAndPipes>`

Expand Down Expand Up @@ -289,7 +291,7 @@ def import_gas_generators():
steps are followed:

* cleaning of the database table grid.egon_etrago_generator of the
CH4 generators of the specific scenario (eGon2035),
CH4 generators of the specific scenario (nep2037_2025, eGon2035),
* call of the functions :py:func:`load_NG_generators` and
:py:func:`load_biogas_generators` that respectively return
dataframes containing the natural- an bio-gas production units
Expand Down Expand Up @@ -338,7 +340,7 @@ def import_gas_generators():
"""
)

if scn_name == "eGon2035":
if scn_name == "nep2037_2025" or scn_name == "eGon2035":
CH4_generators_list = pd.concat(
[
load_NG_generators(scn_name),
Expand Down
21 changes: 14 additions & 7 deletions src/egon/data/datasets/ch4_storages.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ class CH4Storages(Dataset):
Inserts the gas stores in Germany

Inserts the non extendable gas stores in Germany into the database
for the scnenarios eGon2035 and eGon100RE using the function
for the scnenarios nep2037_2025, eGon2035 and eGon100RE using the function
:py:func:`insert_ch4_storages`.

*Dependencies*
* :py:class:`GasAreaseGon2035 <egon.data.datasets.gas_areas.GasAreaseGon2035>`
* :py:class:`GasAreasnep2037_2025 <egon.data.datasets.gas_areas.GasAreasnep2037_2025>`
* :py:class:`GasAreaseGon100RE <egon.data.datasets.gas_areas.GasAreaseGon100RE>`
* :py:class:`GasNodesAndPipes <egon.data.datasets.gas_grid.GasNodesAndPipes>`

Expand Down Expand Up @@ -164,9 +165,14 @@ def import_installed_ch4_storages(scn_name):
]

# Remove unused storage units
Gas_storages_list = Gas_storages_list[
Gas_storages_list["end_year"] >= 2035
]
if scn_name == "eGon2035":
Gas_storages_list = Gas_storages_list[
Gas_storages_list["end_year"] >= 2035
]
elif scn_name == "nep2037_2025":
Gas_storages_list = Gas_storages_list[
Gas_storages_list["end_year"] >= 2037
]

Gas_storages_list = Gas_storages_list.rename(
columns={"lat": "y", "long": "x"}
Expand Down Expand Up @@ -307,12 +313,12 @@ def insert_ch4_stores(scn_name):
# Clean table
db.execute_sql(
f"""
DELETE FROM {target['stores']['schema']}.{target['stores']['table']}
DELETE FROM {target['stores']['schema']}.{target['stores']['table']}
WHERE "carrier" = 'CH4'
AND scn_name = '{scn_name}'
AND bus IN (
SELECT bus_id FROM {source['buses']['schema']}.{source['buses']['table']}
WHERE scn_name = '{scn_name}'
WHERE scn_name = '{scn_name}'
AND country = 'DE'
);
"""
Expand Down Expand Up @@ -352,9 +358,10 @@ def insert_ch4_storages():
Overall function to import non extendable gas stores in Germany

This function inserts the methane stores in Germany for the
scenarios eGon2035 and eGon100RE by using the function
scenarios nep2037_2025, eGon2035 and eGon100RE by using the function
:py:func:`insert_ch4_stores` and has no return.

"""
insert_ch4_stores("nep2037_2025")
insert_ch4_stores("eGon2035")
insert_ch4_stores("eGon100RE")
Loading
Loading