Skip to content

Commit

Permalink
Update English notebook 6
Browse files Browse the repository at this point in the history
+ small grammar fixes to Spanish notebook 6
  • Loading branch information
ehultee committed Nov 18, 2020
1 parent e471cb6 commit 635c14c
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 33 deletions.
14 changes: 7 additions & 7 deletions 6_multiples_glaciares.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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?**"
]
Expand Down Expand Up @@ -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,
Expand All @@ -389,5 +389,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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."
]
},
{
Expand All @@ -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,
Expand All @@ -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."
]
},
{
Expand Down Expand Up @@ -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."
]
},
{
Expand Down Expand Up @@ -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",
Expand All @@ -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)."
]
},
{
Expand All @@ -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",
Expand All @@ -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)"
Expand All @@ -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:"
]
},
{
Expand All @@ -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)"
]
}
],
Expand All @@ -312,7 +372,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.8.3"
},
"toc": {
"base_numbering": 1,
Expand All @@ -329,5 +389,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}

0 comments on commit 635c14c

Please sign in to comment.