Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implementing trickleback changes and updating to data release 1.1 #13

Merged
merged 20 commits into from
Feb 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
31ac757
remove reference to CC-BY 4.0 (#10)
danielhuppmann Jan 9, 2019
eccbc6e
update copyright years (2018-2019)
danielhuppmann Jan 30, 2019
7a78d8d
add DATA_RELEASE_NOTES for release 1.1 (#1, #2, #3, #4, #5, #7, #9, #12)
danielhuppmann Feb 8, 2019
a557643
bump data version in notebooks to `release 1.1`
danielhuppmann Feb 4, 2019
db62d72
add implicit cumulative values for BECCS to metadata (#9)
danielhuppmann Jan 30, 2019
8c665eb
exclude scenarios outside of SAR-Kyoto-GHG range in 2010 from emissio…
danielhuppmann Oct 19, 2018
20e0e24
only count`Lower 2C` pathways as 2C in SPM
danielhuppmann Oct 19, 2018
7b9299f
mitigate model bias in statement C1
danielhuppmann Feb 8, 2019
a6a2110
remove partial assessment for statement C3.2 and refer to notebook
danielhuppmann Feb 5, 2019
cf72943
refine section for Statement D1.1
danielhuppmann Oct 19, 2018
104cd70
add illustrative figures to notebook for SPM3a
danielhuppmann Feb 5, 2019
f29650e
convert land-use units to SI in table for SPM3b
danielhuppmann Feb 4, 2019
ed207ae
remove overview of categorization by project in metadata notebook
danielhuppmann Feb 5, 2019
134257d
exclude 13 AIM scenarios from Table 2.4
danielhuppmann Feb 5, 2019
e0316c9
refactor notebook for Table 2.4 to show merged no-and-low overshoot 1…
danielhuppmann Feb 5, 2019
9e0372f
add export of data tables for Figures 2.14, 2.15, 2.16 and 2.17
danielhuppmann Feb 5, 2019
ed5826f
only show 1.5°C pathways with limited overshoot in panels b of Figure…
danielhuppmann Feb 5, 2019
01d56f7
2 file changes in working directory View changes commit:158cf5 harmon…
danielhuppmann Feb 5, 2019
2a2ec53
add reference to Table 4.1 in notebook header
danielhuppmann Feb 8, 2019
3186723
harmonize data table name for table 4.2
danielhuppmann Feb 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 56 additions & 0 deletions DATA_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Release notes for the *IAMC 1.5°C Scenario Explorer and Data hosted by IIASA*

This document keeps track of the data changes of the scenario ensemble
compiled in the *IAMC 1.5°C Scenario Explorer and Data hosted by IIASA*.


## Release 1.1

This release includes additional timeseries data to increase reproducibility
of the figures and tables in the IPCC SR15, and it corrects a number of
data issues identified since Release 1.0. None of the changes have
any impact on the assessment in the IPCC SR15.

### Detailed list of changes

- Reporting error for primary energy from fossils (aggregate) submitted by
the 'MESSAGE-GLOBIOM 1.0' scenarios as part of the 'EMF33' project.
See [#1](https://github.com/iiasa/ipcc_sr15_scenario_analysis/issues/1)
for details.

- Typo in a variable name and incorrect values in two timeseries of
the reference data from 'IEA Statistics' included in the release.
See [#2](https://github.com/iiasa/ipcc_sr15_scenario_analysis/issues/2)
for details.

- Missing subsectoral CO2 emissions for scenarios from the SSP, CD-LINKS
and LED projects.
See [#3](https://github.com/iiasa/ipcc_sr15_scenario_analysis/issues/3)
and [#4](https://github.com/iiasa/ipcc_sr15_scenario_analysis/issues/4)
for details.

- Missing timeseries of harmonized emissions as used for climate impact
assessment by the MAGICC and FAIR models.
See [#5](https://github.com/iiasa/ipcc_sr15_scenario_analysis/issues/5)
for details.

- Error in index year for the variable 'Price|Agriculture|*' in scenarios
submitted by the 'AIM' model.
See [#7](https://github.com/iiasa/ipcc_sr15_scenario_analysis/issues/7)
for details.

- Missing value for cumulative BECCS in the metadata for
the 'LowEnergyDemand' scenario submitted by the 'MESSAGEix-GLOBIOM' model.
See [#9](https://github.com/iiasa/ipcc_sr15_scenario_analysis/issues/9)
for details.

- Incorrect regional data (other than 'World') for scenario submitted
by the 'POLES' model as part ofthe 'EMF33' project.
See [#12](https://github.com/iiasa/ipcc_sr15_scenario_analysis/issues/12)
for details.


## Release 1.0

Scenario ensemble release for the soft launch of the IPCC SR15
following the approval plenary in Incheon, Republic of Korea.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## License

Copyright 2018 IIASA
Copyright 2018-2019 IIASA

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## License

Copyright 2018 IIASA
Copyright 2018-2019 IIASA

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -46,7 +46,7 @@ publication of the final, copy-edited version of the SR1.5
The scenario ensemble used for this assessment is available for download
at [data.ene.iiasa.ac.at/iamc-1.5c-explorer](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer).

The scenario data is licensed under a derivative of the Creative Commons CC-BY 4.0 License.
The scenario data is released under a custom license.
If appropriate reference is made to the data source, it is permitted to use
the data for scientific research and science communication.
However, redistribution of substantial portions of the data is restricted.
Expand Down
109 changes: 84 additions & 25 deletions assessment/spm_sr15_figure_3a_global_emissions_pathways.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
"This notebook extracts the emissions pathways for Figure 3a in the Summary for Policymakers\n",
"of the IPCC's _\"Special Report on Global Warming of 1.5°C\"_.\n",
"\n",
"The scenario data used in this analysis can be accessed and downloaded at [https://data.ene.iiasa.ac.at/iamc-1.5c-explorer](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer)."
"The scenario data used in this analysis can be accessed and downloaded at [https://data.ene.iiasa.ac.at/iamc-1.5c-explorer](https://data.ene.iiasa.ac.at/iamc-1.5c-explorer).\n",
"\n",
"### *Disclaimer*\n",
"\n",
"*The figures shown in this notebook are NOT the same figures as used in Figure 3a of the SPM.\n",
"They are simplified figures included here only for reference.*"
]
},
{
Expand Down Expand Up @@ -63,7 +68,7 @@
"metadata": {},
"outputs": [],
"source": [
"sr1p5 = pyam.IamDataFrame(data='../data/iamc15_scenario_data_world_r1.xlsx')"
"sr1p5 = pyam.IamDataFrame(data='../data/iamc15_scenario_data_world_r1.1.xlsx')"
]
},
{
Expand All @@ -84,8 +89,12 @@
"with open(\"sr15_specs.yaml\", 'r') as stream:\n",
" specs = yaml.load(stream)\n",
"\n",
"rc = pyam.run_control()\n",
"for item in specs.pop('run_control').items():\n",
" rc.update({item[0]: item[1]})\n",
"cats = specs.pop('cats')\n",
"cats_15 = specs.pop('cats_15')\n",
"cats_15_no_lo = specs.pop('cats_15_no_lo')\n",
"marker= specs.pop('marker')"
]
},
Expand Down Expand Up @@ -116,6 +125,16 @@
"df = sr1p5.filter(category=cats_15, kyoto_ghg_2010='in range')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"df.set_meta(meta='1.5C limited overshoot', name='supercategory', index=df.filter(category=cats_15_no_lo))\n",
"rc.update({'color': {'supercategory': {'1.5C limited overshoot': 'xkcd:bluish'}}})"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -145,7 +164,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Plot different emissions pathways by category"
"## Plot different emissions pathways by category\n",
"\n",
"### Net carbon dioxide emissions for all pathways limiting global warming to 1.5°C by the end of the century"
]
},
{
Expand All @@ -154,7 +175,11 @@
"metadata": {},
"outputs": [],
"source": [
"writer = pd.ExcelWriter('output/spm_sr15_figure3a_data_table.xlsx')"
"co2 = (\n",
" df.filter(variable='Emissions|CO2')\n",
" .convert_unit({'Mt CO2/yr': ('Gt CO2/yr', 0.001)})\n",
")\n",
"data.append(('Net carbon dioxide', co2))"
]
},
{
Expand All @@ -163,14 +188,51 @@
"metadata": {},
"outputs": [],
"source": [
"co2 = (\n",
" df.filter(variable='Emissions|CO2')\n",
" .convert_unit({'Mt CO2/yr': ('Gt CO2/yr', 0.001)})\n",
" .timeseries()\n",
")\n",
"_co2 = co2.filter(category=cats_15, year=range(2010, 2101, 5))\n",
"\n",
"pyam.utils.write_sheet(writer, 'Net CO2',\n",
" pyam.filter_by_meta(co2, **filter_args), index=True)"
"fig, ax = plt.subplots()\n",
"_co2.filter(year=[2010]).line_plot(ax=ax, color='category', linewidth=2)\n",
"_co2.line_plot(ax=ax, color='category', linewidth=0.1, fill_between=True, final_ranges=True)\n",
"_co2.filter(marker=marker).line_plot(ax=ax, color='category')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Emissions of methane, black carbon and nitrous oxide for 1.5°C pathways with limited overshoot\n",
"\n",
"The figures below are shown as reduction relative to 2010."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"def plot_relative(data, baseyear=2010):\n",
" _data = data.timeseries()\n",
" _data_rel = pd.DataFrame()\n",
" for y in range(2010, 2101, 5):\n",
" _data_rel[y] = _data[y] / _data[2010]\n",
"\n",
" _data_rel.reset_index(inplace=True)\n",
" _data_rel['unit'] = 'relative to {}'.format(baseyear)\n",
" _df = pyam.IamDataFrame(_data_rel)\n",
" _df.set_meta(meta='1.5C limited overshoot', name='supercategory')\n",
" _df.filter(supercategory='1.5C limited overshoot', year=range(2010, 2101, 5))\\\n",
" .line_plot(color='supercategory', linewidth=0.1, fill_between=True, legend=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"ch4 = df.filter(variable='Emissions|CH4')\n",
"data.append(('Methane', ch4))"
]
},
{
Expand All @@ -179,9 +241,7 @@
"metadata": {},
"outputs": [],
"source": [
"ch4 = df.filter(variable='Emissions|CH4').timeseries()\n",
"pyam.utils.write_sheet(writer, 'CH4',\n",
" pyam.filter_by_meta(ch4, **filter_args), index=True)"
"plot_relative(ch4)"
]
},
{
Expand All @@ -191,8 +251,7 @@
"outputs": [],
"source": [
"bc = df.filter(variable='Emissions|BC')\n",
"pyam.utils.write_sheet(writer, 'Black carbon',\n",
" pyam.filter_by_meta(bc.timeseries(), **filter_args), index=True)"
"data.append(('Black carbon', bc))"
]
},
{
Expand All @@ -201,9 +260,7 @@
"metadata": {},
"outputs": [],
"source": [
"n2o = df.filter(variable='Emissions|N2O').timeseries()\n",
"pyam.utils.write_sheet(writer, 'N2O',\n",
" pyam.filter_by_meta(n2o, **filter_args), index=True)"
"plot_relative(bc)"
]
},
{
Expand All @@ -212,9 +269,9 @@
"metadata": {},
"outputs": [],
"source": [
"fgases = df.filter(variable='Emissions|F-Gases').timeseries()\n",
"pyam.utils.write_sheet(writer, 'F-Gases',\n",
" pyam.filter_by_meta(fgases, **filter_args), index=True)"
"n2o = df.filter(variable='Emissions|N2O')\n",
"n2o.convert_unit({'kt N2O/yr': ('Mt N2O/yr', 0.001)}, inplace=True)\n",
"data.append(('Nitrous oxide', n2o))"
]
},
{
Expand All @@ -223,9 +280,7 @@
"metadata": {},
"outputs": [],
"source": [
"so2 = df.filter(variable='Emissions|Sulfur').timeseries()\n",
"pyam.utils.write_sheet(writer, 'Sulfur',\n",
" pyam.filter_by_meta(so2, **filter_args), index=True)"
"plot_relative(n2o)"
]
},
{
Expand All @@ -241,6 +296,10 @@
"metadata": {},
"outputs": [],
"source": [
"writer = pd.ExcelWriter('output/spm_sr15_figure3a_data_table.xlsx')\n",
"for (name, _df) in data:\n",
" pyam.utils.write_sheet(writer, name,\n",
" pyam.filter_by_meta(_df.timeseries(), **filter_args), index=True)\n",
"writer.save()"
]
},
Expand Down
20 changes: 13 additions & 7 deletions assessment/spm_sr15_figure_3b_illustrative_pathways.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"metadata": {},
"outputs": [],
"source": [
"sr1p5 = pyam.IamDataFrame(data='../data/iamc15_scenario_data_world_r1.xlsx')"
"sr1p5 = pyam.IamDataFrame(data='../data/iamc15_scenario_data_world_r1.1.xlsx')"
]
},
{
Expand Down Expand Up @@ -160,7 +160,7 @@
"outputs": [],
"source": [
"co2 = (\n",
" df.filter(variable='Emissions|CO2', year=years)\n",
" df.filter(kyoto_ghg_2010='in range', variable='Emissions|CO2', year=years)\n",
" .convert_unit({'Mt CO2/yr': ('Gt CO2/yr', 0.001)})\n",
" .timeseries()\n",
")"
Expand All @@ -185,7 +185,7 @@
"outputs": [],
"source": [
"kyoto_ghg = (\n",
" df.filter(variable='Emissions|Kyoto Gases (SAR-GWP100)', year=years)\n",
" df.filter(kyoto_ghg_2010='in range', variable='Emissions|Kyoto Gases (SAR-GWP100)', year=years)\n",
" .convert_unit({'Mt CO2-equiv/yr': ('Gt CO2-equiv/yr', 0.001)})\n",
" .timeseries()\n",
")\n",
Expand Down Expand Up @@ -356,7 +356,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Land cover for energy crops"
"### Land cover for energy crops\n",
"\n",
"Convert unit to SI unit (million square kilometers)."
]
},
{
Expand All @@ -365,7 +367,11 @@
"metadata": {},
"outputs": [],
"source": [
"energy_crops = df.filter(variable='Land Cover|Cropland|Energy Crops', year=2050).timeseries()"
"energy_crops = (\n",
" df.filter(variable='Land Cover|Cropland|Energy Crops', year=2050)\n",
" .convert_unit({'million ha': ('million km2', 0.01)})\n",
" .timeseries()\n",
")"
]
},
{
Expand All @@ -374,7 +380,7 @@
"metadata": {},
"outputs": [],
"source": [
"stats.add(energy_crops[2050], header='Land are for energy crops (MHa)')"
"stats.add(energy_crops[2050], header='Land are for energy crops (million km2)')"
]
},
{
Expand All @@ -400,7 +406,7 @@
"outputs": [],
"source": [
"for n in species:\n",
" data = df.filter(variable='Emissions|{}|AFOLU'.format(n), year=years).timeseries()\n",
" data = df.filter(kyoto_ghg_2010='in range', variable='Emissions|{}|AFOLU'.format(n), year=years).timeseries()\n",
"\n",
" for y in compare_years:\n",
" stats.add((data[y] / data[base_year] - 1) * 100,\n",
Expand Down