Sectoral indicators of the pace of transformation (Table 4.1)

Notebook sr15_4.2_sectoral_indicators

This notebook is based on the Release 1.1 of the IAMC 1.5C Scenario Explorer and Data and refers to the published version of the IPCC Special Report on Global Warming of 1.5C (SR15).

The notebook is run with pyam release 0.5.0.

The source code of this notebook is available on GitHub (release 2.0.2).

sr15_4.2_sectoral_indicators

IPCC SR15 scenario assessment

Indicators of the pace of transformation
in 1.5°C pathways and selected sectoral studies

This notebook computes indicators of sectoral transformation for comparison to specialized studies in Chapter 4 (Table 4.1) of the IPCC's "Special Report on Global Warming of 1.5°C".

The scenario data used in this analysis can be accessed and downloaded at https://data.ene.iiasa.ac.at/iamc-1.5c-explorer.

Load pyam package and other dependencies

In [1]:
import pandas as pd
import numpy as np
import io
import itertools
import yaml
import math
import matplotlib.pyplot as plt
%matplotlib inline
import pyam
pyam - INFO: Running in a notebook, setting `pyam` logging level to `logging.INFO` and adding stderr handler

Import scenario data, categorization and specifications files

The metadata file with scenario categorisation and quantitative indicators can be downloaded at https://data.ene.iiasa.ac.at/iamc-1.5c-explorer.
Alternatively, it can be re-created using the notebook sr15_2.0_categories_indicators.

The last cell of this section loads and assigns a number of auxiliary lists as defined in the categorization notebook.

In [2]:
sr1p5 = pyam.IamDataFrame(data='../data/iamc15_scenario_data_world_r2.0.xlsx')
pyam.utils - INFO: Reading `../data/iamc15_scenario_data_world_r2.0.xlsx`
In [3]:
sr1p5.load_meta('sr15_metadata_indicators.xlsx')
pyam.core - INFO: Importing metadata for 416 scenarios (for total of 416)
In [4]:
with open("sr15_specs.yaml", 'r') as stream:
    specs = yaml.load(stream, Loader=yaml.FullLoader)

rc = pyam.run_control()
for item in specs.pop('run_control').items():
    rc.update({item[0]: item[1]})
cats = specs.pop('cats')
cats_15_no_lo = specs.pop('cats_15_no_lo')
marker= specs.pop('marker')

Assign years of interest and downselect to scenarios of interest for this assessment

In [5]:
years = [2010, 2030, 2050]
table_years = [2030, 2050]
compare_year = 2010
In [6]:
cats.remove('Above 2C')
In [7]:
df = sr1p5.filter(category=cats + ['no-climate-assessment'], year=years)

Initialize a pyam.Statistics instance¶

In [8]:
filters = [
    (('IAM pathways', 'no & lo os 1.5'), {'category': cats_15_no_lo}),
    (('IAM pathways', 'hi os 1.5'), {'category': ['1.5C high overshoot']}),
    (('IAM pathways', 'S1'), {'marker': ['S1']}),
    (('IAM pathways', 'S2'), {'marker': ['S2']}),
    (('IAM pathways', 'S5'), {'marker': ['S5']}),
    (('IAM pathways', 'LED'), {'marker': ['LED']}),
    (('sectoral studies', 'Löffler et al. (2017)'), {'model': ['GENeSYS-MOD 1.0']}),
    (('sectoral studies', 'IEA ETP (2017)'), {'model': ['IEA Energy Technology Perspective Model 2017']}),
    (('sectoral studies', 'IEA WEM (2017)'), {'model': ['IEA World Energy Model 2017']})
]

stats = pyam.Statistics(df=df, filters=filters, rows=True)

Share of renewables in primary energy and electricity generation

In [9]:
def add_stats_share(var_list, header, total, total_name, df=df, years=table_years):

    _df = df.filter(variable=var_list)
    for v in var_list:
        _df.require_variable(v, exclude_on_fail=True)
    _df.filter(exclude=False, inplace=True)

    component = (
        _df.timeseries()
        .groupby(['model', 'scenario']).sum()
    )
    share = component / total * 100
    
    for y in years:
        stats.add(share[y], header='Share of {}'.format(header),
                  subheader='in {} (%)'.format(total_name), row=y)
In [10]:
pe = df.filter(variable='Primary Energy').timeseries()
pe.index = pe.index.droplevel([2, 3, 4])
In [11]:
pe_re_vars = [
    'Primary Energy|Biomass',
    'Primary Energy|Non-Biomass Renewables'
]

add_stats_share(pe_re_vars, 'renewables', pe, 'primary energy')
pyam.core - INFO: All scenarios have the required variable `Primary Energy|Biomass`
pyam.core - INFO: All scenarios have the required variable `Primary Energy|Non-Biomass Renewables`
In [12]:
ele = df.filter(variable='Secondary Energy|Electricity').timeseries()
ele.index = ele.index.droplevel([2, 3, 4])
In [13]:
ele_re_vars = [
    'Secondary Energy|Electricity|Biomass',
    'Secondary Energy|Electricity|Non-Biomass Renewables'
]

