use snakemake.params

This commit is contained in:
lisazeyen 2024-09-11 10:16:09 +02:00
parent 0bdf90280b
commit c017211700
2 changed files with 4 additions and 5 deletions

View File

@ -1027,6 +1027,7 @@ rule prepare_sector_network:
RDIR=RDIR,
heat_pump_sources=config_provider("sector", "heat_pump_sources"),
heat_systems=config_provider("sector", "heat_systems"),
energy_totals_year=config_provider("energy", "energy_totals_year"),
input:
unpack(input_profile_offwind),
**rules.cluster_gas_network.output,

View File

@ -4378,11 +4378,9 @@ if __name__ == "__main__":
)
pop_weighted_energy_totals.update(pop_weighted_heat_totals)
heating_efficiencies = (
(pd.read_csv(snakemake.input.heating_efficiencies, index_col=[0, 1]))
.swaplevel()
.loc[int(snakemake.config["energy"]["energy_totals_year"])]
)
fn = snakemake.input.heating_efficiencies
year = int(snakemake.params["energy_totals_year"])
heating_efficiencies = pd.read_csv(fn, index_col=[1, 0]).loc[year]
patch_electricity_network(n)