{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# ENV / ATM 415: Climate Laboratory, Spring 2016\n", "\n", "## Assignment 4\n", "\n", "Out: Tuesday March 8, 2016\n", "\n", "Due: Thursday March 24, 2016 at 10:15 am." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Your assignment\n", "\n", "Answer all questions below, using the example code as a guide.\n", "\n", "**Just like last time, you will submit your work as a single notebook file**. Save your notebook as\n", "```\n", "[your last name]_Assignment04.ipynb\n", "```\n", "\n", "Again, try to make sure your notebook **runs from start to finish without error**. Follow the same instructions as in Assignment 3.\n", "\n", "Submit your complete notebook file by email to \n", "_________________________________" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# The usual import statements to get us started\n", "%matplotlib inline\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "import climlab" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 1: computing global averages\n", "\n", "Suppose we have an axis of evenly spaced latitude points. Here for example we create an array of 18 points with latitude every 10 degrees:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "lat = np.arange(-85., 90., 10.)\n", "print lat" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now suppose that we have an array of temperature data on this grid. Each data point represents the **zonal average temperature**, that is, the average temperature across all longitudes at that particular latitude.\n", "\n", "Here we create and plot some \"fake\" temperature data with the same array size as `lat`. The formula used here to create the data is just for illustration and is not important." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "x = np.sin(np.deg2rad(lat))\n", "T = 288. + 10.*x - 15*(3*x**2-1)\n", "print 'The array T is ', T\n", "plt.plot(lat, T)\n", "plt.xlim(-90,90)\n", "plt.xticks([-90,-60,-30,0,30,60,90])\n", "plt.grid()\n", "plt.title('T versus latitude')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**We want to calculate the global average temperature.**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(a) We might naively think that we can just take a **simple average** of the numbers in the array called `T`. Write Python code to take this average in two different ways:\n", "- by writing a `for` loop to step through all the numbers in the array\n", "- using the `np.mean()` shortcut\n", "\n", "Verify that your two different calculations give the same result." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(b) Because `T` represents zonal average temperature, unfortunately **taking a simple average** of the array `T` as you just did **does NOT give a meaningful global average temperature**. Explain why, thinking about the spherical shape of the Earth." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(c) FOR BONUS POINTS: provide a formula that DOES give a meaningful global average temperature, and write Python code to calculate it." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 2: EBM with fixed albedo\n", "\n", "Using `climlab`, set up a 1D energy balance model with annual mean insolation and default parameters (no albedo feedback).\n", "\n", "a) Integrate to equilibrium. Verify that the global mean planetary energy balance is closed.\n", "\n", "b) Repeat part (a) after decreasing $A$ (the constant in the OLR parameterization) by 4 W m$^{-2}$ (a global warming experiment). What is the radiative forcing in this experiment?\n", "\n", "c) Make two nicely labeled graphs, each with 2 curves (including legends): \n", "- one graph showing temperature before and after the global warming\n", "- another showing heat transport before and after.\n", "\n", "d) Did the heat transport change? Why or why not?\n", "\n", "e) Calculate the change $\\Delta T$ in **global mean temperature**.\n", "\n", "f) Based on this temperature change, and refering back to your notes from earlier in the semester, calculate the **feedback** and **gain** for this model. \n", "\n", "g) What parameter do you think you would have to change in the model to get a different feedback? What physical process do you think this might represent?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here is a little bit of code to get you started:" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Create the EBM with all default parameters, including annual mean insolation\n", "model1 = climlab.EBM_annual()\n", "print model1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 3: EBM with interactive ice line\n", "\n", "Repeat Question 1, this time using a **model with an interactive snow/ice line**. Follow this\n", "example code to set up the model with appropriate albedo values:\n", "\n", "(a) - (f): same as Question 1\n", "\n", "(g) Compare to your results from Question 1 and comment on the effects of the interactive ice line on:\n", "- the spatial pattern of warming (i.e. do some latitudes warm more than others?)\n", "- the climate sensitivity (change in global mean temperature)\n", "- the net feedback" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# By providing explicit albedo parameters including ai (the albedo of cold icy regions), \n", "# we get a model with an interactive ice line\n", "ice_model = climlab.EBM_annual(a0=0.3, a2=0.078, ai=0.62, Tf=-10.)\n", "print ice_model" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 4: Snowball Earth in the EBM\n", "\n", "These exercises are largely inspired by Table 3.3 of the Primer. Use our `climlab` version of the diffusive EBM to answer these questions:\n", "\n", "(a) Using the parameter values from Question 3 with interactive ice edge, determine what decrease of the solar constant from its default (present-day) value of $S_0 = 1365.2$ W m$^{-2}$ is required just to glaciate the Earth completely (ice edge at 0ÂșN). \n", "\n", "This will require some trial and error!" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Here is an example of changing the solar constant in an existing model:\n", "print 'The current solar constant is ', ice_model.subprocess.insolation.S0, 'W/m2.'\n", "# Now change it\n", "ice_model.subprocess.insolation.S0 = 1350.\n", "print 'The new solar constant is ', ice_model.subprocess.insolation.S0, 'W/m2.'\n", "\n", "# You can also pass S0 as an input argument when creating a new model:\n", "newmodel = climlab.EBM_annual(S0=1350., a0=0.3, a2=0.078, ai=0.62, Tf=-10.)\n", "print 'The solar constant in newmodel is ', newmodel.subprocess.insolation.S0, 'W/m2.'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "(b) Repeat part (a) but with some different parameter values. Parameters include $A$, $B$, $D$, albedo values, and the ice threshold temperature $T_f$. Each one of these can be specified as input arguments when you create a new model, as illustrated above.\n", "\n", "Provide a very brief justification for your parameter choices (e.g. what are you trying to investigate?). How does the change in parameters affect your answer about the minimum solar constant decrease necessary to freeze over the model Earth? " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 5: De-glaciating the Snowball\n", "\n", "Once the Earth is just fully glaciated, begin to increase the solar constant. Determine how much of an increase in the solar constant is required before the ice retreats from the equator. How do you interpret this value? \n", "\n", "Allow the climate to reach equilibrium after the ice retreats. What does the Earth look like now in your model? Is it much colder, much warmer, or about the same as our present-day climate?\n", "\n", "*For this question you can use whatever parameter values you like -- those from Question 3 or Question 4, or something else. Just make sure that you state clearly what are doing.*" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.11" } }, "nbformat": 4, "nbformat_minor": 0 }