Annual global emissions characteristics (Figure 2.6)

Notebook sr15_2.3.3_global_emissions_characteristics

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_2.3.3_global_emissions_characteristics

IPCC SR15 scenario assessment

Annual global emissions characteristics
of long-lived climate forcers

This notebook plots the development of carbon dioxide emissions by different subsectors for Figure 2.6 in 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
plt.style.use('style_sr15.mplstyle')
%matplotlib inline
import pyam

from utils import boxplot_by_cat
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')
all_cats = specs.pop('all_cats')
subcats = specs.pop('subcats')
all_subcats = specs.pop('all_subcats')
plotting_args = specs.pop('plotting_args')
marker= specs.pop('marker')

Downselect scenario ensemble to categories of interest for this assessment

In [5]:
cats.remove('Above 2C')
In [6]:
years = [2020, 2030, 2050, 2100]
In [7]:
sr1p5.meta.rename(columns={'Kyoto-GHG|2010 (SAR)': 'kyoto_ghg_2010'}, inplace=True)
In [8]:
df = sr1p5.filter(kyoto_ghg_2010='in range', category=cats, year=years)

Set specifications for filter and plotting

In [9]:
save_name = 'output/fig2.6{}.{}'
In [10]:
filter_args = dict(df=sr1p5, category=cats, marker=None, join_meta=True)
In [11]:
def plotting_args(name, filetype='png', hlines=[0]):
    return {'categories': cats, 'column': 'category', 'years': years, 'add_marker': marker,
            'hlines': hlines, 'save': save_name.format(name, filetype)}
In [12]:
data = []

Plot different emissions pathways by category

In [13]:
ghg = (
    df.filter(variable='Emissions|Kyoto Gases (AR4-GWP100)')
    .rename(unit={'Mt CO2-equiv/yr': 'Mt CO2e/yr'})
    .convert_unit('Mt CO2e/yr','Gt CO2e/yr')
    .timeseries()
)
In [14]:
name = 'kyoto'
_data = pyam.filter_by_meta(ghg, **filter_args)
fig = boxplot_by_cat(_data, ylabel='Global Kyoto-GHG emissions (GtCO2e AR4GWP)',
                     **plotting_args('a_{}'.format(name)))
_data['species'] = name
data.append(_data)
In [15]:
co2 = (
    df.filter(variable='Emissions|CO2')
    .convert_unit('Mt CO2/yr', 'Gt CO2/yr')
    .timeseries()
)
In [16]:
name = 'co2_net_total'
_data = pyam.filter_by_meta(co2, **filter_args)
fig = boxplot_by_cat(_data, ylabel='Global CO2 emissions (GtCO2)',
                     **plotting_args('b_{}'.format(name)), legend=False)
_data['species'] = name
data.append(_data)
In [17]:
co2_afolu = (
    df.filter(variable='Emissions|CO2|AFOLU')
    .convert_unit('Mt CO2/yr', 'Gt CO2/yr')
    .timeseries()
)
In [18]:
name = 'co2_afolu'
_data = pyam.filter_by_meta(co2_afolu, **filter_args)
fig = boxplot_by_cat(_data, ylabel='Global CO2 emissions from AFOLU (GtCO2)',
                     **plotting_args('c_{}'.format(name)), legend=False)
_data['species'] = name
data.append(_data)
In [19]:
n2o = (
    df.filter(variable='Emissions|N2O')
    .convert_unit('kt N2O/yr', 'Mt N2O/yr', factor=1/1000)
    .timeseries()
)
In [20]:
name = 'n2o'
_data = pyam.filter_by_meta(n2o, **filter_args)
fig = boxplot_by_cat(_data, ylabel='Global N2O emissions (MtN2O)',
                     **plotting_args('d_{}'.format(name), hlines=None),
                     legend=False)
