Calculating and using Unit Hydrograph using Matlab

Negin Hayatbini and Alexandre Martinez
University of California-Irvine, Civil and Environmental Engineering


We are using the concept of Unit Hydrograph to understand the behavior of a watershed following a rain event and to calculate the runoff following any rainfall event.

Learning Goals

Students will learn the concept of unit hydrograph and use the principle of superposition for linear systems to calculate the runoff flow of a watershed subjected to a rain event. Students will be able to visualize the results of their calculation to understand these concepts. The students will be invited to think about the limit of this linear model by performing some scenario analysis.

Matlab will be used to enter the data, perform basic calculation and visualize the results. The visualization code is already written so the students will just code the UH's calculation as well as the UH's response.

Context for Use

The intended audience for this activity is the public interested as well as upper-level undergraduate or MS/ Ph.D. students interested in hydrology. It explains through visualization the concept of linear response of a watershed to a rain event. No prior data analysis skills or calculus knowledge are required but knowledge of coding in Matlab and basic knowledge of hydrology is preferred. This activity requires 1 to 2 hours to be completed.

Description and Teaching Materials

One major challenge in hydrology is to calculate the flow rate of a stream following a large precipitation event. A watershed (also called drainage basin or catchment) is a land area that channels rainfall and snowmelt to creeks, streams, and rivers, and eventually to outflow points such as reservoirs, bays, and the ocean (NOAA). There are different ways to pursue this goal: use conceptual (HBV) or physical-based (HEC-RAS) models that both have high computation cost. The other approach is UH, which is a simple linear method that requires few or no computer resources and few data.

Unit Hydrograph (UH) is the direct runoff hydrograph resulting from one unit (in or cm) of constant and uniform rainfall over the entire watershed. UH can be considered as the DNA of a watershed, carrying key information such as infiltration capacity and runoff response to one unit of rainfall. It is based on linear systems theory, which means that it follows the rules of superposition and proportionality. For instance, if 1 cm of excess rain produces a peak flow of 100 m^3/s, then 2 cm of excess rainfall will produce a peak flow of 200 m^3/s.

Student Handout (Acrobat (PDF) 545kB May8 19)
Matlab Code (Zip Archive 4kB Aug16 18)

Teaching Notes and Tips

Students should be careful to have data with consistent units. Because Unit Hydrograph are linear, the choice of unit doesn't matter but they should be consistent. Data to entered are short time series of typically 4-12 hours. The code has been written for any given example so the students can compare its output with our results. Because our code is working for any case, it is more complex, but the student code should be straight-forward. The student will be encouraged to also make the calculation by hands for the first example since it is an easy one and use graphical methods instead of coding.

At the end, some calculation of hypothetical rain event will be performed, and the students will be invited to think about the physical meaning of the results, ad therefore the limits of the model.


The activity will be first performed by hand calculation and graphical method, then using Matlab code to extend it to another example. The student will be able to quickly and easily understand the conception using graphical method, which is essential before starting coding. The students will compare their hand and code results with the results from our code.

References and Resources

L. Sherman, "Stream Flow from Rainfall by the Unit Graph Method," Engineering News Record, No. 108, 1932, pp. 501-505.

NOAA data,

USGS data,