From c13e0b83cff1f8a7ac2d6c9cd07ba01bd2b235f8 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Tue, 5 Mar 2024 18:55:59 +0100 Subject: [PATCH] remove remaining references of eurostat report year --- rules/build_sector.smk | 1 - rules/postprocess.smk | 1 - scripts/plot_summary.py | 2 -- scripts/prepare_sector_network.py | 14 ++++---------- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/rules/build_sector.smk b/rules/build_sector.smk index 2ca0d9a4..9147a623 100644 --- a/rules/build_sector.smk +++ b/rules/build_sector.smk @@ -834,7 +834,6 @@ rule prepare_sector_network: countries=config_provider("countries"), adjustments=config_provider("adjustments", "sector"), emissions_scope=config_provider("energy", "emissions"), - eurostat_report_year=config_provider("energy", "eurostat_report_year"), RDIR=RDIR, input: unpack(input_profile_offwind), diff --git a/rules/postprocess.smk b/rules/postprocess.smk index ecfc5b74..1b188829 100644 --- a/rules/postprocess.smk +++ b/rules/postprocess.smk @@ -237,7 +237,6 @@ rule plot_summary: countries=config_provider("countries"), planning_horizons=config_provider("scenario", "planning_horizons"), emissions_scope=config_provider("energy", "emissions"), - eurostat_report_year=config_provider("energy", "eurostat_report_year"), plotting=config_provider("plotting"), foresight=config_provider("foresight"), co2_budget=config_provider("co2_budget"), diff --git a/scripts/plot_summary.py b/scripts/plot_summary.py index c2fd7e04..bfe9995f 100644 --- a/scripts/plot_summary.py +++ b/scripts/plot_summary.py @@ -462,7 +462,6 @@ def plot_carbon_budget_distribution(input_eurostat, options): plt.rcParams["ytick.labelsize"] = 20 emissions_scope = snakemake.params.emissions_scope - report_year = snakemake.params.eurostat_report_year input_co2 = snakemake.input.co2 # historic emissions @@ -472,7 +471,6 @@ def plot_carbon_budget_distribution(input_eurostat, options): input_eurostat, options, emissions_scope, - report_year, input_co2, year=1990, ) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 9a9db36f..8b001da3 100755 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -248,7 +248,7 @@ def get(item, investment_year=None): def co2_emissions_year( - countries, input_eurostat, options, emissions_scope, report_year, input_co2, year + countries, input_eurostat, options, emissions_scope, input_co2, year ): """ Calculate CO2 emissions in one specific year (e.g. 1990 or 2018). @@ -258,11 +258,9 @@ def co2_emissions_year( # TODO: read Eurostat data from year > 2014 # this only affects the estimation of CO2 emissions for BA, RS, AL, ME, MK if year > 2014: - eurostat_co2 = build_eurostat_co2( - input_eurostat, countries, report_year, year=2014 - ) + eurostat_co2 = build_eurostat_co2(input_eurostat, countries, 2014) else: - eurostat_co2 = build_eurostat_co2(input_eurostat, countries, report_year, year) + eurostat_co2 = build_eurostat_co2(input_eurostat, countries, year) co2_totals = build_co2_totals(countries, eea_co2, eurostat_co2) @@ -278,7 +276,7 @@ def co2_emissions_year( # TODO: move to own rule with sector-opts wildcard? def build_carbon_budget( - o, input_eurostat, fn, emissions_scope, report_year, input_co2, options + o, input_eurostat, fn, emissions_scope, input_co2, options ): """ Distribute carbon budget following beta or exponential transition path. @@ -300,7 +298,6 @@ def build_carbon_budget( input_eurostat, options, emissions_scope, - report_year, input_co2, year=1990, ) @@ -311,7 +308,6 @@ def build_carbon_budget( input_eurostat, options, emissions_scope, - report_year, input_co2, year=2018, ) @@ -3669,14 +3665,12 @@ if __name__ == "__main__": fn = "results/" + snakemake.params.RDIR + "/csvs/carbon_budget_distribution.csv" if not os.path.exists(fn): emissions_scope = snakemake.params.emissions_scope - report_year = snakemake.params.eurostat_report_year input_co2 = snakemake.input.co2 build_carbon_budget( co2_budget, snakemake.input.eurostat, fn, emissions_scope, - report_year, input_co2, options, )