Skip to content

Commit

Permalink
Layout and change of function response time (#35)
Browse files Browse the repository at this point in the history
* explorer figure is now link to explorer app

* in nbs's: Whats next links added

* figure and caption added

* typo

* while-loops in response-time function implemented

* revise of response-time part (typos)

* new plots that show development of length and volume over time

* typos corrected

* name of figures changed

* small changes
  • Loading branch information
zschirmeister authored and fmaussion committed Feb 25, 2019
1 parent 28b4b89 commit c2322eb
Show file tree
Hide file tree
Showing 16 changed files with 242 additions and 89 deletions.
Binary file added docs/_static/intro_fig_MBG.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/intro_fig_flowline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/intro_fig_iceflow_parameters.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/intro_fig_surging_glaciers.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/explorer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ World Glaciers Explorer

.. figure:: _static/explorer.png
:width: 100%
:target: https://dash.klima.uni-bremen.de/bokeh/app

The world glacier explorer is an interactive application allowing to explore
the location of the glaciers and their climate.
Expand Down
4 changes: 4 additions & 0 deletions docs/notebooks_flowline_intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Glacier flowline modelling
==========================

.. figure:: _static/intro_fig_flowline.png

Figure: Geometry of a glacier model after 500 yeras, that moves only by deformation processes.

This notebook is an introduction to flowline modelling with OGGM. To open the notebook in your browser use the button below:

.. image:: https://mybinder.org/badge_logo.svg
Expand Down
5 changes: 5 additions & 0 deletions docs/notebooks_ice_flow_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Ice flow parameters
===================

.. figure:: _static/intro_fig_iceflow_parameters.png
:width: 70%

Figure: Geometry of glacier models after 1500 years. Blue graph: glacier moves by deformation, orange graph: glacier that slides also.

In this notebook we will have a closer look at the parameters that describe ice flow: Glen's creep parameter and the sliding parameter. We will implement them in our model and see their influence on glacier flow.

Open this experiment in your browser with the button below:
Expand Down
4 changes: 4 additions & 0 deletions docs/notebooks_mass_balance_gradient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Mass balance gradient
=====================

.. figure:: _static/intro_fig_MBG.png

Left figure: Behaviour of different mass balance gradients. Right figure: Geometry of glaciers with different mass balance gradients after 300 years.

In this notebook you will run experiments with a focus on the mass balance gradient. You will see how different mass balance gradients influence the growth of a glacier. Therefore, we calculate our glacier models until they reach an equilibrium state and compare length, area and volume. In addition, we will calculate the volume response times of the glacier models to small climatic changes.

Open this experiment in your browser with the button below:
Expand Down
4 changes: 4 additions & 0 deletions docs/notebooks_surging_glaciers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Surging glaciers
================

.. figure:: _static/intro_fig_surging_glaciers.png

Figure: Development of two surging glaciers. Upper graph: length, lower graph: volume.

This notebook treats surging glaciers. You will learn how to implement surging in a glacier model and execute a few experiments with it. To open the notebook in your browser use the button below:

.. image:: https://mybinder.org/badge_logo.svg
Expand Down
10 changes: 9 additions & 1 deletion notebooks/oggm-edu/flowline_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,14 @@
"ax2.set_xlabel('Years')\n",
"ax2.set_ylabel('Volume (km3)');"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## What's next?\n",
"[Back to table of contents](welcome.ipynb) or [notebook: Influence of ice flow parameters on glacier size](ice_flow_parameters.ipynb)"
]
}
],
"metadata": {
Expand All @@ -547,7 +555,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.6.6"
},
"toc": {
"base_numbering": 1,
Expand Down
2 changes: 1 addition & 1 deletion notebooks/oggm-edu/getting_started_with_notebooks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.6.6"
},
"toc": {
"base_numbering": 1,
Expand Down
14 changes: 11 additions & 3 deletions notebooks/oggm-edu/ice_flow_parameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Influence of ice flow parameters of glacier size"
"# Influence of ice flow parameters on glacier size"
]
},
{
Expand Down Expand Up @@ -293,7 +293,7 @@
"source": [
"# Plot final result\n",
"plt.figure(figsize=(9,6))\n",
"plt.plot(distance_along_glacier, simple_glacier_h, label='Default')\n",
"plt.plot(distance_along_glacier, simple_glacier_h, label='Default: Deforming glacier')\n",
"plt.plot(distance_along_glacier, sliding_glacier_h, label='Sliding glacier')\n",
"# Add the bedrock:\n",
"plt.plot(distance_along_glacier, init_flowline.bed_h, color='k', label='Bedrock', linestyle=':')\n",
Expand Down Expand Up @@ -323,6 +323,14 @@
"\n",
"² Oerlemans, J. (2001). *Glaciers and climate change.* CRC Press. (p. 59)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## What's next?\n",
"[Back to table of contents](welcome.ipynb) or [notebook: Glacier surging experiments](surging_experiment.ipynb)"
]
}
],
"metadata": {
Expand All @@ -342,7 +350,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.6.6"
},
"toc": {
"base_numbering": 1,
Expand Down
84 changes: 61 additions & 23 deletions notebooks/oggm-edu/mass_balance_gradients.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"models = []\n",
"# Colors for the graphs\n",
"colors = ['C1', 'C3', 'C5'] \n",
"# equilirbium line altitude (ELA)\n",
"# equilibrium line altitude (ELA)\n",
"ELA = 3000\n",
"\n",
"for k, gradient in enumerate(grad):\n",
Expand All @@ -143,7 +143,7 @@
" mb_models.append(a)\n",
" # Calculation of the annual mass balance along the glacier profile\n",
" annual_mb.append(a.get_annual_mb(surface_h) * cfg.SEC_IN_YEAR)\n",
" # The models require the initial glacier bed, a mass-balance model, and an initial time (the year y0)\n",
" # The models require the initial glacier bed, a mass balance model, and an initial time (the year y0)\n",
" models.append(FlowlineModel(init_flowline, mb_model=a, y0=0.))\n",
" # First, look at the state of the glacier models after the chosen amount of years\n",
" models[k].run_until(years)"
Expand All @@ -161,11 +161,11 @@
"plt.subplot(121)\n",
"# Annual mass balance\n",
"for k, ann_mb in enumerate(annual_mb):\n",
" plt.plot(ann_mb, bed_h, color=colors[k], label='Mass-balance, grad='+ str(grad[k]))\n",
" plt.plot(ann_mb, bed_h, color=colors[k], label='Mass balance, grad='+ str(grad[k]))\n",
"# Add ELA, where mass balance = 0:\n",
"plt.axhline(y=ELA, color='k', linestyle='--', linewidth=0.8, label='equilibrium line altitude')\n",
"plt.axhline(y=ELA, color='k', linestyle='--', linewidth=0.8, label='Equilibrium line altitude')\n",
"plt.axvline(x=0, color='k', linestyle='--', linewidth=0.8)\n",
"plt.xlabel('Annual mass-balance (m yr-1)')\n",
"plt.xlabel('Annual mass balance (m yr-1)')\n",
"plt.ylabel('Altitude (m)')\n",
"plt.legend(loc='best');\n",
"\n",
Expand All @@ -176,7 +176,7 @@
"for k, model in enumerate(models):\n",
" plt.plot(distance_along_glacier, model.fls[-1].surface_h, label='Glacier after {} years, '.format(model.yr) + 'grad=' + str(grad[k]), color=colors[k])\n",
"# Add ELA:\n",
"plt.axhline(y=ELA, color='k', linestyle='--', linewidth=0.8, label='equilibrium line altitude')\n",
"plt.axhline(y=ELA, color='k', linestyle='--', linewidth=0.8, label='Equilibrium line altitude')\n",
"# Add the bedrock:\n",
"edu.plot_xz_bed(distance_along_glacier, bed_h)"
]
Expand Down Expand Up @@ -216,9 +216,6 @@
"plt.figure(figsize=[9,6])\n",
"# Plot the initial conditions first:\n",
"plt.plot(distance_along_glacier, init_flowline.surface_h, label='Initial glacier')\n",
"# model with gradients smaller 1 will have problems to find the equilibrium because the function searches only \n",
"# 1000 years ahead and the glacier needs more time to reach the equilibrium state:\n",
"models[0].run_until(2000)\n",
"\n",
"for k, model in enumerate(models):\n",
" # Run the different glacier models until they reach an equilibrium state\n",
Expand Down Expand Up @@ -316,12 +313,10 @@
" mb_models.append(a)\n",
" # Calculation of the annual mass balance along the glacier profile\n",
" annual_mb.append(a.get_annual_mb(surface_h) * cfg.SEC_IN_YEAR)\n",
" # The models require the initial glacier bed, a mass-balance model, and an initial time (the year y0)\n",
" # The models require the initial glacier bed, a mass balance model, and an initial time (the year y0)\n",
" models.append(FlowlineModel(init_flowline, mb_model=a, y0=0.))\n",
" # First, look at the state of the glacier models after 300 years\n",
" models[k].run_until(300)\n",
"for model in models:\n",
" model.run_until_equilibrium(rate=0.006)"
" models[k].run_until_equilibrium(rate=0.006)"
]
},
{
Expand Down Expand Up @@ -371,6 +366,39 @@
"We will now compare the response times of glaciers with different MBGs. Let's simulate a climate change by changing the equilibrium line altitude for the three glacier models calculated before:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Initialization of the models used before:\n",
"grad = [0.3, 4, 15]\n",
"mb_models = []\n",
"annual_mb = []\n",
"# here the \"final\" models will be saved\n",
"models = []\n",
"# Colors for the graphs\n",
"colors = ['C1', 'C3', 'C5'] \n",
"# equilibrium line altitude (ELA)\n",
"ELA = 3000\n",
"for k, gradient in enumerate(grad):\n",
" # Calculation of the mass balance models for each gradient \n",
" a = LinearMassBalance(ELA, grad=gradient)\n",
" mb_models.append(a)\n",
" # The models require the initial glacier bed, a mass balance model, and an initial time (the year y0)\n",
" models.append(FlowlineModel(init_flowline, mb_model=a, y0=0.))\n",
" # First, look at the state of the glacier models after the chosen amount of years\n",
" models[k].run_until_equilibrium(rate=0.006)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Equilibrium line altitude for the \"new climate\":"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -434,7 +462,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"# change Ela\n",
Expand All @@ -460,25 +490,25 @@
"plt.subplot(1,2,1)\n",
"\n",
"# Get the modelled flowline (model.fls[-1]) and plot its new surface\n",
"plt.plot(distance_along_glacier, models[1].fls[-1].surface_h, label='Initial glacier after {} years in prior equilibrium'.format(models[1].yr), color='C2')\n",
"plt.plot(distance_along_glacier, model1_eq.fls[-1].surface_h, label='Glacier after {} years in new equilibrium state'.format(model1_eq.yr), color='C9')\n",
"plt.plot(distance_along_glacier, models[1].fls[-1].surface_h, label='Initial glacier after {} years in prior equilibrium'.format(models[1].yr), color='C9')\n",
"plt.plot(distance_along_glacier, model2_eq.fls[-1].surface_h, label='Glacier after {} years in new equilibrium state'.format(model2_eq.yr), color='C3')\n",
"\n",
"# Plot the equilibrium line altitudes\n",
"plt.axhline(mb_models[1].ela_h, linestyle='--', color='C1', linewidth=0.8, label='ELA initial glacier')\n",
"plt.axhline(mb_model2.ela_h, linestyle='--', color='C9', linewidth=0.8, label='Changed ELA')\n",
"plt.axhline(mb_models[1].ela_h, linestyle='--', color='C9', linewidth=0.8, label='ELA initial glacier')\n",
"plt.axhline(mb_model2.ela_h, linestyle='--', color='C3', linewidth=0.8, label='Changed ELA')\n",
"plt.title('Grad={}'.format(mb_model2.grad))\n",
"# Add the bedrock and axes lables:\n",
"edu.plot_xz_bed(x=distance_along_glacier, bed = bed_h)\n",
"\n",
"plt.subplot(1,2,2)\n",
"\n",
"# Get the modelled flowline (model.fls[-1]) and plot its new surface\n",
"plt.plot(distance_along_glacier, models[2].fls[-1].surface_h, label='Initial glacier after {} years in prior equilibrium'.format(models[2].yr), color='C3')\n",
"plt.plot(distance_along_glacier, model1_eq.fls[-1].surface_h, label='Glacier after {} years in new equilibrium state'.format(model1_eq.yr), color='C9')\n",
"plt.plot(distance_along_glacier, models[2].fls[-1].surface_h, label='Initial glacier after {} years in prior equilibrium'.format(models[2].yr), color='C9')\n",
"plt.plot(distance_along_glacier, model3_eq.fls[-1].surface_h, label='Glacier after {} years in new equilibrium state'.format(model3_eq.yr), color='C5')\n",
"\n",
"# Plot the equilibrium line altitudes\n",
"plt.axhline(mb_models[2].ela_h, linestyle='--', color='C1', linewidth=0.8, label='ELA initial glacier')\n",
"plt.axhline(mb_model3.ela_h, linestyle='--', color='C9', linewidth=0.8, label='Changed ELA')\n",
"plt.axhline(mb_models[2].ela_h, linestyle='--', color='C9', linewidth=0.8, label='ELA initial glacier')\n",
"plt.axhline(mb_model3.ela_h, linestyle='--', color='C5', linewidth=0.8, label='Changed ELA')\n",
"plt.title('Grad={}'.format(mb_model3.grad))\n",
"\n",
"# Add the bedrock and axes lables:\n",
Expand Down Expand Up @@ -512,6 +542,14 @@
"\n",
"⁷ Cuffey, K.M. & Paterson, W.S.B. *The Physics of Glaciers, 4th edition*, 704 (Academic Press, 2010).\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## What's next?\n",
"[Back to table of contents](welcome.ipynb)"
]
}
],
"metadata": {
Expand All @@ -531,7 +569,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.6.6"
},
"toc": {
"base_numbering": 1,
Expand Down

0 comments on commit c2322eb

Please sign in to comment.