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
151 changes: 143 additions & 8 deletions ariadne-data/costs/mean/costs_2020.csv

Large diffs are not rendered by default.

153 changes: 144 additions & 9 deletions ariadne-data/costs/mean/costs_2025.csv

Large diffs are not rendered by default.

151 changes: 143 additions & 8 deletions ariadne-data/costs/mean/costs_2030.csv

Large diffs are not rendered by default.

151 changes: 143 additions & 8 deletions ariadne-data/costs/mean/costs_2035.csv

Large diffs are not rendered by default.

151 changes: 143 additions & 8 deletions ariadne-data/costs/mean/costs_2040.csv

Large diffs are not rendered by default.

151 changes: 143 additions & 8 deletions ariadne-data/costs/mean/costs_2045.csv

Large diffs are not rendered by default.

151 changes: 143 additions & 8 deletions ariadne-data/costs/mean/costs_2050.csv

Large diffs are not rendered by default.

920 changes: 0 additions & 920 deletions ariadne-data/costs/optimist/costs_2020.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/optimist/costs_2025.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/optimist/costs_2030.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/optimist/costs_2035.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/optimist/costs_2040.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/optimist/costs_2045.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/optimist/costs_2050.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/pessimist/costs_2020.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/pessimist/costs_2025.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/pessimist/costs_2030.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/pessimist/costs_2035.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/pessimist/costs_2040.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/pessimist/costs_2045.csv

This file was deleted.

920 changes: 0 additions & 920 deletions ariadne-data/costs/pessimist/costs_2050.csv

This file was deleted.

6 changes: 3 additions & 3 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: 20240814limitseq
prefix: 20240829mergemaster
name:
# - CurrentPolicies
- KN2045_Bal_v4
Expand Down Expand Up @@ -127,7 +127,7 @@ lines:

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#enable
enable:
retrieve: false # set to false once initial data is retrieved
retrieve: true # set to false once initial data is retrieved
retrieve_cutout: false # set to false once initial data is retrieved
clustering:
# simplify_network:
Expand Down Expand Up @@ -553,6 +553,6 @@ co2_price_add_on_fossils:
2025: 60

must_run_biomass:
enable: true
enable: false
p_min_pu: 0.7
regions: ['DE']
56 changes: 38 additions & 18 deletions workflow/scripts/export_ariadne_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
import pypsa
from numpy import isclose

paths = ["workflow/submodules/pypsa-eur/scripts", "../submodules/pypsa-eur/scripts"]
paths = [
"workflow/submodules/pypsa-eur/scripts",
"../submodules/pypsa-eur/scripts",
"../submodules/pypsa-eur/",
]
for path in paths:
sys.path.insert(0, os.path.abspath(path))

Expand Down Expand Up @@ -113,8 +117,8 @@ def _get_gas_fractions(n, region):
total_exported_renewable_gas = total_gas_supply.get(
("DE renewable gas -> EU gas", "renewable gas"), 0
)
domestic_renewable_gas = renewable_gas_supply.loc["DE renewable gas"]
foreign_renewable_gas = renewable_gas_supply.loc["EU renewable gas"]
domestic_renewable_gas = renewable_gas_supply.get("DE renewable gas")
foreign_renewable_gas = renewable_gas_supply.get("EU renewable gas")
else:
domestic_gas_supply = (
total_gas_supply.reindex(
Expand All @@ -134,29 +138,40 @@ def _get_gas_fractions(n, region):
total_exported_renewable_gas = total_gas_supply.get(
("EU renewable gas -> DE gas", "renewable gas"), 0
)
domestic_renewable_gas = renewable_gas_supply.loc["EU renewable gas"]
foreign_renewable_gas = renewable_gas_supply.loc["DE renewable gas"]
domestic_renewable_gas = renewable_gas_supply.get("EU renewable gas", 0)
foreign_renewable_gas = renewable_gas_supply.get("DE renewable gas", 0)

# Legacy code for dropping gas pipelines (now deactivated)
drops = ["gas pipeline", "gas pipeline new"]
for d in drops:
if d in total_gas_supply.index:
total_gas_supply.drop(d, inplace=True)

imported_renewable_gas = (
foreign_renewable_gas
/ foreign_renewable_gas.sum()
* total_imported_renewable_gas
)
if total_imported_renewable_gas == 0:
imported_renewable_gas = pd.Series(
0, index=renewable_gas_supply.index.get_level_values("carrier").unique()
)
else:
imported_renewable_gas = (
foreign_renewable_gas
/ foreign_renewable_gas.sum()
* total_imported_renewable_gas
)

exported_renewable_gas = (
domestic_renewable_gas
/ domestic_renewable_gas.sum()
* total_exported_renewable_gas
)
renewable_gas_supply = (
domestic_renewable_gas + imported_renewable_gas - exported_renewable_gas
)
if total_exported_renewable_gas == 0:
exported_renewable_gas = pd.Series(
0, index=renewable_gas_supply.index.get_level_values("carrier").unique()
)
else:
exported_renewable_gas = (
domestic_renewable_gas
/ domestic_renewable_gas.sum()
* total_exported_renewable_gas
)

renewable_gas_supply = imported_renewable_gas.add(
domestic_renewable_gas, fill_value=0
).subtract(exported_renewable_gas, fill_value=0)
# Check for small differences
assert domestic_gas_supply.get("renewable gas", 0) - renewable_gas_supply.sum() < 1

Expand Down Expand Up @@ -1557,9 +1572,14 @@ def get_secondary_energy(n, region, _industry_demand):
["SMR", "SMR CC"]
).sum()

var["Secondary Energy|Hydrogen|Other"] = hydrogen_production.get(
"H2 for industry", 0
)

var["Secondary Energy|Hydrogen"] = (
var["Secondary Energy|Hydrogen|Electricity"]
+ var["Secondary Energy|Hydrogen|Gas"]
+ var["Secondary Energy|Hydrogen|Other"]
)

assert isclose(
Expand Down
4 changes: 2 additions & 2 deletions workflow/scripts/modify_prenetwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,10 @@ def unravel_oilbus(n):
p_nom=1e6,
efficiency=1
- (
snakemake.config["industry"]["fuel_refining"]["oil"]["emissions"]
snakemake.config["industry"]["oil_refining_emissions"]
/ costs.at["oil", "CO2 intensity"]
),
efficiency2=snakemake.config["industry"]["fuel_refining"]["oil"]["emissions"],
efficiency2=snakemake.config["industry"]["oil_refining_emissions"],
)

# change links from EU oil to DE oil
Expand Down
2 changes: 1 addition & 1 deletion workflow/submodules/pypsa-eur
Submodule pypsa-eur updated 117 files