Skip to content

Commit

Permalink
adapt build_base_energy and build_base_industry to params
Browse files Browse the repository at this point in the history
  • Loading branch information
hazemakhalek committed Jul 17, 2024
1 parent c812db1 commit 3233fa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions scripts/build_base_energy_totals.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def calc_sector(sector):
sectors_dfs[sector] = df_sector.copy()

if sector == "consumption by households":
if snakemake.config["sector"]["coal"]["shift_to_elec"]:
if snakemake.params.shift_coal_to_elec:
condition = (df_sector.Commodity == "Electricity") | (
df_sector.Commodity.isin(coal_fuels)
)
Expand Down Expand Up @@ -165,7 +165,7 @@ def calc_sector(sector):
) * (1 - snakemake.params.space_heat_share)

elif sector == "services":
if snakemake.config["sector"]["coal"]["shift_to_elec"]:
if snakemake.params.shift_coal_to_elec:
condition = (df_sector.Commodity == "Electricity") | (
df_sector.Commodity.isin(coal_fuels)
)
Expand Down Expand Up @@ -289,7 +289,7 @@ def calc_sector(sector):
4,
)
elif sector == "other energy":
if snakemake.config["sector"]["coal"]["shift_to_elec"]:
if snakemake.params.shift_coal_to_elec:
condition = (df_sector.Commodity == "Electricity") | (
df_sector.Commodity.isin(coal_fuels)
)
Expand Down Expand Up @@ -318,7 +318,7 @@ def calc_sector(sector):
4,
)
elif sector == "non energy use":
if snakemake.config["sector"]["coal"]["shift_to_elec"]:
if snakemake.params.shift_coal_to_elec:
condition = (df_sector.Commodity == "Electricity") | (
df_sector.Commodity.isin(coal_fuels)
)
Expand Down
2 changes: 0 additions & 2 deletions scripts/build_base_industry_totals.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ def create_industry_base_totals(df):
year = snakemake.params.base_year
countries = snakemake.params.countries

transactions_from_list = snakemake.config["industry"]

investment_year = int(snakemake.wildcards.planning_horizons)
demand_sc = snakemake.wildcards.demand
no_years = int(snakemake.wildcards.planning_horizons) - int(
Expand Down

0 comments on commit 3233fa7

Please sign in to comment.