knitr::opts_chunk$set(echo = TRUE) library(NWCEd) library(ggplot2) library(iterators) library(foreach)
Term | Definition ---------------------|-------------------------------------------------------------------------------------- Log-Pearson Type III | A statistical method where hydrologic data is fixed to a probability distribution curve Water Year | Describes a 12 month period beginning October 1st and ending the last day in September PivotTable | A tool which allows for the organization of data in a spreadsheet
After clicking on the Water Budget icon, a new screen will load which displays an interactive map. For this exercise we want to download data associated with the HUC that encompasses Orchard Mesa, Colorado. This HUC is located just south of Grand Junction, Colorado. In the search bar, type "Grand Junction" and click on the first suggestion that appears under the search bar as shown in Figure 2 below.
The map will zoom in to the general region where we can more easily see the HUC we want to select. Under the HUC Layer
dropdown box, select the 12 Digit layer (see Figure 3 and Figure 4 below). Select the HUC that encompasses Orchard Mesa, Colorado as indicated by the red arrow in Figure 4.
The first thing we need to do is prepare the spreadsheet for the analysis. We are needing to compile and separate the data based on their respective water years. To do this, add a column in between column A and column B. This can be done simply by selecting cell B6. Then while holding down the control
and shift
buttons, press the down arrow
key. Once the cells are selected, right click and select insert with the Shift cells right
option selected. Click OK
. The column of area weighted mean precipitation values shifts to the right.
Format Cells
. A popup window appears as shown in Figure 7. With the Number tab selected, click on General in the Category box. Doing this will allow us to use a custom formula to convert the dates in column A to water year dates in the empty column B.
$$=IF(MONTH(A6)<=9,YEAR(A6),1+YEAR(A6))$$
This statement checks the month of the year in the A column to see if it is in the current water year. If it is, the year is extracted from the cell in column A and inserted into the empty adjacent cell in column B. If the month is greater than 9, then 1 is added to the current year to match the correct water year date. Once the formula has been entered into B6, double click in the bottom-right corner of the cell to populate the proceeding cells in column B.
# Uses the getNWCData function to pull down hydrologic datasets for specified HUC ID variable_name<-getNWCData(huc = "160202030505", local = FALSE)
Once the data is downloaded and stored in a variable of your choice, we are ready to use the Log-Pearson Type III function. The function name is Lp3. It has two arguments: variable name with stored data and dataset type ("prcp" or "streamflow"). The function will read the data from the user-named variable, run through the Log-Pearson Type III method and returns a frequency curve. Below is the code which can be copied and pasted in the R console.
Lp3(variable_name, "prcp")
You have been asked to design a culvert to be installed in Cane Creek located in Cordova, Alabama. The city has a standard that requres the culvert be designed for the 100 year storm event. The site is located in a 12-Digit HUC with an ID of 031501070601. Produce a short report for the city engineer which includes the flow for a 100 year event. Include a plot of the frequency curve.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.