build_pop_weighted_energy: don't reduce district heat share

Previously the DH share was being multiplied by the population
weighting, reducing the DH share with multiple nodes.
This commit is contained in:
Tom Brown 2024-01-12 16:42:12 +01:00 committed by Fabian Neumann
parent 3750cc5350
commit fbff32dcfc

View File

@ -26,4 +26,9 @@ if __name__ == "__main__":
nodal_energy_totals.index = pop_layout.index
nodal_energy_totals = nodal_energy_totals.multiply(pop_layout.fraction, axis=0)
# district heating share should not be divided by population fraction
dh_share = energy_totals["district heat share"].loc[pop_layout.ct].fillna(0.0)
dh_share.index = pop_layout.index
nodal_energy_totals["district heat share"] = dh_share
nodal_energy_totals.to_csv(snakemake.output[0])