Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.
Merged
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,4 @@ cutouts


# custom local files
local
local
4 changes: 3 additions & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#run
run:
prefix: 20241203-force-onwind-south
prefix: 20250122-demand-scenarios
name:
# - CurrentPolicies
- KN2045_Bal_v4
Expand All @@ -14,6 +14,8 @@ run:
# - KN2045plus_LowDemand
# - KN2045minus_WorstCase
# - KN2045minus_SupplyFocus
# - KN2045_Bal_LowDemand
# - KN2045_Bal_HighDemand
scenarios:
enable: true
manual_file: config/scenarios.manual.yaml
Expand Down
146 changes: 146 additions & 0 deletions config/scenarios.manual.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to repeat the config[solving][constraints] since they are the same in the config.yaml.
I would rather not repeat to keep the scenarios.manual.yaml file as short as possible which makes it easier to read and understand the differences between scenarios.

Original file line number Diff line number Diff line change
Expand Up @@ -709,3 +709,149 @@ KN2045minus_SupplyFocus:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.3
steam_electricity_fraction: 0.3


KN2045_Bal_LowDemand:
# Ausgewogener Mix an Technologien zur Dekarbonisierung der Sektoren
# Breites Energieträgerportfolio in der Endenergie (Strom, Wasserstoff, synthetische Kraftstoffe)
# Ausbau der erneuerbare Stromerzeugung erreicht politisch gesetzte Ziele
# Importe erneuerbar erzeugter Energien auf mittlerem Niveau
# dient als Referenzszenario in der Familie der Ariadne-Szenarien

iiasa_database:
reference_scenario: KN2045plus_LowDemand
fallback_reference_scenario: KN2045_Bal_v4
co2_budget_DE_source: KSG

costs:
horizon: "mean"
NEP: 2023
transmission: "overhead" # either overhead line ("overhead") or underground cable ("underground")
solving:
constraints:
# boundary condition of maximum volumes
limits_volume_max:
# constrain electricity import in TWh
electricity_import:
DE:
2020: -20
2025: 0
2030: 0
2035: 40
2040: 80
2045: 125
electrolysis:
DE:
2020: 0
2025: 5
2030: 45
2035: 130
2040: 215
2045: 300
h2_derivate_import:
DE:
2020: 0
2025: 0
2030: 10
2035: 105
2040: 200
2045: 300
h2_import:
DE:
2020: 0
2025: 5
2030: 15
2035: 115
2040: 220
2045: 325
limits_volume_min:
electrolysis:
DE:
2020: 0
2025: 0
2030: 0
2035: 0
2040: 0
2045: 0
limits_capacity_min:
Link:
H2 Electrolysis:
DE:
2030: 5
industry:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.3
steam_electricity_fraction: 0.3


KN2045_Bal_HighDemand:
# Ausgewogener Mix an Technologien zur Dekarbonisierung der Sektoren
# Breites Energieträgerportfolio in der Endenergie (Strom, Wasserstoff, synthetische Kraftstoffe)
# Ausbau der erneuerbare Stromerzeugung erreicht politisch gesetzte Ziele
# Importe erneuerbar erzeugter Energien auf mittlerem Niveau
# dient als Referenzszenario in der Familie der Ariadne-Szenarien

iiasa_database:
reference_scenario: KN2045minus_SupplyFocus
fallback_reference_scenario: KN2045_Bal_v4
co2_budget_DE_source: KSG

costs:
horizon: "mean"
NEP: 2023
transmission: "overhead" # either overhead line ("overhead") or underground cable ("underground")
solving:
constraints:
# boundary condition of maximum volumes
limits_volume_max:
# constrain electricity import in TWh
electricity_import:
DE:
2020: -20
2025: 0
2030: 0
2035: 40
2040: 80
2045: 125
electrolysis:
DE:
2020: 0
2025: 5
2030: 45
2035: 130
2040: 215
2045: 300
h2_derivate_import:
DE:
2020: 0
2025: 0
2030: 10
2035: 105
2040: 200
2045: 300
h2_import:
DE:
2020: 0
2025: 5
2030: 15
2035: 115
2040: 220
2045: 325
limits_volume_min:
electrolysis:
DE:
2020: 0
2025: 0
2030: 0
2035: 0
2040: 0
2045: 0
limits_capacity_min:
Link:
H2 Electrolysis:
DE:
2030: 5
industry:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.3
steam_electricity_fraction: 0.3
1 change: 1 addition & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ use rule build_existing_heating_distribution from pypsaeur with:
rule modify_industry_demand:
params:
db_name=config_provider("iiasa_database", "db_name"),
reference_scenario=config_provider("iiasa_database", "reference_scenario"),
input:
ariadne=resources("ariadne_database.csv"),
industrial_production_per_country_tomorrow=resources(
Expand Down
12 changes: 6 additions & 6 deletions workflow/scripts/modify_industry_demand.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,18 @@
)
.loc[
leitmodell,
snakemake.config["iiasa_database"]["reference_scenario"],
snakemake.params.reference_scenario,
"Deutschland",
:,
"Mt/yr",
]
.multiply(1000)
)

print(
logger.info(
"German industry demand before modification",
)
logger.info(
existing_industry.loc[
"DE",
[
Expand All @@ -86,7 +88,6 @@
"Ceramics & other NMM",
],
],
sep="\n",
)

# write Cement, Ammonia and Methanol directly to dataframe
Expand Down Expand Up @@ -130,8 +131,8 @@
"DE", ["Electric arc", "Integrated steelworks", "DRI + Electric arc"]
] = (ratio * ariadne.loc["Production|Steel", year])

print(
"German demand after modification",
logger.info("German demand after modification")
logger.info(
existing_industry.loc[
"DE",
[
Expand All @@ -146,7 +147,6 @@
"Ceramics & other NMM",
],
],
sep="\n",
)

existing_industry.to_csv(
Expand Down
2 changes: 1 addition & 1 deletion workflow/scripts/plot_ariadne_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def plot_trade(
df,
savepath,
):
):
# WARNING CODE DUPLICATION
# WARNING i just asked COPILOT to reformat the two plots below
# load data and convert to TWh
Expand Down
Loading