Case Studies

Data Analysis

Figure 1. Low flow analysis in URUNME

URUNME can be used for in-depth data analysis owing to the embedded SQL and R language support and other built-in functions. A case in point is the low-flow frequency analysis carried out on a stream (called ST10) in the Occoquan watershed (located in northern Virginia, USA) in an attempt to calculate drought conditions under different return periods. In this method, first, annual minima are derived from daily flow by selecting the lowest flow every year using different averaging durations (e.g. 1, 7, 10, etc. days). An n-day moving average is progressed though the daily data to calculate the timeseries for each duration and then yearly minima are calculated (Gustard and Demuth, 2009). A cumulative distribution function (CDF) is developed using the yearly minimum flows. Low flow for any return period (T) can then be calculated by selecting the desired exceeding probability (p) on the CDF where (T = 1/p).  For instance, a commonly used standard called 7Q10 represents the minimum 7-day flow expected to occur every 10 years.

Figure 2. Low flow analysis in URUNME
Figure 2. Low flow analysis in URUNME

The following example illustrates how a different set of features in URUNME can be used to calculate the low flows in real time using online flow data from a stream station. Figure 1 shows the process for low flow frequency analysis for the duration of 7, 15, 30, 60, 90 and 180 days over a return period of 2, 5, and 10 years (p = 0.5, 0.25 and 0.1 respectively). This demonstrates that once low flows are calculated for any given return period, different scenarios can be created to calculate other return periods by simply localizing one variable. In a formula function called ‘Global’ is used to create one variable called p which is kept local for each scenario to define the return period. Flow data are obtained from three different sources. The ‘Historical’ function reads a text file obtained from a USGS (United States Geological Survey) website containing the daily flows for this location from 1968 to 1980. ‘Read ST 25, 30’ reads daily flows from a Visual FoxPro database for stream stations ST25 and ST30, located upstream of ST10, for a time period between 1980 and 2003 (before ST10 was commissioned). The ‘Fill 25,30’ function uses interpolation to fill in any missing data in the timeseries. The ‘Compute ST10’ function contains a simple formula to extrapolate missing ST10 data between 1980 and 2003 using flows from ST25 and ST30 based on the drainage area of each station (ST10 = ST25 * 2.166 + ST30). The ‘ST10’ function reads the data for the remaining time period from the database for the online stream station ST10. The ‘QAQC’ function contains a simple SQL statement to remove any duplicates and also sort the data by date, in case there is any discrepancy. The ‘Daily Flow’ function aggregates the data from ST10 to daily flows by using a time-weighted average. ‘Fill ST10’ infills any missing data using interpolation. ‘All Flow’ contains a SQL statement using ‘UNION’ to add the three different sources of data and create one single timeseries from 1968 to present date (Figure 2). The ‘Moving Avg’ formula function creates moving averages from the final timeseries for each time duration (Figure 3). ‘Yearly Min’ aggregates the moving averages for each duration to get yearly minima. Finally, ‘Low Flow’ uses an R script to create a CDF for each duration and returns low flow for a given p, defined in ‘Global’, using inverse CDF (Figure 4). Once this Process is created and tested, any number of scenarios can be created to get values from different return periods by changing the value of variable p in each scenario. ‘Run All’, which is an ‘Execute’ function, is used to conveniently run all the scenarios sequentially (Figure 5). A button can be added in the diagram to run the Execute function if a more dashboard type application is desired.


The two charts shown in Figure 1 precisely show how scenario management is implemented in URUNME. The ‘Low flow’ function produces two vector variables, ‘x’ for return periods and ‘xQy’ for low flows. If the variable xQy is attached to the chart using an ‘Active’ attribute, each time the user changes the scenario, the chart will update itself using the values from the active scenario (Left chart in Figure 9). However, in order to compare values from all the three scenarios at the same time, the variable xQy should be dropped three times on the right chart, each with its own ‘Scenario’ name attribute (Figure 6). This will create three different timeseries, each for one scenario. This particular chart will not update every time the active scenario is changed by the user. This case study shows a very simple example of data analysis and how different scenarios can be used in URUNME. More sophisticated analytics can be performed using similar techniques.

Figure 2. Low flow analysis in URUNME
Close Menu