9781420048636.ch10

3
CHAPTER 10 Computer Program 10.1 Introduction A computer program has been developed for the computation and visualization of results of flood frequency analysis methods discussed in this book. The code is written in MATLAB ® language, which com- bines the power of computation with visualization of various results in one program. A standalone program is also currently being developed. Although most of the computations involved in flood frequency analysis are simple to perform, it should be noted that double precision computations are necessary in many cases to reach the desired accu- racy. This is very important especially for the case of the log-type distributions (log-normal and log-Pearson). Also, flood data seem to produce badly scaled matrices for the computation of the standard errors, which makes it necessary to use double precision in order to obtain accurate estimates. The computer program performs both at-site and regional analysis of data. Regional analysis is performed by using the index-flood method. Regional parameter estimates are based on the average of at- site moments for the case of MOM and PWM. For the ML method, regional parameter estimates are obtained by pooling the observations together after dividing by the mean at each site (station-year method). Included also are some tests for stationarity and randomness men- tioned in Chapter 1. The program produces parameter estimates, quantile and standard error estimates in addition to probability plots and moment ratio diagrams. 10.2 Description of Program The computer program consists of more than 120 MATLAB M-files. These include input and output routines, graph routines, parameter

description

cnhgh

Transcript of 9781420048636.ch10

CHAPTER 10 Computer Program 10.1 Introduction Acomputerprogramhasbeendevelopedforthecomputationandvisualization of results of flood frequency analysis methods discussedinthisbook.ThecodeiswritteninMATLAB language,whichcom-bines the power of computation with visualization of various results inone program. A standalone program is also currently being developed.Althoughmostofthecomputationsinvolvedinfloodfrequencyanalysis are simple to perform, it should be noted that double precisioncomputations are necessary in many cases to reach the desired accu-racy.Thisisveryimportantespeciallyforthecaseofthelog-typedistributions(log-normalandlog-Pearson).Also,flooddataseemtoproducebadlyscaledmatricesforthecomputationofthestandarderrors,whichmakesitnecessarytousedoubleprecisioninordertoobtain accurate estimates.The computer program performs both at-site and regional analysisofdata.Regionalanalysisisperformedbyusingtheindex-floodmethod. Regional parameter estimates are based on the average of at-sitemomentsforthecaseofMOMandPWM.FortheMLmethod,regional parameter estimates are obtained by pooling the observationstogether after dividing by the mean at each site (station-year method).Includedalsoaresometestsforstationarityandrandomnessmen-tioned in Chapter 1.The program produces parameter estimates, quantile and standarderrorestimatesinadditiontoprobabilityplotsandmomentratiodiagrams. 10.2 Description of Program Thecomputerprogramconsistsofmorethan120MATLAB M-files.Theseincludeinputandoutputroutines,graphroutines,parameter 2000 by CRC Press LLC estimation routines, quantile estimation routines, and standard errorroutines in addition to testing routines.The main program is freq.m, which calls three different programsaccording to the users choice. These are freqpwm.m, freqmlk.m, freq-mom.m, pwmom.m, avrgpwm.m, lmratios.m, poolobs.m are then usedforcomputingat-siteandregionalmoments.Parameterestimationroutinesarenamedbyusingthreelettersdenotingthedistributionfollowed by fit and then either m for MOM, l for ML, or p for PWM.ForexampleLP(3)estimationbyMLmethodusestheroutinelp3fit1.m, and weibull estimation by MOM uses the routine, weifitm.m,and so on. Distributions are denoted as follows1.evl:Extreme value type I distribution.2.exp:Exponential distribution.3.gam:Gamma distribution.4.gev:Generalized extreme value distribution.5.glg:Generalized logistic distribution.6.ln2:Two-parameter log-normal distribution.7.ln3:Three-parameter log-normal distribution.8.log:Logistic distribution.9.lp3:Log-Pearson III distribution.10.nrm:Normal distribution.11.par:Generalized Pareto distribution.12.pe3:Pearson-III distribution.13.wei:Weibull distribution.14.wk4:Four-parameter Wakeby distribution.15.wk5:Five-parameter Wakeby distribution.Quantile estimation routines are named by using the three lettersofthedistributionfollowedbyq.Forexamplelogq.mcalculatesthelogistic quantiles. Standard error routines, like parameter estimationroutines consist of the three letters of the distribution followed by stdandtheneithermforMOM,orlforML,orpforPWM.Plottingroutines are plotmrd.m, plotlmrd.m, probplot.m. In addition, there areanumberofroutinesforcalculatingdifferentfunctionsneededforparameterandquantileestimates,thesearekpvalue.m,hknew.m,getkgev.m, getkglog.m, getkpar.m, getlp3.m, psi.m, and tablej.m. Pro-gramsfortestinghomogeneityandstationarityaregbtest.mfortheGrubbs-Becktest,mwtest.mandmw2test.mfortheMann-Whitneytest, and wwtest.m for the Wald-Wolfwitz test. The Wiltshire test forregional homogeneity is performed by wiltshir.m. 2000 by CRC Press LLC Input to the program is through an input data file which is suppliedby the user. The structure of the file is as follows:Line 1 : Region name.Line 2 : Number of sites in the region.Line 3 : Station number 1 ID#Line 4 : Number of observations in station 1Line 5 : Observations for station 1For other stations lines 3 to 5 are repeated.An example file is:line 1 Wabash River basin [name of region]line 2 93 [93 stations]line 3 219 [first station ID# is 219]line 4 54 [54 observations in #219]line 5 15000 16300 12000[the actual 54 observations]After the user inputs the file name which contains the input data,theuserisguidedthroughtheprogrambyaseriesofmenusforthechoice of analysis methods (MOM, ML, PWM) and statistical distribu-tions. The standard output gives both at-site and regional parameterestimatesaswellasquantileestimatesat10,20,50,100,and200yearsinadditiontostandarderrorswhereapplicable.Theuseralsocanchoosedifferentreturnperiodstoobtainquantilesaswellasstandarderrorestimates.Graphicaloutputconsistsofordinarymomentratiodiagrams,L-momentratiodiagrams,andprobability(quantile)plots.Includedwiththeprogramisadatafilecontainingdatafrom93stationsintheWabashRiverbasininIndiana.Theexamples in this book are chosen from these stations. 2000 by CRC Press LLC