add_stats_share(ele_re_vars, 'renewables', ele, 'electricity generation')
pyam.core - INFO: All scenarios have the required variable `Secondary Energy|Electricity|Biomass`
pyam.core - INFO: 1 scenario does not include required variable `Secondary Energy|Electricity|Non-Biomass Renewables`, marked as `exclude: True` in metadata

Energy demand in buildings (relative to 2010)

In [14]:
bld = df.filter(variable='Final Energy|Residential and Commercial', year=years).timeseries()
In [15]:
for y in table_years:
    stats.add(-(bld[y] / bld[compare_year] - 1) * 100,
              header='Change in energy demand in buildings',
              subheader='relative to {} (%)'.format(compare_year), row=y)

Share of low-carbon fuels and electricity in the transport sector

For the scenario presented by "Löffler et al. (2017)", the share of low-carbon fuels was read directly from one of the figures in the manuscript.

In [16]:
trp = df.filter(variable='Final Energy|Transportation').timeseries()
trp.index = trp.index.droplevel([2, 3, 4])
In [17]:
trp_low_vars = [
    'Final Energy|Transportation|Electricity',
    'Final Energy|Transportation|Hydrogen',
    'Final Energy|Transportation|Liquids|Biomass'
]
add_stats_share(trp_low_vars, 'low-carbon fuels', trp, 'transport')
pyam.core - INFO: All scenarios have the required variable `Final Energy|Transportation|Electricity`
pyam.core - INFO: 50 scenarios do not include required variable `Final Energy|Transportation|Hydrogen`, marked as `exclude: True` in metadata
pyam.core - INFO: 28 scenarios do not include required variable `Final Energy|Transportation|Liquids|Biomass`, marked as `exclude: True` in metadata
In [18]:
trp_ele_vars = ['Final Energy|Transportation|Electricity']
add_stats_share(trp_ele_vars, 'electricity', trp, 'transport')
pyam.core - INFO: All scenarios have the required variable `Final Energy|Transportation|Electricity`

Industrial emissions (relative to 2010)

In [19]:
co2_ind = df.filter(variable='Emissions|CO2|Energy|Demand|Industry', year=years).timeseries()
In [20]:
for y in table_years:
    stats.add(-(co2_ind[y] / co2_ind[compare_year] - 1) * 100,
              header='Industrial emissions reductions',
              subheader='(based on current level) (%)', row=y)

Display summary statistics table and export as xlsx

In [21]:
summary = stats.summarize(center='median', interquartile=True, custom_format='{:.0f}')
summary = (
    summary
    .swaplevel(0, 2, axis=0).swaplevel(1, 2, axis=0)
    .sort_index(axis=0, level=0, sort_remaining=False)
)
summary
Out[21]:
count Share of renewables Change in energy demand in buildings Share of low-carbon fuels Share of electricity Industrial emissions reductions
median (interquartile range) in primary energy (%) in electricity generation (%) relative to 2010 (%) in transport (%) in transport (%) (based on current level) (%)
2030 IAM pathways no & lo os 1.5 50 29 (37, 26) 54 (65, 47) 0 (7, -7) [42] 12 (18, 9) [29] 5 (7, 4) [46] 42 (55, 34) [42]
hi os 1.5 35 24 (27, 20) 43 (54, 37) -17 (-12, -20) [29] 7 (8, 6) [23] 3 (4, 2) [31] 18 (28, -13) [29]
S1 29 58 -8 4 49
S2 29 48 -14 5 4 19
S5 14 25 3 1
LED 37 60 30 21 42
sectoral studies Löffler et al. (2017) 46 79
IEA ETP (2017) 31 47 2 14 5 22
IEA WEM (2017) 27 50 -6 17 6 15
2050 IAM pathways no & lo os 1.5 50 60 (67, 52) 77 (86, 69) -17 (3, -36) [42] 55 (66, 35) [29] 23 (29, 18) [46] 79 (91, 67) [42]
hi os 1.5 35 62 (68, 47) 82 (88, 64) -37 (-13, -51) [29] 38 (44, 27) [23] 18 (23, 14) [31] 68 (81, 54) [29]
S1 58 81 -21 34 74
S2 53 63 -25 26 23 73
S5 67 70 53 10
LED 73 77 45 59 91
sectoral studies Löffler et al. (2017) 100 100
IEA ETP (2017) 58 74 5 55 30 57
IEA WEM (2017) 47 69 -5 58 32 55
In [22]:
summary.to_excel('output/table_4.2_sectoral_indicators.xlsx')
In [ ]: