From 635c14c93111b284ba125494da82081011c19a7d Mon Sep 17 00:00:00 2001 From: "Lizz Ultee [air]" Date: Tue, 17 Nov 2020 23:43:16 -0500 Subject: [PATCH] Update English notebook 6 + small grammar fixes to Spanish notebook 6 --- 6_multiples_glaciares.ipynb | 14 +-- ...ciares.ipynb => 6_multiple_glaciers.ipynb} | 112 ++++++++++++++---- 2 files changed, 93 insertions(+), 33 deletions(-) rename English/{6_multiples_glaciares.ipynb => 6_multiple_glaciers.ipynb} (93%) diff --git a/6_multiples_glaciares.ipynb b/6_multiples_glaciares.ipynb index 6e187eb..2902366 100644 --- a/6_multiples_glaciares.ipynb +++ b/6_multiples_glaciares.ipynb @@ -306,7 +306,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Pruebe diferentes configuraciones de la cuenca y compare sus resultados.\n", + "Prueba diferentes configuraciones de la cuenca y compare tus resultados.\n", "\n", "**¿Qué características de la cuenca conducen a la mayor pérdida de volumen con este cambio de clima?**" ] @@ -358,21 +358,21 @@ "metadata": { "hide_input": false, "kernelspec": { - "display_name": "Python 2", + "display_name": "Python 3", "language": "python", - "name": "python2" + "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 2 + "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.17" + "pygments_lexer": "ipython3", + "version": "3.8.3" }, "toc": { "base_numbering": 1, @@ -389,5 +389,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/English/6_multiples_glaciares.ipynb b/English/6_multiple_glaciers.ipynb similarity index 93% rename from English/6_multiples_glaciares.ipynb rename to English/6_multiple_glaciers.ipynb index 6085a0f..6f53f4c 100644 --- a/English/6_multiples_glaciares.ipynb +++ b/English/6_multiple_glaciers.ipynb @@ -18,9 +18,13 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We've looked at how changes in slope or temperature can affect a glacier. In many places, there is not just one glacier, but many. Suppose we have a river that gets water from 3 different glaciers. How can we use our model to learn about changes on *all* of those glaciers?\n", + "We have seen how changes in slope or temperature can affect a glacier. In many places, there is not just one glacier, but many.\n", "\n", - "First, we import our modules as usual and set up what will be the same throughout our basin." + "![colorado-basin](http://glaciers.us/sites/default/files/states/colorado/iceage-dwg.jpg \"Glaciers of Colorado's Rocky Mountain National Park, artist's rendering\")\n", + "\n", + "Suppose we have a river that gets water from 3 different glaciers. How can we use our model to find out the changes in *all* of those glaciers?\n", + "\n", + "First, we import our modules as usual and configure what will be the same throughout our basin." ] }, { @@ -85,7 +89,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "(Set up 3 glaciers with explicit access to parameters for students to manipulate)" + "We will make a set of 3 glaciers, each with a different slope and a different accumulation-zone width." ] }, { @@ -103,6 +107,13 @@ "upper_widths = [300, 400, 300]" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We ask for a summary of the characteristics of the basin." + ] + }, { "cell_type": "code", "execution_count": null, @@ -128,7 +139,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "(run to equilibrium to set up our glaciated basin)" + "First, we simulate the growth of the glaciers at equilibrium." ] }, { @@ -164,7 +175,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Let's see what our three glaciers look like in equilibrium." + "Let's see what our three glaciers look like at equilibrium." ] }, { @@ -196,8 +207,8 @@ "outputs": [], "source": [ "# report the equilibrium volume of our basin\n", - "glacier_vols = [models[k].volume_km3 for k in range(len(slopes))]\n", - "basin_volume = np.sum(glacier_vols)\n", + "glacier_vols = [models[k].volume_km3 for k in range(len(slopes))] # a list of the volumes of each glacier\n", + "basin_volume = np.sum(glacier_vols) #sum of the list\n", "\n", "for k, v in enumerate(glacier_vols):\n", " print('Equilibrium volume of Glacier {} is {:.3f} km3.'.format(k+1, glacier_vols[k]))\n", @@ -208,21 +219,21 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Q1. What combination of slopes and widths gives you the basin with the highest equilibrium volume of ice?**" + "**What combination of `slopes` and` widths` above gives you the basin with the largest volume of ice at equilibrium?**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "## Basin in a new climate" + "## Our basin in a different climate" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "We will introduce a change in climate like we did in notebook 4, \"Cambio Climatico\" and 5, \"Reaccion Variable\"." + "We are going to introduce a climate change as we did in [notebook 4, \"A changing climate\"](4_a_changing_climate.ipynb), and [notebook 5, \"Differing reactions\"](5_differing_reactions.ipynb)." ] }, { @@ -234,12 +245,13 @@ "# Time\n", "yrs = np.arange(0, 201, 5, dtype=np.float32)\n", "nsteps = len(yrs)\n", + "change_time = 50 #when to apply the step change\n", "\n", "# Output containers\n", - "elas = [np.zeros(nsteps) for i in range(len(slope_tests))]\n", - "lengths = [np.zeros(nsteps) for i in range(len(slope_tests))]\n", - "areas = [np.zeros(nsteps) for i in range(len(slope_tests))]\n", - "volumes = [np.zeros(nsteps) for i in range(len(slope_tests))]\n", + "elas = [np.zeros(nsteps) for i in range(len(slopes))]\n", + "lengths = [np.zeros(nsteps) for i in range(len(slopes))]\n", + "areas = [np.zeros(nsteps) for i in range(len(slopes))]\n", + "volumes = [np.zeros(nsteps) for i in range(len(slopes))]\n", "\n", "# Loop\n", "current_ELA = initial_ELA\n", @@ -249,17 +261,20 @@ " length_arr = lengths[k]\n", " area_arr = areas[k]\n", " volume_arr = volumes[k]\n", - " initial_time = m.yr\n", + " # establish the glacier in equilibrium first\n", + " m_perturb = FlowlineModel(m.fls, mb_model = mb_model, y0=0.)\n", + " m_perturb.run_until_equilibrium(rate=0.006)\n", + " initial_time = m_perturb.yr\n", " for i, yr in enumerate(yrs):\n", - " m.run_until(initial_time + yr)\n", - " if yr >= 50:\n", + " m_perturb.run_until(initial_time + yr)\n", + " if yr >= change_time:\n", " current_ELA = initial_ELA + change\n", - " m.mb_model = LinearMassBalance(current_ELA, grad=4)\n", + " m_perturb.mb_model = LinearMassBalance(current_ELA, grad=4)\n", " ela_arr[i] = current_ELA\n", - " length_arr[i] = m.length_m\n", - " area_arr[i] = m.area_km2\n", - " volume_arr[i] = m.volume_km3\n", - " print(m.yr)\n", + " length_arr[i] = m_perturb.length_m\n", + " area_arr[i] = m_perturb.area_km2\n", + " volume_arr[i] = m_perturb.volume_km3\n", + " print(m_perturb.yr)\n", "\n", "# summing up basin volume\n", "basin_vol_t = np.sum(volumes, axis=0)" @@ -269,7 +284,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "(comparing change--e.g. percentage volume loss, or response time--for basins with different settings)" + "Now, we graph the total change in the volume of ice in the basin:" ] }, { @@ -291,7 +306,52 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Q2. What basin characteristics lose the most volume? The least volume?**" + "Try different basin configurations and compare your results.\n", + "\n", + "**What characteristics of the basin lead to the largest loss of ice volume with this climate change?**" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Advanced activity" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As we learned in Notebooks 4 and 5, several factors influence the _response time_ of each glacier. But to plan our water resources, we would like to know the response time of our entire basin. How would you summarize the response time of the basin that you have simulated?\n", + "\n", + "Hint: You can use the built-in function to calculate the response time for each individual glacier:" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# With the following function you can calculate the response time in years\n", + "# (the reference model has to be in equilibrium state)\n", + "for k,m in enumerate(models):\n", + " response_time, model_eq = edu.response_time_vol(models[0], mb_model)\n", + " print('The response time of glacier {} is {} years.'.format(k, response_time))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Real glaciers at last!" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now that we have learned a lot of theory about glaciers, we are ready to study real glaciers. [Go to notebook 7!](7_simulating_real_glaciers.ipynb)" ] } ], @@ -312,7 +372,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.8.3" }, "toc": { "base_numbering": 1, @@ -329,5 +389,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 }