 # GLG 410 Programming Matlab

In this week's lab, I would like for you all to build a couple of functions that make some interesting geomorphic calculations. Following the lecture examples as well as the information from the handouts from Mastering Matlab 5, do the following tasks and prepare a web-based presentation of the answers. Email the url to Jason and I by the beginning of lab on Tuesday November 30:

## River discharge function

The volume of water that passes by a point in a river over a certain time increment is the discharge (for example, the Tempe Town Lake can apparently withstand about 40,000 cubic feet per second with the dams up). THe dischage can be simply expressed as the product of the velocity times the cross-sectional area of the flow:
Q = v * A, where Q is discharge [L^3/T], v is velocity [L/T], and A is area [L^2]
Many channels are effectively rectangular, so we can express the cross-sectional area as the product of width (w) times depth (d):
A = w * d So how to calculate the velocity?
We use a simple formulation called Manning's eequation that relates the flow velocity to the local channel slope (s [dimensionless]), a channel shape parameter called the hydraulic radius [L]--see below, and a roughness parameter n [L^1/6]. NOTE THAT THIS IS FOR ENGLISH UNITS (feet, seconds): The hydraulic radius R is equal to the ratio of the channel area (A) to its wetted perimeter (P):
P = w + 2d
R = A/P
The Manning roughness coefficient (n) is estimated based upon inspection of the channel and its shape. Here is a table of roughnesses depending on the channel boundary type.