The Landlab tutorials¶
Two papers have been written describing Landlab, both are open access:
Note
We highly recommend reading both before starting on the steps below.
1. Format and Outline¶
You will alternate between reading documentation on the User Guide finding information in the Reference Manual, and working through the tutorials.
The tutorials are presented as Jupyter notebooks, which contain a mixture of text,
images, and code blocks. When you look at the tutorials, don’t just read them. Start
by clearing the results by selecting Kernel
→ Restart & Clear Output
, then go
ahead and try running each code block as you come to it.
1.1 A motivating example¶
1.2 Using the Documentation¶
The Landlab Reference Manual contains documentation for most functions in the Landlab package. It is the comprehensive counterpart to the anecdotal tutorials.
Spend some time clicking around in the User Guide and Reference Manual to get a sense for what is there. Tip: to find a particular command, click on Index and use your browser’s search function to search for a command by name or keyword. For example, look at the
LinearDiffuser
, which you just used in the prior tutorial.
1.3 Introduction to the Landlab Grid and Fields¶
First, lets look at the User Guide page on Landlab grids.
Notebook: Introduction to the model grid object Grid topology; how landlab represents data; connectivity of grid elements.
Notebook: Introduction to Landlab data fields How Landlab stores spatial data on the grid; a little on naming conventions.
Extra credit: Go back to the Hobley et al. 2017 publication and identify the ordering conventions of nodes, links, and other grid elements.
1.4 Working with Digital Elevtion Models (DEMs)¶
Notebook: Reading DEMs into Landlab Getting an ARC ESRI ASCII into Landlab; getting the boundary conditions set right.
1.5 Plotting¶
Notebook: Introduction to plotting output with Landlab The basics of plotting with Landlab; combining matplotlib and out plots; the
imshow_grid
function.
1.6 Boundary conditions¶
Setting boundary conditions on Landlab grids (several tutorials): How Landlab conceptualises boundary conditions; various ways to interact and work with them.
1.7 Introduction to Components¶
Notebook: Introduction to using the Landlab component library The basics of working with and coupling components, using
LinearDiffuser
,FastscapeEroder
, andPrecipitationDistribution
.
1.8 Advanced Grid and Fields: Gradients, Flux-Divergence, Mapping¶
In addition to having lots of important information about adjacency of nodes, links, and other grid elements, the Landlab Grid object has a number of built-in functions for calculating quantities like gradients and flux-divergence, and for mapping quantities from nodes to links and so forth. Work through these tutorials to get a sense of this functionality:
Notebook: Using the gradient and flux-divergence functions Landlab as solving environment for staggered grid finite difference differential approximations; functions available to help you do this.
Notebook: Mapping values from nodes to links Options for getting data on links to nodes, nodes to links, etc.; min, max, and mean; upwinding and downwinding schemes; one-to-one, one-to-many, and many-to-one mappings.