Skip to content

Commit

Permalink
description about how to find the notebooks (#30)
Browse files Browse the repository at this point in the history
* description how to find the notebooks included

* output deleted

* change of layout for plots in hide_functions, mbg: changes in order of text, ela added to plots

* response time calculation added

* response time function added

* small changes

* learning targets added, reference links added

* style, documentation added

* change in function names

* small changes

* typos, response time in text added

* new logo,newlayout
  • Loading branch information
zschirmeister authored and fmaussion committed Jan 29, 2019
1 parent 8d755e9 commit 9533e49
Show file tree
Hide file tree
Showing 12 changed files with 578 additions and 1,018 deletions.
Binary file modified docs/_static/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 34 additions & 3 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,44 @@
@import url("theme.css");

.wy-side-nav-search {
background-color: #e1a7e0;
background-color: #9b9b9b;
}


.wy-nav-top {
background-color: #9b9b9b;
}

.wy-side-nav-search>div.version {
display: none;
}

.wy-nav-top {
background-color: #e1a7e0;
.wy-nav-side {
color: #cc514c;
}

.wy-menu-vertical a {
display: inline-block;
line-height: 18px;
padding: .4045em 1.618em;
display: block;
position: relative;
font-size: 90%;
color: #f4d34e;
}

.wy-side-nav-search input[type="text"] {
width: 100%;
border-radius: 50px;
padding: 6px 12px;
border-color: #343131;
}

a {
color: #326a86;
cursor: pointer;
}

a:hover {
color: #85a9c1;
}
2 changes: 2 additions & 0 deletions docs/notebooks_flowline_intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This notebook is an introduction to flowline modelling with OGGM. To open the no
.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/OGGM/oggm-edu/master

Then choose the folder experiments. There you find the notebook flowline_model.

In this notebook we will set-up a simple model run and visualize it afterwards. Therefore we will learn how to define an easy glacier bed and a suitable grid. The learner will implement mass balance in the form of equilibrium line altitude (ELA) and see how his glacier develops in length, volume and area over certain years.

*Prerequisites:* If you are new to jupyter-notebook, have a look at this short `introduction
Expand Down
2 changes: 2 additions & 0 deletions docs/notebooks_howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ If you are new to Jupyter Notebooks, we have prepared a tutorial! Open it in you
.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/OGGM/oggm-edu/master?filepath=experiments%2Fgetting_started_with_notebooks.ipynb

Then choose the folder experiments. There the first notebook is getting_started_with_notebooks.

If you are also new to python, be patient! We will provide an introduction to python for OGGM-Edu users here soon.

Once you feel comfortable with Jupyter Notebooks, visit our :ref:`notebooks_list` list!
2 changes: 2 additions & 0 deletions docs/notebooks_ice_flow_parameters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Open this experiment in your browser with the button below:
.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/OGGM/oggm-edu/master

Then choose the folder experiments. There you find the notebook ice_flow_parameters.

*Prerequisits:* You went through the notebook about `glacier flowline modelling`_, so that you understand the concept of building a simple glacier model with OGGM.

.. _glacier flowline modelling: http://edu.oggm.org/en/latest/notebooks_flowline_intro.html#glacier-flowline-modelling
4 changes: 3 additions & 1 deletion docs/notebooks_mass_balance_gradient.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
Mass balance gradient
=====================

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 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:

.. image:: https://mybinder.org/badge_logo.svg
:target: https://mybinder.org/v2/gh/OGGM/oggm-edu/master

Then choose the folder experiments. There you find the notebook mass_balance_gradients.

*Prerequisits:* You went through the notebook about `glacier flowline modelling`_, so that you understand the concept of building a simple glacier model with OGGM.

.. _glacier flowline modelling: http://edu.oggm.org/en/latest/notebooks_flowline_intro.html#glacier-flowline-modelling
3 changes: 2 additions & 1 deletion docs/notebooks_surging_glaciers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
Surging glaciers
================

This notebook treats surging glaciers. You will learn how to implement surging in a glacier model and and execute a few experiments with it. To open the notebook in your browser use the button below:
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
:target: https://mybinder.org/v2/gh/OGGM/oggm-edu/master

Then choose the folder experiments. There you find the notebook surging_experiment.

*Prerequisites:*

Expand Down
41 changes: 26 additions & 15 deletions experiments/flowline_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"In this notebook we are going to explore the basic functionalities of OGGM flowline model(s). For this purpose we are going to use simple, \"idealized\" glaciers, run with simple linear mass-balance profiles. "
"In this notebook we are going to explore the basic functionalities of OGGM flowline model(s). For this purpose we are going to use simple and \"idealized\" glaciers models and compute them with simple linear mass balance profiles. "
]
},
{
Expand All @@ -42,7 +42,8 @@
"from oggm.core.massbalance import LinearMassBalance\n",
"from oggm.core.flowline import FluxBasedModel, RectangularBedFlowline, TrapezoidalBedFlowline, ParabolicBedFlowline\n",
"# There are several solvers in OGGM core. We use the default one for this experiment\n",
"FlowlineModel = FluxBasedModel\n",
"from functools import partial\n",
"FlowlineModel = partial(FluxBasedModel, min_dt=0, cfl_number=0.01)\n",
"\n",
"\n",
"import hide_functions as hf"
Expand All @@ -59,7 +60,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Set-up a simple run with a constant linear bed. We will first define the bed:"
"First we set-up a simple run with a constant linear bedrock:"
]
},
{
Expand All @@ -75,7 +76,7 @@
"metadata": {},
"outputs": [],
"source": [
"# This is the bed rock, linearily decreasing from 3400 m altitude to 1400 m, in 200 steps\n",
"# This is the bedrock, linearily decreasing from 3400 m altitude to 1400 m, in 200 steps\n",
"nx = 200\n",
"bed_h = np.linspace(3400, 1400, nx)\n",
"# At the beginning, there is no glacier so our glacier surface is at the bed altitude\n",
Expand Down Expand Up @@ -145,7 +146,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Then we will need a mass balance model. In our case this will be a simple linear mass-balance, defined by the equilibrium line altitude (ELA) and an altitude gradient (in [mm m$^{-1}$]):"
"Then we will need a mass balance model. In our case this will be a simple linear mass balance, defined by the equilibrium line altitude (ELA) and an altitude gradient (in [mm m$^{-1}$]):"
]
},
{
Expand All @@ -162,7 +163,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The mass-balance model gives you the mass-balance for any altitude you want, in units [m s$^{-1}$]. Let us compute the *annual* mass-balance along the glacier profile:"
"The mass balance model gives you the mass balance for any altitude you want, in units [m s$^{-1}$]. Let us compute the *annual* mass balance along the glacier profile:"
]
},
{
Expand All @@ -181,11 +182,11 @@
"outputs": [],
"source": [
"# Plot it\n",
"plt.plot(annual_mb, bed_h, color='C2', label='Mass-balance')\n",
"plt.xlabel('Annual mass-balance (m yr-1)')\n",
"plt.plot(annual_mb, bed_h, color='C2', label='Mass balance')\n",
"plt.xlabel('Annual mass balance (m yr-1)')\n",
"plt.ylabel('Altitude (m)')\n",
"plt.legend(loc='best')\n",
"# Display equilibrium line altitude, where annual mass-balance = 0\n",
"# Display equilibrium line altitude, where annual mass balance = 0\n",
"plt.axvline(x=0, color='k', linestyle='--', linewidth=0.8)\n",
"plt.axhline(y=mb_model.ela_h, color='k', linestyle='--', linewidth=0.8);"
]
Expand All @@ -210,7 +211,7 @@
"metadata": {},
"outputs": [],
"source": [
"# The model requires the initial glacier bed, a mass-balance model, and an initial time (the year y0)\n",
"# The model requires the initial glacier bed, a mass balance model, and an initial time (the year y0)\n",
"model = FlowlineModel(init_flowline, mb_model=mb_model, y0=0.)"
]
},
Expand All @@ -224,10 +225,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"hf.glacier(runtime=1, x=distance_along_glacier, bed=bed_h, model=model, mb_model=mb_model, init_flowline=init_flowline)"
"runtime = 1\n",
"model.run_until(runtime)\n",
"hf.glacier_plot(x=distance_along_glacier, bed=bed_h, model=model, mb_model=mb_model, init_flowline=init_flowline)"
]
},
{
Expand Down Expand Up @@ -259,10 +264,14 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"hf.glacier(runtime=150, x=distance_along_glacier, bed=bed_h, model=model, mb_model=mb_model, init_flowline=init_flowline)"
"runtime = 150\n",
"model.run_until(runtime)\n",
"hf.glacier_plot(x=distance_along_glacier, bed=bed_h, model=model, mb_model=mb_model, init_flowline=init_flowline)"
]
},
{
Expand Down Expand Up @@ -318,7 +327,9 @@
"metadata": {},
"outputs": [],
"source": [
"hf.glacier(runtime=500, x=distance_along_glacier, bed=bed_h, model=model, mb_model=mb_model, init_flowline=init_flowline)"
"runtime = 500\n",
"model.run_until(runtime)\n",
"hf.glacier_plot(x=distance_along_glacier, bed=bed_h, model=model, mb_model=mb_model, init_flowline=init_flowline)"
]
},
{
Expand Down

0 comments on commit 9533e49

Please sign in to comment.