diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/README.md b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/README.md
deleted file mode 100644
index 73c11a8e7..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# W2D3 - Future Climate- I P C C I I& I I I Socio- Economic Basis
-
-## Instructor notebooks
-
-| | Run | Run | View |
-| - | --- | --- | ---- |
-| Intro | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Intro.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Intro.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Intro.ipynb?flush_cache=true) |
-| Tutorial 1 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial1.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial1.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial1.ipynb?flush_cache=true) |
-| Tutorial 2 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial2.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial2.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial2.ipynb?flush_cache=true) |
-| Tutorial 3 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial3.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial3.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial3.ipynb?flush_cache=true) |
-| Tutorial 4 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial4.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial4.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial4.ipynb?flush_cache=true) |
-| Tutorial 5 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial5.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial5.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial5.ipynb?flush_cache=true) |
-| Tutorial 6 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial6.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial6.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial6.ipynb?flush_cache=true) |
-| Outro | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Outro.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Outro.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Outro.ipynb?flush_cache=true) |
-
-
-## Student notebooks
-
-| | Run | Run | View |
-| - | --- | --- | ---- |
-| Intro | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Intro.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Intro.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Intro.ipynb?flush_cache=true) |
-| Tutorial 1 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial1.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial1.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial1.ipynb?flush_cache=true) |
-| Tutorial 2 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial2.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial2.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial2.ipynb?flush_cache=true) |
-| Tutorial 3 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial3.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial3.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial3.ipynb?flush_cache=true) |
-| Tutorial 4 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial4.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial4.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial4.ipynb?flush_cache=true) |
-| Tutorial 5 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial5.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial5.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial5.ipynb?flush_cache=true) |
-| Tutorial 6 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial6.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial6.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial6.ipynb?flush_cache=true) |
-| Outro | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Outro.ipynb) | [![Open In kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://kaggle.com/kernels/welcome?src=https://raw.githubusercontent.com/neuromatch/climate-course-content/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Outro.ipynb) | [![View the notebook](https://img.shields.io/badge/render-nbviewer-orange.svg)](https://nbviewer.jupyter.org/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Outro.ipynb?flush_cache=true) |
-
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_DaySummary.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_DaySummary.ipynb
deleted file mode 100644
index b3059d2de..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_DaySummary.ipynb
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "3b83976b",
- "metadata": {},
- "source": [
- "# Day Summary"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "f2b474b6",
- "metadata": {},
- "source": [
- "This day's tutorials focused on the socioeconomic projections regarding the future of the climate emergency. The content centered around the shared socioeconomic pathways framework used by the IPCC and is more knowledge-based than skills-based compared with other days.\n",
- "\n",
- "The day began with a tutorial that summarizes the socio-economic history of growth & limits to physical growth as a parent problem within which the climate emergency arises. You explored the consequences of resource limitations in the computational part of this tutorial through the world3 model.\n",
- "\n",
- "The next tutorial dove into a formulation of the economics of climate change beginning with goal setting and then the main concepts and methods to finding optimal economic plans. You learned about the economic models used in the SSP framework, integrated assessment models (IAMs), and the modeling practice that uses them to make projections. The computational part of the tutorial first walked you through some graphical exercises that illustrate basic economic concepts before running a simple IAM (the RICE model) under various parameter settings.\n",
- "\n",
- "The third tutorial presented the SSP framework in which IAMs are used. You learned how the five SSP narratives were constructed and integrated with physical modeling efforts to define the full set of SSP pathways. You then got a glimpse of what an IAM used in this project consists of and saw the results through important metrics like energy use and greenhouse gas emissions. The computational part of the tutorial took off from a critique of the SSP framework to motivate playing with MARGO, a simple model with more, and more dynamic mitigation controls.\n",
- "\n",
- "Finally, the fourth tutorial on public opinion focussed on climate action psychology and values-based communication. The computational exercise had you analyze public sentiment through analysis of a large dataset of Twitter messages."
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.8"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Intro.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Intro.ipynb
deleted file mode 100644
index f36546955..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Intro.ipynb
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "df1a0a21",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Intro"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "6013efcc",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Overview"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "dfaee097",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Up to today, you have studied models of our climate system. Today, we will begin to model the (in many ways more complex!) system of society’s economy and how climate impacts them. "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "8f148ec9-ab3b-4819-823e-d204841638e4",
- "metadata": {},
- "source": [
- "## TODO Day Learning Objectives"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "2e6967f7-96b3-43ff-8d38-3840479a75a5",
- "metadata": {},
- "source": [
- "1. Describe the logic behind the socioeconomic pathway framework, and explain how the pathways differ from one another in both climate and socioeconomic variables using CMIP6 data and integrated assessment modeling results, respectively (building off of W2D1).\n",
- "2. Examine the strengths and weaknesses of integrated assessment modeling practice and compare models whose results are included in the IPCC reports and understand how these results impact the report’s conclusions.\n",
- "3. Examine the socioeconomic factors at the origin of anthropogenic warming and a *Just Transition*.\n",
- "\n"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Intro",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.18"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Outro.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Outro.ipynb
deleted file mode 100644
index 1c4b4fc18..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Outro.ipynb
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "175cc467",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Outro"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "2e5c1afd",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Now that you have a sense for the complexity nestled within Integrated Assessment Modeling and socioeconomic phenomena, you will look at how we try to coarse grain that complexity when applying our understanding of climate to assess extreme events and vulnerability. "
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Outro",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.18"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial1.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial1.ipynb
deleted file mode 100644
index 749e30970..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial1.ipynb
+++ /dev/null
@@ -1,469 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "25d9555a-5485-42c3-81cf-4851396a643f",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial1.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1872759b-c9e3-4d4e-a3cf-30813840b049",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 1: Orienting inside a \"Climate Solution\" Simulator\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Maximilian Puelma Touzel, Paul Heubel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a2d2b006-8493-451b-a75e-797d902a0fcd",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 30 minutes\n",
- "\n",
- "During the first week of the course, you applied computational tools to climate data (measurements, proxies, and model output) to characterize past, present, and future climate. During day one of this second week (W2D1), you began to explore climate model data from Earth System Model (ESM) simulations conducted for the recent Climate Model Intercomparison Project (CMIP6) that are presented in the report from the Intergovernmental Panel on Climate Change ([IPCC](https://www.ipcc.ch/)). However, the dominant source of uncertainty in those projections arises from how human society responds: e.g. how our emissions reduction and renewable energy technologies develop, how coherent our global politics are, how our consumption grows (cf. [Rogelj et al. (2018)(Global Warming of 1.5°C. An IPCC Special Report \\[...\\])](https://doi.org/10.1017/9781009157940.004)). For these reasons, in addition to understanding the physical basis of the climate variations projected by these models, it's also important to assess the current and future socioeconomic impact of climate change and what aspects of human activity are driving emissions.\n",
- "\n",
- "This day's tutorials focus on the socioeconomic projections regarding the future of climate change and are centered around the Shared Socioeconomic Pathways (SSP) framework used by the IPCC. However, in this first tutorial, you will use the [En-ROADS](https://www.climateinteractive.org/en-roads/) simulator to get some intuition about different socioeconomic variables and their consequences for climate. Additionally, you will analyze potential economic and population scenarios to learn about the complex and intertwined dynamics of socioeconomic variables, as well as how this model informs modern-day climate challenges.\n",
- "\n",
- "Unlike the rest of the days of this course, this day will be highly conceptual and discussion-driven, and focus much less on analyzing datasets.\n",
- "\n",
- "In this tutorial, you will:\n",
- "- Get familiar with the interface of the simulator named En-ROADS\n",
- "- Explore the impact of different growth variables on the temperature increase by 2100 projected from the En-ROADS model.\n",
- "- Understand why it is necessary to implement various actions against climate change, not a single one.\n",
- "- Explore the assumptions and limitations of this model"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "368d0c90-ae7e-43d9-ada7-ad42c75f5f95",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "6db786f8-e5c4-42a9-9837-e41027b9ad4d",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "e11e3bbb-ce8f-4404-8d04-b6f86d4a9ea9",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "ea9d553f-c3eb-4723-a922-e81f97e1e3ba",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Orienting inside a 'Climate Solution' Simulator\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "video_ids = [('Youtube', 'g5VRHCcIyxk'),\n",
- " #('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "52ca5582-816c-423c-9ed7-cda1c7319731",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"mtyrb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "57265af6-b3ab-41e4-82a1-6c4b63a0c321",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Exploration of a Climate Solution Simulator"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "042a83d3-2e94-4092-a289-2430d349966c",
- "metadata": {
- "execution": {}
- },
- "source": [
- "The following introductory video gives a quick overview of the En-ROADS simulator, a simple climate model (SCM), developed by [Climate-Interactive](https://www.climateinteractive.org/) for teaching purposes. It is used in policy workshops, role-plays, and other activities to explore the possibilities and obstacles of scenarios and human solutions to climate change.\n",
- "\n",
- "To get familiar with modeling societal and economic mechanisms in combination with climatic variables, the so-called **socio-economic model**, you will examine its 'control knobs', limitations, and assumptions. In later tutorials you will compare these findings with those of Integrated Assessment Models (IAMs) which are state-of-the-art models for projecting scenarios and those used in the socioeconomic pathways of the IPCC."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "9c6b2260-bdb0-4d7b-a07d-41551d5ccf92",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 2: Overview of the En-ROADS Climate Solutions Simulator\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', 'Py_qIgcZxKg')\n",
- " # , ('Bilibili', 'BV1bj411Z739')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "718606a5-1239-414b-84fc-f9c0a18924d6",
- "metadata": {
- "execution": {}
- },
- "source": [
- "### Exercise 1: Can you limit human-caused global warming to \"well-below 2ºC\"?\n",
- "*Estimated timing:* 20 minutes\n",
- "\n",
- "We jump right in with an exercise, adapted from [En-ROADS](https://www.climateinteractive.org/guided-assignment/), that allows you to explore the Climate Solution Simulator.\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- "\n",
- "2. **Develop a scenario**: By moving the sliders, find a scenario (i.e. a combination of slider positions of different variables) that results in *less than 2°C* of temperature increase by the end of the century. Don't worry if you don't find a scenario that works right away - keep exploring. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) to help you get started. Have fun!\n",
- "\n",
- "3. **Answer the following questions**:\n",
- "\n",
- "* How many variables did you have to adjust to reach the \"well-below 2ºC\" target?\n",
- "* Which variables had the most individual impact? Did the magnitude of impact surprise you for any variables?\n",
- "* How feasible is this scenario? That is, what actions would have to be taken by governments, businesses and people over the next few years to make the proposed scenario possible?\n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "30a81fb8-c21b-490c-9297-a6705f114957",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "\n",
- "'''\n",
- "3. One scenario to try based on the goals of the energy transition is the combination of:\n",
- "(1) full electrification of the energy supply, i.e. 'very highly taxed' fossil fuel emissions (Coal, Natural gas, and Oil),\n",
- "(2) 'highly subsidized' renewables, and\n",
- "(3) a 'very high' carbon price,\n",
- "as well as the 'highly reduced' emissions of Methane and other Gases\n",
- "which gets us to a maximum increase of 2°C by the end of the century\n",
- "(cf. this example scenario https://en-roads.climateinteractive.org/scenario.html?v=24.3.0&p1=100&p7=85&p10=5&p16=-0.05&p23=-1&p39=250&p59=-64&p67=2&g0=2&g1=62).\n",
- "\n",
- "Nevertheless, other scenarios are possible, either by involving more parameters or by focusing on carbon removal.\n",
- "There are (at least!) two important observations to make. First, actions vary in leverage, in other words, some actions are more helpful than others.\n",
- "Second, to make a difference and reach an ambitious goal like the 2°C degree target, many actions in many sectors are required.\n",
- "Sometimes one refers to this circumstance by calling it a 'Silver Buckshot' instead of a 'Silver Bullet' approach (cf. e.g. https://www.washingtonpost.com/archive/opinions/2006/05/27/welcome-to-the-climate-crisis-span-classbankheadhow-to-tell-whether-a-candidate-is-serious-about-combating-global-warmingspan/26b2ac5a-a4a3-46ff-b214-3fc07a3a5ab3/).\n",
- "Furthermore, people might be surprised by the fact that some actions may be much lower leverage, while others like carbon pricing and energy efficiency might be higher leverage than people expect.\n",
- "'''"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "05df13b5-14ce-4515-aaae-7cc9e3765445",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "#link_id = \"gwr8h\"\n",
- "\n",
- "download_link = f\"https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf\"\n",
- "render_link = f\"https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download a cheatsheet for the En-ROADS Control Panel:\\n{download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1f5a0c7f-8fd3-4c89-b25d-8070ef2fdd4b",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 2: Limitations of the En-ROADS Model Approach\n",
- "\n",
- "We conclude this tutorial by stepping back and discussing the limitations of En-ROADS.\n",
- "\n",
- "### Exercise 2: Limitations\n",
- "*Estimated timing:* 5 minutes\n",
- "\n",
- "1. Think about limitations that arise from the En-ROADS model approach. List a few mechanisms that seem oversimplified or phenomena that might be not or misrepresented. Discuss with your pod.\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "b17595a7-b326-4edb-9f80-b8e21f1d4e5e",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "\n",
- "'''\n",
- "1. At first, En-ROADS is a world model, not an optimal planning model so it is unlike any IAM used e.g. for the IPCC reports.\n",
- "Controls are somewhat limited (DAC/CCS, soil, BioChar, and mineralization are not covered).\n",
- "It allows only for single parameter changes - in reality, there will be correlations, e.g. between carbon pricing and renewables due to market pressure.\n",
- "Some feedbacks are also missing, besides the above-mentioned damage from climate change on GDP, land use, etc.,\n",
- "climate change harms the human population by shortening lives.\n",
- "Although this happens already in the current 1°C increase reality, this harm is difficult to quantify and hence not implemented.\n",
- "Furthermore, it is a fully aggregated model, no spatial/regional or income resolution, and corresponding interdependency exists.\n",
- "An action/ policy is assumed to be executed globally, which is a utopia so far.\n",
- "It hence remains important to consider the implications of heterogeneity across different countries and their interactions.\n",
- "Last but not least, tipping points such as the thawing of the permafrost are represented in a very simplified manner only, although they probably have strong implications.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "51aac287-f6d0-479e-be4b-87f557c32214",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this tutorial, you got an intuition for various 'control knobs' that can be turned in a socio-economic model environment. We discussed why no policy alone can be a silver bullet to solve all problems but a mixture of many actions, in particular, the energy transition to renewables and carbon pricing. At last, we discussed a few limitations of the En-ROADs model approach."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1c949bc5-e5ef-4d07-b379-122072ef6271",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial1",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial2.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial2.ipynb
deleted file mode 100644
index b3219f7bc..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial2.ipynb
+++ /dev/null
@@ -1,508 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "873927b3-ad55-40a2-ab6a-de2af3c09cc8",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial2.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "8eb286c6-dd69-440b-bc14-e6c7f20517bf",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 2: Fossil Fuel Emissions, Growth, and Damage\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "d86fc935-8b60-4fcf-83d7-1e9c78ca6b84",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 30 minutes\n",
- "\n",
- "This tutorial explores the impact of population and economic growth on the global temperature and how a changing climate due to fossil fuel emissions damages our economy. You model these scenarios by 'controlling the knobs' of the Climate Solution Simulator named [En-ROADS](https://www.climateinteractive.org/en-roads/).\n",
- "\n",
- "After finishing this tutorial you can\n",
- "\n",
- "* discuss the impact of a growth-based economy on future fossil-fuel emissions along the Kaya identity\n",
- "* qualitatively describe the impact of population and economic growth on the global temperature within the En-ROADS model environment.\n",
- "* (explain qualitatively how a different damage function formulation impacts the economic activity)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "8dc93386-4bde-4e22-b7eb-174133f57351",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "f9398705-5441-4ed3-980d-c6339cb30696",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "3342114d-deee-4d5b-afde-d4852bac2352",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "2ca0746a-edad-45f7-8ad5-1b4ec1e7c546",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Orienting in a 'Climate Solution' Simulator\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', 'g5VRHCcIyxk'),\n",
- " #('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "5d45c633-1daa-4408-ab8c-18969fff8bde",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"mtyrb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "4cb055f0-0f58-4c8c-9e11-a7a16f0b6e98",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Quantification of Fossil Fuel Emissions and Its Dependency on Growth\n",
- "\n",
- "We discussed in the slides how economics represents the human population as a source of labor needed to produce goods and services. A by-product of this production are fossil fuel emissions, which increase atmospheric greenhouse gas (GHG) concentrations, significantly changing the earth's climate. Let us take a look at the relationship between people, production, and emissions in more detail using the En-ROADS simulator.\n",
- "\n",
- "You might already have clicked through the toggles at the top of the control panel of En-ROADS and tried the different *Views* (Main graphs, Kaya graphs, Miniature graphs). Select now the **Kaya graphs** view and reset the simulator (click on the anti-clockwise circular arrow to 'Reset all policies & assumptions' or just reload the page/model [here](https://en-roads.climateinteractive.org/)).\n",
- "\n",
- "The Kaya graphs depict four drivers of growth in carbon dioxide emissions from energy use, which reflects about two-thirds of all greenhouse gas emissions (the remaining third of emissions are from land use changes and other gases, such as methane (CH4) and nitrous oxide (N2O), which are not considered here). The corresponding equation, the so-called [***Kaya identity***](https://en.wikipedia.org/wiki/Kaya_identity) below was developed by Yoichi Kaya:\n",
- "\n",
- "***CO$_2$ Emissions from Energy = Global Population × GDP per Capita × Energy Intensity of GDP × Carbon Intensity of Energy***\n",
- "\n",
- "Where [gross domestic product](https://en.wikipedia.org/wiki/Gross_domestic_product) (GDP) is a measure of economic activity or health. \n",
- "\n",
- "In a more mathematical form, this equation is\n",
- "\n",
- "$$\n",
- "F = P \\times \\left[\\frac{G}{P}\\right] \\times \\left[\\frac{E}{G}\\right] \\times \\left[\\frac{F}{E}\\right]\n",
- "$$\n",
- " - $F$ (CO$_2$ emissions from energy), \n",
- " - $P$ (global population), \n",
- " - $G$ (world GDP), and \n",
- " - $E$ (global energy consumption).\n",
- "\n",
- "Decomposing emissions in this way helps to see key contributions and, if we assume that the factors are independent of each other (which is not fully true), distinct ways that we can lower emissions. Each factor in this model is important and extreme reductions in one can offset increases in the others. In our case, our emissions $F$ are increasing over time because the Energy Intensity of GDP $\\left[\\frac{E}{G}\\right] $ and the Carbon Intensity of Energy do not together offset enough of our growing GDP ($G$), which is by definition necessary for a growth-based economy.\n",
- "\n",
- "The first four graphs in the Kaya view display these four variables $\\left(P, \\frac{G}{P}, \\frac{E}{G}, \\frac{F}{E}\\right)$, with the fifth plot showing Emissions, $F$. This allows us to compare the importance of, say, economic and population growth on the CO$_2$ emissions and subsequent temperature rise by 2100."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "fd232a4d-c350-4e7b-9519-921800d81e20",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Exercise 1: Population vs. Economic Growth\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- "\n",
- "2. **Develop a scenario**: Turn two *growth* 'control knobs' of En-ROADS, which are the sliders *Economical growth* and *Population growth*. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) if needed. \n",
- "\n",
- "3. **Answer the following questions**:\n",
- "\n",
- "* What can you observe within the *Kaya graph* view? Describe the graphs and interpret them.\n",
- "\n",
- "Read the following dropdown accessible box if you need more information to interpret the Kaya graphs. \n",
- "\n",
- "*Be warned that a reset of all your previous changes might be necessary before. If you would like to save your previous scenario, export it via a click on the* ***Share your scenario*** *button in the top right of the Panel, and select 'Copy Scenario Link'*.\n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1c61eb29-ab14-4445-915e-5d39abab9a73",
- "metadata": {
- "execution": {}
- },
- "source": [
- "\n",
- " Click here for a description of the Kaya identity and the corresponding plots \n",
- "\n",
- "Here is one way to understand the shown trends over time:\n",
- "\n",
- "The Global Population ($P$) of 8 billion people is growing and growth is anticipated to be 11 billion by the end of the century, according to UN projections. The rate of growth is slowing over time as people have smaller families.\n",
- "\n",
- "GDP ($G$) per Capita ($P$) is growing steadily per year, and the model assumes this will continue, mostly as people in rapidly developing countries such as China, India, South Africa, Mexico, Brazil, and Indonesia attain higher standards of living.\n",
- "\n",
- "Energy Intensity ($E$) of GDP is decreasing over time, due to the world economy becoming more efficient, or using less energy per unit of economic output. Technologies are improving - for example, more efficient cars, buildings, and machines—and economies are shifting from manufacturing to services. The product of global population, GDP per capita, and the energy intensity of GDP is the total amount of energy used by the global economy.\n",
- "\n",
- "Carbon Intensity of Final Energy, the amount of carbon dioxide emitted by energy use, is expected to slightly decline over time. Overall, this downward trend in carbon intensity is attributed to the gradual shifting away from fossil fuels and towards low-carbon energy sources.\n",
- "\n",
- "Carbon Dioxide Emissions from Energy are the result of all four factors multiplied together, and you can see that in the Baseline Scenario emissions are growing. As the level of carbon dioxide in the atmosphere correlates with temperature, an increased concentration of carbon dioxide in the atmosphere leads to an increase in global temperatures.\n",
- "\n",
- "These factors explain, in simple terms, why emissions are increasing in the Baseline Scenario. Improvements in efficiency and decarbonization are not yet keeping up with the strong growth in population and consumption\n",
- " \n",
- "*** \n",
- " \n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "id": "e242d987-4e3a-418b-b69c-65fe25e35ed7",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Questions 1:\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "Before using the sliders and answering the following questions, build a brief working hypothesis. Which one of the two 'growth knobs' do you expect will be more influential on the global mean temperature and also how much more? \n",
- "\n",
- "1. What do you observe, when you only change the population growth slider? And vice versa changing only the economic growth slider? \n",
- "2. Combine the effect of both sliders in the common and opposite direction, respectively. Are you surprised about the output?"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "d88106d5-3008-47fe-ab29-9e09a539b369",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "'''\n",
- "1. In En-ROADS the population growth has a small effect on the temperature increase by 2100. On the left, the global population graph emphasizes the development until 2100, resulting in an expected population of 8.8 billion in the lowest growth case and an expected population of 12.56 billion in the largest growth case, respectively.\n",
- "The former leads to a 3.2°C increase and the latter to a 3.5°C which is only a $\\pm$ 0.2°C change due to population growth.\n",
- "In contrast, economic growth has a much larger impact: high growth (+30.000 $/person/year in 2100) leads to a temperature increase of 0.4°C by 2100 and low growth (-20.000 $/person/year in 2100) decreases it by 0.3°C, making discussions of overpopulation rather irrelevant as the decisions around family choice are personal decisions and efforts to shift these decisions have many ethical implications.\n",
- "It is instead raising the question of the necessity to end economic growth or at least to discuss its current coupling to resource exploitation.\n",
- "Note that lower population growth takes a long time to affect emissions because global population shifts do not occur quickly and instead play out over many decades.\n",
- "\n",
- "2. All possible combinations of pop.-econ. -- low-low: 2.9°C, low-no: 3.2°C, low-high: 3.6°C, no-no: 3.3°C, no-low: 3.0°C, no-high: 3.7°C, high-low: 3.1°C, high-no: 3.5°C, high-high: 4.0°C.\n",
- "In terms of an anticipated minimal temperature increase, the best (worst) case is to have a low (high) growth in population and economy. It is better to have a decreasing economy and a growing population than vice versa (increasing economy + shrinking population).\n",
- "Having high population growth and economic growth add up to a larger temperature increase (+0.7°C) than their individual contribution (high pop. growth +0.2°C, high econ. growth +0.4°C) which indicates that these variables are not fully independent in the En-ROADS model.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a92f9886-6e3c-45f2-b6e1-a7f036af03b2",
- "metadata": {
- "execution": {}
- },
- "source": [
- "\n",
- " Click here for a bonus digression on the Limits To Growth \n",
- " \n",
- "### Bonus: A note on exponential growth in a bounded system \n",
- "Consider a bounded system undergoing only positive feedback leading to exponential growth. The characteristic duration of growth until the system state reaches the system boundary is only weakly sensitive to the size of the boundary. For example, in the context of exponential resource-driven economic growth on Earth, reaching the boundary means exhausting its accessible physical resources. Ten times more or less of the starting amount of accessible resources only changes the time at which those resources are exhausted by a factor of 2 up or down, respectively. \n",
- "\n",
- "Physics demands that behind the exponential extraction of resources is an exponential use of an energy resource. In recent times on Earth, this has been fossil fuels, which are non-renewable. Legitimate concerns of peak oil in the late 1990s were quelled by the Shale revolution in the United States and other technological advances in oil and gas exploration and exploitation. These have increased (by a factor between 2 and 4) the total amount of known reserves that can be profitably exploited. While this increase is significant on an linear scale, it is negligible on an exponential scale. Looking forward, the largest estimates for how much larger accessible oil and gas reserves will be are within an order of magnitude of current reserves. Presuming resource-driven growth economics continues, whatever accessible oil and gass is left will then be exhausted within a short period of time (e.g. within a century). \n",
- "\n",
- "Exponential growth in a bounded system will often slow as it reaches the boundary because of boundary-sized feedback effects. In our case, demand growth for fossil fuels is starting to slow with the development of renewable energy sources. There still substantial uncertainty about how these feedbacks will play out. Some questions to consider: \n",
- "- whether the transition to renewable energy sources can happen before we exhaust the associated non-renewable resources. \n",
- "- Once transitioned, whether the non-renewable resource use (e.g. of rare-earth metals) needed to sustain the renewable energy sector is sustainable in a growth-based economics\n",
- "- Once transitioned, whether this renewable energy resource might not slow, but instead accelerate the extraction of all non-renewable resources (see [Jevon's paradox](https://en.wikipedia.org/wiki/Jevons_paradox)). \n",
- "\n",
- "*** \n",
- " \n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "id": "98a285b1-48e1-4c90-9789-584d80231449",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Bonus Section 2: The Economic Impact of Climate Change\n",
- "\n",
- "In the previous day's tutorials, you learned how increases in atmospheric greenhouse gas (GHG) concentrations significantly alter Earth's climate and examined the impacts of these emissions on variables such as sea-surface temperature and oxygen. These changes in climate variables can, in turn, impact the economy. For example, increased temperatures may reduce crop yields or soften road surfaces requiring more frequent or intense repairs.\n",
- "\n",
- "## Bonus Question 2:\n",
- "\n",
- "1. Take a minute to think of some other possible ways in which climate change can affect the economy. Then discuss with your pod."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "920f3d23-5eb9-4f4b-9c43-86e5cbad02b9",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "'''\n",
- "Other potential examples are human health, extreme weather events, sea-level rise, desertification, flooding, species migration.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c78b63df-8bc2-4e0c-898f-a926fce03e4d",
- "metadata": {
- "execution": {}
- },
- "source": [
- "These economic impacts on climate change are considered *economic damage* as they typically result in less or slower economic growth. Economists incorporate the impacts of climate change on the economy into models through a **damage function**, which usually represents climate change by an increase in global temperature, and the impact on the economy as a reduction in [gross domestic product](https://en.wikipedia.org/wiki/Gross_domestic_product) (GDP).\n",
- "\n",
- "You can dive deeper into the control knob functionalities of En-ROADS by changing the quantification of how climate change damages the economy via a reduction in GDP. To have a closer look at the assumptions that go into the model, we click on the 'Simulation' toggle and select 'Assumptions', in the bottom a box of toggles appears. Here we choose the 'Economy' section and click on 'Economic impact of climate change'.\n",
- "\n",
- "### Bonus Exercise 2: Choose a Damage function\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "In this section, 3 dropdowns correspond to 3 assumptions: (1) whether or not climate change slows economic growth, (2) if yes, how strongly as a function of temperature (what is the damage function), and (3) by how much do we discount far future welfare relative to current welfare. \n",
- "\n",
- "1. Hypothesize which parameter needs to be changed to have a less severe damage function.\n",
- "\n",
- "2. Decide which 'related graph' shall be shown on the top left and explain your hypothesis and final choice of the parameter along it.\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "f1055ced-d99b-4c9f-b4e7-fe7176cc58bc",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "'''\n",
- "1. There are two options. We could change one boring parameter and a more exciting one.\n",
- "The former has a strong impact. By turning off the 'Climate change slows economic growth' button, we make the strong assumption that there is less severe damage as asked because there is NO damage at all.\n",
- "In other words, we decoupled GDP and temperature increase which results in even more GHG emissions than in the baseline scenario.\n",
- "To get a more relevant and exciting result, it is better to change the 'Economic damage formulation' instead.\n",
- "\n",
- "2. The default formulation by 'Burke 2018' serves as the baseline.\n",
- "In order to have a less severe damage formulation we could have a look at the 'Reduction in GDP vs. Temperature' plot.\n",
- "However, all other formulations show a more or equal severe damage function than 'Burke 2018' with respect to temperature.\n",
- "Another view, i.e. the 'Gross World Product' in contrast shows that the 'Howard & Sterner' formulation results in less economic damage,\n",
- "which might have been covered in the 'Reduction in GDP vs. Temperature' graph as the scale was going up to 5°C,\n",
- "which we do not reach until 2100 in our simple baseline-like scenario.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "8a3c2b15-e9a4-45df-806e-82efafeb6fe5",
- "metadata": {
- "execution": {}
- },
- "source": [
- "With this, we already discussed a few damage functions in En-Roads. Although they are central to the climate-economy connection of the models, their formulation is relatively ad hoc, which leads to validity issues that are often criticized. \n",
- "\n",
- "There are at least two fundamental problems with damage functions (for more see [*The appallingly bad neoclassical economics of climate change* by S. Keen in *Globalizations* (2020)](https://www.tandfonline.com/doi/full/10.1080/14747731.2020.1807856)):\n",
- "1. As mathematical model objects, they are likely too simple to be useful predictors in characterizing climate damages in sufficient complexity. \n",
- "2. They arise from a poorly validated model-fitting procedure. In particular, it relies on ad hoc functional forms and the relevance of historical and geographical variability to future variability.\n",
- "\n",
- "Despite these problems, damage functions allow economists within the neoclassical paradigm to start seriously considering the damaging effects of climate change."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c688a40e-7c50-45a5-b95e-b66dcd939b99",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this tutorial, we discussed the impact of growth on fossil fuel emissions, in particular population growth vs. economic growth, and its treatment by the world model En-ROADS. Last but not least we introduced the important concept of the damage function to connect climate and economy within a model."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "ad0144cc-224a-4422-a098-18eb1481c841",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial2",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial3.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial3.ipynb
deleted file mode 100644
index d66ef1b15..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial3.ipynb
+++ /dev/null
@@ -1,338 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "ed664fc2",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial3.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "53e42e1c",
- "metadata": {
- "execution": {},
- "vscode": {
- "languageId": "plaintext"
- }
- },
- "source": [
- "# Tutorial 3: The Temporal Dimension of Actions\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "87ef2f44-fb74-4664-8472-4c97158a8d17",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial Objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 15 minutes\n",
- "\n",
- "The last tutorials covered the necessity for an energy transition to tackle the climate emergency and many solutions at once. As emissions accumulate, it becomes substantially harder to succeed the longer we take to make big changes. This tutorial explores the temporal dimension of action, here policies, by using the Climate Solution Simulator named [En-ROADS](https://www.climateinteractive.org/en-roads/).\n",
- "\n",
- "After finishing this tutorial you can\n",
- "\n",
- "* exemplify along the carbon price, why policy-making has to consider the temporal dimension and the needs of the most vulnerable parts of society"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "062c4b1a-6239-4644-a0dd-03fe1342fe99",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "8b4722fe-cbd5-484a-be6d-96ed7aafbf62",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "053ee0ea-d704-45c8-8b4b-aad17216710d",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "5b50c362",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: The IPCC's Transition Narratives and Project Modelling\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', 'g5VRHCcIyxk'),\n",
- " #('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "703ee8f2",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"mtyrb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "29cf9a43-2478-4d14-9faf-193e54378a04",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: When and How Do You Introduce a Carbon Price?\n",
- "\n",
- "You might have recognized that a high ***carbon price*** by default has a strong impact on the temperature increase within the En-ROADS model as it both reduces the carbon intensity of the energy supply and reduces the energy demand. However, the carbon price itself could be introduced now or in 50 years and at different amounts, depending on for example the social cost of such a policy, which makes energy supply more expensive depending on its emissions. Energy producers could pass additional costs to their customers, so policy could be designed to minimize the impacts on the poorest, e.g. by introducing a [Carbon fee and dividend](https://en.wikipedia.org/wiki/Carbon_fee_and_dividend). \n",
- "\n",
- "To account for their temporal evolution, many variables in En-ROADS allow for modifications of the timing when something is introduced, stopped, in or de-creased, and so on."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "d29fb31c-84ab-4705-8678-87f8274f6500",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Exercise 1: Implications of Actions and Their Timing\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- " \n",
- "2. **Develop a scenario**: Click on the ellipsis of the 'Carbon price' slider, and a widget-info box opens that allows for finetuning of your carbon price policy.\n",
- " 1. Click on the title of the top right graph *Greenhouse Gas Net Emissions*, select the 'Financial' toggle, and select the 'Market price of electricity'.\n",
- " 2. Turn the most upper knobs/ vary the sliders of the 'Carbon price' and slide through different carbon prices.\n",
- " 3. Move the sliders to answer the following question. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) if needed.\n",
- "\n",
- "\n",
- "3. **Answer the following questions**:\n",
- " * What do you observe in the 'Market price of electricity' graph after varying the carbon price?\n",
- " * Now, select a high carbon price and increase the 'Year the carbon price starts to phase in'. How does the carbon price change the temporal evolution of the 'Market price of electricity'. \n",
- " * How could this be of consequence for a low-income household?\n",
- "\n",
- "*Be warned that a reset of all your previous changes might be necessary before. If you would like to save your previous scenario, export it via a click on the* ***Share your scenario*** *button in the top right of the Panel, and select 'Copy Scenario Link'*.\n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "c97e6d3d-1718-479b-a19a-ffc6a082347b",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "\n",
- "'''\n",
- "3. The earlier the carbon price starts to phase in the more effective it is regarding the temperature increase.\n",
- "However, the earlier the larger the disturbance of the market price of electricity, emphasized by a strong increase in the price at first\n",
- "and a strong drop in the price after the first few years.\n",
- "This might lead to economic disruptions as energy supply becomes very expensive, therefore low-income households,\n",
- "which usually spend large parts of their income on energy, would need compensation like a 'carbon dividend' to avoid precariat.\n",
- "In summary, actions and their temporal implementation always need to be evaluated in various aspects to be a successful and\n",
- "societal least disruptive action against climate change.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "3562deb9",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this tutorial, we discussed the temporal dimension of the carbon price implementation in order to understand why no policy might be a silver bullet to solve all problems but comes with various ethical and political implications. At last, we discussed a few limitations of the En-ROADs model approach."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "6d0c2c37-0e64-4734-8776-1f455a20987f",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "27636b92",
- "metadata": {
- "execution": {}
- },
- "source": [
- ""
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial3",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial4.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial4.ipynb
deleted file mode 100644
index 417f5abdc..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial4.ipynb
+++ /dev/null
@@ -1,773 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial4.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 4: The Shared Socio-economic Pathways\n",
- "\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial Objectives\n",
- "\n",
- "In this tutorial, you will learn about Integrated Assessment Models (IAMs), a class of models that combine climatology, economics, and social science, reflecting the intertwined nature of these domains in addressing climate change. Based on these models the IPCC established the socioeconomic pathway framework. You are going to learn how these pathways differ from one another in both climate and socioeconomic variables as well as assumptions.\n",
- "\n",
- "After finishing this tutorial, you will know how to \n",
- "\n",
- "- filter data series of interest from a rich `pandas` data frame that contains various variables for different SSPs,\n",
- "- tell what the abbreviation SPA stands for,\n",
- "- explain the differences and similarities of the SSP1-26 and SSP5-85, and \n",
- "- sketch the modeling approach of IAMs."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Setup"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# installations ( uncomment and run this cell ONLY when using google colab or kaggle )"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {},
- "executionInfo": {
- "elapsed": 1460,
- "status": "ok",
- "timestamp": 1682429063027,
- "user": {
- "displayName": "Maximilian Puelma Touzel",
- "userId": "09308600515315501700"
- },
- "user_tz": 240
- },
- "tags": []
- },
- "outputs": [],
- "source": [
- "# imports\n",
- "import warnings\n",
- "warnings.simplefilter(action='ignore', category=FutureWarning)\n",
- "import seaborn as sns\n",
- "import matplotlib.pyplot as plt\n",
- "import pandas as pd\n",
- "import numpy as np\n",
- "import pooch\n",
- "import os\n",
- "import tempfile"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "code_folding": [
- 0
- ],
- "execution": {},
- "tags": []
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file\n",
- "\n",
- "\n",
- "def legend_without_duplicate_labels(ax):\n",
- " handles, labels = ax.get_legend_handles_labels()\n",
- " unique = [(h, l) for i, (h, l) in enumerate(zip(handles, labels)) if l not in labels[:i]]\n",
- " ax.legend(*zip(*unique))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {},
- "tags": []
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Transition Goals and Integrated Assessment Models\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "# TODO add Bilibili link\n",
- "video_ids = [('Youtube', 'TqpPDz2kfWc'),\n",
- " # ('Bilibili', '')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {},
- "pycharm": {
- "name": "#%%\n"
- },
- "tags": [
- "remove-input"
- ]
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "# TODO update\n",
- "link_id = \"ujprw\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Shared Socio-economic Pathways"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {},
- "jp-MarkdownHeadingCollapsed": true
- },
- "source": [
- "In this, and subsequent, tutorials, you will explore Integrated Assessment Models (IAMs) which are the standard class of models used to make climate change projections. IAMs couple a climate model with an economic model, allowing us to evaluate the two-way coupling between economic productivity and climate change severity. IAMs can also account for changes that result from mitigation efforts, which lessen anthropogenic emissions.\n",
- "\n",
- "Let's start by investigating some IAM model output.\n",
- "\n",
- "The simulations are labeled by both the Shared Socioeconomic Pathway (SSP1, SSP2, SSP3, SSP4, and SSP5) and the forcing level (greenhouse gas forcing of 2.6, 7.0, 8.5 W/m2 etc. by 2100).\n",
- "The 5 SSPS are: \n",
- "- SSP1: Sustainability (Taking the Green Road)\n",
- "- SSP2: Middle of the Road\n",
- "- SSP3: Regional Rivalry (A Rocky Road)\n",
- "- SSP4: Inequality (A Road divided)\n",
- "- SSP5: Fossil-fueled Development (Taking the Highway)\n",
- "\n",
- "We select two SSPs to exemplify how these scenarios differ from each other. \n",
- "To get a strong contrast, we select SSP1 and SSP5. \n",
- "\n",
- "Let's load the data and describe their features along a few plots.\n",
- "\n",
- "Like in other tutorials, we provide a `.csv` file that is stored in the cloud and was downloaded beforehand from [this IIASA database](https://tntcat.iiasa.ac.at/SspDb/dsd), where all data from the main simulations of the IAMs used in the [IPCC reports](https://www.ipcc.ch/reports/) is freely available."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# Load SSP data from .csv file\n",
- "filename_SSPs = 'SSP_IAM_V2_201811.csv'\n",
- "link_id = \"2uwr4\"\n",
- "url_SSPs = f\"https://osf.io/download/{link_id}/\"\n",
- "\n",
- "df = pd.read_csv(pooch_load(url_SSPs, filename_SSPs))\n",
- "# get a summary of the resulting pandas dataframe\n",
- "df.info()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "We further explore our data frame by printing categories that are used to tag the numeric data."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "print(df.SCENARIO.unique()) # print all scenarios\n",
- "print(df.VARIABLE.unique()[:10]) # print the first 10 variables\n",
- "print(df.REGION.unique()) # print all regions\n",
- "print(df.MODEL.unique()) # print all IAMs\n",
- "print(df.UNIT.unique()) # print all units"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "This file contains much data we are not interested in at the moment. To filter our example scenarios, region, and variables, we use the convenient [`.query()`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html) method from `pandas`. The `VARIABLE`s of interest are those we already touched on in Tutorials 1 to 3: \n",
- "\n",
- "- **economic growth** (`'GDP|PPP'`),\n",
- "- **energy use** (`'Primary Energy'`),\n",
- "- **emissions** (`'Emissions|Kyoto Gases'`),\n",
- "- and **forcing** (`'Diagnostics|MAGICC6|Forcing'`).\n",
- "\n",
- "- As a `REGION`, we choose the `'World'`,\n",
- "- and our `SCENARIO`s are called `'SSP1-26'` and `'SSP5-85'`.\n",
- "- The model of choice for the former scenario is by convention `'IMAGE'` and `'REMIND-MAGPIE'` for the latter, respectively.\n",
- "\n",
- "A function named `get_SSPs_for_variable()` applies all this generally and is hidden in the next cell. Please execute it, such that the subsequent cells can make use of it. If you are interested in its procedure and want to adjust it, don't forget to save a copy beforehand."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown *Execute this cell to enable the dataframe filter function: `get_SSPs_for_variable`*\n",
- "\n",
- "def get_SSPs_for_variable(df,scenario,variable,region='World'):\n",
- " '''\n",
- "\n",
- " Function that filters IIASA's SSP database that is stored in a data frame 'df'\n",
- " and was loaded before from the 'SSP_IAM_V2_201811.csv' file.\n",
- " It returns a data frame with selected columns depending on scenario, variable and region input.\n",
- " For a given SSP scenario it chooses the conventional model for the respective scenario\n",
- " (cf. https://tntcat.iiasa.ac.at/SspDb/dsd?Action=htmlpage&page=about#v2).\n",
- "\n",
- " Args:\n",
- " scenario: string in \"SSPX-XX\" with X=1,...,5\n",
- " variable: string in df.VARIABLE, e.g. 'Population' or 'GDP|PPP'\n",
- "\n",
- " Returns:\n",
- " SSP data for selected columns for a given SSP scenario\n",
- "\n",
- " Example:\n",
- " dd = get_SSPs_for_variable(df,'SSP1-26','Population')\n",
- "\n",
- " '''\n",
- " ssp_model_conv = {\"SSP1-Baseline\" : \"IMAGE\",\n",
- " \"SSP1-26\" : \"IMAGE\",\n",
- " \"SSP2-Baseline\" : \"MESSAGE-GLOBIOM\",\n",
- " \"SSP3-Baseline\" : \"AIM/CGE\",\n",
- " \"SSP4-Baseline\" : \"GCAM4\",\n",
- " \"SSP5-Baseline\" : \"REMIND-MAGPIE\"}\n",
- " model = ssp_model_conv[scenario]\n",
- " ds = df.query(\n",
- " f'(VARIABLE == \"{variable}\") & (SCENARIO == \"{scenario}\") & (MODEL == \"{model}\") & (REGION == \"{region}\")'\n",
- ")\n",
- " return ds"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Let's plot our variables of interest and compare the respective features of the scenarios."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# put variables of interest in a list\n",
- "vars = ['GDP|PPP','Emissions|Kyoto Gases', 'Primary Energy','Diagnostics|MAGICC6|Forcing']\n",
- "# create new names for structured data series and axes labels\n",
- "val_name = ['GDP (billion US$/yr)', 'Emissions (Mt CO$_2$/yr)', 'Energy use (EJ/yr)', 'Forcing (W/m$^2$)']\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,2)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich data frame\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0,0].legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "The projections in the plots you just created show changes in **GDP** (billion US\\$/yr), **fossil fuel emissions** (Mt CO$_2$/yr), **energy use** (EJ/yr), and **forcing** (W/m$^2$) across the two very different scenarios SSP1 and SSP5, computed at their baseline forcing level, which are each represented by a distinct color in each plot.\n",
- "\n",
- "Our plots show that the SSP5-Baseline scenario exhibits very high levels of energy use, and emissions (due to fossil fuel exploitation), it marks the upper end of the scenarios in several dimensions (cf. [Kriegler et al. (2014)](https://doi.org/10.1016/j.gloenvcha.2016.05.015)). \n",
- "\n",
- "The SSP1-26 scenario contrarily caps the increase of energy use by 2030, combined with other actions leading to decreasing emissions and subsequently a decreasing forcing for the second half of the century. However, economic growth continues with half the slope of SSP5-Baseline. In summary, it is the most optimistic projection: we transition to a global society of sustainability-focused growth."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Section 1.1: SSP Creation via IAMs"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "The underlying modeling of Integrated Assessment Models (IAMs) works roughly as follows:\n",
- " \n",
- "All SSP projections are created by optimizing economic activity within the constraint of a given level of greenhouse gas forcing at 2100 (bottom right in the above plot). This activity drives distinct temperature changes via the emissions it produces (top right), which are inputted into a damage function to compute economic damages. These damages feedback into the economy model to limit emissions-producing economic activity (top left).\n",
- "*Note that we already explored these damage functions along our En-ROADS climate solution simulator in Tutorial 2*.\n",
- "\n",
- "The forcing constraint ensures the amount of emissions produced is consistent for that particular scenario. In other words, the projected temperature change under different scenarios is fed to a socioeconomic model component in order to assess the socioeconomic impacts resulting from the temperature change associated with each SSP. *For examples of such impacts check out today's Tutorial 2 and W2D4.*\n",
- "\n",
- "Not every variable in IAMs is endogenous (i.e. determined by other variables in the model). Some variables, like population or technology growth, are exogenous (i.e. variables whose time course is given to the model). In this case, the time course of, e.g., population and economic growth, are derived from simple growth models. These exogenous variables are assumed to be under our society's control (e.g. via mitigation).\n",
- "\n",
- "To understand how our plotted scenarios compare with all other scenarios, we first have a look at the underlying policy assumptions."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Section 1.2 Shared Climate Policy Assumptions (SPAs)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "All pathways have common Shared Climate Policy Assumptions (SPAs) like \n",
- "- limits to how fast we can respond based on where we are now,\n",
- "- what kinds of policies can be implemented, and how\n",
- "\n",
- "which constrain the modelers that create scenarios and their narratives.\n",
- "\n",
- "Our example scenarios hence share the above SPAs and vary in their narrative:\n",
- "\n",
- "In the hypothetical world of SSP5, no climate policies or climate impacts exist, which in other words effectively implies that the carbon price is zero (cf. [Ch.3.2.1.1 of IPCC's report on 'Climate Change 2022: Mitigation of Climate Change')](https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_Chapter03.pdf).\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Section 1.3: Similarities of SSP1 and SSP5\n",
- "\n",
- "When you compare the two scenarios, in particular, the evolution of the population and the GDP shows how similar these scenarios are in their optimistic view on the development of humanity. We all learn to get along, both within and across countries and more equal development naturally stems from population growth through well-known mechanisms like access to conception. The following figure emphasizes this."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# put variables of interest in a list\n",
- "vars = ['Population', 'GDP|PPP']\n",
- "# create new names for structured data series and plot labels\n",
- "val_name = ['Population\\n(millions)', 'GDP (billion US$/yr)']\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,1)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich dataframe\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0].legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Both GDP and population increase."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1.3: Differences of SSP1 and SSP5\n",
- "\n",
- "Major differences are visible when you contrast emissions and assume direct causation with ecosystem health. Increasing emissions then translate into decreasing ecosystem health."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Coding exercise 1.3\n",
- "\n",
- "1. Choose two variables to emphasize ecosystem health differences in the SSP1 and SSP5 scenarios and assign them to `vars`. Then assign axis labels with the correct units for plotting to the `val_name` variable.\n",
- "2. Explain to your pod why the chosen variables emphasize a difference in the scenarios and describe this difference based on your current knowledge of the narratives."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# put two variables of interest in a list\n",
- "vars = ...\n",
- "# create new names for structured data series and plot labels\n",
- "val_name = ...\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "#################################################\n",
- "## TODO for students:\n",
- "## Put two variables of interest in a list and assign it to 'vars'.\n",
- "## Create new names for the structured data series and axes labels,\n",
- "## put them in a list and assign it to 'val_name'.\n",
- "## Remove the following line of code once you have completed the exercise:\n",
- "raise NotImplementedError(\"Student exercise: Put two variables of interest in a list and assign it to vars. Create new names for the structured data series and axes labels, put them in a list and assign it to val_name.\")\n",
- "#################################################\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,1)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich dataframe\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0].legend()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove solution\n",
- "\n",
- "# put two variables of interest in a list\n",
- "vars = ['Emissions|Kyoto Gases', 'Land Cover|Forest']\n",
- "# create new names for structured data series and plot labels\n",
- "val_name = ['Emissions\\n(Mt CO$_2$/yr)','Land covered by\\nforest (million ha)']\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,1)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich dataframe\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0].legend()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "'''\n",
- "2. We choose 'Emissions' and 'Land Cover|Forest' as variables of interest to contrast ecosystem health between the two scenarios.\n",
- "First, note that the land model components from the IMAGE and REMIND-MAGPIE estimate different initial land cover areas, if we assume however that their trend is reasonable, we can conclude the following:\n",
- "For high emissions, forcing rises and hence temperature, we know that precipitation patterns change with higher temperatures such that forests,\n",
- "here our indicator for ecosystem health, are dying.\n",
- "In turn the land cover by forests is decreasing in the SSP5 scenario.\n",
- "In contrast, the SSP1 reduces emissions and also exploits resources like wood only sustainably due to afforestation.\n",
- "As afforestation is also used to capture carbon, while land use is reduced in general,\n",
- "the scenario shows an increase in land cover by forests within the current century.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "In this tutorial, you've gained a first understanding of the Shared Socioeconomic Pathways and their creation, the application of Integrated Assessment Models in climate economics. You've learned how SSPs share policy assumptions. Furthermore, you compared SSP1 and SSP5 with respect to their view on the development of humanity and their ecosystem health.\n",
- "\n",
- "In the next tutorial, you dissect and analyze the SSP narratives in more detail."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "It is possible to download the SSP data used in this tutorial, when you provide an email address, from [this IIASA database](https://tntcat.iiasa.ac.at/SspDb/dsd), where all data from the main simulations of the IAMs used in the [IPCC reports](https://www.ipcc.ch/reports/) is freely available.\n",
- "\n",
- "Find a summary of all SSP narratives in this paper by [Oneill et al. (2017)](https://doi.org/10.1016/j.gloenvcha.2015.01.004).\n",
- "\n",
- "Find even more information in\n",
- "\n",
- "- [IIASA's introduction to SSPs](https://iiasa.ac.at/models-tools-data/ssp)"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial4",
- "provenance": [],
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial5.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial5.ipynb
deleted file mode 100644
index 9b234f6e5..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial5.ipynb
+++ /dev/null
@@ -1,273 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "3d4298c9-a204-48a4-b408-90d0403d4950",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial5.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c55c3b25-2613-4f34-8d4a-ccc417f24708",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 5: Mapping the Narrative Space\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "5c8af3c8-42a4-45ba-a16f-be86198e23e8",
- "metadata": {
- "execution": {}
- },
- "source": [
- "### Tutorial objectives\n",
- "\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "1af3e766-b9c3-4bf8-815c-4087e7811925",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt\n",
- "import numpy as np\n",
- "#import dicelib # https://github.com/mptouzel/PyDICE"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "e7392de8-f946-453b-bedf-8a07c705ee7f",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "6c10210c-a3d9-4996-a3d3-4bafa4b72637",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "80412217-b5a7-4fed-b29e-b8751eb8c847",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Mapping the Narrative Space\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', '9ytkpO_pbWE')\n",
- " # , ('Bilibili', 'BV1bj411Z739')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "2dc2f6c1-637b-4506-a667-45750dd7fbe5",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "# TODO update\n",
- "link_id = \"cyavb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c7ce6e92-a46d-437a-9e03-c5b80eb63474",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Background on IAM Economics\n",
- "\n",
- "The last tutorial gave us a glimpse of Integrated Assessment Models (IAMs), a class of models economists use to inform policy decisions. Recall that IAMs couple a climate model to an economic model, allowing us to evaluate the two-way coupling between economic productivity and climate change severity. \n",
- "\n",
- "Let's begin with a brief description of IAMs:\n",
- "\n",
- "- IAMs resolve the spatially, in contrast, the toy model En-ROADs for example, which we applied in Tutorial 1 to 3, aggregates all variables and is non-spatial.\n",
- "- Like En-ROADS, the world models used in IAMs usually have *exogeneous* (externally set) times series for variables, in addition to fixed world system parameters. These exogenous variables are assumed to be under our society's control (e.g. mitigation). \n",
- "- IAMs come equipped with an objective function (a formula that calculates the quantity to be optimized). This function returns the value of a projected future obtained from running the world model under a given climate policy. This value is defined by the time series of these exogenous variables. In this sense, the objective function is what defines \"good\" in \"good climate policy\". \n",
- "- The computation in an IAM is then an optimization of this objective as a function of the time series of these exogenous variables over some fixed time window.\n",
- "\n",
- "In En-ROADS, there are exogenous parameters, in particular:\n",
- " - **$\\mu(t)$**: time-dependent mitigation rate (i.e. emissions reduction), which limits warming-caused damages\n",
- " - **$S(t)$**: savings rate, which drives capital investment \n",
- "\n",
- "Most IAMs are based on *Neo-classical economics* (also referred to as \"establishment economics\"). This is an approach to economics that makes particular assumptions. For example, it is assumed that production, consumption, and valuation of goods and services are driven solely by the supply and demand model. To understand this approach and how it is used, it is important to begin with a brief overview of some fundamental concepts. One such concept is **utility** (i.e. economic value), which is not only central to economics but also to decision theory as a whole, which is a research field that mathematically formalizes the activity of *planning* (planning here means selecting strategies based on how they are expected to play out given a model that takes those strategies and projects forward into the future)."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "28c0a077-c9a0-42d9-ada6-e8b835668c3b",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "9e904e57-b6b9-4ee8-aefb-140dce3c93c2",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial5",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial6.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial6.ipynb
deleted file mode 100644
index 944aeb1a3..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial6.ipynb
+++ /dev/null
@@ -1,234 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "a4589a1d-0f80-45e7-aec3-3513172e617b",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial6.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "3d93b742-06f3-4a0b-9a1d-043397878e48",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Bonus Tutorial 6: Create your Socio-economic Scenario\n",
- "\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "7b5c4ba1-fad0-4d38-b3b2-875a67549624",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial Objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 30 min\n",
- "\n",
- "In this tutorial, you will model your own simplified Socioeconomic Pathway, a scenario of actions to limit global warming below 2°C. You take action against climate change within the socioeconomic model environment of the Climate Solution Simulator named [En-ROADS](https://www.climateinteractive.org/en-roads/). To examine its characteristics you address its challenges, winners/losers, political feasibility, narrative, and current trends. \n",
- "\n",
- "You learn how to\n",
- "\n",
- "- apply the knowledge you gained in last tutorials to design actions against climate change\n",
- "- map your scenario narrative in the SSP \n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "b591486d-dff5-4dc6-b83b-1125977a7758",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1:\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', '_Y_eLlExwxI'),\n",
- " #TODO('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "616428a4-3db2-4e56-af30-6c56aaf66204",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"gwr8h\" #TODO\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a516e969-8b67-4f8a-9d39-061770ffb4c9",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Exercise 1: Create your Solution Scenario and Evaluate it\n",
- "*Estimated timing:* 20 minutes\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- "\n",
- "2. **Develop a scenario**: By moving the sliders and changing the assumptions, find a scenario (i.e. a combination of slider positions of different variables) that results in *less than 2°C* of temperature increase by the end of the century. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) if needed. \n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*\n",
- "\n",
- "3. **Answer the following questions**:\n",
- "\n",
- " 1. **Your Plan**: What are the top 3-5 most important policies in your strategy? (For example, the most important sliders that you moved). Share your scenario link and a screenshot of your final En-ROADS dashboard.\n",
- " \n",
- " *If you want to save your scenario, export it via a click on the* ***Share your scenario*** *button in the top right of the panel, and select 'Copy Scenario Link'*.\n",
- " \n",
- " 2. **Political Feasibility**: To implement your proposals, what actions and priorities are needed over the next two years in businesses, civil society, government, and the public?\n",
- " 3. **Winners & Losers**: Who would be the biggest winners and losers globally in your proposed future? Create a table with two columns for winners and losers. \n",
- " 4. **Narrative**: Map your ideas in the narrative space, introduced in Tutorial 5. \n",
- " 5. **Hope**: What trends in the world give you hope that your proposals are possible?\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "fadd5652-5db9-475e-a072-f204358ade8a",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this last tutorial, you went from model to action by designing your own socioeconomic modeling scenario to limit global warming below 2°C by the end of the century. You reflected on its challenges, political feasibility, inherent winners and losers of your approach, and finally, the narrative that you chose. At the end of the day, you collected observations of actions and trends you are making in your region, globally, and in your daily life that give hope. That hope and various solutions exist, which one has to combine, and that only action is needed, might be the most important lesson of today.\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a6aaa44b-0fc2-4249-91c4-589aac662188",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)\n",
- "\n",
- "**A Planetary Crisis Planning Computer Game**\n",
- "- [Half Earth Socialism](https://play.half.earth/).\n"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial6",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/chapter_title.md b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/chapter_title.md
deleted file mode 100644
index ec8f9f7ef..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/chapter_title.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Future Climate - IPCC II & III Socio-Economic Basis
-
- ````{div} full-height
-
-````
-
-*Artwork by Sloane Garelick*
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/dicelib.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/dicelib.py
deleted file mode 100644
index bbc544141..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/dicelib.py
+++ /dev/null
@@ -1,538 +0,0 @@
-import seaborn as sns
-import matplotlib.pyplot as pl
-import pandas as pd
-import numpy as np
-import scipy.optimize as opt
-from matplotlib.ticker import EngFormatter
-
-
-class DICE():
-
- def __init__(self):
- self.time_step = 5 # Years per Period
- # Set
- self.min_year = 2000
- self.max_year = 2500
- self.TT = np.linspace(
- self.min_year, self.max_year, 100, dtype=np.int32)
- self.NT = len(self.TT)
- self.t = np.arange(1, self.NT+1)
-
- def init_parameters(self, a3=2.00, prstp=0.015, elasmu=1.45):
-
- # Maximum cumulative extraction fossil fuels (GtC); denoted by CCum
- self.fosslim = 6000
- self.ifopt = 0 # Indicator where optimized is 1 and base is 0
- self.elasmu = elasmu # Elasticity of marginal utility of consumption
- self.prstp = prstp # Initial rate of social time preference per year
-
- self.init_pop_and_tech_parameters()
- self.init_emissions_parameters()
- self.init_carboncycle_parameters()
- self.init_climatemodel_parameters()
- self.init_climatedamage_parameters(a3)
- self.init_abatementcost_parameters()
-
- # ** Scaling and inessential parameters
- # * Note that these are unnecessary for the calculations
- # * They ensure that MU of first period's consumption =1 and PV cons = PV utilty
- # Multiplicative scaling coefficient /0.0302455265681763 /
- self.scale1 = 0.0302455265681763
- self.scale2 = -10993.704 # Additive scaling coefficient /-10993.704/;
-
- # * carbon cycling coupling matrix
- self.b11 = 1 - self.b12
- self.b21 = self.b12*self.mateq/self.mueq
- self.b22 = 1 - self.b21 - self.b23
- self.b32 = self.b23*self.mueq/self.mleq
- self.b33 = 1 - self.b32
-
- # * Further definitions of parameters
- self.a20 = self.a2
- self.sig0 = self.e0/(self.q0*(1-self.miu0)) # From Eq. 14
- self.lam = self.fco22x / self.t2xco2 # From Eq. 25
-
- self.init_exogeneous_inputs()
-
- def init_pop_and_tech_parameters(self, gama=0.300, pop0=7403, popadj=0.134,
- popasym=11500, dk=0.100, q0=105.5,
- k0=223, a0=5.115, ga0=0.076, dela=0.005):
- self.gama = gama # Capital elasticity in production function /.300 /
- # Initial world population 2015 (millions) /7403 /
- self.pop0 = pop0
- self.popadj = popadj # Growth rate to calibrate to 2050 pop projection /0.134/
- # Asymptotic population (millions) /11500/
- self.popasym = popasym
- # Depreciation rate on capital (per year) /.100 /
- self.dk = dk
- # Initial world gross output 2015 (trill 2010 USD) /105.5/
- self.q0 = q0
- # Initial capital value 2015 (trill 2010 USD) /223 /
- self.k0 = k0
- self.a0 = a0 # Initial level of total factor productivity /5.115/
- self.ga0 = ga0 # Initial growth rate for TFP per 5 years /0.076/
- self.dela = dela # Decline rate of TFP per 5 years /0.005/
-
- # ** Emissions parameters
- def init_emissions_parameters(self, gsigma1=-0.0152, dsig=-0.001, eland0=2.6,
- deland=0.115, e0=35.85, miu0=0.03):
- # Initial growth of sigma (per year) /-0.0152/
- self.gsigma1 = gsigma1
- # Decline rate of decarbonization (per period) /-0.001 /
- self.dsig = dsig
- # Carbon emissions from land 2015 (GtCO2 per year) / 2.6 /
- self.eland0 = eland0
- # Decline rate of land emissions (per period) / .115 /
- self.deland = deland
- # Industrial emissions 2015 (GtCO2 per year) /35.85 /
- self.e0 = e0
- self.miu0 = miu0 # Initial emissions control rate for base case 2015 /.03 /
-
- # ** Carbon cycle
- def init_carboncycle_parameters(self, mat0=851, mu0=460, ml0=1740, mateq=588, mueq=360, mleq=1720):
- # * Initial Conditions
- # Initial Concentration in atmosphere 2015 (GtC) /851 /
- self.mat0 = mat0
- # Initial Concentration in upper strata 2015 (GtC) /460 /
- self.mu0 = mu0
- # Initial Concentration in lower strata 2015 (GtC) /1740 /
- self.ml0 = ml0
- # mateq Equilibrium concentration atmosphere (GtC) /588 /
- self.mateq = mateq
- # mueq Equilibrium concentration in upper strata (GtC) /360 /
- self.mueq = mueq
- # mleq Equilibrium concentration in lower strata (GtC) /1720 /
- self.mleq = mleq
-
- # * Flow paramaters, denoted by Phi_ij in the model
- self.b12 = 0.12 # Carbon cycle transition matrix /.12 /
- self.b23 = 0.007 # Carbon cycle transition matrix /0.007/
- # * These are for declaration and are defined later
- self.b11 = None # Carbon cycle transition matrix
- self.b21 = None # Carbon cycle transition matrix
- self.b22 = None # Carbon cycle transition matrix
- self.b32 = None # Carbon cycle transition matrix
- self.b33 = None # Carbon cycle transition matrix
- # Carbon intensity 2010 (kgCO2 per output 2005 USD 2010)
- self.sig0 = None
-
- # ** Climate model parameters
- def init_climatemodel_parameters(self):
- # Equilibrium temp impact (oC per doubling CO2) / 3.1 /
- self.t2xco2 = 3.1
- # 2015 forcings of non-CO2 GHG (Wm-2) / 0.5 /
- self.fex0 = 0.5
- # 2100 forcings of non-CO2 GHG (Wm-2) / 1.0 /
- self.fex1 = 1.0
- # Initial lower stratum temp change (C from 1900) /.0068/
- self.tocean0 = 0.0068
- # Initial atmospheric temp change (C from 1900) /0.85/
- self.tatm0 = 0.85
- self.c1 = 0.1005 # Climate equation coefficient for upper level /0.1005/
- self.c3 = 0.088 # Transfer coefficient upper to lower stratum /0.088/
- self.c4 = 0.025 # Transfer coefficient for lower level /0.025/
- # eta in the model; Eq.22 : Forcings of equilibrium CO2 doubling (Wm-2) /3.6813 /
- self.fco22x = 3.6813
-
- def init_climatedamage_parameters(self, a3=2.00):
- # ** Climate damage parameters
- self.a10 = 0 # Initial damage intercept /0 /
- self.a20 = None # Initial damage quadratic term
- self.a1 = 0 # Damage intercept /0 /
- self.a2 = 0.00236 # Damage quadratic term /0.00236/
- self.a3 = a3 # Damage exponent /2.00 /
-
- def init_abatementcost_parameters(self):
- # ** Abatement cost
- # Theta2 in the model, Eq. 10 Exponent of control cost function / 2.6 /
- self.expcost2 = 2.6
- self.pback = 550 # Cost of backstop 2010$ per tCO2 2015 / 550 /
- self.gback = 0.025 # Initial cost decline backstop cost per period / .025/
- self.limmiu = 1.2 # Upper limit on control rate after 2150 / 1.2 /
- self.tnopol = 45 # Period before which no emissions controls base / 45 /
- # Initial base carbon price (2010$ per tCO2) / 2 /
- self.cprice0 = 2
- self.gcprice = 0.02 # Growth rate of base carbon price per year /.02
-
- def init_exogeneous_inputs(self):
- NT = self.NT
-
- self.l = np.zeros(NT)
- self.l[0] = self.pop0 # Labor force
- self.al = np.zeros(NT)
- self.al[0] = self.a0
- self.gsig = np.zeros(NT)
- self.gsig[0] = self.gsigma1
- self.sigma = np.zeros(NT)
- self.sigma[0] = self.sig0
- # TFP growth rate dynamics, Eq. 7
- self.ga = self.ga0 * np.exp(-self.dela*5*(self.t-1))
- self.pbacktime = self.pback * \
- (1-self.gback)**(self.t-1) # Backstop price
- # Emissions from deforestration
- self.etree = self.eland0*(1-self.deland)**(self.t-1)
- self.rr = 1/((1+self.prstp)**(self.time_step*(self.t-1))) # Eq. 3
- # The following three equations define the exogenous radiative forcing; used in Eq. 23
- self.forcoth = np.full(NT, self.fex0)
- self.forcoth[0:18] = self.forcoth[0:18] + \
- (1/17)*(self.fex1-self.fex0)*(self.t[0:18]-1)
- self.forcoth[18:NT] = self.forcoth[18:NT] + (self.fex1-self.fex0)
- # Optimal long-run savings rate used for transversality (Question)
- self.optlrsav = (self.dk + .004)/(self.dk + .004 *
- self.elasmu + self.prstp)*self.gama
- self.cost1 = np.zeros(NT)
- self.cumetree = np.zeros(NT)
- self.cumetree[0] = 100
- self.cpricebase = self.cprice0*(1+self.gcprice)**(5*(self.t-1))
-
- def InitializeLabor(self, il, iNT):
- for i in range(1, iNT):
- il[i] = il[i-1]*(self.popasym / il[i-1])**self.popadj
-
- def InitializeTFP(self, ial, iNT):
- for i in range(1, iNT):
- ial[i] = ial[i-1]/(1-self.ga[i-1])
-
- def InitializeGrowthSigma(self, igsig, iNT):
- for i in range(1, iNT):
- igsig[i] = igsig[i-1]*((1+self.dsig)**self.time_step)
-
- def InitializeSigma(self, isigma, igsig, icost1, iNT):
- for i in range(1, iNT):
- isigma[i] = isigma[i-1] * np.exp(igsig[i-1] * self.time_step)
- icost1[i] = self.pbacktime[i] * isigma[i] / self.expcost2 / 1000
-
- def InitializeCarbonTree(self, icumetree, iNT):
- for i in range(1, iNT):
- icumetree[i] = icumetree[i-1] + self.etree[i-1]*(5/3.666)
-
- """
- Emissions of carbon and weather damages
- """
-
- # Retuns the total carbon emissions; Eq. 18
- def fE(self, iEIND, index):
- return iEIND[index] + self.etree[index]
-
- # Eq.14: Determines the emission of carbon by industry EIND
- def fEIND(self, iYGROSS, iMIU, isigma, index):
- return isigma[index] * iYGROSS[index] * (1 - iMIU[index])
-
- # Cumulative industrial emission of carbon
- def fCCA(self, iCCA, iEIND, index):
- return iCCA[index-1] + iEIND[index-1] * 5 / 3.666
-
- # Cumulative total carbon emission
- def fCCATOT(self, iCCA, icumetree, index):
- return iCCA[index] + icumetree[index]
-
- # Eq. 22: the dynamics of the radiative forcing
- def fFORC(self, iMAT, index):
- return self.fco22x * np.log(iMAT[index]/588.000)/np.log(2) + self.forcoth[index]
-
- # Dynamics of Omega; Eq.9
- def fDAMFRAC(self, iTATM, index):
- return self.a1*iTATM[index] + self.a2*iTATM[index]**self.a3
-
- # Calculate damages as a function of Gross industrial production; Eq.8
- def fDAMAGES(self, iYGROSS, iDAMFRAC, index):
- return iYGROSS[index] * iDAMFRAC[index]
-
- # Dynamics of Lambda; Eq. 10 - cost of the reudction of carbon emission (Abatement cost)
- def fABATECOST(self, iYGROSS, iMIU, icost1, index):
- return iYGROSS[index] * icost1[index] * iMIU[index]**self.expcost2
-
- # Marginal Abatement cost
- def fMCABATE(self, iMIU, index):
- return self.pbacktime[index] * iMIU[index]**(self.expcost2-1)
-
- # Price of carbon reduction
- def fCPRICE(self, iMIU, index):
- return self.pbacktime[index] * (iMIU[index])**(self.expcost2-1)
-
- # Eq. 19: Dynamics of the carbon concentration in the atmosphere
- def fMAT(self, iMAT, iMU, iE, index):
- if (index == 0):
- return self.mat0
- else:
- return iMAT[index-1]*self.b11 + iMU[index-1]*self.b21 + iE[index-1] * 5 / 3.666
-
- # Eq. 21: Dynamics of the carbon concentration in the ocean LOW level
- def fML(self, iML, iMU, index):
- if (index == 0):
- return self.ml0
- else:
- return iML[index-1] * self.b33 + iMU[index-1] * self.b23
-
- # Eq. 20: Dynamics of the carbon concentration in the ocean UP level
- def fMU(self, iMAT, iMU, iML, index):
- if (index == 0):
- return self.mu0
- else:
- return iMAT[index-1]*self.b12 + iMU[index-1]*self.b22 + iML[index-1]*self.b32
-
- # Eq. 23: Dynamics of the atmospheric temperature
- def fTATM(self, iTATM, iFORC, iTOCEAN, index):
- if (index == 0):
- return self.tatm0
- else:
- return iTATM[index-1] + self.c1 * (iFORC[index] - (self.fco22x/self.t2xco2) * iTATM[index-1] - self.c3 * (iTATM[index-1] - iTOCEAN[index-1]))
-
- # Eq. 24: Dynamics of the ocean temperature
- def fTOCEAN(self, iTATM, iTOCEAN, index):
- if (index == 0):
- return self.tocean0
- else:
- return iTOCEAN[index-1] + self.c4 * (iTATM[index-1] - iTOCEAN[index-1])
-
- """
- economic variables
- """
-
- # The total production without climate losses denoted previously by YGROSS
- def fYGROSS(self, ial, il, iK, index):
- return ial[index] * ((il[index]/1000)**(1-self.gama)) * iK[index]**self.gama
-
- # The production under the climate damages cost
- def fYNET(self, iYGROSS, iDAMFRAC, index):
- return iYGROSS[index] * (1 - iDAMFRAC[index])
-
- # Production after abatement cost
- def fY(self, iYNET, iABATECOST, index):
- return iYNET[index] - iABATECOST[index]
-
- # Consumption Eq. 11
- def fC(self, iY, iI, index):
- return iY[index] - iI[index]
-
- # Per capita consumption, Eq. 12
- def fCPC(self, iC, il, index):
- return 1000 * iC[index] / il[index]
-
- # Saving policy: investment
- def fI(self, iS, iY, index):
- return iS[index] * iY[index]
-
- # Capital dynamics Eq. 13
- def fK(self, iK, iI, index):
- if (index == 0):
- return self.k0
- else:
- return (1-self.dk)**self.time_step * iK[index-1] + self.time_step * iI[index-1]
-
- # Interest rate equation; Eq. 26 added in personal notes
- def fRI(self, iCPC, index):
- return (1 + self.prstp) * (iCPC[index+1]/iCPC[index])**(self.elasmu/self.time_step) - 1
-
- # Periodic utility: A form of Eq. 2
- def fCEMUTOTPER(self, iPERIODU, il, index):
- return iPERIODU[index] * il[index] * self.rr[index]
-
- # The term between brackets in Eq. 2
- def fPERIODU(self, iC, il, index):
- return ((iC[index]*1000/il[index])**(1-self.elasmu) - 1) / (1 - self.elasmu) - 1
-
- # utility function
- def fUTILITY(self, iCEMUTOTPER, resUtility):
- resUtility[0] = self.time_step * self.scale1 * \
- np.sum(iCEMUTOTPER) + self.scale2
-
- def init_variables(self): # TODO: add full variable names as comments
- NT = self.NT
- self.K = np.zeros(NT)
- self.YGROSS = np.zeros(NT)
- self.EIND = np.zeros(NT)
- self.E = np.zeros(NT)
- self.CCA = np.zeros(NT)
- self.CCATOT = np.zeros(NT)
- self.MAT = np.zeros(NT)
- self.ML = np.zeros(NT)
- self.MU = np.zeros(NT)
- self.FORC = np.zeros(NT)
- self.TATM = np.zeros(NT)
- self.TOCEAN = np.zeros(NT)
- self.DAMFRAC = np.zeros(NT)
- self.DAMAGES = np.zeros(NT)
- self.ABATECOST = np.zeros(NT)
- self.MCABATE = np.zeros(NT)
- self.CPRICE = np.zeros(NT)
- self.YNET = np.zeros(NT)
- self.Y = np.zeros(NT)
- self.I = np.zeros(NT)
- self.C = np.zeros(NT)
- self.CPC = np.zeros(NT)
- self.RI = np.zeros(NT)
- self.PERIODU = np.zeros(NT)
- self.CEMUTOTPER = np.zeros(NT)
-
- self.optimal_controls = np.zeros(2*NT)
-
- self.InitializeLabor(self.l, NT)
- self.InitializeTFP(self.al, NT)
- self.InitializeGrowthSigma(self.gsig, NT)
- self.InitializeSigma(self.sigma, self.gsig, self.cost1, NT)
- self.InitializeCarbonTree(self.cumetree, NT)
-
- def get_control_bounds_and_startvalue(self):
-
- NT = self.NT
- # * Control variable limits
- MIU_lo = np.full(NT, 0.01)
- MIU_up = np.full(NT, self.limmiu)
- MIU_up[0:29] = 1
- MIU_lo[0] = self.miu0
- MIU_up[0] = self.miu0
- MIU_lo[MIU_lo == MIU_up] = 0.99999*MIU_lo[MIU_lo == MIU_up]
- bnds1 = []
- for i in range(NT):
- bnds1.append((MIU_lo[i], MIU_up[i]))
-
- lag10 = np.arange(1, NT+1) > NT - 10
- S_lo = np.full(NT, 1e-1)
- S_lo[lag10] = self.optlrsav
- S_up = np.full(NT, 0.9)
- S_up[lag10] = self.optlrsav
- S_lo[S_lo == S_up] = 0.99999*S_lo[S_lo == S_up]
- bnds2 = []
- for i in range(NT):
- bnds2.append((S_lo[i], S_up[i]))
- bnds = bnds1 + bnds2
-
- # starting values for the control variables:
- S_start = np.full(NT, 0.2)
- S_start[S_start < S_lo] = S_lo[S_start < S_lo]
- S_start[S_start > S_up] = S_lo[S_start > S_up]
- MIU_start = 0.99*MIU_up
- MIU_start[MIU_start < MIU_lo] = MIU_lo[MIU_start < MIU_lo]
- MIU_start[MIU_start > MIU_up] = MIU_up[MIU_start > MIU_up]
- x_start = np.concatenate([MIU_start, S_start])
-
- return x_start, bnds
-
- def fOBJ(self, controls):
- self.roll_out(controls)
- resUtility = np.zeros(1)
- self.fUTILITY(self.CEMUTOTPER, resUtility)
-
- return -1*resUtility[0]
-
- def roll_out(self, controls):
- NT = self.NT
-
- iMIU = controls[0:NT]
- iS = controls[NT:(2*NT)]
-
- for i in range(NT):
- self.K[i] = self.fK(self.K, self.I, i)
- self.YGROSS[i] = self.fYGROSS(self.al, self.l, self.K, i)
- self.EIND[i] = self.fEIND(self.YGROSS, iMIU, self.sigma, i)
- self.E[i] = self.fE(self.EIND, i)
- self.CCA[i] = self.fCCA(self.CCA, self.EIND, i)
- self.CCATOT[i] = self.fCCATOT(self.CCA, self.cumetree, i)
- self.MAT[i] = self.fMAT(self.MAT, self.MU, self.E, i)
- self.ML[i] = self.fML(self.ML, self.MU, i)
- self.MU[i] = self.fMU(self.MAT, self.MU, self.ML, i)
- self.FORC[i] = self.fFORC(self.MAT, i)
- self.TATM[i] = self.fTATM(self.TATM, self.FORC, self.TOCEAN, i)
- self.TOCEAN[i] = self.fTOCEAN(self.TATM, self.TOCEAN, i)
- self.DAMFRAC[i] = self.fDAMFRAC(self.TATM, i)
- self.DAMAGES[i] = self.fDAMAGES(self.YGROSS, self.DAMFRAC, i)
- self.ABATECOST[i] = self.fABATECOST(
- self.YGROSS, iMIU, self.cost1, i)
- self.MCABATE[i] = self.fMCABATE(iMIU, i)
- self.CPRICE[i] = self.fCPRICE(iMIU, i)
- self.YNET[i] = self.fYNET(self.YGROSS, self.DAMFRAC, i)
- self.Y[i] = self.fY(self.YNET, self.ABATECOST, i)
- self.I[i] = self.fI(iS, self.Y, i)
- self.C[i] = self.fC(self.Y, self.I, i)
- self.CPC[i] = self.fCPC(self.C, self.l, i)
- self.PERIODU[i] = self.fPERIODU(self.C, self.l, i)
- self.CEMUTOTPER[i] = self.fCEMUTOTPER(self.PERIODU, self.l, i)
-# self.RI[i] = self.fRI(self.CPC, i)
-
- def optimize_controls(self, controls_start, controls_bounds):
- result = opt.minimize(self.fOBJ, controls_start, method='SLSQP', bounds=tuple(
- controls_bounds), options={'disp': True})
- self.optimal_controls = result.x
- return result
-
- def plot_run(self, title_str):
- Tmax = 2150
- NT = self.NT
- variables = [self.optimal_controls[NT:(2*NT)], self.optimal_controls[0:NT], self.CPRICE, self.EIND, self.TATM, self.DAMAGES, self.MAT,
- self.E]
- variables = [var[self.TT < Tmax] for var in variables]
- variable_labels = ["Saving rate",
- "Em rate", # 'Carbon emission control rate'
- "carbon price",
- "INdustrial emissions",
- # Increase temperature of the atmosphere (TATM)
- "Degrees C from 1900",
- "Damages", # 'trillions 2010 USD per year'
- "GtC from 1750", # 'Carbon concentration increase in the atmosphere'
- "GtCO2 per year" # Total CO2 emission
- ]
- variable_limits = [[0, 0.5], [0, 1], [0, 400], [-20, 40],
- [0, 5], [0, 150], [0, 1500], [-20, 50]] # y axis ranges
- plot_world_variables(self.TT[self.TT < Tmax], variables, variable_labels, variable_limits,
- title=title_str,figsize=[4+len(variables), 7],
- grid=True)
-
-
-def plot_world_variables(time, var_data, var_names, var_lims,
- title=None,
- figsize=None,
- dist_spines=0.09,
- grid=False):
- prop_cycle = pl.rcParams['axes.prop_cycle']
- colors = prop_cycle.by_key()['color']
-
- var_number = len(var_data)
-
- fig, host = pl.subplots(figsize=figsize)
- axs = [host, ]
- for i in range(var_number-1):
- axs.append(host.twinx())
-
- fig.subplots_adjust(left=dist_spines*2)
- for i, ax in enumerate(axs[1:]):
- ax.spines["left"].set_position(("axes", -(i + 1)*dist_spines))
- ax.spines["left"].set_visible(True)
- ax.yaxis.set_label_position('left')
- ax.yaxis.set_ticks_position('left')
-
- ps = []
- for ax, label, ydata, color in zip(axs, var_names, var_data, colors):
- ps.append(ax.plot(time, ydata, label=label,
- color=color, clip_on=False)[0])
- axs[0].grid(grid)
- axs[0].set_xlim(time[0], time[-1])
-
- for ax, lim in zip(axs, var_lims):
- ax.set_ylim(lim[0], lim[1])
-
- for axit, ax_ in enumerate(axs):
- ax_.tick_params(axis='y', rotation=90)
- ax_.yaxis.set_major_locator(pl.MaxNLocator(5))
- formatter_ = EngFormatter(places=0, sep="\N{THIN SPACE}")
- ax_.yaxis.set_major_formatter(formatter_)
-
- tkw = dict(size=4, width=1.5)
- axs[0].set_xlabel("time [years]")
- axs[0].tick_params(axis='x', **tkw)
- for i, (ax, p) in enumerate(zip(axs, ps)):
- ax.set_ylabel(p.get_label(), rotation=25)
- ax.yaxis.label.set_color(p.get_color())
- ax.tick_params(axis='y', colors=p.get_color(), **tkw)
- ax.yaxis.set_label_coords(-i*dist_spines, 1.01)
- axs[0].set_title(title)
-
-
-def hello_world():
- dice = DICE()
- dice.init_parameters()
- dice.init_variables()
- controls_start, controls_bounds = dice.get_control_bounds_and_startvalue()
- dice.optimize_controls(controls_start, controls_bounds)
- dice.roll_out(dice.optimal_controls)
- dice.plot_run()
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/further_reading.md b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/further_reading.md
deleted file mode 100644
index cc972adcd..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/further_reading.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# **Tutorial 2 Further Reading**
-
-## **IAM Model Summary**
-The economy model in most IAMs is a capital accumulation model.
-- Capital combines with a laboring population and technology to generate productivity ($Y$) that is hindered by climate damage.
-- A savings fraction of production drives capital accumulation, while the rest is consumed. Welfare is determined by consumption.
-- Climate action is formulated by a mitigation rate, $\mu$, which along with the savings rate are the two control parameters in the model.
-- These are used to maximize welfare.
-
-The climate model in DICE could be improved (c.f. [this study](https://www3.nd.edu/~nmark/Climate/DICE-simplified_2019.pdf)). We only summarize here how it interacts with the economy model:
-- Productivity generates industrial emissions, $$E_\mathrm{ind}=(1-\mu)\sigma Y,$$ where the $1-\mu$ factor accounts for reduced carbon intensity of production, $\sigma$, via supply-side mitigation measures (e.g. increased efficiency).
-- The productivity $Y$ rather than output production ($Q$) see model is used here because damages aren't included.
-- Namely, the emissions produced in the process of capital production occur before climate change has a chance to inflict damage on the produced output.
-- These emissions combine with natural emissions to drive the temperature changes appearing in the damage function, closing the economy-climate loop.
-
-Here are a list of variables used:
-- $K$ capital
-- $Y$ productivity
-- $Q$ production
-- $A$ technology conversion
-- $S$ savings rate
-- $\mu$ mitigation rate
-- $\Lambda$ mitigation cost
-- $\Omega$ damage fraction of productivity
-- $\sigma$ carbon intensity of production
-- $E$ emissions
-
-## **Exogeneous Control Variables**
-There are two exogeneous variables in the model:
-- mitigation (emissions reduction) rate $\mu_t$, and
-- the savings rate $S_t$.
-
-There exists a mitigation cost associated with a specific mitigation rate, presented as a fraction of productivity, $\Lambda_t=\theta_1\mu^{\theta_2}$. This implies that increased mitigation efforts correspond to elevated costs.
-
-The savings rate $S_t$ extracts a portion of the total production to invest, thereby boosting capital. The rest of the production is then allocated for consumption.
-
-## **Economy Model Summary**
-The essence of the economy model in DICE is a capital accumulation model. Existing capital depreciates at rate $\delta$ and new capital arises through investment,
-$$K_{t+1}=(1-\delta)K_t+I_t$$
-where the invested capital $I=SQ$ is determined by a chosen fraction $S$ of the production $Q$ that is "saved" rather than consumed. Production is given as the productivity $Y$ reduced by damages and mitigation cost, $$Q=(1-\Omega)(1-\Lambda)Y.$$ Productivity, $$Y=A K^\gamma L^{1-\gamma},$$
-is determined by the technology conversion $A$ operating on a combination of capital $K$ and labor $L$ whose relative contributions are set by the capital elasticity parameter $\gamma$. Labor is population which set to saturate over the 2nd half of the 21st century. Technology conversion is only weakly sigmoidal in time, deviating slightly from linear growth.
-
-The remaining production is consumed $$C:=(1-S)Q$$ producing utility $$U(C,L)=Lu(c)=Lu(C/L),$$ using the isoelastic utility function, $$u(c)=\frac{(c+1)^{1-\alpha}-1}{1-\alpha}.$$ The overall value of a projected future is then $$V=\sum_{t=1}^{\infty}\gamma^t U(C_t,L_t),$$ where $\gamma=1/(1+\rho)$ for discount rate $\rho$ and we use the population level utility function $U(C,L)=Lu(C/L)$.
-
-
-Here are a list of variables used:
-- $K$ capital
-- $Y$ productivity
-- $Q$ production
-- $A$ technology conversion
-- $S$ savings rate
-- $\mu$ mitigation rate
-- $\Lambda$ mitigation cost
-- $\Omega$ damage fraction of productivity
-- $\sigma$ carbon intensity of production
-- $E$ emissions
-
-## **Optimal Planning**
-The unconstrained problem aims to maximize $V$ within the bounds of $\mu_t$ and $S_t$ time courses (while considering constraints on $\mu$ and $S$). Why is there a "sweet spot"? Increasing savings boosts investment and productivity, but higher production leads to emissions, resulting in increased temperature and damages that reduce production. Mitigation costs counterbalance this effect, creating a trade-off. As a result, there typically exists a meaningful joint time series of $\mu_t$ and $S_t$ that maximizes $V$. Due to the discount factor $\gamma$, $V$ depends on the future consumption sequence (non-invested production) within a few multiples of the horizon, approximately $1/(1-\gamma)$ time steps into the future.
-
-Constrained formulations introduce an additional constraint to limit industrial emissions below a certain threshold.
-
-## **Social Cost of Carbon**
-A definition for the social cost of carbon (SCC) is
-
-- *the decrease in aggregate consumption in that year that would change the current...value of social welfare by the same amount as a one unit increase in carbon emissions in that year.* ([Newbold, Griffiths, Moore, Wolverton, & Kopits, 2013](https://www.worldscientific.com/doi/abs/10.1142/S2010007813500012)).
-
-The $SCC$ quantifies how much consumption is lost with increased emissions, using changes in welfare to make the connection. In technical terms:
-
-- the marginal value with respect to emissions relative to the marginal value with respect to consumption, $$SCC_t\propto\frac{\partial V/\partial E_t}{\partial V/\partial C_t}=\frac{\partial C_t}{\partial E_t}.$$
-This is usually expressed by multiplying by a proportionality factor of $-1000$ that converts the units to 2010 US dollars per tonne of CO2.
-
-# **Tutorial 4 Further Reading**
-
-## **Vectorization Methods for Creating Word Clouds**
-
-Let's write down what they compute by denoting the index, $d$, over the $D$ documents and the index, $w$, over the $W$ words in the vocabulary (the list of all the words found in all the tweets, which we'll call documents):
-- term frequency, $\mathrm{tf}(w,d)$. The frequency of a word $w$ in a document $d$ is $$\mathrm{tf}(w,d):=\frac{n(w,d)}{n(d)},$$ where $n(w,d)$ is the number of times term $w$ is in document $d$ and $n(d)=\sum_{w=1}^W n(w,d)$ is the total number of words in document $d$. The term frequency over all the documents is then, $$\mathrm{tf}(w):=\frac{\sum_{d=1}^D n(d)\mathrm{tf}(w,d)}{N},$$ where the denominator $N=\sum_{d=1}^D n(d)$ is just the total word count across all documents.
-- term frequency-inverse document frequency, $\mathrm{Tfidf}(w,d):=\mathrm{tf}(w,d)\mathrm{idf}(w)$. Here, $$\mathrm{idf}(w)=\frac{\log(D+1)}{\log(n(w)+1)+1},$$ where $n(w)$ is the number of documents in which term $t$ appears, i.e. $n(w,d)>0$. Idf is like an inverse document frequency. The `sklearn` package then uses $$\mathrm{Tfidf}(w)=\frac{1}{D}\sum_{d=1}^D \frac{\mathrm{Tfidf}(w,d)}{||\mathrm{Tfidf}(\cdot,d)||},$$ where $||\vec{x}||=\sqrt{\sum_{i=1}^Nx^2_i}$ is the Euclidean norm.
-
-$\mathrm{Tfidf}$ aims to add more discriminability to frequency as a word relevance metric by downweighting words that appear in many documents since these common words are less discriminative.
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/images/world3_major_flows.png b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/images/world3_major_flows.png
deleted file mode 100644
index 354cf6ee3..000000000
Binary files a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/images/world3_major_flows.png and /dev/null differ
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_DaySummary.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_DaySummary.ipynb
deleted file mode 100644
index b3059d2de..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_DaySummary.ipynb
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "3b83976b",
- "metadata": {},
- "source": [
- "# Day Summary"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "f2b474b6",
- "metadata": {},
- "source": [
- "This day's tutorials focused on the socioeconomic projections regarding the future of the climate emergency. The content centered around the shared socioeconomic pathways framework used by the IPCC and is more knowledge-based than skills-based compared with other days.\n",
- "\n",
- "The day began with a tutorial that summarizes the socio-economic history of growth & limits to physical growth as a parent problem within which the climate emergency arises. You explored the consequences of resource limitations in the computational part of this tutorial through the world3 model.\n",
- "\n",
- "The next tutorial dove into a formulation of the economics of climate change beginning with goal setting and then the main concepts and methods to finding optimal economic plans. You learned about the economic models used in the SSP framework, integrated assessment models (IAMs), and the modeling practice that uses them to make projections. The computational part of the tutorial first walked you through some graphical exercises that illustrate basic economic concepts before running a simple IAM (the RICE model) under various parameter settings.\n",
- "\n",
- "The third tutorial presented the SSP framework in which IAMs are used. You learned how the five SSP narratives were constructed and integrated with physical modeling efforts to define the full set of SSP pathways. You then got a glimpse of what an IAM used in this project consists of and saw the results through important metrics like energy use and greenhouse gas emissions. The computational part of the tutorial took off from a critique of the SSP framework to motivate playing with MARGO, a simple model with more, and more dynamic mitigation controls.\n",
- "\n",
- "Finally, the fourth tutorial on public opinion focussed on climate action psychology and values-based communication. The computational exercise had you analyze public sentiment through analysis of a large dataset of Twitter messages."
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.8"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Intro.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Intro.ipynb
deleted file mode 100644
index bc9b42b91..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Intro.ipynb
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "df1a0a21",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Intro"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "6013efcc",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Overview"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "dfaee097",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Up to today, you have studied models of our climate system. Today, we will begin to model the (in many ways more complex!) system of society’s economy and how climate impacts them. "
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Intro",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.8"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Outro.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Outro.ipynb
deleted file mode 100644
index b707d8c54..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Outro.ipynb
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "175cc467",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Outro"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "2e5c1afd",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Now that you have a sense for the complexity nestled within Integrated Assessment Modeling and socioeconomic phenomena, you will look at how we try to coarse grain that complexity when applying our understanding of climate to assess extreme events and vulnerability. "
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Outro",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.8"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial1.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial1.ipynb
deleted file mode 100644
index 749e30970..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial1.ipynb
+++ /dev/null
@@ -1,469 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "25d9555a-5485-42c3-81cf-4851396a643f",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial1.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1872759b-c9e3-4d4e-a3cf-30813840b049",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 1: Orienting inside a \"Climate Solution\" Simulator\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Maximilian Puelma Touzel, Paul Heubel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a2d2b006-8493-451b-a75e-797d902a0fcd",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 30 minutes\n",
- "\n",
- "During the first week of the course, you applied computational tools to climate data (measurements, proxies, and model output) to characterize past, present, and future climate. During day one of this second week (W2D1), you began to explore climate model data from Earth System Model (ESM) simulations conducted for the recent Climate Model Intercomparison Project (CMIP6) that are presented in the report from the Intergovernmental Panel on Climate Change ([IPCC](https://www.ipcc.ch/)). However, the dominant source of uncertainty in those projections arises from how human society responds: e.g. how our emissions reduction and renewable energy technologies develop, how coherent our global politics are, how our consumption grows (cf. [Rogelj et al. (2018)(Global Warming of 1.5°C. An IPCC Special Report \\[...\\])](https://doi.org/10.1017/9781009157940.004)). For these reasons, in addition to understanding the physical basis of the climate variations projected by these models, it's also important to assess the current and future socioeconomic impact of climate change and what aspects of human activity are driving emissions.\n",
- "\n",
- "This day's tutorials focus on the socioeconomic projections regarding the future of climate change and are centered around the Shared Socioeconomic Pathways (SSP) framework used by the IPCC. However, in this first tutorial, you will use the [En-ROADS](https://www.climateinteractive.org/en-roads/) simulator to get some intuition about different socioeconomic variables and their consequences for climate. Additionally, you will analyze potential economic and population scenarios to learn about the complex and intertwined dynamics of socioeconomic variables, as well as how this model informs modern-day climate challenges.\n",
- "\n",
- "Unlike the rest of the days of this course, this day will be highly conceptual and discussion-driven, and focus much less on analyzing datasets.\n",
- "\n",
- "In this tutorial, you will:\n",
- "- Get familiar with the interface of the simulator named En-ROADS\n",
- "- Explore the impact of different growth variables on the temperature increase by 2100 projected from the En-ROADS model.\n",
- "- Understand why it is necessary to implement various actions against climate change, not a single one.\n",
- "- Explore the assumptions and limitations of this model"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "368d0c90-ae7e-43d9-ada7-ad42c75f5f95",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "6db786f8-e5c4-42a9-9837-e41027b9ad4d",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "e11e3bbb-ce8f-4404-8d04-b6f86d4a9ea9",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "ea9d553f-c3eb-4723-a922-e81f97e1e3ba",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Orienting inside a 'Climate Solution' Simulator\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "video_ids = [('Youtube', 'g5VRHCcIyxk'),\n",
- " #('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "52ca5582-816c-423c-9ed7-cda1c7319731",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"mtyrb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "57265af6-b3ab-41e4-82a1-6c4b63a0c321",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Exploration of a Climate Solution Simulator"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "042a83d3-2e94-4092-a289-2430d349966c",
- "metadata": {
- "execution": {}
- },
- "source": [
- "The following introductory video gives a quick overview of the En-ROADS simulator, a simple climate model (SCM), developed by [Climate-Interactive](https://www.climateinteractive.org/) for teaching purposes. It is used in policy workshops, role-plays, and other activities to explore the possibilities and obstacles of scenarios and human solutions to climate change.\n",
- "\n",
- "To get familiar with modeling societal and economic mechanisms in combination with climatic variables, the so-called **socio-economic model**, you will examine its 'control knobs', limitations, and assumptions. In later tutorials you will compare these findings with those of Integrated Assessment Models (IAMs) which are state-of-the-art models for projecting scenarios and those used in the socioeconomic pathways of the IPCC."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "9c6b2260-bdb0-4d7b-a07d-41551d5ccf92",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 2: Overview of the En-ROADS Climate Solutions Simulator\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', 'Py_qIgcZxKg')\n",
- " # , ('Bilibili', 'BV1bj411Z739')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "718606a5-1239-414b-84fc-f9c0a18924d6",
- "metadata": {
- "execution": {}
- },
- "source": [
- "### Exercise 1: Can you limit human-caused global warming to \"well-below 2ºC\"?\n",
- "*Estimated timing:* 20 minutes\n",
- "\n",
- "We jump right in with an exercise, adapted from [En-ROADS](https://www.climateinteractive.org/guided-assignment/), that allows you to explore the Climate Solution Simulator.\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- "\n",
- "2. **Develop a scenario**: By moving the sliders, find a scenario (i.e. a combination of slider positions of different variables) that results in *less than 2°C* of temperature increase by the end of the century. Don't worry if you don't find a scenario that works right away - keep exploring. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) to help you get started. Have fun!\n",
- "\n",
- "3. **Answer the following questions**:\n",
- "\n",
- "* How many variables did you have to adjust to reach the \"well-below 2ºC\" target?\n",
- "* Which variables had the most individual impact? Did the magnitude of impact surprise you for any variables?\n",
- "* How feasible is this scenario? That is, what actions would have to be taken by governments, businesses and people over the next few years to make the proposed scenario possible?\n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "30a81fb8-c21b-490c-9297-a6705f114957",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "\n",
- "'''\n",
- "3. One scenario to try based on the goals of the energy transition is the combination of:\n",
- "(1) full electrification of the energy supply, i.e. 'very highly taxed' fossil fuel emissions (Coal, Natural gas, and Oil),\n",
- "(2) 'highly subsidized' renewables, and\n",
- "(3) a 'very high' carbon price,\n",
- "as well as the 'highly reduced' emissions of Methane and other Gases\n",
- "which gets us to a maximum increase of 2°C by the end of the century\n",
- "(cf. this example scenario https://en-roads.climateinteractive.org/scenario.html?v=24.3.0&p1=100&p7=85&p10=5&p16=-0.05&p23=-1&p39=250&p59=-64&p67=2&g0=2&g1=62).\n",
- "\n",
- "Nevertheless, other scenarios are possible, either by involving more parameters or by focusing on carbon removal.\n",
- "There are (at least!) two important observations to make. First, actions vary in leverage, in other words, some actions are more helpful than others.\n",
- "Second, to make a difference and reach an ambitious goal like the 2°C degree target, many actions in many sectors are required.\n",
- "Sometimes one refers to this circumstance by calling it a 'Silver Buckshot' instead of a 'Silver Bullet' approach (cf. e.g. https://www.washingtonpost.com/archive/opinions/2006/05/27/welcome-to-the-climate-crisis-span-classbankheadhow-to-tell-whether-a-candidate-is-serious-about-combating-global-warmingspan/26b2ac5a-a4a3-46ff-b214-3fc07a3a5ab3/).\n",
- "Furthermore, people might be surprised by the fact that some actions may be much lower leverage, while others like carbon pricing and energy efficiency might be higher leverage than people expect.\n",
- "'''"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "05df13b5-14ce-4515-aaae-7cc9e3765445",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "#link_id = \"gwr8h\"\n",
- "\n",
- "download_link = f\"https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf\"\n",
- "render_link = f\"https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download a cheatsheet for the En-ROADS Control Panel:\\n{download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1f5a0c7f-8fd3-4c89-b25d-8070ef2fdd4b",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 2: Limitations of the En-ROADS Model Approach\n",
- "\n",
- "We conclude this tutorial by stepping back and discussing the limitations of En-ROADS.\n",
- "\n",
- "### Exercise 2: Limitations\n",
- "*Estimated timing:* 5 minutes\n",
- "\n",
- "1. Think about limitations that arise from the En-ROADS model approach. List a few mechanisms that seem oversimplified or phenomena that might be not or misrepresented. Discuss with your pod.\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "b17595a7-b326-4edb-9f80-b8e21f1d4e5e",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "\n",
- "'''\n",
- "1. At first, En-ROADS is a world model, not an optimal planning model so it is unlike any IAM used e.g. for the IPCC reports.\n",
- "Controls are somewhat limited (DAC/CCS, soil, BioChar, and mineralization are not covered).\n",
- "It allows only for single parameter changes - in reality, there will be correlations, e.g. between carbon pricing and renewables due to market pressure.\n",
- "Some feedbacks are also missing, besides the above-mentioned damage from climate change on GDP, land use, etc.,\n",
- "climate change harms the human population by shortening lives.\n",
- "Although this happens already in the current 1°C increase reality, this harm is difficult to quantify and hence not implemented.\n",
- "Furthermore, it is a fully aggregated model, no spatial/regional or income resolution, and corresponding interdependency exists.\n",
- "An action/ policy is assumed to be executed globally, which is a utopia so far.\n",
- "It hence remains important to consider the implications of heterogeneity across different countries and their interactions.\n",
- "Last but not least, tipping points such as the thawing of the permafrost are represented in a very simplified manner only, although they probably have strong implications.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "51aac287-f6d0-479e-be4b-87f557c32214",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this tutorial, you got an intuition for various 'control knobs' that can be turned in a socio-economic model environment. We discussed why no policy alone can be a silver bullet to solve all problems but a mixture of many actions, in particular, the energy transition to renewables and carbon pricing. At last, we discussed a few limitations of the En-ROADs model approach."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1c949bc5-e5ef-4d07-b379-122072ef6271",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial1",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial2.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial2.ipynb
deleted file mode 100644
index b3219f7bc..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial2.ipynb
+++ /dev/null
@@ -1,508 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "873927b3-ad55-40a2-ab6a-de2af3c09cc8",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial2.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "8eb286c6-dd69-440b-bc14-e6c7f20517bf",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 2: Fossil Fuel Emissions, Growth, and Damage\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "d86fc935-8b60-4fcf-83d7-1e9c78ca6b84",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 30 minutes\n",
- "\n",
- "This tutorial explores the impact of population and economic growth on the global temperature and how a changing climate due to fossil fuel emissions damages our economy. You model these scenarios by 'controlling the knobs' of the Climate Solution Simulator named [En-ROADS](https://www.climateinteractive.org/en-roads/).\n",
- "\n",
- "After finishing this tutorial you can\n",
- "\n",
- "* discuss the impact of a growth-based economy on future fossil-fuel emissions along the Kaya identity\n",
- "* qualitatively describe the impact of population and economic growth on the global temperature within the En-ROADS model environment.\n",
- "* (explain qualitatively how a different damage function formulation impacts the economic activity)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "8dc93386-4bde-4e22-b7eb-174133f57351",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "f9398705-5441-4ed3-980d-c6339cb30696",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "3342114d-deee-4d5b-afde-d4852bac2352",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "2ca0746a-edad-45f7-8ad5-1b4ec1e7c546",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Orienting in a 'Climate Solution' Simulator\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', 'g5VRHCcIyxk'),\n",
- " #('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "5d45c633-1daa-4408-ab8c-18969fff8bde",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"mtyrb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "4cb055f0-0f58-4c8c-9e11-a7a16f0b6e98",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Quantification of Fossil Fuel Emissions and Its Dependency on Growth\n",
- "\n",
- "We discussed in the slides how economics represents the human population as a source of labor needed to produce goods and services. A by-product of this production are fossil fuel emissions, which increase atmospheric greenhouse gas (GHG) concentrations, significantly changing the earth's climate. Let us take a look at the relationship between people, production, and emissions in more detail using the En-ROADS simulator.\n",
- "\n",
- "You might already have clicked through the toggles at the top of the control panel of En-ROADS and tried the different *Views* (Main graphs, Kaya graphs, Miniature graphs). Select now the **Kaya graphs** view and reset the simulator (click on the anti-clockwise circular arrow to 'Reset all policies & assumptions' or just reload the page/model [here](https://en-roads.climateinteractive.org/)).\n",
- "\n",
- "The Kaya graphs depict four drivers of growth in carbon dioxide emissions from energy use, which reflects about two-thirds of all greenhouse gas emissions (the remaining third of emissions are from land use changes and other gases, such as methane (CH4) and nitrous oxide (N2O), which are not considered here). The corresponding equation, the so-called [***Kaya identity***](https://en.wikipedia.org/wiki/Kaya_identity) below was developed by Yoichi Kaya:\n",
- "\n",
- "***CO$_2$ Emissions from Energy = Global Population × GDP per Capita × Energy Intensity of GDP × Carbon Intensity of Energy***\n",
- "\n",
- "Where [gross domestic product](https://en.wikipedia.org/wiki/Gross_domestic_product) (GDP) is a measure of economic activity or health. \n",
- "\n",
- "In a more mathematical form, this equation is\n",
- "\n",
- "$$\n",
- "F = P \\times \\left[\\frac{G}{P}\\right] \\times \\left[\\frac{E}{G}\\right] \\times \\left[\\frac{F}{E}\\right]\n",
- "$$\n",
- " - $F$ (CO$_2$ emissions from energy), \n",
- " - $P$ (global population), \n",
- " - $G$ (world GDP), and \n",
- " - $E$ (global energy consumption).\n",
- "\n",
- "Decomposing emissions in this way helps to see key contributions and, if we assume that the factors are independent of each other (which is not fully true), distinct ways that we can lower emissions. Each factor in this model is important and extreme reductions in one can offset increases in the others. In our case, our emissions $F$ are increasing over time because the Energy Intensity of GDP $\\left[\\frac{E}{G}\\right] $ and the Carbon Intensity of Energy do not together offset enough of our growing GDP ($G$), which is by definition necessary for a growth-based economy.\n",
- "\n",
- "The first four graphs in the Kaya view display these four variables $\\left(P, \\frac{G}{P}, \\frac{E}{G}, \\frac{F}{E}\\right)$, with the fifth plot showing Emissions, $F$. This allows us to compare the importance of, say, economic and population growth on the CO$_2$ emissions and subsequent temperature rise by 2100."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "fd232a4d-c350-4e7b-9519-921800d81e20",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Exercise 1: Population vs. Economic Growth\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- "\n",
- "2. **Develop a scenario**: Turn two *growth* 'control knobs' of En-ROADS, which are the sliders *Economical growth* and *Population growth*. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) if needed. \n",
- "\n",
- "3. **Answer the following questions**:\n",
- "\n",
- "* What can you observe within the *Kaya graph* view? Describe the graphs and interpret them.\n",
- "\n",
- "Read the following dropdown accessible box if you need more information to interpret the Kaya graphs. \n",
- "\n",
- "*Be warned that a reset of all your previous changes might be necessary before. If you would like to save your previous scenario, export it via a click on the* ***Share your scenario*** *button in the top right of the Panel, and select 'Copy Scenario Link'*.\n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1c61eb29-ab14-4445-915e-5d39abab9a73",
- "metadata": {
- "execution": {}
- },
- "source": [
- "\n",
- " Click here for a description of the Kaya identity and the corresponding plots \n",
- "\n",
- "Here is one way to understand the shown trends over time:\n",
- "\n",
- "The Global Population ($P$) of 8 billion people is growing and growth is anticipated to be 11 billion by the end of the century, according to UN projections. The rate of growth is slowing over time as people have smaller families.\n",
- "\n",
- "GDP ($G$) per Capita ($P$) is growing steadily per year, and the model assumes this will continue, mostly as people in rapidly developing countries such as China, India, South Africa, Mexico, Brazil, and Indonesia attain higher standards of living.\n",
- "\n",
- "Energy Intensity ($E$) of GDP is decreasing over time, due to the world economy becoming more efficient, or using less energy per unit of economic output. Technologies are improving - for example, more efficient cars, buildings, and machines—and economies are shifting from manufacturing to services. The product of global population, GDP per capita, and the energy intensity of GDP is the total amount of energy used by the global economy.\n",
- "\n",
- "Carbon Intensity of Final Energy, the amount of carbon dioxide emitted by energy use, is expected to slightly decline over time. Overall, this downward trend in carbon intensity is attributed to the gradual shifting away from fossil fuels and towards low-carbon energy sources.\n",
- "\n",
- "Carbon Dioxide Emissions from Energy are the result of all four factors multiplied together, and you can see that in the Baseline Scenario emissions are growing. As the level of carbon dioxide in the atmosphere correlates with temperature, an increased concentration of carbon dioxide in the atmosphere leads to an increase in global temperatures.\n",
- "\n",
- "These factors explain, in simple terms, why emissions are increasing in the Baseline Scenario. Improvements in efficiency and decarbonization are not yet keeping up with the strong growth in population and consumption\n",
- " \n",
- "*** \n",
- " \n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "id": "e242d987-4e3a-418b-b69c-65fe25e35ed7",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Questions 1:\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "Before using the sliders and answering the following questions, build a brief working hypothesis. Which one of the two 'growth knobs' do you expect will be more influential on the global mean temperature and also how much more? \n",
- "\n",
- "1. What do you observe, when you only change the population growth slider? And vice versa changing only the economic growth slider? \n",
- "2. Combine the effect of both sliders in the common and opposite direction, respectively. Are you surprised about the output?"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "d88106d5-3008-47fe-ab29-9e09a539b369",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "'''\n",
- "1. In En-ROADS the population growth has a small effect on the temperature increase by 2100. On the left, the global population graph emphasizes the development until 2100, resulting in an expected population of 8.8 billion in the lowest growth case and an expected population of 12.56 billion in the largest growth case, respectively.\n",
- "The former leads to a 3.2°C increase and the latter to a 3.5°C which is only a $\\pm$ 0.2°C change due to population growth.\n",
- "In contrast, economic growth has a much larger impact: high growth (+30.000 $/person/year in 2100) leads to a temperature increase of 0.4°C by 2100 and low growth (-20.000 $/person/year in 2100) decreases it by 0.3°C, making discussions of overpopulation rather irrelevant as the decisions around family choice are personal decisions and efforts to shift these decisions have many ethical implications.\n",
- "It is instead raising the question of the necessity to end economic growth or at least to discuss its current coupling to resource exploitation.\n",
- "Note that lower population growth takes a long time to affect emissions because global population shifts do not occur quickly and instead play out over many decades.\n",
- "\n",
- "2. All possible combinations of pop.-econ. -- low-low: 2.9°C, low-no: 3.2°C, low-high: 3.6°C, no-no: 3.3°C, no-low: 3.0°C, no-high: 3.7°C, high-low: 3.1°C, high-no: 3.5°C, high-high: 4.0°C.\n",
- "In terms of an anticipated minimal temperature increase, the best (worst) case is to have a low (high) growth in population and economy. It is better to have a decreasing economy and a growing population than vice versa (increasing economy + shrinking population).\n",
- "Having high population growth and economic growth add up to a larger temperature increase (+0.7°C) than their individual contribution (high pop. growth +0.2°C, high econ. growth +0.4°C) which indicates that these variables are not fully independent in the En-ROADS model.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a92f9886-6e3c-45f2-b6e1-a7f036af03b2",
- "metadata": {
- "execution": {}
- },
- "source": [
- "\n",
- " Click here for a bonus digression on the Limits To Growth \n",
- " \n",
- "### Bonus: A note on exponential growth in a bounded system \n",
- "Consider a bounded system undergoing only positive feedback leading to exponential growth. The characteristic duration of growth until the system state reaches the system boundary is only weakly sensitive to the size of the boundary. For example, in the context of exponential resource-driven economic growth on Earth, reaching the boundary means exhausting its accessible physical resources. Ten times more or less of the starting amount of accessible resources only changes the time at which those resources are exhausted by a factor of 2 up or down, respectively. \n",
- "\n",
- "Physics demands that behind the exponential extraction of resources is an exponential use of an energy resource. In recent times on Earth, this has been fossil fuels, which are non-renewable. Legitimate concerns of peak oil in the late 1990s were quelled by the Shale revolution in the United States and other technological advances in oil and gas exploration and exploitation. These have increased (by a factor between 2 and 4) the total amount of known reserves that can be profitably exploited. While this increase is significant on an linear scale, it is negligible on an exponential scale. Looking forward, the largest estimates for how much larger accessible oil and gas reserves will be are within an order of magnitude of current reserves. Presuming resource-driven growth economics continues, whatever accessible oil and gass is left will then be exhausted within a short period of time (e.g. within a century). \n",
- "\n",
- "Exponential growth in a bounded system will often slow as it reaches the boundary because of boundary-sized feedback effects. In our case, demand growth for fossil fuels is starting to slow with the development of renewable energy sources. There still substantial uncertainty about how these feedbacks will play out. Some questions to consider: \n",
- "- whether the transition to renewable energy sources can happen before we exhaust the associated non-renewable resources. \n",
- "- Once transitioned, whether the non-renewable resource use (e.g. of rare-earth metals) needed to sustain the renewable energy sector is sustainable in a growth-based economics\n",
- "- Once transitioned, whether this renewable energy resource might not slow, but instead accelerate the extraction of all non-renewable resources (see [Jevon's paradox](https://en.wikipedia.org/wiki/Jevons_paradox)). \n",
- "\n",
- "*** \n",
- " \n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "id": "98a285b1-48e1-4c90-9789-584d80231449",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Bonus Section 2: The Economic Impact of Climate Change\n",
- "\n",
- "In the previous day's tutorials, you learned how increases in atmospheric greenhouse gas (GHG) concentrations significantly alter Earth's climate and examined the impacts of these emissions on variables such as sea-surface temperature and oxygen. These changes in climate variables can, in turn, impact the economy. For example, increased temperatures may reduce crop yields or soften road surfaces requiring more frequent or intense repairs.\n",
- "\n",
- "## Bonus Question 2:\n",
- "\n",
- "1. Take a minute to think of some other possible ways in which climate change can affect the economy. Then discuss with your pod."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "920f3d23-5eb9-4f4b-9c43-86e5cbad02b9",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "'''\n",
- "Other potential examples are human health, extreme weather events, sea-level rise, desertification, flooding, species migration.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c78b63df-8bc2-4e0c-898f-a926fce03e4d",
- "metadata": {
- "execution": {}
- },
- "source": [
- "These economic impacts on climate change are considered *economic damage* as they typically result in less or slower economic growth. Economists incorporate the impacts of climate change on the economy into models through a **damage function**, which usually represents climate change by an increase in global temperature, and the impact on the economy as a reduction in [gross domestic product](https://en.wikipedia.org/wiki/Gross_domestic_product) (GDP).\n",
- "\n",
- "You can dive deeper into the control knob functionalities of En-ROADS by changing the quantification of how climate change damages the economy via a reduction in GDP. To have a closer look at the assumptions that go into the model, we click on the 'Simulation' toggle and select 'Assumptions', in the bottom a box of toggles appears. Here we choose the 'Economy' section and click on 'Economic impact of climate change'.\n",
- "\n",
- "### Bonus Exercise 2: Choose a Damage function\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "In this section, 3 dropdowns correspond to 3 assumptions: (1) whether or not climate change slows economic growth, (2) if yes, how strongly as a function of temperature (what is the damage function), and (3) by how much do we discount far future welfare relative to current welfare. \n",
- "\n",
- "1. Hypothesize which parameter needs to be changed to have a less severe damage function.\n",
- "\n",
- "2. Decide which 'related graph' shall be shown on the top left and explain your hypothesis and final choice of the parameter along it.\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "f1055ced-d99b-4c9f-b4e7-fe7176cc58bc",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "'''\n",
- "1. There are two options. We could change one boring parameter and a more exciting one.\n",
- "The former has a strong impact. By turning off the 'Climate change slows economic growth' button, we make the strong assumption that there is less severe damage as asked because there is NO damage at all.\n",
- "In other words, we decoupled GDP and temperature increase which results in even more GHG emissions than in the baseline scenario.\n",
- "To get a more relevant and exciting result, it is better to change the 'Economic damage formulation' instead.\n",
- "\n",
- "2. The default formulation by 'Burke 2018' serves as the baseline.\n",
- "In order to have a less severe damage formulation we could have a look at the 'Reduction in GDP vs. Temperature' plot.\n",
- "However, all other formulations show a more or equal severe damage function than 'Burke 2018' with respect to temperature.\n",
- "Another view, i.e. the 'Gross World Product' in contrast shows that the 'Howard & Sterner' formulation results in less economic damage,\n",
- "which might have been covered in the 'Reduction in GDP vs. Temperature' graph as the scale was going up to 5°C,\n",
- "which we do not reach until 2100 in our simple baseline-like scenario.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "8a3c2b15-e9a4-45df-806e-82efafeb6fe5",
- "metadata": {
- "execution": {}
- },
- "source": [
- "With this, we already discussed a few damage functions in En-Roads. Although they are central to the climate-economy connection of the models, their formulation is relatively ad hoc, which leads to validity issues that are often criticized. \n",
- "\n",
- "There are at least two fundamental problems with damage functions (for more see [*The appallingly bad neoclassical economics of climate change* by S. Keen in *Globalizations* (2020)](https://www.tandfonline.com/doi/full/10.1080/14747731.2020.1807856)):\n",
- "1. As mathematical model objects, they are likely too simple to be useful predictors in characterizing climate damages in sufficient complexity. \n",
- "2. They arise from a poorly validated model-fitting procedure. In particular, it relies on ad hoc functional forms and the relevance of historical and geographical variability to future variability.\n",
- "\n",
- "Despite these problems, damage functions allow economists within the neoclassical paradigm to start seriously considering the damaging effects of climate change."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c688a40e-7c50-45a5-b95e-b66dcd939b99",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this tutorial, we discussed the impact of growth on fossil fuel emissions, in particular population growth vs. economic growth, and its treatment by the world model En-ROADS. Last but not least we introduced the important concept of the damage function to connect climate and economy within a model."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "ad0144cc-224a-4422-a098-18eb1481c841",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial2",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial3.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial3.ipynb
deleted file mode 100644
index d66ef1b15..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial3.ipynb
+++ /dev/null
@@ -1,338 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "ed664fc2",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial3.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "53e42e1c",
- "metadata": {
- "execution": {},
- "vscode": {
- "languageId": "plaintext"
- }
- },
- "source": [
- "# Tutorial 3: The Temporal Dimension of Actions\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "87ef2f44-fb74-4664-8472-4c97158a8d17",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial Objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 15 minutes\n",
- "\n",
- "The last tutorials covered the necessity for an energy transition to tackle the climate emergency and many solutions at once. As emissions accumulate, it becomes substantially harder to succeed the longer we take to make big changes. This tutorial explores the temporal dimension of action, here policies, by using the Climate Solution Simulator named [En-ROADS](https://www.climateinteractive.org/en-roads/).\n",
- "\n",
- "After finishing this tutorial you can\n",
- "\n",
- "* exemplify along the carbon price, why policy-making has to consider the temporal dimension and the needs of the most vulnerable parts of society"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "062c4b1a-6239-4644-a0dd-03fe1342fe99",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "8b4722fe-cbd5-484a-be6d-96ed7aafbf62",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "053ee0ea-d704-45c8-8b4b-aad17216710d",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "5b50c362",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: The IPCC's Transition Narratives and Project Modelling\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', 'g5VRHCcIyxk'),\n",
- " #('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "703ee8f2",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"mtyrb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "29cf9a43-2478-4d14-9faf-193e54378a04",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: When and How Do You Introduce a Carbon Price?\n",
- "\n",
- "You might have recognized that a high ***carbon price*** by default has a strong impact on the temperature increase within the En-ROADS model as it both reduces the carbon intensity of the energy supply and reduces the energy demand. However, the carbon price itself could be introduced now or in 50 years and at different amounts, depending on for example the social cost of such a policy, which makes energy supply more expensive depending on its emissions. Energy producers could pass additional costs to their customers, so policy could be designed to minimize the impacts on the poorest, e.g. by introducing a [Carbon fee and dividend](https://en.wikipedia.org/wiki/Carbon_fee_and_dividend). \n",
- "\n",
- "To account for their temporal evolution, many variables in En-ROADS allow for modifications of the timing when something is introduced, stopped, in or de-creased, and so on."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "d29fb31c-84ab-4705-8678-87f8274f6500",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Exercise 1: Implications of Actions and Their Timing\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- " \n",
- "2. **Develop a scenario**: Click on the ellipsis of the 'Carbon price' slider, and a widget-info box opens that allows for finetuning of your carbon price policy.\n",
- " 1. Click on the title of the top right graph *Greenhouse Gas Net Emissions*, select the 'Financial' toggle, and select the 'Market price of electricity'.\n",
- " 2. Turn the most upper knobs/ vary the sliders of the 'Carbon price' and slide through different carbon prices.\n",
- " 3. Move the sliders to answer the following question. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) if needed.\n",
- "\n",
- "\n",
- "3. **Answer the following questions**:\n",
- " * What do you observe in the 'Market price of electricity' graph after varying the carbon price?\n",
- " * Now, select a high carbon price and increase the 'Year the carbon price starts to phase in'. How does the carbon price change the temporal evolution of the 'Market price of electricity'. \n",
- " * How could this be of consequence for a low-income household?\n",
- "\n",
- "*Be warned that a reset of all your previous changes might be necessary before. If you would like to save your previous scenario, export it via a click on the* ***Share your scenario*** *button in the top right of the Panel, and select 'Copy Scenario Link'*.\n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "c97e6d3d-1718-479b-a19a-ffc6a082347b",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "\n",
- "'''\n",
- "3. The earlier the carbon price starts to phase in the more effective it is regarding the temperature increase.\n",
- "However, the earlier the larger the disturbance of the market price of electricity, emphasized by a strong increase in the price at first\n",
- "and a strong drop in the price after the first few years.\n",
- "This might lead to economic disruptions as energy supply becomes very expensive, therefore low-income households,\n",
- "which usually spend large parts of their income on energy, would need compensation like a 'carbon dividend' to avoid precariat.\n",
- "In summary, actions and their temporal implementation always need to be evaluated in various aspects to be a successful and\n",
- "societal least disruptive action against climate change.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "3562deb9",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this tutorial, we discussed the temporal dimension of the carbon price implementation in order to understand why no policy might be a silver bullet to solve all problems but comes with various ethical and political implications. At last, we discussed a few limitations of the En-ROADs model approach."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "6d0c2c37-0e64-4734-8776-1f455a20987f",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "27636b92",
- "metadata": {
- "execution": {}
- },
- "source": [
- ""
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial3",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial3.jl b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial3.jl
deleted file mode 100644
index e3c0be61d..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial3.jl
+++ /dev/null
@@ -1,2138 +0,0 @@
-### A Pluto.jl notebook ###
-# v0.19.24
-
-using Markdown
-using InteractiveUtils
-
-# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
-macro bind(def, element)
- quote
- local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
- local el = $(esc(element))
- global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
- el
- end
-end
-
-# ╔═╡ 1c8d2d00-b7d9-11eb-35c4-47f2a2aa1593
-begin
- import Pkg
- ENV["JULIA_MARGO_LOAD_PYPLOT"] = "no thank you"
- Pkg.activate(mktempdir())
- Pkg.add([
- Pkg.PackageSpec(name="Plots", version="1"),
- Pkg.PackageSpec(name="ClimateMARGO", version=v"0.3.3"),
- Pkg.PackageSpec(name="PlutoUI", version="0.7"),
- Pkg.PackageSpec(name="HypertextLiteral", version="0.9"),
- Pkg.PackageSpec(name="Underscores", version="2"),
- ])
-
- using Plots
- using Plots.Colors
- using ClimateMARGO
- using ClimateMARGO.Models
- using ClimateMARGO.Optimization
- using ClimateMARGO.Diagnostics
- using PlutoUI
- using HypertextLiteral
- using Underscores
-
- Plots.default(linewidth=5)
-end;
-
-# ╔═╡ 9a48a08e-7281-473c-8afc-7ad3e0771269
-TableOfContents()
-
-# ╔═╡ 94415ff2-32a2-4b0f-9911-3b93e202f548
-const initial_1 = Dict("M" => [2090, 6]);
-
-# ╔═╡ 50d24c91-61ae-4544-98fa-5749bafe3d41
-# md"""
-# ## Overview of the climate problem: from greenhouse gas emissions to climate suffering
-
-# Human emissions of greenhouse gases, especially Carbon Dioxide (CO₂), increase the stock of greenhouse gases in the atmosphere. For every molecule of CO₂ emitted, about 50% are taken up by plants, soils, or the ocean within a few years, while the rest remains in the atmosphere. (The effects of other greenhouse gases, such as Methane and CFCs, and other forcing agents, can approximately be converted into the "CO₂-equivalent"– or CO₂ₑ– concentrations that would lead to the same climate forcing).
-
-# Greenhouse gases get their name because they trap invisible heat radiation emitted by Earth's surface and atmosphere from escaping to space, much like greenhouses trap hot air from rising when it is warmed by the Sun. This "greenhouse effect" causes the temperature to rise globally, although some places warm *more* and *faster* than others. Warmer temperatures exacerbate both the frequency and intensity of "natural" disasters, such as heat waves, coastal flooding from major hurricanes, and inland flooding from torrential rain. These climate impacts lead to enhanced climate suffering, which economics typically attempt to quantify suffering in terms of lost money or welfare.
-
-# In the interactive article below, we invite you to explore the benefits of emissions mitigation and carbon dioxide removal in reducing climate suffering, and the trade-offs with their costs.
-# """
-
-# ╔═╡ e810a90f-f964-4d7d-acdb-fc3a159dc12e
-const initial_2 = Dict("M" => [2080, .7]);
-
-# ╔═╡ a3422533-2b78-4bc2-92bd-737da3c8982d
-const initial_3 = Dict("M" => [2080, .7]);
-
-# ╔═╡ 51037451-0fea-4021-8824-56911970b97b
-const initial_x = Dict("G" => [2030, 1]);
-
-# ╔═╡ 3094a9eb-074d-46c3-9c1e-0a9c94c6ad43
-blob(el, color = "red") = @htl("""
- """)
-
- BondDefault(h,1)
-end
-
-# ╔═╡ c7cbc172-daed-406f-b24b-5da2cc234c29
-preindustrial_concentrations = 280
-
-# ╔═╡ b440cd13-36a9-4c54-9d80-ac3fa7c2900e
-end_of_oil = 2150 # cannot mitigate when fossil fuels are depleted
-
-# ╔═╡ ec760706-15ac-4a50-a67e-c338d70f3b0a
-pp = (;
- ((k, (:color => c, :label => n))
- for (k, c, n) in zip(keys(names), colors, names))...
-);
-
-# ╔═╡ bb4b25e4-0db5-414b-a384-0a27fe7efb66
-gauss_stdev = 30
-
-# ╔═╡ 013807a0-bddb-448b-9300-f7f559e48a45
-begin
- default_usage_error = :(error("Example usage:\n\n@intially [1,2] @bind x f(x)\n"))
-
- macro initially(::Any)
- default_usage_error
- end
-
- macro initially(default, bind_expr::Expr)
- if bind_expr.head != :macrocall || bind_expr.args[1] != Symbol("@bind")
- return default_usage_error
- end
-
- # warn if the first argument is a @bind
- if default isa Expr && default.head == :macrocall && default.args[1] == Symbol("@bind")
- return default_usage_error
- end
-
- esc(intially_function(default, bind_expr))
- end
-
-
- function intially_function(default, bind_expr)
- sym = bind_expr.args[3]
- @gensym setval bond
-
- quote
- if !@isdefined($sym)
- $sym = $default
- end
-
- $setval = $sym
-
-
- $bond = @bind $sym $(bind_expr.args[4])
- PlutoRunner.Bond
-
- if $sym isa Missing
- $sym = $setval
- end
-
- $bond
- end
- end
-end
-
-# ╔═╡ 4e91fb48-fc5e-409e-9a7e-bf846f1d211d
-html"""
-
-"""
-
-# ╔═╡ 3c7271ab-ece5-4ae2-a8dd-dc3670f300f7
-# initial_mrga_1 = Dict(
-# "M" => [2070, 0.7],
-# "R" => [2100, 0.4],
-# "G" => [2170, 0.3],
-# "A" => [2110, 0.1],
-# )
-
-# ╔═╡ dcf265c1-f09b-483e-a361-d54c6c7500c1
-# @initially initial_mrga_1 @bind input_8 begin
-
-# controls_8 = MRGA(
-# gaussish(input_8["M"]...),
-# gaussish(input_8["R"]...),
-# gaussish(input_8["G"]...),
-# gaussish(input_8["A"]...),
-# )
-
-
-# plotclicktracker2(
-# plot_controls(controls_8),
-# initial_mrga_1,
-# )
-# end
-
-# ╔═╡ 10c015ec-780c-4453-83cb-12dd0f09f358
-function plotclicktracker(p::Plots.Plot; draggable::Bool=false)
-
- # we need to render the plot before its dimensions are available:
- # plot_render = repr(MIME"image/svg+xml"(), p)
- plot_render = repr(MIME"image/svg+xml"(), p)
-
- # these are the _bounding boxes_ of our plot
- big = bbox(p.layout)
- small = plotarea(p[1])
-
- # the axis limits
- xl = xlims(p)
- yl = ylims(p)
-
- # with this information, we can form the linear transformation from
- # screen coordinate -> plot coordinate
-
- # this is done on the JS side, to avoid one step in the Julia side
- # we send the linear coefficients:
- r = (
- x_offset = xl[1] - (xl[2] - xl[1]) * small.x0[1] / small.a[1],
- x_scale = (big.a[1] / small.a[1]) * (xl[2] - xl[1]),
- y_offset = (yl[2] - yl[1]) + (small.x0[2] / small.a[2]) * (yl[2] - yl[1]) + yl[1],
- y_scale = -(big.a[2]/ small.a[2]) * (yl[2] - yl[1]),
- x_min = xl[1], # TODO: add margin
- x_max = xl[2],
- y_min = yl[1],
- y_max = yl[2],
- )
-
- HTML("""""")
-end
-
-# ╔═╡ 7e540eaf-8700-4176-a96c-77ee2e4c384b
-years = 2020:12.0:2200
-
-# ╔═╡ 646591c4-cb60-41cd-beb9-506807ce17d2
-function gaussish(mean, magnitude)
- my_stdev = gauss_stdev * (1 + magnitude);
- map(years) do t
- clamp(
- (1.5 *
- magnitude *
- (-0.4 +
- exp(
- (-1 * ((t - mean) * (t - mean))) / (2 * my_stdev * my_stdev)
- ))) /
- (1.0 - 0.4),
- 0.0,
- 1.0
- )
- end
-end
-
-# ╔═╡ 6fb77b13-7a54-4d1d-9985-4735318680e1
-function expcontrol(mean, magnitude)
- sulfur_fraction = 0.33
- initial_value = sulfur_fraction
- map(years) do t
- sulfur_fraction + (magnitude-sulfur_fraction)*(1-exp(-(t-2020)/((mean-2020))))
- end
-end
-
-# ╔═╡ 8fa94ec9-1fab-41b9-a7e6-1917e975e4ff
-function default_parameters()::ClimateModelParameters
- result = deepcopy(ClimateMARGO.IO.included_configurations["default"])
- result.domain = years isa Domain ? years : Domain(step(years), first(years), last(years))
- result.economics.baseline_emissions = ramp_emissions(result.domain)
- result.economics.extra_CO₂ = zeros(size(result.economics.baseline_emissions))
- return result
-end
-
-# ╔═╡ 785c428d-d4f7-431e-94d7-039b0708a78a
-function opt_controls_temp(model_parameters = default_parameters(); opt_parameters...)
-
- model = ClimateModel(model_parameters)
-
- model_optimizer = optimize_controls!(model; opt_parameters..., print_raw_status=false)
-
- (
- result=model,
- status=ClimateMARGO.Optimization.JuMP.termination_status(model_optimizer) |> string,
- )
- # return Dict(
- # :model_parameters => model_parameters,
- # model_results(model)...
- # )
-end
-
-# ╔═╡ 2dcd5669-c725-40b9-84c4-f8399f6e924b
-bigbreak = html"""
-
-""";
-
-# ╔═╡ b8f9efec-63ac-4e58-93cf-9f7199b78451
-function setfieldconvert!(value, name::Symbol, x)
- setfield!(value, name, convert(typeof(getfield(value, name)), x))
-end
-
-# ╔═╡ 371991c7-13dd-46f6-a730-ad89f43c6f0e
-function enforce_maxslope!(controls;
- dt=step(years),
- max_slope=Dict("mitigate"=>1. /40., "remove"=>1. /40., "geoeng"=>1. /80., "adapt"=> 0.)
- )
- controls.mitigate[1] = 0.0
- controls.remove[1] = 0.0
- controls.geoeng[1] = 0.0
- # controls.adapt[1] = 0.0
-
-
- for i in 2:length(controls.mitigate)
- controls.mitigate[i] = clamp(
- controls.mitigate[i],
- controls.mitigate[i-1] - max_slope["mitigate"]*dt,
- controls.mitigate[i-1] + max_slope["mitigate"]*dt
- )
- controls.remove[i] = clamp(
- controls.remove[i],
- controls.remove[i-1] - max_slope["remove"]*dt,
- controls.remove[i-1] + max_slope["remove"]*dt
- )
- controls.geoeng[i] = clamp(
- controls.geoeng[i],
- controls.geoeng[i-1] - max_slope["geoeng"]*dt,
- controls.geoeng[i-1] + max_slope["geoeng"]*dt
- )
- controls.adapt[i] = clamp(
- controls.adapt[i],
- controls.adapt[i-1] - max_slope["adapt"]*dt,
- controls.adapt[i-1] + max_slope["adapt"]*dt
- )
- end
-end
-
-# ╔═╡ e815d175-1c47-4aef-bd89-e7fdc3e4912e
-function enforce_maxslope!2(controls;
- dt=step(years),
- max_slope=Dict("mitigate"=>1. /40., "remove"=>1. /40., "geoeng"=>1. /80., "adapt"=> 0.)
- )
- controls.mitigate[1] = 0.0
- controls.remove[1] = 0.0
- controls.geoeng[1] = 0.0
- # controls.adapt[1] = 0.0
-
-
- for i in 2:length(controls.mitigate)
- controls.mitigate[i] = clamp(
- controls.mitigate[i],
- controls.mitigate[i-1] - max_slope["mitigate"]*dt,
- controls.mitigate[i-1] + max_slope["mitigate"]*dt
- )
- controls.remove[i] = clamp(
- controls.remove[i],
- controls.remove[i-1] - max_slope["remove"]*dt,
- controls.remove[i-1] + max_slope["remove"]*dt
- )
- # controls.geoeng[i] = clamp(
- # controls.geoeng[i],
- # controls.geoeng[i-1] - max_slope["geoeng"]*dt,
- # controls.geoeng[i-1] + max_slope["geoeng"]*dt
- # )
- controls.adapt[i] = clamp(
- controls.adapt[i],
- controls.adapt[i-1] - max_slope["adapt"]*dt,
- controls.adapt[i-1] + max_slope["adapt"]*dt
- )
- end
-end
-
-# ╔═╡ b7ca316b-6fa6-4c2e-b43b-cddb08aaabbb
-function costs_dict(costs, model)
- Dict(
- :discounted => costs,
- :total_discounted => sum(costs .* model.domain.dt),
- )
-end
-
-# ╔═╡ 0a3be2ea-6af6-43c0-b8fb-e453bc2b703b
-
-model_results(model::ClimateModel) = Dict(
- :controls => model.controls,
- :computed => Dict(
- :temperatures => Dict(
- :baseline => T_adapt(model),
- :M => T_adapt(model; M=true),
- :MR => T_adapt(model; M=true, R=true),
- :MRG => T_adapt(model; M=true, R=true, G=true),
- :MRGA => T_adapt(model; M=true, R=true, G=true, A=true),
- ),
- :emissions => Dict(
- :baseline => effective_emissions(model),
- :M => effective_emissions(model; M=true),
- :MRGA => effective_emissions(model; M=true, R=true),
- ),
- :concentrations => Dict(
- :baseline => c(model),
- :M => c(model; M=true),
- :MRGA => c(model; M=true, R=true),
- ),
- :damages => Dict(
- :baseline => costs_dict(damage(model; discounting=true), model),
- :MRGA => costs_dict(damage(model; M=true, R=true, G=true, A=true, discounting=true), model),
- ),
- :costs => Dict(
- :M => costs_dict(cost(model; M=true, discounting=true), model),
- :R => costs_dict(cost(model; R=true, discounting=true), model),
- :G => costs_dict(cost(model; G=true, discounting=true), model),
- :A => costs_dict(cost(model; A=true, discounting=true), model),
- :MRGA => costs_dict(cost(model; M=true, R=true, G=true, A=true, discounting=true), model),
- ),
- ),
-)
-
-
-# ╔═╡ eb0c961d-42cf-4219-a36e-cd492fa31f6b
-const cost_bars_scale = 70
-
-# ╔═╡ ec5d87a6-354b-4f1d-bb73-b3db08589d9b
-total_discounted(costs, model) = sum(costs .* model.domain.dt)
-
-# ╔═╡ 70f01a4d-0aa3-4cd5-ad71-452c490c61ac
-colors_js = Dict((k,string("#", hex(v))) for (k,v) in pairs(colors));
-
-# ╔═╡ ac779b93-e19e-41de-94cb-6a2a919bcd2e
-names_js = Dict(pairs(names));
-
-# ╔═╡ 5c484595-4646-484f-9e75-a4a3b4c2af9b
-function plotclicktracker2(p::Plots.Plot, initial::Dict; draggable::Bool=true)
-
- # we need to render the plot before its dimensions are available:
- # plot_render = repr(MIME"image/svg+xml"(), p)
- plot_render = repr(MIME"image/svg+xml"(), p)
-
- # these are the _bounding boxes_ of our plot
- big = bbox(p.layout)
- small = plotarea(p[1])
-
- # the axis limits
- xl = xlims(p)
- yl = ylims(p)
-
- # with this information, we can form the linear transformation from
- # screen coordinate -> plot coordinate
-
- # this is done on the JS side, to avoid one step in the Julia side
- # we send the linear coefficients:
- r = (
- x_offset = xl[1] - (xl[2] - xl[1]) * small.x0[1] / small.a[1],
- x_scale = (big.a[1] / small.a[1]) * (xl[2] - xl[1]),
- y_offset = (yl[2] - yl[1]) + (small.x0[2] / small.a[2]) * (yl[2] - yl[1]) + yl[1],
- y_scale = -(big.a[2]/ small.a[2]) * (yl[2] - yl[1]),
- x_min = xl[1], # TODO: add margin
- x_max = xl[2],
- y_min = yl[1],
- y_max = yl[2],
- aspect_ratio = big.a[1] / big.a[2],
- )
-
- @htl("""""")
-end
-
-# ╔═╡ 060cbeab-5503-4eda-95d8-3f554765b2ee
-begin
- mutable struct MRGA{T}
- M::T
- R::T
- G::T
- A::T
- end
- # function MRGA(M::TM,R::TR=nothing,G::TG=nothing) where {TM,TR,TG}
- # MRGA{Union{TM,TR,TG,Nothing}}(M,R,G,nothing)
- # end
- function MRGA(;M::TM=nothing,R::TR=nothing,G::TG=nothing,A::TA=nothing) where {TM,TR,TG,TA}
- MRGA{Union{TM,TR,TG,TA}}(M,R,G,A)
- end
-
- MRGA(x) = MRGA(x,x,x,x)
-
- splat(mrga::MRGA) = (:M => mrga.M, :R => mrga.R, :G => mrga.G, :A => mrga.A)
-
- Base.collect(mrga::MRGA) = [mrga.M, mrga.R, mrga.G, mrga.A]
-
- Base.getindex(x::MRGA, pos::MRGA{Bool}) = collect(x)[collect(pos)]
-
- Base.getindex(x::MRGA, tech::Symbol) = getfield(x, tech)
-
- Base.eachindex(m::MRGA) = (:M,:R,:G,:A)
-
- Base.enumerate(mrga::MRGA) = ((:M, mrga.M), (:R, mrga.R), (:G, mrga.G), (:A, mrga.A))
-
- Base.any(m::MRGA{Bool}) = m.M || m.R || m.G || m.A
-
- Base.all(m::MRGA{Bool}) = m.M && m.R && m.G && m.A
-
- MRGA
-end
-
-# ╔═╡ 1bc00b68-15c5-48fe-9994-dc2f543542df
-md"""
-# Tutorial 3 - IAMs and SSPs
-Week 2, Day 3: IPCC Socio-economic Basis
-
-By Neuromatch Academy
-
-Content creators: Maximilian Puelma Touzel
-
-Content reviewers: Peter Ohue, Derick Temfack, Zahra Khodakaramimaghsoud, Peizhen Yang, Younkap Nina DuplexLaura Paccini, Sloane Garelick, Abigail Bodner, Manisha Sinha, Agustina Pesce, Dionessa Biton, Cheng Zhang, Jenna Pearson, Chi Zhang, Ohad Zivan
-
-Content editors: Jenna Pearson, Chi Zhang, Ohad Zivan
-
-Production editors: Wesley Banfield, Jenna Pearson, Chi Zhang, Ohad Zivan
-
-Our 2023 Sponsors: NASA TOPS
-"""
-
-# ╔═╡ 2dacd4cd-68bd-4c31-857e-d8cab04b5180
-md"""
-# Tutorial Objectives
-In this tutorial you'll explore how climate policy best adapts to potential obstacles that can arise in the upcoming years.
-
-You'll run [MARGO](https://github.com/ClimateMARGO/ClimateMARGO.jl), a simple climate model, to explore what it takes to avoid the catastrophic impacts of global warming.
-
-This is a `Pluto` notebook written in the `Julia` programming language. It's similar to the `Python`-written `Jupyter` notebooks you've been working with, with the added benefit of easy interactivity. We rely completely on that interactivity here and so you won't have to code anything or need to know anything about `Julia` or `Pluto`. Just read on and follow the instructions.
-
-*This notebook has been modified extensively for use in ClimateMatch from the [original MARGO notebook](https://margo.plutojl.org/introduction.html) by [Henri F. Drake](https://hdrake.github.io/) and [Fons van der Plas](https://github.com/fonsp/)*
-"""
-
-# ╔═╡ 5e5fc687-32be-4308-b3e5-499e25013afe
-md"""
-# Setup
-"""
-
-# ╔═╡ eda48867-7998-400b-98c9-fcd7ef762dc7
-md"""Helper functions at end of notebook"""
-
-# ╔═╡ 331c45b7-b5f2-4a78-b180-5b918d1806ee
-md"""
-# Section 1: Emissions mitigation and carbon dioxide removal to minimize climate suffering
-"""
-
-#The code in this webpage is *reactive*, meaning that the graphs and numbers automatically update whenever you change the climate model's inputs.
-
-# ╔═╡ f3c9ee51-f43a-45ca-b604-7e09f28bdbd2
-md"""
-Recall the causal chain of climate change from slide 3 from Tutorial 2's video:
-
-Emissions → GHG → Forcing → Temperature → Damages
-
-Each arrow is an potential opportunity to reduce damages: mitigation, Carbon Dioxide Removal (CDR), Solar Radiation Management (SRM), and adaptation, respectively. MARGO is a simple integrated assessment model focussed on simply demonstrating the effects of these 4 controls.
-"""
-
-# ╔═╡ 14f314b1-663d-4415-adc1-bc46869b5ee9
-md"First let's look at the baseline scenario where emissions continue to grow linearly until 2100 and then fall to 0. In this hypothetical no-policy world, the fall to 0 could be because of public health concerns regarding other forms of air pollution, the development of new zero-carbon technologies, running out of extractable fossil fuels resources, and/or collapse of industrial capacity due to climate damages."
-
-# ╔═╡ 0c00a7da-fa98-4253-9770-9a88bb02b849
-md"""
-## Section 1.1: _Can you limit human-caused global warming to "well-below 2ºC"?_
-
-What would our emission-reducing efforts over time have to look like to limit warming to less than 2 degrees? Try it by lowering emissions using the blue dot in the plot below while watching the yellow curve showing the corresponding time course of temperature in the plot below it:
-"""
-
-# ╔═╡ 8f7f21bf-ec5d-4fa8-934a-14231e781f70
-<<<<<<< HEAD
-md"""The length of the bars above this text show the mitigation costs (i.e. the control costs) and the benefit (i.e. the avoided damages) and their difference as the net benefit.
-=======
-md"""The length of the bars above this text show
-- the mitigation cost (top purple bar),
-- the benefit (the avoided damages; the middle organe bar) and
-- their difference as the net benefit (the bottom green bar).
->>>>>>> main
-"""
-
-# ╔═╡ f4b380c9-0ef4-4951-9954-3ddf92ddddb8
-md"""
-Here is a schematic from the MARGO paper that shows the components of this simple, idealized model.
-"""
-
-# ╔═╡ 6533c123-34fe-4c0d-9ecc-7fef11379253
-md"""
-![image](https://raw.githubusercontent.com/ClimateMARGO/MARGO-gifs/0824fda21d17a846c0f8c594c6cac9630d9ebcdf/Margo_schematic.png)
-
-_Figure from: [ClimateMARGO.jl](https://github.com/ClimateMARGO/ClimateMARGO.jl)_
-"""
-
-# ╔═╡ ec325089-8418-4fed-ac0e-e8ae21b433ab
-md"""
-## Section 1.2: Mitigating emissions
-Human greenhouse gas emissions are the result of fossil fuel burning (e.g. for transportation, electricity generation, heating, industry), unsustainable agriculture, and land use changes. We refer to any actions or policies that reduce these emissions as *mitigation*.
-
-The MARGO model lumps all potential mitigation into a single number: the fraction of *baseline* emissions that are mitigated in a given year. Baseline emissions are the emissions that would arise in a hypothetical future world absent of climate policy.
-
-In the plot below (y-axis is the fraction of baseline emissions that are mitigated in a given year), *drag the blue dot around* to vary the amount and timing of mitigation, and observe how these changes affect key climate variables, using the drop-box menu: CO₂ₑ emissions, CO₂ₑ concentrations, and global temperature.
-"""
-
-# ╔═╡ 76411fcd-a8bb-422e-b063-8a460c522fe4
-md"""Pick "Emissions", "Concentrations", or "Temperature" from this dropdown menu to show the respective plot below."""
-
-# ╔═╡ 99d950f9-e3bf-4c18-9f82-0fec6dcb89d6
-md"""
-For a mitigation scheme that keeps temperature to below 3 degrees, by what year do our emissions have to have dropped by 50%? What about for 2 degrees?
-"""
-
-# ╔═╡ 30218715-6469-4a0f-bf90-f3243219e7b5
-md"""
-## Section 1.3: Cost & damages
-So far in this tutorial we have looked at the effects that changes in CO2 emissions and mitigation have on climate (e.g. atmospheric CO2 concentrations and global temperature). It’s also essential to assess the socioeconomic impact of mitigation efforts.
-
-Use the `Next` button to move through the 3 points below and watch the relevant plot appear below.
-"""
-
-# ╔═╡ 8433cb38-915a-46c1-b3db-8e7905351c1b
-@bind cost_benefits_narrative_slide Carousel([
- md"""
- ### 1. The costs of climate suffering
-
- In the absence of climate action, temperatures would rise over 4.5ºC above preindustrial levels (1800 to 1850 average), causing catastrophic climate impacts. MARGO attempts to quantify this suffering by translating the degree of warming into economic damages (in \$ / year). The curve below shows how climate damages rise over time, as a percentage of the World Gross Domestic Product (WGDP) in that year, due to uncontrolled temperature increases.
-
- """,
-
- md"""### 2. Avoiding climate damages
- Emissions mitigation limits future warming and climate suffering (_Damages_ curve). The economic benefits of mitigation are given by the difference in damages relative to the no-policy scenario (_Baseline_ curve minus _Damages_ curve).
-
- In the figure below, drag around the blue dot to change the future mitigation strategy, and observe how the _Avoided damages_ (the grey area) change!
-
- """,
-
- md"""### 3. Cost-benefit analysis
-
- Unfortunately, mitigating CO₂ₑ emissions also carries a cost. In MARGO, the cost of mitigation control is proportional to the fraction of CO₂ₑ emissions that have been mitigated in a given year, increasing up to a maximum of $70 per metric ton of CO₂ₑ at 100% mitigation.
-
- This naturally leads to a **cost-benefit analysis**. We search for the most beneficial, or *optimal*, scenario: the one with the *maximum net present benefits*. In the figure below, try finding a mitigation strategy that optimizes these _Net benefits_.
- """
-]; wraparound=false)
-
-# ╔═╡ 11d62228-476c-4616-9e7d-de6c05a6a53d
-if cost_benefits_narrative_slide == 1
- hidecloack("cost_benefits_narrative_input")
-end
-
-<<<<<<< HEAD
-# ╔═╡ 4c7fccc5-450c-4903-96a6-ce36ff60d280
-md"""
-## Section 1.4: Picking up the slack: carbon dioxide removal
-
-While substantial emissions mitigations are necessary to reduce future climate suffering, they can not make up for the hundreds of billions of tons of CO₂ that humans have already emitted. However, both natural and technological methods for removing CO₂ from the atmosphere exist. Although they are presently miniscule compared to the tens-of-gigatons scale of global emissions, some experts expect that CO₂ removal methods will play a key role in the future once major mitigation goal have been accomplished. In MARGO, we do not distinguish between different carbon dioxide removal methods, and further assume that the carbon is stored permanently.
-
-*Drag the yellow dot in the figure below to modify the amount and timing of carbon dioxide removal*.
-"""
-
-=======
->>>>>>> main
-# ╔═╡ b2d65726-df99-4710-9d03-9f6838036c87
-md"""
-# Section 2: MARGO's automated optimization
-
-<<<<<<< HEAD
-In the above example, *you* manually adjusted the timing and amount of mitigation and carbon dioxide removal to achieve some desired temperature, but did not have much control on the shape of curves. Using a computer algorithm, we can do this optimization step *automatically* and *faster*, without having to assume anything about the shape of the mitigation and carbon dioxide removal curves. This optimization (see the bottom right corner of the model schematic shown above) maximizes the difference of benefits (i.e. avoided damages) and costs (i.e. control costs) under the constraint of a maximum temperature.
-
-Adjust the parameters below to assess their effect on global temperature. First, you can adjust the maximum temperature using the slider, which will set the goal temperature in the bottom plot. Selecting the *allow temperature overshoot* option will allow the projected temperature to temporily exceed the maximum temperature you selected. Next, you can enable various controls (mitigation, removal, geo-engineering, and adaptation) and set the cost multiplier for each which will adjust the costs associated with each approach for reducing damages. Observe how changes in these various settings affect the global temperature projections in the bottom plot.
-=======
-In the above example, *you* manually adjusted the timing and amount of mitigation and carbon dioxide removal, but did not have much control on the shape of curves. Using a computer algorithm, we can do this optimization step *automatically* and *faster*, without having to assume anything about the shape of the mitigation and carbon dioxide removal curves.
-
-The horizontal black line in the bottom plot shows the maximum temperature you select using the slider.
->>>>>>> main
-"""
-
-# ╔═╡ a0a1bb20-ec9b-446d-a36a-272840b8d35c
-blob(
- md"""
- #### Maximum temperature
-
- `0.0 °C` $(Tmax_9_slider) `5.0 °C`
-
- _Allow **temperature overshoot**:_ $(allow_overshoot_9_cb)
-
- """,
- "#c5710014"
-)
-
-# ╔═╡ c1971e19-8ce1-4f80-a00f-2815330e5753
-md"""
-We can see
-- how which of the 4 classes of controls we use (checkbox), and
-- how expensive each is (the cost multiplier sliders)
-affects the optimal solution.
-"""
-
-# ╔═╡ 5f9090d4-1a40-4217-b537-c497cf92976a
-md"""
-Expore the space of optimal solutions within different scenarios you can think of.
-
-For example, mitigation and adaptation are considered two important responses to climate change now. Are they? If we restrict ourselves to only mitigation and adaptation measures, do we use both in equal amounts? When do we start doing them? The result you'll find suggests misplaced emphasis on adaptation relative to mitigation now.
-
-Much of the solution space here uses carbon dioxide removal (orange) at substantial (>10% levels) starting in the next decade or two. Although natural and technological methods for removing CO₂ from the atmosphere exist now, they are presently miniscule compared to the tens-of-gigatons scale of global emissions. Some experts believe that the challenges in scaling these technologies will be overcome and they will play a key role in the future. Other experts argue there are inherent limitations to such technologies and useful only as fine adjustments later in the century and that any emphasis on them now takes away from more effective mitigation efforts. Toggle carbon removal on and off to see the effect. Do we still use these removal controls if they are more expensive?
-"""
-
-# ╔═╡ 38ff6efc-ccf1-4ca3-8437-152784a98a9e
-md"""
-# Section 3: From Unaware to Purposeful Solar Radiation Management
-
-Various regulations arising from well-established public health concerns (mostly regarding air quality) have been successful at significantly reducing over the last decades the amount of aerosols we emit when burning fossil fuels (e.g. China, *circa* 2010 and sulfur emissions from freight shipping, *circa* 2020).
-
-<<<<<<< HEAD
-Over the year or so that it takes the typical aerosol particle to fall out of the atmosphere, they reflect sunlight to space and have an effective negative contribution to radiative forcing. The IPCC estimates at least 0.5 degrees of warming has been masked by yearly sulfur emissions alone (i.e. if we stopped emitting sulfur the global average temperature would go up by 0.5 degrees as existing sulfur aerosols fall out of the atmosphere). The effective warming effects of reducing aerosol emissions are typically absent from assessments of how aerosols affect public health.
-=======
-Over the year or so that it takes the typical aerosol particle to fall out of the atmosphere after being emitted, they reflect sunlight to space and have an effective negative contribution to radiative forcing. The IPCC estimates at least 0.5 degs of warming has been masked by sulfur alone.
->>>>>>> main
-
-The effective warming effects of reducing aerosol emissions are typically absent from assessments of how aerosols affect public health. At the expense of accelerated global warming, our society is likely to continue reducing aerosols for the public health benefit in the near future.
-
-<<<<<<< HEAD
-Let's use MARGO to simulate how we manage (purposefully or not) our aerosol emissions using a baseline (uncontrolled) scenario in which we are ignorant of the associated warming of their reduction and do not apply any of the other controls (mitigation, removal, or adaptation). Our control is a reduction knob of the total aerosol forcing budget of 1.5 $$W/m^2$$ normalized from 0 (no reduction) to 1 (full reduction). Consistent with the large sulfur reductions in recent years, let's assume we've eliminated sulfur so our initial control is a pulse up to 1/3 (a socalled _termination shock_).
-
-What are the effects on global temperature of continuing to reduce our aerosol emissions?
-"""
-
-# ╔═╡ edcb60ca-6dc8-4d6b-b722-d3b2a621a305
-md"""
-# Summary
-In this tutorial you explored components of MARGO, a simple climate model with dynamic mitigation controls that allow us to assess the measures needed to avoid the worst impacts of global warming. First, varied the amount and timing of CO2 emissions and mitigation efforts to investigate how these changes affect global warming. You then explored the socioeconomic impact of mitigation efforts on factors such as control costs, climate damages and net benefits and also assessed the combined impact of carbon dioxide removal and mitigation efforts on global CO2. Finally, you further analyzed the socioeconomic impact of global warming and mitigation efforts using MARGO’s automated optimization computer algorithm.
-"""
-
-# ╔═╡ 3f44b23a-f772-4988-9f35-e477b3439219
-md"""
-# Resources
-The model code from the MARGO simulations used in this tutorial can be accessed [here](https://github.com/ClimateMARGO/ClimateMARGO.jl).
-=======
-Estimation uncertainty of aerosol forcing is relatively large but the current best estimates are -1.5 to -1 $$W/m^2$$, with sulfate alone contributing about -0.5 $$W/m^2$$.
-More recent analysis suggests aerosol reductions over the last decades are in the process of significantly increasing the warming rate over the next decade ([Hansen et al. 2022](https://arxiv.org/ftp/arxiv/papers/2212/2212.04474.pdf)).
-
-Let's use MARGO to simulate how we manage (purposefully or not) our aerosol emissions. We'll use a baseline (i.e. uncontrolled) scenario in which we are ignorant of the associated warming of thier reduction. We also assume we do not apply any of the other controls (mitiation, removal, or adaptation). Our control is a reduction knob of a total aerosol forcing budget of 1.5 $$W/m^2$$ normalized from 0 (no reduction) to 1 (full reduction). Consistent with the large sulfur reductions in recent years, let's assume we've eliminated sulfur so our initial control is a pulse up to 1/3 (a socalled _termination shock_).
-
-To assess the effects on global temperature of different scenarios of aerosol reductions, move around the red dot below.
-"""
-
-# ╔═╡ 1bb0a463-4998-44fc-b5f2-998bddf6aee4
-md"""
-- By how much does temperature go up relative to the baseline if we remove all aerosols? If we remove 50%?
-- What is the temperature difference between removing them immediately versus over the rest of the century?
-- What if over the next two decades we deployed non-controversial (available and safe) SRM technology (e.g. surface reflectors) at scale that were able to replicate the cooling effects of the sulfur we have just removed? Do we get back to the baseline?
->>>>>>> main
-"""
-
-# ╔═╡ 4e1524e9-27d2-45a7-9ebd-21e6e369c4a7
-md"""
-# Appendix
-"""
-
-# ╔═╡ d5ab2398-2904-4b44-a855-e4729996bc0d
-md"""
-Example of running the model:
-"""
-
-# ╔═╡ 14623e1f-7719-47b1-8854-8070d5ef8e17
-md"""
-## Plot functions
-"""
-
-# ╔═╡ a9b1e7fa-0318-41d8-b720-b8615c047bcd
-plot_controls(c::ClimateMARGO.Models.Controls) = plot_controls(MRGA(
- c.mitigate,
- c.remove,
- c.geoeng,
- c.adapt
-))
-
-# ╔═╡ d9d20714-0689-449f-8e52-603dc804c93f
-yearticks = collect(2020:20:2200)
-
-# ╔═╡ cabc3214-1036-433b-aae1-6964bb780be8
-function finish!(p)
- plot!(p;
- xlim=(2020,2201),
- xticks=yearticks,
- size=(680,200),
- grid=false,
- )
-end
-
-# ╔═╡ 2fec1e12-0218-4e93-a6b5-3711e6910d79
-function plot_costs(result::ClimateModel;
- show_baseline::Bool=true,
- show_controls::Bool=true,
- show_damages::Bool=true,
- title="Control costs & climate damages"
- )
-
- p = plot(;
- ylim=(0,25.1), left_margin=2.25Plots.Measures.mm,
- ylabel="trillion USD / year",
- )
- title === nothing || plot!(p; title=title)
-
-
- # baseline
- show_baseline && plot!(p,
- years, damage(result; discounting=true);
- pp.baseline_damages...,
- fillrange=zero(years),
- fillopacity=.2,
- linestyle=:dash,
- )
-
- # control costs
- controlled_damages = damage(result; M=true, R=true, G=true, A=true, discounting=true)
-
- show_controls && plot!(p,
- years, controlled_damages .+ cost(result; M=true, R=true, G=true, A=true, discounting=true);
- fillrange=controlled_damages,
- fillopacity=.2,
- pp.controls...
- )
-
-
- # controlled damages
- show_damages && plot!(p,
- years, controlled_damages;
- fillrange=zero(years),
- fillopacity=.2,
- pp.damages...
- )
-
- finish!(p)
-
-end
-
-# ╔═╡ cff9f952-4850-4d55-bb8d-c0a759d1b7d8
-function plot_concentrations(result::ClimateModel;
- relative_to_preindustrial::Bool=true)
- Tmax = 5
- p = relative_to_preindustrial ? plot(;
- ylim=(0,4.5),
- yticks=[1,2,3,4],
- yformatter=x -> string(Int(x), "×"),
- title="Atmospheric CO₂ₑ concentration, relative to 1800-1850",
- ) : plot(;
- ylim=(0,1400),
- ylabel="ppm",
- title="Atmospheric CO₂ₑ concentration",
- )
-
- factor = relative_to_preindustrial ? preindustrial_concentrations : 1
-
- # baseline
- plot!(p,
- years, c(result) ./ factor;
- pp.baseline_concentrations...,
- linestyle=:dash,
- )
- # controlled temperature
- plot!(p,
- years, c(result; M=true, R=true) ./ factor;
- pp.concentrations...
- )
-
-
- finish!(p)
-end
-
-# ╔═╡ c73c89a7-f652-4554-95e9-20f47a818996
-function plot_controls(controls::MRGA; title=nothing, reverse=false)
-
- p = plot(;
- ylim=(0,1),
- )
- title === nothing || plot!(p; title=title)
-
- for (tech, c) in enumerate(controls)
- if c !== nothing
- which = tech === :M ? (years .< end_of_oil) : eachindex(years)
- if ~reverse
- plot!(p,
- years[which], c[which];
- pp[tech]...
- )
- else
- plot!(p,
- years[which], -c[which];
- pp[tech]...
- )
- end
- end
- end
-
- finish!(p)
-
-end
-
-# ╔═╡ 373cba19-511e-483e-8bfe-14bbb92d5a21
-@initially initial_x @bind input_x begin
-
- local t = input_x["G"][1]
- local y = input_x["G"][2]
-
- controls_x = MRGA(
- G=-expcontrol(t, y)
- )
- # controls_x = MRGA(
- # G=gaussish(input_x["G"]...),
- # )
- # controls_x = MRGA(
- # G=gaussish(t, y*clamp(.07 * (10 - y), 0, 1))
- # )
-
-
- plotclicktracker2(
-<<<<<<< HEAD
- plot_controls(controls_x; title="Controlled reduction of aerosols (1=full reduction of 1.5 W/m2)", reverse=true),
-=======
- plot_controls(controls_x; title="Controlled reduction of aerosols (1=full reduction of 1.5 W/m2)",reverse=true),
->>>>>>> main
- initial_x
- )
-end
-
-# ╔═╡ 6634bcf1-8af6-4000-9b00-a5b4c02596c6
-function plot_emissions(result::ClimateModel)
-
- p = plot(;
- ylim=(-3,11), left_margin=1.75Plots.Measures.mm,
- ylabel="ppm / year",
- title="Global CO₂ₑ emissions",
- )
-
-
-
-
- # baseline
- plot!(p,
- years, effective_emissions(result);
- pp.baseline_emissions...,
- linestyle=:dash,
- )
- # controlled
- plot!(p,
- years, effective_emissions(result; M=true, R=true);
- fillrange=zero(years),
- fillopacity=.2,
- pp.emissions...
- )
-
-
- finish!(p)
-
-end
-
-# ╔═╡ 424940e1-06ef-453a-8ffb-deb24dadb334
-function plot_emissions_pretty(result::ClimateModel)
- # offset the x values so that framestyle=:origin will make the y-axis pass through 2020 instead of 0. yuck
- R = x -> x + 2020
- L = x -> x - 2020
-
- Tmax = 5
- p = plot(;
- ylim=(-3,11),
- ylabel="ppm / year",
- framestyle = :origin,
- xformatter=string ∘ Int ∘ R,
- )
-
-
-
-
- # baseline
- plot!(p,
- L.(years), effective_emissions(result);
- pp.baseline_emissions...,
- linestyle=:dash,
- )
- # controlled temperature
- plot!(p,
- L.(years), effective_emissions(result; M=true, R=true);
- fillrange=zero(L.(years)),
- fillopacity=.2,
- pp.emissions...
- )
-
-
- finish!(p)
-
- plot!(p;
- xlim=L.(extrema(years)),
- xticks = L.(yearticks),
- )
-end
-
-# ╔═╡ 700f982d-85da-4dc1-9319-f3b2527d0308
-function plot_temp(result::ClimateModel)
- Tmax = 6
-
- # setup
- p = plot(;
- ylim=(0,Tmax),
- yticks=[0,1,2,3],
- yformatter=x -> string("+", Int(x), " °C"),
- title="Global warming relative to 1800-1850",
- )
-
- # shade dangerously high temperatures
- for a in [2,3]
- plot!(p,
- collect(extrema(years)),
- [a,a],
- linewidth=0,
- label=nothing,
- fillrange=[Tmax,Tmax],
- fillcolor=colors.above_paris
- )
- end
-
- # baseline
- plot!(p,
- years, T_adapt(result; splat(MRGA(false))...);
- pp.baseline_temperature...,
- linestyle=:dash,
- )
- # controlled temperature
- plot!(p,
- years, T_adapt(result; splat(MRGA(true))...);
- pp.temperature...
- )
-
-
- finish!(p)
-end
-
-# ╔═╡ ab557633-e0b5-4439-bc81-d274770f2e65
-md"""
-## Plot dots input magic
-"""
-
-# ╔═╡ 2758b185-cd54-484e-bb7d-d4cfcd2d39f4
-md"""
-## Running the model
-"""
-
-# ╔═╡ 611c25ab-a454-4d52-b8fb-a58b0d1f5ca6
-function forward_controls_temp(controls::MRGA=MRGA(), model_parameters=default_parameters())
-
-
- model = ClimateModel(model_parameters)
-
- translations = Dict(
- :M => :mitigate,
- :R => :remove,
- :G => :geoeng,
- :A => :adapt,
- )
- for (k, v) in enumerate(controls)
- if v !== nothing
- setfieldconvert!(model.controls, translations[Symbol(k)], copy(v))
- end
- end
-
- enforce_maxslope!(model.controls)
-
- model
- # return Dict(
- # :model_parameters => model_parameters,
- # model_results(model)...
- # )
-end
-
-# ╔═╡ 9aa73ce0-cec6-4d53-bbbc-f5c85de7b521
-@initially initial_1 @bind input_1 begin
-
- local t = input_1["M"][1]
- local y = input_1["M"][2]
-
- controls_1 = MRGA(
- M=gaussish(t, clamp(.07 * (10 - y), 0, 1)),
- R=gaussish(t, clamp(.07 * (10 - y) * 0.25, 0, 1)),
- )
-
- result_1 = forward_controls_temp(controls_1)
-
- plotclicktracker2(
- plot_emissions(result_1),
- initial_1
- )
-end
-
-# ╔═╡ 65d31fbf-322d-459a-a2dd-2894edbecc4d
-plot_temp(result_1)
-
-# ╔═╡ ff2b1c0a-e419-4f41-aa3b-d017642ffc13
-@initially initial_2 @bind input_2 begin
-
-
- controls_2 = MRGA(
- M=gaussish(input_2["M"]...),
- )
-
- result_2 = forward_controls_temp(controls_2)
-
- plotclicktracker2(
- plot_controls(controls_2; title="Deployment of mitigation"),
- initial_2
- )
-end
-
-# ╔═╡ 02851ee9-8050-4821-b3c9-1f65c9b8135b
-if which_graph_2 == "Emissions"
- plot_emissions(result_2)
-elseif which_graph_2 == "Concentrations"
- plot_concentrations(result_2; relative_to_preindustrial=true)
-else
- plot_temp(result_2)
-end
-
-# ╔═╡ f4203dcf-b251-4e2b-be07-922bc7c4496d
-(@initially initial_3 @bind input_3 begin
-
-
- controls_3 = MRGA(
- M=gaussish(input_3["M"]...),
- )
-
- result_3 = forward_controls_temp(controls_3)
-
- plotclicktracker2(
- plot_controls(controls_3; title="Deployment of mitigation"),
- initial_3
- )
-end) |> cloak("cost_benefits_narrative_input")
-
-# ╔═╡ 3e26d311-6abc-4b2c-ada4-f8a3171d9f75
-if cost_benefits_narrative_slide == 1
- local uncontrolled = ClimateModel(default_parameters())
- plot_costs(uncontrolled; show_controls=false, show_baseline=false)
-elseif cost_benefits_narrative_slide == 2
- plot_costs(result_3; show_controls=false)
-else
- plot_costs(result_3)
-end
-
-# ╔═╡ 182b58bf-3733-400e-9d91-425615d36f1b
-
-function forward_controls_temp2(controls::MRGA=MRGA(), model_parameters=default_parameters())
- model_parameters.economics.Finf =1.5
-
- model = ClimateModel(model_parameters)
-
- translations = Dict(
- :M => :mitigate,
- :R => :remove,
- :G => :geoeng,
- :A => :adapt,
- )
- for (k, v) in enumerate(controls)
- if v !== nothing
- setfieldconvert!(model.controls, translations[Symbol(k)], copy(v))
- end
- end
-
- enforce_maxslope!2(model.controls)
-
- model
- # return Dict(
- # :model_parameters => model_parameters,
- # model_results(model)...
- # )
-end
-
-# ╔═╡ 37c056fc-a3e9-47ad-89d5-72e6a36a243d
-result_x = forward_controls_temp2(controls_x);
-
-# ╔═╡ 5a80d968-2664-4b4f-89d1-845279e419ee
-plot_temp(result_x)
-
-# ╔═╡ 89752d91-9c8e-4203-b6f1-bdad41386b31
-shortname = MRGA("M","R","G","A")
-
-# ╔═╡ ff2709a4-516f-4066-b5b2-617ac0e5f20c
-mediumname = MRGA("mitigate", "remove", "geoeng", "adapt")
-
-# ╔═╡ 2821b722-75c2-4072-b142-d13553a84b7b
-longname = MRGA("Mitigation", "Removal", "Geo-engineering", "Adaptation")
-
-# ╔═╡ 8e89f521-c19d-4f87-9497-f9b61c19c176
-let
- default_cost = let
- e = default_parameters().economics
- MRGA(e.mitigate_cost, e.remove_cost, e.geoeng_cost, e.adapt_cost)
- end
- blob(
- @htl("""
-
Which controls?
-
-
-
-
-
-
Enabled?
Cost multiplier
-
-
-
-
-
$(longname.M)
-
$(@bind enable_M_9 CheckBox(;default=true))
-
$(@bind cost_M_9 multiplier(default_cost.M, 4))
-
-
-
-
$(longname.R)
-
$(@bind enable_R_9 CheckBox(;default=true))
-
$(@bind cost_R_9 multiplier(default_cost.R, 4))
-
-
-
-
$(longname.G)
-
$(@bind enable_G_9 CheckBox(;default=false))
-
$(@bind cost_G_9 multiplier(default_cost.G, 4))
-
-
-
-
$(longname.A)
-
$(@bind enable_A_9 CheckBox(;default=false))
-
$(@bind cost_A_9 multiplier(default_cost.A, 4))
-
-
-
-
- """),
- "#c500b40a"
- )
-end
-
-# ╔═╡ a83e47fa-4b48-4bbc-b210-382d1cf19f55
-control_enabled_9 = MRGA(
- enable_M_9,
- enable_R_9,
- enable_G_9,
- enable_A_9,
-);
-
-# ╔═╡ 242f3109-244b-4884-a0e9-6ea8950ca47e
-control_cost_9 = MRGA(
- Float64(cost_M_9),
- Float64(cost_R_9),
- Float64(cost_G_9),
- Float64(cost_A_9),
-);
-
-# ╔═╡ f861935a-8b03-426e-aebe-6963e034ad49
-output_9 = let
- parameters = default_parameters()
-
- parameters.economics.mitigate_cost = control_cost_9.M
- parameters.economics.remove_cost = control_cost_9.R
- parameters.economics.geoeng_cost = control_cost_9.G
- parameters.economics.adapt_cost = control_cost_9.A
- # modify the parameters here!
-
- opt_controls_temp(parameters;
- temp_overshoot=allow_overshoot_9 ? 999.0 : Tmax_9,
- temp_goal=Tmax_9,
- max_deployment=let
- e = control_enabled_9
- Dict(
- "mitigate" => e.M ? 1.0 : 0.0,
- "remove" => e.R ? 1.0 : 0.0,
- "geoeng" => e.G ? 1.0 : 0.0,
- "adapt" => e.A ? 0.4 : 0.0,
- )
- end,
- )
-end
-
-# ╔═╡ 6978acad-9cac-4490-85fb-7e43d9558aca
-plot_controls(output_9.result.controls) |> feasibility_overlay(output_9)
-
-# ╔═╡ 7a435e46-4f36-4037-a9a6-d296b20bf6ac
-plot!(plot_temp(output_9.result),
- years, zero(years) .+ Tmax_9;
- lw=2,
- pp.T_max...
- )
-
-# ╔═╡ 7ffad0f8-082b-4ca1-84f7-37c08d5f7266
-md"""
-## Cost bars
-"""
-
-# ╔═╡ 608b50e7-4419-4dfb-8d9e-5144d4034c05
-function avoided_damages_bars(result)
- td(x) = total_discounted(x, result)
-
- baseline_damages = td(damage(result; discounting=true))
- controlled_damages = td(damage(result; splat(MRGA(true))..., discounting=true))
-
- avoided_damages = baseline_damages - controlled_damages
-
- costs = td(cost(result; splat(MRGA(true))..., discounting=true))
-
- @htl("""
-
-
- """)
-end
-
-# ╔═╡ 2c1416cf-9b6b-40a0-b714-16853c7e1f1d
-if cost_benefits_narrative_slide >= 2
- avoided_damages_bars(result_3)
-end
-
-# ╔═╡ 31a30755-1d8b-451b-8c9a-2c32a3a1d0b4
-function cost_bars(result; offset_damages=false)
- td(x) = total_discounted(x, result)
-
- baseline_damages = td(damage(result; discounting=true))
- controlled_damages = td(damage(result; splat(MRGA(true))..., discounting=true))
-
- avoided_damages = baseline_damages - controlled_damages
-
- costs = td(cost(result; splat(MRGA(true))..., discounting=true))
-
- @htl("""
-
-
- """)
-end
-
-# ╔═╡ 470d2f6f-fe97-4edd-8aaa-142bc8046fe8
-cost_bars(result_1)
-
-# ╔═╡ 5154aac7-812d-447f-8435-b8209d45fe04
-if cost_benefits_narrative_slide >= 3
- cost_bars(result_3; offset_damages=true)
-else
- bigbreak
-end
-
-# ╔═╡ 7f9df132-61de-4fec-a674-176c4a43335c
-md"""
-## MRGA struct
-"""
-
-# ╔═╡ 354b9d8a-7c3f-456b-9da9-4396ac975743
-function MR(x::T,y::T) where T
- MRGA{T}(x, y, zero(x), zero(x))
-end
-
-# ╔═╡ Cell order:
-# ╟─9a48a08e-7281-473c-8afc-7ad3e0771269
-# ╟─1bc00b68-15c5-48fe-9994-dc2f543542df
-# ╟─2dacd4cd-68bd-4c31-857e-d8cab04b5180
-# ╟─5e5fc687-32be-4308-b3e5-499e25013afe
-# ╟─eda48867-7998-400b-98c9-fcd7ef762dc7
-# ╟─331c45b7-b5f2-4a78-b180-5b918d1806ee
-# ╟─f3c9ee51-f43a-45ca-b604-7e09f28bdbd2
-# ╟─14f314b1-663d-4415-adc1-bc46869b5ee9
-# ╟─0c00a7da-fa98-4253-9770-9a88bb02b849
-# ╟─9aa73ce0-cec6-4d53-bbbc-f5c85de7b521
-# ╟─65d31fbf-322d-459a-a2dd-2894edbecc4d
-# ╟─470d2f6f-fe97-4edd-8aaa-142bc8046fe8
-# ╟─8f7f21bf-ec5d-4fa8-934a-14231e781f70
-# ╟─94415ff2-32a2-4b0f-9911-3b93e202f548
-# ╟─f4b380c9-0ef4-4951-9954-3ddf92ddddb8
-# ╟─6533c123-34fe-4c0d-9ecc-7fef11379253
-# ╟─50d24c91-61ae-4544-98fa-5749bafe3d41
-# ╟─ec325089-8418-4fed-ac0e-e8ae21b433ab
-# ╟─ff2b1c0a-e419-4f41-aa3b-d017642ffc13
-# ╟─e846c6e2-aa63-40db-8592-c9563bbbdd40
-# ╟─76411fcd-a8bb-422e-b063-8a460c522fe4
-# ╟─02851ee9-8050-4821-b3c9-1f65c9b8135b
-# ╟─99d950f9-e3bf-4c18-9f82-0fec6dcb89d6
-# ╟─e810a90f-f964-4d7d-acdb-fc3a159dc12e
-# ╟─30218715-6469-4a0f-bf90-f3243219e7b5
-# ╟─8433cb38-915a-46c1-b3db-8e7905351c1b
-# ╟─3e26d311-6abc-4b2c-ada4-f8a3171d9f75
-# ╟─f4203dcf-b251-4e2b-be07-922bc7c4496d
-# ╟─2c1416cf-9b6b-40a0-b714-16853c7e1f1d
-# ╟─5154aac7-812d-447f-8435-b8209d45fe04
-# ╟─11d62228-476c-4616-9e7d-de6c05a6a53d
-# ╟─a3422533-2b78-4bc2-92bd-737da3c8982d
-# ╟─b2d65726-df99-4710-9d03-9f6838036c87
-# ╟─70173466-c9b5-4227-8fba-6256fc1ecace
-# ╟─6bcb9b9e-e0ab-45d3-b9b9-3d7282f89df6
-# ╟─a0a1bb20-ec9b-446d-a36a-272840b8d35c
-# ╟─c1971e19-8ce1-4f80-a00f-2815330e5753
-# ╟─8e89f521-c19d-4f87-9497-f9b61c19c176
-# ╟─6978acad-9cac-4490-85fb-7e43d9558aca
-# ╟─7a435e46-4f36-4037-a9a6-d296b20bf6ac
-# ╟─5f9090d4-1a40-4217-b537-c497cf92976a
-# ╟─a83e47fa-4b48-4bbc-b210-382d1cf19f55
-# ╟─242f3109-244b-4884-a0e9-6ea8950ca47e
-# ╟─38ff6efc-ccf1-4ca3-8437-152784a98a9e
-# ╟─51037451-0fea-4021-8824-56911970b97b
-# ╟─373cba19-511e-483e-8bfe-14bbb92d5a21
-# ╟─37c056fc-a3e9-47ad-89d5-72e6a36a243d
-# ╟─5a80d968-2664-4b4f-89d1-845279e419ee
-<<<<<<< HEAD
-# ╟─edcb60ca-6dc8-4d6b-b722-d3b2a621a305
-# ╟─3f44b23a-f772-4988-9f35-e477b3439219
-=======
-# ╟─1bb0a463-4998-44fc-b5f2-998bddf6aee4
->>>>>>> main
-# ╟─4e1524e9-27d2-45a7-9ebd-21e6e369c4a7
-# ╟─1c8d2d00-b7d9-11eb-35c4-47f2a2aa1593
-# ╟─d5ab2398-2904-4b44-a855-e4729996bc0d
-# ╟─f861935a-8b03-426e-aebe-6963e034ad49
-# ╟─3094a9eb-074d-46c3-9c1e-0a9c94c6ad43
-# ╟─b428e2d3-e1a9-4e4e-a64f-61048572102f
-# ╟─0b31eac2-8efd-47cd-9571-a2053846343b
-# ╟─ca104939-a6ca-4e70-a47a-1eb3c32db18f
-# ╟─cf90139c-13d8-42a7-aba3-8c431e7854b8
-# ╟─bd2bfa3c-a42e-4975-a543-84541f66b1c1
-# ╟─8cab3d28-a457-4ccc-b053-38cd003bf4d1
-# ╟─b81de514-2506-4243-8235-0b54dd4a7ec9
-# ╟─73e01bd8-f56b-4bb5-a9a2-85ad223c9e9b
-# ╟─ae92ba1f-5175-4704-8240-2de8432df752
-# ╟─8ac04d55-9034-4c29-879b-3b10887a616d
-# ╟─14623e1f-7719-47b1-8854-8070d5ef8e17
-# ╟─2fec1e12-0218-4e93-a6b5-3711e6910d79
-# ╟─cff9f952-4850-4d55-bb8d-c0a759d1b7d8
-# ╟─c73c89a7-f652-4554-95e9-20f47a818996
-# ╟─a9b1e7fa-0318-41d8-b720-b8615c047bcd
-# ╟─6634bcf1-8af6-4000-9b00-a5b4c02596c6
-# ╟─424940e1-06ef-453a-8ffb-deb24dadb334
-# ╟─700f982d-85da-4dc1-9319-f3b2527d0308
-# ╟─cabc3214-1036-433b-aae1-6964bb780be8
-# ╟─d9d20714-0689-449f-8e52-603dc804c93f
-# ╟─c7cbc172-daed-406f-b24b-5da2cc234c29
-# ╟─b440cd13-36a9-4c54-9d80-ac3fa7c2900e
-# ╟─ec760706-15ac-4a50-a67e-c338d70f3b0a
-# ╟─ab557633-e0b5-4439-bc81-d274770f2e65
-# ╟─bb4b25e4-0db5-414b-a384-0a27fe7efb66
-# ╟─646591c4-cb60-41cd-beb9-506807ce17d2
-# ╟─6fb77b13-7a54-4d1d-9985-4735318680e1
-# ╟─5c484595-4646-484f-9e75-a4a3b4c2af9b
-# ╟─013807a0-bddb-448b-9300-f7f559e48a45
-# ╟─4e91fb48-fc5e-409e-9a7e-bf846f1d211d
-# ╟─3c7271ab-ece5-4ae2-a8dd-dc3670f300f7
-# ╟─dcf265c1-f09b-483e-a361-d54c6c7500c1
-# ╟─10c015ec-780c-4453-83cb-12dd0f09f358
-# ╟─2758b185-cd54-484e-bb7d-d4cfcd2d39f4
-# ╟─8fa94ec9-1fab-41b9-a7e6-1917e975e4ff
-# ╟─611c25ab-a454-4d52-b8fb-a58b0d1f5ca6
-# ╟─182b58bf-3733-400e-9d91-425615d36f1b
-# ╟─785c428d-d4f7-431e-94d7-039b0708a78a
-# ╟─7e540eaf-8700-4176-a96c-77ee2e4c384b
-# ╟─89752d91-9c8e-4203-b6f1-bdad41386b31
-# ╟─ff2709a4-516f-4066-b5b2-617ac0e5f20c
-# ╟─2821b722-75c2-4072-b142-d13553a84b7b
-# ╟─2dcd5669-c725-40b9-84c4-f8399f6e924b
-# ╟─b8f9efec-63ac-4e58-93cf-9f7199b78451
-# ╟─371991c7-13dd-46f6-a730-ad89f43c6f0e
-# ╟─e815d175-1c47-4aef-bd89-e7fdc3e4912e
-# ╟─0a3be2ea-6af6-43c0-b8fb-e453bc2b703b
-# ╟─b7ca316b-6fa6-4c2e-b43b-cddb08aaabbb
-# ╟─7ffad0f8-082b-4ca1-84f7-37c08d5f7266
-# ╟─eb0c961d-42cf-4219-a36e-cd492fa31f6b
-# ╟─608b50e7-4419-4dfb-8d9e-5144d4034c05
-# ╟─31a30755-1d8b-451b-8c9a-2c32a3a1d0b4
-# ╟─ec5d87a6-354b-4f1d-bb73-b3db08589d9b
-# ╟─70f01a4d-0aa3-4cd5-ad71-452c490c61ac
-# ╟─ac779b93-e19e-41de-94cb-6a2a919bcd2e
-# ╟─7f9df132-61de-4fec-a674-176c4a43335c
-# ╟─060cbeab-5503-4eda-95d8-3f554765b2ee
-# ╟─354b9d8a-7c3f-456b-9da9-4396ac975743
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial4.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial4.ipynb
deleted file mode 100644
index f6ae31c66..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial4.ipynb
+++ /dev/null
@@ -1,775 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial4.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 4: The Shared Socio-economic Pathways\n",
- "\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial Objectives\n",
- "\n",
- "In this tutorial, you will learn about Integrated Assessment Models (IAMs), a class of models that combine climatology, economics, and social science, reflecting the intertwined nature of these domains in addressing climate change. Based on these models the IPCC established the socioeconomic pathway framework. You are going to learn how these pathways differ from one another in both climate and socioeconomic variables as well as assumptions.\n",
- "\n",
- "After finishing this tutorial, you will know how to \n",
- "\n",
- "- filter data series of interest from a rich `pandas` data frame that contains various variables for different SSPs,\n",
- "- tell what the abbreviation SPA stands for,\n",
- "- explain the differences and similarities of the SSP1-26 and SSP5-85, and \n",
- "- sketch the modeling approach of IAMs."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Setup"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# installations ( uncomment and run this cell ONLY when using google colab or kaggle )"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {},
- "executionInfo": {
- "elapsed": 1460,
- "status": "ok",
- "timestamp": 1682429063027,
- "user": {
- "displayName": "Maximilian Puelma Touzel",
- "userId": "09308600515315501700"
- },
- "user_tz": 240
- },
- "tags": []
- },
- "outputs": [],
- "source": [
- "# imports\n",
- "import warnings\n",
- "warnings.simplefilter(action='ignore', category=FutureWarning)\n",
- "import seaborn as sns\n",
- "import matplotlib.pyplot as plt\n",
- "import pandas as pd\n",
- "import numpy as np\n",
- "import pooch\n",
- "import os\n",
- "import tempfile"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "code_folding": [
- 0
- ],
- "execution": {},
- "tags": []
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file\n",
- "\n",
- "\n",
- "def legend_without_duplicate_labels(ax):\n",
- " handles, labels = ax.get_legend_handles_labels()\n",
- " unique = [(h, l) for i, (h, l) in enumerate(zip(handles, labels)) if l not in labels[:i]]\n",
- " ax.legend(*zip(*unique))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {},
- "tags": []
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Transition Goals and Integrated Assessment Models\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "# TODO add Bilibili link\n",
- "video_ids = [('Youtube', 'TqpPDz2kfWc'),\n",
- " # ('Bilibili', '')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {},
- "pycharm": {
- "name": "#%%\n"
- },
- "tags": [
- "remove-input"
- ]
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "# TODO update\n",
- "link_id = \"ujprw\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Shared Socio-economic Pathways"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {},
- "jp-MarkdownHeadingCollapsed": true
- },
- "source": [
- "In this, and subsequent, tutorials, you will explore Integrated Assessment Models (IAMs) which are the standard class of models used to make climate change projections. IAMs couple a climate model with an economic model, allowing us to evaluate the two-way coupling between economic productivity and climate change severity. IAMs can also account for changes that result from mitigation efforts, which lessen anthropogenic emissions.\n",
- "\n",
- "Let's start by investigating some IAM model output.\n",
- "\n",
- "The simulations are labeled by both the Shared Socioeconomic Pathway (SSP1, SSP2, SSP3, SSP4, and SSP5) and the forcing level (greenhouse gas forcing of 2.6, 7.0, 8.5 W/m2 etc. by 2100).\n",
- "The 5 SSPS are: \n",
- "- SSP1: Sustainability (Taking the Green Road)\n",
- "- SSP2: Middle of the Road\n",
- "- SSP3: Regional Rivalry (A Rocky Road)\n",
- "- SSP4: Inequality (A Road divided)\n",
- "- SSP5: Fossil-fueled Development (Taking the Highway)\n",
- "\n",
- "We select two SSPs to exemplify how these scenarios differ from each other. \n",
- "To get a strong contrast, we select SSP1 and SSP5. \n",
- "\n",
- "Let's load the data and describe their features along a few plots.\n",
- "\n",
- "Like in other tutorials, we provide a `.csv` file that is stored in the cloud and was downloaded beforehand from [this IIASA database](https://tntcat.iiasa.ac.at/SspDb/dsd), where all data from the main simulations of the IAMs used in the [IPCC reports](https://www.ipcc.ch/reports/) is freely available."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# Load SSP data from .csv file\n",
- "filename_SSPs = 'SSP_IAM_V2_201811.csv'\n",
- "link_id = \"2uwr4\"\n",
- "url_SSPs = f\"https://osf.io/download/{link_id}/\"\n",
- "\n",
- "df = pd.read_csv(pooch_load(url_SSPs, filename_SSPs))\n",
- "# get a summary of the resulting pandas dataframe\n",
- "df.info()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "We further explore our data frame by printing categories that are used to tag the numeric data."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "print(df.SCENARIO.unique()) # print all scenarios\n",
- "print(df.VARIABLE.unique()[:10]) # print the first 10 variables\n",
- "print(df.REGION.unique()) # print all regions\n",
- "print(df.MODEL.unique()) # print all IAMs\n",
- "print(df.UNIT.unique()) # print all units"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "This file contains much data we are not interested in at the moment. To filter our example scenarios, region, and variables, we use the convenient [`.query()`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html) method from `pandas`. The `VARIABLE`s of interest are those we already touched on in Tutorials 1 to 3: \n",
- "\n",
- "- **economic growth** (`'GDP|PPP'`),\n",
- "- **energy use** (`'Primary Energy'`),\n",
- "- **emissions** (`'Emissions|Kyoto Gases'`),\n",
- "- and **forcing** (`'Diagnostics|MAGICC6|Forcing'`).\n",
- "\n",
- "- As a `REGION`, we choose the `'World'`,\n",
- "- and our `SCENARIO`s are called `'SSP1-26'` and `'SSP5-85'`.\n",
- "- The model of choice for the former scenario is by convention `'IMAGE'` and `'REMIND-MAGPIE'` for the latter, respectively.\n",
- "\n",
- "A function named `get_SSPs_for_variable()` applies all this generally and is hidden in the next cell. Please execute it, such that the subsequent cells can make use of it. If you are interested in its procedure and want to adjust it, don't forget to save a copy beforehand."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown *Execute this cell to enable the dataframe filter function: `get_SSPs_for_variable`*\n",
- "\n",
- "def get_SSPs_for_variable(df,scenario,variable,region='World'):\n",
- " '''\n",
- "\n",
- " Function that filters IIASA's SSP database that is stored in a data frame 'df'\n",
- " and was loaded before from the 'SSP_IAM_V2_201811.csv' file.\n",
- " It returns a data frame with selected columns depending on scenario, variable and region input.\n",
- " For a given SSP scenario it chooses the conventional model for the respective scenario\n",
- " (cf. https://tntcat.iiasa.ac.at/SspDb/dsd?Action=htmlpage&page=about#v2).\n",
- "\n",
- " Args:\n",
- " scenario: string in \"SSPX-XX\" with X=1,...,5\n",
- " variable: string in df.VARIABLE, e.g. 'Population' or 'GDP|PPP'\n",
- "\n",
- " Returns:\n",
- " SSP data for selected columns for a given SSP scenario\n",
- "\n",
- " Example:\n",
- " dd = get_SSPs_for_variable(df,'SSP1-26','Population')\n",
- "\n",
- " '''\n",
- " ssp_model_conv = {\"SSP1-Baseline\" : \"IMAGE\",\n",
- " \"SSP1-26\" : \"IMAGE\",\n",
- " \"SSP2-Baseline\" : \"MESSAGE-GLOBIOM\",\n",
- " \"SSP3-Baseline\" : \"AIM/CGE\",\n",
- " \"SSP4-Baseline\" : \"GCAM4\",\n",
- " \"SSP5-Baseline\" : \"REMIND-MAGPIE\"}\n",
- " model = ssp_model_conv[scenario]\n",
- " ds = df.query(\n",
- " f'(VARIABLE == \"{variable}\") & (SCENARIO == \"{scenario}\") & (MODEL == \"{model}\") & (REGION == \"{region}\")'\n",
- ")\n",
- " return ds"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Let's plot our variables of interest and compare the respective features of the scenarios."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# put variables of interest in a list\n",
- "vars = ['GDP|PPP','Emissions|Kyoto Gases', 'Primary Energy','Diagnostics|MAGICC6|Forcing']\n",
- "# create new names for structured data series and axes labels\n",
- "val_name = ['GDP (billion US$/yr)', 'Emissions (Mt CO$_2$/yr)', 'Energy use (EJ/yr)', 'Forcing (W/m$^2$)']\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,2)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich data frame\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0,0].legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "The projections in the plots you just created show changes in **GDP** (billion US\\$/yr), **fossil fuel emissions** (Mt CO$_2$/yr), **energy use** (EJ/yr), and **forcing** (W/m$^2$) across the two very different scenarios SSP1 and SSP5, computed at their baseline forcing level, which are each represented by a distinct color in each plot.\n",
- "\n",
- "Our plots show that the SSP5-Baseline scenario exhibits very high levels of energy use, and emissions (due to fossil fuel exploitation), it marks the upper end of the scenarios in several dimensions (cf. [Kriegler et al. (2014)](https://doi.org/10.1016/j.gloenvcha.2016.05.015)). \n",
- "\n",
- "The SSP1-26 scenario contrarily caps the increase of energy use by 2030, combined with other actions leading to decreasing emissions and subsequently a decreasing forcing for the second half of the century. However, economic growth continues with half the slope of SSP5-Baseline. In summary, it is the most optimistic projection: we transition to a global society of sustainability-focused growth."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Section 1.1: SSP Creation via IAMs"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "The underlying modeling of Integrated Assessment Models (IAMs) works roughly as follows:\n",
- " \n",
- "All SSP projections are created by optimizing economic activity within the constraint of a given level of greenhouse gas forcing at 2100 (bottom right in the above plot). This activity drives distinct temperature changes via the emissions it produces (top right), which are inputted into a damage function to compute economic damages. These damages feedback into the economy model to limit emissions-producing economic activity (top left).\n",
- "*Note that we already explored these damage functions along our En-ROADS climate solution simulator in Tutorial 2*.\n",
- "\n",
- "The forcing constraint ensures the amount of emissions produced is consistent for that particular scenario. In other words, the projected temperature change under different scenarios is fed to a socioeconomic model component in order to assess the socioeconomic impacts resulting from the temperature change associated with each SSP. *For examples of such impacts check out today's Tutorial 2 and W2D4.*\n",
- "\n",
- "Not every variable in IAMs is endogenous (i.e. determined by other variables in the model). Some variables, like population or technology growth, are exogenous (i.e. variables whose time course is given to the model). In this case, the time course of, e.g., population and economic growth, are derived from simple growth models. These exogenous variables are assumed to be under our society's control (e.g. via mitigation).\n",
- "\n",
- "To understand how our plotted scenarios compare with all other scenarios, we first have a look at the underlying policy assumptions."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Section 1.2 Shared Climate Policy Assumptions (SPAs)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "All pathways have common Shared Climate Policy Assumptions (SPAs) like \n",
- "- limits to how fast we can respond based on where we are now,\n",
- "- what kinds of policies can be implemented, and how\n",
- "\n",
- "which constrain the modelers that create scenarios and their narratives.\n",
- "\n",
- "Our example scenarios hence share the above SPAs and vary in their narrative:\n",
- "\n",
- "In the hypothetical world of SSP5, no climate policies or climate impacts exist, which in other words effectively implies that the carbon price is zero (cf. [Ch.3.2.1.1 of IPCC's report on 'Climate Change 2022: Mitigation of Climate Change')](https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_Chapter03.pdf).\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Section 1.3: Similarities of SSP1 and SSP5\n",
- "\n",
- "When you compare the two scenarios, in particular, the evolution of the population and the GDP shows how similar these scenarios are in their optimistic view on the development of humanity. We all learn to get along, both within and across countries and more equal development naturally stems from population growth through well-known mechanisms like access to conception. The following figure emphasizes this."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# put variables of interest in a list\n",
- "vars = ['Population', 'GDP|PPP']\n",
- "# create new names for structured data series and plot labels\n",
- "val_name = ['Population\\n(millions)', 'GDP (billion US$/yr)']\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,1)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich dataframe\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0].legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Both GDP and population increase."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1.3: Differences of SSP1 and SSP5\n",
- "\n",
- "Major differences are visible when you contrast emissions and assume direct causation with ecosystem health. Increasing emissions then translate into decreasing ecosystem health."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Coding exercise 1.3\n",
- "\n",
- "1. Choose two variables to emphasize ecosystem health differences in the SSP1 and SSP5 scenarios and assign them to `vars`. Then assign axis labels with the correct units for plotting to the `val_name` variable.\n",
- "2. Explain to your pod why the chosen variables emphasize a difference in the scenarios and describe this difference based on your current knowledge of the narratives."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "colab_type": "text",
- "execution": {}
- },
- "source": [
- "```python\n",
- "# put two variables of interest in a list\n",
- "vars = ...\n",
- "# create new names for structured data series and plot labels\n",
- "val_name = ...\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "#################################################\n",
- "## TODO for students:\n",
- "## Put two variables of interest in a list and assign it to 'vars'.\n",
- "## Create new names for the structured data series and axes labels,\n",
- "## put them in a list and assign it to 'val_name'.\n",
- "## Remove the following line of code once you have completed the exercise:\n",
- "raise NotImplementedError(\"Student exercise: Put two variables of interest in a list and assign it to vars. Create new names for the structured data series and axes labels, put them in a list and assign it to val_name.\")\n",
- "#################################################\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,1)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich dataframe\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0].legend()\n",
- "\n",
- "```"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove solution\n",
- "\n",
- "# put two variables of interest in a list\n",
- "vars = ['Emissions|Kyoto Gases', 'Land Cover|Forest']\n",
- "# create new names for structured data series and plot labels\n",
- "val_name = ['Emissions\\n(Mt CO$_2$/yr)','Land covered by\\nforest (million ha)']\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,1)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich dataframe\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0].legend()"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# to_remove explanation\n",
- "'''\n",
- "2. We choose 'Emissions' and 'Land Cover|Forest' as variables of interest to contrast ecosystem health between the two scenarios.\n",
- "First, note that the land model components from the IMAGE and REMIND-MAGPIE estimate different initial land cover areas, if we assume however that their trend is reasonable, we can conclude the following:\n",
- "For high emissions, forcing rises and hence temperature, we know that precipitation patterns change with higher temperatures such that forests,\n",
- "here our indicator for ecosystem health, are dying.\n",
- "In turn the land cover by forests is decreasing in the SSP5 scenario.\n",
- "In contrast, the SSP1 reduces emissions and also exploits resources like wood only sustainably due to afforestation.\n",
- "As afforestation is also used to capture carbon, while land use is reduced in general,\n",
- "the scenario shows an increase in land cover by forests within the current century.\n",
- "'''"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "In this tutorial, you've gained a first understanding of the Shared Socioeconomic Pathways and their creation, the application of Integrated Assessment Models in climate economics. You've learned how SSPs share policy assumptions. Furthermore, you compared SSP1 and SSP5 with respect to their view on the development of humanity and their ecosystem health.\n",
- "\n",
- "In the next tutorial, you dissect and analyze the SSP narratives in more detail."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "It is possible to download the SSP data used in this tutorial, when you provide an email address, from [this IIASA database](https://tntcat.iiasa.ac.at/SspDb/dsd), where all data from the main simulations of the IAMs used in the [IPCC reports](https://www.ipcc.ch/reports/) is freely available.\n",
- "\n",
- "Find a summary of all SSP narratives in this paper by [Oneill et al. (2017)](https://doi.org/10.1016/j.gloenvcha.2015.01.004).\n",
- "\n",
- "Find even more information in\n",
- "\n",
- "- [IIASA's introduction to SSPs](https://iiasa.ac.at/models-tools-data/ssp)"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial4",
- "provenance": [],
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial5.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial5.ipynb
deleted file mode 100644
index 9b234f6e5..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial5.ipynb
+++ /dev/null
@@ -1,273 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "3d4298c9-a204-48a4-b408-90d0403d4950",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial5.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c55c3b25-2613-4f34-8d4a-ccc417f24708",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 5: Mapping the Narrative Space\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "5c8af3c8-42a4-45ba-a16f-be86198e23e8",
- "metadata": {
- "execution": {}
- },
- "source": [
- "### Tutorial objectives\n",
- "\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "1af3e766-b9c3-4bf8-815c-4087e7811925",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt\n",
- "import numpy as np\n",
- "#import dicelib # https://github.com/mptouzel/PyDICE"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "e7392de8-f946-453b-bedf-8a07c705ee7f",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "6c10210c-a3d9-4996-a3d3-4bafa4b72637",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "80412217-b5a7-4fed-b29e-b8751eb8c847",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Mapping the Narrative Space\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', '9ytkpO_pbWE')\n",
- " # , ('Bilibili', 'BV1bj411Z739')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "2dc2f6c1-637b-4506-a667-45750dd7fbe5",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "# TODO update\n",
- "link_id = \"cyavb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c7ce6e92-a46d-437a-9e03-c5b80eb63474",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Background on IAM Economics\n",
- "\n",
- "The last tutorial gave us a glimpse of Integrated Assessment Models (IAMs), a class of models economists use to inform policy decisions. Recall that IAMs couple a climate model to an economic model, allowing us to evaluate the two-way coupling between economic productivity and climate change severity. \n",
- "\n",
- "Let's begin with a brief description of IAMs:\n",
- "\n",
- "- IAMs resolve the spatially, in contrast, the toy model En-ROADs for example, which we applied in Tutorial 1 to 3, aggregates all variables and is non-spatial.\n",
- "- Like En-ROADS, the world models used in IAMs usually have *exogeneous* (externally set) times series for variables, in addition to fixed world system parameters. These exogenous variables are assumed to be under our society's control (e.g. mitigation). \n",
- "- IAMs come equipped with an objective function (a formula that calculates the quantity to be optimized). This function returns the value of a projected future obtained from running the world model under a given climate policy. This value is defined by the time series of these exogenous variables. In this sense, the objective function is what defines \"good\" in \"good climate policy\". \n",
- "- The computation in an IAM is then an optimization of this objective as a function of the time series of these exogenous variables over some fixed time window.\n",
- "\n",
- "In En-ROADS, there are exogenous parameters, in particular:\n",
- " - **$\\mu(t)$**: time-dependent mitigation rate (i.e. emissions reduction), which limits warming-caused damages\n",
- " - **$S(t)$**: savings rate, which drives capital investment \n",
- "\n",
- "Most IAMs are based on *Neo-classical economics* (also referred to as \"establishment economics\"). This is an approach to economics that makes particular assumptions. For example, it is assumed that production, consumption, and valuation of goods and services are driven solely by the supply and demand model. To understand this approach and how it is used, it is important to begin with a brief overview of some fundamental concepts. One such concept is **utility** (i.e. economic value), which is not only central to economics but also to decision theory as a whole, which is a research field that mathematically formalizes the activity of *planning* (planning here means selecting strategies based on how they are expected to play out given a model that takes those strategies and projects forward into the future)."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "28c0a077-c9a0-42d9-ada6-e8b835668c3b",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "9e904e57-b6b9-4ee8-aefb-140dce3c93c2",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial5",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial6.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial6.ipynb
deleted file mode 100644
index 944aeb1a3..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/W2D3_Tutorial6.ipynb
+++ /dev/null
@@ -1,234 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "a4589a1d-0f80-45e7-aec3-3513172e617b",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial6.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "3d93b742-06f3-4a0b-9a1d-043397878e48",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Bonus Tutorial 6: Create your Socio-economic Scenario\n",
- "\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "7b5c4ba1-fad0-4d38-b3b2-875a67549624",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial Objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 30 min\n",
- "\n",
- "In this tutorial, you will model your own simplified Socioeconomic Pathway, a scenario of actions to limit global warming below 2°C. You take action against climate change within the socioeconomic model environment of the Climate Solution Simulator named [En-ROADS](https://www.climateinteractive.org/en-roads/). To examine its characteristics you address its challenges, winners/losers, political feasibility, narrative, and current trends. \n",
- "\n",
- "You learn how to\n",
- "\n",
- "- apply the knowledge you gained in last tutorials to design actions against climate change\n",
- "- map your scenario narrative in the SSP \n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "b591486d-dff5-4dc6-b83b-1125977a7758",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1:\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', '_Y_eLlExwxI'),\n",
- " #TODO('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "616428a4-3db2-4e56-af30-6c56aaf66204",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"gwr8h\" #TODO\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a516e969-8b67-4f8a-9d39-061770ffb4c9",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Exercise 1: Create your Solution Scenario and Evaluate it\n",
- "*Estimated timing:* 20 minutes\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- "\n",
- "2. **Develop a scenario**: By moving the sliders and changing the assumptions, find a scenario (i.e. a combination of slider positions of different variables) that results in *less than 2°C* of temperature increase by the end of the century. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) if needed. \n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*\n",
- "\n",
- "3. **Answer the following questions**:\n",
- "\n",
- " 1. **Your Plan**: What are the top 3-5 most important policies in your strategy? (For example, the most important sliders that you moved). Share your scenario link and a screenshot of your final En-ROADS dashboard.\n",
- " \n",
- " *If you want to save your scenario, export it via a click on the* ***Share your scenario*** *button in the top right of the panel, and select 'Copy Scenario Link'*.\n",
- " \n",
- " 2. **Political Feasibility**: To implement your proposals, what actions and priorities are needed over the next two years in businesses, civil society, government, and the public?\n",
- " 3. **Winners & Losers**: Who would be the biggest winners and losers globally in your proposed future? Create a table with two columns for winners and losers. \n",
- " 4. **Narrative**: Map your ideas in the narrative space, introduced in Tutorial 5. \n",
- " 5. **Hope**: What trends in the world give you hope that your proposals are possible?\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "fadd5652-5db9-475e-a072-f204358ade8a",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this last tutorial, you went from model to action by designing your own socioeconomic modeling scenario to limit global warming below 2°C by the end of the century. You reflected on its challenges, political feasibility, inherent winners and losers of your approach, and finally, the narrative that you chose. At the end of the day, you collected observations of actions and trends you are making in your region, globally, and in your daily life that give hope. That hope and various solutions exist, which one has to combine, and that only action is needed, might be the most important lesson of today.\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a6aaa44b-0fc2-4249-91c4-589aac662188",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)\n",
- "\n",
- "**A Planetary Crisis Planning Computer Game**\n",
- "- [Half Earth Socialism](https://play.half.earth/).\n"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial6",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/dicelib.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/dicelib.py
deleted file mode 100644
index bbc544141..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/dicelib.py
+++ /dev/null
@@ -1,538 +0,0 @@
-import seaborn as sns
-import matplotlib.pyplot as pl
-import pandas as pd
-import numpy as np
-import scipy.optimize as opt
-from matplotlib.ticker import EngFormatter
-
-
-class DICE():
-
- def __init__(self):
- self.time_step = 5 # Years per Period
- # Set
- self.min_year = 2000
- self.max_year = 2500
- self.TT = np.linspace(
- self.min_year, self.max_year, 100, dtype=np.int32)
- self.NT = len(self.TT)
- self.t = np.arange(1, self.NT+1)
-
- def init_parameters(self, a3=2.00, prstp=0.015, elasmu=1.45):
-
- # Maximum cumulative extraction fossil fuels (GtC); denoted by CCum
- self.fosslim = 6000
- self.ifopt = 0 # Indicator where optimized is 1 and base is 0
- self.elasmu = elasmu # Elasticity of marginal utility of consumption
- self.prstp = prstp # Initial rate of social time preference per year
-
- self.init_pop_and_tech_parameters()
- self.init_emissions_parameters()
- self.init_carboncycle_parameters()
- self.init_climatemodel_parameters()
- self.init_climatedamage_parameters(a3)
- self.init_abatementcost_parameters()
-
- # ** Scaling and inessential parameters
- # * Note that these are unnecessary for the calculations
- # * They ensure that MU of first period's consumption =1 and PV cons = PV utilty
- # Multiplicative scaling coefficient /0.0302455265681763 /
- self.scale1 = 0.0302455265681763
- self.scale2 = -10993.704 # Additive scaling coefficient /-10993.704/;
-
- # * carbon cycling coupling matrix
- self.b11 = 1 - self.b12
- self.b21 = self.b12*self.mateq/self.mueq
- self.b22 = 1 - self.b21 - self.b23
- self.b32 = self.b23*self.mueq/self.mleq
- self.b33 = 1 - self.b32
-
- # * Further definitions of parameters
- self.a20 = self.a2
- self.sig0 = self.e0/(self.q0*(1-self.miu0)) # From Eq. 14
- self.lam = self.fco22x / self.t2xco2 # From Eq. 25
-
- self.init_exogeneous_inputs()
-
- def init_pop_and_tech_parameters(self, gama=0.300, pop0=7403, popadj=0.134,
- popasym=11500, dk=0.100, q0=105.5,
- k0=223, a0=5.115, ga0=0.076, dela=0.005):
- self.gama = gama # Capital elasticity in production function /.300 /
- # Initial world population 2015 (millions) /7403 /
- self.pop0 = pop0
- self.popadj = popadj # Growth rate to calibrate to 2050 pop projection /0.134/
- # Asymptotic population (millions) /11500/
- self.popasym = popasym
- # Depreciation rate on capital (per year) /.100 /
- self.dk = dk
- # Initial world gross output 2015 (trill 2010 USD) /105.5/
- self.q0 = q0
- # Initial capital value 2015 (trill 2010 USD) /223 /
- self.k0 = k0
- self.a0 = a0 # Initial level of total factor productivity /5.115/
- self.ga0 = ga0 # Initial growth rate for TFP per 5 years /0.076/
- self.dela = dela # Decline rate of TFP per 5 years /0.005/
-
- # ** Emissions parameters
- def init_emissions_parameters(self, gsigma1=-0.0152, dsig=-0.001, eland0=2.6,
- deland=0.115, e0=35.85, miu0=0.03):
- # Initial growth of sigma (per year) /-0.0152/
- self.gsigma1 = gsigma1
- # Decline rate of decarbonization (per period) /-0.001 /
- self.dsig = dsig
- # Carbon emissions from land 2015 (GtCO2 per year) / 2.6 /
- self.eland0 = eland0
- # Decline rate of land emissions (per period) / .115 /
- self.deland = deland
- # Industrial emissions 2015 (GtCO2 per year) /35.85 /
- self.e0 = e0
- self.miu0 = miu0 # Initial emissions control rate for base case 2015 /.03 /
-
- # ** Carbon cycle
- def init_carboncycle_parameters(self, mat0=851, mu0=460, ml0=1740, mateq=588, mueq=360, mleq=1720):
- # * Initial Conditions
- # Initial Concentration in atmosphere 2015 (GtC) /851 /
- self.mat0 = mat0
- # Initial Concentration in upper strata 2015 (GtC) /460 /
- self.mu0 = mu0
- # Initial Concentration in lower strata 2015 (GtC) /1740 /
- self.ml0 = ml0
- # mateq Equilibrium concentration atmosphere (GtC) /588 /
- self.mateq = mateq
- # mueq Equilibrium concentration in upper strata (GtC) /360 /
- self.mueq = mueq
- # mleq Equilibrium concentration in lower strata (GtC) /1720 /
- self.mleq = mleq
-
- # * Flow paramaters, denoted by Phi_ij in the model
- self.b12 = 0.12 # Carbon cycle transition matrix /.12 /
- self.b23 = 0.007 # Carbon cycle transition matrix /0.007/
- # * These are for declaration and are defined later
- self.b11 = None # Carbon cycle transition matrix
- self.b21 = None # Carbon cycle transition matrix
- self.b22 = None # Carbon cycle transition matrix
- self.b32 = None # Carbon cycle transition matrix
- self.b33 = None # Carbon cycle transition matrix
- # Carbon intensity 2010 (kgCO2 per output 2005 USD 2010)
- self.sig0 = None
-
- # ** Climate model parameters
- def init_climatemodel_parameters(self):
- # Equilibrium temp impact (oC per doubling CO2) / 3.1 /
- self.t2xco2 = 3.1
- # 2015 forcings of non-CO2 GHG (Wm-2) / 0.5 /
- self.fex0 = 0.5
- # 2100 forcings of non-CO2 GHG (Wm-2) / 1.0 /
- self.fex1 = 1.0
- # Initial lower stratum temp change (C from 1900) /.0068/
- self.tocean0 = 0.0068
- # Initial atmospheric temp change (C from 1900) /0.85/
- self.tatm0 = 0.85
- self.c1 = 0.1005 # Climate equation coefficient for upper level /0.1005/
- self.c3 = 0.088 # Transfer coefficient upper to lower stratum /0.088/
- self.c4 = 0.025 # Transfer coefficient for lower level /0.025/
- # eta in the model; Eq.22 : Forcings of equilibrium CO2 doubling (Wm-2) /3.6813 /
- self.fco22x = 3.6813
-
- def init_climatedamage_parameters(self, a3=2.00):
- # ** Climate damage parameters
- self.a10 = 0 # Initial damage intercept /0 /
- self.a20 = None # Initial damage quadratic term
- self.a1 = 0 # Damage intercept /0 /
- self.a2 = 0.00236 # Damage quadratic term /0.00236/
- self.a3 = a3 # Damage exponent /2.00 /
-
- def init_abatementcost_parameters(self):
- # ** Abatement cost
- # Theta2 in the model, Eq. 10 Exponent of control cost function / 2.6 /
- self.expcost2 = 2.6
- self.pback = 550 # Cost of backstop 2010$ per tCO2 2015 / 550 /
- self.gback = 0.025 # Initial cost decline backstop cost per period / .025/
- self.limmiu = 1.2 # Upper limit on control rate after 2150 / 1.2 /
- self.tnopol = 45 # Period before which no emissions controls base / 45 /
- # Initial base carbon price (2010$ per tCO2) / 2 /
- self.cprice0 = 2
- self.gcprice = 0.02 # Growth rate of base carbon price per year /.02
-
- def init_exogeneous_inputs(self):
- NT = self.NT
-
- self.l = np.zeros(NT)
- self.l[0] = self.pop0 # Labor force
- self.al = np.zeros(NT)
- self.al[0] = self.a0
- self.gsig = np.zeros(NT)
- self.gsig[0] = self.gsigma1
- self.sigma = np.zeros(NT)
- self.sigma[0] = self.sig0
- # TFP growth rate dynamics, Eq. 7
- self.ga = self.ga0 * np.exp(-self.dela*5*(self.t-1))
- self.pbacktime = self.pback * \
- (1-self.gback)**(self.t-1) # Backstop price
- # Emissions from deforestration
- self.etree = self.eland0*(1-self.deland)**(self.t-1)
- self.rr = 1/((1+self.prstp)**(self.time_step*(self.t-1))) # Eq. 3
- # The following three equations define the exogenous radiative forcing; used in Eq. 23
- self.forcoth = np.full(NT, self.fex0)
- self.forcoth[0:18] = self.forcoth[0:18] + \
- (1/17)*(self.fex1-self.fex0)*(self.t[0:18]-1)
- self.forcoth[18:NT] = self.forcoth[18:NT] + (self.fex1-self.fex0)
- # Optimal long-run savings rate used for transversality (Question)
- self.optlrsav = (self.dk + .004)/(self.dk + .004 *
- self.elasmu + self.prstp)*self.gama
- self.cost1 = np.zeros(NT)
- self.cumetree = np.zeros(NT)
- self.cumetree[0] = 100
- self.cpricebase = self.cprice0*(1+self.gcprice)**(5*(self.t-1))
-
- def InitializeLabor(self, il, iNT):
- for i in range(1, iNT):
- il[i] = il[i-1]*(self.popasym / il[i-1])**self.popadj
-
- def InitializeTFP(self, ial, iNT):
- for i in range(1, iNT):
- ial[i] = ial[i-1]/(1-self.ga[i-1])
-
- def InitializeGrowthSigma(self, igsig, iNT):
- for i in range(1, iNT):
- igsig[i] = igsig[i-1]*((1+self.dsig)**self.time_step)
-
- def InitializeSigma(self, isigma, igsig, icost1, iNT):
- for i in range(1, iNT):
- isigma[i] = isigma[i-1] * np.exp(igsig[i-1] * self.time_step)
- icost1[i] = self.pbacktime[i] * isigma[i] / self.expcost2 / 1000
-
- def InitializeCarbonTree(self, icumetree, iNT):
- for i in range(1, iNT):
- icumetree[i] = icumetree[i-1] + self.etree[i-1]*(5/3.666)
-
- """
- Emissions of carbon and weather damages
- """
-
- # Retuns the total carbon emissions; Eq. 18
- def fE(self, iEIND, index):
- return iEIND[index] + self.etree[index]
-
- # Eq.14: Determines the emission of carbon by industry EIND
- def fEIND(self, iYGROSS, iMIU, isigma, index):
- return isigma[index] * iYGROSS[index] * (1 - iMIU[index])
-
- # Cumulative industrial emission of carbon
- def fCCA(self, iCCA, iEIND, index):
- return iCCA[index-1] + iEIND[index-1] * 5 / 3.666
-
- # Cumulative total carbon emission
- def fCCATOT(self, iCCA, icumetree, index):
- return iCCA[index] + icumetree[index]
-
- # Eq. 22: the dynamics of the radiative forcing
- def fFORC(self, iMAT, index):
- return self.fco22x * np.log(iMAT[index]/588.000)/np.log(2) + self.forcoth[index]
-
- # Dynamics of Omega; Eq.9
- def fDAMFRAC(self, iTATM, index):
- return self.a1*iTATM[index] + self.a2*iTATM[index]**self.a3
-
- # Calculate damages as a function of Gross industrial production; Eq.8
- def fDAMAGES(self, iYGROSS, iDAMFRAC, index):
- return iYGROSS[index] * iDAMFRAC[index]
-
- # Dynamics of Lambda; Eq. 10 - cost of the reudction of carbon emission (Abatement cost)
- def fABATECOST(self, iYGROSS, iMIU, icost1, index):
- return iYGROSS[index] * icost1[index] * iMIU[index]**self.expcost2
-
- # Marginal Abatement cost
- def fMCABATE(self, iMIU, index):
- return self.pbacktime[index] * iMIU[index]**(self.expcost2-1)
-
- # Price of carbon reduction
- def fCPRICE(self, iMIU, index):
- return self.pbacktime[index] * (iMIU[index])**(self.expcost2-1)
-
- # Eq. 19: Dynamics of the carbon concentration in the atmosphere
- def fMAT(self, iMAT, iMU, iE, index):
- if (index == 0):
- return self.mat0
- else:
- return iMAT[index-1]*self.b11 + iMU[index-1]*self.b21 + iE[index-1] * 5 / 3.666
-
- # Eq. 21: Dynamics of the carbon concentration in the ocean LOW level
- def fML(self, iML, iMU, index):
- if (index == 0):
- return self.ml0
- else:
- return iML[index-1] * self.b33 + iMU[index-1] * self.b23
-
- # Eq. 20: Dynamics of the carbon concentration in the ocean UP level
- def fMU(self, iMAT, iMU, iML, index):
- if (index == 0):
- return self.mu0
- else:
- return iMAT[index-1]*self.b12 + iMU[index-1]*self.b22 + iML[index-1]*self.b32
-
- # Eq. 23: Dynamics of the atmospheric temperature
- def fTATM(self, iTATM, iFORC, iTOCEAN, index):
- if (index == 0):
- return self.tatm0
- else:
- return iTATM[index-1] + self.c1 * (iFORC[index] - (self.fco22x/self.t2xco2) * iTATM[index-1] - self.c3 * (iTATM[index-1] - iTOCEAN[index-1]))
-
- # Eq. 24: Dynamics of the ocean temperature
- def fTOCEAN(self, iTATM, iTOCEAN, index):
- if (index == 0):
- return self.tocean0
- else:
- return iTOCEAN[index-1] + self.c4 * (iTATM[index-1] - iTOCEAN[index-1])
-
- """
- economic variables
- """
-
- # The total production without climate losses denoted previously by YGROSS
- def fYGROSS(self, ial, il, iK, index):
- return ial[index] * ((il[index]/1000)**(1-self.gama)) * iK[index]**self.gama
-
- # The production under the climate damages cost
- def fYNET(self, iYGROSS, iDAMFRAC, index):
- return iYGROSS[index] * (1 - iDAMFRAC[index])
-
- # Production after abatement cost
- def fY(self, iYNET, iABATECOST, index):
- return iYNET[index] - iABATECOST[index]
-
- # Consumption Eq. 11
- def fC(self, iY, iI, index):
- return iY[index] - iI[index]
-
- # Per capita consumption, Eq. 12
- def fCPC(self, iC, il, index):
- return 1000 * iC[index] / il[index]
-
- # Saving policy: investment
- def fI(self, iS, iY, index):
- return iS[index] * iY[index]
-
- # Capital dynamics Eq. 13
- def fK(self, iK, iI, index):
- if (index == 0):
- return self.k0
- else:
- return (1-self.dk)**self.time_step * iK[index-1] + self.time_step * iI[index-1]
-
- # Interest rate equation; Eq. 26 added in personal notes
- def fRI(self, iCPC, index):
- return (1 + self.prstp) * (iCPC[index+1]/iCPC[index])**(self.elasmu/self.time_step) - 1
-
- # Periodic utility: A form of Eq. 2
- def fCEMUTOTPER(self, iPERIODU, il, index):
- return iPERIODU[index] * il[index] * self.rr[index]
-
- # The term between brackets in Eq. 2
- def fPERIODU(self, iC, il, index):
- return ((iC[index]*1000/il[index])**(1-self.elasmu) - 1) / (1 - self.elasmu) - 1
-
- # utility function
- def fUTILITY(self, iCEMUTOTPER, resUtility):
- resUtility[0] = self.time_step * self.scale1 * \
- np.sum(iCEMUTOTPER) + self.scale2
-
- def init_variables(self): # TODO: add full variable names as comments
- NT = self.NT
- self.K = np.zeros(NT)
- self.YGROSS = np.zeros(NT)
- self.EIND = np.zeros(NT)
- self.E = np.zeros(NT)
- self.CCA = np.zeros(NT)
- self.CCATOT = np.zeros(NT)
- self.MAT = np.zeros(NT)
- self.ML = np.zeros(NT)
- self.MU = np.zeros(NT)
- self.FORC = np.zeros(NT)
- self.TATM = np.zeros(NT)
- self.TOCEAN = np.zeros(NT)
- self.DAMFRAC = np.zeros(NT)
- self.DAMAGES = np.zeros(NT)
- self.ABATECOST = np.zeros(NT)
- self.MCABATE = np.zeros(NT)
- self.CPRICE = np.zeros(NT)
- self.YNET = np.zeros(NT)
- self.Y = np.zeros(NT)
- self.I = np.zeros(NT)
- self.C = np.zeros(NT)
- self.CPC = np.zeros(NT)
- self.RI = np.zeros(NT)
- self.PERIODU = np.zeros(NT)
- self.CEMUTOTPER = np.zeros(NT)
-
- self.optimal_controls = np.zeros(2*NT)
-
- self.InitializeLabor(self.l, NT)
- self.InitializeTFP(self.al, NT)
- self.InitializeGrowthSigma(self.gsig, NT)
- self.InitializeSigma(self.sigma, self.gsig, self.cost1, NT)
- self.InitializeCarbonTree(self.cumetree, NT)
-
- def get_control_bounds_and_startvalue(self):
-
- NT = self.NT
- # * Control variable limits
- MIU_lo = np.full(NT, 0.01)
- MIU_up = np.full(NT, self.limmiu)
- MIU_up[0:29] = 1
- MIU_lo[0] = self.miu0
- MIU_up[0] = self.miu0
- MIU_lo[MIU_lo == MIU_up] = 0.99999*MIU_lo[MIU_lo == MIU_up]
- bnds1 = []
- for i in range(NT):
- bnds1.append((MIU_lo[i], MIU_up[i]))
-
- lag10 = np.arange(1, NT+1) > NT - 10
- S_lo = np.full(NT, 1e-1)
- S_lo[lag10] = self.optlrsav
- S_up = np.full(NT, 0.9)
- S_up[lag10] = self.optlrsav
- S_lo[S_lo == S_up] = 0.99999*S_lo[S_lo == S_up]
- bnds2 = []
- for i in range(NT):
- bnds2.append((S_lo[i], S_up[i]))
- bnds = bnds1 + bnds2
-
- # starting values for the control variables:
- S_start = np.full(NT, 0.2)
- S_start[S_start < S_lo] = S_lo[S_start < S_lo]
- S_start[S_start > S_up] = S_lo[S_start > S_up]
- MIU_start = 0.99*MIU_up
- MIU_start[MIU_start < MIU_lo] = MIU_lo[MIU_start < MIU_lo]
- MIU_start[MIU_start > MIU_up] = MIU_up[MIU_start > MIU_up]
- x_start = np.concatenate([MIU_start, S_start])
-
- return x_start, bnds
-
- def fOBJ(self, controls):
- self.roll_out(controls)
- resUtility = np.zeros(1)
- self.fUTILITY(self.CEMUTOTPER, resUtility)
-
- return -1*resUtility[0]
-
- def roll_out(self, controls):
- NT = self.NT
-
- iMIU = controls[0:NT]
- iS = controls[NT:(2*NT)]
-
- for i in range(NT):
- self.K[i] = self.fK(self.K, self.I, i)
- self.YGROSS[i] = self.fYGROSS(self.al, self.l, self.K, i)
- self.EIND[i] = self.fEIND(self.YGROSS, iMIU, self.sigma, i)
- self.E[i] = self.fE(self.EIND, i)
- self.CCA[i] = self.fCCA(self.CCA, self.EIND, i)
- self.CCATOT[i] = self.fCCATOT(self.CCA, self.cumetree, i)
- self.MAT[i] = self.fMAT(self.MAT, self.MU, self.E, i)
- self.ML[i] = self.fML(self.ML, self.MU, i)
- self.MU[i] = self.fMU(self.MAT, self.MU, self.ML, i)
- self.FORC[i] = self.fFORC(self.MAT, i)
- self.TATM[i] = self.fTATM(self.TATM, self.FORC, self.TOCEAN, i)
- self.TOCEAN[i] = self.fTOCEAN(self.TATM, self.TOCEAN, i)
- self.DAMFRAC[i] = self.fDAMFRAC(self.TATM, i)
- self.DAMAGES[i] = self.fDAMAGES(self.YGROSS, self.DAMFRAC, i)
- self.ABATECOST[i] = self.fABATECOST(
- self.YGROSS, iMIU, self.cost1, i)
- self.MCABATE[i] = self.fMCABATE(iMIU, i)
- self.CPRICE[i] = self.fCPRICE(iMIU, i)
- self.YNET[i] = self.fYNET(self.YGROSS, self.DAMFRAC, i)
- self.Y[i] = self.fY(self.YNET, self.ABATECOST, i)
- self.I[i] = self.fI(iS, self.Y, i)
- self.C[i] = self.fC(self.Y, self.I, i)
- self.CPC[i] = self.fCPC(self.C, self.l, i)
- self.PERIODU[i] = self.fPERIODU(self.C, self.l, i)
- self.CEMUTOTPER[i] = self.fCEMUTOTPER(self.PERIODU, self.l, i)
-# self.RI[i] = self.fRI(self.CPC, i)
-
- def optimize_controls(self, controls_start, controls_bounds):
- result = opt.minimize(self.fOBJ, controls_start, method='SLSQP', bounds=tuple(
- controls_bounds), options={'disp': True})
- self.optimal_controls = result.x
- return result
-
- def plot_run(self, title_str):
- Tmax = 2150
- NT = self.NT
- variables = [self.optimal_controls[NT:(2*NT)], self.optimal_controls[0:NT], self.CPRICE, self.EIND, self.TATM, self.DAMAGES, self.MAT,
- self.E]
- variables = [var[self.TT < Tmax] for var in variables]
- variable_labels = ["Saving rate",
- "Em rate", # 'Carbon emission control rate'
- "carbon price",
- "INdustrial emissions",
- # Increase temperature of the atmosphere (TATM)
- "Degrees C from 1900",
- "Damages", # 'trillions 2010 USD per year'
- "GtC from 1750", # 'Carbon concentration increase in the atmosphere'
- "GtCO2 per year" # Total CO2 emission
- ]
- variable_limits = [[0, 0.5], [0, 1], [0, 400], [-20, 40],
- [0, 5], [0, 150], [0, 1500], [-20, 50]] # y axis ranges
- plot_world_variables(self.TT[self.TT < Tmax], variables, variable_labels, variable_limits,
- title=title_str,figsize=[4+len(variables), 7],
- grid=True)
-
-
-def plot_world_variables(time, var_data, var_names, var_lims,
- title=None,
- figsize=None,
- dist_spines=0.09,
- grid=False):
- prop_cycle = pl.rcParams['axes.prop_cycle']
- colors = prop_cycle.by_key()['color']
-
- var_number = len(var_data)
-
- fig, host = pl.subplots(figsize=figsize)
- axs = [host, ]
- for i in range(var_number-1):
- axs.append(host.twinx())
-
- fig.subplots_adjust(left=dist_spines*2)
- for i, ax in enumerate(axs[1:]):
- ax.spines["left"].set_position(("axes", -(i + 1)*dist_spines))
- ax.spines["left"].set_visible(True)
- ax.yaxis.set_label_position('left')
- ax.yaxis.set_ticks_position('left')
-
- ps = []
- for ax, label, ydata, color in zip(axs, var_names, var_data, colors):
- ps.append(ax.plot(time, ydata, label=label,
- color=color, clip_on=False)[0])
- axs[0].grid(grid)
- axs[0].set_xlim(time[0], time[-1])
-
- for ax, lim in zip(axs, var_lims):
- ax.set_ylim(lim[0], lim[1])
-
- for axit, ax_ in enumerate(axs):
- ax_.tick_params(axis='y', rotation=90)
- ax_.yaxis.set_major_locator(pl.MaxNLocator(5))
- formatter_ = EngFormatter(places=0, sep="\N{THIN SPACE}")
- ax_.yaxis.set_major_formatter(formatter_)
-
- tkw = dict(size=4, width=1.5)
- axs[0].set_xlabel("time [years]")
- axs[0].tick_params(axis='x', **tkw)
- for i, (ax, p) in enumerate(zip(axs, ps)):
- ax.set_ylabel(p.get_label(), rotation=25)
- ax.yaxis.label.set_color(p.get_color())
- ax.tick_params(axis='y', colors=p.get_color(), **tkw)
- ax.yaxis.set_label_coords(-i*dist_spines, 1.01)
- axs[0].set_title(title)
-
-
-def hello_world():
- dice = DICE()
- dice.init_parameters()
- dice.init_variables()
- controls_start, controls_bounds = dice.get_control_bounds_and_startvalue()
- dice.optimize_controls(controls_start, controls_bounds)
- dice.roll_out(dice.optimal_controls)
- dice.plot_run()
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/further_reading.md b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/further_reading.md
deleted file mode 100644
index cc972adcd..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/instructor/further_reading.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# **Tutorial 2 Further Reading**
-
-## **IAM Model Summary**
-The economy model in most IAMs is a capital accumulation model.
-- Capital combines with a laboring population and technology to generate productivity ($Y$) that is hindered by climate damage.
-- A savings fraction of production drives capital accumulation, while the rest is consumed. Welfare is determined by consumption.
-- Climate action is formulated by a mitigation rate, $\mu$, which along with the savings rate are the two control parameters in the model.
-- These are used to maximize welfare.
-
-The climate model in DICE could be improved (c.f. [this study](https://www3.nd.edu/~nmark/Climate/DICE-simplified_2019.pdf)). We only summarize here how it interacts with the economy model:
-- Productivity generates industrial emissions, $$E_\mathrm{ind}=(1-\mu)\sigma Y,$$ where the $1-\mu$ factor accounts for reduced carbon intensity of production, $\sigma$, via supply-side mitigation measures (e.g. increased efficiency).
-- The productivity $Y$ rather than output production ($Q$) see model is used here because damages aren't included.
-- Namely, the emissions produced in the process of capital production occur before climate change has a chance to inflict damage on the produced output.
-- These emissions combine with natural emissions to drive the temperature changes appearing in the damage function, closing the economy-climate loop.
-
-Here are a list of variables used:
-- $K$ capital
-- $Y$ productivity
-- $Q$ production
-- $A$ technology conversion
-- $S$ savings rate
-- $\mu$ mitigation rate
-- $\Lambda$ mitigation cost
-- $\Omega$ damage fraction of productivity
-- $\sigma$ carbon intensity of production
-- $E$ emissions
-
-## **Exogeneous Control Variables**
-There are two exogeneous variables in the model:
-- mitigation (emissions reduction) rate $\mu_t$, and
-- the savings rate $S_t$.
-
-There exists a mitigation cost associated with a specific mitigation rate, presented as a fraction of productivity, $\Lambda_t=\theta_1\mu^{\theta_2}$. This implies that increased mitigation efforts correspond to elevated costs.
-
-The savings rate $S_t$ extracts a portion of the total production to invest, thereby boosting capital. The rest of the production is then allocated for consumption.
-
-## **Economy Model Summary**
-The essence of the economy model in DICE is a capital accumulation model. Existing capital depreciates at rate $\delta$ and new capital arises through investment,
-$$K_{t+1}=(1-\delta)K_t+I_t$$
-where the invested capital $I=SQ$ is determined by a chosen fraction $S$ of the production $Q$ that is "saved" rather than consumed. Production is given as the productivity $Y$ reduced by damages and mitigation cost, $$Q=(1-\Omega)(1-\Lambda)Y.$$ Productivity, $$Y=A K^\gamma L^{1-\gamma},$$
-is determined by the technology conversion $A$ operating on a combination of capital $K$ and labor $L$ whose relative contributions are set by the capital elasticity parameter $\gamma$. Labor is population which set to saturate over the 2nd half of the 21st century. Technology conversion is only weakly sigmoidal in time, deviating slightly from linear growth.
-
-The remaining production is consumed $$C:=(1-S)Q$$ producing utility $$U(C,L)=Lu(c)=Lu(C/L),$$ using the isoelastic utility function, $$u(c)=\frac{(c+1)^{1-\alpha}-1}{1-\alpha}.$$ The overall value of a projected future is then $$V=\sum_{t=1}^{\infty}\gamma^t U(C_t,L_t),$$ where $\gamma=1/(1+\rho)$ for discount rate $\rho$ and we use the population level utility function $U(C,L)=Lu(C/L)$.
-
-
-Here are a list of variables used:
-- $K$ capital
-- $Y$ productivity
-- $Q$ production
-- $A$ technology conversion
-- $S$ savings rate
-- $\mu$ mitigation rate
-- $\Lambda$ mitigation cost
-- $\Omega$ damage fraction of productivity
-- $\sigma$ carbon intensity of production
-- $E$ emissions
-
-## **Optimal Planning**
-The unconstrained problem aims to maximize $V$ within the bounds of $\mu_t$ and $S_t$ time courses (while considering constraints on $\mu$ and $S$). Why is there a "sweet spot"? Increasing savings boosts investment and productivity, but higher production leads to emissions, resulting in increased temperature and damages that reduce production. Mitigation costs counterbalance this effect, creating a trade-off. As a result, there typically exists a meaningful joint time series of $\mu_t$ and $S_t$ that maximizes $V$. Due to the discount factor $\gamma$, $V$ depends on the future consumption sequence (non-invested production) within a few multiples of the horizon, approximately $1/(1-\gamma)$ time steps into the future.
-
-Constrained formulations introduce an additional constraint to limit industrial emissions below a certain threshold.
-
-## **Social Cost of Carbon**
-A definition for the social cost of carbon (SCC) is
-
-- *the decrease in aggregate consumption in that year that would change the current...value of social welfare by the same amount as a one unit increase in carbon emissions in that year.* ([Newbold, Griffiths, Moore, Wolverton, & Kopits, 2013](https://www.worldscientific.com/doi/abs/10.1142/S2010007813500012)).
-
-The $SCC$ quantifies how much consumption is lost with increased emissions, using changes in welfare to make the connection. In technical terms:
-
-- the marginal value with respect to emissions relative to the marginal value with respect to consumption, $$SCC_t\propto\frac{\partial V/\partial E_t}{\partial V/\partial C_t}=\frac{\partial C_t}{\partial E_t}.$$
-This is usually expressed by multiplying by a proportionality factor of $-1000$ that converts the units to 2010 US dollars per tonne of CO2.
-
-# **Tutorial 4 Further Reading**
-
-## **Vectorization Methods for Creating Word Clouds**
-
-Let's write down what they compute by denoting the index, $d$, over the $D$ documents and the index, $w$, over the $W$ words in the vocabulary (the list of all the words found in all the tweets, which we'll call documents):
-- term frequency, $\mathrm{tf}(w,d)$. The frequency of a word $w$ in a document $d$ is $$\mathrm{tf}(w,d):=\frac{n(w,d)}{n(d)},$$ where $n(w,d)$ is the number of times term $w$ is in document $d$ and $n(d)=\sum_{w=1}^W n(w,d)$ is the total number of words in document $d$. The term frequency over all the documents is then, $$\mathrm{tf}(w):=\frac{\sum_{d=1}^D n(d)\mathrm{tf}(w,d)}{N},$$ where the denominator $N=\sum_{d=1}^D n(d)$ is just the total word count across all documents.
-- term frequency-inverse document frequency, $\mathrm{Tfidf}(w,d):=\mathrm{tf}(w,d)\mathrm{idf}(w)$. Here, $$\mathrm{idf}(w)=\frac{\log(D+1)}{\log(n(w)+1)+1},$$ where $n(w)$ is the number of documents in which term $t$ appears, i.e. $n(w,d)>0$. Idf is like an inverse document frequency. The `sklearn` package then uses $$\mathrm{Tfidf}(w)=\frac{1}{D}\sum_{d=1}^D \frac{\mathrm{Tfidf}(w,d)}{||\mathrm{Tfidf}(\cdot,d)||},$$ where $||\vec{x}||=\sqrt{\sum_{i=1}^Nx^2_i}$ is the Euclidean norm.
-
-$\mathrm{Tfidf}$ aims to add more discriminability to frequency as a word relevance metric by downweighting words that appear in many documents since these common words are less discriminative.
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/requirements.txt b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/requirements.txt
deleted file mode 100644
index 8f92038e4..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/requirements.txt
+++ /dev/null
@@ -1 +0,0 @@
-wordcloud
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial1_Solution_b2906775.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial1_Solution_b2906775.py
deleted file mode 100644
index 254d0948d..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial1_Solution_b2906775.py
+++ /dev/null
@@ -1,16 +0,0 @@
-
-'''
-3. One scenario to try based on the goals of the energy transition is the combination of:
-(1) full electrification of the energy supply, i.e. 'very highly taxed' fossil fuel emissions (Coal, Natural gas, and Oil),
-(2) 'highly subsidized' renewables, and
-(3) a 'very high' carbon price,
-as well as the 'highly reduced' emissions of Methane and other Gases
-which gets us to a maximum increase of 2°C by the end of the century
-(cf. this example scenario https://en-roads.climateinteractive.org/scenario.html?v=24.3.0&p1=100&p7=85&p10=5&p16=-0.05&p23=-1&p39=250&p59=-64&p67=2&g0=2&g1=62).
-
-Nevertheless, other scenarios are possible, either by involving more parameters or by focusing on carbon removal.
-There are (at least!) two important observations to make. First, actions vary in leverage, in other words, some actions are more helpful than others.
-Second, to make a difference and reach an ambitious goal like the 2°C degree target, many actions in many sectors are required.
-Sometimes one refers to this circumstance by calling it a 'Silver Buckshot' instead of a 'Silver Bullet' approach (cf. e.g. https://www.washingtonpost.com/archive/opinions/2006/05/27/welcome-to-the-climate-crisis-span-classbankheadhow-to-tell-whether-a-candidate-is-serious-about-combating-global-warmingspan/26b2ac5a-a4a3-46ff-b214-3fc07a3a5ab3/).
-Furthermore, people might be surprised by the fact that some actions may be much lower leverage, while others like carbon pricing and energy efficiency might be higher leverage than people expect.
-'''
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial1_Solution_bbf54df1.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial1_Solution_bbf54df1.py
deleted file mode 100644
index 6bef8614b..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial1_Solution_bbf54df1.py
+++ /dev/null
@@ -1,13 +0,0 @@
-
-'''
-1. At first, En-ROADS is a world model, not an optimal planning model so it is unlike any IAM used e.g. for the IPCC reports.
-Controls are somewhat limited (DAC/CCS, soil, BioChar, and mineralization are not covered).
-It allows only for single parameter changes - in reality, there will be correlations, e.g. between carbon pricing and renewables due to market pressure.
-Some feedbacks are also missing, besides the above-mentioned damage from climate change on GDP, land use, etc.,
-climate change harms the human population by shortening lives.
-Although this happens already in the current 1°C increase reality, this harm is difficult to quantify and hence not implemented.
-Furthermore, it is a fully aggregated model, no spatial/regional or income resolution, and corresponding interdependency exists.
-An action/ policy is assumed to be executed globally, which is a utopia so far.
-It hence remains important to consider the implications of heterogeneity across different countries and their interactions.
-Last but not least, tipping points such as the thawing of the permafrost are represented in a very simplified manner only, although they probably have strong implications.
-'''
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_1425c24a.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_1425c24a.py
deleted file mode 100644
index 6435f43d1..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_1425c24a.py
+++ /dev/null
@@ -1,13 +0,0 @@
-'''
-1. There are two options. We could change one boring parameter and a more exciting one.
-The former has a strong impact. By turning off the 'Climate change slows economic growth' button, we make the strong assumption that there is less severe damage as asked because there is NO damage at all.
-In other words, we decoupled GDP and temperature increase which results in even more GHG emissions than in the baseline scenario.
-To get a more relevant and exciting result, it is better to change the 'Economic damage formulation' instead.
-
-2. The default formulation by 'Burke 2018' serves as the baseline.
-In order to have a less severe damage formulation we could have a look at the 'Reduction in GDP vs. Temperature' plot.
-However, all other formulations show a more or equal severe damage function than 'Burke 2018' with respect to temperature.
-Another view, i.e. the 'Gross World Product' in contrast shows that the 'Howard & Sterner' formulation results in less economic damage,
-which might have been covered in the 'Reduction in GDP vs. Temperature' graph as the scale was going up to 5°C,
-which we do not reach until 2100 in our simple baseline-like scenario.
-'''
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_c67833bd.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_c67833bd.py
deleted file mode 100644
index 46db77624..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_c67833bd.py
+++ /dev/null
@@ -1,11 +0,0 @@
-'''
-1. In En-ROADS the population growth has a small effect on the temperature increase by 2100. On the left, the global population graph emphasizes the development until 2100, resulting in an expected population of 8.8 billion in the lowest growth case and an expected population of 12.56 billion in the largest growth case, respectively.
-The former leads to a 3.2°C increase and the latter to a 3.5°C which is only a $\pm$ 0.2°C change due to population growth.
-In contrast, economic growth has a much larger impact: high growth (+30.000 $/person/year in 2100) leads to a temperature increase of 0.4°C by 2100 and low growth (-20.000 $/person/year in 2100) decreases it by 0.3°C, making discussions of overpopulation rather irrelevant as the decisions around family choice are personal decisions and efforts to shift these decisions have many ethical implications.
-It is instead raising the question of the necessity to end economic growth or at least to discuss its current coupling to resource exploitation.
-Note that lower population growth takes a long time to affect emissions because global population shifts do not occur quickly and instead play out over many decades.
-
-2. All possible combinations of pop.-econ. -- low-low: 2.9°C, low-no: 3.2°C, low-high: 3.6°C, no-no: 3.3°C, no-low: 3.0°C, no-high: 3.7°C, high-low: 3.1°C, high-no: 3.5°C, high-high: 4.0°C.
-In terms of an anticipated minimal temperature increase, the best (worst) case is to have a low (high) growth in population and economy. It is better to have a decreasing economy and a growing population than vice versa (increasing economy + shrinking population).
-Having high population growth and economic growth add up to a larger temperature increase (+0.7°C) than their individual contribution (high pop. growth +0.2°C, high econ. growth +0.4°C) which indicates that these variables are not fully independent in the En-ROADS model.
-'''
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_efff427c.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_efff427c.py
deleted file mode 100644
index 9fcb077f6..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_efff427c.py
+++ /dev/null
@@ -1,3 +0,0 @@
-'''
-Other potential examples are human health, extreme weather events, sea-level rise, desertification, flooding, species migration.
-'''
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial3_Solution_2aba4d73.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial3_Solution_2aba4d73.py
deleted file mode 100644
index 1cc5f7ad8..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial3_Solution_2aba4d73.py
+++ /dev/null
@@ -1,10 +0,0 @@
-
-'''
-3. The earlier the carbon price starts to phase in the more effective it is regarding the temperature increase.
-However, the earlier the larger the disturbance of the market price of electricity, emphasized by a strong increase in the price at first
-and a strong drop in the price after the first few years.
-This might lead to economic disruptions as energy supply becomes very expensive, therefore low-income households,
-which usually spend large parts of their income on energy, would need compensation like a 'carbon dividend' to avoid precariat.
-In summary, actions and their temporal implementation always need to be evaluated in various aspects to be a successful and
-societal least disruptive action against climate change.
-'''
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial4_Solution_4240ed7b.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial4_Solution_4240ed7b.py
deleted file mode 100644
index 278c4e8b0..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial4_Solution_4240ed7b.py
+++ /dev/null
@@ -1,10 +0,0 @@
-'''
-2. We choose 'Emissions' and 'Land Cover|Forest' as variables of interest to contrast ecosystem health between the two scenarios.
-First, note that the land model components from the IMAGE and REMIND-MAGPIE estimate different initial land cover areas, if we assume however that their trend is reasonable, we can conclude the following:
-For high emissions, forcing rises and hence temperature, we know that precipitation patterns change with higher temperatures such that forests,
-here our indicator for ecosystem health, are dying.
-In turn the land cover by forests is decreasing in the SSP5 scenario.
-In contrast, the SSP1 reduces emissions and also exploits resources like wood only sustainably due to afforestation.
-As afforestation is also used to capture carbon, while land use is reduced in general,
-the scenario shows an increase in land cover by forests within the current century.
-'''
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial4_Solution_a4ef74b1.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial4_Solution_a4ef74b1.py
deleted file mode 100644
index f6f1f4a52..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial4_Solution_a4ef74b1.py
+++ /dev/null
@@ -1,34 +0,0 @@
-
-# put two variables of interest in a list
-vars = ['Emissions|Kyoto Gases', 'Land Cover|Forest']
-# create new names for structured data series and plot labels
-val_name = ['Emissions\n(Mt CO$_2$/yr)','Land covered by\nforest (million ha)']
-# choose scenarios of interest and a color for plotting
-scenarios = ['SSP1-26', 'SSP5-Baseline']
-colors = ['darkblue','darkorange']
-
-
-# init figure and axis
-fig, axs = plt.subplots(2,1)
-# loop over all variables and new names
-for var, val, ax in zip(vars,val_name, axs.flatten()):
-
- # loop over scenarios and their color
- for sc, col in zip(scenarios, colors):
- # retrieve SSP for the respective variable from rich dataframe
- ds_unstrct = get_SSPs_for_variable(df,sc,var)
- # restructure dataframe for plotting
- ds_strct = pd.melt(ds_unstrct, id_vars=["MODEL"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name="YEAR", value_name =val)
- #print(ds_strct)
- # plot variable vs. time, add label incl. scenario and model
- ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\n{ds_strct.MODEL[0]}', color=col)
- # altern. plotting procedure w/o the color distinction
- #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')
-
- # aesthetics
- ax.set_ylabel(fr'{val}')
- ax.set_xlabel('Time (years)')
- plt.setp(ax.get_xticklabels(), rotation=45)
- plt.setp(ax.get_xticklabels()[::2], visible=False)
- ax.grid(True)
- axs[0].legend()
\ No newline at end of file
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/static/W2D3_Tutorial4_Solution_a4ef74b1_0.png b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/static/W2D3_Tutorial4_Solution_a4ef74b1_0.png
deleted file mode 100644
index 83b04acb1..000000000
Binary files a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/static/W2D3_Tutorial4_Solution_a4ef74b1_0.png and /dev/null differ
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_DaySummary.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_DaySummary.ipynb
deleted file mode 100644
index b3059d2de..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_DaySummary.ipynb
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "3b83976b",
- "metadata": {},
- "source": [
- "# Day Summary"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "f2b474b6",
- "metadata": {},
- "source": [
- "This day's tutorials focused on the socioeconomic projections regarding the future of the climate emergency. The content centered around the shared socioeconomic pathways framework used by the IPCC and is more knowledge-based than skills-based compared with other days.\n",
- "\n",
- "The day began with a tutorial that summarizes the socio-economic history of growth & limits to physical growth as a parent problem within which the climate emergency arises. You explored the consequences of resource limitations in the computational part of this tutorial through the world3 model.\n",
- "\n",
- "The next tutorial dove into a formulation of the economics of climate change beginning with goal setting and then the main concepts and methods to finding optimal economic plans. You learned about the economic models used in the SSP framework, integrated assessment models (IAMs), and the modeling practice that uses them to make projections. The computational part of the tutorial first walked you through some graphical exercises that illustrate basic economic concepts before running a simple IAM (the RICE model) under various parameter settings.\n",
- "\n",
- "The third tutorial presented the SSP framework in which IAMs are used. You learned how the five SSP narratives were constructed and integrated with physical modeling efforts to define the full set of SSP pathways. You then got a glimpse of what an IAM used in this project consists of and saw the results through important metrics like energy use and greenhouse gas emissions. The computational part of the tutorial took off from a critique of the SSP framework to motivate playing with MARGO, a simple model with more, and more dynamic mitigation controls.\n",
- "\n",
- "Finally, the fourth tutorial on public opinion focussed on climate action psychology and values-based communication. The computational exercise had you analyze public sentiment through analysis of a large dataset of Twitter messages."
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.8"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Intro.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Intro.ipynb
deleted file mode 100644
index bc9b42b91..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Intro.ipynb
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "df1a0a21",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Intro"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "6013efcc",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Overview"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "dfaee097",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Up to today, you have studied models of our climate system. Today, we will begin to model the (in many ways more complex!) system of society’s economy and how climate impacts them. "
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Intro",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.8"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Outro.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Outro.ipynb
deleted file mode 100644
index b707d8c54..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Outro.ipynb
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "175cc467",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Outro"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "2e5c1afd",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Now that you have a sense for the complexity nestled within Integrated Assessment Modeling and socioeconomic phenomena, you will look at how we try to coarse grain that complexity when applying our understanding of climate to assess extreme events and vulnerability. "
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Outro",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.10.8"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial1.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial1.ipynb
deleted file mode 100644
index 3c7745274..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial1.ipynb
+++ /dev/null
@@ -1,440 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "25d9555a-5485-42c3-81cf-4851396a643f",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial1.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1872759b-c9e3-4d4e-a3cf-30813840b049",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 1: Orienting inside a \"Climate Solution\" Simulator\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Maximilian Puelma Touzel, Paul Heubel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a2d2b006-8493-451b-a75e-797d902a0fcd",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 30 minutes\n",
- "\n",
- "During the first week of the course, you applied computational tools to climate data (measurements, proxies, and model output) to characterize past, present, and future climate. During day one of this second week (W2D1), you began to explore climate model data from Earth System Model (ESM) simulations conducted for the recent Climate Model Intercomparison Project (CMIP6) that are presented in the report from the Intergovernmental Panel on Climate Change ([IPCC](https://www.ipcc.ch/)). However, the dominant source of uncertainty in those projections arises from how human society responds: e.g. how our emissions reduction and renewable energy technologies develop, how coherent our global politics are, how our consumption grows (cf. [Rogelj et al. (2018)(Global Warming of 1.5°C. An IPCC Special Report \\[...\\])](https://doi.org/10.1017/9781009157940.004)). For these reasons, in addition to understanding the physical basis of the climate variations projected by these models, it's also important to assess the current and future socioeconomic impact of climate change and what aspects of human activity are driving emissions.\n",
- "\n",
- "This day's tutorials focus on the socioeconomic projections regarding the future of climate change and are centered around the Shared Socioeconomic Pathways (SSP) framework used by the IPCC. However, in this first tutorial, you will use the [En-ROADS](https://www.climateinteractive.org/en-roads/) simulator to get some intuition about different socioeconomic variables and their consequences for climate. Additionally, you will analyze potential economic and population scenarios to learn about the complex and intertwined dynamics of socioeconomic variables, as well as how this model informs modern-day climate challenges.\n",
- "\n",
- "Unlike the rest of the days of this course, this day will be highly conceptual and discussion-driven, and focus much less on analyzing datasets.\n",
- "\n",
- "In this tutorial, you will:\n",
- "- Get familiar with the interface of the simulator named En-ROADS\n",
- "- Explore the impact of different growth variables on the temperature increase by 2100 projected from the En-ROADS model.\n",
- "- Understand why it is necessary to implement various actions against climate change, not a single one.\n",
- "- Explore the assumptions and limitations of this model"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "368d0c90-ae7e-43d9-ada7-ad42c75f5f95",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "6db786f8-e5c4-42a9-9837-e41027b9ad4d",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "e11e3bbb-ce8f-4404-8d04-b6f86d4a9ea9",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "ea9d553f-c3eb-4723-a922-e81f97e1e3ba",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Orienting inside a 'Climate Solution' Simulator\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "video_ids = [('Youtube', 'g5VRHCcIyxk'),\n",
- " #('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "52ca5582-816c-423c-9ed7-cda1c7319731",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"mtyrb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "57265af6-b3ab-41e4-82a1-6c4b63a0c321",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Exploration of a Climate Solution Simulator"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "042a83d3-2e94-4092-a289-2430d349966c",
- "metadata": {
- "execution": {}
- },
- "source": [
- "The following introductory video gives a quick overview of the En-ROADS simulator, a simple climate model (SCM), developed by [Climate-Interactive](https://www.climateinteractive.org/) for teaching purposes. It is used in policy workshops, role-plays, and other activities to explore the possibilities and obstacles of scenarios and human solutions to climate change.\n",
- "\n",
- "To get familiar with modeling societal and economic mechanisms in combination with climatic variables, the so-called **socio-economic model**, you will examine its 'control knobs', limitations, and assumptions. In later tutorials you will compare these findings with those of Integrated Assessment Models (IAMs) which are state-of-the-art models for projecting scenarios and those used in the socioeconomic pathways of the IPCC."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "9c6b2260-bdb0-4d7b-a07d-41551d5ccf92",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 2: Overview of the En-ROADS Climate Solutions Simulator\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', 'Py_qIgcZxKg')\n",
- " # , ('Bilibili', 'BV1bj411Z739')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "718606a5-1239-414b-84fc-f9c0a18924d6",
- "metadata": {
- "execution": {}
- },
- "source": [
- "### Exercise 1: Can you limit human-caused global warming to \"well-below 2ºC\"?\n",
- "*Estimated timing:* 20 minutes\n",
- "\n",
- "We jump right in with an exercise, adapted from [En-ROADS](https://www.climateinteractive.org/guided-assignment/), that allows you to explore the Climate Solution Simulator.\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- "\n",
- "2. **Develop a scenario**: By moving the sliders, find a scenario (i.e. a combination of slider positions of different variables) that results in *less than 2°C* of temperature increase by the end of the century. Don't worry if you don't find a scenario that works right away - keep exploring. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) to help you get started. Have fun!\n",
- "\n",
- "3. **Answer the following questions**:\n",
- "\n",
- "* How many variables did you have to adjust to reach the \"well-below 2ºC\" target?\n",
- "* Which variables had the most individual impact? Did the magnitude of impact surprise you for any variables?\n",
- "* How feasible is this scenario? That is, what actions would have to be taken by governments, businesses and people over the next few years to make the proposed scenario possible?\n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "30a81fb8-c21b-490c-9297-a6705f114957",
- "metadata": {
- "colab_type": "text",
- "execution": {}
- },
- "source": [
- "[*Click for solution*](https://github.com/neuromatch/climate-course-content/tree/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial1_Solution_b2906775.py)\n",
- "\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "05df13b5-14ce-4515-aaae-7cc9e3765445",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "#link_id = \"gwr8h\"\n",
- "\n",
- "download_link = f\"https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf\"\n",
- "render_link = f\"https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download a cheatsheet for the En-ROADS Control Panel:\\n{download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1f5a0c7f-8fd3-4c89-b25d-8070ef2fdd4b",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 2: Limitations of the En-ROADS Model Approach\n",
- "\n",
- "We conclude this tutorial by stepping back and discussing the limitations of En-ROADS.\n",
- "\n",
- "### Exercise 2: Limitations\n",
- "*Estimated timing:* 5 minutes\n",
- "\n",
- "1. Think about limitations that arise from the En-ROADS model approach. List a few mechanisms that seem oversimplified or phenomena that might be not or misrepresented. Discuss with your pod.\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "b17595a7-b326-4edb-9f80-b8e21f1d4e5e",
- "metadata": {
- "colab_type": "text",
- "execution": {}
- },
- "source": [
- "[*Click for solution*](https://github.com/neuromatch/climate-course-content/tree/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial1_Solution_bbf54df1.py)\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "51aac287-f6d0-479e-be4b-87f557c32214",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this tutorial, you got an intuition for various 'control knobs' that can be turned in a socio-economic model environment. We discussed why no policy alone can be a silver bullet to solve all problems but a mixture of many actions, in particular, the energy transition to renewables and carbon pricing. At last, we discussed a few limitations of the En-ROADs model approach."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1c949bc5-e5ef-4d07-b379-122072ef6271",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial1",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial2.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial2.ipynb
deleted file mode 100644
index 6e25a5756..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial2.ipynb
+++ /dev/null
@@ -1,481 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "873927b3-ad55-40a2-ab6a-de2af3c09cc8",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial2.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "8eb286c6-dd69-440b-bc14-e6c7f20517bf",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 2: Fossil Fuel Emissions, Growth, and Damage\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "d86fc935-8b60-4fcf-83d7-1e9c78ca6b84",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 30 minutes\n",
- "\n",
- "This tutorial explores the impact of population and economic growth on the global temperature and how a changing climate due to fossil fuel emissions damages our economy. You model these scenarios by 'controlling the knobs' of the Climate Solution Simulator named [En-ROADS](https://www.climateinteractive.org/en-roads/).\n",
- "\n",
- "After finishing this tutorial you can\n",
- "\n",
- "* discuss the impact of a growth-based economy on future fossil-fuel emissions along the Kaya identity\n",
- "* qualitatively describe the impact of population and economic growth on the global temperature within the En-ROADS model environment.\n",
- "* (explain qualitatively how a different damage function formulation impacts the economic activity)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "8dc93386-4bde-4e22-b7eb-174133f57351",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "f9398705-5441-4ed3-980d-c6339cb30696",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "3342114d-deee-4d5b-afde-d4852bac2352",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "2ca0746a-edad-45f7-8ad5-1b4ec1e7c546",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Orienting in a 'Climate Solution' Simulator\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', 'g5VRHCcIyxk'),\n",
- " #('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "5d45c633-1daa-4408-ab8c-18969fff8bde",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"mtyrb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "4cb055f0-0f58-4c8c-9e11-a7a16f0b6e98",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Quantification of Fossil Fuel Emissions and Its Dependency on Growth\n",
- "\n",
- "We discussed in the slides how economics represents the human population as a source of labor needed to produce goods and services. A by-product of this production are fossil fuel emissions, which increase atmospheric greenhouse gas (GHG) concentrations, significantly changing the earth's climate. Let us take a look at the relationship between people, production, and emissions in more detail using the En-ROADS simulator.\n",
- "\n",
- "You might already have clicked through the toggles at the top of the control panel of En-ROADS and tried the different *Views* (Main graphs, Kaya graphs, Miniature graphs). Select now the **Kaya graphs** view and reset the simulator (click on the anti-clockwise circular arrow to 'Reset all policies & assumptions' or just reload the page/model [here](https://en-roads.climateinteractive.org/)).\n",
- "\n",
- "The Kaya graphs depict four drivers of growth in carbon dioxide emissions from energy use, which reflects about two-thirds of all greenhouse gas emissions (the remaining third of emissions are from land use changes and other gases, such as methane (CH4) and nitrous oxide (N2O), which are not considered here). The corresponding equation, the so-called [***Kaya identity***](https://en.wikipedia.org/wiki/Kaya_identity) below was developed by Yoichi Kaya:\n",
- "\n",
- "***CO$_2$ Emissions from Energy = Global Population × GDP per Capita × Energy Intensity of GDP × Carbon Intensity of Energy***\n",
- "\n",
- "Where [gross domestic product](https://en.wikipedia.org/wiki/Gross_domestic_product) (GDP) is a measure of economic activity or health. \n",
- "\n",
- "In a more mathematical form, this equation is\n",
- "\n",
- "$$\n",
- "F = P \\times \\left[\\frac{G}{P}\\right] \\times \\left[\\frac{E}{G}\\right] \\times \\left[\\frac{F}{E}\\right]\n",
- "$$\n",
- " - $F$ (CO$_2$ emissions from energy), \n",
- " - $P$ (global population), \n",
- " - $G$ (world GDP), and \n",
- " - $E$ (global energy consumption).\n",
- "\n",
- "Decomposing emissions in this way helps to see key contributions and, if we assume that the factors are independent of each other (which is not fully true), distinct ways that we can lower emissions. Each factor in this model is important and extreme reductions in one can offset increases in the others. In our case, our emissions $F$ are increasing over time because the Energy Intensity of GDP $\\left[\\frac{E}{G}\\right] $ and the Carbon Intensity of Energy do not together offset enough of our growing GDP ($G$), which is by definition necessary for a growth-based economy.\n",
- "\n",
- "The first four graphs in the Kaya view display these four variables $\\left(P, \\frac{G}{P}, \\frac{E}{G}, \\frac{F}{E}\\right)$, with the fifth plot showing Emissions, $F$. This allows us to compare the importance of, say, economic and population growth on the CO$_2$ emissions and subsequent temperature rise by 2100."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "fd232a4d-c350-4e7b-9519-921800d81e20",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Exercise 1: Population vs. Economic Growth\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- "\n",
- "2. **Develop a scenario**: Turn two *growth* 'control knobs' of En-ROADS, which are the sliders *Economical growth* and *Population growth*. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) if needed. \n",
- "\n",
- "3. **Answer the following questions**:\n",
- "\n",
- "* What can you observe within the *Kaya graph* view? Describe the graphs and interpret them.\n",
- "\n",
- "Read the following dropdown accessible box if you need more information to interpret the Kaya graphs. \n",
- "\n",
- "*Be warned that a reset of all your previous changes might be necessary before. If you would like to save your previous scenario, export it via a click on the* ***Share your scenario*** *button in the top right of the Panel, and select 'Copy Scenario Link'*.\n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "1c61eb29-ab14-4445-915e-5d39abab9a73",
- "metadata": {
- "execution": {}
- },
- "source": [
- "\n",
- " Click here for a description of the Kaya identity and the corresponding plots \n",
- "\n",
- "Here is one way to understand the shown trends over time:\n",
- "\n",
- "The Global Population ($P$) of 8 billion people is growing and growth is anticipated to be 11 billion by the end of the century, according to UN projections. The rate of growth is slowing over time as people have smaller families.\n",
- "\n",
- "GDP ($G$) per Capita ($P$) is growing steadily per year, and the model assumes this will continue, mostly as people in rapidly developing countries such as China, India, South Africa, Mexico, Brazil, and Indonesia attain higher standards of living.\n",
- "\n",
- "Energy Intensity ($E$) of GDP is decreasing over time, due to the world economy becoming more efficient, or using less energy per unit of economic output. Technologies are improving - for example, more efficient cars, buildings, and machines—and economies are shifting from manufacturing to services. The product of global population, GDP per capita, and the energy intensity of GDP is the total amount of energy used by the global economy.\n",
- "\n",
- "Carbon Intensity of Final Energy, the amount of carbon dioxide emitted by energy use, is expected to slightly decline over time. Overall, this downward trend in carbon intensity is attributed to the gradual shifting away from fossil fuels and towards low-carbon energy sources.\n",
- "\n",
- "Carbon Dioxide Emissions from Energy are the result of all four factors multiplied together, and you can see that in the Baseline Scenario emissions are growing. As the level of carbon dioxide in the atmosphere correlates with temperature, an increased concentration of carbon dioxide in the atmosphere leads to an increase in global temperatures.\n",
- "\n",
- "These factors explain, in simple terms, why emissions are increasing in the Baseline Scenario. Improvements in efficiency and decarbonization are not yet keeping up with the strong growth in population and consumption\n",
- " \n",
- "*** \n",
- " \n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "id": "e242d987-4e3a-418b-b69c-65fe25e35ed7",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Questions 1:\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "Before using the sliders and answering the following questions, build a brief working hypothesis. Which one of the two 'growth knobs' do you expect will be more influential on the global mean temperature and also how much more? \n",
- "\n",
- "1. What do you observe, when you only change the population growth slider? And vice versa changing only the economic growth slider? \n",
- "2. Combine the effect of both sliders in the common and opposite direction, respectively. Are you surprised about the output?"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "d88106d5-3008-47fe-ab29-9e09a539b369",
- "metadata": {
- "colab_type": "text",
- "execution": {}
- },
- "source": [
- "[*Click for solution*](https://github.com/neuromatch/climate-course-content/tree/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_c67833bd.py)\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a92f9886-6e3c-45f2-b6e1-a7f036af03b2",
- "metadata": {
- "execution": {}
- },
- "source": [
- "\n",
- " Click here for a bonus digression on the Limits To Growth \n",
- " \n",
- "### Bonus: A note on exponential growth in a bounded system \n",
- "Consider a bounded system undergoing only positive feedback leading to exponential growth. The characteristic duration of growth until the system state reaches the system boundary is only weakly sensitive to the size of the boundary. For example, in the context of exponential resource-driven economic growth on Earth, reaching the boundary means exhausting its accessible physical resources. Ten times more or less of the starting amount of accessible resources only changes the time at which those resources are exhausted by a factor of 2 up or down, respectively. \n",
- "\n",
- "Physics demands that behind the exponential extraction of resources is an exponential use of an energy resource. In recent times on Earth, this has been fossil fuels, which are non-renewable. Legitimate concerns of peak oil in the late 1990s were quelled by the Shale revolution in the United States and other technological advances in oil and gas exploration and exploitation. These have increased (by a factor between 2 and 4) the total amount of known reserves that can be profitably exploited. While this increase is significant on an linear scale, it is negligible on an exponential scale. Looking forward, the largest estimates for how much larger accessible oil and gas reserves will be are within an order of magnitude of current reserves. Presuming resource-driven growth economics continues, whatever accessible oil and gass is left will then be exhausted within a short period of time (e.g. within a century). \n",
- "\n",
- "Exponential growth in a bounded system will often slow as it reaches the boundary because of boundary-sized feedback effects. In our case, demand growth for fossil fuels is starting to slow with the development of renewable energy sources. There still substantial uncertainty about how these feedbacks will play out. Some questions to consider: \n",
- "- whether the transition to renewable energy sources can happen before we exhaust the associated non-renewable resources. \n",
- "- Once transitioned, whether the non-renewable resource use (e.g. of rare-earth metals) needed to sustain the renewable energy sector is sustainable in a growth-based economics\n",
- "- Once transitioned, whether this renewable energy resource might not slow, but instead accelerate the extraction of all non-renewable resources (see [Jevon's paradox](https://en.wikipedia.org/wiki/Jevons_paradox)). \n",
- "\n",
- "*** \n",
- " \n",
- ""
- ]
- },
- {
- "cell_type": "markdown",
- "id": "98a285b1-48e1-4c90-9789-584d80231449",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Bonus Section 2: The Economic Impact of Climate Change\n",
- "\n",
- "In the previous day's tutorials, you learned how increases in atmospheric greenhouse gas (GHG) concentrations significantly alter Earth's climate and examined the impacts of these emissions on variables such as sea-surface temperature and oxygen. These changes in climate variables can, in turn, impact the economy. For example, increased temperatures may reduce crop yields or soften road surfaces requiring more frequent or intense repairs.\n",
- "\n",
- "## Bonus Question 2:\n",
- "\n",
- "1. Take a minute to think of some other possible ways in which climate change can affect the economy. Then discuss with your pod."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "920f3d23-5eb9-4f4b-9c43-86e5cbad02b9",
- "metadata": {
- "colab_type": "text",
- "execution": {}
- },
- "source": [
- "[*Click for solution*](https://github.com/neuromatch/climate-course-content/tree/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_efff427c.py)\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c78b63df-8bc2-4e0c-898f-a926fce03e4d",
- "metadata": {
- "execution": {}
- },
- "source": [
- "These economic impacts on climate change are considered *economic damage* as they typically result in less or slower economic growth. Economists incorporate the impacts of climate change on the economy into models through a **damage function**, which usually represents climate change by an increase in global temperature, and the impact on the economy as a reduction in [gross domestic product](https://en.wikipedia.org/wiki/Gross_domestic_product) (GDP).\n",
- "\n",
- "You can dive deeper into the control knob functionalities of En-ROADS by changing the quantification of how climate change damages the economy via a reduction in GDP. To have a closer look at the assumptions that go into the model, we click on the 'Simulation' toggle and select 'Assumptions', in the bottom a box of toggles appears. Here we choose the 'Economy' section and click on 'Economic impact of climate change'.\n",
- "\n",
- "### Bonus Exercise 2: Choose a Damage function\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "In this section, 3 dropdowns correspond to 3 assumptions: (1) whether or not climate change slows economic growth, (2) if yes, how strongly as a function of temperature (what is the damage function), and (3) by how much do we discount far future welfare relative to current welfare. \n",
- "\n",
- "1. Hypothesize which parameter needs to be changed to have a less severe damage function.\n",
- "\n",
- "2. Decide which 'related graph' shall be shown on the top left and explain your hypothesis and final choice of the parameter along it.\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "f1055ced-d99b-4c9f-b4e7-fe7176cc58bc",
- "metadata": {
- "colab_type": "text",
- "execution": {}
- },
- "source": [
- "[*Click for solution*](https://github.com/neuromatch/climate-course-content/tree/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial2_Solution_1425c24a.py)\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "8a3c2b15-e9a4-45df-806e-82efafeb6fe5",
- "metadata": {
- "execution": {}
- },
- "source": [
- "With this, we already discussed a few damage functions in En-Roads. Although they are central to the climate-economy connection of the models, their formulation is relatively ad hoc, which leads to validity issues that are often criticized. \n",
- "\n",
- "There are at least two fundamental problems with damage functions (for more see [*The appallingly bad neoclassical economics of climate change* by S. Keen in *Globalizations* (2020)](https://www.tandfonline.com/doi/full/10.1080/14747731.2020.1807856)):\n",
- "1. As mathematical model objects, they are likely too simple to be useful predictors in characterizing climate damages in sufficient complexity. \n",
- "2. They arise from a poorly validated model-fitting procedure. In particular, it relies on ad hoc functional forms and the relevance of historical and geographical variability to future variability.\n",
- "\n",
- "Despite these problems, damage functions allow economists within the neoclassical paradigm to start seriously considering the damaging effects of climate change."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c688a40e-7c50-45a5-b95e-b66dcd939b99",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this tutorial, we discussed the impact of growth on fossil fuel emissions, in particular population growth vs. economic growth, and its treatment by the world model En-ROADS. Last but not least we introduced the important concept of the damage function to connect climate and economy within a model."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "ad0144cc-224a-4422-a098-18eb1481c841",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial2",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial3.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial3.ipynb
deleted file mode 100644
index 1ac39d641..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial3.ipynb
+++ /dev/null
@@ -1,328 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "ed664fc2",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial3.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "53e42e1c",
- "metadata": {
- "execution": {},
- "vscode": {
- "languageId": "plaintext"
- }
- },
- "source": [
- "# Tutorial 3: The Temporal Dimension of Actions\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "87ef2f44-fb74-4664-8472-4c97158a8d17",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial Objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 15 minutes\n",
- "\n",
- "The last tutorials covered the necessity for an energy transition to tackle the climate emergency and many solutions at once. As emissions accumulate, it becomes substantially harder to succeed the longer we take to make big changes. This tutorial explores the temporal dimension of action, here policies, by using the Climate Solution Simulator named [En-ROADS](https://www.climateinteractive.org/en-roads/).\n",
- "\n",
- "After finishing this tutorial you can\n",
- "\n",
- "* exemplify along the carbon price, why policy-making has to consider the temporal dimension and the needs of the most vulnerable parts of society"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "062c4b1a-6239-4644-a0dd-03fe1342fe99",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "8b4722fe-cbd5-484a-be6d-96ed7aafbf62",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "053ee0ea-d704-45c8-8b4b-aad17216710d",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "5b50c362",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: The IPCC's Transition Narratives and Project Modelling\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', 'g5VRHCcIyxk'),\n",
- " #('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "703ee8f2",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"mtyrb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "29cf9a43-2478-4d14-9faf-193e54378a04",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: When and How Do You Introduce a Carbon Price?\n",
- "\n",
- "You might have recognized that a high ***carbon price*** by default has a strong impact on the temperature increase within the En-ROADS model as it both reduces the carbon intensity of the energy supply and reduces the energy demand. However, the carbon price itself could be introduced now or in 50 years and at different amounts, depending on for example the social cost of such a policy, which makes energy supply more expensive depending on its emissions. Energy producers could pass additional costs to their customers, so policy could be designed to minimize the impacts on the poorest, e.g. by introducing a [Carbon fee and dividend](https://en.wikipedia.org/wiki/Carbon_fee_and_dividend). \n",
- "\n",
- "To account for their temporal evolution, many variables in En-ROADS allow for modifications of the timing when something is introduced, stopped, in or de-creased, and so on."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "d29fb31c-84ab-4705-8678-87f8274f6500",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Exercise 1: Implications of Actions and Their Timing\n",
- "*Estimated timing:* 10 minutes\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- " \n",
- "2. **Develop a scenario**: Click on the ellipsis of the 'Carbon price' slider, and a widget-info box opens that allows for finetuning of your carbon price policy.\n",
- " 1. Click on the title of the top right graph *Greenhouse Gas Net Emissions*, select the 'Financial' toggle, and select the 'Market price of electricity'.\n",
- " 2. Turn the most upper knobs/ vary the sliders of the 'Carbon price' and slide through different carbon prices.\n",
- " 3. Move the sliders to answer the following question. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) if needed.\n",
- "\n",
- "\n",
- "3. **Answer the following questions**:\n",
- " * What do you observe in the 'Market price of electricity' graph after varying the carbon price?\n",
- " * Now, select a high carbon price and increase the 'Year the carbon price starts to phase in'. How does the carbon price change the temporal evolution of the 'Market price of electricity'. \n",
- " * How could this be of consequence for a low-income household?\n",
- "\n",
- "*Be warned that a reset of all your previous changes might be necessary before. If you would like to save your previous scenario, export it via a click on the* ***Share your scenario*** *button in the top right of the Panel, and select 'Copy Scenario Link'*.\n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c97e6d3d-1718-479b-a19a-ffc6a082347b",
- "metadata": {
- "colab_type": "text",
- "execution": {}
- },
- "source": [
- "[*Click for solution*](https://github.com/neuromatch/climate-course-content/tree/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial3_Solution_2aba4d73.py)\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "3562deb9",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this tutorial, we discussed the temporal dimension of the carbon price implementation in order to understand why no policy might be a silver bullet to solve all problems but comes with various ethical and political implications. At last, we discussed a few limitations of the En-ROADs model approach."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "6d0c2c37-0e64-4734-8776-1f455a20987f",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "27636b92",
- "metadata": {
- "execution": {}
- },
- "source": [
- ""
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial3",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial3.jl b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial3.jl
deleted file mode 100644
index e3c0be61d..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial3.jl
+++ /dev/null
@@ -1,2138 +0,0 @@
-### A Pluto.jl notebook ###
-# v0.19.24
-
-using Markdown
-using InteractiveUtils
-
-# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
-macro bind(def, element)
- quote
- local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
- local el = $(esc(element))
- global $(esc(def)) = Core.applicable(Base.get, el) ? Base.get(el) : iv(el)
- el
- end
-end
-
-# ╔═╡ 1c8d2d00-b7d9-11eb-35c4-47f2a2aa1593
-begin
- import Pkg
- ENV["JULIA_MARGO_LOAD_PYPLOT"] = "no thank you"
- Pkg.activate(mktempdir())
- Pkg.add([
- Pkg.PackageSpec(name="Plots", version="1"),
- Pkg.PackageSpec(name="ClimateMARGO", version=v"0.3.3"),
- Pkg.PackageSpec(name="PlutoUI", version="0.7"),
- Pkg.PackageSpec(name="HypertextLiteral", version="0.9"),
- Pkg.PackageSpec(name="Underscores", version="2"),
- ])
-
- using Plots
- using Plots.Colors
- using ClimateMARGO
- using ClimateMARGO.Models
- using ClimateMARGO.Optimization
- using ClimateMARGO.Diagnostics
- using PlutoUI
- using HypertextLiteral
- using Underscores
-
- Plots.default(linewidth=5)
-end;
-
-# ╔═╡ 9a48a08e-7281-473c-8afc-7ad3e0771269
-TableOfContents()
-
-# ╔═╡ 94415ff2-32a2-4b0f-9911-3b93e202f548
-const initial_1 = Dict("M" => [2090, 6]);
-
-# ╔═╡ 50d24c91-61ae-4544-98fa-5749bafe3d41
-# md"""
-# ## Overview of the climate problem: from greenhouse gas emissions to climate suffering
-
-# Human emissions of greenhouse gases, especially Carbon Dioxide (CO₂), increase the stock of greenhouse gases in the atmosphere. For every molecule of CO₂ emitted, about 50% are taken up by plants, soils, or the ocean within a few years, while the rest remains in the atmosphere. (The effects of other greenhouse gases, such as Methane and CFCs, and other forcing agents, can approximately be converted into the "CO₂-equivalent"– or CO₂ₑ– concentrations that would lead to the same climate forcing).
-
-# Greenhouse gases get their name because they trap invisible heat radiation emitted by Earth's surface and atmosphere from escaping to space, much like greenhouses trap hot air from rising when it is warmed by the Sun. This "greenhouse effect" causes the temperature to rise globally, although some places warm *more* and *faster* than others. Warmer temperatures exacerbate both the frequency and intensity of "natural" disasters, such as heat waves, coastal flooding from major hurricanes, and inland flooding from torrential rain. These climate impacts lead to enhanced climate suffering, which economics typically attempt to quantify suffering in terms of lost money or welfare.
-
-# In the interactive article below, we invite you to explore the benefits of emissions mitigation and carbon dioxide removal in reducing climate suffering, and the trade-offs with their costs.
-# """
-
-# ╔═╡ e810a90f-f964-4d7d-acdb-fc3a159dc12e
-const initial_2 = Dict("M" => [2080, .7]);
-
-# ╔═╡ a3422533-2b78-4bc2-92bd-737da3c8982d
-const initial_3 = Dict("M" => [2080, .7]);
-
-# ╔═╡ 51037451-0fea-4021-8824-56911970b97b
-const initial_x = Dict("G" => [2030, 1]);
-
-# ╔═╡ 3094a9eb-074d-46c3-9c1e-0a9c94c6ad43
-blob(el, color = "red") = @htl("""
- """)
-
- BondDefault(h,1)
-end
-
-# ╔═╡ c7cbc172-daed-406f-b24b-5da2cc234c29
-preindustrial_concentrations = 280
-
-# ╔═╡ b440cd13-36a9-4c54-9d80-ac3fa7c2900e
-end_of_oil = 2150 # cannot mitigate when fossil fuels are depleted
-
-# ╔═╡ ec760706-15ac-4a50-a67e-c338d70f3b0a
-pp = (;
- ((k, (:color => c, :label => n))
- for (k, c, n) in zip(keys(names), colors, names))...
-);
-
-# ╔═╡ bb4b25e4-0db5-414b-a384-0a27fe7efb66
-gauss_stdev = 30
-
-# ╔═╡ 013807a0-bddb-448b-9300-f7f559e48a45
-begin
- default_usage_error = :(error("Example usage:\n\n@intially [1,2] @bind x f(x)\n"))
-
- macro initially(::Any)
- default_usage_error
- end
-
- macro initially(default, bind_expr::Expr)
- if bind_expr.head != :macrocall || bind_expr.args[1] != Symbol("@bind")
- return default_usage_error
- end
-
- # warn if the first argument is a @bind
- if default isa Expr && default.head == :macrocall && default.args[1] == Symbol("@bind")
- return default_usage_error
- end
-
- esc(intially_function(default, bind_expr))
- end
-
-
- function intially_function(default, bind_expr)
- sym = bind_expr.args[3]
- @gensym setval bond
-
- quote
- if !@isdefined($sym)
- $sym = $default
- end
-
- $setval = $sym
-
-
- $bond = @bind $sym $(bind_expr.args[4])
- PlutoRunner.Bond
-
- if $sym isa Missing
- $sym = $setval
- end
-
- $bond
- end
- end
-end
-
-# ╔═╡ 4e91fb48-fc5e-409e-9a7e-bf846f1d211d
-html"""
-
-"""
-
-# ╔═╡ 3c7271ab-ece5-4ae2-a8dd-dc3670f300f7
-# initial_mrga_1 = Dict(
-# "M" => [2070, 0.7],
-# "R" => [2100, 0.4],
-# "G" => [2170, 0.3],
-# "A" => [2110, 0.1],
-# )
-
-# ╔═╡ dcf265c1-f09b-483e-a361-d54c6c7500c1
-# @initially initial_mrga_1 @bind input_8 begin
-
-# controls_8 = MRGA(
-# gaussish(input_8["M"]...),
-# gaussish(input_8["R"]...),
-# gaussish(input_8["G"]...),
-# gaussish(input_8["A"]...),
-# )
-
-
-# plotclicktracker2(
-# plot_controls(controls_8),
-# initial_mrga_1,
-# )
-# end
-
-# ╔═╡ 10c015ec-780c-4453-83cb-12dd0f09f358
-function plotclicktracker(p::Plots.Plot; draggable::Bool=false)
-
- # we need to render the plot before its dimensions are available:
- # plot_render = repr(MIME"image/svg+xml"(), p)
- plot_render = repr(MIME"image/svg+xml"(), p)
-
- # these are the _bounding boxes_ of our plot
- big = bbox(p.layout)
- small = plotarea(p[1])
-
- # the axis limits
- xl = xlims(p)
- yl = ylims(p)
-
- # with this information, we can form the linear transformation from
- # screen coordinate -> plot coordinate
-
- # this is done on the JS side, to avoid one step in the Julia side
- # we send the linear coefficients:
- r = (
- x_offset = xl[1] - (xl[2] - xl[1]) * small.x0[1] / small.a[1],
- x_scale = (big.a[1] / small.a[1]) * (xl[2] - xl[1]),
- y_offset = (yl[2] - yl[1]) + (small.x0[2] / small.a[2]) * (yl[2] - yl[1]) + yl[1],
- y_scale = -(big.a[2]/ small.a[2]) * (yl[2] - yl[1]),
- x_min = xl[1], # TODO: add margin
- x_max = xl[2],
- y_min = yl[1],
- y_max = yl[2],
- )
-
- HTML("""""")
-end
-
-# ╔═╡ 7e540eaf-8700-4176-a96c-77ee2e4c384b
-years = 2020:12.0:2200
-
-# ╔═╡ 646591c4-cb60-41cd-beb9-506807ce17d2
-function gaussish(mean, magnitude)
- my_stdev = gauss_stdev * (1 + magnitude);
- map(years) do t
- clamp(
- (1.5 *
- magnitude *
- (-0.4 +
- exp(
- (-1 * ((t - mean) * (t - mean))) / (2 * my_stdev * my_stdev)
- ))) /
- (1.0 - 0.4),
- 0.0,
- 1.0
- )
- end
-end
-
-# ╔═╡ 6fb77b13-7a54-4d1d-9985-4735318680e1
-function expcontrol(mean, magnitude)
- sulfur_fraction = 0.33
- initial_value = sulfur_fraction
- map(years) do t
- sulfur_fraction + (magnitude-sulfur_fraction)*(1-exp(-(t-2020)/((mean-2020))))
- end
-end
-
-# ╔═╡ 8fa94ec9-1fab-41b9-a7e6-1917e975e4ff
-function default_parameters()::ClimateModelParameters
- result = deepcopy(ClimateMARGO.IO.included_configurations["default"])
- result.domain = years isa Domain ? years : Domain(step(years), first(years), last(years))
- result.economics.baseline_emissions = ramp_emissions(result.domain)
- result.economics.extra_CO₂ = zeros(size(result.economics.baseline_emissions))
- return result
-end
-
-# ╔═╡ 785c428d-d4f7-431e-94d7-039b0708a78a
-function opt_controls_temp(model_parameters = default_parameters(); opt_parameters...)
-
- model = ClimateModel(model_parameters)
-
- model_optimizer = optimize_controls!(model; opt_parameters..., print_raw_status=false)
-
- (
- result=model,
- status=ClimateMARGO.Optimization.JuMP.termination_status(model_optimizer) |> string,
- )
- # return Dict(
- # :model_parameters => model_parameters,
- # model_results(model)...
- # )
-end
-
-# ╔═╡ 2dcd5669-c725-40b9-84c4-f8399f6e924b
-bigbreak = html"""
-
-""";
-
-# ╔═╡ b8f9efec-63ac-4e58-93cf-9f7199b78451
-function setfieldconvert!(value, name::Symbol, x)
- setfield!(value, name, convert(typeof(getfield(value, name)), x))
-end
-
-# ╔═╡ 371991c7-13dd-46f6-a730-ad89f43c6f0e
-function enforce_maxslope!(controls;
- dt=step(years),
- max_slope=Dict("mitigate"=>1. /40., "remove"=>1. /40., "geoeng"=>1. /80., "adapt"=> 0.)
- )
- controls.mitigate[1] = 0.0
- controls.remove[1] = 0.0
- controls.geoeng[1] = 0.0
- # controls.adapt[1] = 0.0
-
-
- for i in 2:length(controls.mitigate)
- controls.mitigate[i] = clamp(
- controls.mitigate[i],
- controls.mitigate[i-1] - max_slope["mitigate"]*dt,
- controls.mitigate[i-1] + max_slope["mitigate"]*dt
- )
- controls.remove[i] = clamp(
- controls.remove[i],
- controls.remove[i-1] - max_slope["remove"]*dt,
- controls.remove[i-1] + max_slope["remove"]*dt
- )
- controls.geoeng[i] = clamp(
- controls.geoeng[i],
- controls.geoeng[i-1] - max_slope["geoeng"]*dt,
- controls.geoeng[i-1] + max_slope["geoeng"]*dt
- )
- controls.adapt[i] = clamp(
- controls.adapt[i],
- controls.adapt[i-1] - max_slope["adapt"]*dt,
- controls.adapt[i-1] + max_slope["adapt"]*dt
- )
- end
-end
-
-# ╔═╡ e815d175-1c47-4aef-bd89-e7fdc3e4912e
-function enforce_maxslope!2(controls;
- dt=step(years),
- max_slope=Dict("mitigate"=>1. /40., "remove"=>1. /40., "geoeng"=>1. /80., "adapt"=> 0.)
- )
- controls.mitigate[1] = 0.0
- controls.remove[1] = 0.0
- controls.geoeng[1] = 0.0
- # controls.adapt[1] = 0.0
-
-
- for i in 2:length(controls.mitigate)
- controls.mitigate[i] = clamp(
- controls.mitigate[i],
- controls.mitigate[i-1] - max_slope["mitigate"]*dt,
- controls.mitigate[i-1] + max_slope["mitigate"]*dt
- )
- controls.remove[i] = clamp(
- controls.remove[i],
- controls.remove[i-1] - max_slope["remove"]*dt,
- controls.remove[i-1] + max_slope["remove"]*dt
- )
- # controls.geoeng[i] = clamp(
- # controls.geoeng[i],
- # controls.geoeng[i-1] - max_slope["geoeng"]*dt,
- # controls.geoeng[i-1] + max_slope["geoeng"]*dt
- # )
- controls.adapt[i] = clamp(
- controls.adapt[i],
- controls.adapt[i-1] - max_slope["adapt"]*dt,
- controls.adapt[i-1] + max_slope["adapt"]*dt
- )
- end
-end
-
-# ╔═╡ b7ca316b-6fa6-4c2e-b43b-cddb08aaabbb
-function costs_dict(costs, model)
- Dict(
- :discounted => costs,
- :total_discounted => sum(costs .* model.domain.dt),
- )
-end
-
-# ╔═╡ 0a3be2ea-6af6-43c0-b8fb-e453bc2b703b
-
-model_results(model::ClimateModel) = Dict(
- :controls => model.controls,
- :computed => Dict(
- :temperatures => Dict(
- :baseline => T_adapt(model),
- :M => T_adapt(model; M=true),
- :MR => T_adapt(model; M=true, R=true),
- :MRG => T_adapt(model; M=true, R=true, G=true),
- :MRGA => T_adapt(model; M=true, R=true, G=true, A=true),
- ),
- :emissions => Dict(
- :baseline => effective_emissions(model),
- :M => effective_emissions(model; M=true),
- :MRGA => effective_emissions(model; M=true, R=true),
- ),
- :concentrations => Dict(
- :baseline => c(model),
- :M => c(model; M=true),
- :MRGA => c(model; M=true, R=true),
- ),
- :damages => Dict(
- :baseline => costs_dict(damage(model; discounting=true), model),
- :MRGA => costs_dict(damage(model; M=true, R=true, G=true, A=true, discounting=true), model),
- ),
- :costs => Dict(
- :M => costs_dict(cost(model; M=true, discounting=true), model),
- :R => costs_dict(cost(model; R=true, discounting=true), model),
- :G => costs_dict(cost(model; G=true, discounting=true), model),
- :A => costs_dict(cost(model; A=true, discounting=true), model),
- :MRGA => costs_dict(cost(model; M=true, R=true, G=true, A=true, discounting=true), model),
- ),
- ),
-)
-
-
-# ╔═╡ eb0c961d-42cf-4219-a36e-cd492fa31f6b
-const cost_bars_scale = 70
-
-# ╔═╡ ec5d87a6-354b-4f1d-bb73-b3db08589d9b
-total_discounted(costs, model) = sum(costs .* model.domain.dt)
-
-# ╔═╡ 70f01a4d-0aa3-4cd5-ad71-452c490c61ac
-colors_js = Dict((k,string("#", hex(v))) for (k,v) in pairs(colors));
-
-# ╔═╡ ac779b93-e19e-41de-94cb-6a2a919bcd2e
-names_js = Dict(pairs(names));
-
-# ╔═╡ 5c484595-4646-484f-9e75-a4a3b4c2af9b
-function plotclicktracker2(p::Plots.Plot, initial::Dict; draggable::Bool=true)
-
- # we need to render the plot before its dimensions are available:
- # plot_render = repr(MIME"image/svg+xml"(), p)
- plot_render = repr(MIME"image/svg+xml"(), p)
-
- # these are the _bounding boxes_ of our plot
- big = bbox(p.layout)
- small = plotarea(p[1])
-
- # the axis limits
- xl = xlims(p)
- yl = ylims(p)
-
- # with this information, we can form the linear transformation from
- # screen coordinate -> plot coordinate
-
- # this is done on the JS side, to avoid one step in the Julia side
- # we send the linear coefficients:
- r = (
- x_offset = xl[1] - (xl[2] - xl[1]) * small.x0[1] / small.a[1],
- x_scale = (big.a[1] / small.a[1]) * (xl[2] - xl[1]),
- y_offset = (yl[2] - yl[1]) + (small.x0[2] / small.a[2]) * (yl[2] - yl[1]) + yl[1],
- y_scale = -(big.a[2]/ small.a[2]) * (yl[2] - yl[1]),
- x_min = xl[1], # TODO: add margin
- x_max = xl[2],
- y_min = yl[1],
- y_max = yl[2],
- aspect_ratio = big.a[1] / big.a[2],
- )
-
- @htl("""""")
-end
-
-# ╔═╡ 060cbeab-5503-4eda-95d8-3f554765b2ee
-begin
- mutable struct MRGA{T}
- M::T
- R::T
- G::T
- A::T
- end
- # function MRGA(M::TM,R::TR=nothing,G::TG=nothing) where {TM,TR,TG}
- # MRGA{Union{TM,TR,TG,Nothing}}(M,R,G,nothing)
- # end
- function MRGA(;M::TM=nothing,R::TR=nothing,G::TG=nothing,A::TA=nothing) where {TM,TR,TG,TA}
- MRGA{Union{TM,TR,TG,TA}}(M,R,G,A)
- end
-
- MRGA(x) = MRGA(x,x,x,x)
-
- splat(mrga::MRGA) = (:M => mrga.M, :R => mrga.R, :G => mrga.G, :A => mrga.A)
-
- Base.collect(mrga::MRGA) = [mrga.M, mrga.R, mrga.G, mrga.A]
-
- Base.getindex(x::MRGA, pos::MRGA{Bool}) = collect(x)[collect(pos)]
-
- Base.getindex(x::MRGA, tech::Symbol) = getfield(x, tech)
-
- Base.eachindex(m::MRGA) = (:M,:R,:G,:A)
-
- Base.enumerate(mrga::MRGA) = ((:M, mrga.M), (:R, mrga.R), (:G, mrga.G), (:A, mrga.A))
-
- Base.any(m::MRGA{Bool}) = m.M || m.R || m.G || m.A
-
- Base.all(m::MRGA{Bool}) = m.M && m.R && m.G && m.A
-
- MRGA
-end
-
-# ╔═╡ 1bc00b68-15c5-48fe-9994-dc2f543542df
-md"""
-# Tutorial 3 - IAMs and SSPs
-Week 2, Day 3: IPCC Socio-economic Basis
-
-By Neuromatch Academy
-
-Content creators: Maximilian Puelma Touzel
-
-Content reviewers: Peter Ohue, Derick Temfack, Zahra Khodakaramimaghsoud, Peizhen Yang, Younkap Nina DuplexLaura Paccini, Sloane Garelick, Abigail Bodner, Manisha Sinha, Agustina Pesce, Dionessa Biton, Cheng Zhang, Jenna Pearson, Chi Zhang, Ohad Zivan
-
-Content editors: Jenna Pearson, Chi Zhang, Ohad Zivan
-
-Production editors: Wesley Banfield, Jenna Pearson, Chi Zhang, Ohad Zivan
-
-Our 2023 Sponsors: NASA TOPS
-"""
-
-# ╔═╡ 2dacd4cd-68bd-4c31-857e-d8cab04b5180
-md"""
-# Tutorial Objectives
-In this tutorial you'll explore how climate policy best adapts to potential obstacles that can arise in the upcoming years.
-
-You'll run [MARGO](https://github.com/ClimateMARGO/ClimateMARGO.jl), a simple climate model, to explore what it takes to avoid the catastrophic impacts of global warming.
-
-This is a `Pluto` notebook written in the `Julia` programming language. It's similar to the `Python`-written `Jupyter` notebooks you've been working with, with the added benefit of easy interactivity. We rely completely on that interactivity here and so you won't have to code anything or need to know anything about `Julia` or `Pluto`. Just read on and follow the instructions.
-
-*This notebook has been modified extensively for use in ClimateMatch from the [original MARGO notebook](https://margo.plutojl.org/introduction.html) by [Henri F. Drake](https://hdrake.github.io/) and [Fons van der Plas](https://github.com/fonsp/)*
-"""
-
-# ╔═╡ 5e5fc687-32be-4308-b3e5-499e25013afe
-md"""
-# Setup
-"""
-
-# ╔═╡ eda48867-7998-400b-98c9-fcd7ef762dc7
-md"""Helper functions at end of notebook"""
-
-# ╔═╡ 331c45b7-b5f2-4a78-b180-5b918d1806ee
-md"""
-# Section 1: Emissions mitigation and carbon dioxide removal to minimize climate suffering
-"""
-
-#The code in this webpage is *reactive*, meaning that the graphs and numbers automatically update whenever you change the climate model's inputs.
-
-# ╔═╡ f3c9ee51-f43a-45ca-b604-7e09f28bdbd2
-md"""
-Recall the causal chain of climate change from slide 3 from Tutorial 2's video:
-
-Emissions → GHG → Forcing → Temperature → Damages
-
-Each arrow is an potential opportunity to reduce damages: mitigation, Carbon Dioxide Removal (CDR), Solar Radiation Management (SRM), and adaptation, respectively. MARGO is a simple integrated assessment model focussed on simply demonstrating the effects of these 4 controls.
-"""
-
-# ╔═╡ 14f314b1-663d-4415-adc1-bc46869b5ee9
-md"First let's look at the baseline scenario where emissions continue to grow linearly until 2100 and then fall to 0. In this hypothetical no-policy world, the fall to 0 could be because of public health concerns regarding other forms of air pollution, the development of new zero-carbon technologies, running out of extractable fossil fuels resources, and/or collapse of industrial capacity due to climate damages."
-
-# ╔═╡ 0c00a7da-fa98-4253-9770-9a88bb02b849
-md"""
-## Section 1.1: _Can you limit human-caused global warming to "well-below 2ºC"?_
-
-What would our emission-reducing efforts over time have to look like to limit warming to less than 2 degrees? Try it by lowering emissions using the blue dot in the plot below while watching the yellow curve showing the corresponding time course of temperature in the plot below it:
-"""
-
-# ╔═╡ 8f7f21bf-ec5d-4fa8-934a-14231e781f70
-<<<<<<< HEAD
-md"""The length of the bars above this text show the mitigation costs (i.e. the control costs) and the benefit (i.e. the avoided damages) and their difference as the net benefit.
-=======
-md"""The length of the bars above this text show
-- the mitigation cost (top purple bar),
-- the benefit (the avoided damages; the middle organe bar) and
-- their difference as the net benefit (the bottom green bar).
->>>>>>> main
-"""
-
-# ╔═╡ f4b380c9-0ef4-4951-9954-3ddf92ddddb8
-md"""
-Here is a schematic from the MARGO paper that shows the components of this simple, idealized model.
-"""
-
-# ╔═╡ 6533c123-34fe-4c0d-9ecc-7fef11379253
-md"""
-![image](https://raw.githubusercontent.com/ClimateMARGO/MARGO-gifs/0824fda21d17a846c0f8c594c6cac9630d9ebcdf/Margo_schematic.png)
-
-_Figure from: [ClimateMARGO.jl](https://github.com/ClimateMARGO/ClimateMARGO.jl)_
-"""
-
-# ╔═╡ ec325089-8418-4fed-ac0e-e8ae21b433ab
-md"""
-## Section 1.2: Mitigating emissions
-Human greenhouse gas emissions are the result of fossil fuel burning (e.g. for transportation, electricity generation, heating, industry), unsustainable agriculture, and land use changes. We refer to any actions or policies that reduce these emissions as *mitigation*.
-
-The MARGO model lumps all potential mitigation into a single number: the fraction of *baseline* emissions that are mitigated in a given year. Baseline emissions are the emissions that would arise in a hypothetical future world absent of climate policy.
-
-In the plot below (y-axis is the fraction of baseline emissions that are mitigated in a given year), *drag the blue dot around* to vary the amount and timing of mitigation, and observe how these changes affect key climate variables, using the drop-box menu: CO₂ₑ emissions, CO₂ₑ concentrations, and global temperature.
-"""
-
-# ╔═╡ 76411fcd-a8bb-422e-b063-8a460c522fe4
-md"""Pick "Emissions", "Concentrations", or "Temperature" from this dropdown menu to show the respective plot below."""
-
-# ╔═╡ 99d950f9-e3bf-4c18-9f82-0fec6dcb89d6
-md"""
-For a mitigation scheme that keeps temperature to below 3 degrees, by what year do our emissions have to have dropped by 50%? What about for 2 degrees?
-"""
-
-# ╔═╡ 30218715-6469-4a0f-bf90-f3243219e7b5
-md"""
-## Section 1.3: Cost & damages
-So far in this tutorial we have looked at the effects that changes in CO2 emissions and mitigation have on climate (e.g. atmospheric CO2 concentrations and global temperature). It’s also essential to assess the socioeconomic impact of mitigation efforts.
-
-Use the `Next` button to move through the 3 points below and watch the relevant plot appear below.
-"""
-
-# ╔═╡ 8433cb38-915a-46c1-b3db-8e7905351c1b
-@bind cost_benefits_narrative_slide Carousel([
- md"""
- ### 1. The costs of climate suffering
-
- In the absence of climate action, temperatures would rise over 4.5ºC above preindustrial levels (1800 to 1850 average), causing catastrophic climate impacts. MARGO attempts to quantify this suffering by translating the degree of warming into economic damages (in \$ / year). The curve below shows how climate damages rise over time, as a percentage of the World Gross Domestic Product (WGDP) in that year, due to uncontrolled temperature increases.
-
- """,
-
- md"""### 2. Avoiding climate damages
- Emissions mitigation limits future warming and climate suffering (_Damages_ curve). The economic benefits of mitigation are given by the difference in damages relative to the no-policy scenario (_Baseline_ curve minus _Damages_ curve).
-
- In the figure below, drag around the blue dot to change the future mitigation strategy, and observe how the _Avoided damages_ (the grey area) change!
-
- """,
-
- md"""### 3. Cost-benefit analysis
-
- Unfortunately, mitigating CO₂ₑ emissions also carries a cost. In MARGO, the cost of mitigation control is proportional to the fraction of CO₂ₑ emissions that have been mitigated in a given year, increasing up to a maximum of $70 per metric ton of CO₂ₑ at 100% mitigation.
-
- This naturally leads to a **cost-benefit analysis**. We search for the most beneficial, or *optimal*, scenario: the one with the *maximum net present benefits*. In the figure below, try finding a mitigation strategy that optimizes these _Net benefits_.
- """
-]; wraparound=false)
-
-# ╔═╡ 11d62228-476c-4616-9e7d-de6c05a6a53d
-if cost_benefits_narrative_slide == 1
- hidecloack("cost_benefits_narrative_input")
-end
-
-<<<<<<< HEAD
-# ╔═╡ 4c7fccc5-450c-4903-96a6-ce36ff60d280
-md"""
-## Section 1.4: Picking up the slack: carbon dioxide removal
-
-While substantial emissions mitigations are necessary to reduce future climate suffering, they can not make up for the hundreds of billions of tons of CO₂ that humans have already emitted. However, both natural and technological methods for removing CO₂ from the atmosphere exist. Although they are presently miniscule compared to the tens-of-gigatons scale of global emissions, some experts expect that CO₂ removal methods will play a key role in the future once major mitigation goal have been accomplished. In MARGO, we do not distinguish between different carbon dioxide removal methods, and further assume that the carbon is stored permanently.
-
-*Drag the yellow dot in the figure below to modify the amount and timing of carbon dioxide removal*.
-"""
-
-=======
->>>>>>> main
-# ╔═╡ b2d65726-df99-4710-9d03-9f6838036c87
-md"""
-# Section 2: MARGO's automated optimization
-
-<<<<<<< HEAD
-In the above example, *you* manually adjusted the timing and amount of mitigation and carbon dioxide removal to achieve some desired temperature, but did not have much control on the shape of curves. Using a computer algorithm, we can do this optimization step *automatically* and *faster*, without having to assume anything about the shape of the mitigation and carbon dioxide removal curves. This optimization (see the bottom right corner of the model schematic shown above) maximizes the difference of benefits (i.e. avoided damages) and costs (i.e. control costs) under the constraint of a maximum temperature.
-
-Adjust the parameters below to assess their effect on global temperature. First, you can adjust the maximum temperature using the slider, which will set the goal temperature in the bottom plot. Selecting the *allow temperature overshoot* option will allow the projected temperature to temporily exceed the maximum temperature you selected. Next, you can enable various controls (mitigation, removal, geo-engineering, and adaptation) and set the cost multiplier for each which will adjust the costs associated with each approach for reducing damages. Observe how changes in these various settings affect the global temperature projections in the bottom plot.
-=======
-In the above example, *you* manually adjusted the timing and amount of mitigation and carbon dioxide removal, but did not have much control on the shape of curves. Using a computer algorithm, we can do this optimization step *automatically* and *faster*, without having to assume anything about the shape of the mitigation and carbon dioxide removal curves.
-
-The horizontal black line in the bottom plot shows the maximum temperature you select using the slider.
->>>>>>> main
-"""
-
-# ╔═╡ a0a1bb20-ec9b-446d-a36a-272840b8d35c
-blob(
- md"""
- #### Maximum temperature
-
- `0.0 °C` $(Tmax_9_slider) `5.0 °C`
-
- _Allow **temperature overshoot**:_ $(allow_overshoot_9_cb)
-
- """,
- "#c5710014"
-)
-
-# ╔═╡ c1971e19-8ce1-4f80-a00f-2815330e5753
-md"""
-We can see
-- how which of the 4 classes of controls we use (checkbox), and
-- how expensive each is (the cost multiplier sliders)
-affects the optimal solution.
-"""
-
-# ╔═╡ 5f9090d4-1a40-4217-b537-c497cf92976a
-md"""
-Expore the space of optimal solutions within different scenarios you can think of.
-
-For example, mitigation and adaptation are considered two important responses to climate change now. Are they? If we restrict ourselves to only mitigation and adaptation measures, do we use both in equal amounts? When do we start doing them? The result you'll find suggests misplaced emphasis on adaptation relative to mitigation now.
-
-Much of the solution space here uses carbon dioxide removal (orange) at substantial (>10% levels) starting in the next decade or two. Although natural and technological methods for removing CO₂ from the atmosphere exist now, they are presently miniscule compared to the tens-of-gigatons scale of global emissions. Some experts believe that the challenges in scaling these technologies will be overcome and they will play a key role in the future. Other experts argue there are inherent limitations to such technologies and useful only as fine adjustments later in the century and that any emphasis on them now takes away from more effective mitigation efforts. Toggle carbon removal on and off to see the effect. Do we still use these removal controls if they are more expensive?
-"""
-
-# ╔═╡ 38ff6efc-ccf1-4ca3-8437-152784a98a9e
-md"""
-# Section 3: From Unaware to Purposeful Solar Radiation Management
-
-Various regulations arising from well-established public health concerns (mostly regarding air quality) have been successful at significantly reducing over the last decades the amount of aerosols we emit when burning fossil fuels (e.g. China, *circa* 2010 and sulfur emissions from freight shipping, *circa* 2020).
-
-<<<<<<< HEAD
-Over the year or so that it takes the typical aerosol particle to fall out of the atmosphere, they reflect sunlight to space and have an effective negative contribution to radiative forcing. The IPCC estimates at least 0.5 degrees of warming has been masked by yearly sulfur emissions alone (i.e. if we stopped emitting sulfur the global average temperature would go up by 0.5 degrees as existing sulfur aerosols fall out of the atmosphere). The effective warming effects of reducing aerosol emissions are typically absent from assessments of how aerosols affect public health.
-=======
-Over the year or so that it takes the typical aerosol particle to fall out of the atmosphere after being emitted, they reflect sunlight to space and have an effective negative contribution to radiative forcing. The IPCC estimates at least 0.5 degs of warming has been masked by sulfur alone.
->>>>>>> main
-
-The effective warming effects of reducing aerosol emissions are typically absent from assessments of how aerosols affect public health. At the expense of accelerated global warming, our society is likely to continue reducing aerosols for the public health benefit in the near future.
-
-<<<<<<< HEAD
-Let's use MARGO to simulate how we manage (purposefully or not) our aerosol emissions using a baseline (uncontrolled) scenario in which we are ignorant of the associated warming of their reduction and do not apply any of the other controls (mitigation, removal, or adaptation). Our control is a reduction knob of the total aerosol forcing budget of 1.5 $$W/m^2$$ normalized from 0 (no reduction) to 1 (full reduction). Consistent with the large sulfur reductions in recent years, let's assume we've eliminated sulfur so our initial control is a pulse up to 1/3 (a socalled _termination shock_).
-
-What are the effects on global temperature of continuing to reduce our aerosol emissions?
-"""
-
-# ╔═╡ edcb60ca-6dc8-4d6b-b722-d3b2a621a305
-md"""
-# Summary
-In this tutorial you explored components of MARGO, a simple climate model with dynamic mitigation controls that allow us to assess the measures needed to avoid the worst impacts of global warming. First, varied the amount and timing of CO2 emissions and mitigation efforts to investigate how these changes affect global warming. You then explored the socioeconomic impact of mitigation efforts on factors such as control costs, climate damages and net benefits and also assessed the combined impact of carbon dioxide removal and mitigation efforts on global CO2. Finally, you further analyzed the socioeconomic impact of global warming and mitigation efforts using MARGO’s automated optimization computer algorithm.
-"""
-
-# ╔═╡ 3f44b23a-f772-4988-9f35-e477b3439219
-md"""
-# Resources
-The model code from the MARGO simulations used in this tutorial can be accessed [here](https://github.com/ClimateMARGO/ClimateMARGO.jl).
-=======
-Estimation uncertainty of aerosol forcing is relatively large but the current best estimates are -1.5 to -1 $$W/m^2$$, with sulfate alone contributing about -0.5 $$W/m^2$$.
-More recent analysis suggests aerosol reductions over the last decades are in the process of significantly increasing the warming rate over the next decade ([Hansen et al. 2022](https://arxiv.org/ftp/arxiv/papers/2212/2212.04474.pdf)).
-
-Let's use MARGO to simulate how we manage (purposefully or not) our aerosol emissions. We'll use a baseline (i.e. uncontrolled) scenario in which we are ignorant of the associated warming of thier reduction. We also assume we do not apply any of the other controls (mitiation, removal, or adaptation). Our control is a reduction knob of a total aerosol forcing budget of 1.5 $$W/m^2$$ normalized from 0 (no reduction) to 1 (full reduction). Consistent with the large sulfur reductions in recent years, let's assume we've eliminated sulfur so our initial control is a pulse up to 1/3 (a socalled _termination shock_).
-
-To assess the effects on global temperature of different scenarios of aerosol reductions, move around the red dot below.
-"""
-
-# ╔═╡ 1bb0a463-4998-44fc-b5f2-998bddf6aee4
-md"""
-- By how much does temperature go up relative to the baseline if we remove all aerosols? If we remove 50%?
-- What is the temperature difference between removing them immediately versus over the rest of the century?
-- What if over the next two decades we deployed non-controversial (available and safe) SRM technology (e.g. surface reflectors) at scale that were able to replicate the cooling effects of the sulfur we have just removed? Do we get back to the baseline?
->>>>>>> main
-"""
-
-# ╔═╡ 4e1524e9-27d2-45a7-9ebd-21e6e369c4a7
-md"""
-# Appendix
-"""
-
-# ╔═╡ d5ab2398-2904-4b44-a855-e4729996bc0d
-md"""
-Example of running the model:
-"""
-
-# ╔═╡ 14623e1f-7719-47b1-8854-8070d5ef8e17
-md"""
-## Plot functions
-"""
-
-# ╔═╡ a9b1e7fa-0318-41d8-b720-b8615c047bcd
-plot_controls(c::ClimateMARGO.Models.Controls) = plot_controls(MRGA(
- c.mitigate,
- c.remove,
- c.geoeng,
- c.adapt
-))
-
-# ╔═╡ d9d20714-0689-449f-8e52-603dc804c93f
-yearticks = collect(2020:20:2200)
-
-# ╔═╡ cabc3214-1036-433b-aae1-6964bb780be8
-function finish!(p)
- plot!(p;
- xlim=(2020,2201),
- xticks=yearticks,
- size=(680,200),
- grid=false,
- )
-end
-
-# ╔═╡ 2fec1e12-0218-4e93-a6b5-3711e6910d79
-function plot_costs(result::ClimateModel;
- show_baseline::Bool=true,
- show_controls::Bool=true,
- show_damages::Bool=true,
- title="Control costs & climate damages"
- )
-
- p = plot(;
- ylim=(0,25.1), left_margin=2.25Plots.Measures.mm,
- ylabel="trillion USD / year",
- )
- title === nothing || plot!(p; title=title)
-
-
- # baseline
- show_baseline && plot!(p,
- years, damage(result; discounting=true);
- pp.baseline_damages...,
- fillrange=zero(years),
- fillopacity=.2,
- linestyle=:dash,
- )
-
- # control costs
- controlled_damages = damage(result; M=true, R=true, G=true, A=true, discounting=true)
-
- show_controls && plot!(p,
- years, controlled_damages .+ cost(result; M=true, R=true, G=true, A=true, discounting=true);
- fillrange=controlled_damages,
- fillopacity=.2,
- pp.controls...
- )
-
-
- # controlled damages
- show_damages && plot!(p,
- years, controlled_damages;
- fillrange=zero(years),
- fillopacity=.2,
- pp.damages...
- )
-
- finish!(p)
-
-end
-
-# ╔═╡ cff9f952-4850-4d55-bb8d-c0a759d1b7d8
-function plot_concentrations(result::ClimateModel;
- relative_to_preindustrial::Bool=true)
- Tmax = 5
- p = relative_to_preindustrial ? plot(;
- ylim=(0,4.5),
- yticks=[1,2,3,4],
- yformatter=x -> string(Int(x), "×"),
- title="Atmospheric CO₂ₑ concentration, relative to 1800-1850",
- ) : plot(;
- ylim=(0,1400),
- ylabel="ppm",
- title="Atmospheric CO₂ₑ concentration",
- )
-
- factor = relative_to_preindustrial ? preindustrial_concentrations : 1
-
- # baseline
- plot!(p,
- years, c(result) ./ factor;
- pp.baseline_concentrations...,
- linestyle=:dash,
- )
- # controlled temperature
- plot!(p,
- years, c(result; M=true, R=true) ./ factor;
- pp.concentrations...
- )
-
-
- finish!(p)
-end
-
-# ╔═╡ c73c89a7-f652-4554-95e9-20f47a818996
-function plot_controls(controls::MRGA; title=nothing, reverse=false)
-
- p = plot(;
- ylim=(0,1),
- )
- title === nothing || plot!(p; title=title)
-
- for (tech, c) in enumerate(controls)
- if c !== nothing
- which = tech === :M ? (years .< end_of_oil) : eachindex(years)
- if ~reverse
- plot!(p,
- years[which], c[which];
- pp[tech]...
- )
- else
- plot!(p,
- years[which], -c[which];
- pp[tech]...
- )
- end
- end
- end
-
- finish!(p)
-
-end
-
-# ╔═╡ 373cba19-511e-483e-8bfe-14bbb92d5a21
-@initially initial_x @bind input_x begin
-
- local t = input_x["G"][1]
- local y = input_x["G"][2]
-
- controls_x = MRGA(
- G=-expcontrol(t, y)
- )
- # controls_x = MRGA(
- # G=gaussish(input_x["G"]...),
- # )
- # controls_x = MRGA(
- # G=gaussish(t, y*clamp(.07 * (10 - y), 0, 1))
- # )
-
-
- plotclicktracker2(
-<<<<<<< HEAD
- plot_controls(controls_x; title="Controlled reduction of aerosols (1=full reduction of 1.5 W/m2)", reverse=true),
-=======
- plot_controls(controls_x; title="Controlled reduction of aerosols (1=full reduction of 1.5 W/m2)",reverse=true),
->>>>>>> main
- initial_x
- )
-end
-
-# ╔═╡ 6634bcf1-8af6-4000-9b00-a5b4c02596c6
-function plot_emissions(result::ClimateModel)
-
- p = plot(;
- ylim=(-3,11), left_margin=1.75Plots.Measures.mm,
- ylabel="ppm / year",
- title="Global CO₂ₑ emissions",
- )
-
-
-
-
- # baseline
- plot!(p,
- years, effective_emissions(result);
- pp.baseline_emissions...,
- linestyle=:dash,
- )
- # controlled
- plot!(p,
- years, effective_emissions(result; M=true, R=true);
- fillrange=zero(years),
- fillopacity=.2,
- pp.emissions...
- )
-
-
- finish!(p)
-
-end
-
-# ╔═╡ 424940e1-06ef-453a-8ffb-deb24dadb334
-function plot_emissions_pretty(result::ClimateModel)
- # offset the x values so that framestyle=:origin will make the y-axis pass through 2020 instead of 0. yuck
- R = x -> x + 2020
- L = x -> x - 2020
-
- Tmax = 5
- p = plot(;
- ylim=(-3,11),
- ylabel="ppm / year",
- framestyle = :origin,
- xformatter=string ∘ Int ∘ R,
- )
-
-
-
-
- # baseline
- plot!(p,
- L.(years), effective_emissions(result);
- pp.baseline_emissions...,
- linestyle=:dash,
- )
- # controlled temperature
- plot!(p,
- L.(years), effective_emissions(result; M=true, R=true);
- fillrange=zero(L.(years)),
- fillopacity=.2,
- pp.emissions...
- )
-
-
- finish!(p)
-
- plot!(p;
- xlim=L.(extrema(years)),
- xticks = L.(yearticks),
- )
-end
-
-# ╔═╡ 700f982d-85da-4dc1-9319-f3b2527d0308
-function plot_temp(result::ClimateModel)
- Tmax = 6
-
- # setup
- p = plot(;
- ylim=(0,Tmax),
- yticks=[0,1,2,3],
- yformatter=x -> string("+", Int(x), " °C"),
- title="Global warming relative to 1800-1850",
- )
-
- # shade dangerously high temperatures
- for a in [2,3]
- plot!(p,
- collect(extrema(years)),
- [a,a],
- linewidth=0,
- label=nothing,
- fillrange=[Tmax,Tmax],
- fillcolor=colors.above_paris
- )
- end
-
- # baseline
- plot!(p,
- years, T_adapt(result; splat(MRGA(false))...);
- pp.baseline_temperature...,
- linestyle=:dash,
- )
- # controlled temperature
- plot!(p,
- years, T_adapt(result; splat(MRGA(true))...);
- pp.temperature...
- )
-
-
- finish!(p)
-end
-
-# ╔═╡ ab557633-e0b5-4439-bc81-d274770f2e65
-md"""
-## Plot dots input magic
-"""
-
-# ╔═╡ 2758b185-cd54-484e-bb7d-d4cfcd2d39f4
-md"""
-## Running the model
-"""
-
-# ╔═╡ 611c25ab-a454-4d52-b8fb-a58b0d1f5ca6
-function forward_controls_temp(controls::MRGA=MRGA(), model_parameters=default_parameters())
-
-
- model = ClimateModel(model_parameters)
-
- translations = Dict(
- :M => :mitigate,
- :R => :remove,
- :G => :geoeng,
- :A => :adapt,
- )
- for (k, v) in enumerate(controls)
- if v !== nothing
- setfieldconvert!(model.controls, translations[Symbol(k)], copy(v))
- end
- end
-
- enforce_maxslope!(model.controls)
-
- model
- # return Dict(
- # :model_parameters => model_parameters,
- # model_results(model)...
- # )
-end
-
-# ╔═╡ 9aa73ce0-cec6-4d53-bbbc-f5c85de7b521
-@initially initial_1 @bind input_1 begin
-
- local t = input_1["M"][1]
- local y = input_1["M"][2]
-
- controls_1 = MRGA(
- M=gaussish(t, clamp(.07 * (10 - y), 0, 1)),
- R=gaussish(t, clamp(.07 * (10 - y) * 0.25, 0, 1)),
- )
-
- result_1 = forward_controls_temp(controls_1)
-
- plotclicktracker2(
- plot_emissions(result_1),
- initial_1
- )
-end
-
-# ╔═╡ 65d31fbf-322d-459a-a2dd-2894edbecc4d
-plot_temp(result_1)
-
-# ╔═╡ ff2b1c0a-e419-4f41-aa3b-d017642ffc13
-@initially initial_2 @bind input_2 begin
-
-
- controls_2 = MRGA(
- M=gaussish(input_2["M"]...),
- )
-
- result_2 = forward_controls_temp(controls_2)
-
- plotclicktracker2(
- plot_controls(controls_2; title="Deployment of mitigation"),
- initial_2
- )
-end
-
-# ╔═╡ 02851ee9-8050-4821-b3c9-1f65c9b8135b
-if which_graph_2 == "Emissions"
- plot_emissions(result_2)
-elseif which_graph_2 == "Concentrations"
- plot_concentrations(result_2; relative_to_preindustrial=true)
-else
- plot_temp(result_2)
-end
-
-# ╔═╡ f4203dcf-b251-4e2b-be07-922bc7c4496d
-(@initially initial_3 @bind input_3 begin
-
-
- controls_3 = MRGA(
- M=gaussish(input_3["M"]...),
- )
-
- result_3 = forward_controls_temp(controls_3)
-
- plotclicktracker2(
- plot_controls(controls_3; title="Deployment of mitigation"),
- initial_3
- )
-end) |> cloak("cost_benefits_narrative_input")
-
-# ╔═╡ 3e26d311-6abc-4b2c-ada4-f8a3171d9f75
-if cost_benefits_narrative_slide == 1
- local uncontrolled = ClimateModel(default_parameters())
- plot_costs(uncontrolled; show_controls=false, show_baseline=false)
-elseif cost_benefits_narrative_slide == 2
- plot_costs(result_3; show_controls=false)
-else
- plot_costs(result_3)
-end
-
-# ╔═╡ 182b58bf-3733-400e-9d91-425615d36f1b
-
-function forward_controls_temp2(controls::MRGA=MRGA(), model_parameters=default_parameters())
- model_parameters.economics.Finf =1.5
-
- model = ClimateModel(model_parameters)
-
- translations = Dict(
- :M => :mitigate,
- :R => :remove,
- :G => :geoeng,
- :A => :adapt,
- )
- for (k, v) in enumerate(controls)
- if v !== nothing
- setfieldconvert!(model.controls, translations[Symbol(k)], copy(v))
- end
- end
-
- enforce_maxslope!2(model.controls)
-
- model
- # return Dict(
- # :model_parameters => model_parameters,
- # model_results(model)...
- # )
-end
-
-# ╔═╡ 37c056fc-a3e9-47ad-89d5-72e6a36a243d
-result_x = forward_controls_temp2(controls_x);
-
-# ╔═╡ 5a80d968-2664-4b4f-89d1-845279e419ee
-plot_temp(result_x)
-
-# ╔═╡ 89752d91-9c8e-4203-b6f1-bdad41386b31
-shortname = MRGA("M","R","G","A")
-
-# ╔═╡ ff2709a4-516f-4066-b5b2-617ac0e5f20c
-mediumname = MRGA("mitigate", "remove", "geoeng", "adapt")
-
-# ╔═╡ 2821b722-75c2-4072-b142-d13553a84b7b
-longname = MRGA("Mitigation", "Removal", "Geo-engineering", "Adaptation")
-
-# ╔═╡ 8e89f521-c19d-4f87-9497-f9b61c19c176
-let
- default_cost = let
- e = default_parameters().economics
- MRGA(e.mitigate_cost, e.remove_cost, e.geoeng_cost, e.adapt_cost)
- end
- blob(
- @htl("""
-
Which controls?
-
-
-
-
-
-
Enabled?
Cost multiplier
-
-
-
-
-
$(longname.M)
-
$(@bind enable_M_9 CheckBox(;default=true))
-
$(@bind cost_M_9 multiplier(default_cost.M, 4))
-
-
-
-
$(longname.R)
-
$(@bind enable_R_9 CheckBox(;default=true))
-
$(@bind cost_R_9 multiplier(default_cost.R, 4))
-
-
-
-
$(longname.G)
-
$(@bind enable_G_9 CheckBox(;default=false))
-
$(@bind cost_G_9 multiplier(default_cost.G, 4))
-
-
-
-
$(longname.A)
-
$(@bind enable_A_9 CheckBox(;default=false))
-
$(@bind cost_A_9 multiplier(default_cost.A, 4))
-
-
-
-
- """),
- "#c500b40a"
- )
-end
-
-# ╔═╡ a83e47fa-4b48-4bbc-b210-382d1cf19f55
-control_enabled_9 = MRGA(
- enable_M_9,
- enable_R_9,
- enable_G_9,
- enable_A_9,
-);
-
-# ╔═╡ 242f3109-244b-4884-a0e9-6ea8950ca47e
-control_cost_9 = MRGA(
- Float64(cost_M_9),
- Float64(cost_R_9),
- Float64(cost_G_9),
- Float64(cost_A_9),
-);
-
-# ╔═╡ f861935a-8b03-426e-aebe-6963e034ad49
-output_9 = let
- parameters = default_parameters()
-
- parameters.economics.mitigate_cost = control_cost_9.M
- parameters.economics.remove_cost = control_cost_9.R
- parameters.economics.geoeng_cost = control_cost_9.G
- parameters.economics.adapt_cost = control_cost_9.A
- # modify the parameters here!
-
- opt_controls_temp(parameters;
- temp_overshoot=allow_overshoot_9 ? 999.0 : Tmax_9,
- temp_goal=Tmax_9,
- max_deployment=let
- e = control_enabled_9
- Dict(
- "mitigate" => e.M ? 1.0 : 0.0,
- "remove" => e.R ? 1.0 : 0.0,
- "geoeng" => e.G ? 1.0 : 0.0,
- "adapt" => e.A ? 0.4 : 0.0,
- )
- end,
- )
-end
-
-# ╔═╡ 6978acad-9cac-4490-85fb-7e43d9558aca
-plot_controls(output_9.result.controls) |> feasibility_overlay(output_9)
-
-# ╔═╡ 7a435e46-4f36-4037-a9a6-d296b20bf6ac
-plot!(plot_temp(output_9.result),
- years, zero(years) .+ Tmax_9;
- lw=2,
- pp.T_max...
- )
-
-# ╔═╡ 7ffad0f8-082b-4ca1-84f7-37c08d5f7266
-md"""
-## Cost bars
-"""
-
-# ╔═╡ 608b50e7-4419-4dfb-8d9e-5144d4034c05
-function avoided_damages_bars(result)
- td(x) = total_discounted(x, result)
-
- baseline_damages = td(damage(result; discounting=true))
- controlled_damages = td(damage(result; splat(MRGA(true))..., discounting=true))
-
- avoided_damages = baseline_damages - controlled_damages
-
- costs = td(cost(result; splat(MRGA(true))..., discounting=true))
-
- @htl("""
-
-
- """)
-end
-
-# ╔═╡ 2c1416cf-9b6b-40a0-b714-16853c7e1f1d
-if cost_benefits_narrative_slide >= 2
- avoided_damages_bars(result_3)
-end
-
-# ╔═╡ 31a30755-1d8b-451b-8c9a-2c32a3a1d0b4
-function cost_bars(result; offset_damages=false)
- td(x) = total_discounted(x, result)
-
- baseline_damages = td(damage(result; discounting=true))
- controlled_damages = td(damage(result; splat(MRGA(true))..., discounting=true))
-
- avoided_damages = baseline_damages - controlled_damages
-
- costs = td(cost(result; splat(MRGA(true))..., discounting=true))
-
- @htl("""
-
-
- """)
-end
-
-# ╔═╡ 470d2f6f-fe97-4edd-8aaa-142bc8046fe8
-cost_bars(result_1)
-
-# ╔═╡ 5154aac7-812d-447f-8435-b8209d45fe04
-if cost_benefits_narrative_slide >= 3
- cost_bars(result_3; offset_damages=true)
-else
- bigbreak
-end
-
-# ╔═╡ 7f9df132-61de-4fec-a674-176c4a43335c
-md"""
-## MRGA struct
-"""
-
-# ╔═╡ 354b9d8a-7c3f-456b-9da9-4396ac975743
-function MR(x::T,y::T) where T
- MRGA{T}(x, y, zero(x), zero(x))
-end
-
-# ╔═╡ Cell order:
-# ╟─9a48a08e-7281-473c-8afc-7ad3e0771269
-# ╟─1bc00b68-15c5-48fe-9994-dc2f543542df
-# ╟─2dacd4cd-68bd-4c31-857e-d8cab04b5180
-# ╟─5e5fc687-32be-4308-b3e5-499e25013afe
-# ╟─eda48867-7998-400b-98c9-fcd7ef762dc7
-# ╟─331c45b7-b5f2-4a78-b180-5b918d1806ee
-# ╟─f3c9ee51-f43a-45ca-b604-7e09f28bdbd2
-# ╟─14f314b1-663d-4415-adc1-bc46869b5ee9
-# ╟─0c00a7da-fa98-4253-9770-9a88bb02b849
-# ╟─9aa73ce0-cec6-4d53-bbbc-f5c85de7b521
-# ╟─65d31fbf-322d-459a-a2dd-2894edbecc4d
-# ╟─470d2f6f-fe97-4edd-8aaa-142bc8046fe8
-# ╟─8f7f21bf-ec5d-4fa8-934a-14231e781f70
-# ╟─94415ff2-32a2-4b0f-9911-3b93e202f548
-# ╟─f4b380c9-0ef4-4951-9954-3ddf92ddddb8
-# ╟─6533c123-34fe-4c0d-9ecc-7fef11379253
-# ╟─50d24c91-61ae-4544-98fa-5749bafe3d41
-# ╟─ec325089-8418-4fed-ac0e-e8ae21b433ab
-# ╟─ff2b1c0a-e419-4f41-aa3b-d017642ffc13
-# ╟─e846c6e2-aa63-40db-8592-c9563bbbdd40
-# ╟─76411fcd-a8bb-422e-b063-8a460c522fe4
-# ╟─02851ee9-8050-4821-b3c9-1f65c9b8135b
-# ╟─99d950f9-e3bf-4c18-9f82-0fec6dcb89d6
-# ╟─e810a90f-f964-4d7d-acdb-fc3a159dc12e
-# ╟─30218715-6469-4a0f-bf90-f3243219e7b5
-# ╟─8433cb38-915a-46c1-b3db-8e7905351c1b
-# ╟─3e26d311-6abc-4b2c-ada4-f8a3171d9f75
-# ╟─f4203dcf-b251-4e2b-be07-922bc7c4496d
-# ╟─2c1416cf-9b6b-40a0-b714-16853c7e1f1d
-# ╟─5154aac7-812d-447f-8435-b8209d45fe04
-# ╟─11d62228-476c-4616-9e7d-de6c05a6a53d
-# ╟─a3422533-2b78-4bc2-92bd-737da3c8982d
-# ╟─b2d65726-df99-4710-9d03-9f6838036c87
-# ╟─70173466-c9b5-4227-8fba-6256fc1ecace
-# ╟─6bcb9b9e-e0ab-45d3-b9b9-3d7282f89df6
-# ╟─a0a1bb20-ec9b-446d-a36a-272840b8d35c
-# ╟─c1971e19-8ce1-4f80-a00f-2815330e5753
-# ╟─8e89f521-c19d-4f87-9497-f9b61c19c176
-# ╟─6978acad-9cac-4490-85fb-7e43d9558aca
-# ╟─7a435e46-4f36-4037-a9a6-d296b20bf6ac
-# ╟─5f9090d4-1a40-4217-b537-c497cf92976a
-# ╟─a83e47fa-4b48-4bbc-b210-382d1cf19f55
-# ╟─242f3109-244b-4884-a0e9-6ea8950ca47e
-# ╟─38ff6efc-ccf1-4ca3-8437-152784a98a9e
-# ╟─51037451-0fea-4021-8824-56911970b97b
-# ╟─373cba19-511e-483e-8bfe-14bbb92d5a21
-# ╟─37c056fc-a3e9-47ad-89d5-72e6a36a243d
-# ╟─5a80d968-2664-4b4f-89d1-845279e419ee
-<<<<<<< HEAD
-# ╟─edcb60ca-6dc8-4d6b-b722-d3b2a621a305
-# ╟─3f44b23a-f772-4988-9f35-e477b3439219
-=======
-# ╟─1bb0a463-4998-44fc-b5f2-998bddf6aee4
->>>>>>> main
-# ╟─4e1524e9-27d2-45a7-9ebd-21e6e369c4a7
-# ╟─1c8d2d00-b7d9-11eb-35c4-47f2a2aa1593
-# ╟─d5ab2398-2904-4b44-a855-e4729996bc0d
-# ╟─f861935a-8b03-426e-aebe-6963e034ad49
-# ╟─3094a9eb-074d-46c3-9c1e-0a9c94c6ad43
-# ╟─b428e2d3-e1a9-4e4e-a64f-61048572102f
-# ╟─0b31eac2-8efd-47cd-9571-a2053846343b
-# ╟─ca104939-a6ca-4e70-a47a-1eb3c32db18f
-# ╟─cf90139c-13d8-42a7-aba3-8c431e7854b8
-# ╟─bd2bfa3c-a42e-4975-a543-84541f66b1c1
-# ╟─8cab3d28-a457-4ccc-b053-38cd003bf4d1
-# ╟─b81de514-2506-4243-8235-0b54dd4a7ec9
-# ╟─73e01bd8-f56b-4bb5-a9a2-85ad223c9e9b
-# ╟─ae92ba1f-5175-4704-8240-2de8432df752
-# ╟─8ac04d55-9034-4c29-879b-3b10887a616d
-# ╟─14623e1f-7719-47b1-8854-8070d5ef8e17
-# ╟─2fec1e12-0218-4e93-a6b5-3711e6910d79
-# ╟─cff9f952-4850-4d55-bb8d-c0a759d1b7d8
-# ╟─c73c89a7-f652-4554-95e9-20f47a818996
-# ╟─a9b1e7fa-0318-41d8-b720-b8615c047bcd
-# ╟─6634bcf1-8af6-4000-9b00-a5b4c02596c6
-# ╟─424940e1-06ef-453a-8ffb-deb24dadb334
-# ╟─700f982d-85da-4dc1-9319-f3b2527d0308
-# ╟─cabc3214-1036-433b-aae1-6964bb780be8
-# ╟─d9d20714-0689-449f-8e52-603dc804c93f
-# ╟─c7cbc172-daed-406f-b24b-5da2cc234c29
-# ╟─b440cd13-36a9-4c54-9d80-ac3fa7c2900e
-# ╟─ec760706-15ac-4a50-a67e-c338d70f3b0a
-# ╟─ab557633-e0b5-4439-bc81-d274770f2e65
-# ╟─bb4b25e4-0db5-414b-a384-0a27fe7efb66
-# ╟─646591c4-cb60-41cd-beb9-506807ce17d2
-# ╟─6fb77b13-7a54-4d1d-9985-4735318680e1
-# ╟─5c484595-4646-484f-9e75-a4a3b4c2af9b
-# ╟─013807a0-bddb-448b-9300-f7f559e48a45
-# ╟─4e91fb48-fc5e-409e-9a7e-bf846f1d211d
-# ╟─3c7271ab-ece5-4ae2-a8dd-dc3670f300f7
-# ╟─dcf265c1-f09b-483e-a361-d54c6c7500c1
-# ╟─10c015ec-780c-4453-83cb-12dd0f09f358
-# ╟─2758b185-cd54-484e-bb7d-d4cfcd2d39f4
-# ╟─8fa94ec9-1fab-41b9-a7e6-1917e975e4ff
-# ╟─611c25ab-a454-4d52-b8fb-a58b0d1f5ca6
-# ╟─182b58bf-3733-400e-9d91-425615d36f1b
-# ╟─785c428d-d4f7-431e-94d7-039b0708a78a
-# ╟─7e540eaf-8700-4176-a96c-77ee2e4c384b
-# ╟─89752d91-9c8e-4203-b6f1-bdad41386b31
-# ╟─ff2709a4-516f-4066-b5b2-617ac0e5f20c
-# ╟─2821b722-75c2-4072-b142-d13553a84b7b
-# ╟─2dcd5669-c725-40b9-84c4-f8399f6e924b
-# ╟─b8f9efec-63ac-4e58-93cf-9f7199b78451
-# ╟─371991c7-13dd-46f6-a730-ad89f43c6f0e
-# ╟─e815d175-1c47-4aef-bd89-e7fdc3e4912e
-# ╟─0a3be2ea-6af6-43c0-b8fb-e453bc2b703b
-# ╟─b7ca316b-6fa6-4c2e-b43b-cddb08aaabbb
-# ╟─7ffad0f8-082b-4ca1-84f7-37c08d5f7266
-# ╟─eb0c961d-42cf-4219-a36e-cd492fa31f6b
-# ╟─608b50e7-4419-4dfb-8d9e-5144d4034c05
-# ╟─31a30755-1d8b-451b-8c9a-2c32a3a1d0b4
-# ╟─ec5d87a6-354b-4f1d-bb73-b3db08589d9b
-# ╟─70f01a4d-0aa3-4cd5-ad71-452c490c61ac
-# ╟─ac779b93-e19e-41de-94cb-6a2a919bcd2e
-# ╟─7f9df132-61de-4fec-a674-176c4a43335c
-# ╟─060cbeab-5503-4eda-95d8-3f554765b2ee
-# ╟─354b9d8a-7c3f-456b-9da9-4396ac975743
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial4.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial4.ipynb
deleted file mode 100644
index 091a0d4ca..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial4.ipynb
+++ /dev/null
@@ -1,733 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial4.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 4: The Shared Socio-economic Pathways\n",
- "\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Paul Heubel, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial Objectives\n",
- "\n",
- "In this tutorial, you will learn about Integrated Assessment Models (IAMs), a class of models that combine climatology, economics, and social science, reflecting the intertwined nature of these domains in addressing climate change. Based on these models the IPCC established the socioeconomic pathway framework. You are going to learn how these pathways differ from one another in both climate and socioeconomic variables as well as assumptions.\n",
- "\n",
- "After finishing this tutorial, you will know how to \n",
- "\n",
- "- filter data series of interest from a rich `pandas` data frame that contains various variables for different SSPs,\n",
- "- tell what the abbreviation SPA stands for,\n",
- "- explain the differences and similarities of the SSP1-26 and SSP5-85, and \n",
- "- sketch the modeling approach of IAMs."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Setup"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# installations ( uncomment and run this cell ONLY when using google colab or kaggle )"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {},
- "executionInfo": {
- "elapsed": 1460,
- "status": "ok",
- "timestamp": 1682429063027,
- "user": {
- "displayName": "Maximilian Puelma Touzel",
- "userId": "09308600515315501700"
- },
- "user_tz": 240
- },
- "tags": []
- },
- "outputs": [],
- "source": [
- "# imports\n",
- "import warnings\n",
- "warnings.simplefilter(action='ignore', category=FutureWarning)\n",
- "import seaborn as sns\n",
- "import matplotlib.pyplot as plt\n",
- "import pandas as pd\n",
- "import numpy as np\n",
- "import pooch\n",
- "import os\n",
- "import tempfile"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "code_folding": [
- 0
- ],
- "execution": {},
- "tags": []
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file\n",
- "\n",
- "\n",
- "def legend_without_duplicate_labels(ax):\n",
- " handles, labels = ax.get_legend_handles_labels()\n",
- " unique = [(h, l) for i, (h, l) in enumerate(zip(handles, labels)) if l not in labels[:i]]\n",
- " ax.legend(*zip(*unique))"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {},
- "tags": []
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Transition Goals and Integrated Assessment Models\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "# TODO add Bilibili link\n",
- "video_ids = [('Youtube', 'TqpPDz2kfWc'),\n",
- " # ('Bilibili', '')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {},
- "pycharm": {
- "name": "#%%\n"
- },
- "tags": [
- "remove-input"
- ]
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "# TODO update\n",
- "link_id = \"ujprw\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Shared Socio-economic Pathways"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {},
- "jp-MarkdownHeadingCollapsed": true
- },
- "source": [
- "In this, and subsequent, tutorials, you will explore Integrated Assessment Models (IAMs) which are the standard class of models used to make climate change projections. IAMs couple a climate model with an economic model, allowing us to evaluate the two-way coupling between economic productivity and climate change severity. IAMs can also account for changes that result from mitigation efforts, which lessen anthropogenic emissions.\n",
- "\n",
- "Let's start by investigating some IAM model output.\n",
- "\n",
- "The simulations are labeled by both the Shared Socioeconomic Pathway (SSP1, SSP2, SSP3, SSP4, and SSP5) and the forcing level (greenhouse gas forcing of 2.6, 7.0, 8.5 W/m2 etc. by 2100).\n",
- "The 5 SSPS are: \n",
- "- SSP1: Sustainability (Taking the Green Road)\n",
- "- SSP2: Middle of the Road\n",
- "- SSP3: Regional Rivalry (A Rocky Road)\n",
- "- SSP4: Inequality (A Road divided)\n",
- "- SSP5: Fossil-fueled Development (Taking the Highway)\n",
- "\n",
- "We select two SSPs to exemplify how these scenarios differ from each other. \n",
- "To get a strong contrast, we select SSP1 and SSP5. \n",
- "\n",
- "Let's load the data and describe their features along a few plots.\n",
- "\n",
- "Like in other tutorials, we provide a `.csv` file that is stored in the cloud and was downloaded beforehand from [this IIASA database](https://tntcat.iiasa.ac.at/SspDb/dsd), where all data from the main simulations of the IAMs used in the [IPCC reports](https://www.ipcc.ch/reports/) is freely available."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# Load SSP data from .csv file\n",
- "filename_SSPs = 'SSP_IAM_V2_201811.csv'\n",
- "link_id = \"2uwr4\"\n",
- "url_SSPs = f\"https://osf.io/download/{link_id}/\"\n",
- "\n",
- "df = pd.read_csv(pooch_load(url_SSPs, filename_SSPs))\n",
- "# get a summary of the resulting pandas dataframe\n",
- "df.info()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "We further explore our data frame by printing categories that are used to tag the numeric data."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "print(df.SCENARIO.unique()) # print all scenarios\n",
- "print(df.VARIABLE.unique()[:10]) # print the first 10 variables\n",
- "print(df.REGION.unique()) # print all regions\n",
- "print(df.MODEL.unique()) # print all IAMs\n",
- "print(df.UNIT.unique()) # print all units"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "This file contains much data we are not interested in at the moment. To filter our example scenarios, region, and variables, we use the convenient [`.query()`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.query.html) method from `pandas`. The `VARIABLE`s of interest are those we already touched on in Tutorials 1 to 3: \n",
- "\n",
- "- **economic growth** (`'GDP|PPP'`),\n",
- "- **energy use** (`'Primary Energy'`),\n",
- "- **emissions** (`'Emissions|Kyoto Gases'`),\n",
- "- and **forcing** (`'Diagnostics|MAGICC6|Forcing'`).\n",
- "\n",
- "- As a `REGION`, we choose the `'World'`,\n",
- "- and our `SCENARIO`s are called `'SSP1-26'` and `'SSP5-85'`.\n",
- "- The model of choice for the former scenario is by convention `'IMAGE'` and `'REMIND-MAGPIE'` for the latter, respectively.\n",
- "\n",
- "A function named `get_SSPs_for_variable()` applies all this generally and is hidden in the next cell. Please execute it, such that the subsequent cells can make use of it. If you are interested in its procedure and want to adjust it, don't forget to save a copy beforehand."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown *Execute this cell to enable the dataframe filter function: `get_SSPs_for_variable`*\n",
- "\n",
- "def get_SSPs_for_variable(df,scenario,variable,region='World'):\n",
- " '''\n",
- "\n",
- " Function that filters IIASA's SSP database that is stored in a data frame 'df'\n",
- " and was loaded before from the 'SSP_IAM_V2_201811.csv' file.\n",
- " It returns a data frame with selected columns depending on scenario, variable and region input.\n",
- " For a given SSP scenario it chooses the conventional model for the respective scenario\n",
- " (cf. https://tntcat.iiasa.ac.at/SspDb/dsd?Action=htmlpage&page=about#v2).\n",
- "\n",
- " Args:\n",
- " scenario: string in \"SSPX-XX\" with X=1,...,5\n",
- " variable: string in df.VARIABLE, e.g. 'Population' or 'GDP|PPP'\n",
- "\n",
- " Returns:\n",
- " SSP data for selected columns for a given SSP scenario\n",
- "\n",
- " Example:\n",
- " dd = get_SSPs_for_variable(df,'SSP1-26','Population')\n",
- "\n",
- " '''\n",
- " ssp_model_conv = {\"SSP1-Baseline\" : \"IMAGE\",\n",
- " \"SSP1-26\" : \"IMAGE\",\n",
- " \"SSP2-Baseline\" : \"MESSAGE-GLOBIOM\",\n",
- " \"SSP3-Baseline\" : \"AIM/CGE\",\n",
- " \"SSP4-Baseline\" : \"GCAM4\",\n",
- " \"SSP5-Baseline\" : \"REMIND-MAGPIE\"}\n",
- " model = ssp_model_conv[scenario]\n",
- " ds = df.query(\n",
- " f'(VARIABLE == \"{variable}\") & (SCENARIO == \"{scenario}\") & (MODEL == \"{model}\") & (REGION == \"{region}\")'\n",
- ")\n",
- " return ds"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Let's plot our variables of interest and compare the respective features of the scenarios."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# put variables of interest in a list\n",
- "vars = ['GDP|PPP','Emissions|Kyoto Gases', 'Primary Energy','Diagnostics|MAGICC6|Forcing']\n",
- "# create new names for structured data series and axes labels\n",
- "val_name = ['GDP (billion US$/yr)', 'Emissions (Mt CO$_2$/yr)', 'Energy use (EJ/yr)', 'Forcing (W/m$^2$)']\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,2)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich data frame\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0,0].legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "The projections in the plots you just created show changes in **GDP** (billion US\\$/yr), **fossil fuel emissions** (Mt CO$_2$/yr), **energy use** (EJ/yr), and **forcing** (W/m$^2$) across the two very different scenarios SSP1 and SSP5, computed at their baseline forcing level, which are each represented by a distinct color in each plot.\n",
- "\n",
- "Our plots show that the SSP5-Baseline scenario exhibits very high levels of energy use, and emissions (due to fossil fuel exploitation), it marks the upper end of the scenarios in several dimensions (cf. [Kriegler et al. (2014)](https://doi.org/10.1016/j.gloenvcha.2016.05.015)). \n",
- "\n",
- "The SSP1-26 scenario contrarily caps the increase of energy use by 2030, combined with other actions leading to decreasing emissions and subsequently a decreasing forcing for the second half of the century. However, economic growth continues with half the slope of SSP5-Baseline. In summary, it is the most optimistic projection: we transition to a global society of sustainability-focused growth."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Section 1.1: SSP Creation via IAMs"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "The underlying modeling of Integrated Assessment Models (IAMs) works roughly as follows:\n",
- " \n",
- "All SSP projections are created by optimizing economic activity within the constraint of a given level of greenhouse gas forcing at 2100 (bottom right in the above plot). This activity drives distinct temperature changes via the emissions it produces (top right), which are inputted into a damage function to compute economic damages. These damages feedback into the economy model to limit emissions-producing economic activity (top left).\n",
- "*Note that we already explored these damage functions along our En-ROADS climate solution simulator in Tutorial 2*.\n",
- "\n",
- "The forcing constraint ensures the amount of emissions produced is consistent for that particular scenario. In other words, the projected temperature change under different scenarios is fed to a socioeconomic model component in order to assess the socioeconomic impacts resulting from the temperature change associated with each SSP. *For examples of such impacts check out today's Tutorial 2 and W2D4.*\n",
- "\n",
- "Not every variable in IAMs is endogenous (i.e. determined by other variables in the model). Some variables, like population or technology growth, are exogenous (i.e. variables whose time course is given to the model). In this case, the time course of, e.g., population and economic growth, are derived from simple growth models. These exogenous variables are assumed to be under our society's control (e.g. via mitigation).\n",
- "\n",
- "To understand how our plotted scenarios compare with all other scenarios, we first have a look at the underlying policy assumptions."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Section 1.2 Shared Climate Policy Assumptions (SPAs)"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "All pathways have common Shared Climate Policy Assumptions (SPAs) like \n",
- "- limits to how fast we can respond based on where we are now,\n",
- "- what kinds of policies can be implemented, and how\n",
- "\n",
- "which constrain the modelers that create scenarios and their narratives.\n",
- "\n",
- "Our example scenarios hence share the above SPAs and vary in their narrative:\n",
- "\n",
- "In the hypothetical world of SSP5, no climate policies or climate impacts exist, which in other words effectively implies that the carbon price is zero (cf. [Ch.3.2.1.1 of IPCC's report on 'Climate Change 2022: Mitigation of Climate Change')](https://www.ipcc.ch/report/ar6/wg3/downloads/report/IPCC_AR6_WGIII_Chapter03.pdf).\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Section 1.3: Similarities of SSP1 and SSP5\n",
- "\n",
- "When you compare the two scenarios, in particular, the evolution of the population and the GDP shows how similar these scenarios are in their optimistic view on the development of humanity. We all learn to get along, both within and across countries and more equal development naturally stems from population growth through well-known mechanisms like access to conception. The following figure emphasizes this."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# put variables of interest in a list\n",
- "vars = ['Population', 'GDP|PPP']\n",
- "# create new names for structured data series and plot labels\n",
- "val_name = ['Population\\n(millions)', 'GDP (billion US$/yr)']\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,1)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich dataframe\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0].legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "Both GDP and population increase."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1.3: Differences of SSP1 and SSP5\n",
- "\n",
- "Major differences are visible when you contrast emissions and assume direct causation with ecosystem health. Increasing emissions then translate into decreasing ecosystem health."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Coding exercise 1.3\n",
- "\n",
- "1. Choose two variables to emphasize ecosystem health differences in the SSP1 and SSP5 scenarios and assign them to `vars`. Then assign axis labels with the correct units for plotting to the `val_name` variable.\n",
- "2. Explain to your pod why the chosen variables emphasize a difference in the scenarios and describe this difference based on your current knowledge of the narratives."
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# put two variables of interest in a list\n",
- "vars = ...\n",
- "# create new names for structured data series and plot labels\n",
- "val_name = ...\n",
- "# choose scenarios of interest and a color for plotting\n",
- "scenarios = ['SSP1-26', 'SSP5-Baseline']\n",
- "colors = ['darkblue','darkorange']\n",
- "\n",
- "#################################################\n",
- "## TODO for students:\n",
- "## Put two variables of interest in a list and assign it to 'vars'.\n",
- "## Create new names for the structured data series and axes labels,\n",
- "## put them in a list and assign it to 'val_name'.\n",
- "## Remove the following line of code once you have completed the exercise:\n",
- "raise NotImplementedError(\"Student exercise: Put two variables of interest in a list and assign it to vars. Create new names for the structured data series and axes labels, put them in a list and assign it to val_name.\")\n",
- "#################################################\n",
- "\n",
- "# init figure and axis\n",
- "fig, axs = plt.subplots(2,1)\n",
- "# loop over all variables and new names\n",
- "for var, val, ax in zip(vars,val_name, axs.flatten()):\n",
- "\n",
- " # loop over scenarios and their color\n",
- " for sc, col in zip(scenarios, colors):\n",
- " # retrieve SSP for the respective variable from rich dataframe\n",
- " ds_unstrct = get_SSPs_for_variable(df,sc,var)\n",
- " # restructure dataframe for plotting\n",
- " ds_strct = pd.melt(ds_unstrct, id_vars=[\"MODEL\"], value_vars=['2010','2020','2030','2040','2050','2060','2070','2080','2090','2100'], var_name=\"YEAR\", value_name =val)\n",
- " #print(ds_strct)\n",
- " # plot variable vs. time, add label incl. scenario and model\n",
- " ax.plot(ds_strct['YEAR'],ds_strct[val],label=f'{sc},\\n{ds_strct.MODEL[0]}', color=col)\n",
- " # altern. plotting procedure w/o the color distinction\n",
- " #sns.lineplot(ds_strct, x='YEAR', y=val, hue='MODEL', ax=ax, palette='flare')\n",
- "\n",
- " # aesthetics\n",
- " ax.set_ylabel(fr'{val}')\n",
- " ax.set_xlabel('Time (years)')\n",
- " plt.setp(ax.get_xticklabels(), rotation=45)\n",
- " plt.setp(ax.get_xticklabels()[::2], visible=False)\n",
- " ax.grid(True)\n",
- " axs[0].legend()"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "colab_type": "text",
- "execution": {}
- },
- "source": [
- "[*Click for solution*](https://github.com/neuromatch/climate-course-content/tree/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial4_Solution_a4ef74b1.py)\n",
- "\n",
- "*Example output:*\n",
- "\n",
- "\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "colab_type": "text",
- "execution": {}
- },
- "source": [
- "[*Click for solution*](https://github.com/neuromatch/climate-course-content/tree/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/solutions/W2D3_Tutorial4_Solution_4240ed7b.py)\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "In this tutorial, you've gained a first understanding of the Shared Socioeconomic Pathways and their creation, the application of Integrated Assessment Models in climate economics. You've learned how SSPs share policy assumptions. Furthermore, you compared SSP1 and SSP5 with respect to their view on the development of humanity and their ecosystem health.\n",
- "\n",
- "In the next tutorial, you dissect and analyze the SSP narratives in more detail."
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "It is possible to download the SSP data used in this tutorial, when you provide an email address, from [this IIASA database](https://tntcat.iiasa.ac.at/SspDb/dsd), where all data from the main simulations of the IAMs used in the [IPCC reports](https://www.ipcc.ch/reports/) is freely available.\n",
- "\n",
- "Find a summary of all SSP narratives in this paper by [Oneill et al. (2017)](https://doi.org/10.1016/j.gloenvcha.2015.01.004).\n",
- "\n",
- "Find even more information in\n",
- "\n",
- "- [IIASA's introduction to SSPs](https://iiasa.ac.at/models-tools-data/ssp)"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial4",
- "provenance": [],
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 4
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial5.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial5.ipynb
deleted file mode 100644
index 9b234f6e5..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial5.ipynb
+++ /dev/null
@@ -1,273 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "3d4298c9-a204-48a4-b408-90d0403d4950",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial5.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c55c3b25-2613-4f34-8d4a-ccc417f24708",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial 5: Mapping the Narrative Space\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "5c8af3c8-42a4-45ba-a16f-be86198e23e8",
- "metadata": {
- "execution": {}
- },
- "source": [
- "### Tutorial objectives\n",
- "\n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "1af3e766-b9c3-4bf8-815c-4087e7811925",
- "metadata": {
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# import\n",
- "import matplotlib.pyplot as plt\n",
- "import numpy as np\n",
- "#import dicelib # https://github.com/mptouzel/PyDICE"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "e7392de8-f946-453b-bedf-8a07c705ee7f",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Figure settings\n",
- "import ipywidgets as widgets # interactive display\n",
- "\n",
- "%config InlineBackend.figure_format = 'retina'\n",
- "plt.style.use(\n",
- " \"https://raw.githubusercontent.com/neuromatch/climate-course-content/main/cma.mplstyle\"\n",
- ")"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "6c10210c-a3d9-4996-a3d3-4bafa4b72637",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Helper functions\n",
- "\n",
- "def pooch_load(filelocation=None, filename=None, processor=None):\n",
- " shared_location = \"/home/jovyan/shared/Data/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis\" # this is different for each day\n",
- " user_temp_cache = tempfile.gettempdir()\n",
- "\n",
- " if os.path.exists(os.path.join(shared_location, filename)):\n",
- " file = os.path.join(shared_location, filename)\n",
- " else:\n",
- " file = pooch.retrieve(\n",
- " filelocation,\n",
- " known_hash=None,\n",
- " fname=os.path.join(user_temp_cache, filename),\n",
- " processor=processor,\n",
- " )\n",
- "\n",
- " return file"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "80412217-b5a7-4fed-b29e-b8751eb8c847",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1: Mapping the Narrative Space\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', '9ytkpO_pbWE')\n",
- " # , ('Bilibili', 'BV1bj411Z739')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "2dc2f6c1-637b-4506-a667-45750dd7fbe5",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "# TODO update\n",
- "link_id = \"cyavb\"\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "c7ce6e92-a46d-437a-9e03-c5b80eb63474",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Section 1: Background on IAM Economics\n",
- "\n",
- "The last tutorial gave us a glimpse of Integrated Assessment Models (IAMs), a class of models economists use to inform policy decisions. Recall that IAMs couple a climate model to an economic model, allowing us to evaluate the two-way coupling between economic productivity and climate change severity. \n",
- "\n",
- "Let's begin with a brief description of IAMs:\n",
- "\n",
- "- IAMs resolve the spatially, in contrast, the toy model En-ROADs for example, which we applied in Tutorial 1 to 3, aggregates all variables and is non-spatial.\n",
- "- Like En-ROADS, the world models used in IAMs usually have *exogeneous* (externally set) times series for variables, in addition to fixed world system parameters. These exogenous variables are assumed to be under our society's control (e.g. mitigation). \n",
- "- IAMs come equipped with an objective function (a formula that calculates the quantity to be optimized). This function returns the value of a projected future obtained from running the world model under a given climate policy. This value is defined by the time series of these exogenous variables. In this sense, the objective function is what defines \"good\" in \"good climate policy\". \n",
- "- The computation in an IAM is then an optimization of this objective as a function of the time series of these exogenous variables over some fixed time window.\n",
- "\n",
- "In En-ROADS, there are exogenous parameters, in particular:\n",
- " - **$\\mu(t)$**: time-dependent mitigation rate (i.e. emissions reduction), which limits warming-caused damages\n",
- " - **$S(t)$**: savings rate, which drives capital investment \n",
- "\n",
- "Most IAMs are based on *Neo-classical economics* (also referred to as \"establishment economics\"). This is an approach to economics that makes particular assumptions. For example, it is assumed that production, consumption, and valuation of goods and services are driven solely by the supply and demand model. To understand this approach and how it is used, it is important to begin with a brief overview of some fundamental concepts. One such concept is **utility** (i.e. economic value), which is not only central to economics but also to decision theory as a whole, which is a research field that mathematically formalizes the activity of *planning* (planning here means selecting strategies based on how they are expected to play out given a model that takes those strategies and projects forward into the future)."
- ]
- },
- {
- "cell_type": "markdown",
- "id": "28c0a077-c9a0-42d9-ada6-e8b835668c3b",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "9e904e57-b6b9-4ee8-aefb-140dce3c93c2",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial5",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial6.ipynb b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial6.ipynb
deleted file mode 100644
index 944aeb1a3..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/W2D3_Tutorial6.ipynb
+++ /dev/null
@@ -1,234 +0,0 @@
-{
- "cells": [
- {
- "cell_type": "markdown",
- "id": "a4589a1d-0f80-45e7-aec3-3513172e617b",
- "metadata": {
- "execution": {}
- },
- "source": [
- "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/neuromatch/climate-course-content/blob/main/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/W2D3_Tutorial6.ipynb) "
- ]
- },
- {
- "cell_type": "markdown",
- "id": "3d93b742-06f3-4a0b-9a1d-043397878e48",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Bonus Tutorial 6: Create your Socio-economic Scenario\n",
- "\n",
- "**Week 2, Day 3: The Socioeconomics of Climate Change**\n",
- "\n",
- "**Content creators:** Paul Heubel, Maximilian Puelma Touzel\n",
- "\n",
- "**Content reviewers:** Mujeeb Abdulfatai, Nkongho Ayuketang Arreyndip, Jeffrey N. A. Aryee, Jenna Pearson, Abel Shibu, Ohad Zivan\n",
- "\n",
- "**Content editors:** Paul Heubel, Jenna Pearson, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Production editors:** Wesley Banfield, Jenna Pearson, Konstantine Tsafatinos, Chi Zhang, Ohad Zivan\n",
- "\n",
- "**Our 2024 Sponsors:** CMIP, NFDI4Earth"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "7b5c4ba1-fad0-4d38-b3b2-875a67549624",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Tutorial Objectives\n",
- "\n",
- "*Estimated timing of tutorial:* 30 min\n",
- "\n",
- "In this tutorial, you will model your own simplified Socioeconomic Pathway, a scenario of actions to limit global warming below 2°C. You take action against climate change within the socioeconomic model environment of the Climate Solution Simulator named [En-ROADS](https://www.climateinteractive.org/en-roads/). To examine its characteristics you address its challenges, winners/losers, political feasibility, narrative, and current trends. \n",
- "\n",
- "You learn how to\n",
- "\n",
- "- apply the knowledge you gained in last tutorials to design actions against climate change\n",
- "- map your scenario narrative in the SSP \n"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "b591486d-dff5-4dc6-b83b-1125977a7758",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @title Video 1:\n",
- "\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import YouTubeVideo\n",
- "from IPython.display import IFrame\n",
- "from IPython.display import display\n",
- "\n",
- "\n",
- "class PlayVideo(IFrame):\n",
- " def __init__(self, id, source, page=1, width=400, height=300, **kwargs):\n",
- " self.id = id\n",
- " if source == 'Bilibili':\n",
- " src = f'https://player.bilibili.com/player.html?bvid={id}&page={page}'\n",
- " elif source == 'Osf':\n",
- " src = f'https://mfr.ca-1.osf.io/render?url=https://osf.io/download/{id}/?direct%26mode=render'\n",
- " super(PlayVideo, self).__init__(src, width, height, **kwargs)\n",
- "\n",
- "\n",
- "def display_videos(video_ids, W=400, H=300, fs=1):\n",
- " tab_contents = []\n",
- " for i, video_id in enumerate(video_ids):\n",
- " out = widgets.Output()\n",
- " with out:\n",
- " if video_ids[i][0] == 'Youtube':\n",
- " video = YouTubeVideo(id=video_ids[i][1], width=W,\n",
- " height=H, fs=fs, rel=0)\n",
- " print(f'Video available at https://youtube.com/watch?v={video.id}')\n",
- " else:\n",
- " video = PlayVideo(id=video_ids[i][1], source=video_ids[i][0], width=W,\n",
- " height=H, fs=fs, autoplay=False)\n",
- " if video_ids[i][0] == 'Bilibili':\n",
- " print(f'Video available at https://www.bilibili.com/video/{video.id}')\n",
- " elif video_ids[i][0] == 'Osf':\n",
- " print(f'Video available at https://osf.io/{video.id}')\n",
- " display(video)\n",
- " tab_contents.append(out)\n",
- " return tab_contents\n",
- "\n",
- "\n",
- "video_ids = [('Youtube', '_Y_eLlExwxI'),\n",
- " #TODO('Bilibili', 'BV1nN411U75L')\n",
- " ]\n",
- "tab_contents = display_videos(video_ids, W=730, H=410)\n",
- "tabs = widgets.Tab()\n",
- "tabs.children = tab_contents\n",
- "for i in range(len(tab_contents)):\n",
- " tabs.set_title(i, video_ids[i][0])\n",
- "display(tabs)"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "id": "616428a4-3db2-4e56-af30-6c56aaf66204",
- "metadata": {
- "cellView": "form",
- "execution": {}
- },
- "outputs": [],
- "source": [
- "# @markdown\n",
- "from ipywidgets import widgets\n",
- "from IPython.display import IFrame\n",
- "\n",
- "link_id = \"gwr8h\" #TODO\n",
- "\n",
- "download_link = f\"https://osf.io/download/{link_id}/\"\n",
- "render_link = f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\"\n",
- "# @markdown\n",
- "out = widgets.Output()\n",
- "with out:\n",
- " print(f\"If you want to download the slides: {download_link}\")\n",
- " display(IFrame(src=f\"{render_link}\", width=730, height=410))\n",
- "display(out)"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a516e969-8b67-4f8a-9d39-061770ffb4c9",
- "metadata": {
- "execution": {}
- },
- "source": [
- "## Exercise 1: Create your Solution Scenario and Evaluate it\n",
- "*Estimated timing:* 20 minutes\n",
- "\n",
- "1. **Open En-ROADS** [here](https://en-roads.climateinteractive.org/). *(Note the control panel is available in various languages - check the left of the panel of the simulator that should by default show \"English\".)*\n",
- "\n",
- "2. **Develop a scenario**: By moving the sliders and changing the assumptions, find a scenario (i.e. a combination of slider positions of different variables) that results in *less than 2°C* of temperature increase by the end of the century. Use the following [cheatsheet](https://img.climateinteractive.org/2019/09/EnROADS-one-page-guide-to-control-panel-v11-dec-2021.pdf) if needed. \n",
- "\n",
- "*Note that your changes are reflected in the light blue graph, while the baseline scenario remains a black line.*\n",
- "\n",
- "3. **Answer the following questions**:\n",
- "\n",
- " 1. **Your Plan**: What are the top 3-5 most important policies in your strategy? (For example, the most important sliders that you moved). Share your scenario link and a screenshot of your final En-ROADS dashboard.\n",
- " \n",
- " *If you want to save your scenario, export it via a click on the* ***Share your scenario*** *button in the top right of the panel, and select 'Copy Scenario Link'*.\n",
- " \n",
- " 2. **Political Feasibility**: To implement your proposals, what actions and priorities are needed over the next two years in businesses, civil society, government, and the public?\n",
- " 3. **Winners & Losers**: Who would be the biggest winners and losers globally in your proposed future? Create a table with two columns for winners and losers. \n",
- " 4. **Narrative**: Map your ideas in the narrative space, introduced in Tutorial 5. \n",
- " 5. **Hope**: What trends in the world give you hope that your proposals are possible?\n",
- "\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "fadd5652-5db9-475e-a072-f204358ade8a",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Summary\n",
- "\n",
- "In this last tutorial, you went from model to action by designing your own socioeconomic modeling scenario to limit global warming below 2°C by the end of the century. You reflected on its challenges, political feasibility, inherent winners and losers of your approach, and finally, the narrative that you chose. At the end of the day, you collected observations of actions and trends you are making in your region, globally, and in your daily life that give hope. That hope and various solutions exist, which one has to combine, and that only action is needed, might be the most important lesson of today.\n"
- ]
- },
- {
- "cell_type": "markdown",
- "id": "a6aaa44b-0fc2-4249-91c4-589aac662188",
- "metadata": {
- "execution": {}
- },
- "source": [
- "# Resources\n",
- "\n",
- "This tutorial is inspired by teaching material from [Climate Interactive](https://climateinteractive.org/) and other documents. \n",
- "A few important resources are linked below:\n",
- "\n",
- "- [En-ROADS documentation](https://docs.climateinteractive.org/projects/en-roads/en/latest/index.html)\n",
- "- [En-ROADS User Guide PDF](https://docs.climateinteractive.org/projects/en-roads/en/latest/en-roads-user-guide.pdf)\n",
- "- [Guided Assignment - Simulating Climate Futures in En-ROADS: Short Version](https://www.climateinteractive.org/guided-assignment/)\n",
- "\n",
- "**A Planetary Crisis Planning Computer Game**\n",
- "- [Half Earth Socialism](https://play.half.earth/).\n"
- ]
- }
- ],
- "metadata": {
- "colab": {
- "collapsed_sections": [],
- "include_colab_link": true,
- "name": "W2D3_Tutorial6",
- "toc_visible": true
- },
- "kernel": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "kernelspec": {
- "display_name": "Python 3 (ipykernel)",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.9.19"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 5
-}
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/dicelib.py b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/dicelib.py
deleted file mode 100644
index bbc544141..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/dicelib.py
+++ /dev/null
@@ -1,538 +0,0 @@
-import seaborn as sns
-import matplotlib.pyplot as pl
-import pandas as pd
-import numpy as np
-import scipy.optimize as opt
-from matplotlib.ticker import EngFormatter
-
-
-class DICE():
-
- def __init__(self):
- self.time_step = 5 # Years per Period
- # Set
- self.min_year = 2000
- self.max_year = 2500
- self.TT = np.linspace(
- self.min_year, self.max_year, 100, dtype=np.int32)
- self.NT = len(self.TT)
- self.t = np.arange(1, self.NT+1)
-
- def init_parameters(self, a3=2.00, prstp=0.015, elasmu=1.45):
-
- # Maximum cumulative extraction fossil fuels (GtC); denoted by CCum
- self.fosslim = 6000
- self.ifopt = 0 # Indicator where optimized is 1 and base is 0
- self.elasmu = elasmu # Elasticity of marginal utility of consumption
- self.prstp = prstp # Initial rate of social time preference per year
-
- self.init_pop_and_tech_parameters()
- self.init_emissions_parameters()
- self.init_carboncycle_parameters()
- self.init_climatemodel_parameters()
- self.init_climatedamage_parameters(a3)
- self.init_abatementcost_parameters()
-
- # ** Scaling and inessential parameters
- # * Note that these are unnecessary for the calculations
- # * They ensure that MU of first period's consumption =1 and PV cons = PV utilty
- # Multiplicative scaling coefficient /0.0302455265681763 /
- self.scale1 = 0.0302455265681763
- self.scale2 = -10993.704 # Additive scaling coefficient /-10993.704/;
-
- # * carbon cycling coupling matrix
- self.b11 = 1 - self.b12
- self.b21 = self.b12*self.mateq/self.mueq
- self.b22 = 1 - self.b21 - self.b23
- self.b32 = self.b23*self.mueq/self.mleq
- self.b33 = 1 - self.b32
-
- # * Further definitions of parameters
- self.a20 = self.a2
- self.sig0 = self.e0/(self.q0*(1-self.miu0)) # From Eq. 14
- self.lam = self.fco22x / self.t2xco2 # From Eq. 25
-
- self.init_exogeneous_inputs()
-
- def init_pop_and_tech_parameters(self, gama=0.300, pop0=7403, popadj=0.134,
- popasym=11500, dk=0.100, q0=105.5,
- k0=223, a0=5.115, ga0=0.076, dela=0.005):
- self.gama = gama # Capital elasticity in production function /.300 /
- # Initial world population 2015 (millions) /7403 /
- self.pop0 = pop0
- self.popadj = popadj # Growth rate to calibrate to 2050 pop projection /0.134/
- # Asymptotic population (millions) /11500/
- self.popasym = popasym
- # Depreciation rate on capital (per year) /.100 /
- self.dk = dk
- # Initial world gross output 2015 (trill 2010 USD) /105.5/
- self.q0 = q0
- # Initial capital value 2015 (trill 2010 USD) /223 /
- self.k0 = k0
- self.a0 = a0 # Initial level of total factor productivity /5.115/
- self.ga0 = ga0 # Initial growth rate for TFP per 5 years /0.076/
- self.dela = dela # Decline rate of TFP per 5 years /0.005/
-
- # ** Emissions parameters
- def init_emissions_parameters(self, gsigma1=-0.0152, dsig=-0.001, eland0=2.6,
- deland=0.115, e0=35.85, miu0=0.03):
- # Initial growth of sigma (per year) /-0.0152/
- self.gsigma1 = gsigma1
- # Decline rate of decarbonization (per period) /-0.001 /
- self.dsig = dsig
- # Carbon emissions from land 2015 (GtCO2 per year) / 2.6 /
- self.eland0 = eland0
- # Decline rate of land emissions (per period) / .115 /
- self.deland = deland
- # Industrial emissions 2015 (GtCO2 per year) /35.85 /
- self.e0 = e0
- self.miu0 = miu0 # Initial emissions control rate for base case 2015 /.03 /
-
- # ** Carbon cycle
- def init_carboncycle_parameters(self, mat0=851, mu0=460, ml0=1740, mateq=588, mueq=360, mleq=1720):
- # * Initial Conditions
- # Initial Concentration in atmosphere 2015 (GtC) /851 /
- self.mat0 = mat0
- # Initial Concentration in upper strata 2015 (GtC) /460 /
- self.mu0 = mu0
- # Initial Concentration in lower strata 2015 (GtC) /1740 /
- self.ml0 = ml0
- # mateq Equilibrium concentration atmosphere (GtC) /588 /
- self.mateq = mateq
- # mueq Equilibrium concentration in upper strata (GtC) /360 /
- self.mueq = mueq
- # mleq Equilibrium concentration in lower strata (GtC) /1720 /
- self.mleq = mleq
-
- # * Flow paramaters, denoted by Phi_ij in the model
- self.b12 = 0.12 # Carbon cycle transition matrix /.12 /
- self.b23 = 0.007 # Carbon cycle transition matrix /0.007/
- # * These are for declaration and are defined later
- self.b11 = None # Carbon cycle transition matrix
- self.b21 = None # Carbon cycle transition matrix
- self.b22 = None # Carbon cycle transition matrix
- self.b32 = None # Carbon cycle transition matrix
- self.b33 = None # Carbon cycle transition matrix
- # Carbon intensity 2010 (kgCO2 per output 2005 USD 2010)
- self.sig0 = None
-
- # ** Climate model parameters
- def init_climatemodel_parameters(self):
- # Equilibrium temp impact (oC per doubling CO2) / 3.1 /
- self.t2xco2 = 3.1
- # 2015 forcings of non-CO2 GHG (Wm-2) / 0.5 /
- self.fex0 = 0.5
- # 2100 forcings of non-CO2 GHG (Wm-2) / 1.0 /
- self.fex1 = 1.0
- # Initial lower stratum temp change (C from 1900) /.0068/
- self.tocean0 = 0.0068
- # Initial atmospheric temp change (C from 1900) /0.85/
- self.tatm0 = 0.85
- self.c1 = 0.1005 # Climate equation coefficient for upper level /0.1005/
- self.c3 = 0.088 # Transfer coefficient upper to lower stratum /0.088/
- self.c4 = 0.025 # Transfer coefficient for lower level /0.025/
- # eta in the model; Eq.22 : Forcings of equilibrium CO2 doubling (Wm-2) /3.6813 /
- self.fco22x = 3.6813
-
- def init_climatedamage_parameters(self, a3=2.00):
- # ** Climate damage parameters
- self.a10 = 0 # Initial damage intercept /0 /
- self.a20 = None # Initial damage quadratic term
- self.a1 = 0 # Damage intercept /0 /
- self.a2 = 0.00236 # Damage quadratic term /0.00236/
- self.a3 = a3 # Damage exponent /2.00 /
-
- def init_abatementcost_parameters(self):
- # ** Abatement cost
- # Theta2 in the model, Eq. 10 Exponent of control cost function / 2.6 /
- self.expcost2 = 2.6
- self.pback = 550 # Cost of backstop 2010$ per tCO2 2015 / 550 /
- self.gback = 0.025 # Initial cost decline backstop cost per period / .025/
- self.limmiu = 1.2 # Upper limit on control rate after 2150 / 1.2 /
- self.tnopol = 45 # Period before which no emissions controls base / 45 /
- # Initial base carbon price (2010$ per tCO2) / 2 /
- self.cprice0 = 2
- self.gcprice = 0.02 # Growth rate of base carbon price per year /.02
-
- def init_exogeneous_inputs(self):
- NT = self.NT
-
- self.l = np.zeros(NT)
- self.l[0] = self.pop0 # Labor force
- self.al = np.zeros(NT)
- self.al[0] = self.a0
- self.gsig = np.zeros(NT)
- self.gsig[0] = self.gsigma1
- self.sigma = np.zeros(NT)
- self.sigma[0] = self.sig0
- # TFP growth rate dynamics, Eq. 7
- self.ga = self.ga0 * np.exp(-self.dela*5*(self.t-1))
- self.pbacktime = self.pback * \
- (1-self.gback)**(self.t-1) # Backstop price
- # Emissions from deforestration
- self.etree = self.eland0*(1-self.deland)**(self.t-1)
- self.rr = 1/((1+self.prstp)**(self.time_step*(self.t-1))) # Eq. 3
- # The following three equations define the exogenous radiative forcing; used in Eq. 23
- self.forcoth = np.full(NT, self.fex0)
- self.forcoth[0:18] = self.forcoth[0:18] + \
- (1/17)*(self.fex1-self.fex0)*(self.t[0:18]-1)
- self.forcoth[18:NT] = self.forcoth[18:NT] + (self.fex1-self.fex0)
- # Optimal long-run savings rate used for transversality (Question)
- self.optlrsav = (self.dk + .004)/(self.dk + .004 *
- self.elasmu + self.prstp)*self.gama
- self.cost1 = np.zeros(NT)
- self.cumetree = np.zeros(NT)
- self.cumetree[0] = 100
- self.cpricebase = self.cprice0*(1+self.gcprice)**(5*(self.t-1))
-
- def InitializeLabor(self, il, iNT):
- for i in range(1, iNT):
- il[i] = il[i-1]*(self.popasym / il[i-1])**self.popadj
-
- def InitializeTFP(self, ial, iNT):
- for i in range(1, iNT):
- ial[i] = ial[i-1]/(1-self.ga[i-1])
-
- def InitializeGrowthSigma(self, igsig, iNT):
- for i in range(1, iNT):
- igsig[i] = igsig[i-1]*((1+self.dsig)**self.time_step)
-
- def InitializeSigma(self, isigma, igsig, icost1, iNT):
- for i in range(1, iNT):
- isigma[i] = isigma[i-1] * np.exp(igsig[i-1] * self.time_step)
- icost1[i] = self.pbacktime[i] * isigma[i] / self.expcost2 / 1000
-
- def InitializeCarbonTree(self, icumetree, iNT):
- for i in range(1, iNT):
- icumetree[i] = icumetree[i-1] + self.etree[i-1]*(5/3.666)
-
- """
- Emissions of carbon and weather damages
- """
-
- # Retuns the total carbon emissions; Eq. 18
- def fE(self, iEIND, index):
- return iEIND[index] + self.etree[index]
-
- # Eq.14: Determines the emission of carbon by industry EIND
- def fEIND(self, iYGROSS, iMIU, isigma, index):
- return isigma[index] * iYGROSS[index] * (1 - iMIU[index])
-
- # Cumulative industrial emission of carbon
- def fCCA(self, iCCA, iEIND, index):
- return iCCA[index-1] + iEIND[index-1] * 5 / 3.666
-
- # Cumulative total carbon emission
- def fCCATOT(self, iCCA, icumetree, index):
- return iCCA[index] + icumetree[index]
-
- # Eq. 22: the dynamics of the radiative forcing
- def fFORC(self, iMAT, index):
- return self.fco22x * np.log(iMAT[index]/588.000)/np.log(2) + self.forcoth[index]
-
- # Dynamics of Omega; Eq.9
- def fDAMFRAC(self, iTATM, index):
- return self.a1*iTATM[index] + self.a2*iTATM[index]**self.a3
-
- # Calculate damages as a function of Gross industrial production; Eq.8
- def fDAMAGES(self, iYGROSS, iDAMFRAC, index):
- return iYGROSS[index] * iDAMFRAC[index]
-
- # Dynamics of Lambda; Eq. 10 - cost of the reudction of carbon emission (Abatement cost)
- def fABATECOST(self, iYGROSS, iMIU, icost1, index):
- return iYGROSS[index] * icost1[index] * iMIU[index]**self.expcost2
-
- # Marginal Abatement cost
- def fMCABATE(self, iMIU, index):
- return self.pbacktime[index] * iMIU[index]**(self.expcost2-1)
-
- # Price of carbon reduction
- def fCPRICE(self, iMIU, index):
- return self.pbacktime[index] * (iMIU[index])**(self.expcost2-1)
-
- # Eq. 19: Dynamics of the carbon concentration in the atmosphere
- def fMAT(self, iMAT, iMU, iE, index):
- if (index == 0):
- return self.mat0
- else:
- return iMAT[index-1]*self.b11 + iMU[index-1]*self.b21 + iE[index-1] * 5 / 3.666
-
- # Eq. 21: Dynamics of the carbon concentration in the ocean LOW level
- def fML(self, iML, iMU, index):
- if (index == 0):
- return self.ml0
- else:
- return iML[index-1] * self.b33 + iMU[index-1] * self.b23
-
- # Eq. 20: Dynamics of the carbon concentration in the ocean UP level
- def fMU(self, iMAT, iMU, iML, index):
- if (index == 0):
- return self.mu0
- else:
- return iMAT[index-1]*self.b12 + iMU[index-1]*self.b22 + iML[index-1]*self.b32
-
- # Eq. 23: Dynamics of the atmospheric temperature
- def fTATM(self, iTATM, iFORC, iTOCEAN, index):
- if (index == 0):
- return self.tatm0
- else:
- return iTATM[index-1] + self.c1 * (iFORC[index] - (self.fco22x/self.t2xco2) * iTATM[index-1] - self.c3 * (iTATM[index-1] - iTOCEAN[index-1]))
-
- # Eq. 24: Dynamics of the ocean temperature
- def fTOCEAN(self, iTATM, iTOCEAN, index):
- if (index == 0):
- return self.tocean0
- else:
- return iTOCEAN[index-1] + self.c4 * (iTATM[index-1] - iTOCEAN[index-1])
-
- """
- economic variables
- """
-
- # The total production without climate losses denoted previously by YGROSS
- def fYGROSS(self, ial, il, iK, index):
- return ial[index] * ((il[index]/1000)**(1-self.gama)) * iK[index]**self.gama
-
- # The production under the climate damages cost
- def fYNET(self, iYGROSS, iDAMFRAC, index):
- return iYGROSS[index] * (1 - iDAMFRAC[index])
-
- # Production after abatement cost
- def fY(self, iYNET, iABATECOST, index):
- return iYNET[index] - iABATECOST[index]
-
- # Consumption Eq. 11
- def fC(self, iY, iI, index):
- return iY[index] - iI[index]
-
- # Per capita consumption, Eq. 12
- def fCPC(self, iC, il, index):
- return 1000 * iC[index] / il[index]
-
- # Saving policy: investment
- def fI(self, iS, iY, index):
- return iS[index] * iY[index]
-
- # Capital dynamics Eq. 13
- def fK(self, iK, iI, index):
- if (index == 0):
- return self.k0
- else:
- return (1-self.dk)**self.time_step * iK[index-1] + self.time_step * iI[index-1]
-
- # Interest rate equation; Eq. 26 added in personal notes
- def fRI(self, iCPC, index):
- return (1 + self.prstp) * (iCPC[index+1]/iCPC[index])**(self.elasmu/self.time_step) - 1
-
- # Periodic utility: A form of Eq. 2
- def fCEMUTOTPER(self, iPERIODU, il, index):
- return iPERIODU[index] * il[index] * self.rr[index]
-
- # The term between brackets in Eq. 2
- def fPERIODU(self, iC, il, index):
- return ((iC[index]*1000/il[index])**(1-self.elasmu) - 1) / (1 - self.elasmu) - 1
-
- # utility function
- def fUTILITY(self, iCEMUTOTPER, resUtility):
- resUtility[0] = self.time_step * self.scale1 * \
- np.sum(iCEMUTOTPER) + self.scale2
-
- def init_variables(self): # TODO: add full variable names as comments
- NT = self.NT
- self.K = np.zeros(NT)
- self.YGROSS = np.zeros(NT)
- self.EIND = np.zeros(NT)
- self.E = np.zeros(NT)
- self.CCA = np.zeros(NT)
- self.CCATOT = np.zeros(NT)
- self.MAT = np.zeros(NT)
- self.ML = np.zeros(NT)
- self.MU = np.zeros(NT)
- self.FORC = np.zeros(NT)
- self.TATM = np.zeros(NT)
- self.TOCEAN = np.zeros(NT)
- self.DAMFRAC = np.zeros(NT)
- self.DAMAGES = np.zeros(NT)
- self.ABATECOST = np.zeros(NT)
- self.MCABATE = np.zeros(NT)
- self.CPRICE = np.zeros(NT)
- self.YNET = np.zeros(NT)
- self.Y = np.zeros(NT)
- self.I = np.zeros(NT)
- self.C = np.zeros(NT)
- self.CPC = np.zeros(NT)
- self.RI = np.zeros(NT)
- self.PERIODU = np.zeros(NT)
- self.CEMUTOTPER = np.zeros(NT)
-
- self.optimal_controls = np.zeros(2*NT)
-
- self.InitializeLabor(self.l, NT)
- self.InitializeTFP(self.al, NT)
- self.InitializeGrowthSigma(self.gsig, NT)
- self.InitializeSigma(self.sigma, self.gsig, self.cost1, NT)
- self.InitializeCarbonTree(self.cumetree, NT)
-
- def get_control_bounds_and_startvalue(self):
-
- NT = self.NT
- # * Control variable limits
- MIU_lo = np.full(NT, 0.01)
- MIU_up = np.full(NT, self.limmiu)
- MIU_up[0:29] = 1
- MIU_lo[0] = self.miu0
- MIU_up[0] = self.miu0
- MIU_lo[MIU_lo == MIU_up] = 0.99999*MIU_lo[MIU_lo == MIU_up]
- bnds1 = []
- for i in range(NT):
- bnds1.append((MIU_lo[i], MIU_up[i]))
-
- lag10 = np.arange(1, NT+1) > NT - 10
- S_lo = np.full(NT, 1e-1)
- S_lo[lag10] = self.optlrsav
- S_up = np.full(NT, 0.9)
- S_up[lag10] = self.optlrsav
- S_lo[S_lo == S_up] = 0.99999*S_lo[S_lo == S_up]
- bnds2 = []
- for i in range(NT):
- bnds2.append((S_lo[i], S_up[i]))
- bnds = bnds1 + bnds2
-
- # starting values for the control variables:
- S_start = np.full(NT, 0.2)
- S_start[S_start < S_lo] = S_lo[S_start < S_lo]
- S_start[S_start > S_up] = S_lo[S_start > S_up]
- MIU_start = 0.99*MIU_up
- MIU_start[MIU_start < MIU_lo] = MIU_lo[MIU_start < MIU_lo]
- MIU_start[MIU_start > MIU_up] = MIU_up[MIU_start > MIU_up]
- x_start = np.concatenate([MIU_start, S_start])
-
- return x_start, bnds
-
- def fOBJ(self, controls):
- self.roll_out(controls)
- resUtility = np.zeros(1)
- self.fUTILITY(self.CEMUTOTPER, resUtility)
-
- return -1*resUtility[0]
-
- def roll_out(self, controls):
- NT = self.NT
-
- iMIU = controls[0:NT]
- iS = controls[NT:(2*NT)]
-
- for i in range(NT):
- self.K[i] = self.fK(self.K, self.I, i)
- self.YGROSS[i] = self.fYGROSS(self.al, self.l, self.K, i)
- self.EIND[i] = self.fEIND(self.YGROSS, iMIU, self.sigma, i)
- self.E[i] = self.fE(self.EIND, i)
- self.CCA[i] = self.fCCA(self.CCA, self.EIND, i)
- self.CCATOT[i] = self.fCCATOT(self.CCA, self.cumetree, i)
- self.MAT[i] = self.fMAT(self.MAT, self.MU, self.E, i)
- self.ML[i] = self.fML(self.ML, self.MU, i)
- self.MU[i] = self.fMU(self.MAT, self.MU, self.ML, i)
- self.FORC[i] = self.fFORC(self.MAT, i)
- self.TATM[i] = self.fTATM(self.TATM, self.FORC, self.TOCEAN, i)
- self.TOCEAN[i] = self.fTOCEAN(self.TATM, self.TOCEAN, i)
- self.DAMFRAC[i] = self.fDAMFRAC(self.TATM, i)
- self.DAMAGES[i] = self.fDAMAGES(self.YGROSS, self.DAMFRAC, i)
- self.ABATECOST[i] = self.fABATECOST(
- self.YGROSS, iMIU, self.cost1, i)
- self.MCABATE[i] = self.fMCABATE(iMIU, i)
- self.CPRICE[i] = self.fCPRICE(iMIU, i)
- self.YNET[i] = self.fYNET(self.YGROSS, self.DAMFRAC, i)
- self.Y[i] = self.fY(self.YNET, self.ABATECOST, i)
- self.I[i] = self.fI(iS, self.Y, i)
- self.C[i] = self.fC(self.Y, self.I, i)
- self.CPC[i] = self.fCPC(self.C, self.l, i)
- self.PERIODU[i] = self.fPERIODU(self.C, self.l, i)
- self.CEMUTOTPER[i] = self.fCEMUTOTPER(self.PERIODU, self.l, i)
-# self.RI[i] = self.fRI(self.CPC, i)
-
- def optimize_controls(self, controls_start, controls_bounds):
- result = opt.minimize(self.fOBJ, controls_start, method='SLSQP', bounds=tuple(
- controls_bounds), options={'disp': True})
- self.optimal_controls = result.x
- return result
-
- def plot_run(self, title_str):
- Tmax = 2150
- NT = self.NT
- variables = [self.optimal_controls[NT:(2*NT)], self.optimal_controls[0:NT], self.CPRICE, self.EIND, self.TATM, self.DAMAGES, self.MAT,
- self.E]
- variables = [var[self.TT < Tmax] for var in variables]
- variable_labels = ["Saving rate",
- "Em rate", # 'Carbon emission control rate'
- "carbon price",
- "INdustrial emissions",
- # Increase temperature of the atmosphere (TATM)
- "Degrees C from 1900",
- "Damages", # 'trillions 2010 USD per year'
- "GtC from 1750", # 'Carbon concentration increase in the atmosphere'
- "GtCO2 per year" # Total CO2 emission
- ]
- variable_limits = [[0, 0.5], [0, 1], [0, 400], [-20, 40],
- [0, 5], [0, 150], [0, 1500], [-20, 50]] # y axis ranges
- plot_world_variables(self.TT[self.TT < Tmax], variables, variable_labels, variable_limits,
- title=title_str,figsize=[4+len(variables), 7],
- grid=True)
-
-
-def plot_world_variables(time, var_data, var_names, var_lims,
- title=None,
- figsize=None,
- dist_spines=0.09,
- grid=False):
- prop_cycle = pl.rcParams['axes.prop_cycle']
- colors = prop_cycle.by_key()['color']
-
- var_number = len(var_data)
-
- fig, host = pl.subplots(figsize=figsize)
- axs = [host, ]
- for i in range(var_number-1):
- axs.append(host.twinx())
-
- fig.subplots_adjust(left=dist_spines*2)
- for i, ax in enumerate(axs[1:]):
- ax.spines["left"].set_position(("axes", -(i + 1)*dist_spines))
- ax.spines["left"].set_visible(True)
- ax.yaxis.set_label_position('left')
- ax.yaxis.set_ticks_position('left')
-
- ps = []
- for ax, label, ydata, color in zip(axs, var_names, var_data, colors):
- ps.append(ax.plot(time, ydata, label=label,
- color=color, clip_on=False)[0])
- axs[0].grid(grid)
- axs[0].set_xlim(time[0], time[-1])
-
- for ax, lim in zip(axs, var_lims):
- ax.set_ylim(lim[0], lim[1])
-
- for axit, ax_ in enumerate(axs):
- ax_.tick_params(axis='y', rotation=90)
- ax_.yaxis.set_major_locator(pl.MaxNLocator(5))
- formatter_ = EngFormatter(places=0, sep="\N{THIN SPACE}")
- ax_.yaxis.set_major_formatter(formatter_)
-
- tkw = dict(size=4, width=1.5)
- axs[0].set_xlabel("time [years]")
- axs[0].tick_params(axis='x', **tkw)
- for i, (ax, p) in enumerate(zip(axs, ps)):
- ax.set_ylabel(p.get_label(), rotation=25)
- ax.yaxis.label.set_color(p.get_color())
- ax.tick_params(axis='y', colors=p.get_color(), **tkw)
- ax.yaxis.set_label_coords(-i*dist_spines, 1.01)
- axs[0].set_title(title)
-
-
-def hello_world():
- dice = DICE()
- dice.init_parameters()
- dice.init_variables()
- controls_start, controls_bounds = dice.get_control_bounds_and_startvalue()
- dice.optimize_controls(controls_start, controls_bounds)
- dice.roll_out(dice.optimal_controls)
- dice.plot_run()
diff --git a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/further_reading.md b/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/further_reading.md
deleted file mode 100644
index cc972adcd..000000000
--- a/tutorials/W2D3_FutureClimate-IPCCII&IIISocio-EconomicBasis/student/further_reading.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# **Tutorial 2 Further Reading**
-
-## **IAM Model Summary**
-The economy model in most IAMs is a capital accumulation model.
-- Capital combines with a laboring population and technology to generate productivity ($Y$) that is hindered by climate damage.
-- A savings fraction of production drives capital accumulation, while the rest is consumed. Welfare is determined by consumption.
-- Climate action is formulated by a mitigation rate, $\mu$, which along with the savings rate are the two control parameters in the model.
-- These are used to maximize welfare.
-
-The climate model in DICE could be improved (c.f. [this study](https://www3.nd.edu/~nmark/Climate/DICE-simplified_2019.pdf)). We only summarize here how it interacts with the economy model:
-- Productivity generates industrial emissions, $$E_\mathrm{ind}=(1-\mu)\sigma Y,$$ where the $1-\mu$ factor accounts for reduced carbon intensity of production, $\sigma$, via supply-side mitigation measures (e.g. increased efficiency).
-- The productivity $Y$ rather than output production ($Q$) see model is used here because damages aren't included.
-- Namely, the emissions produced in the process of capital production occur before climate change has a chance to inflict damage on the produced output.
-- These emissions combine with natural emissions to drive the temperature changes appearing in the damage function, closing the economy-climate loop.
-
-Here are a list of variables used:
-- $K$ capital
-- $Y$ productivity
-- $Q$ production
-- $A$ technology conversion
-- $S$ savings rate
-- $\mu$ mitigation rate
-- $\Lambda$ mitigation cost
-- $\Omega$ damage fraction of productivity
-- $\sigma$ carbon intensity of production
-- $E$ emissions
-
-## **Exogeneous Control Variables**
-There are two exogeneous variables in the model:
-- mitigation (emissions reduction) rate $\mu_t$, and
-- the savings rate $S_t$.
-
-There exists a mitigation cost associated with a specific mitigation rate, presented as a fraction of productivity, $\Lambda_t=\theta_1\mu^{\theta_2}$. This implies that increased mitigation efforts correspond to elevated costs.
-
-The savings rate $S_t$ extracts a portion of the total production to invest, thereby boosting capital. The rest of the production is then allocated for consumption.
-
-## **Economy Model Summary**
-The essence of the economy model in DICE is a capital accumulation model. Existing capital depreciates at rate $\delta$ and new capital arises through investment,
-$$K_{t+1}=(1-\delta)K_t+I_t$$
-where the invested capital $I=SQ$ is determined by a chosen fraction $S$ of the production $Q$ that is "saved" rather than consumed. Production is given as the productivity $Y$ reduced by damages and mitigation cost, $$Q=(1-\Omega)(1-\Lambda)Y.$$ Productivity, $$Y=A K^\gamma L^{1-\gamma},$$
-is determined by the technology conversion $A$ operating on a combination of capital $K$ and labor $L$ whose relative contributions are set by the capital elasticity parameter $\gamma$. Labor is population which set to saturate over the 2nd half of the 21st century. Technology conversion is only weakly sigmoidal in time, deviating slightly from linear growth.
-
-The remaining production is consumed $$C:=(1-S)Q$$ producing utility $$U(C,L)=Lu(c)=Lu(C/L),$$ using the isoelastic utility function, $$u(c)=\frac{(c+1)^{1-\alpha}-1}{1-\alpha}.$$ The overall value of a projected future is then $$V=\sum_{t=1}^{\infty}\gamma^t U(C_t,L_t),$$ where $\gamma=1/(1+\rho)$ for discount rate $\rho$ and we use the population level utility function $U(C,L)=Lu(C/L)$.
-
-
-Here are a list of variables used:
-- $K$ capital
-- $Y$ productivity
-- $Q$ production
-- $A$ technology conversion
-- $S$ savings rate
-- $\mu$ mitigation rate
-- $\Lambda$ mitigation cost
-- $\Omega$ damage fraction of productivity
-- $\sigma$ carbon intensity of production
-- $E$ emissions
-
-## **Optimal Planning**
-The unconstrained problem aims to maximize $V$ within the bounds of $\mu_t$ and $S_t$ time courses (while considering constraints on $\mu$ and $S$). Why is there a "sweet spot"? Increasing savings boosts investment and productivity, but higher production leads to emissions, resulting in increased temperature and damages that reduce production. Mitigation costs counterbalance this effect, creating a trade-off. As a result, there typically exists a meaningful joint time series of $\mu_t$ and $S_t$ that maximizes $V$. Due to the discount factor $\gamma$, $V$ depends on the future consumption sequence (non-invested production) within a few multiples of the horizon, approximately $1/(1-\gamma)$ time steps into the future.
-
-Constrained formulations introduce an additional constraint to limit industrial emissions below a certain threshold.
-
-## **Social Cost of Carbon**
-A definition for the social cost of carbon (SCC) is
-
-- *the decrease in aggregate consumption in that year that would change the current...value of social welfare by the same amount as a one unit increase in carbon emissions in that year.* ([Newbold, Griffiths, Moore, Wolverton, & Kopits, 2013](https://www.worldscientific.com/doi/abs/10.1142/S2010007813500012)).
-
-The $SCC$ quantifies how much consumption is lost with increased emissions, using changes in welfare to make the connection. In technical terms:
-
-- the marginal value with respect to emissions relative to the marginal value with respect to consumption, $$SCC_t\propto\frac{\partial V/\partial E_t}{\partial V/\partial C_t}=\frac{\partial C_t}{\partial E_t}.$$
-This is usually expressed by multiplying by a proportionality factor of $-1000$ that converts the units to 2010 US dollars per tonne of CO2.
-
-# **Tutorial 4 Further Reading**
-
-## **Vectorization Methods for Creating Word Clouds**
-
-Let's write down what they compute by denoting the index, $d$, over the $D$ documents and the index, $w$, over the $W$ words in the vocabulary (the list of all the words found in all the tweets, which we'll call documents):
-- term frequency, $\mathrm{tf}(w,d)$. The frequency of a word $w$ in a document $d$ is $$\mathrm{tf}(w,d):=\frac{n(w,d)}{n(d)},$$ where $n(w,d)$ is the number of times term $w$ is in document $d$ and $n(d)=\sum_{w=1}^W n(w,d)$ is the total number of words in document $d$. The term frequency over all the documents is then, $$\mathrm{tf}(w):=\frac{\sum_{d=1}^D n(d)\mathrm{tf}(w,d)}{N},$$ where the denominator $N=\sum_{d=1}^D n(d)$ is just the total word count across all documents.
-- term frequency-inverse document frequency, $\mathrm{Tfidf}(w,d):=\mathrm{tf}(w,d)\mathrm{idf}(w)$. Here, $$\mathrm{idf}(w)=\frac{\log(D+1)}{\log(n(w)+1)+1},$$ where $n(w)$ is the number of documents in which term $t$ appears, i.e. $n(w,d)>0$. Idf is like an inverse document frequency. The `sklearn` package then uses $$\mathrm{Tfidf}(w)=\frac{1}{D}\sum_{d=1}^D \frac{\mathrm{Tfidf}(w,d)}{||\mathrm{Tfidf}(\cdot,d)||},$$ where $||\vec{x}||=\sqrt{\sum_{i=1}^Nx^2_i}$ is the Euclidean norm.
-
-$\mathrm{Tfidf}$ aims to add more discriminability to frequency as a word relevance metric by downweighting words that appear in many documents since these common words are less discriminative.
\ No newline at end of file