The Landlab Tutorials provide examples of Landlab core concepts and component introductions. Tutorials exist as interactive Jupyter notebooks that contain alternating cells of computer code and text that explain the code. In addition to Landlab Tutorials that exemplify Landlab, notebooks intended to teach and learn surface dynamics are the Landlab Teaching Tutorials.

Launch notebooks online#

Landlab Notebooks can be accessed online with the following link: Binder. Here the notebooks are provided within a binder online environment that includes Landlab.

The welcome page on Binder provides onward links to most of our tutorials. If you’re a newbie you might want to skip directly to a recommended syllabus for learning Landlab here.

Launch notebooks locally#

To run the tutorials locally, you will first need to install landlab on your computer. If you have not already done so, please see the landlab installation guide. Because several of the notebooks depend on packages that cannot be installed using pip, we recommend you use conda to install the tutorial notebook requirements.

Get the notebooks#

If you have the landlab source code, you already have the notebooks (they are in the notebooks/ folder).

If you don’t have a copy of the source code, you can run the notebooks.py script to fetch the set of notebooks that matches your version of landlab. This can be done either by running,

$ curl -L https://raw.githubusercontent.com/landlab/landlab/master/notebooks.py | python -

or by downloading the script and running the following from the terminal,

$ python -m notebooks

Install dependencies#

The dependencies required to run the notebooks are listed in the file, requirements-notebooks.txt and can be installed with conda,

$ conda install --file=requirements-notebooks.txt

Run the tutorials#

It’s now time to run the tutorials. Opening the welcome page is a good place to start but you can also open individual notebooks as well.

$ jupyter notebook notebooks/welcome.ipynb

Contributing new or modified tutorials#

If you write a Landlab Tutorial or Gist, please contribute it via a pull request to the master branch of the Landlab repository. See this page about contributing to Landlab, and reach out for help when needed.

Landlab clinics and workshops#

For more examples and tutorials, see also our Clinics & workshops page.