# Labs ERODE

## Hydrology and Flow Routing

**Classroom organization**

If you have never used the Web Modeling Tool, learn how to use it here. The WMT allows you to set up simulations, but once you are ready to run them, you will need an account on the CSDMS supercomputer to submit your job.
More information on getting an account can be found here HPCC Access. Note that this takes a few days!

This lab introduces you to raster-based flow routing; this basic concept of flow routing is a key process in many hydrological and sediment transport models.
Whereas flow routing can be complicated, we here present a basic algorithm. This lab takes ~1 hr to complete.

**Learning objectives **

- get familiar with the concept of flow routing in a digital elevation model/ grid
- learn about the D8 method, contributing area and flow length in the drainage direction

**Lab Notes**

An important part of any landscape evolution model is the way it treats routing of water (and sediment) through the landscape. To give you a bit of a feel of the methodology, we will look at the ‘D8 method’ for determining the drainage directions in a raster grid.
Assume you have a 3 by 3 grid. So if one has a source cell of interest in the middle, we assume that water and sediment drains in the direction of the steepest slope. This concept is also called ‘steepest descent’. The grid cell in the middle then has 8 neighboring cells, and depending on their elevations (z), and the distance between the cells, d, you can calculate the slope, S.

<math>S = \Delta z / d </math> (1)

These surrounding cells are coded as shown in the figure here:

Question In the hypothetical elevation grid below, the source cell and its 8 neighbors have defined elevation values. Where does the water drain to? Select the correct cell and list its D8- grid value.

Question Can you think of a theoretical situation when a D8 flow direction algorithm would not work? What would such a situation look like in a real DEM?

>> Open a new browser window and open the Web Modeling Tool WMT with hydrology components

>> We have two DEM datasets loaded into the WMT dataset for the D8 component.
There is an example called 'HydrologyLab_D8_MountSopris' and one called 'HydrologyLabs_ D8Global_WindRiverRange'

>> Run the D8 component for either example and plot the contributing area grid (A) and the flow length (ds) resulting from the calculations.