Skip to content

Commit 9b66fd6

Browse files
lindnemipre-commit-ci[bot]
authored and
cpschau
committed
Simplify scenarios (#84)
* start by making Mix the default scenario * make script more robust * - change syntax of national co2_budget - define a default national_co2_budget - allow empty scenario, which falls back to the defaults specified in pypsa.de.yaml * simplify scenario definitions, fallback to defaults more often * change prefix * ariadne_template is data not resources * fix rounding error * disable interactive mode in final plotting script * decouple ariadne DB pre-workflow from scenario management * fix key error * error if co2 budget for country other than DE specified * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * improve wording --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent e506603 commit 9b66fd6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/pypsa-de/additional_functionality.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,11 @@ def add_national_co2_budgets(n, snakemake, national_co2_budgets, investment_year
380380
co2_total_totals = co2_totals[sectors].sum(axis=1) * nyears
381381

382382
for ct in national_co2_budgets:
383+
if ct != "DE":
384+
logger.error(
385+
f"CO2 budget for countries other than `DE` is not yet supported. Found country {ct}. Please check the config file."
386+
)
387+
383388
limit = co2_total_totals[ct] * national_co2_budgets[ct][investment_year]
384389
logger.info(
385390
f"Limiting emissions in country {ct} to {national_co2_budgets[ct][investment_year]:.1%} of "

0 commit comments

Comments
 (0)