Skip to content

Commit

Permalink
Merge branch 'main' into database-pypsa-de
Browse files Browse the repository at this point in the history
  • Loading branch information
lindnemi authored Jul 15, 2024
2 parents 0bb044b + bc33283 commit cb034cf
Show file tree
Hide file tree
Showing 7 changed files with 660 additions and 138 deletions.
10 changes: 6 additions & 4 deletions 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: 20240628public_db
prefix: 20240710limitwasteheat
name:
# - CurrentPolicies
- KN2045_Bal_v4
Expand All @@ -24,6 +24,8 @@ run:
- existing_heating.csv # specify files which should not be shared between scenarios
- costs
- retrieve_cost # This is necessary to save retrieve_cost_data_{year}.log in the correct folder
- industry_sector_ratios
- build_industry_sector_ratios # This is necessary to save build_industry_sector_ratios_data.log in the correct folder
disable_progressbar: true
debug_co2_limit: false
debug_h2deriv_limit: false
Expand Down Expand Up @@ -227,16 +229,17 @@ first_technology_occurrence:

renewable:
offwind-ac:
capacity_per_sqkm: 10
capacity_per_sqkm: 6
offwind-dc:
capacity_per_sqkm: 10
capacity_per_sqkm: 6

costs:
horizon: "mean" # "optimist", "pessimist" or "mean"

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#sector
sector:
solar_thermal: false
v2g: false
district_heating:
potential: 0.4
progress:
Expand Down Expand Up @@ -345,7 +348,6 @@ industry:
waste_to_energy: true
waste_to_energy_cc: true


# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#solving
solving:
runtime: 12h
Expand Down
41 changes: 40 additions & 1 deletion config/scenarios.manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ CurrentPolicies:
2040: 0
2045: 0

industry:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.3
steam_electricity_fraction: 0.3



KN2045_Bal_v4:
Expand Down Expand Up @@ -164,6 +169,11 @@ KN2045_Bal_v4:
2040: 0
2045: 0

industry:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.3
steam_electricity_fraction: 0.3

KN2045_Elec_v4:
# Fokus auf dem Hochlauf von Technologien zur direkten Elektrifizierung der Sektoren
# Strom als präferierter Energieträger in der Endenergie, andere Energieträger ergänzend, wo nötig (Wasserstoff, synthetische Kraftstoffe)
Expand Down Expand Up @@ -224,6 +234,11 @@ KN2045_Elec_v4:
2040: 0
2045: 0

industry:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.1
steam_electricity_fraction: 0.5

KN2045_H2_v4:
# Fokus stärker auf dem Hochlauf von Technologien zur indirekten Elektrifizierung der Sektoren
# Verstärkter Einsatz von Wasserstoff und synthetischen Kraftstoffen - erneuerbar erzeugt und auch importiert
Expand Down Expand Up @@ -287,6 +302,10 @@ KN2045_H2_v4:
2040: 0
2045: 200

industry:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.5
steam_electricity_fraction: 0.1

KN2045plus_EasyRide:
# Endenergienachfrage ist geringer im Vergleich zu Szenarien 1-3
Expand Down Expand Up @@ -349,6 +368,11 @@ KN2045plus_EasyRide:
2040: 0
2045: 0

industry:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.3
steam_electricity_fraction: 0.3


KN2045plus_LowDemand:
# Im Vergleich zu Easy Ride eher knappe EE Erzeugung
Expand Down Expand Up @@ -408,6 +432,11 @@ KN2045plus_LowDemand:
2040: 0
2045: 0

industry:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.3
steam_electricity_fraction: 0.3

KN2045minus_WorstCase:
# Nachfrage nach Endenergie ist höher als in den Szenarien 1-3
# schlechtere Akzeptanz in der Bevölkerung, Verzögerungen im Infrastrukturausbau,
Expand Down Expand Up @@ -499,6 +528,11 @@ KN2045minus_WorstCase:
2040: 161.25
2045: 161.25

industry:
steam_biomass_fraction: 0.4
steam_hydrogen_fraction: 0.3
steam_electricity_fraction: 0.3

KN2045minus_SupplyFocus:
# Nachfrage genau so hoch wie in Szenario WorstCase
# Ausbau EE und EE Importe jetzt aber auskömmlich
Expand Down Expand Up @@ -587,4 +621,9 @@ KN2045minus_SupplyFocus:
2035: 309
2040: 400 # PV strategy
2045: 400
# What about the EEG2023 "Strommengenpfad"?
# What about the EEG2023 "Strommengenpfad"?

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 @@ -338,6 +338,7 @@ rule export_ariadne_variables:
costs=config_provider("costs"),
energy_totals_year=config_provider("energy", "energy_totals_year"),
co2_price_add_on_fossils = config_provider("co2_price_add_on_fossils"),
co2_sequestration_cost=config_provider("sector","co2_sequestration_cost"),
input:
template=resources("template_ariadne_database.xlsx"),
industry_demands=expand(
Expand Down
24 changes: 23 additions & 1 deletion workflow/scripts/build_scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,24 @@ def get_primary_steel_share(df, planning_horizons):

return primary_steel_share.set_index(pd.Index(["Primary_Steel_Share"]))

def get_DRI_share(df, planning_horizons):
# Get share of DRI steel production
model = "FORECAST v1.0"
total_steel = df.loc[model, "Production|Steel|Primary"]
# Assuming that only hydrogen DRI steel is sustainable and DRI using natural gas is phased out
DRI_steel = df.loc[model, "Production|Steel|Primary|Direct Reduction Hydrogen"]

DRI_steel_share = DRI_steel / total_steel

if model == "FORECAST v1.0" and planning_horizons[0] == 2020:
logger.warning("FORECAST v1.0 does not have data for 2020. Using 2021 data for DRI fraction instead.")
DRI_steel_share[2020] = DRI_steel_share[2021] / total_steel[2021]

DRI_steel_share = DRI_steel_share[planning_horizons]

return DRI_steel_share.set_index(pd.Index(["DRI_Steel_Share"]))


def get_co2_budget(df, source):
# relative to the DE emissions in 1990 *including bunkers*; also
# account for non-CO2 GHG and allow extra room for international
Expand Down Expand Up @@ -152,10 +170,14 @@ def write_to_scenario_yaml(

st_primary_fraction = get_primary_steel_share(df.loc[:, reference_scenario, :], planning_horizons)

config[scenario]["industry"] = {}
dri_fraction = get_DRI_share(df.loc[:, reference_scenario, :], planning_horizons)

config[scenario]["industry"]["St_primary_fraction"] = {}
config[scenario]["industry"]["DRI_fraction"] = {}
for year in st_primary_fraction.columns:
config[scenario]["industry"]["St_primary_fraction"][year] = round(st_primary_fraction.loc["Primary_Steel_Share", year].item(), 4)
config[scenario]["industry"]["DRI_fraction"][year] = round(dri_fraction.loc["DRI_Steel_Share", year].item(), 4)

config[scenario]["co2_budget_national"] = {}
for year, target in co2_budget_fractions.items():
config[scenario]["co2_budget_national"][year] = {}
Expand Down
Loading

0 comments on commit cb034cf

Please sign in to comment.