add DH cops to network

This commit is contained in:
AmosSchledorn 2024-07-19 18:54:30 +02:00
parent 0c7e7cb46b
commit 560373a864

View File

@ -1824,10 +1824,16 @@ def add_heat(n, costs):
] ]
cop = { cop = {
"air": xr.open_dataarray(snakemake.input.cop_air_decentral_heating) "air decentral": xr.open_dataarray(snakemake.input.cop_air_decentral_heating)
.to_pandas() .to_pandas()
.reindex(index=n.snapshots), .reindex(index=n.snapshots),
"ground": xr.open_dataarray(snakemake.input.cop_soil_decentral_heating) "ground decentral": xr.open_dataarray(snakemake.input.cop_soil_decentral_heating)
.to_pandas()
.reindex(index=n.snapshots),
"air central": xr.open_dataarray(snakemake.input.cop_air_central_heating)
.to_pandas()
.reindex(index=n.snapshots),
"ground central": xr.open_dataarray(snakemake.input.cop_soil_central_heating)
.to_pandas() .to_pandas()
.reindex(index=n.snapshots), .reindex(index=n.snapshots),
} }
@ -1922,7 +1928,7 @@ def add_heat(n, costs):
for heat_pump_type in heat_pump_types: for heat_pump_type in heat_pump_types:
costs_name = f"{name_type} {heat_pump_type}-sourced heat pump" costs_name = f"{name_type} {heat_pump_type}-sourced heat pump"
efficiency = ( efficiency = (
cop[heat_pump_type][nodes] cop[f"{heat_pump_type} {name_type}"][nodes]
if options["time_dep_hp_cop"] if options["time_dep_hp_cop"]
else costs.at[costs_name, "efficiency"] else costs.at[costs_name, "efficiency"]
) )