diff --git a/lessons/landlab/landlab/00_welcome.ipynb b/lessons/landlab/landlab/00_welcome.ipynb index 2b0ffdf..59a886f 100644 --- a/lessons/landlab/landlab/00_welcome.ipynb +++ b/lessons/landlab/landlab/00_welcome.ipynb @@ -16,11 +16,11 @@ "Landlab is an open-source Python-language package for numerical modeling of Earth surface dynamics.\n", "It contains:\n", "\n", - "* A gridding engine which represents the model domain. Regular and irregular grids are supported.\n", - "* A library of process components, each of which represents a physical process (e.g., generation\n", + "* A **gridding engine** that represents the model domain. Regular and irregular grids are supported.\n", + "* A **library of process components**, each of which represents a physical process (e.g., generation\n", " of rain, erosion by flowing water). These components have a common interface and can be combined\n", " based on a user's needs.\n", - "* Utilities that support general numerical methods, file input/output, and visualization.\n" + "* Utilities that support general **numerical methods**, file **input/output**, and **visualization**.\n" ] }, { @@ -42,7 +42,7 @@ " * Grid elements: *cells*\n", " \n", "* [Numerics](04-numerics.ipynb)\n", - " * Calculations on a grid elements\n", + " * Calculations on grid elements\n", " * Example: Fault scarp\n", "\n", "* [Components](05-components.ipynb)\n", @@ -54,10 +54,10 @@ "* [HyLands demo](bedrock_landslides_on_dems.ipynb)\n", "* [Overland flow](overland_flow.ipynb)\n", " * This notebook illustrates running the deAlmeida overland flow component in an extremely\n", - " simple-minded way on a real topography, then shows it creating a flood sequence along\n", + " simple-minded way on real topography, it then shows how to create a flood sequence along\n", " an inclined surface with an oscillating water surface at one end.\n", "\n", - "**For more Landlab tutorials, click here:** https://landlab.readthedocs.io/en/latest/user_guide/tutorials.html\n" + "For more Landlab tutorials, see the [Tutorial Gallery](https://landlab.csdms.io/generated/tutorials)\n" ] }, { @@ -67,12 +67,20 @@ "## Links\n", "\n", "* Reference\n", - " * [Documentation](https://landlab.readthedocs.io)\n", + " * [Documentation](https://landlab.csdms.io)\n", + " * [Tutorial Gallery](https://landlab.csdms.io/generated/tutorials)\n", " * [Source code](https://github.com/landlab/landlab)\n", "* Ask for help\n", " * [Issues on GitHub](https://github.com/csdms/landlab/issues)\n", " * [CSDMS Help Desk](https://csdms.github.io/help-desk)" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "👉 [Introduction to grids](01-intro.ipynb)" + ] } ], "metadata": { diff --git a/lessons/landlab/landlab/01-intro.a.ipynb b/lessons/landlab/landlab/01-intro.a.ipynb index 3028fae..ac8e6b5 100644 --- a/lessons/landlab/landlab/01-intro.a.ipynb +++ b/lessons/landlab/landlab/01-intro.a.ipynb @@ -63,7 +63,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\n", "## What you need to know about Landlab grids\n", "\n", "Landlab model grids are 2D data structures that represent the model domain. A few things to know about grid management:\n", @@ -80,9 +79,14 @@ "\n", "\n", "\n", - "**Figure** Geometry and topology of grid elements on various Landlab grids ([Hobley et al. 2017](https://esurf.copernicus.org/articles/5/21/2017/))\n", - "\n", - "-- [Interactive sketchbook](https://landlab.github.io/grid-sketchbook/)" + "**Figure** Geometry and topology of grid elements on various Landlab grids ([Hobley et al. 2017](https://esurf.copernicus.org/articles/5/21/2017/))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 👉 [Interactive sketchbook](https://landlab.github.io/grid-sketchbook/)" ] }, { @@ -113,7 +117,7 @@ "\n", "---\n", "\n", - "**More complete descriptions of these grid types can be found in [Landlab's documentation](https://landlab.readthedocs.io/en/master/user_guide/grid.html).**\n", + "**More complete descriptions of these grid types can be found in [Landlab's documentation](https://landlab.csdms.io/user_guide/reference/grid.html)**\n", "\n", "---" ] @@ -132,7 +136,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "These are all Python classes, and the instances we create of those classes will be our grid objects. For starters, we'll get some basic information on `RasterModelGrid`. Then we'll create an instance of the class `RasterModelGrid` with 3 rows, 4 columns, and 10-unit grid spacing." + "These are all Python classes, and the instances we create of those classes will be our grid objects. For starters, we'll get some basic information on `RasterModelGrid`. Then we'll create an instance of the class `RasterModelGrid` with 4 rows, 5 columns, and 10.0-unit grid spacing in the *x* (column) direction and 5.0 in the *y* (row) direction." ] }, { @@ -150,7 +154,7 @@ "source": [ "#### Nodes\n", "\n", - "*nodes* are simply points that have *x* and *y* coordinates. Different grid types simply lay out\n", + "*nodes* are simply points that have *x* and *y* coordinates. Different grid types lay out\n", "*nodes* in different ways.\n", "\n", "Below we create a `RasterModelGrid` that has four rows and 5 columns of nodes." diff --git a/lessons/landlab/landlab/01-intro.ipynb b/lessons/landlab/landlab/01-intro.ipynb index 65f3af9..dd25a2c 100644 --- a/lessons/landlab/landlab/01-intro.ipynb +++ b/lessons/landlab/landlab/01-intro.ipynb @@ -63,7 +63,6 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "\n", "## What you need to know about Landlab grids\n", "\n", "Landlab model grids are 2D data structures that represent the model domain. A few things to know about grid management:\n", @@ -80,9 +79,14 @@ "\n", "\n", "\n", - "**Figure** Geometry and topology of grid elements on various Landlab grids ([Hobley et al. 2017](https://esurf.copernicus.org/articles/5/21/2017/))\n", - "\n", - "-- [Interactive sketchbook](https://landlab.github.io/grid-sketchbook/)" + "**Figure** Geometry and topology of grid elements on various Landlab grids ([Hobley et al. 2017](https://esurf.copernicus.org/articles/5/21/2017/))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### 👉 [Interactive sketchbook](https://landlab.github.io/grid-sketchbook/)" ] }, { @@ -113,7 +117,7 @@ "\n", "---\n", "\n", - "**More complete descriptions of these grid types can be found in [Landlab's documentation](https://landlab.readthedocs.io/en/master/user_guide/grid.html).**\n", + "**More complete descriptions of these grid types can be found in [Landlab's documentation](https://landlab.csdms.io/user_guide/reference/grid.html)**\n", "\n", "---" ] @@ -132,7 +136,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "These are all Python classes, and the instances we create of those classes will be our grid objects. For starters, we'll get some basic information on `RasterModelGrid`. Then we'll create an instance of the class `RasterModelGrid` with 3 rows, 4 columns, and 10-unit grid spacing." + "These are all Python classes, and the instances we create of those classes will be our grid objects. For starters, we'll get some basic information on `RasterModelGrid`. Then we'll create an instance of the class `RasterModelGrid` with 4 rows, 5 columns, and 10.0-unit grid spacing in the *x* (column) direction and 5.0 in the *y* (row) direction." ] }, { @@ -150,7 +154,7 @@ "source": [ "#### Nodes\n", "\n", - "*nodes* are simply points that have *x* and *y* coordinates. Different grid types simply lay out\n", + "*nodes* are simply points that have *x* and *y* coordinates. Different grid types lay out\n", "*nodes* in different ways.\n", "\n", "Below we create a `RasterModelGrid` that has four rows and 5 columns of nodes." diff --git a/lessons/landlab/landlab/02-data.a.ipynb b/lessons/landlab/landlab/02-data.a.ipynb index 167e8ce..bdc4b76 100644 --- a/lessons/landlab/landlab/02-data.a.ipynb +++ b/lessons/landlab/landlab/02-data.a.ipynb @@ -140,9 +140,11 @@ "metadata": {}, "outputs": [], "source": [ - "from landlab.io import read_esri_ascii\n", + "from landlab.io import esri_ascii\n", "\n", - "(grid, z) = read_esri_ascii(\"data/square-test-basin.asc\", name=\"topographic__elevation\")" + "with open(\"data/square-test-basin.asc\") as stream:\n", + " grid = esri_ascii.load(stream, name=\"topographic__elevation\")\n", + "z = grid.at_node[\"topographic__elevation\"]" ] }, { @@ -321,7 +323,7 @@ "metadata": {}, "outputs": [], "source": [ - "?Topography" + "help(Topography)" ] }, { diff --git a/lessons/landlab/landlab/02-data.ipynb b/lessons/landlab/landlab/02-data.ipynb index b40f987..eb292b8 100644 --- a/lessons/landlab/landlab/02-data.ipynb +++ b/lessons/landlab/landlab/02-data.ipynb @@ -144,9 +144,11 @@ "metadata": {}, "outputs": [], "source": [ - "from landlab.io import read_esri_ascii\n", + "from landlab.io import esri_ascii\n", "\n", - "(grid, z) = read_esri_ascii(\"data/square-test-basin.asc\", name=\"topographic__elevation\")" + "with open(\"data/square-test-basin.asc\") as stream:\n", + " grid = esri_ascii.load(stream, name=\"topographic__elevation\")\n", + "z = grid.at_node[\"topographic__elevation\"]" ] }, { @@ -329,7 +331,7 @@ "metadata": {}, "outputs": [], "source": [ - "?Topography" + "help(Topography)" ] }, { diff --git a/lessons/landlab/landlab/04-numerics.a.ipynb b/lessons/landlab/landlab/04-numerics.a.ipynb index 6cd31d9..49b7925 100644 --- a/lessons/landlab/landlab/04-numerics.a.ipynb +++ b/lessons/landlab/landlab/04-numerics.a.ipynb @@ -331,6 +331,13 @@ "\n", "grid.imshow(z)" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "👉 [Components](05-components.ipynb)" + ] } ], "metadata": { diff --git a/lessons/landlab/landlab/04-numerics.ipynb b/lessons/landlab/landlab/04-numerics.ipynb index a0b4295..2e82aef 100644 --- a/lessons/landlab/landlab/04-numerics.ipynb +++ b/lessons/landlab/landlab/04-numerics.ipynb @@ -335,6 +335,13 @@ "```\n", "" ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "👉 [Components](05-components.ipynb)" + ] } ], "metadata": { diff --git a/lessons/landlab/landlab/05-components.a.ipynb b/lessons/landlab/landlab/05-components.a.ipynb index 533210a..102e5de 100644 --- a/lessons/landlab/landlab/05-components.a.ipynb +++ b/lessons/landlab/landlab/05-components.a.ipynb @@ -18,7 +18,8 @@ "Component modeling is a bit like the potluck tradition: one can construct a complete simulation by assembling components to represent the different parts of the system to be modeled. In Landlab, a **component** is a semi-standardized Python *class* that represents a particular process or calculation. Components are not stand-alone programs, but rather are designed to be used within another Python program that creates an integrated model or workflow.\n", "\n", "\n", - "*Figure 1: A potluck meal (\"Eat Alberta Potluck\" from Wikimedia Commons).*\n" + "\n", + "*Figure 1: A potluck meal (\"Eat Alberta Potluck\" from Wikimedia Commons).*" ] }, { @@ -46,6 +47,7 @@ }, "source": [ "\n", + "\n", "*Figure 3: cumulative infiltration water depth during a simulated five-minute heavy rainfall (from Landlab tutorial \"Green-Ampt infiltration and kinematic wave overland flow\")*\n", "\n", "The following code snippets illustrate how the components are imported...\n", diff --git a/lessons/landlab/landlab/05-components.ipynb b/lessons/landlab/landlab/05-components.ipynb index 759bece..900a215 100644 --- a/lessons/landlab/landlab/05-components.ipynb +++ b/lessons/landlab/landlab/05-components.ipynb @@ -18,7 +18,8 @@ "Component modeling is a bit like the potluck tradition: one can construct a complete simulation by assembling components to represent the different parts of the system to be modeled. In Landlab, a **component** is a semi-standardized Python *class* that represents a particular process or calculation. Components are not stand-alone programs, but rather are designed to be used within another Python program that creates an integrated model or workflow.\n", "\n", "\n", - "*Figure 1: A potluck meal (\"Eat Alberta Potluck\" from Wikimedia Commons).*\n" + "\n", + "*Figure 1: A potluck meal (\"Eat Alberta Potluck\" from Wikimedia Commons).*" ] }, { @@ -46,6 +47,7 @@ }, "source": [ "\n", + "\n", "*Figure 3: cumulative infiltration water depth during a simulated five-minute heavy rainfall (from Landlab tutorial \"Green-Ampt infiltration and kinematic wave overland flow\")*\n", "\n", "The following code snippets illustrate how the components are imported...\n",