Hydrological terrain attributes

Hydrological terrain attributes#

One of TopoToolbox’s major strengths is in calculating hydrological terrain attributes. These terrain attributes are used to determine the paths of water and sediment through the landscapes. Local flow directions stored in a FlowObject are the basis for the derivation of these terrain attributes. FlowObjects are derived from the DEM.

[1]:
import topotoolbox as tt3
import matplotlib.pyplot as plt

dem = tt3.load_dem('tibet')
fd = tt3.FlowObject(dem)

TopoToolbox requires no preprocessing or hydrological conditioning before calling FlowObject. Don’t fill sinks although there is a function available to do this (fillsinks). FlowObject will determine closed depressions and derive flow directions in these sinks so that flow paths run along the valley thalwegs as closely as possible. Filling the DEM before would discard the topographic information in topographic depressions that would otherwise constrain the flow paths. By default, TopoToolbox calculates single flow directions.

Flow accumulation#

Flow accumulation refers to the number of pixels that drain into each pixel. If multiplied by pixel size, flow accumulation equals the drainage or catchment area upstream of each pixel. The FlowObject method flow_accumulation calculates flow accumulation and returns a GridObject.

[2]:
acc = fd.flow_accumulation()
im = acc.plot(cmap='Blues',norm="log")
plt.colorbar(im)
[2]:
<matplotlib.colorbar.Colorbar at 0x7fee39befda0>
../_images/tutorial_flow_3_1.png

Drainage basin delineation#

Catchments can be derived using the function drainagebasins. The function returns a GridObject with integer values (a label grid). To make it easier to visualize the catchments, one can randomize the labels of the grid with shufflelabel.

[3]:
D = fd.drainagebasins()
D.shufflelabel().plot(cmap="Pastel1")
[3]:
<matplotlib.image.AxesImage at 0x7fee39663770>
../_images/tutorial_flow_5_1.png