_data['species'] = name
data.append(_data)
In [21]:
co2_ene = (
    df.filter(variable='Emissions|CO2|Energy and Industrial Processes')
    .convert_unit('Mt CO2/yr', 'Gt CO2/yr')
    .timeseries()
)
In [22]:
name = 'co2_ffi'
_data = pyam.filter_by_meta(co2_ene, **filter_args)
fig = boxplot_by_cat(_data, ylabel='Global CO2 emissions from fossil fuels and industry (GtCO2)',
                     **plotting_args('e_{}'.format(name)), legend=False)
_data['species'] = name
data.append(_data)
In [23]:
co2_supply = (
    df.filter(variable='Emissions|CO2|Energy|Supply')
    .convert_unit('Mt CO2/yr', 'Gt CO2/yr')
    .timeseries()
)
In [24]:
name = 'co2_supply'
_data = pyam.filter_by_meta(co2_supply, **filter_args)
fig = boxplot_by_cat(_data, ylabel='Global CO2 emissions from energy supply (GtCO2)',
                     **plotting_args('f_{}'.format(name)), legend=False)
_data['species'] = name
data.append(_data)
In [25]:
co2_demand = (
    df.filter(variable='Emissions|CO2|Energy|Demand')
    .convert_unit('Mt CO2/yr', 'Gt CO2/yr')
    .timeseries()
)

Exclude scenarios that report the CO2 emissions from energy demand as zero from this plot.

In [26]:
co2_demand[co2_demand.apply(lambda x: max(x), axis=1) < 0.1]
Out[26]:
2020 2030 2050 2100
model scenario region variable unit
GCAM 4.2 SSP1-19 World Emissions|CO2|Energy|Demand Gt CO2/yr 0.0 0.0 0.0 0.0
SSP2-19 World Emissions|CO2|Energy|Demand Gt CO2/yr 0.0 0.0 0.0 0.0
SSP5-19 World Emissions|CO2|Energy|Demand Gt CO2/yr 0.0 0.0 0.0 0.0
In [27]:
co2_demand = co2_demand[co2_demand.apply(lambda x: max(x), axis=1) > 0.1]
In [28]:
name = 'co2_demand'
_data = pyam.filter_by_meta(co2_demand, **filter_args)
fig = boxplot_by_cat(_data, ylabel='Global CO2 emissions from energy demand (GtCO2)',
                     **plotting_args('g_{}'.format(name)), legend=False)
_data['species'] = name
data.append(_data)

Export timeseries data to xlsx

In [29]:
data = pd.concat(data).set_index(['species', 'category', 'marker'], append=True)
In [30]:
data.head()
Out[30]:
2020 2030 2050 2100
model scenario region variable unit species category marker
WITCH-GLOBIOM 3.1 SSP4-26 World Emissions|Kyoto Gases (AR4-GWP100) Gt CO2e/yr kyoto Lower 2C NaN 56.126443 32.797859 21.942201 0.089061
REMIND 1.7 ADVANCE_2030_1.5C-2100 World Emissions|Kyoto Gases (AR4-GWP100) Gt CO2e/yr kyoto 1.5C high overshoot NaN 61.119346 56.742768 2.593212 -8.048044
AIM/CGE 2.1 EMF33_Med2C_none World Emissions|Kyoto Gases (AR4-GWP100) Gt CO2e/yr kyoto Lower 2C NaN 57.625040 33.542835 22.868016 15.959063
MESSAGEix-GLOBIOM 1.0 CD-LINKS_NPi2020_1600 World Emissions|Kyoto Gases (AR4-GWP100) Gt CO2e/yr kyoto Higher 2C NaN 52.331995 49.730156 35.251367 -3.555982
REMIND-MAgPIE 1.7-3.0 SMP_2C_Sust World Emissions|Kyoto Gases (AR4-GWP100) Gt CO2e/yr kyoto 1.5C low overshoot NaN 49.137195 31.903551 12.146850 1.524367
In [31]:
data.reset_index().to_excel('output/fig2.6_data_table.xlsx')
In [ ]: