Skip to content

Commit

Permalink
remove call of snakemake object in define_spatial
Browse files Browse the repository at this point in the history
  • Loading branch information
cpschau committed Jul 26, 2024
1 parent 003a91e commit 85a112a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,15 @@ def define_spatial(nodes, options):
spatial.biomass.df = pd.DataFrame(vars(spatial.biomass), index=nodes)

# unsustainable bioliquids
if snakemake.params.biomass.get(
"include_unsustainable"
) and investment_year < snakemake.params.biomass.get("unsustainable_phase_out"):
spatial.bioliquids = SimpleNamespace()
if options.get("regional_oil_demand"):
spatial.bioliquids.nodes = nodes + " bioliquids"
spatial.bioliquids.locations = nodes
else:
spatial.bioliquids.nodes = ["EU bioliquids"]
spatial.bioliquids.locations = ["EU"]
spatial.bioliquids = SimpleNamespace()
if options.get("regional_oil_demand"):
spatial.bioliquids.nodes = nodes + " bioliquids"
spatial.bioliquids.locations = nodes
else:
spatial.bioliquids.nodes = ["EU bioliquids"]
spatial.bioliquids.locations = ["EU"]

spatial.bioliquids.df = pd.DataFrame(vars(spatial.bioliquids), index=nodes)
spatial.bioliquids.df = pd.DataFrame(vars(spatial.bioliquids), index=nodes)

# co2

Expand Down

0 comments on commit 85a112a

Please sign in to comment.