{ "cells": [ { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "## Global Temperature Predictions\n", "\n", "This section uses global temperature data combined with global $\\text{CO}_2$ concentration and warming data provided by the IPCC to compare a simple model with Global warming estimates laid out in the Special Report on Emission Scenarios(SRES){cite}`SRES`." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "tags": [ "remove-input" ], "pycharm": { "name": "#%%\n" } }, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from dur_utils import colours\n", "from numpy.lib.stride_tricks import sliding_window_view\n", "from scipy.optimize import curve_fit\n", "from scipy import stats\n", "import matplotlib as mpl\n", "mpl.style.use('../matplotlibrc')" ] }, { "cell_type": "markdown", "metadata": { "pycharm": { "name": "#%% md\n" } }, "source": [ "The global Temperature data is taken from [Berkley Earth](http://berkeleyearth.org/data/). The temperature data has missing fields as with the Global $\\text{CO}_2$ data. Further, the date is formatted awkwardly into a fixed width table format with commented-out headers. Finally, the global temperature data is seasonal. Thus some data cleaning and formatting is required.\n", "\n", "When ananlysing the data, a Fourier-based fit could be applied similarly to that performed in the section on Global $\\text{CO}_2$ data. Because this section is not looking for a functional form, an average is more straightforward to implement.\n", "\n", "After cleaning the data of null fields, a moving average can be used to remove the seasonal trends." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "tags": [ "remove-input" ], "pycharm": { "name": "#%%\n" } }, "outputs": [ { "data": { "text/html": [ "
\n", " | Number of Null Values | \n", "
---|---|
year | \n", "0 | \n", "
month | \n", "0 | \n", "
monthly_anomaly | \n", "1 | \n", "
monthly_anomaly_unc | \n", "3 | \n", "
dt | \n", "0 | \n", "