Skip to content

Commit b72672d

Browse files
committed
Use generate_terrain in sky view factor notebook, clear all notebook outputs
Switch 24_Sky_View_Factor from hand-crafted sinusoidal terrain to generate_terrain with ridged noise and domain warping. Add overlay blend composite panel showing hillshade + SVF together. Clear outputs from all user guide notebooks.
1 parent d0b5622 commit b72672d

32 files changed

+969
-2302
lines changed

examples/user_guide/12_Flood_Analysis.ipynb

Lines changed: 14 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,7 @@
4242
"cell_type": "code",
4343
"execution_count": null,
4444
"id": "imports",
45-
"metadata": {
46-
"execution": {
47-
"iopub.execute_input": "2026-03-13T02:48:12.809031Z",
48-
"iopub.status.busy": "2026-03-13T02:48:12.808873Z",
49-
"iopub.status.idle": "2026-03-13T02:48:15.149242Z",
50-
"shell.execute_reply": "2026-03-13T02:48:15.148679Z"
51-
}
52-
},
45+
"metadata": {},
5346
"outputs": [],
5447
"source": [
5548
"%matplotlib inline\n",
@@ -78,14 +71,7 @@
7871
"cell_type": "code",
7972
"execution_count": null,
8073
"id": "load-dem",
81-
"metadata": {
82-
"execution": {
83-
"iopub.execute_input": "2026-03-13T02:48:15.150597Z",
84-
"iopub.status.busy": "2026-03-13T02:48:15.150328Z",
85-
"iopub.status.idle": "2026-03-13T02:48:17.828701Z",
86-
"shell.execute_reply": "2026-03-13T02:48:17.828047Z"
87-
}
88-
},
74+
"metadata": {},
8975
"outputs": [],
9076
"source": [
9177
"try:\n",
@@ -126,14 +112,7 @@
126112
"cell_type": "code",
127113
"execution_count": null,
128114
"id": "hydro-setup",
129-
"metadata": {
130-
"execution": {
131-
"iopub.execute_input": "2026-03-13T02:48:17.829970Z",
132-
"iopub.status.busy": "2026-03-13T02:48:17.829696Z",
133-
"iopub.status.idle": "2026-03-13T02:48:18.999397Z",
134-
"shell.execute_reply": "2026-03-13T02:48:18.998831Z"
135-
}
136-
},
115+
"metadata": {},
137116
"outputs": [],
138117
"source": [
139118
"# Fill depressions, resolve flats, compute flow direction and accumulation.\n",
@@ -157,14 +136,7 @@
157136
"cell_type": "code",
158137
"execution_count": null,
159138
"id": "basemap",
160-
"metadata": {
161-
"execution": {
162-
"iopub.execute_input": "2026-03-13T02:48:19.000845Z",
163-
"iopub.status.busy": "2026-03-13T02:48:19.000727Z",
164-
"iopub.status.idle": "2026-03-13T02:48:19.338846Z",
165-
"shell.execute_reply": "2026-03-13T02:48:19.338124Z"
166-
}
167-
},
139+
"metadata": {},
168140
"outputs": [],
169141
"source": [
170142
"# Build a hillshade basemap we'll reuse throughout\n",
@@ -214,14 +186,7 @@
214186
"cell_type": "code",
215187
"execution_count": null,
216188
"id": "hand",
217-
"metadata": {
218-
"execution": {
219-
"iopub.execute_input": "2026-03-13T02:48:19.340736Z",
220-
"iopub.status.busy": "2026-03-13T02:48:19.340620Z",
221-
"iopub.status.idle": "2026-03-13T02:48:19.901710Z",
222-
"shell.execute_reply": "2026-03-13T02:48:19.901260Z"
223-
}
224-
},
189+
"metadata": {},
225190
"outputs": [],
226191
"source": [
227192
"hand_raster = xrspatial.hand(flow_dir, flow_accum, dem_filled, threshold=threshold)\n",
@@ -265,14 +230,7 @@
265230
"cell_type": "code",
266231
"execution_count": null,
267232
"id": "inundation",
268-
"metadata": {
269-
"execution": {
270-
"iopub.execute_input": "2026-03-13T02:48:19.904535Z",
271-
"iopub.status.busy": "2026-03-13T02:48:19.904425Z",
272-
"iopub.status.idle": "2026-03-13T02:48:19.912541Z",
273-
"shell.execute_reply": "2026-03-13T02:48:19.912025Z"
274-
}
275-
},
233+
"metadata": {},
276234
"outputs": [],
277235
"source": [
278236
"for wl in [2, 5, 10, 20]:\n",
@@ -286,14 +244,7 @@
286244
"cell_type": "code",
287245
"execution_count": null,
288246
"id": "inundation-viz",
289-
"metadata": {
290-
"execution": {
291-
"iopub.execute_input": "2026-03-13T02:48:19.913599Z",
292-
"iopub.status.busy": "2026-03-13T02:48:19.913498Z",
293-
"iopub.status.idle": "2026-03-13T02:48:20.201718Z",
294-
"shell.execute_reply": "2026-03-13T02:48:20.200986Z"
295-
}
296-
},
247+
"metadata": {},
297248
"outputs": [],
298249
"source": [
299250
"# Visualize the 10 m flood extent\n",
@@ -339,14 +290,7 @@
339290
"cell_type": "code",
340291
"execution_count": null,
341292
"id": "depth",
342-
"metadata": {
343-
"execution": {
344-
"iopub.execute_input": "2026-03-13T02:48:20.203145Z",
345-
"iopub.status.busy": "2026-03-13T02:48:20.203019Z",
346-
"iopub.status.idle": "2026-03-13T02:48:20.469517Z",
347-
"shell.execute_reply": "2026-03-13T02:48:20.468837Z"
348-
}
349-
},
293+
"metadata": {},
350294
"outputs": [],
351295
"source": [
352296
"depth = flood_depth(hand_raster, water_level=10)\n",
@@ -384,14 +328,7 @@
384328
"cell_type": "code",
385329
"execution_count": null,
386330
"id": "cn-scalar",
387-
"metadata": {
388-
"execution": {
389-
"iopub.execute_input": "2026-03-13T02:48:20.470974Z",
390-
"iopub.status.busy": "2026-03-13T02:48:20.470859Z",
391-
"iopub.status.idle": "2026-03-13T02:48:20.478920Z",
392-
"shell.execute_reply": "2026-03-13T02:48:20.478270Z"
393-
}
394-
},
331+
"metadata": {},
395332
"outputs": [],
396333
"source": [
397334
"# 100 mm rainfall everywhere\n",
@@ -419,14 +356,7 @@
419356
"cell_type": "code",
420357
"execution_count": null,
421358
"id": "cn-spatial",
422-
"metadata": {
423-
"execution": {
424-
"iopub.execute_input": "2026-03-13T02:48:20.480047Z",
425-
"iopub.status.busy": "2026-03-13T02:48:20.479949Z",
426-
"iopub.status.idle": "2026-03-13T02:48:20.764827Z",
427-
"shell.execute_reply": "2026-03-13T02:48:20.764276Z"
428-
}
429-
},
359+
"metadata": {},
430360
"outputs": [],
431361
"source": [
432362
"# Simple CN map: low HAND -> urban-ish (CN=85), high HAND -> forested (CN=55)\n",
@@ -477,14 +407,7 @@
477407
"cell_type": "code",
478408
"execution_count": null,
479409
"id": "tt-inputs",
480-
"metadata": {
481-
"execution": {
482-
"iopub.execute_input": "2026-03-13T02:48:20.766341Z",
483-
"iopub.status.busy": "2026-03-13T02:48:20.766235Z",
484-
"iopub.status.idle": "2026-03-13T02:48:21.170917Z",
485-
"shell.execute_reply": "2026-03-13T02:48:21.170083Z"
486-
}
487-
},
410+
"metadata": {},
488411
"outputs": [],
489412
"source": [
490413
"slope_raster = xrspatial.slope(dem_filled)\n",
@@ -500,14 +423,7 @@
500423
"cell_type": "code",
501424
"execution_count": null,
502425
"id": "tt-compute",
503-
"metadata": {
504-
"execution": {
505-
"iopub.execute_input": "2026-03-13T02:48:21.172210Z",
506-
"iopub.status.busy": "2026-03-13T02:48:21.172107Z",
507-
"iopub.status.idle": "2026-03-13T02:48:21.478814Z",
508-
"shell.execute_reply": "2026-03-13T02:48:21.478274Z"
509-
}
510-
},
426+
"metadata": {},
511427
"outputs": [],
512428
"source": [
513429
"# Manning's n = 0.03 is typical for natural channels.\n",
@@ -534,14 +450,7 @@
534450
"cell_type": "code",
535451
"execution_count": null,
536452
"id": "tt-compare",
537-
"metadata": {
538-
"execution": {
539-
"iopub.execute_input": "2026-03-13T02:48:21.481411Z",
540-
"iopub.status.busy": "2026-03-13T02:48:21.481303Z",
541-
"iopub.status.idle": "2026-03-13T02:48:21.491759Z",
542-
"shell.execute_reply": "2026-03-13T02:48:21.491111Z"
543-
}
544-
},
453+
"metadata": {},
545454
"outputs": [],
546455
"source": [
547456
"# Compare roughness: smoother surface (channel) vs rougher (vegetated hillside)\n",
@@ -580,14 +489,7 @@
580489
"cell_type": "code",
581490
"execution_count": null,
582491
"id": "final-map",
583-
"metadata": {
584-
"execution": {
585-
"iopub.execute_input": "2026-03-13T02:48:21.493197Z",
586-
"iopub.status.busy": "2026-03-13T02:48:21.493089Z",
587-
"iopub.status.idle": "2026-03-13T02:48:22.232191Z",
588-
"shell.execute_reply": "2026-03-13T02:48:22.231319Z"
589-
}
590-
},
492+
"metadata": {},
591493
"outputs": [],
592494
"source": [
593495
"# Final composite: 10 m flood scenario\n",

0 commit comments

Comments
 (0)