Skip to content

Commit 7201d98

Browse files
committed
preliminary commit incorporating some of Nicole's comments
still under revision
1 parent 614327b commit 7201d98

1 file changed

Lines changed: 147 additions & 10 deletions

File tree

lithology/introduction_to_lithology.ipynb

Lines changed: 147 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,55 @@
5050
"cell_type": "markdown",
5151
"metadata": {},
5252
"source": [
53-
"## Part 1: Eroding layered rock\n",
53+
"## Part 1: Creating layered rock\n",
5454
"\n",
5555
"First we will create an instance of a LithoLayers. Both LithoLayers and Lithology work closely with a landlab ModelGrid and stores information about rock type at each node. \n",
5656
"\n",
5757
"To create LithoLayers you need the following information:\n",
5858
"\n",
59-
"1. A dictionary of rock property attributes. \n",
60-
"2. A model grid that has the field `'topographic__elevation'` already created.\n",
61-
"3. A list of elevations that your layers will go through at specified anchor point (default value for the anchor point is (0, 0). \n",
59+
"1. A model grid that has the field `'topographic__elevation'` already created.\n",
60+
"2. A dictionary of rock property attributes that maps. \n",
61+
"3. A list of elevations, alled `z0` that your layers will go through at specified anchor point (default value for the anchor point is (0, 0). When `z0` is negative.... TODO.\n",
6262
"4. A functional form in two variables (x and y) that defines the shape of your surface. \n",
6363
"\n",
64-
"The use of this function form makes it possible for any function of x and y to be passed to Layered Rock Block.\n",
65-
"In this example the option for an anticline is currently uncommented, though options for steep and shallow dipping layers are also provided. "
64+
"The use of this function form makes it possible for any function of x and y to be passed to LithoLayers.\n",
65+
"In this example the option for an anticline is currently uncommented, though options for steep and shallow dipping layers are also provided. \n",
66+
"\n",
67+
"In this tutorial we will first make an example to help build intuition. If you are interested in reading more... [LithoLayers](http://landlab.readthedocs.io/en/release/landlab.layers.litholayers.html)\n",
68+
"\n",
69+
"First, we create a RasterModelGrid with topography initialized with a small amount of random noise. "
70+
]
71+
},
72+
{
73+
"cell_type": "markdown",
74+
"metadata": {},
75+
"source": [
76+
"Make a very small grid, with a very easy example of layers varying, and illustrate that first so people get their confidence up. I know people can read the docstrings, but I think the point of the notebook is that people should not need to read the docstring with the notebook?"
77+
]
78+
},
79+
{
80+
"cell_type": "code",
81+
"execution_count": null,
82+
"metadata": {
83+
"collapsed": true
84+
},
85+
"outputs": [],
86+
"source": [
87+
"mg = RasterModelGrid((100, 60), 200)\n",
88+
"z = mg.add_zeros('node', 'topographic__elevation') \n",
89+
"random_field = 0.01*np.random.randn(mg.size('node'))\n",
90+
"z += random_field - random_field.min()"
91+
]
92+
},
93+
{
94+
"cell_type": "markdown",
95+
"metadata": {},
96+
"source": [
97+
"Next we.... \n",
98+
"\n",
99+
"Desribe attrs, z0s, bottom layer, and IDS. say what tile is. \n",
100+
"\n",
101+
"Remind people what it means when z0s are negative. "
66102
]
67103
},
68104
{
@@ -76,23 +112,124 @@
76112
"attrs = {'K_sp': {0: 0.0003,\n",
77113
" 1: 0.0001}}\n",
78114
"\n",
115+
"\n",
116+
"z0s = 50 * np.arange(-20, 20)\n",
117+
"\n",
118+
"# we create a bottom layer that is very thick. \n",
119+
"z0s[-1] = z0s[-2] + 10000\n",
120+
"\n",
121+
"\n",
122+
"ids = np.tile([0,1], 20) \n",
123+
"\n",
124+
"\n",
125+
"\n"
126+
]
127+
},
128+
{
129+
"cell_type": "markdown",
130+
"metadata": {},
131+
"source": [
132+
"TODO, describe making functions"
133+
]
134+
},
135+
{
136+
"cell_type": "code",
137+
"execution_count": null,
138+
"metadata": {
139+
"collapsed": true
140+
},
141+
"outputs": [],
142+
"source": [
143+
"func = lambda x, y : ((0.001*x)+(0.003*y))\n",
144+
"\n"
145+
]
146+
},
147+
{
148+
"cell_type": "markdown",
149+
"metadata": {},
150+
"source": [
151+
"Finally we construct our LithoLayers component. Make a plot and talk through it. "
152+
]
153+
},
154+
{
155+
"cell_type": "code",
156+
"execution_count": null,
157+
"metadata": {
158+
"collapsed": true
159+
},
160+
"outputs": [],
161+
"source": []
162+
},
163+
{
164+
"cell_type": "markdown",
165+
"metadata": {},
166+
"source": [
167+
"## Part 2: Creation of a landscape evolution model with LithoLayers\n",
168+
"\n",
169+
"\n",
170+
"Introductory text.\n"
171+
]
172+
},
173+
{
174+
"cell_type": "code",
175+
"execution_count": null,
176+
"metadata": {
177+
"collapsed": true
178+
},
179+
"outputs": [],
180+
"source": [
79181
"mg = RasterModelGrid((100, 60), 200)\n",
80182
"z = mg.add_zeros('node', 'topographic__elevation') \n",
81183
"random_field = 0.01*np.random.randn(mg.size('node'))\n",
82184
"z += random_field - random_field.min()\n",
83185
"\n",
186+
"attrs = {'K_sp': {0: 0.0003,\n",
187+
" 1: 0.0001}}\n",
188+
"\n",
189+
"\n",
84190
"z0s = 50 * np.arange(-20, 20)\n",
191+
"\n",
192+
"# we create a bottom layer that is very thick. \n",
85193
"z0s[-1] = z0s[-2] + 10000\n",
194+
"\n",
195+
"\n",
86196
"ids = np.tile([0,1], 20) \n",
87197
"\n",
198+
"\n",
199+
"\n",
200+
"# Anticline\n",
201+
"anticline_func = lambda x, y : ((0.002*x)**2+(0.001*y)**2)\n",
202+
"\n",
203+
"# Shallow dips\n",
204+
"shallow_func = lambda x, y : ((0.001*x)+(0.003*y))\n",
205+
"\n",
206+
"# Steeper dips\n",
207+
"steep_func = lambda x, y : ((0.01*x)+(0.01*y))"
208+
]
209+
},
210+
{
211+
"cell_type": "markdown",
212+
"metadata": {},
213+
"source": [
214+
"Intervening text."
215+
]
216+
},
217+
{
218+
"cell_type": "code",
219+
"execution_count": null,
220+
"metadata": {
221+
"collapsed": true
222+
},
223+
"outputs": [],
224+
"source": [
88225
"# Anticline\n",
89-
"lith = LithoLayers(mg, z0s, ids, x0=6000, y0=10000, function = lambda x, y : ((0.002*x)**2+(0.001*y)**2), attrs=attrs)\n",
226+
"lith = LithoLayers(mg, z0s, ids, x0=6000, y0=10000, function=anticline_func, attrs=attrs)\n",
90227
"\n",
91228
"# Shallow dips\n",
92-
"#lith = LithoLayers(mg, z0s, ids, function = lambda x, y : ((0.001*x)+(0.003*y)), attrs=attrs)\n",
229+
"#lith = LithoLayers(mg, z0s, ids, function=shallow_func, attrs=attrs)\n",
93230
"\n",
94231
"# Steeper dips\n",
95-
"#lith = LithoLayers(mg, z0s, ids, function = lambda x, y : ((0.01*x)+(0.01*y)), attrs=attrs)"
232+
"#lith = LithoLayers(mg, z0s, ids, function=steep_func, attrs=attrs)"
96233
]
97234
},
98235
{
@@ -324,7 +461,7 @@
324461
"We can see the form of the anticline advecting through the topography. Cool!\n",
325462
"\n",
326463
"\n",
327-
"## Part 2 Creation of Inverted Topography\n",
464+
"## Part 3: Creation of Inverted Topography\n",
328465
"\n",
329466
"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",
330467
"\n",

0 commit comments

Comments
 (0)