|
69 | 69 | "\n", |
70 | 70 | "Both the Lithology and LithoLayers components then know the rock type ID of all the material in the 'block of rock' you have specified. This can be used to continuously know the value of specified rock properties at the topographic surface, even as the rock is eroded, uplifted, or new rock is deposited. \n", |
71 | 71 | "\n", |
72 | | - "In this tutorial we will first make an example to help build intuition and then do two more complex examples. Most of the functionality of Lithology and LithoLayers is shown in this tutorial, but if you want to read the full component documentation for LithoLayers, it can be found [here](https://landlab.readthedocs.io/en/master/landlab.components.lithology.html). Links to both components documentation can be found at the bottom of the tutorial.\n", |
| 72 | + "In this tutorial we will first make an example to help build intuition and then do two more complex examples. Most of the functionality of Lithology and LithoLayers is shown in this tutorial, but if you want to read the full component documentation for LithoLayers, it can be found [here](https://landlab.readthedocs.io/en/release/landlab.components.lithology.html). Links to both components documentation can be found at the bottom of the tutorial.\n", |
73 | 73 | "\n", |
74 | 74 | "First, we create a small RasterModelGrid with topography. " |
75 | 75 | ] |
|
146 | 146 | "source": [ |
147 | 147 | "`'K_sp'` is the property that we want to track through the layered rock, `0`, `1`, `2`, `3` are the rock type IDs, and `0.0003` and `0.0001` are the values for `'K_sp'` for the rock types `0` and `1`. \n", |
148 | 148 | "\n", |
149 | | - "The rock type IDs are unique identifiers for each type of rock. A particular rock type may have many properties (e.g. `'K_sp'`, `'diffusivity'`, and more). You can either specify all the possible rock types and attributes when you instantiate the LithoLayers component, or you can add new ones with the [`lith.add_rock_type`](https://landlab.readthedocs.io/en/master/landlab.components.lithology.html#landlab.components.lithology.lithology.Lithology.add_rock_type) or [`lith.add_property`](https://landlab.readthedocs.io/en/master/landlab.components.lithology.html#landlab.components.lithology.lithology.Lithology.add_property) built in functions.\n", |
| 149 | + "The rock type IDs are unique identifiers for each type of rock. A particular rock type may have many properties (e.g. `'K_sp'`, `'diffusivity'`, and more). You can either specify all the possible rock types and attributes when you instantiate the LithoLayers component, or you can add new ones with the [`lith.add_rock_type`](https://landlab.readthedocs.io/en/release/landlab.components.lithology.html#landlab.components.lithology.lithology.Lithology.add_rock_type) or [`lith.add_property`](https://landlab.readthedocs.io/en/release/landlab.components.lithology.html#landlab.components.lithology.lithology.Lithology.add_property) built in functions.\n", |
150 | 150 | "\n", |
151 | 151 | "Finally, we define our function. Here we will use a [lambda expression](https://docs.python.org/3/tutorial/controlflow.html#lambda-expressions) to create a small anonymous function. In this case we define a function of `x` and `y` that returns the value `x + (2. * y)`. The LithoLayers component will check that this function is a function of two variables and that when passed two arrays of size number-of-nodes it returns an array of size number-of-nodes.\n", |
152 | 152 | "\n", |
|
648 | 648 | "source": [ |
649 | 649 | "Next, we run the model. In each time step we first run the FlowAccumulator to direct flow and accumulatate drainage area. Then the FastscapeEroder erodes the topography based on the stream power equation using the erodability value in the field`'K_sp'`. We create an uplift field that uplifts only the model grid's core nodes. After uplifting these core nodes, we update LithoLayers. Importantly, we must tell the LithoLayers how it has been advected upward by uplift using the `dz_advection` keyword argument. \n", |
650 | 650 | "\n", |
651 | | - "As we discussed in the introductory example, the built in function [`lith.run_one_step`](https://landlab.readthedocs.io/en/master/landlab.components.litholayers.html#landlab.components.lithology.litholayers.LithoLayers.run_one_step) has an optional keyword argument `rock_id` to use when some material may be deposited. The LithoLayers component needs to know what type of rock exists everywhere and it will raise an error if material is deposited **and** no rock type is specified. However, here we are using the FastscapeEroder which is fully detachment limited, and thus we know that no material will be deposited at any time. Thus we can ignore this keyword argument. Later in the tutorial we will use the LinearDiffuser which can deposit sediment and we will need to set this keyword argument correctly. \n", |
| 651 | + "As we discussed in the introductory example, the built in function [`lith.run_one_step`](https://landlab.readthedocs.io/en/release/landlab.components.litholayers.html#landlab.components.lithology.litholayers.LithoLayers.run_one_step) has an optional keyword argument `rock_id` to use when some material may be deposited. The LithoLayers component needs to know what type of rock exists everywhere and it will raise an error if material is deposited **and** no rock type is specified. However, here we are using the FastscapeEroder which is fully detachment limited, and thus we know that no material will be deposited at any time. Thus we can ignore this keyword argument. Later in the tutorial we will use the LinearDiffuser which can deposit sediment and we will need to set this keyword argument correctly. \n", |
652 | 652 | "\n", |
653 | 653 | "Within each timestep we save information about the model for plotting. " |
654 | 654 | ] |
|
747 | 747 | "\n", |
748 | 748 | "Here we will explore making inverted topography by eroding Lithology with constant properties for half of the model evaluation time, and then filling Lithology in with resistant material only where the drainage area is large. This is meant as a simple example of filling in valleys with volcanic material. \n", |
749 | 749 | "\n", |
750 | | - "All of the details of the options for creating a [Lithology](https://landlab.readthedocs.io/en/master/landlab.components.lithology.html) can be found here. \n", |
| 750 | + "All of the details of the options for creating a [Lithology](https://landlab.readthedocs.io/en/release/landlab.components.lithology.html) can be found here. \n", |
751 | 751 | "\n", |
752 | 752 | "In the next code block we make a new model and run it. There are a few important differences between this next example and the one we just worked through in Part 2. \n", |
753 | 753 | "\n", |
|
974 | 974 | "\n", |
975 | 975 | "Nice work getting to the end of the tutorial!\n", |
976 | 976 | "\n", |
977 | | - "For more detailed information about the [Lithology](https://landlab.readthedocs.io/en/master/landlab.components.lithology.html) and [LithoLayers](https://landlab.readthedocs.io/en/master/landlab.components.litholayers.html) objects, check out their detailed documentation. \n", |
| 977 | + "For more detailed information about the [Lithology](https://landlab.readthedocs.io/en/release/landlab.components.lithology.html) and [LithoLayers](https://landlab.readthedocs.io/en/release/landlab.components.litholayers.html) objects, check out their detailed documentation. \n", |
978 | 978 | "\n", |
979 | 979 | "# **Click [here](https://github.com/landlab/landlab/wiki/Tutorials) for more Landlab tutorials**" |
980 | 980 | ] |
|
0 commit comments