Skip to content

Commit

Permalink
Merge pull request #235 from pypsa-meets-earth/fix_bug_demandworkflow
Browse files Browse the repository at this point in the history
fix minor bug
  • Loading branch information
energyLS authored Sep 14, 2023
2 parents 97c2f2f + c5a08bb commit 5537672
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/prepare_energy_totals.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ def calculate_end_values(df):
options["shipping_hydrogen_share"], demand_sc + "_" + str(investment_year)
)

energy_totals = base_energy_totals * efficiency_gains * growth_factors
energy_totals = (
base_energy_totals
* efficiency_gains.loc[countries]
* growth_factors.loc[countries]
)

# Residential
efficiency_heat_oil_to_elec = snakemake.config["sector"][
Expand Down Expand Up @@ -270,4 +274,4 @@ def calculate_end_values(df):

energy_totals = energy_totals.dropna(axis=1, how="all")

energy_totals.to_csv(snakemake.output.energy_totals)
energy_totals.fillna(0).to_csv(snakemake.output.energy_totals)

0 comments on commit 5537672

Please sign in to comment.