adjust co2_emission fct
This commit is contained in:
parent
e41357e3d5
commit
c10afdc857
@ -192,17 +192,17 @@ def get(item, investment_year=None):
|
||||
|
||||
|
||||
def co2_emissions_year(
|
||||
countries, input_eurostat, opts, emissions_scope, report_year, year
|
||||
countries, input_eurostat, opts, snakemake, year
|
||||
):
|
||||
"""
|
||||
Calculate CO2 emissions in one specific year (e.g. 1990 or 2018).
|
||||
"""
|
||||
emissions_scope = snakemake.params.energy["emissions"]
|
||||
emissions_scope = snakemake.config["energy"]["emissions"]
|
||||
eea_co2 = build_eea_co2(snakemake.input.co2, year, emissions_scope)
|
||||
|
||||
# TODO: read Eurostat data from year > 2014
|
||||
# this only affects the estimation of CO2 emissions for BA, RS, AL, ME, MK
|
||||
report_year = snakemake.params.energy["eurostat_report_year"]
|
||||
report_year = snakemake.config["energy"]["eurostat_report_year"]
|
||||
if year > 2014:
|
||||
eurostat_co2 = build_eurostat_co2(
|
||||
input_eurostat, countries, report_year, year=2014
|
||||
@ -241,12 +241,12 @@ def build_carbon_budget(o, input_eurostat, fn, emissions_scope, report_year):
|
||||
countries = snakemake.params.countries
|
||||
|
||||
e_1990 = co2_emissions_year(
|
||||
countries, input_eurostat, opts, emissions_scope, report_year, year=1990
|
||||
countries, input_eurostat, opts, snakemake, year=1990
|
||||
)
|
||||
|
||||
# emissions at the beginning of the path (last year available 2018)
|
||||
e_0 = co2_emissions_year(
|
||||
countries, input_eurostat, opts, emissions_scope, report_year, year=2018
|
||||
countries, input_eurostat, opts, snakemake, year=2018,
|
||||
)
|
||||
|
||||
planning_horizons = snakemake.params.planning_horizons
|
||||
|
Loading…
Reference in New Issue
Block a user