This function estimates Flood Frequencies using U.S. Water Resources Council publication Flood Flow Frequencies, Bulletin #17B (1976, revised 1981,1982). This method uses a Log Pearson Type-3 distribution for estimating quantiles. See url: http://water.usgs.gov/osw/bulletin17b/bulletin_17B.html for further documentation.
January 28, 2009 - Tweaked the figure created by cleaning up the legend, reference lines can be turned on/off and are hard coded to display: Upper/Lower 100yr CIs, 100yr, 25yr, 10yr, 5yr, and 2yr. Also changed a few of the default tick placements used to make the grid.
March 13, 2009 - Removed the lower confidence reference line on the figure. Also now will project the last water year in the data set to the final frequency curve and plot a drop down reference line annotating what the interpreted return period would be.
April 20, 2009 - Modified pplot function to create a second type of graph that displays the legend outside the figure and also summarizes in a textbox flow frequencies. Made the comments more Report friendly.
December 2, 2009 - updated code to use matlab interp1 function instead of the lagrange.m function. People were downloading the wrong lagrange.m function.
NaN need to be removed in the dataset. If any years have missing data, it will still assume to include that year as part of the sample size-- as stipulated in 17B guidelines. An exmaple MAT file is provided for the user to test. Further down in these comments is some sample script to pre-process the examples.mat file provided.
There are only a couple of loops in this function and subfunctions, most of this is vectorized for speed.
A nice enhancement to this function is a plot of the analyses. It is plotted in probability space-- SKEWED probability space! Because data may not be normally distributed, plotting in skewed space maintains a straight line for the final frequency curve. Again, no need of any
special toolboxes to create this figure. All self contained in this function.
Outputs of this function include:
estimates of a final frequency (based on a weighted skew),
confidence intervals (95%) for the final frequency,
expected frequency curve based on an adjusted conditional
observed data with computed plotting positions using Gringorten and
Weibull techniques (no toolbox required),
mean of log10(Q),
standard deviation of log10(Q),
and the coup de grâce,
a probability plot that does not require a toolbox to create, but
also plots the probability space using the computed weighted skew
and not just the normal probability.
*This added feature yields a straight line plot for the final
frequency curve even if the data are not normally distributed.
The one important aspect not included in this funtion is the assumed generalized skew (which is variable throughout the country), which can be obtained from Plate 1 in the bulletin. Using the USGS program PKFQWin, this generalized skew is automatically estimated with given lat/long
coordinates. For this function, the user must specify a generalized skew, if no generalized skew is provided, 0.0 is assumed.
Even though this function computes probabilities, skews, etc., no toolboxes are required. All necessary tables are provided as additional MAT files supporting this function. These tables are created from the published USGS 17B manual, and not taken from any Matlab toolboxes, so there are no conflicts or copyright violations.
Other files required to support this function are:
KNtable.mat - using normal distribution, a table of 10-percent
significance level of K values per N sample size.
ktable.mat - Appendix 3 table Pearson distributions
PNtable.mat - Table 11-1 in Appendix 11. Table of probabilities
adjusted for sample size.
pscale.mat - table used to define tick/grid intervals when creating a
probability plot of the results. Can be modified by user if other than
the default values.
examples.mat - dataset presented in the 17B publication.
Parabolic interpolation of Pearson Distribution is dependant on function: lagrange.m (written by Jeff Burkey 3/23/2007). Can be downloaded from Mathworks user community.
[dataout skews pp XS SS hp] =
b17(datain, gg, imgfile, gaugeName, plotref)
King County- Department of Natural Resources and Parks
January 6, 2009
Jeff Burkey (2021). Log-Pearson Flood Flow Frequency using USGS 17B (https://www.mathworks.com/matlabcentral/fileexchange/22628-log-pearson-flood-flow-frequency-using-usgs-17b), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!