This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Rainfall Excess and Surface Runoff: Files and Arrays BEE 1510: Introduction to Computer Programming Homework Exercise 04 Timothy Lin Cornell University due: November 6, 2008 Executive Summary This exercise was meant to predict the runoff from a watershed for every day of a year in response to one year (365 days) of weather data and land use that describes the watershed. It processes precipitation data from a disk file, separates the precipitation into rain and snow arrays, depending on air temperature, and determines snow depth and snow melt for each day of the year, based on the weather data. Problem The problem is how to calculate the total amount of water collected by an entire watershed throughout an entire year from the data of hourly air temperature, daily precipitation data, and a data file of the land use area characteristics. In addition, different characteristics such as how differences in air temperature will affect the amount of water collected through the melting of snow and existing snow. Objective The objective of this program is to take in data from three different data sets inputted by the user, one of precipitation data, one of hourly air temperatures, and one of the land use area characteristics. The program runs different previously created function files and calculations to create an array made up of the amount of water collected in each day (365 days) for the different land areas (8). This array is then compiled and summed and displayed in a plot of day of the year vs. total runoff water volume (m 3 ), a text file with all of the values for 365 days and (the nonzero values) in the Command Window. Materials and Methods The first equation that is used is from the m file that was previously created, antecedentMoisture.m. That takes values of rain and melted snow and gives the antecedent moisture value. Next, the total amount of water is calculated by adding together the values of rain and melted snow. The third equation is from the curveNumber.m function file (also provided), which takes values reference curve number, antecedent moisture, melted snow, the isDormant array and the isFrozen array and outputs the daily curve number. That daily curve number is part of the next equation that calculates maximum soil water retention: 2,540/(daily curve number – 25.4). Next, the daily runoff values are calculated. If 0.2 x maximum soil water retention < total amount of water in one day, then daily runoff values = ((total amount of water in one day – 0.2 x maximum soil water retention squared)/(total amount of water in one day + 0.8 x maximum soil water retention). If 0.2 x maximum soil water retention > total amount of water in one day, then the daily runoff values = 0. Next, the total runoff volumes are calculated by multiplying maximum soil water retention by land area. Finally, the runoff volumes are summed up for each day....
View Full Document
This note was uploaded on 09/28/2009 for the course BEE 1510 taught by Professor Staff during the Fall '05 term at Cornell.
- Fall '05