{ "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)   \"Open" ] }, { "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": "markdown", "metadata": {}, "source": [ "## Figure settings\n" ] }, { "cell_type": "code", "execution_count": null, "id": "6db786f8-e5c4-42a9-9837-e41027b9ad4d", "metadata": { "cellView": "form", "execution": {}, "tags": [ "hide-input" ] }, "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": "markdown", "metadata": {}, "source": [ "## Helper functions\n" ] }, { "cell_type": "code", "execution_count": null, "id": "e11e3bbb-ce8f-4404-8d04-b6f86d4a9ea9", "metadata": { "cellView": "form", "execution": {}, "tags": [ "hide-input" ] }, "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": "markdown", "metadata": {}, "source": [ "## Video 1: Orienting inside a 'Climate Solution' Simulator\n" ] }, { "cell_type": "code", "execution_count": null, "id": "ea9d553f-c3eb-4723-a922-e81f97e1e3ba", "metadata": { "cellView": "form", "execution": {}, "tags": [ "remove-input" ] }, "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": {}, "tags": [ "remove-input" ] }, "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": "markdown", "metadata": {}, "source": [ "## Video 2: Overview of the En-ROADS Climate Solutions Simulator\n" ] }, { "cell_type": "code", "execution_count": null, "id": "9c6b2260-bdb0-4d7b-a07d-41551d5ccf92", "metadata": { "cellView": "form", "execution": {}, "tags": [ "remove-input" ] }, "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": {}, "tags": [ "remove-input" ] }, "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 }