Skip to content

Commit 306e989

Browse files
committed
some more conforming with upstream changes
1 parent d6aca0b commit 306e989

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

Snakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ rule export_ariadne_variables:
588588
params:
589589
planning_horizons=config_provider("scenario", "planning_horizons"),
590590
hours=config_provider("clustering", "temporal", "resolution_sector"),
591+
max_hours=config_provider("electricity", "max_hours"),
591592
costs=config_provider("costs"),
592593
config_industry=config_provider("industry"),
593594
energy_totals_year=config_provider("energy", "energy_totals_year"),
@@ -760,6 +761,7 @@ rule plot_ariadne_report:
760761
run=config_provider("run", "name"),
761762
foresight=config_provider("foresight"),
762763
costs=config_provider("costs"),
764+
max_hours=config_provider("electricity", "max_hours"),
763765
post_discretization=config_provider("solving", "options", "post_discretization"),
764766
NEP_year=config_provider("costs", "NEP"),
765767
hours=config_provider("clustering", "temporal", "resolution_sector"),

scripts/pypsa-de/export_ariadne_variables.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4670,6 +4670,7 @@ def get_operational_and_capital_costs(year):
46704670
costs = load_costs(
46714671
snakemake.input.costs[ind],
46724672
snakemake.params.costs,
4673+
snakemake.params.max_hours,
46734674
nyears=1,
46744675
)
46754676

@@ -5473,6 +5474,7 @@ def get_data(
54735474
lambda _costs: load_costs(
54745475
_costs,
54755476
snakemake.params.costs,
5477+
snakemake.params.max_hours,
54765478
nyears,
54775479
).multiply(1e-9), # in bn €
54785480
snakemake.input.costs,

scripts/pypsa-de/plot_ariadne_report.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
from scripts._helpers import configure_logging, mock_snakemake
2323
from scripts.add_electricity import load_costs
24-
from scripts.plot_power_network import assign_location
24+
from scripts.make_summary import assign_locations
2525

2626
logger = logging.getLogger(__name__)
2727

@@ -1594,7 +1594,7 @@ def group_pipes(df, drop_direction=False):
15941594
def plot_h2_map(n, regions, savepath, only_de=False):
15951595
logger.info("Plotting H2 map")
15961596
logger.info("Assigning location")
1597-
assign_location(n)
1597+
assign_locations(n)
15981598

15991599
h2_storage = n.stores[n.stores.carrier.isin(["H2", "H2 Store"])]
16001600
regions["H2"] = (
@@ -1820,7 +1820,7 @@ def plot_h2_map(n, regions, savepath, only_de=False):
18201820

18211821

18221822
def plot_h2_map_de(n, regions, tech_colors, savepath, specify_buses=None):
1823-
assign_location(n)
1823+
assign_locations(n)
18241824

18251825
h2_storage = n.stores[n.stores.carrier.isin(["H2", "H2 Store"])]
18261826
regions["H2"] = (
@@ -2685,6 +2685,7 @@ def plot_h2_trade(
26852685
lambda _costs: load_costs(
26862686
_costs,
26872687
snakemake.params.costs,
2688+
snakemake.params.max_hours,
26882689
nyears,
26892690
).multiply(1e-9), # in bn EUR
26902691
snakemake.input.costs,

scripts/pypsa-de/plot_hydrogen_network_incl_kernnetz.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
from pypsa.plot import add_legend_circles, add_legend_lines, add_legend_patches
1616

1717
from scripts._helpers import configure_logging, mock_snakemake, set_scenario_config
18-
from scripts.plot_power_network import assign_location, load_projection
18+
from scripts.make_summary import assign_locations
19+
from scripts.plot_power_network import load_projection
1920

2021
logger = logging.getLogger(__name__)
2122

@@ -47,7 +48,7 @@ def plot_h2_map(n, regions):
4748
# if "H2 pipeline" not in n.links.carrier.unique():
4849
# return
4950

50-
assign_location(n)
51+
assign_locations(n)
5152

5253
h2_storage = n.stores.query("carrier == 'H2'")
5354
regions["H2"] = (

0 commit comments

Comments
 (0)