diff --git a/doc/configtables/industry.csv b/doc/configtables/industry.csv index fc1b3f0f..d1b560ed 100644 --- a/doc/configtables/industry.csv +++ b/doc/configtables/industry.csv @@ -17,6 +17,8 @@ HVC_primary_fraction,--,float,The fraction of high value chemicals (HVC) produce HVC_mechanical_recycling _fraction,--,float,The fraction of high value chemicals (HVC) produced using mechanical recycling HVC_chemical_recycling _fraction,--,float,The fraction of high value chemicals (HVC) produced using chemical recycling ,,, +sector_ratios_fraction_future,--,Dictionary with planning horizons as keys.,The fraction of total progress in fuel and process switching achieved in the industry sector. +basic_chemicals_without_NH3_production_today,Mt/a,float,"The amount of basic chemicals produced without ammonia (= 86 Mtethylene-equiv - 17 MtNH3)." HVC_production_today,MtHVC/a,float,"The amount of high value chemicals (HVC) produced. This includes ethylene, propylene and BTX. From `DECHEMA (2017) `_, Figure 16, page 107" Mwh_elec_per_tHVC _mechanical_recycling,MWh/tHVC,float,"The energy amount of electricity needed to produce a ton of high value chemical (HVC) using mechanical recycling. From SI of `Meys et al (2020) `_, Table S5, for HDPE, PP, PS, PET. LDPE would be 0.756." Mwh_elec_per_tHVC _chemical_recycling,MWh/tHVC,float,"The energy amount of electricity needed to produce a ton of high value chemical (HVC) using chemical recycling. The default value is based on pyrolysis and electric steam cracking. From `Material Economics (2019) `_, page 125" diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 1a7564d5..b4425308 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -10,6 +10,15 @@ Release Notes Upcoming Release ================ +* Improved representation of industry transition pathways. A new script was + added to interpolate industry sector ratios from today's status quo to future + systems (i.e. specific emissions and demands for energy and feedstocks). For + each country we gradually switch industry processes from today's specific + energy carrier usage per ton material output to the best-in-class energy + consumption of tomorrow. This is done on a per-country basis. The ratio of + today to tomorrow's energy consumption is set with the ``industry: + sector_ratios_fraction_future:`` parameter. + * Bugfix: Correct units of subtracted chlorine and methanol demand in :mod:`build_industry_sector_ratios`. diff --git a/scripts/build_industry_sector_ratios_intermediate.py b/scripts/build_industry_sector_ratios_intermediate.py index 0cbdfa06..4b1a2d34 100644 --- a/scripts/build_industry_sector_ratios_intermediate.py +++ b/scripts/build_industry_sector_ratios_intermediate.py @@ -25,62 +25,52 @@ def build_industry_sector_ratios_intermediate(): production = ( pd.read_csv(snakemake.input.industrial_production_per_country, index_col=0) / 1e3 - ) - production = production.unstack().swaplevel() + ).stack() + production.index.names = [None, None] # in MWh/t future_sector_ratios = pd.read_csv( snakemake.input.industry_sector_ratios, index_col=0 ) - production.index.names = [None, None] - today_sector_ratios = demand.div(production, axis=1) - today_sector_ratios.drop( - columns=today_sector_ratios.columns[today_sector_ratios.isna().all()], - inplace=True, - ) + today_sector_ratios.dropna(how="all", axis=1, inplace=True) - rename = pd.Series(today_sector_ratios.index, today_sector_ratios.index) - rename["waste"] = "biomass" - rename["electricity"] = "elec" - rename["solid"] = "coke" - rename["gas"] = "methane" - rename["other"] = "biomass" - rename["liquid"] = "naphtha" - - today_sector_ratios.rename(rename, inplace=True) + rename = { + "waste": "biomass", + "electricity": "elec", + "solid": "coke", + "gas": "methane", + "other": "biomass", + "liquid": "naphtha", + } + today_sector_ratios = today_sector_ratios.rename(rename).groupby(level=0).sum() fraction_future = get(params["sector_ratios_fraction_future"], year) intermediate_sector_ratios = {} - - for ct in today_sector_ratios.columns.unique(level=0): - - intermediate_sector_ratio = future_sector_ratios.copy() - - intermediate_sector_ratio.loc[ - today_sector_ratios[ct].index, today_sector_ratios[ct].columns - ] = ( - fraction_future - * intermediate_sector_ratio.loc[ - today_sector_ratios[ct].index, today_sector_ratios[ct].columns - ] - + (1 - fraction_future) * today_sector_ratios[ct] + for ct, group in today_sector_ratios.T.groupby(level=0): + today_sector_ratios_ct = ( + group.droplevel(0) + .T.reindex_like(future_sector_ratios) + .fillna(future_sector_ratios) + ) + intermediate_sector_ratios[ct] = ( + today_sector_ratios_ct * (1 - fraction_future) + + future_sector_ratios * fraction_future ) - intermediate_sector_ratios[ct] = intermediate_sector_ratio - intermediate_sector_ratios = pd.concat(intermediate_sector_ratios, axis=1) - intermediate_sector_ratios.to_csv(snakemake.output.industry_sector_ratios) - if __name__ == "__main__": if "snakemake" not in globals(): from _helpers import mock_snakemake - snakemake = mock_snakemake("build_industry_sector_ratios_intermediate") + snakemake = mock_snakemake( + "build_industry_sector_ratios_intermediate", + planning_horizons="2030", + ) year = int(snakemake.wildcards.planning_horizons[-4:])