UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

The estimated parameter flood forecasting model Zachary, A. Glen 1985

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata

Download

Media
831-UBC_1985_A7 Z32.pdf [ 10.63MB ]
Metadata
JSON: 831-1.0062645.json
JSON-LD: 831-1.0062645-ld.json
RDF/XML (Pretty): 831-1.0062645-rdf.xml
RDF/JSON: 831-1.0062645-rdf.json
Turtle: 831-1.0062645-turtle.txt
N-Triples: 831-1.0062645-rdf-ntriples.txt
Original Record: 831-1.0062645-source.json
Full Text
831-1.0062645-fulltext.txt
Citation
831-1.0062645.ris

Full Text

THE ESTIMATED PARAMETER FLOOD FORECASTING MODEL by A. GLEN ZACHARY B.Sc, Walla Walla College, 1982 A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF APPLIED SCIENCE in THE FACULTY OF GRADUATE STUDIES DEPARTMENT OF CIVIL ENGINEERING We accept this thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA May 1985 © A. Glen Zachary, 1985 In presenting t h i s thesis i n p a r t i a l f u l f i l m e n t of the requirements for an advanced degree at the University of B r i t i s h Columbia, I agree that the Library s h a l l make i t f r e e l y a v a i l a b l e for reference and study. I further agree that permission for extensive copying of t h i s thesis f o r scholarly purposes may be granted by the head of my department or by h i s or her representatives. I t i s understood that copying or publication of t h i s thesis f o r f i n a n c i a l gain s h a l l not be allowed without my written permission. Department of Civil Engineering The University of B r i t i s h Columbia 1956 Main Mall Vancouver, Canada V6T 1Y3 Date October 3, 1985 ABSTRACT Design flood estimates have traditionally been based on records of past events. However, there is a need for a method of estimating peak flows without these records. The Estimated Parameter Flood Forecasting Model (EPFFM) has been developed to provide such a method for small water resource projects based on a 200 year or less design flood. This "user friendly" computer model calculates the expected peak flow and its standard deviation from low, probable, and high estimates of thirteen user supplied parameters. These parameters describe physical characteristics of the drainage basin, infiltration rates, and rainstorm charactristics. The standard deviation provides a measure of reliability and is used to produce an 80% confidence interval on peak flows. The thesis briefly reviews existing flow estimation tecniques and then describes the development of EPFFM. This includes descriptions of the Chicago method of rainfall hyetograph synthesis, Horton's infiltration equation, inflow by time-area method, Muskingum routing equation, and an approximate method of estimating the variance of multivariate equations since these are a l l used by EPFFM to model the physical and mathematical processes involved. Two examples are included to demonstrate EPFFM's ability to estimate a confidence interval, and compare these with recorded peak flows. i i i TABLE OF CONTENTS Page No. ABSTRACT 1 i i TABLE OF CONTENTS i i i LIST OF FIGURES v ACKNOWLEDGEMENTS v i i i 1.0 INTRODUCTION 1 2.0 REVIEW OF FLOW ESTIMATION TECHNIQUES 6 2.1 Flood Frequency Analysis 6 2.2 Unit Hydrograph Method 8 2.3 Computer Simulation 12 2.3.1 Rainfall 13 2.3.2 Inflow Hydrograph 14 2.3.3 Routing 15 3.0 ASSUMPTIONS AND THEORY 17 3.1 General Assumptions 17 3.2 Chicago Method of Rainfall Hyetograph Synthesis . 17 3.3 Horton's Infiltraton Equation 25 3.4 Inflow by Time-Area Method 29 3.5 Muskingum Routing Equation 36 3.6 Variance of Multivariate Equation 39 4.0 COMPUTER PROGRAM 46 4.1 Application of Theory 46 4.2 Philosophy of Interactive Programming 48 4.3 Special Considerations 49 5.0 TRIAL BASIN RESULTS AND DISCUSSION 51 5.1 Basin Description 51 iv 5.2 Two Cases 54 5.2.1 Case I : Short Return Frequency 55 5.2.2 Case II : Long Return Frequency 57 5.3 Discussion of Results 57 6.0 SUMMARY, CONCLUSIONS, AND RECOMMENDATIONS 63 6.1 Summary 63 6.2 Conclusions 64 6.3 Recommendations • 65 SELECTED BIBLIOGRAPHY 68 AUTHOR'S NOTE ABOUT EPFFM 70 APPENDIX A Trial Run Data 71 B General Information about EPFFM 80 C Computer Listing of EPFFM 144 V LIST OF FIGURES Page No. Figure 2.2.1: Hydrograph Derived from a Unit Hydrograph of the Same Duration 9 Figure 2.2.2: Derivation of a Unit Hydrograph From One With a Shorter Duration 11 Figure 3.2.1: Typical Intensity-Duration-Frequency Curves.... 20 Figure 3.2.2: Construction of a Rainfall Hyetograph Using the Chicago Method 23 Figure 3.3.1: Effects of the Parameter K on Horton's Equation Figure 3.3.2: Horton's Equation Used to Develop Equation 3.3.3 28 Figure 3.4.1: Time-Area Diagram Showing Area that First Contributes Runoff Within a Given Time Interval 30 Figure 3.4.2: Construction of a Runoff Hydrograph Using a Time-Area Diagram 33 Figure 3.4.3: Dimensionless, Cumulative Time-Area Curve 35 vi Figure 3.6.1: 80% Confidence Interval on a Normal Distribution of Variable X^^ 42 Figure 3.6.2: Approximate Method of Estimating the Slope of Function g at the Mean Value of Variable X^  ... 42 Figure 5.1.1: Carnation Creek Watershed 53 Figure 5.2.1.1: Runoff Hydrograph for the Storm of December 16, 1974; Simulated by EPFFM using Recorded Precipitation Data from Station A and E in the Carnation Creek Watershed 56 Figure 5.2.1.2: Runoff Hydrograph for the Storm of December 16, 1974 in the Carnation Creek Watershed; Simulated by EPFFM using a Synthetic Hyetograph Produced by a Modified Chicago Method 58 Figure 5.2.2.1: Runoff Hydrograph for the Storm of November 6, 1978; Simulated by EPFFM using Recorded Precipitation Data from Station A in the Carnation Creek Watershed 59 v i i Figure 5.2.2.2: Runoff Hydrograph for the Storm of November 6, 1978 in the Carnation Creek Watershed; Simulated by EPFFM using a Synthetic Hyetograph Produced by a Modified Chicago Method 60 v i i i ACKNOWLEDGEMENTS Several people and institutions have been instrumental in the development of this thesis and the author would like to express his appreciation to them. Although many more helped with ideas or technical assistance, the author specifically acknowledges the direction and encouragement given by Dr. S.O. Russell, the author's supervisor, the technical advice provided by Mr. Gordon Finlay with respect to FORTRAN 77 and program development in general, the financial support from the University of British Columbia for a portion of the time spent there, and the help of the Pacific Biological Station at Nanaimo, British Columbia in providing the data necessary to test EPFFM. 1 Chapter 1: INTRODUCTION One of the most important phases of designing water resource projects such as dams, river protection works, and culverts is the selection of the 'design flood'. This key parameter is the basis on which most major design decisions are determined. Therefore, care must be taken to ensure that the estimates are reliable. Design floods are characterized by their probability of exceedence which is the probability of an actual flood exceeding the design flood in any one year. By calculating the reciprocal of the exceedence probability, one obtains the 'return frequency' or 'return period', which is another way of defining the design flood. The design return period depends on a number of factors such as size, required dependability, and the consequences of failure. Very large projects, or projects that would have serious consequences should they f a i l , usually have design floods with return frequencies of 200 years or more. Smaller water resource projects are designed with return frequencies in the range of 2 to 200 years. The scope of this thesis encompasses the latter range of return frequencies. There are two main approaches to estimating the magnitude a design flood. One approach involves the collection and statistical analysis of recorded flow data from the river in question while the other focuses on the physical and meteorological characteristics of the actual channel and drainage basis. In the statistical approach, recorded flows are plotted against their associated frequencies of occurrence on one or more of the various probability distribution papers. The plot that is best fitted by a 2 straight line is usually chosen for the purpose of estimating extreme floods. Although this procedure used to be accomplished by graphical means, i t is now usually performed by computer. By choosing a return frequency, the hydrologist can easily determine the design flow from the plot or calculate i t from the distribution equation. Confidence in the association between plotted flows and return frequencies can be increased by using long flow records, which is especially important for longer return frequencies. The deterministic approach to flood forecasting is based on the drainage basin's individual response to meteorological events. Until recently, the most practical method was to develop unit hydrographs from actual flows caused by a single, well defined storm. A unit hydrograph may be defined as the flow resulting from one unit depth of direct runoff caused by a storm of uniform intensity and specified duration 1 5 . By performing several mathematical operations on a unit hydrograph, a flow hydrograph representing the basin's response to a storm of any duration and intensity can be synthesized. This approach is useful in applications where more precipitation data than flow data are available, but i t can be very tedious unless the calculations are performed by computer. Another method of implementing the deterministic approach that has become useful as computer capabilities have been improved is flow simulation. Mathematical modelling of a basin's response to rainstorms may be accomplished since most of the required parameters can be derived from the basin's physical characteristics. Estimates of the few parameters that cannot be explicitly derived can be refined by fitting the modelled response to an actual recorded response. 3 When using hydrograph synthesis or simulation for determining a design flow, an appropriate 'design storm' must be used. In situations where no probability of failure can be tolerated, the maximum meteorogical conditions must be used to determine the 'maximum probable flood'. In less severe circumstances, the design storm is determined from available precipitation data using statistical analysis. It is difficult to obtain an accurate measure of the reliability associated with the deterministic approach because of the complicated relationships and mathematical operations. In the case of simulation, efforts to increase the reliability of the process have led to large, complex models that can be coaxed to reconstruct historical events well, but are s t i l l not able to forecast or compute design flood reliably. While the basic approaches to flood estimation are sound in principle, practical applications are usually hampered by a lack of adequate data. The purpose of this thesis is to develop a simple method of estimating design flows for small water resource projects and to also provide some measure of the reliability of that estimate when l i t t l e or no recorded data are available. An attempt is made to introduce probability analysis into the simulation process so that the design flow can be reliably selected. In order to maintain simplicity, this thesis is written for drainage basins subject only to rain precipitation. In most computer models used for flow simulation, each parameter is onyLy given a single value. The model developed in this thesis, however, incorporates a range of values for most of the parameters by using 'low', 'probable', and 'high' estimates, and is therefore called the 'Estimated Parameter Flood Forecasting Model'. The word 'forecasting' is usually used in hydrology to describe the process of estimating 4 events for the immediate future. However, in this thesis the term forecasting is used in the general sense that the magnitude of a future flood is being estimated or forecast. The peak flow of the hydrograph resulting from the probable, or 'mean' estimate of the parameters is considered to be the expected flow. A measure of the reliability of the calculated flow is provided by the standard deviation of the peak flows of the hydrographs resulting from the low and high estimates of the parameters. This approach allows hydrologists to simulate flood flows and obtain a measure of reliability even though actual data may be scarce or unavailable. The computer program consists of subroutines based on the Chicago method of storm hyetograph synthesis, Horton's infiltration equation, overland flow by time-area diagram, Muskingum's routing equation, and an approximate method of calculating the variance of multivariate equations. It may either be operated as a deterministic or probabilistic model, depending on the user's needs and the available data. Even though a l l of the parameters can be estimated, provisions have been made to incorporate recorded data into the simulation process. These data, however, are assumed to have no associated errors, and therefore, only the standard deviation due to the remaining estimated parameters is calculated. In order to demonstrate the simplicity, usefulness, and validity of the model, several example runs are included in the thesis and are discussed. Recorded flow hydrographs resulting from recorded rainstorms are compared to flow hydrographs produced by the model using estimated parameters as well as the recorded data. Although the calculated peak flows are slightly lower than the recorded peak flows, the recorded peak 5 flows s t i l l f a l l within the range of possible flows described by the standard deviations of these mean peak flows. This indicates that design floods may be estimated with reasonable assurance that the actual peak flow will f a l l within a range established by the calculated mean and its standard deviation. 6 Chapater 2: REVIEW OF FLOW ESTIMATION TECHNIQUES Since the turn of the century, hydrologists have been developing techniques of forecasting floods. The earliest method consisted of plotting recorded flows against the frequency of occurrence. As time continued, probability distributions and statistical analysis were incorporated. In 1932, Sherman developed the unit hydrograph method which provided an alternative way of estimating flood magnitudes2. The development of routing equations provided a means of hydrograph synthesis, which paved the way for flow simulation by computer models. Although numerous and sophisticated applications of these methods have been developed, these main theories are s t i l l the basis of today's flow estimation techniques. 2.1 Flood Frequency Analysis The reliability and usefulness of flood frequency analysis is greatly dependent upon the type of data selected. Since the hydrologist is usually concerned with peak flows, the recorded data must also include peak flows. Care must be taken to ensure that the flows were recorded accurately and that the record period is long enough to reduce random errors. It is also important that during the record period, basin conditions have remained relatively unchanged since events such as logging, urbanization, or the construction of water resource projects can change the hydrological characteristics of the watershed, thus limiting the usefulness of such data for forecasting purposes. The prime objective of flood frequency analysis is to define the flood flow with a given probability of being equalled or exceeded in any given year. The reciprocal of this probability, the return frequency or c • 7 return period, describes the average number of consecutive years between the times when the associated flow will be equalled or exceeded. The probability of exceedence can be determined from a record of flow data by ranking the annual peak flows in order of magnitude, the largest flow having the rank of r = 1, and using the information in one of many equations. The most commonly used plotting equation is Weibull's, which is P = - — ^ (2.1.1) m + 1 where p is the probability of exceedence, r is the rank of the flood, and m is the length of record in years. This method, however, is generally used with return periods of m/5 years only, since longer return periods cannot be determined reliably 1 5. When floods associated with longer return periods are desired, a theoretical probability distribution is fitted to the data. Many distributions have been developed and used for flood frequency analysis, however, the two most common are the Gumbel and log-Pearson Type III. The common procedure is to convert the data to a series of logarithms and calculate the mean, the skew coeficient. These values are used in a cumulative distribution equation to calculate probable values. If the distribution fits the recorded data well, then i t can be used to calculate flows as a function of probability. Although use of computers has greatly simplified the process, some difficulties s t i l l exist. Efforts are usually hampered by lack of acceptable data since records are often too short for reliable results. In addition, no one probability distribution has proven useful for a l l applications; and therefore, several must be tried to obtain the best f i t for each particular watershed. These inherent characteristics reduce the usefulness of frequency analysis in situations where simplicity is required and data are scarce. 2.2 Unit Hydrograph Method In contrast to an analysis of only historical events, the unit hydrograph method of forecasting flows differs from the flood frequency approach by considering a basin's response to an individual rainstorm. Even though the unit hydrograph is derived from recorded historical events, a minimum of only one recorded hydrograph and its corresponding rainstorm are a l l that is needed for its derivation. The development procedure is straight forward, but time consuming. A useful unit hydrograph can best be derived from a recorded hydrograph having a direct runoff volume equal to a depth of at least one unit over the entire basin area. The recorded hydrograph should also be the result of a uniformly distributed storm lasting close to the desired duration. The important issue is runoff depth (volume), since a recorded hydrograph also includes baseflow. This baseflow must be removed from the recorded hydrograph by one of several methods before the runoff depth can be calculated. Once obtained, each ordinate of the runoff hydrograph is divided by the runoff depth which yields a hydrograph having a total runoff depth of one unit. Random errors can be reduced by averaging the peak and time to peak of several unit hydrographs which are constructed from recorded hydrographs resulting from storms of similar duration. The final unit hydrograph must then be 9 Figure 2.2.1: Hydrograph Derived From a Unit Hydrograph of the Same Duration 1 0 drawn to pass through the average peak and s t i l l maintain a volume of one unit. The unit hydrograph may now be used to construct flow hydrographs representing the basin's response to storms of various durations which produce runoff volumes other than unity. Consider Figure 2 . 2 . 1 in which a hydrograph for a storm producing 3 units of runoff is produced from a unit hydrograph based on a storm of similar duration. Since the durations of the storms are the same, the ordinates of the unit hydrograph are multiplied by 3 to produce the expected runoff hydrograph. A unit hydrograph based on a storm of longer duration than an existing unit hydrograph can be constructed i f the desired duration is a multiple of the existing duration. As seen in Figure 2 . 2 . 2 , the existing hydrograph is lagged by the duration of the storm from which i t was developed as many times as necessary to equal the new storm duration (Figure 2 . 2 . 2(b). All of the ordinates are summed and then divided by the toal runoff depth of the summed hydrographs to form a new hydrograph of one unit depth (Figure 2 . 2 . 2(b)). Many of the drawbacks of the unit hydrograph approach to flood forecasting are associated with the variations in rainstorms. Although the procedure to extend the duration for which a unit hydrograph is applicable may be useful, i t is s t i l l an approximation, and is not as reliable as a unit hydrograph developed from the desired storm. If the data are available, i t is therefore best to develop a series of unit hydrographs based on storms of several durations. It should be noted that even storms of similar duration may have different intensity patterns which can result in very different basin responses i f conditions are right. The major drawback, however, is the necessary Time ( b ) * Summation of Lagged Unit Hydrographs Reduced to the Unit Hydrograph of Longer Duration Figure 2.2.2: Derivation of a Unit Hydrograph From One With a S h o r t e r D u r a t i o n 12 assumption that the rainfall is uniformly distributed over the entire basin. Since this is seldom the case, especially when large watersheds are considered, applications of the unit hydrograph are limited unless accomplished by computer techniques. 2.3 Computer Simulation Even though the theories used in computer simulation of flood flow were developed almost half a century ago, this approach to flood forecasting is relatively new and is s t i l l in the development stage. Although many different models have been developed, they are s t i l l based on one central idea. Input representing some form of precipitation is usually separated into at least two components such as 'overland flow' and 'infiltrated flow'. The overland flow component is transformed into an inflow hydrograph which is then routed to reflect the effects of the basin's storage characteristics. Precipitation diverted by infiltration may or may not be included in the final flow hydrograph since such considerations tend to complicate the model. Although this description is very simplistic, i t serves as a basis for general understanding of the simulation process. Variations of this simple modelling proces are numerous and exhibit a wide range of complexity. Some of the more complex models such as the United States Environmental Protection Agency's (SWMM) and the United States Department of Agriculture's (HYMO) take into detailed account snow-melt, interflow, baseflow, evapotranspiration, depression storage, and many other factors 1 8, 1 9. Impressive as this may be, such models are costly to operate and are usually difficult to use. These factors tend to discourage use of compex models for small water resource projects, so an effort has been made in this thesis to maintain simplicity. 1 3 2.3.1 Rainfall When simulation is used to produce a design flood, i t is imperative that the rainstorm used is representative of a storm having the design return frequency. Development of such a rainfall hyetograph can be accomplished by using 'intensity-duration-frequency' curves, statistical time distribution of rainfall, or simply recorded storms. The usefulness of each approach, however, is greatly dependent upon the application of the simulation model. Recorded storm events, for example, provide the assurance of authenticity, but correlation between the event and its return period is difficult to establish, especialy i f the record is short. In spite of this, such data can be useful to determine the stability of the model to simulate flows from the basin in question. A more useful approach is the development of a hyetograph from intensity-duration-frequency (IDF) data 2. By choosing an appropriate time interval and using an equation with coefficients derived from the IDF data, a hyetograph can be produced that will have the same volume as a uniformly intense storm based on the same duration. This provides a great deal of flexibility since the time interval, duration, and time to peak can be easily varied. In addition, the method can be used for basins that have l i t t l e or no data since IDF curves are usually available for surrounding areas. Time distribution of rainfall has been statistically analyzed by Huff and grouped according to characteristics such as duration, time to peak, and total r a i n f a l l 1 0 . The four dimensionless time distributions that he developed, plot cumulative percent of total volume against cumulative percent of storm duration, and can easily be used to develop hyetographs i f the desired volume and duration are known. Since Huff's original work dealt only with data from the east-central region of Illinois, similar curves must be produced from data local to the basin in question. Such work was done by W.D. Hogg on short duration storms in various regions of Canada8. Another drawback of this method is the difficulty of correlating return frequencies with appropriate values of volume, duration, and time to peak. 2.3.2 Inflow Hydrograph All of the rainfall that is produced does not result in streamflow immediately. Some of the rain is intercepted by foilage and is returned to the atmosphere by the evapo-transpiration process, stored in surface depressions, and infiltrated into the soil. Flow of the infiltrated precipitation is restricted by the soil, and therefore its introduction into the streamflow may be delayed a few hours, days, or even months as interflow and baseflow. In addition to these processes, the remaining effective rainfall does not appear at the basin outlet immediately either, since i t takes time for i t to travel there from wherever i t reaches the ground surface. Arrival of this overland flow to the outlet can be represented by a hydrograph and is considered the inflow hydrograph for the routing procedure. Conceptual models for the development of the inflow hydrograph are varied and numerous, but the most common models f a l l under the instantaneous unit hydrograph approach. A discussion of Kinematic Wave models can be found in Lee, but are not included here because they are not readily applicable to natural situations 1 4. 15 An Instantaneous unit hydrograph is a unit hydrograph derived from a storm of infinitely short duration. Although such a hydrograph is only imaginary, its concept is useful in developing an inflow hydrograph. By deriving a continuous function to perform the superposition of each instantaneous unit hydrograph due to the infinitely short effective rainfall, the hydrograph of the total overland flow can be developed. Although explicit solution of this convolution integral is impossible, several approximations have been developed. Clark proposed the use of a single reservoir with prescribed storage charactristics, Nash attempted the use of a series of identical cascading linear reservoirs, and Dooge proposed the concept of time-area diagrams which represent a series of linear channels and reservoirs 3 , 1 5 ,**. Each of these methods is empirical, and therefore a thorough understanding of how each works, along with experience in its application, greatly increases its usefulness and reliability. 2.3.3 Routing The heart of a flow simulation model is the routing equation since i t modifies the inflow hydrograph to reflect the effect of a basin's storage characteristics on overland flow. Routing procedures that are useful for watershed modelling are based on the relationship between discharge and storage. This relationship is described by the continuity equation, which in simple terms, is (2.3.3.1) 1 6 where I is the inflow rate, 0 is the outlow rate, and S is the storage 1 5 Solutions to Equation 2.3.3.1 are varied because of variations in algebraic manipulations and choices of coefficients and constants. The key concept, however, involves determining the effect on the basin outflow at the end of a particular time period due to the inflows at the beginning and end, as well as the outflow at the beginning of the same time period. This can be described in mathematical terms as °2 = C 0 I 2 + C 1 I 1 + C 2 ° l (2.3.3.2) where 0 2 and I 2 are the outflow and inflow respectively at the end of the time period, and 0^ and 1± are the outflow and inflow respectively at the beginning of the time period. The values of coefficients C0, C^ , and B2 are determined by the individual routing method since each one describes the relationship between storage, inflow, and outflow differently. 17 Chapter 3: ASSUMPTIONS AND THEORY 3.1 General Assumptions Natural processes are very complex, and therefore, assumptions must be made to provide a simplified basis on which to develop a descriptive model. This is especially true of models describing the hydrological process of basin runoff. These assumptions are intended to alert potential users to applications for which the model might be unsuited. The Estimated Parameter Flood Forecasting Model is based on the following assumptions: 1. The drainage basin is less than 10,000 hectares in area. 2. The return period is within the range of 2 to 200 years, preferably within the lower part of the range. 3 . Consequences of failure due to exceedence of the design flood are not disastrous. 4. The estimated mean peak flow is a result of using probable estimates of the variables required by the modelling process. The complete model consists of smaller, individual models that describe various aspects of the flood estimation process. Each sub-model is based on its own specific set of assumptions, and these will be included as necessary when each sub-model is discussed. 3.2 Chicago Method of Rainfall Hyetograph Synthesis Since the Estimated Parameter Flood Forecasting Model is designed for basins that have l i t t l e or no recorded prescription data, i t was thought that a method of synthesizing storms should be included. The Chicago method was chosen for several reasons, although the main reason was that the required variables are more easily estimated than those of other models. Additional reasons for selection include ease of programming, adaptability to a variety of meteorological regions, and use of intensity-duration-frequency curves. It may seem contradictory to state use of IDF curves as a reason for choosing a model designed for basins with l i t t l e recorded data, but IDF curves are readily available and can be adapted to uninstrumented sites easily. Chicago method of hyetograph synthesis is a very simple model that exhibits moderate flexibility. The original development was made by Keifer and Chu11, and is based on the following assumptions: 1. The total depth of runoff produced by the hyetograph of a given duration and frequency must equal the depth of run-off determined by the intensity associated with the same duration and frequency. 2. The intensity remains constant during any given time interval. 3 . The storm Is uniformly distributed over the drainage basin with no areal intensity fluctuations within a given time interval. 4. The time interval remains constant throughout the duration of the storm. 5. The chronological occurrence of the peak is insignificant, and therefore is arbitrarily located midway through the duration of the storm. 6. The duration of the peak intensity may be a multiple of the time interval, but may not be shorter than one such time interval. Assumption number six is an additional assumption included by the author since the selected time interval may be much shorter than is 19 practical to use with IDF curves. Too short a time-interval can result in a spiked peak because of very high intensity. This undesirable trait can be eliminated by increasing the duration of the maximum intensity which results in an overall reduced intensity, and thus a lower peak in the hyetograph. Consider the typical IDF curves shown in Figure 3.2.1. Rainfall intensity versus storm duration is plotted on ful l logarithmic paper so that the resulting curve approximates a straight line. The total rainfall produced by a storm of given duration and frequency can be determined by where R is the total rainfall in units of depth, U is the intensity in units of depth/time, and D is the storm duration in time units. (The value of U depends upon the selected return period, F). The Chicago method uses this simple relationship to form a rainfall hyetograph by considering the storm to be a compilation of several short storms that are equal in duration, but vary in intensity. The number of storms is determined by R = U D (3.2.1) N = D At (3.2.2) where N is the number of storms and At is the selected time interval. An ordinate of the hyetograph, which is equivalent to the depth of rainfall produced by one short storm, is determined by the general Return Frequency, F (years) Storm Duration, D ( logar i thmic scale) Figure 3.2.1: Typical In tens i ty -Dura t ion-Frequency Curves 2 1 equation. R. = U.D, - U. , D. , (3.2.3) 1 l i l - l i-1 where R^  is the total rainfall produced by the ith short storm with a duration equal to the selected time interval At and U\ is the intensity of the ith storm. The duration that determines the ith intensity from the IDF curve is D = i At (3.2.4) Consider Figure 2.2.2 in which a hyetograph with duration D = 3 At is constructed. The first ordinate is determined from Figure 3.2.2(a) by Rx = U:At (3.2.5) and is plotted in Figure 3.2.2(b). The second ordinate is then calculated by R2 = U2(2 At) - UxAt (3.2.6) and is also plotted. As before, the third ordinate is R3 = U3(3 At) - U2(2 At) (3.2.7) The Chicago method states that the total rainfall depth of a hyetograph must equal the total rainfall depth of a uniformly intense 22 storm of the same duration, as described by the IDF curve from which the hyetograph was developed. Note that the total rainfall depth is: R = Rj + R2 + R3 (3.2.8) which is also R = UjAt + U2(2 At) - ULAt + U3(3 At) - U2(2 At) (3.2.9) and, when reduced is R = U3(3 At) (3.2.10) which verifies the first assumption R = U3 D (3.2.11) It is not necessary to locate the peak at the beginning of the hyetograph, since natural storms usually are accompanied by antecedent precipitation. The usual method is to locate the peak centrally and alternate the remaining ordinates to preceed the peak in ascending order and follow the peak in descending order. This is illustrated in Figure 3.2.2(c). In adapting the Chicago method for a computer application, i t was necessary to develop a model of the IDF curve since interpolating appropriate values from IDF curves stored in files would be difficult and more restrictive. In addition, the IDF curves are similar to 23 •Selected Return Frequency, F Di D2 D3 Storm Dura t ion , D (logarithmic scale) ( a ) : Intensity - Duration - Frequency Curve R1 R 2 R 3 • A t -Time ( b ) : Intermediate Hyetograph ro R.1 "ro CC R2 O R3 cu 0 l*A r -Time ( C ) Final Hyetograph Figure 3.2.2- Construct ion of a Rainfall Hyetograph Using the Chicago Method 24 straight lines when plotted on f u l l logarithmic paper, so a linear model was selected as a first order approximation. Taking into consideration the properties of logarithms, the selected model is therefore log U ± = C! log D± + log c 2 (3.2.12) where c^ is the predominant slope of the curve and c 2 is the intensity at =1. Solving for U^. U i = ° 2 D i X (3.2.13) Substituting Equation 3.2.13 into Equation 3.2.3 yields R ± =c 2 [ D ^ l + 1 ) - D [ ^ > (3.2.14) Parameters c 1 and c 2 are a l l that is needed to describe a linear interpretation of an IDF curve, and can be easily obtained from any existing IDF data. To model a complete hyetograph, however, requires the additional parameter D, which is the storm duration, and a peak flattening parameter the author calls D^ . This parameter modifies the duration of maximum intensity so that the hyetograph peak may be reduced without changing the total depth of rainfall. Let N P - ^ (3.2.15) where N is the number of short storms that exhibit the maximum rainfall P 25 inensity and is the duration of maximum rainfall intensity. The ordinates of the first N intervals are calculated by P c 2 D < C1 + 1> Ri = R 2 = R 3 = R = - j j - ^ (3.2.16) P It is important that D < At to prevent extremely high intensity P values. 3.3 Horton's Infiltration Equation Since a certain portion of natural rainfall does not contribute to runoff, but is lost through various processes such as infiltraton, interception, and evapo-transpiration, provision has been made to account for these losses. These processes are complex, and although each one operates differently, the end result is a net reduction in the total effective rainfall. The author, therefore, has decided to combine all of these into one very general process and label i t infiltration since this is the predominant mechanism. In general, the.rate at which precipitation is lost to these natural mechanisms decreases as the storm progresses. Initially, the ground is not fully saturated and therefore is capable of absorbing and storing water. As the storm continues, the ground becomes more saturated, reducing the amount of water that is lost to infiltration and increasing the amount of water on the surface. The process of infiltration is limited by the maximum rate water can enter the soil. The actual infiltration rate may be less than or equal to this 'infiltration capacity', depending on the rainfall intensity since water 26 that is not available cannot enter the soil. Horton recognized this and demonstrated that the infiltration capacity decreases exponentially9. He approximated this phenomenon with the equation f = f c + (f 0 - f c) e " k t (3.3.1) where f, f Q , and f , are the actual, i n i t i a l , and constant infiltration capacities respectively, e is the napierian base, k is an empirical constant, and t is the time elapsed from the beginning of the storm. Parameters ffj and f may be measured by field tests, but k must be obtained from fitted curves based on Horton's equation. Its effect on the equation can be seen in Figure 3.3.1. As the value of k increases, the time for the infiltration capacity to reach a constant is shortened. The same effect would be achieved if the inverse of k was decreased. This idea is much more intuitive and is therefore pursued in developing a simple concept of k that can be related to the physical process. Let u = £ (3.3.2) The units of k are the inverse of time, therefore the units of u are time. It is probable that u can represent the time i t takes for the in i t i a l infiltration capacity f Q to be reduced by a fraction of the difference between i t and the constant infiltration rate f . Expressed mathematically, 27 f = f + (1 - x) ( f 0 - f ) (3.3.3) where f is the infiltration capacity at t = t and x is a decimal x x fraction of the difference between fn and f . The formulation of this u c relationship is clearly seen in Figure 3.3.2. Rearranging equation 3.3.1 and inserting the appropriate subscripts yields -kt f - f e X " / _ f ° (3.3.4) f° f c where t indicates the time at which f occurs. Remembering the assumed x x condition that u is equal to the time i t takes for f Q to be reduced to f , the substituting equations 3.3.2 and 3.3.3 into equation 3.3.4, one obtains e - 1 = 1 - x (3.3.5) which numerically yields x to be 0.632. Physically, then, one may consider k to be the inverse of the time i t takes for the difference between the in i t i a l and constant infiltation capacities to be reduced by 63.2%. This may not seem very intuitive, but the author feels i t easier to estimate u this way than to estimate k without any idea of how i t relates to the physical process. The author's modification to Horton's equation, which is the infiltration model in EPFFM is therefore Time, t Figure 3.3.1: Effects of the Parameter k on Horton's Equation 29 t f = f + ( f 0 - f ) e U ( 3 . 3 . 6 ) c u c 3.4 Inflow by Time-Area Method When using a routing procedure to model runoff from a drainage basin, the basin is described by one or more reservoirs situated at the basin's outlet. The Muskingum routing method uses only one such reservoir, and considers i t to modify the flow entering i t according to the basin's storage characteristics. Outflow from the reservoir is representative of outflow from the basin. Rainfall cannot be directly considered as input to this conceptual reservoir since i t takes time for the rain to reach the outlet as flow from various parts of the basin. It is necessary, therefore, to model this process by lagging the precipitation. Dooge accomplished this by dividing the basin into zones described by isochrones of travel time to the outlet 5. By determing the area of each zone, a time-area diagram such as the one in Figure 3.4.1 can be drawn. The number of isochrones necessary is determined by t where is the number of isochrones, At is the selected time interval, and t is the time of concentration. This latter variable is described c as the time i t takes for surface runoff from the remotest part of a basin to reach the outlet 2. Several methods of estimating the time of concentration have been developed, however, two of the more popular empirical methods are those 30 ro CD Total Basin Area = A1+A2+A3 +A^ +A^ R3 R4 R2 Rl R5 - A t -Time, t Figure 3.4.1: Time-Area Diagram Showing the Area that First Contributes Runoff Within a Given Time Interval 3 1 by Kirplch and Kerby 1 2, 1 3. The Kirpich equation is t = 0.00013 (3.4.2) c gO.385 where t is the time of concentration in hours, L is the length of the basin in miles, and s is the average basin slope. Kerby's formula is o n 0 467 t c -[§•!.£] • <3.4.3) where L is the length of the basin in feet, s is the average basin slope, and n is a retardance coefficient. Some suggested values of n are: Surface n impervious 0.02 smooth; packed base soil 0.10 moderately rough; base soil 0.20 poor grass; cultivated row crops 0.20 pasture 0.40 deciduous timber 0.50 deciduous timber; deep litter 0.80 coniferous timber 0.80 dense grass 0.90 These equations are useful for quick estimates, however, if the basin consists of a range of slopes and surface types, then hydraulic calculations will yield more satisfying results. If a time-area diagram was converted to flow and routed, the developed hydrograph would be the result of an instantaneous rainstorm. Since the instantaneous hydrograph is simply a tool, a complete runoff hydrograph can be computed by a convolution process. Consider the storm 32 hyetograph in Figure 3.42(a). The runoff after the first time period would be where is the flow reaching the basin's outlet at the elapsed time t = At, is the depth of effective rainfall during the first time period, A^, is the partial area that contributes during the first time period (see Figure 3.4.1), and c is a units conversion factor. At the end of the second time period, t * 2 At, since i t takes two time periods for the rain falling in the second areal zone to flow to the outlet. The third inflow hydrograph value, therefore is This convolution process is graphically illustrated by the segmented hydrograph in Figure 3.4.2(b). A useful form of the time-area diagram can be developed by plotting the cumulative area contributing to the outlet flow as a function of elapsed time. It can be made dimensionless by dividing ordinate values by total basin area and abscissa values by t £ . Such a plot (Figure 3.4.3) can be used with basins of any size and with any value of t . c This cumulative, dimensionless time-area curve is modelled in EPFFM by ql = Rx cAx ( 3 . 4 . 4 ) Q2 = c(R2A1 + RXA2) ( 3 . 4 . 5 ) Q3 = c(R3A1 + R2A2 + RXA3) ( 3 . 4 . 6 ) c '(0 R2 R3 Rl Time, t ( a ) : Rainfal l Hyetograph o c Q l = c ( R l R l ) Q2=cCR2Rl+RlR2) Q3=c(R3 H1+R2R2+R1R3) Q4=c(R3R2+R2R3+RlR4) Q5=c(R3R3+R2R4+R1R5) Q6=c(R3R4+R2R5) Q7=c(R3R5) Time, t ( b ) : Segmented Runoff Hydrograph " i g U T S 3.4.2: Const ruct ion of a Runoff Hydrograph Using a T i m e - A r e a D iagram 3 4 two quadratic equations g(t) and h(t) that are simultaneously solved under specific boundary conditions. These are continuous equations within the specified bounds that allow any number of time intervals to be used. With reference to Figure 3 . 4 . 3 , the boundary conditions are: 1 . At t i / t c = 0 . 0 , Ai/A = 0 . 0 ; where t± is the flow time associated with the ith isochrone, A^  is the area contributing to the outlet flow at t = t , and A is the total basin area. 3 . At t = t and A./A = A /A, g(t) = h(t); where t is the time e i e e and A /A is the decimal fraction of the total area at which the e values of the two equations are equal. 4 . At t = t and A,/A = A /A, d g(t)/dt = d h(t)/dt. e i e These equations are: 2 . At t./t = 1 . 0 , AjA = 1 . 0 . l c i fc- i t 2 A± = (2 = C l t) + i - (Cl+ - 1 ) ; 0 . 0 < t. < t ( 3 . 4 . 7 ) « 3 n and 03+^(1-03)-! c (I-C3)' 35 36 t < t < 1.0 (3.4.8) e i where C3 = t^/t^ = Ag/A and c^ is the ratio of the slope at the inflection point to the slope of a line passing through the origin and the inflection point. As can be seen, the inflection point is a function of A /A and t It , and does not have to l i e on the line A /A = e e c e t It . The restriction that cq = A IA = t It was imposed to simplify e c ° e e c calculations since experimentation showed that the location of the inflection point has l i t t l e effect on the peak of the final flow hydrograph. (In most natural basins, this restriction is valid only in the sense that seldom will a large percentage of the total basin area contribute its runoff within a small fraction of the time of concentration). Although there is not a direct correlation, one may consider the variable c 3 to correspond to the time i t takes runoff from the widest portion of the basin to reach the outlet. In addition to being a ratio of slopes, variable c^ can also be considered as the ratio of the maximum basin width to the average basin width. The widest part of the basin is important because the area of the zone containing i t usually contributes the greatest volume of runoff. This results in an increased rate of contribution and is reflected in the cumulative curve as the point of inflection. As the ratio c^ approaches unity, i t is indicative of uniformly spaced isochrones, which would be typical of rectangular basins. 3.5 Muskingum Routing Equation Storage routing is based on the relationship between the storage in a channel or reservoir and its discharge capabilities. Although designed to model the effects on an inflow hydrograph by a reservoir or channel reach, routing has also proven useful in modelling the storage characteristics of drainage basins. The most common methods of storage routing are based on the equation I1 + I 2 Oi + 02 j At ^ At = S2 - Sl (3.5.1) where the variables I, 0, and S are the inflow, outlfow, and storage respectively while the subscripts ± and 2 indicate the beginning and end of the routing period. This form of the continuity equation (see equation 2.3.3.1) is an approximation since i t is based on a discrete time period At and uses the average inflow, outflow and storage values of that period. This approximation implies that the hydrograph is a straight line during the routing period At, which must never be greater than the basin travel time tc. A solution to equation 3.5.1 was developed by G.T. McCarthy based on the Muskingum Basin work in flood control 2. He proposed that the storage could be described as S = K0 + KX(I -0) (3.5.2) where S is the total storage in the reservoir, I is the inflow, 0 is the outflow, K is a coefficient known as the storage constant, and X is a parameter relating the importance of the inflow and outflow on the storage capacity. Equation 3.5.2 is known as the Muskingum equation. The term KO represents the storage resulting from steady flow through the reservoir while KX(I - 0) represents the storage resulting from the unsteady flow created by an imbalance between the inflow and the outflow. By substituting equation 3.5.2 into equation 3.5.1 and collecting terms, the outflow at the end of the routing period is °2 = C 0 I 2 + C 1 I 1 + C2°l (3.5.3) where _ KX - 0.5 At .. "0 K - KX + 0.5 At c - KX _ 0.5 At  C l K - KX + 0.5 At r - K - KX - 0.5 At . C2 " K - KX + 0.5 At ( 3 * 5 , 6 ) The values of K and X must be determined by the user since equations 3.5.3 to 3.5.6 are used by EPFFM to perform the necessary routing. Linsley suggests a method of accomplishing this if recorded flow data are available 1 5. Using various values of X, XI + (1-X)0 is plotted as a function of S. The value of X that causes the data to be plotted as nearly as possible to a straight line is selected while K is equal to the general slope of the plot. When no data are available, experience must be relied upon to develop estimates of these parameters. For natural applications, reasonable values of X usually range from 0.0 to 0.3, although higher values may be used. Determination of K is more difficult, but certain observations have been made that indicate some correlation between K and t^. Steep slopes, small basins, low infiltration rates, and lack of vegetation tend to decrease the value of K while the opposite basin characteristics tend to increase its value. Such observations are supported by a study done by Russell on drainage basins in Surrey, British Columbia17. 3 . 6 Variance of Multivariate Equations The runoff modelling process cannot be expressed as a single, differentiable equation. However, an understanding of how the variance of multivariate equations is determined is essential to the development of a useful error estiamtion technique. An approximate method of calculating this variance is discussed by Benjamin and Cornell 1. An equation resulting from this discussion is presented as a basis for further development, and is n Var[Y] = Z 1=1 j=l n v i s 3x, _ i s X. 3x. i J - Cov[x X ] X. ! j (3.6.1) where Var[Y] is the variance of the multivariate equation Y of the form Y = g(X1, X2, X3, .... X n), 9g/3X1|Xi is the first partial derivative of the multivariate equation evaluated at the mean value of X^ , and CovFX.,X.l is the co-variance of the variables X, and X.. A useful i J i J parameter, the correlation coefficient is defined as 40 X i > X j Cov[X±,X ] °x. ax. (3.6.2) where a and a are the standard deviations of the variables X and X. 1 J respectively. This normalized version of the co-variance is bounded in the range of -1.0 to 1.0 inclusively, and describes the degree of correlation between the variables in question. Equation 3.6.1 can therefore be expressed as n n Var[Y] « E E i-1 j=l 9g 3XJ 3g 3X X . °X . PX .,X . J J J J (3.6.3) Equation (3.6.3) is the equation on which the method of calculating the variance, and consequently the standard deviation, of the mean peak flow in EPFFM is accomplished. The major assumptions are: 1. Each variable X. is normally distributed with a mean - and i X i standard deviation o . X l 2. The effects of each variable on the mean peak flow are also normally distributed. The author acknowledges that these assumptions are restrictive and perhaps simplistic, however, the reader is reminded that the object is to develop a methodology to which, if necessary, refinement can later be applied. Each variable used in the modelling process is described by a range of values consisting of a low, probable, and high estimate. The probable estimate is considered to be the mean value - while the low X . 1 and high estimates, X^ 0 a n <* X^ gQ respectively, correspond to the lower and upper limits of an 80% confidence interval as described in Figures 3.6.1. For the normal distribution, any value of the distribution can be calculated from the mean and standard deviation and z where z describes the distance from the mean in terms of standard deviations in the equation X = X. + za v (3.6.4) X x The value of z can be determined from standard tables that relate distance from the mean to the probability that the variable in question will be less than or equal to the selected value X^ . For the normal distribution, z = -1.28 for the probability p ( X i < X ± 1 0 ) * 0.10 (3.6.5) and z = 1.28 for the probability p(X± < X i 9 0) = 0.90 (3.6.6) where p is the probability of the described event. This means that 42 Figure 3.6.2: Approximate Method of Estimating the Slope of Function g at the Mean Value of Variable X: 43 X . 9 0 = X . + 1.28 o v (3.6.7) 1 X X and X ± 1 0 = X ± - 1.28 a x (3.6.8) i Solving for the standard deviation, x.,90 ~ X,-10 ° X . = 2.56 <3'6'9> x In order to determine a suitable approximation of the first derivative of g(X1, X2, X3, .... X , .... X^) with respect to the variable X^ , consider Figure 3.6.2. It represents the relationship between g and X^  when a l l other variables are held constant. Since 3g/9X^|x^ represents the slope of g at X, = X^ , the simplest solution is to use the available estimates of X^  to calculate an approximate slope. Us ing Xj,gg and X^Q, the slope at point (X^,g(X^)) is therefore 3X. x g ( x i 9 0 ) - g(x.irj) X i X i 9 0 ~ X i 1 0 (3.6.10) An approximation of the variance is finally obtained by substituting equations (3.6.9) and 3.6.10) into equation (3.6.3), which yields from the recorded precipitation data, and would therefore be expected to provide the best estimate of the peak flow. There are, however, at least two reasons why the recorded peak is higher than the upper confidence limit. The first reason is not as significant as the second, but i t s t i l l is important. When the standard deviation is calculated for a hydrograph simulated from recorded precipitation data, no contribution to the standard deviation is made since the data is considered to have no associated error. This is not true in actual fact since errors do occur during measuring and recording, however, no satisfactory way of determining a measure of this error exists. When the precipitation is synthesized, however, each variable contributes to the total standard deviation and is accounted for. This can be graphically seen by comparing the band widths associated with the hydrographs calculated from the synthetic and recorded hyetographs. The second, more significant reason that applies specifically to the storm of November 6 is that the runoff consists of snowmelt as well as rainfall. This storm happens to be one of the few rain-on-snow storms, and cannot be properly modelled by EPFFM. One final observation about the comparisons of the simulated and recorded hydrogrphs is in order. The author noticed that regardless of the flood magnitude, each recorded hydrograph exhibited a characteristic "spike" on its top that constituted the peak flow and a characteristic recession curve when the flow is reduced below 10 m3/s. It is possible that certain natural channels exist that transport water from the sub-basins to the outlet at a different rate than the rest of the runoff. This type of action could only be modelled by developing a 45 Var[Y] a n n 0.153 E Z 1=1 j=l [8(X± 9o)-8(X 1io)][g(X j9o)-8(X j l o)]-x. , x . 1 J (3.6.11) Unfortunately, a satisfactory method of determining the values of each correlation coefficient has not been developed, other than using equation (3.6.2). The values used in EPFFM have therefore been estimated according to the author's understanding of each relationship between the variables. 46 Chapter 4: COMPUTER PROGRAM 4.1 Application of Theory Although the development of an effective rainfall hyetograph, the determination of the time-area diagram, and the routing of the inflow to produce a runoff hydrograph are a l l very important in this model, they are simply tools to provide the necessary variables for equation (3.6.11). Since the objective is to determine the mean peak flow and the standard deviation of that mean, one runoff hydrograph corresponding to each value of the low and high estimates of the model variables, in addition to one hydrograph corresponding to the probable estimate of each of the variables must be calculated. This means that any value that is dependent upon the model variables must also be recalculated several times. The procedure used is to make the appropriate calculations based on the low or high value of the estimated variable and probable estimates of a l l the other variables that affect the value to be calculated. Since a particular calculated value is not always dependent upon a l l of the model variables, but is s t i l l required to develop the runoff hydrograph for each of the estimates, the value calculated from the probable estimates of these variables is used whenever necessary. An example might be useful. Consider the calculations of the coefficients for the Muskingum routing equation (equations (3.5.4) to (3.5.6)). They are dependent on the time interval t, the storage constant K, and the inflow constant X. Since only the probable estimate of the time interval is used in the model, just the constants K and X are affected by this process. When 47 the values of the coefficients corresponding to the low estimate of the constant K are calculated, the probable estimate of X and t are used. The same is true when the coefficients are calculated for the high estimate of K. The same principle is applied when the values of the coefficients due to the low and high estimates of X are calculated. When the runoff hydrograph corresponding to the low estimate of K is calculated, the coefficients calculated from the low estimate of K and the probable estimate of X and t are used. If, however, the hydrograph corresponding to the low estimate of the area was to be calculated, the coeffiecients calculated from the probable estimates of K, X, and t would be used since the area is not involved in the calculation of these coefficients. This principle permeates a l l aspects of the program, and since i t causes complications, i t must be kept in mind i f one is to understand the actual code. Once the runoff hydrograph corresponding to each of the variable estimates has been calculated, the peak flow from each hydrograph can be used to determine the standard deviation of the mean peak flow. No further calculations are needed to determine the mean peak flow since i t is assumed that the peak flow of the hydrograph calculated from the probable estimates of the variables is equal to the mean. It should be noted that provisions have been made to terminate the calculation of a l l hydrographs, except the one corresponding to the probable estimates, at a given point in the recession curve since only the peak flow is needed. Since there are times when one is not interested in obtaining the standard deviation, but is only interested in deterministic development of a runoff hydrograph, the program can be used to do this. In this 48 case, a l l of the necessary calculations are done only once using the probable estimates of the model variables. Flow charts describing the process involved in developing a runoff hydrograph within EPFFM are found in Appendix B. 4.2 Philosophy of Interactive Programming A lesser objective of this computer program is to allow hydrologists who are not very familiar with the use of computers to successfully operate the model. Unfortunately, many models rely so heavily on the user's ability to create data files and learn numerous commands that few hydrologists feel the effort is worth i t . This is especially true when application to a small project is considered. EPFFM, therefore, has been developed as an interactive program to encourage its use and provide access to those who have not yet mastered use of computers. Good interactive programs will allow a user who is somewhat familiar with computers to concentrate on his/her subject rather than spend his/her time reading.extensive documentation. This is accomplished by designing the program to ask the user for necessary information as well as to inform him/her when his/her responses are not appropriate. This latter consideration is extremely important since some responses can cause termination of the program, which is frustrating to say the least. By using error trapping techniques, most of these possibilities are detected and appropriate courses of action can be taken to correct the situation. This particular program is menu driven, which allows the user to choose the computer's course of action. Once the user chooses an option, more options are supplied until the desired result is achieved. An advantage of such a system is that the user can abandon his/her chosen course of action in favour of another. Visual feedback creates a sense of communication and in most cases, increases the user's confidence in the program. It should be mentioned that care has been taken to ensure a balance between user-friendly conversation and bothersome questions. 4.3 Special Considerations Since the program is designed to be operated either deterministically or probabilistically, provisions have been made to reflect the chosen mode while entering data or making modifications to the data. For example, i f the mode is chosen to be deterministic, then only one value of each variable is asked for by the program. If, however, the program is in the probabilistic mode, then low, probable, and high estimates of each variable are expected. Provisions have also been incorporated to allow the use of an actual rainfall hyetograph or prepared time-area data with either mode of operation. The standard deviations due to these variables are not calculated i f this is done since their use implies no uncertainty, even though in actual fact there is. This is done since i t is difficult to quantify the associated uncertainty. Similar provisions exist for data output since certain options are not applicable in one mode or the other. For example, if the user wishes to l i s t the effective rainfall values while in the deterministic mode, the user will obtian a single l i s t of hyetograph values. If however, the program is in the probabilistic mode, then several hyetographs are available due to the estimates of the variables that affect the effective rainfall. The user is then asked to identify the variable of interest before hyetograph values representing the effects of the low, probable, and high estimates of that variable are listed. In addition to the model variables, special variables called 'program parameters' have been used to provide flexibility. These parameters do not need to be entered by the user since they are initialized within the program to default values. They may, however, be modified to reflect the user's personal preference or to adjust the sensitivity of the program. A f u l l description of these parameters can be found in Appendix B. 5 1 Chapter 5: TRIAL BASIN RESULTS AND DISCUSSION It is always helpful to test a new model so that its capabilities and potential usefulness can be determined. If EPFFM is to provide reliable flood flows from estimated parameters, then i t should also be expected to provide acceptable values using recorded data. When analyzing the test results, i t is necessary to remember that EPFFM is not designed to model the shape of recorded flow hydrographs, but to provide a range of flows in which the user is reasonably sure that the flood associated with a desired return frequency exists. This means that reasonable differences in such items as time of peak and rate of recession should be expected. Computer models are designed to only function properly within the limiting constraints of each mathematical function i t contains. These mathematical functions are, at best, only approximations of the physical processes involved in the precipitation-runoff phenomenon, and cannot be expected to duplicate such mechanisms without some error. Further limits are placed on the model's capabilities of reproducing recorded flow when assumptions designed to simplify the complicated interrelationships between these physical processes are made. Such assumptions, however, are necessary i f the model itself is to be kept at a managable level of complexity. 5.1 Basin Description Carnation Creek is located on Vancouver Island, British Columbia, and was chosen as the tr i a l basin because of its extensive flow and meteorological instrumentation. During the last few years, starting in 52 1970, an extended research project designed to determine the effects of logging on salmon producing streams has been in operation6. This has yielded useful precipitation and flow data, and since the basin has an area of approximately 10 square kilometers, i t is a suitable trial basin. Unfortunately, some less than ideal characteristics do exist, but their presence only provides a greater challenge. One of the drawbacks of the Carnation Creek watershed is its geometry. Instead of resembling a simple shape that can easily be modelled, Figure 5.1.1 reveals that i t is actually comprised of several smaller basins. The desirable approach to obtaining reliable results would be to model each sub-basin storage, being sure to incorporate adequate lag times for each one. This is a lot of work, and since EPFFM's design philosophy is to provide a simple method of determining flood flows, the basin is treated as a whole. Basin characteristics include steep slopes (40% to 80%), extensive vegetal cover such as hemlock and cedar, and a shallow, non-permeable bedrock covered with coarse colluvial materials and a moderately thick organic layer. This topsoil/vegetation combination promotes high permeability, but since i t is shallow, nearly always saturated, and is located on steep slopes, the basin responds quickly to any rainstorms as rapid interflow. Some overland flow does occur in very intense rainstorms, especially in areas that have been logged. Annual precipitation ranges from 210 to 480 cm with most of the rain falling during the winter months. Although some snow occurs, precipitation is mostly rain, which is a main reason for choosing Carnation Creek as the t r i a l basin. 5 . 2 Two Cases Although numerous hydrographs were modelled, only two are included in this thesis for discussion since they represent the extreme situations. The first case consists of a hydrograph with a short return period. The peak flow of this particular hydrograph is 18.8 m3/s and according to a Gumbel frequency analysis of the annual peak flows, has a return period of about 1.2 years7. The second case looks at a hydrograph with a peak flow of 44.3 m3/s. Although this is the largest recorded flow for the basin, i t is estimated to have a return frequency of only 14 years. EPFFM is designed to model flood flows using precipitation data as well as synthesized storms, so the hydrograph in each case is modelled twice. The original precipitation was recorded every 0.5 hours in inches, and since metric units and a routing period of 0.25 hours were used in the modelling process, appropriate conversions were applied. Unfortunately, no intensity-duration-frequency curves exist for the Carnation Creek area, so rough estimates of the necessary parameters were derived from each recorded storm. The intercept c 2 was assumed to be the average of the two highest intensities (using the original data) since this parameter is defined to be the intensity corresponding to a storm duration of one hour. Calculations of the slope c^ was accomplished by equation (3.2.12) where U is the average intensity in mm/hr and D. is the duration of the storm in hours. 5.2.1 Case I: Short Return Frequency Although most water resource projects are not based on design floods with return frequencies of less than two years, the only annual peak flood data available having a short return frequency is the 18.8 m3/s flood of December 16, 1974. Despite its low return frequency, this flood is used as an example since i t is the result of a single, well defined storm. Precipitation data from two stations located at opposite ends of the basin (see Figure 5.1.1) were available, so an averaged rainfall hyetograph was constructed to more accurately represent the areal distribution of the storm. Plots of these hyetographs, along with a synthesized hyetograph, are located in Appendix A. The synthetic hyetograph was constructed according to the method described in Section 3.2 using values of c 1 = 0.215 and c 2 = 6.0 mm/hour. Although the shapes are different, each hyetograph yields very similar total precipitation values. This is very important since the Chicago method lacks the ability to synthesize the random dispersion of rainfall values about the peak, which is a main factor in determining the hydrograph's shape. The effects of these differences can be seen in Figures 5.2.1.1 and 5.2.1.2 where the simulated hydrograph calculated from the actual and synthetic hyetographs respectively are plotted with the recorded hydrograph. Included on each plot is the 80% confidence interval of the estimated peak flow. Summaries of the variable values used to produce each simulated hydrograph are also located in Appendix A. Each probable estimate was made according to the available data, however, the low and high estimates were chosen as best as possible to represent the range in which the actual values could be found. 2 0 T5 C o u <D Vi \ 0 S-<D •p <U E o D O 3 O Lu 15 10 5 80% Confidence Interval of the Peak Flows R e c o r d e d S i mu1 a t e d Estimated Return Period is 1.2 Years + + 10 T i me 2 0 ( h o u r s ) 3 0 4 0 Figure 5.2.1.1: Runoff Hydrograph for the Storm of December 16,1974; S imula ted by EPFFM using Recorded Precipitation Data from S t a t i o n s A and E in the Carnat ion Creek Watershed U l 57 5.2.2 Case II: Long Return Frequency Unfortunately, precipitation data from only Station "A" was available for the storm of November 6, 1978, so no average recorded hyetograph could be constructed. The recorded hyetograph and its synthetic approximation are, however, included in Appendix A with the summaries of the estmated variable values. Most of these estimated values are identical to those used in Case I, but some changes were made to reflect the difference between the associated return frequencies. Since the hydrographs in Figures 5.2.2.1 and 5.2.2.2 represent the largest recorded flood in the Carnation Creek basin, i t is important that the peak flows from the synthetic and recorded hydrographs agree. Although this may not appear to be the case, the following discussion in Section 5.3 provides some insights that are helpful in the interpretation of these results. 5.3 Discussion of Results Even though a lot of information can be gathered from the plots in Figure 5.2.1.1 to 5.2.2.2, some items need to be discussed. One of the most obvious is that none of the simulated hydrographs yield a peak flow equal to or greater than their corresponding recorded hydrographs. This is not as devastating as i t may seem since a l l except one of the actual peak flows f a l l within that interval which indicates that the simulation process has been reasonably successful. This is especially significant when one realizes that most of the variables have also been estimated. It may seem strange that the one exception to the above discussion about the 80% confidence interval is a hydrograph that seems to f i t the recorded hydrograph fairly well. This simulated hydrograph was produced 2 0 0 -J j J j ^ — j ! ! !— 0 10 2 0 3 0 4 0 T i m e ( h o u r s ) Figure 5.2.1.2: Runoff Hydrograph for the Storm of December 16,1974 in the Carnat ion Creek Watershed; Simulated by E P F F M using a Synthetic Hyetograph Produced by a Modi f ied Chicago Method 5 0 10 2 0 3 0 4 0 T i me ( h o u r s ) Figure 5.2.2.1: Runof f Hydrograph for the Storm of November 6,1 978; S imula ted by E P F F M using Recorded Precipitation Data from Sta t ion A in the Carnat ion Creek ui Watershed 5 0 0 _ ] j \ J j 1 1 ) J 0 10 2 0 3 0 4 0 T i me ( h o u r s ) Figure 5.2.2.2: Runoff Hydrograph for the Storm of November 6, 1978 in the Carnation Creek Watershed; Simulated by E P F F M using a Synthetic Hyetograph Produced by a Modif ied Chicago Method ° from the recorded precipitation data, and would therefore be expected t provide the best estimate of the peak flow. There are, however, at least two reasons why the recorded peak is higher than the upper confidence limit. The first reason is not as significant as the second, but i t s t i l l is important. When the standard deviation is calculated for a hydrograph simulated from recorded precipitation data, no contribution to the standard deviation is made since the data is considered to have no associated error. This is not true in actual fact since errors do occur during measuring and recording, however, no satisfactory way of determining a measure of this error exists. When the precipitation is synthesized, however, each variable contributes to the total standard deviation and is accounted for. This can be graphically seen by comparing the band widths associated with the hydrographs calculated from the synthetic and recorded hyetographs. The second, more significant reason that applies specifically to the storm of November 6 is that the runoff consists of snowmelt as well as rainfall. This storm happens to be one of the few rain-on-snow storms, and cannot be properly modelled by EPFFM. One final observation about the comparisons of the simulated and recorded hydrogrphs is in order. The author noticed that regardless of the flood magnitude, each recorded hydrograph exhibited a characteristi "spike" on its top that constituted the peak flow and a characteristic recession curve when the flow is reduced below 10 m3/s. It is possible that certain natural channels exist that transport water from the sub-basins to the outlet at a different rate than the rest of the runoff. This type of action could only be modelled by developing a 62 specific model based on extensive examination of the data. The author feels, however, that i f EPFFM is capable of estimating floods in a watershed such as Carnation Creek, then i t has potential for other applications. 63 Chapter 6: SUMMARY, CONCLUSIONS, AND RECOMMENDATIONS 6.1 Summary This thesis presents a fresh approach to flood forecasting by combining deterministic and probabilistic methods into a single computer model called the Estimated Parameter Flood Forecasting Model (EPFFM). A discussion of previous works forms a foundation on which theories about rainfall hyetographs, infiltration, overland flow, reservoir routing, and various of multivariate equations are developed and applied. Although rigorous development of each and every theory is not included, enough material is presented to inform the reader of EPFFM's origin, development, and usefulness. The model itself is designed to determine the mean peak flow and standard deviation of that mean from estimates of several variables. Although most of the variables can be determined from actual data, the contribution to the standard deviation is only calculated for each variable described by a range of values consisting of low, probable, and high estimates. This is accomplished by calculating two runoff hydrographs from each variable; one from the low estimate and one from the high estimate of the variable in combination with the probable estimates of the remaining variables. The peak flows of these hydrographs are used by an approximate multivariate method to calculate the standard deviation while the peak flow is calculated from the probable estimates of each variable. Since the developed model is a first order approximation, its scope of application is limited to small drainage basins and storms with return periods of less than 200 years. Its usefulness, however, lies in its approach of providing reasonable flood estimates and a measure of their reliability in situations lacking adequate data. 6*2 Conclusions Development of processes to model natural phenomena is at best a frustrating experience. Years have been spent developing, testing, and modifying models to account for each aspect of the precipitation-runoff process, yet satisfactory results are s t i l l being sought. Some of the models are so extensive and complicated that only the developers are able to use them with any success. Their use can only be justified for large, expensive projects where the consequences of failure are disastrous. Smaller projects that are to be constructed in areas lacking good meteorological and hydrological data have not been considered important enough to warrant use of these models. Unfortunately, less sophisticated models that can be operated by the hydrologists are not commonly available. The author believes tht EPFFM is a start in the development of such a useful and necessary tool. Although discussion of test results is presented in Chapter 5, i t is felt that EPFFM is capable of estimating the peak flows expected from a given rainfall with reliability. The additional confidence provided by a standard deviation is useful since i t indicates an upper limit which will probably not be exceeded. Although several variables are needed for the model, only a few have any significant effect on the magniture of the peak flow. Most important are the time of concentration, Muskingum's X and K, and the intensity-duration slope and intercept. Since these variables contribute the most to the standard deviation, i t is necessary to estimate these as accurately as possible. As the storm duration approaches the time of concentration, however, the effect of the time-area and infiltration parameters becomes more pronounced. In general, therefore, i t is necessary to keep the range of each variable within obvious and practical bounds to prevent inflated standard deviations as well as meaningless results. Used by experienced hydrologists who will carefully consider the results of each analysis and not simply accept them as absolute truth, the author feels that EPFFM can be an important and useful tool. It should be pointed out that because the model is based on simple approximations and restrictive assumptions, i t is unlikely that a modelled hydrogrph will f i t recorded flow closely. The reader is reminded that the magnitude of the peak flow, and not its time of occurrence is the model's objective. Significant deviation between the modelled and recorded hydrographs should be considered indications that the drainage basin in question has properties that deviate from the assumed conditions. 6.3 Recommendations The author recognizes that many limitations exist in the Estimated Parameter Flood Forecasting Model, and that improvements must be made. It is hoped, however, that the philosophy and approach of this model will be considered an i n i t i a l step in providing hydrologists with a useful design tool for small projects. The following recommendations are intended to identify areas that could use more research, although i t is also recognized that each reader will form his/her own opinions as to what should be improved. 66 1. The model routes only the overland flow and does not inbclude any method to account for the interflow. This, as usual, was done to maintain simplicity. When using actual flow data from Carnation Creek to test the model, i t became evident that some method to include a portion of the infiltrated flow in the final hydrograph would be useful. Although interflow is more evident in the recession part of the hydrograph, i t does increase the peak somewhat, especially in basins that react as quickly to changes in rainfall as does the Carnation Creek basin. 2 . For short durations, the shape and peak of a rainstorm greatly affect the flow hydrograph in basins that react quickly. A linear equation was used to model the intensity-duration-frequency curves, however, a higher order equation might better model the actual curve. This is not necessarily important for a l l geographical regions, but some IDF curves are anything but a straight line, even on f u l l logarithmic paper. 3 . With continued reference to IDF curves, i t might be useful to incorporate a method of entering actual data. The difficult part would be interpolating required values that are located between the entered points. 4. Perhaps some method other than the Chicago method could be used to distribute the rainfall values determined from IDF data when developing a hyetograph. Some sort of random distribution about a central point where the peak intensity occurs might be more useful 67 than the spiked hyetographs so characteristic of the Chicago method. 5. Determination of the standard deviation in EPFFM is very crude, but the approach can possibly be refined by the following method: a) Use an alternate, more general method to determine the slope of a function at a given point. b) Determine which probability distribution best describes each variable and its effect on the peak flow. It was assumed that each variable and its effect was normally distributed, but this is more than likely not true. c) Selections of each correlation coefficient should be based on more than simply good judgement. A thorough understanding of how each variable is interrelated should lead to a more objective method of selection. This would be very helpful since correlation coefficients directly affect the final contribution to the standard deviation. 68 SELECTED BIBLIOGRAPHY 1. Benjamin, J.R. and Cornell, C.A. "Probability, Statistics, and Decision Analysis for Civil Engineers", McGraw-Hill, Inc., New York, N.Y., 1970. 2. Chow, V.T. "Handbook of Applied Hydrology", McGraw-Hill, Inc., New York, N.Y., 1964. 3. Clark, CO. "Storage and the Unit Hydrograph, Transportation of the American Society of Civil Engineers", Vol. 110, pp 1419-1446, 1945. 4. Dooge, J.C.I. "A General Theory of the Unit Hydrograph". Journal of Geophysical Research, Vol. 64, #2, pp 241-256, 1959. 5. Gray, D.M. "Handbook on the Principles of Hydrology". Published by the National Research Council of Canada, Ottawa, Ontarion, 1970. 6. Hartman, G.F. " The Carnation Creek Experimental Watershed Project: Report for 1981 and 1982", Published by the Department of Fish and Oceans, Pacific Biological Station, Nanaimo, B.C., July 1983. 7. Hetherington, E.D. "A First Look at Logging Effects on the Hydrologic Regime of Carnation Creek Experimental Watershed, Proceedings of the Carnation Creek Workship, A 10-Year Review", February 24-26, 1982, Malaspina College and the Pacific Biological Station, Nanaimo, B.C. 8. Hogg, W.D. "Time Distribution of Short Duration Storm Rainfall in Canada", Published by Atmospheric Environment Service, Downsview, Ontario. 69 9. Horton, R.E. "The Rate of Infiltration in the Hydrologic Cycle", Transactions of the American Geophysical Union, Vol. 14, pp 446-460, June 1933. 10. Huff, F.A. "Time Distribution of Rainfall in Heavy Storms", Water Resources Research, Vol. 3, #4, pp 1007-1019, 1967. 11. Keifer, C.J. and Chu, H.H. "Synthetic Storm Pattern for Drainage Design", Proceedings of the American Society of Civil Enginers: HY4, pp 1332.1-1332.25, 1957. 12. Kerby, W.S. "Time of Concentration for Overland Flow", Civil Engineering, Vol. 29, #3, pp 174, 1959. 13. Kirpich, Z.P. "Time of Concentration of Small Agricultural Watersheds", Civil Engineering, Vol. 10, #6, pp 362, 1940. 14. Lee, K.B. "Development of a Versatile Water Quality Model", Master of Engineering Thesis at McMaster University, 1981. 15. Linsley, R.K., Kohler, M.A. and Paulhus, J.L. "Hydrology for Engineers", 2nd ed., McGraw-Hill, Inc., New York, N.Y., 1975. 16. Nash, J.E. "The Form of the Instantaneous Unit Hydrograph", International Association of Sc. Hydrology, Publication 45, Vol. 3, pp 114-121, 1957. 17. Russell, S.O. "Flood Probability Estimation", Journal of the American Society of Civil Engineers: HYl, pp 63-73, January 1982. 18. United States Environmental Protection Agency, Assessment of Mathematical Models for Storm and Combined Sewer Water Management, Cincinnati, Ohio, 1976. 19. Williams, J.R., "HYM0 Flood Routing", Journal of Hydrology, Vol. 26, pp 17-27, 1979. 70 Author's Note About EPFFM The estimated Parameter Flood Forecasting Model (EPFFM) was developed on a VAX-730 using FORTRAN 77. During its development, care was taken to use as few machine dependent statements and functions as possible. There are instances, however, when these had to be used to achieve a desired effect. Such statements and functions have been pointed out in the descriptive tables that follow as well as in the documentation statements embedded in the actual program code. APPENDIX A T r i a l Run Data 72 DRAINAGE BASIN: C a r n a t i o n Creek RUN: Recorded Hyetograph f o r December 16, 1974 USER SUPPLIED DATA VARIABLE LOW PROBABLE HIGH Time I n t e r v a l 0. 250 0 .250 0 . 250 hours Area 950 . 000 1 000 .000 1 050 .000 h e c t a r e s Time of C o n c e n t r a t i o n ' 1 . 500 2 .000 3 .500 hours B a s i n W idth R a t i o 1 . 200 1 .400 1 .700 T-A I n f l e c t i o n P o i n t 0. 200 0 .400 0 . 600 Muskingum "K" 1 . 000 1 .750 3 .000 hours Muskingum "X" 0. 280 0 .300 0 .320 I n t . I n f i l t r a t i o n 3. 000 4 .000 5 . 000 mm/hour S a t . I n f i l t r a t i o n 0. 000 0 .000 1 .000 mm/hour - I n f l . - R e d u c t i o n Time 2. 000 3 . 200 4 .000 hours B a s e f l o w 1 . 440 1 . 440 - •1 . 440 cms Mean Peak Flow i s ----- 16.935 cms S t a n d a r d D e v i a t i o n of Peak Flow i s 2 in s --"VARIABLE Area--- -- . Time of- C o n c e n t r a t i o n B a s i n Width R a t i o T-A J. n.f.1 e c t i o n - P o i n t ~ Muskingum ' "K" Muskingum "X" I n t . I n f i l t r a t i o n .Sat ....,1nf i l t r a t l o n . j . n f l ..-.".Reduction.-.Time -SUMMARY OF PEAK FLOWS . •.. LOW (CMS) HIGH(CMS)- % of VARIANCE 17.71 30.34 16, 1 7 16. -1-7. 1 7 16. 1 7 1 6 .1.-7 1 6 1 4 94 02 35 86 00 93 .17. 1 1 - - , , 1 i 1 1 _ • 1 45 98 -9.0-69 01 87 23 65-14v28 - 0.27 " -,,~/.0 ..66 18.54 0.42 2.50 31.96 1 .02 Table A"1 ^ .Va r i ab le Values used by E P F F M " t o S imula te the Runoff Hydrograph _..... Resul t ing from the Indicafed. . Storm Hyetograph ; C L . - ' r • 73 DRAINAGE BASIN: C a r n a t i o n Creek RUN: S y n t h e t i c Hyetograph f o r December 16,' 1974 USER SUPPLIED DATA VARIABLE LOW PROBABLE HIGH Time I n t e r v a l 0 . 250 0 .250 0 .250 hours Area 950 .000 1 000 .000 1 050 .000 h e c t a r e s Time of C o n c e n t r a t i o n 1 .500 2 .000 3 .500 hours B a s i n W idth R a t i o 1 .200 1 .400 1 .700 T-A I n f l e c t i o n P o i n t 0 .200 0 .400 0 .600 Muskingum "K" 1 .000 1 .750 3 .000 hours Muskingum "X" 0 .280 0 .300 0 .320 I n t . I n f i l t r a t i o n 3 .000 4 . 000 5 .000 mm/hour Sa t . I n f i l t r a t i o n • 0 .000 0 .000 1 . 000 mm/hour I n f l . R e d u c t i o n Time 0 .500 1 .000 1 .500 ..hour s I-D I n t e r c e p t 5 .000 6 . 000 7 .000 mm/hour I-D S l o p e . 200 0 .215 0 .220 R a i n f a l l D u r a t i o n — -- - 18 .000 ... 19 .000 20 .000 hours — D u r a t i o n of Max, I n t . 0 . 250 0 .500 1 .000 "hours • " Ba s e f l o w " . ' .440 1 .440 ' 1 . 440 cms Mean Peak Flow i s St a n d a r d D e v i a t i o n 14.953 cms of Peak Flow 1 s 2.896 cms SUMMARY OF PEAK FLOWS VARIABLE ' -Area - •- — - - ---- — Time of C o n c e n t r a t i o n B a s i n Width R a t i o T-A I n f l e c t i o n P o i n t Muskingum nK" -Muskingum "X" I n t . I n f i l t r a t i o n S a t . I n f i l t r a t i o n I n f l . R e d u c t i o n Time I-D I n t e r c e p t I-D S l o p e - R a i n f a l l - D u r a t i o n D u r a t i o n of Max. I n t . LOW(CMS) 1-4.28 15 1 4 1 4 , 15 14 14 . . . . . u 14 HIGH(CMS) 35 94 88 57 86 96 95 96 1 2 ..7 0 15.14 1-4-.-95-15 .02 5~. 3 , 5, 5, 3 5 4 2 14 17 1.4 1-4-1 4 -63-97 07 03 88 05 .95-. 18 ,90 ,21 .89 •-96-,87 %" Of VARIANCE -15.98 - -15.65 0.38 0.38 . 9.09 - / -0.66 • 0.05 ; - 19.28 -0.44 -37.91 . -0.13 0^ -0^  :  0.04 Table A*2: Variable Values used by E P F F M to S imu la te the Runoff Hydrograph' . Result ing from the Indicated Storm Hyetograph ; . DRAINAGE BASIN: C a r n a t i o n Creek RUN: Recorded Hyetograph f o r November 6, 1978 USER SUPPLIED DATA 74 VARIABLE LOW PROBABLE HIGH Time I n t e r v a l 0 .250 0.250 0 .250 hours Area 950 .000 1000.000 J 050 . 000 _..hectares Time of C o n c e n t r a t i o n 1 .000 2.000 3 .000 hours B a s i n Width R a t i o 1 .200 1 . 400 1 .700 T-A I n f l e c t i o n P o i n t 0 .200 0.400 0 .600 Muskingum "R" 0 .500 1 .750 3 .000 hours Muskingum " X " 0 .300 ~ 0.400 - -o .500 I n t . I n f i l t r a t i o n 0 .000 1.500 3 .000 "mm/hour S a t . I n f i l t r a t i o n 0 .000 0.000 1 .000 mm/hour I n f l . R e d u c t i o n Time 0 .500 -- 1 . 000 3 .000 hours B a s e f l o w 2 . 470 2.470 2 . 470 -cms Mean Peak Flow i s 38.110 cms St a n d a r d D e v i a t i o n of Peak Flow i s 4 .308. xms SUMMARY OF PEAK FLOWS VARIABLE LOW(CMS) HIGH (CMS) -. % -of Are a .... - • - 36.33 39.89 '...37. Time of C o n c e n t r a t i o n 39.83 36.73 . • 34. B a s i n W idth R a t i o 38.04 38.21 • J 0. T-A I n f l e c t i o n ..Point. V. ... 38.. L6..-.. 38.-36. . ;:*.;. o.. Muskingum "K" 39.36 " 36.84 1 o. Muskingum- "X" 36.63 39.82 10. I n t . I n f i l t r a t i o n .38.11 . 38 . 1 1 - -: 0. S a t . I n f i l t r a t i o n 38 . 1 1. 35.35 . : — 6. I n f l . .Reduction.Time . _._L" __3..8_..1 .1.." . 37...B.2 . . 0 . . VARIANCE-01 - •'. 5 7 _•• : 4 7 - . 52....::::;. : . 3 9 - "r 00 0 3 ; ' - • 93 Table A*3 : Var iable Values used by EPFFM t o - S i m u l a t e "the Runoff Hydrograph . Resul t ing from the Indicated .Storm Hyetograph . 75 DRAINAGE BASIN: C a r n a t i o n Creek RUN: S y n t h e t i c Hyetograph f o r November 6, 1978 USER SUPPLIED DATA VARIABLE LOW PROBABLE HIGH Time I n t e r v a l - 0 .250 0 .250 0 .250 hours Area 950 .000 1 000 .000 1 050 .000 hec t a r e s Time of C o n c e n t r a t i o n 1 .000 2 .000 3 .000 hours B a s i n W idth R a t i o 1 .200 1 .400 1 .700 T-A I n f l e c t i o n P o i n t 0 .200 0 .400 0 .600 Muskingum "K" - 0 .500 -• -1 .750 - 3 .000 hours Muskingum "X" 0 .300 0 .400 0 .500 I n t . I n f i l t r a t i o n 0 .000 1 .500 3 .000 mm/hour S a t . I n f i l t r a t i o n 0 .000 0 .000 . -•=i_l .000 mm/hour I n f l . R e d u c t i o n Time • 0 .500 1 . 000 3 .000 hours I-D I n t e r c e p t 1 4 . 000 1 5 .240 1 7 . 000 mm/hour I-D S l o p e 0 .350 ' 0 .363 - _ . . _ _ 0 .'37 0 ' • R a i n f a l l D u r a t i o n 10 .000 12 .500 " '.' ; 1 4 .000 hours D u r a t i o n of Max. I n t . 0 .250 0 .500 1 .000 hours B a s e f l o w 2 .47 0 - 2 .470 "• 2 .470 cms '". Mean Peak Flow i s 34.786 .cms "Standard " D e v i a t i o n of Peak Flow " i s 8 .""314" cms SUMMARY OF PEAK FLOWS i o n ' VARIABLE Area Time of C o n c e n t r a B a s i n W idth R a t i o T-A I n f l e c t i o n P o i n t Muskingum "K" Muskingum "X" I n t . I n f i l t r a t i o n S a t . I n f i l t r a t i o n I n f l . R e d u c t i o n Time I-D I n t e r c e p t I-D Slo p e : " R a i n f a l l D u r a t i o n . D u r a t i o n of Max. I n t "LOW (CMS ) 33. 17 38.87 34.71 .-34.30 ... 37.67 32.68 34.83 •- 34.79 3 4:82 32.15 35.07 34.66 35.21 HIGH(CMS) 36.40 31 . 3 7 35.21 • 35. 18 31.67 " 37.47 34.74 " 32.0.4 34. 1 1 38.52 3~4T"6~4 ""34.82 — 34.26 • % of VARIANCE 1 8 . 7 0 • .. 4 4 .29 - 0.7 3 • . : r.15 •1.2767 8.29 0.11 3.05 -1 .03 9.66 0.06 • -0.20 .Table A"4: Variable Values used by E P F F M ro Simulate the Runoff Hydrograph Resul t ing from the Indicated Storm Hye tog raph . . •!i I Ml ' I ! w p E •,! E 4-• C 3 i . I i 1 0 ' :T i me ( h o u r s ) 1 5 2 0 Figure; A" 1: Hyetograph ;jRecorded at Station A ; on December 16, 1974 in the Carnat ion Creek Watershed i J : : l ! . (A <U -P E C TTTufTT TTTIT 10 1 5 4 2 0 Figure A" 2: Hyetograph T iime ( h o u r s ) Recorded at S t a t i o n E on December 16, 1974 in the Carnation Creek Watershed ! I 3 . ! « -2 1 i . 0 0 R e c o r d e d S i m u l a t e d 1 ^ * i s . 15 2 0 ; 5 r ; • , 1 0 - j i • • jl T i m e : ! ( h o u r s ) F i g U T G JA"3:; Average of Hyetographs 'Recorded !at Stat ions A and E on December 16, 1974 in the Carnation Creek Watershed and 'tne Synthetic Hyetograph Produced by a Modified Chicago Method ; f , -~4 OO E <0 4 I I I I l il .rxrxffirxrMlil afl 0 11 Figure A"4: Hyetograph 1 0 T i me ( h o u r s ) R e c o r d e d S i mu1 a t e d 1 5 2 0 Recorded at S ta t ion , A on November 6, 1978 in the Carnation Creek Watershed and the iSynthefic Hyetograph Produced by : a Modified Chicago Method • i !: I- • ! I ! ! 1 li i i l APPENDIX B General Information About EPFFM 81 TABLE B.l: Description of User Supplied Variables and Parameters AREA - Total plane area of the drainage basin in hectares as determined from a topographical map. BASEFLOW - Flow of the stream or river in cubic meters per second at the point of interest when the storm begins. BASIN WIDTH RATIO - Ratio of the maximum basin width to the average basin width (see the last part of Section 3.4). CORRELATION COEFFICIENT - A normalized version of the co-variance that describes the degree of correlation between two variables. The correlation coefficients used in EPFFM have been assigned default values since they are internal program parameters. These values can be modified by the user if so desired (see Section 3.6). CUMULATIVE AREA - One of the four time-area curve formats available. This internal program parameter causes the time area curve to be calculated in the cumulative form with the ordinate values representing the sum of the actual isochrone areas in square meters (see TIME-AREA FORMAT). CUMMULATIVE PERCENTAGE - Same as CUMULATIVE AREA EXCEPT that the ordinate values are decimal fractions of the total drainage basin area (see TIME-AREA FORMAT). DETERMINISTIC - One of two modes in which EPFFM functions. In the Deterministic mode, a peak flow is calculated from single estimates of the user supplied variables only. No standard deviation is calculated. DRAINAGE AREA - See AREA DURATION OF MAXIMUM INTENSITY - The length of time, in hours, precipitation is maintained at the maximum intensity. This user supplied variable is only used when EPFFM models a rainstorm, and prevents the spike characterstic of rainstorms produced by the Chicago method when short time intervals are used. It should be noted that the Duration of Maximum Intensity must not be less than the chosen time interval (see Section 3.2). DURATION OF RAINFALL EVENT - Length of time, in hours, that significant precipitation is (or would be) recorded. ESTIMATION PARAMETER - Generic name for the "Low, Probable, and High" terms used to describe the three estimates of each user supplied variable (see Section 3.6). 82 FLOW INTERVAL APSILON - An internal program parameter used to control the length of the recession curve for each outflow hydrograph calculated. This only applies to outflow hydrographs calculated to determine peak flows other than the mean peak flow. Since this parameter is expressed as a decimal fraction, further calculations are terminated when the calculated flow is less than this fraction of the calculated mean peak flow. The default values can be modified by the user i f desired. INCREMENTAL AREA - One of the four time-area curve formats available. This internal program parameter causes the time-area curve to be calculated in incremental form so that the ordinate values are actual area, in square meters, between individual, consecutive isochrones (see TIME-AREA FORMAT). INCREMENTAL PERCENTAGE - Same as INCREMENTAL AREA except that the ordinate values are decimal fractions of the total drainage basin area (see TIME-AREA FORMAT). INFILTRATION RATE REDUCTION TIME - Length of time, in hours, i t takes for the difference between the i n i t i a l infiltration rate nd the saturated infiltration rate to be reduced by 63.2% (see Section 3.3) . INITIAL INFILTRATION RATE - The capacity of the topsoil to allow water to seep through i t to sub-soil layers at the time the rainstorm starts. This user supplied variable is expressed in millimeters per hour (see Section 3.3). INTENSITY-DURATION CURVE INTERCEPT - The precipitation intensity for a one-hour storm as indicated by the chosen Intensity-Duration-Frequency curve (see Section 3.2). INTENSITY-DURATION CURVE SLOPE - The predominant slope of the chosen Intensity-Duration-Frequency curve expressed in decimal form (see Section 3.2). MUSKINGUM "K" - (see Section 3.5) MUSKINGUM "X" - (see Section 3.5) PROBABILISTIC - One of two modes in which EPFFM functions. When in this mode, low and high estimates of the user supplied variables are also needed to calculate the standard deviation of the mean peak flow. RAINFALL DURATION - (see DURATION OF RAINFALL EVENT). SATURATED INFILTRATION RATE - The ratio of the time i t takes for water to reach the basin outlet from the isochrone nearest the widest part of the drainage basin, to the time of concentration (see Section 3.4). 8 3 TIME-AREA FORMAT - Although the values for each modelled time-area curve are calculated in the default CUMULATIVE PERCENTAGE format, three other formats are also available for listing purposes. (Also see CUMULATIVE AREA, INCREMENTAL AREA, and INCREMENTAL PERCENTAGE). TIME INTERVAL - The uniform, incremental time period on which a l l time dependent calculations are based. It is expressed in hours and is usually a fraction of an hour. TIME OF CONCENTRATION - The length of time, in hours, i t takes water to reach the basin outlet from the furthest point in the basin (see Section 3 . 4 ) 84 TABLE B.2: Variables and Parameters Used in EPFFM Name (dimensions); type - remarks Al;real - stores a calculated value temporarily to simplify following statements. AK;real - Same function as Al. AREA(3);real - Stores the low, probable and high estimates of the drainage basin's total plane area. AWTW;real - Stores the estimates of the Time-Area Curve Infection Point (see Table B-l). Bl,2, and 3;real - Temporarily stores calculated values to simplify following statements. BASEFLOW;real - Contains the probable estimate of the Baseflow (see Table B-l). BASINHD;character - Contains the name of the drainage basin as supplied by the user. BRATI0(3);real - Stores the estimates of the Basin Width Ratio (see Table B-l). C;real - Coefficient used in calculating the standard deviation of the peak flow. CO,CI, and C2;real - Calculated values used to simplify following statements. CINFLW;real - Temporarily stores a calculated value to simplify following statements. CLHEAD;character - Temporarily stores the name of the current Calculated Value until i t is displayed in a heading. CLMNUL(9);chacacter - Contains a machine dependent code that causes the terminal screen to be cleared. CMK(3);real - Stores the estimates of the Muskingum K coefficient (see Table B-l). CMKX;real - Temporary calculated value that simplifies following statements. CMNVL(4);character - Contains the Calculations Menu. CMX(3);real - Stores the estimates of the Muskingum X coefficient (see Table B-l). 85 C0RC0V(14,14); real - Contains the Correlation Coefficients (see Table B-l). CWMNVL(5);character - Contains the File Write Menu. D;real - Temporarily stores a calculated value so that following statements are less complicated. DATEHD;character - Stores the data as supplied by the user. DIS;real - Temporarily stores a calculated value to simplify following statements. DIT;real - The time coordinate of a dimensionless time-area curve expressed as a decimal fraction of the time of concentration. DLTPKFLW(2:14);real - Stores the set of differences between the low and high estimates of each user supplied variable. DMNVL(4);character - Contains the Data Menu. DRMXINT(3);real - Stores the estimates of the Duration of Maximum Intensity (see Table B-l). DS;real - The total amount of water, in millimeters, that can infiltrate through the top soil layer of the entire drainage basin under saturated conditions during one time interval of duration DT. DT;real - Stores the chosen duration of the Time Interval (see Table B-l). DT5;real - One half of the current value of DR; used to simplify following statements. DUMMY_(variable);real - Replaces real variables in common blocks that are not used within the specific subroutine that contain them. EXMNUL(5);character - Contains the Estimated Parameter Menu. EFRAIN(400, 3, 2:14);real - (See NOPT firs t ) . Stores the sets of Effective Rainfall Values corresponding to the estimates of each user supplied variable. EFRNVL(3, 8:14);real - Stores the total volume of effective rainfall produced by a single storm and is expressed in millimeters over the total drainage basin area. One value is calculated for each estimate of each user supplied variable that directly effects the effective rainfall. ENTMNUL(4);character - Contains the Entry Option Menu. ENTOPT;character - Contains a prompting message that assompanies each menu display. 86 EPSFLW;real - Stores the current value of the Flow Interval Epsilon (see Table B-l). ESTPKFLW;real - Stores the mean peak flow of the hydrograph calculated from the probable estimates of the user supplied variables. FLNAME;character - Stores the name of a data fi l e as suppllied by the user. GO;character - A dummy variable used with a READ statement that causes a l l streen scrolling to stop until the RETURN key is pressed. HEADING;character - Contains a heading that preceeds a l l menu displays. I;integer - An indexing variable used in DO loops. ID;integer - The value of ID corresponds to and identifies one of the 15 user supplied variables. ID1 and ID2;integer - Identifies the two correlated user supplied variables when the associated correlation coefficient is being modified. IDIM;integer - (See MD firs t ) . Passes the number of lines of the Modification Options Menu to be displayed on the terminal screen. IDT;Integer - Temporarily stores the value of ID1 while the values of ID1 and ID2 are exchanged to match the declared dimensions of CORCOV. IDUMMY_(variable);integer - Same as DUMMY- except that i t is only used to replace integer variables and arrays. IERR:integer - Passes an error condition number that is generated by the computer1s diagnostic software to the sub-routine ERRCODE for processing. The error condition corresponding to each number may vary with different machines. IFLAG;integer - When EPFFM is operating in the Deterministic mode, only a single column is displayed when any of the Calculated Values are listed. If, however, EPFFM is in the Probabilistic mode, then three columns representing the effects of the low, probable, and high estimates of the selected independent user supplied variable are displayed. Two exceptions are the time-area curve values and the rainfall values. If these are entered from the terminal or read from a data f i l e , they are treated deterministically and only one column will be displayed when they are listed, even if EPFFM is in the Probabilistic mode. IFLAG=1 indicates that the heading for a one column listing be used. IFLAG=2 indicates that the heading for a three column listing be used. 87 IFLRN;integer - Identifies the method used to obtain the rainfall values. If IFLRN=0, then the values were calculated from the appropriate user supplied variables. If, however, IFLRN=1, then the values were either entered from the terminal or read from a data f i l e . IFLTA;integer - Same as IFLRN except that i t is associated with the time-area curve values instead of the rainfall values. IHD;integer - Allows a single WRITE statement to use different format statements, depending on its current value. IIR(3);real - Stores the estimates of the Initial Infiltration Rate (see Table B-l). IMID;integer - Indicates the location of the point of infection on the time-area curve in number of consecutive time intervals after the rainstorm has started, rather than in actual hours or as a fraction of the time of concentration. IMID is used as an upper index limit in DO loops. IMX;integer - Temporarily stores the number of rainfall or time-area curve values that have been read from a data f i l e . This information is displayed on the terminal screen as part of a confirmation of the completed procedure. INFLW(400);real - Stores the result of the convolution process involving the effective rainfall and time-area curve values. These "inflow" values are then routed by the Muskingum equation. IPAUSE;integer - A flag passed to the subroutine PAUSE that indicates whether or not the terminal screen should be cleared before a new listing is displayed. IPLOT(60);integer - In order to plot the outflow hydrograph calculated from the probabl estimates of the user supplied variables, a character matrix with 21 rows and 60 column is used. The Y axis is scaled so that the peak flow is plotted in the first (top) row and a flow of zero is plotted in the twenty-first (bottom) row, which also corresponds to the X axis. An asterix is placed in each column to represent the appropriate flow at the corresponding time value. Since only 60 columns are available, the X axis must also be scaled to accommodate hydrographs that have more than 60 values. The values of IPLOT indicate the row in which an asterix is to be placed for each column. IREM;integer - If the rainfall or time-area curve values have either been entered from the terminal or read from a data f i l e , a special formatting arrangement is followed when they are listed with the other user supplied variables. Ten values per line are displayed which forms ten columns. The last line displayed usually has less than ten values, therefore, steps have been taken to prevent zeros or other garbage from being displayed in these excess columns. IREM stores the negative of the number of empty columns in the last row. 88 ISCALE;integer - (See IPLOT f i r s t ) . ISCALE is the scaling factor used in compressing the set of outflow hydrograph values to f i t within the 60 columns. If ISCALE = i , then every ith value is selected for plotting. ITATYPE;integer - Identifies the current choise of time-area curve format. The values of 1 to 4 correspond to Cumulative Percentge, Cumulative Area, Incremental Percentage, and Incremental Area respectively (see Table B.l). IVC;integer - (See MD first). The value of IVC is used by logical statements in the subroutine PRNTMNU to determine at which line of the variable Menu the display should start. J;integer - An incremented variable used within DO loops, the value of which is either calculated or determined by the DO statement parameters. JA;integer - When the rainfall values are calculated by the Chicago Method of hyetograph synthesis, the first value is also the largest since i t is calculated from the highest intensity value. Each consecutive value follows in descending order. To better simulate actual storms, the values are re-arranged so that the largest value is located in the middle of the hyetograph. The remaining values are alternated so that those occurring before the peak are arranged in ascending order, while those following the peak are in descending order. JA is incremented by 2 and is used to determine the current index value of the array that stores the temporary rainfall values. JC;integer - When a listing of information is being displayed on the terminal screen, there are usually more lines of information than can be viewed on the screen at one time. Subroutine WAITSTOP allows 15 lines of data to be displayed before suspending the scralling action. The first line usually contains some sort of heading to identify the displayed columns. JC is used to indicate i f and when this heading should be displayed. JD:integer - If EPFFM is operating in the Probabilistic mode, each set of Calculated Values is identified as the result of either the low, probable, or high estimate of one of the user supplied variables. Once the user suppleid variable has been identified, JD indicates the selected estimation parameter. JFLAG;integer - When the time-area curve values are being read from a data f i l e , JFLAG=1 indicates that the subroutine TACHECK has not found a l l of the values to be in ascending order. JHD;integer - Contains the passed length of a character string heading and is used in a variable FORMAT statement. 89 JID;integer - Similar to JD except that its value is determined logically rather than being selected by the user. It is only used when the time-area curve values are converted from one time-area format to another. JL;integer - (See IFLAG first). If the selected user supplied variable is the time of concentration and three columns of data are to be listed, each column will be a different length. This occurs because the number of values in each column is equal to the quotient of the time of concentration and the current time interval. To prevent zeros or other garbage from being displayed in the excess lines of the shorter columns, a variable FORMAT statement is used in conjunction with an implied DO loop. JL is used in this DO loop to indicate whether the line about to be displayed starts in the first, second, or third column. JSCALE;integer - (See IPLOT and ISCALE fir s t ) . JSCALE is the incremented index used within the DO loop that accomplishes the scaling procedure for the X axis. JTA;integer - Temporarily stores the passed length of the character string describing the current time-area format until i t is used in a variable FORMAT statement. JUD;integer - Similar to JTA except that the associated character string describes the units of the Calculated Value about to be displayed. K;integer - Incremented variable used by DO loops to calculate an appropriate index value for various arrays. Kl;integer - (See MD and IVC fi r s t ) . Temporarily stores the identification number of the first menu line to be displayed. KPKNT;integer - Stores the time (in number of elapsed time intrevals) when the mean peak flow occurred on the hydrograph calculated from the probable estimates of the user supplied variables. This value is used as a check to be sure that outflow values currently calculated are part of the recession curve of one of the remaining hydrographs. L;integer - (See IFLAG and JL fir s t ) . Is is a formatting variable that stores the number of blank spaces between the "time" column and the first value displayed after i t on the same line. LFLAG;integer - (See LPO fir s t ) . If the user selects the List/Print option when he wants a hardcopy of one or more calculated values, LFLAG indicates whether or not any values were actually selected and consequently written to the temporary "printer" f i l e . If LFLAG=-1, then i t means the "printer" f i l e is empty and will be destroyed. If, however, LFLAG=1, then the file's contents are queued to the hardcopy device. 90 LN;integer - Temporarily stores the number of characters a passed character string contains. These strings are usually headings used in displays of listed values. The value of LN is used in variable FORMAT statements to correctly place these headings. LPH;character - Stores a character string that is used as a prompt when the low, probable, and high estimates of user supplied variables are to be entered from the terminal. LPO;integer - When the user wishes to view one or more of the Calculated Values, he has several options. He may have them displayed on the terminal screen, have a hard copy listing made, or have them written to a permanent f i l e . If he desires a hard copy listing, he may choose to have the values written directly to a temporary f i l e which is later queued to the hard copy device or he may use the List/Print Option. This option causes the selected values to be displayed on the terminal along with a prompt asking if a hardcopy listing of these values is s t i l l desired. LPO, used with LPLOT, controls the procedures of such an operation. If LPO and LPOT both equal -1, then only a terminal screen listing is displayed. When LPO and LPOT both equal 0, then the List/Prin Option is active. If the user indicates that he wants the displayed values listed on a hard copy, LPO is set equal to 1 which causes the values to be written to the temporary f i l e . When this is done, LPO is set equal to LPOT (which equals zero). If LPO and LPOT both equal 1, the List/Print Option is inactive and the selected values are written directly to the temporary f i l e . LPOT;integer - (See LPO fir s t ) . Used only to reset LPO back to its selected value after being temporarily changed. M;integer - Many sets of calculations are repeated to determine the effect of each estimate of the user supplied variables on the peak flow. Each user supplied variable is used consecutively as an "independent" variable. Using the probable estimates of a l l the other user supplied variables, these sets of calculations are made using the low estimate of the "independent" variable f i r s t , then repeated using the high estimate. (The calculations using the probable estimates of a l l the user supplied variables are only done once to avoid repetition). M is used within DO loops to indicate whether the low, probable, or high estimate of the "independent" variable is to be used. M(14);integer - (See M, above, fir s t ) . Same function except that this array is used in different DO loops. The current value of M's dimension corresponds to the identification number of the "independent" user supplied variable. M(8:14);integer - Same as the array M above, except that i t is valid only for the user supplied variables with identification number 8 to 14. 91 MAX;integer - (See IREM f i r s t ) . MAX stores the number of values to be displayed in any of the lines. MAXA(2);integer - (See IFLAG and JL firs t ) . MAXA(l) and MAXA(2) are set equal to the number of values to be displayed in the first and second columns respectively. MAXRNjinteger - (See IREM fi r s t ) . MAXRN indicates the number of lines to be displayed i f the rainfall values have either been entered from the terminal or read from a data f i l e . MAXTA;integer - (See IREM fir s t ) . MAXTA indicates the number of lines to be displayed when the time-area curve values are entered from the terminal or read from a f i l e . MD;integer - Each menu has a title and any number of options following i t . These menus are stored in character arrays, with the first values corresponding to the title and the last values corresponding to the final option. In this way, each line of a menu has an associated numerical value. Although a l l of a menu's options are usually displayed, there are times when only a portion of these options are necessary. When the subroutine PRNTMNU is called to display a menu, the value corresponding to the last line to be displayed is passed and stored in MD. MENU(20);character - (See MD fi r s t ) . MENU contains the passed contents of the array in which the specified menu is stored. MFLRN; integer - Not only does the method of obtaining a set of rainfall or time-area curve values affect operational procedures, so does the mode in which EPFFM is operating. Obviously, i f EPFFM is in the Deterministic mode, only the probable estimate of each user supplied variable is used, regardless of how the rainfall or time-area curve values were obtained. If, however, either of these two sets of values were entered from the terminal or read from a data f i l e when EPFFM, is in the Probabilistic mode, then they are also treated as deterministic values. In order to follow appropriate courses of action, i t is necessary to identify how each set of values should be handled. MFLRN = 1 indicates that the rainfall values must be treated deterministically while MFLRN=3 indicates that several sets of values were calculated from the the estimates of each user supplied variable concerned. MFLRN is used in much the same way as NOPT. MFLTA;integer - Same function as MFLRN except that MFLTA is associated with the time-area curve values instead of the rainfall values. MID;integer - (See JA fi r s t ) . MID identifies the middle time interval of the hyetograph and is used in the rearranging process. MMNUL(6);character - Contains the Main Menu. 92 MNUID;integer - (See MD f i r s t ) . MNUID=99 identifies the calling subroutine as VCHOOSE. MODMNUL(5);character - Contains the Modified Options Menu. MPEAK;integer - (See JA f i r s t ) . A modification to the Chicago Method of hyetograph synthesis is to allow the peak intensity to extend over several time intervals, thus flattening the characteristic "spike". MPEAK stores the number of time intervals, each having a duration equal to the current value of DT, over which the peak intensity extends. MXFL;integer - Before the outflow hydrograph is plotted, the user is asked to supply the number of hours of flow data that he would like displayed. The suppllied number of hours are converted into an integer number of time intervals and stored in MXFL. MXFLNT;integer - The maximum number of time intervals that can be used with any set of values is 400. This corresponds with the maximum dimension of various arrays such as OUTFLW, RIN, EFRAIN, and others. Many repetitive calculations are done by DO loops set to go through 400 cycles. This may, in some cases, be excessive, so the upper index of 400 was substituted with MXFLNT. In this way, the user may reduce the number of time intervals involved and subsequently the number of calculations carried out by changing the value of MXFLNT in the subprogram BLOCK DATA. It should be noted, however, that i f the user wants to increase the number of available time intervals to more than 400, he must also red-dimension the appropriate arrays. MXSTNT(3,8:14);integer - Stores the number of values contained in each set of rainfall and effective rainfall values. The values stored in MXSTNT will vary because of the different estimates of each user supplied variable used to calculate the indicated sets of values. MXTANT(3,2:14);integer - Same as MXSTNT except that i t is associated with the time-area curve values instead of the rainfall and effective rainfall values. N;integer - Same as MXSTNT except that i t is temporarily used only when each set of rainfall values is calculated. When the calculations have been completed the value of N is transferred to the appropriately dimensioned MXSTNT. NA;integer - One of many incremented variables used within a set of nested DO loops. NC;integer - (See M fir s t ) . NC controls the amount by which the first index of the DO loops that perform these repetitive calcualtions is incremented. When NC=2, the probable estimate of the "intependent" user supplied variable is skipped, thus eliminating unnecessary calculations. 93 ND;integer - When EPFFM is in the Probabilistic mode, the single baseflow value is added to each peak outflow value calculated from the estimates of a l l the user supplied variables. If, however, EPFFM is in the Deterministic Mode, the baseflow is only added to the peak outflow calculated from the probable estimates of these variables. This process is accomplished by a single DO loop using ND as the incrementing index. If ND=1, then the first index is incremented by 1 until its value is 14. If ND=13, then only one cycle is made. NI;integer - Temporarily stores the appropriate value of MXTANT since i t must be used in several statements and NI is less cumbersome to use than a fully dimensioned MXTANT. NOPT;integer - (See M firs t ) . NOPT is usually used as the upper limit of the DO statements that perform these calculations and therefore aids in controlling the number of cycles the loop will perform. If N0PT=1, the EPFFM is in the Deterministic mode; i f N0PT=3, then the mode is Probabilistic. NP;integer - (See M and NOPT fir s t ) . In order to select the appropriate estimate of the "intependent" user supplied variable, NP is used in conjunction with the first DO statement parameter. If EPFFM is in the Deterministic mode, NP=1, and the probable estimate of the "intependent" variable is used. If the mode is Probabilistic, then NP=0 and the current estimate corresponds to the value of the in i t i a l DO statement parameter. NPRN;integer - (See IFLAG and MFLRN fir s t ) . Operates in a similar fashion as NP except that NPRN is only associated with rainfall values and indicates whether or not these values should be treated Deterministically. NPTA;integer - Same as NPRN except that i t is associated with the time-area curve values. OUTFLOW(400,3,2:14);real - Stores the outflow hydrograph values calculated from the estimates of each user supplied variable. The set of values calculated from the probable estimates is stored in 0UTFLW(I,2,2,). PAR2;real - Temporarily stores the difference between one value of PARREA and its preceding value. PARREA(100,3,2:5);real - Stores sets of time-area curve values in the Cumulative Percentage format. If the values have not been calculated, then they are stored in PARREA(I,2,2). PKFLW(3,2:14);real - Stores the peak outflow values of the hydrograph calculted from each estimate of the user supplied variables. PL0TFLW(60,21);character - Contains the character matrix in which the plot of the outflow hydrograph is stored. 94 PMNUL(4);character - Contains the Program Parameters Menu. POMNUL(4);character - Contains the Parameter Modification Menu. RAIN(400,3,8:14);real - Stores the sets of rainfall values. If they have not been calculted, the single set is stored in RAIN(I,2,14). RDURATION(3);real - Stores the estimates of the Duration of Rainfall Event (See Table B.l) REPLY;character - Temporarily stores the option code entered by the user in response to a displayed menu. RMNUL(3);character - Cntains the Run Type Menu. RNTRCPT(3);real - Stores the estimates of the Intensity-Duration Curve Intercept. (See Table B.l). RNVMNUL;character - If the rainfall values have been entered from the terminal or read from 2 data f i l e , then any menu listing user supplied variables normally used to calculate rainfall values must be modified. Instead of displaying the names of these variables, the string stored in RNVMNUL is used. RSL0PE(3);real - Stores the estimates of the Intensity-Duration Curve Slope. (See Table B.l). SIR(3);real - Stores the estimates of the Saturated Infiltration Rate. (See Table B.l). STDDEV:real - Stores the standard deviation of the mean peak outlow. STRING:character - Contains a passed character string for determination of its length. SUBVAR(2:14);real - The total variance of the mean peak outflow is actually a sum of the variances due to the uncertainty of each user supplied variable. SUBVAR stores the percent of the total variance that each user supplied variable is responsible for. T90(3);real - Stores the estimates of the Infiltration Rate Reduction Time. (See Table B.l). TA(3);real - The time-area curve values are stored in two formats; the Cumulative Perentage and the Incremental Area. When listing these values, the user may select any of the four available formats, therefore, some conversions must be completed before some of the values can be displayed. TA temporarily stores each of these converted values until i t is displayed. TAEF;real - Temporarily stores a calculated value to simplify following statements. 95 TAMNUL(5);character - Contains the Time-Area Format Menu. TARREA(100,3,2:14);real - Stores sets of the time-area curve values in the Incremental Area format. If the values have not been calculated, then the single set is stored in TARREA(I,2,2). TATPNM(4);character - Contains the titles of each time-area fom=rmat so that they may be displayed in headings. TAVMNUL;character - Same as RNVMNUL except that i t corresponds to the time-area curve values. TC(3);real - Stores the estimates of the Time of Concentration. (See Table B.l). TCORCOV;real - Temporarily stores the new value of a correlation coefficient when i t is to be modified. TEMP;character - Once the user has activated EPFFM, he may want to analyze data from several drainage basins or change the mode of operation. The first time he enters the user supplied variables, he is asked for preliminary information which is used as an identification heading on hard copy listings. During subsequnt data entries he is only asked for the name of the drainage basin since the name of the user and the current data will not have changed. If the user has indeed changed basins, he may enter the new name. If not, he can simply press the RETURN key and the heading will remain unchanged. TEMP stores the user's reply until i t can be analyzed and acted upon. TEMP;real - Temporarily stores a calculated value to simplify following statements. TEMPVAR;real - Temporarily stores a calculated value to simplify following statements. TEMPVAR(2:14);real - Temporarily stores the variance of the mean peak flow due to each user supplied variable. TEST;character - Temporarily stores the name of a fi l e suplied by the user. It is used in several logical statements. TIME;real - (See MXFL firs t ) . TIME stores the number of hours of flow data as supplied by the user. TRAIN(400);real - (See JA fi r s t ) . Stores a set of calculated rainfall values until they can be properly arranged. UNITS;character - Temporarily stores a character string representing the units, i f applicable, of the currently identified Calculated Value until i t can be displayed in a heading. USERHD;character - Stores the name if the user for heading purposes. 96 V(3,l);real - If EPFFM is in the Probabilistic Mode, the low, probable and high estimates of each user supplied variable are examined as they are entered to ensure that they are in ascending order. V temporarily stores the set of passed values. VAR(*,l,l);real - An array with variable dimensions that temporarily stores a set of values read from a data f i l e until i t is passed on to the appropriate storage array. VARIABLE(3,15);real - Initially stores the estimates of each user supplied variable when they are fir s t entered. These values are then "transferred" to the appropriate arrays by use of an EQUIVALENCE statement at the beginning of each subroutine in which they are used. VARIANCE;real - Stores the total variance due to the uncertainties of the user supplied variables. VARMENU(15);character - Contains the prompts used when the user supplied variables are to be entered. VARTA1,1 and 3;real - When the time-area values are either entered or modified, they are checked for ascending order. (These values are always entered in the Cumulative Percentage format). VARTA1, 2, and 3 temporarily store the three consecutive values while they are being examined. VB(2:14);character - Stores abbreviated names of most of the user supplied variables and displays them in headings. VHD(2);character - Stores two headings that are used when the user supplied variables are listed. VHD(l) stores the heading used when EPFFM is in the Probabilistic mode and VHD(2) is used when i t is in the Deterministic mode. VMNUL(17);character - Contains the Variable Menu which consists of the user supplied variable names. VNAME(15);character - Same as VB except that ful l names of each user supplied variables instead of abbreviations are stored for heading purposes. VNAMED(15);character - Stores the units, i f applicable, corresponding to each user supplied variable. These character strings are used, in conjunction with those stored in VNAME. X(6);real - Stores the values to be displayed on the X-axis of the outflow hydrograph plot. These time values are located every 12 columns. Y(20);real - Stores the values to be displayed on the Y-axis of the outflow hydrograph plot. These outflow values are located every 5 lines. YTITLE(20);character - Stores the Y-axis label for the outflow hydrograph plot. 97 TABLE B.3: Description of Subroutines BASEFLWCLC - Adds a scaler value of the baseflow to each of the outflow hydrograph values calculated from the "probable" estimates of the user supplied variables. The baseflow is also added to each of the peak outflow values. BLOCKDATA - Initializes many of the variables and parameters used in EPFFM. Also identifies each of the common data blocks. CLHFRM - Controls the format of the heading that preceeds a calculated value when i t is listed on the terminal screen, depending on whether EPFFM is operating in the Deterministic or Probabilistic mode. CLHFRMW - Same as above except that the heading and calculated value are listed on a hardcopy device rather than the terminal screen. CLMNUS - Lists the calculated values on the terminal screen or writes them to a f i l e which is later queued for printing on a hardcopy device. CLVFRM - Resets the formatting variables JL and L used in subroutine CLMNUS (see the description of these variables in Table B . 2 ) . CMNUS - Controls which values should be calculated and whether they should be listed on the terminal screen, printed on a hardcopy device, or written to a fil e for future reference. CWMNUS - Writes calculated values to permanent files as directed by the user. The calculated values that may be written to a f i l e are rainfall, effective rainfall, time-area curve, and the probable estimated outflow hydrograph values. DATENT - Allows input of the user supplied variables from the terminal. Provisions are made to have actual time-area and rainfall values entered either from the terminal or read from a fil e , or they may be calculated. (If these vlues are to be calculated, appropriate parameters are asked for by EPFFM as user supplied variables). DATIN - Controls the actual input of the user supplied variables. DATLIST - Controls the listing of the user supplied variables once they have been entered. DATMOD - Allows modification of the user supplied variables once they have been entered. Also controls the execution of this procedure. 98 DMDOPT - Provides the user with four ways of modifying the time-area and rainfall values that already have been entered or calculated. The user may elect to enter new values from a f i l e or the terminal, calculate new values, or directly modify the existing values from the terminal. DMNUS - Controls whether the user supplied variables are to be entered, listed, or modified. DNTOPT - Controls whether the time-area and rainfall values are to be entered from the terminal, read from a f i l e , or calculated. DTACLC - Converts the time-area values from the Cumulative Percentage format to the Incremental Area format. This is done only i f actual values were entered from the terminal or read from a f i l e . ECHOOSE - Allows the choice of whether the low, probable, or high estimate of the currently specified user supplied variable is to be used to identify the selection of a set of calculated values when EPFFM is operating in the Probabilistic mode. EFRNCLC - Controls the calculation of the effective rainfall values according to the selected conditions such as program mode and how the rainfall values were determined. EFRNVLCLC - Calculates the total effective rainfall. ERRCODE - Processes input error conditions and displays appropriate messages on the terminal screen. (It should be noted that the error numbers used in this subroutine are machine dependent). ERROR - Displays an error message on the terminal screen whenever a logical input error is detected. FILENT - Controls the reading of time-area or rainfall values from a fi l e . HDPRNT - Writes several character strings to the "printer" f i l e as a header for hardcopy listings. HORTON - Calculates the effective rainfall values using Horton's infiltration rate equation. HYDCLC - Controls the calculation of the various outflow hydrographs according to the specific conditions. IMNUS - Lists the introduction to EPFFM on the terminal screen. LENGTH - Calculates the length of a passed character string. MUSKNGM - Calculates outflow hydrographs using the Muskinghum method. MXFLCLC - Allows the user to select the number of outflow hydrograph values to be listed. 99 MXTANTCLC - Calculates the Index variable MXTANT which specifies the number of time-area values required by EPFFM according to the low, probable, and high estimates of the time of concentration. OPENRFL - Opens the fi l e from which the actual time-area or rainfall values are to be read. (It should be noted that the actual statements which accomplish this task may be machine dependent). OPENWFL - Opens a permanent fil e to which selected calculated values may be written. (It should be noted that the statements which actually accomplish this task may be machine dependent). PAUSE - Clears the terminal screen before a new listing if the previous listing is no longer needed for reference. (Note that the character string stored in variable CLRUT100 is terminal dependent). PDNTCHK - Checks for ascending order of the low, probable, and high estimates of the user supplied variables as they are entered from the terminal. PLOTHYD - Plots the outflow hydrograph calculated from the probable estimates of the user supplied variables. This can be done on the screen or on the hardcopy device. PMNUS - Allows the user to l i s t , print, and modify the internal program parameters. PRINT - Allows the use to indicate i f a calculated value (or set of values) listed on the terminal screen should also be printed on a hardcopy device. PRNTCNFRM - Displays a message on the terminal screen confirming that selected data to be printed on a hardcopy device has been queued to that device. PRNTMNU - Lists the various menus on the terminal screen. PRNTOPT - Allows the user to choose if the selected calculated value is listed on the terminal screen before i t is written to the "printer" file for a hardcopy listing. If this option is chosen, the user is asked to confirm his decision to have the selected value or values listed on the hardcopy device. RNCLC - Calculates the actual rainfall values if they have not been entered from the terminal or read from a f i l e . RNNTOPT - Controls the method by which the rainfall values are to be entered or i f they are to be calculated. RUNMNUS - Allows the user to select the Deterministic or Probabilistic program mode. 100 STDFLWCLC - Calculates the standard deviation of the peak outflow i f and only if EPFFM is in the Probabilistic mode. TACKECK - Checks the actual time-area values for ascending order when they are being entered from the terminal or read from a f i l e . TACLC - Calculates the actual time-area values in the Cummulative Percentage format i f they have not been entered from the terminal or read from a f i l e . TANTOPT - Controls the method by which the time-area values are to be obtained. TRMNLNT - Controls the terminal entry procedure required for entering actual time-area and rainfall values. VCHOOSE - Allows the user to identify the user supplied variable of interest and its effects on the chosen calculated set of values. WAIT - Suspends screen scrolling action during a listing. WAITSTOP - Same as above but also provides the option to terminate the listing procedure completely. L i s t i n g of EPFFM at 02:21:20 on UUN 13. 1984 f o r CCid=GZAC Page 1 101 1 PROGRAM EPPFM 2 ************************************************************************ 3 * C o n t r o l s t o t a l o p e r a t i o n s of the program. ( C o n t a i n s and p r o c e s s e s * 4 * the MAIN MENU.) * 5 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *'* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 6 CHARACTER MMNUL(7)*50,REPLY*2 7 C0MM0N/BLK7/ MMNUL 8 301 CALL PRNTMNU(MMNUL,7) 9 READ'(A2) ' .REPLY 10 * ^ ***** i n t r o d u c t i o n 12 * 13 IF(REPLY.EO . 'I ') THEN -14. - CALL IMNUS 15 * •|g ***** u s e r s u p p l i e d v a r i a b l e s ( d a t a ) . 17 * 18 ELSE IF(REPLY.EO.'D ') THEN 19 CALL DMNUS 20 "* 21 ***** C a l c u l a t e d v a l u e s . 22 * 23 ELSE I F(REPLY.EQ. 'C ') THEN 24 CALL CMNUS -25 * 26 - ***** Program p a r a m e t e r s . 27 * 28 ELSE IF(R EPL Y.EO. 'P ') THEN 29 CALL PMNUS 30 * " 3 1 ***** E x i t s program., 32 * 33 ELSE IF(REPLY.EO.' E ') THEN 34 GO TO 302 35 — ELSE •—- - . . . . . 3S CALL ERROR(*301 ) 37 ""END IF ----- ••• -38 - • G O TO. '301" "- " " 39 302 STOP - - - •. . . 40 1 END . _ . .. .... 41 . * • 42 * - : - -44 " S U B R O U T I N E BASFLWCLC •"" ~ " - " 4 5 ************************************************************************ 46 * Adds a s c a l a r v a l u e of the b a s e f l o w to each v a l u e of the OUTFLOW HYD-* 47 * ROGRAPH c a l c u l a t e d from the PROBABLE e s t i m a t e s of the USER SUPPLIED * 48 * VARIABLES . " The s c a l a r v a l u e i s a l s o added- to each of the PEAK OUT- -* 49 ' * FLOW v a l u e s . - • • • - i - ' ~ - -;— ... '• • * -50-- — ****** *.*_*_*_* *.* * * * * * * .* ** **************** *_* * ******************* * * * * * ***** * * _51 '_ 1 JREAL*4 OUTF LW(400,3,2: 14) " 52 C0MM0N/BLK6/ NOPT,/BLK1 1/ NP./BLK1 7/ DUMMY 1 , MXFLNT — _ 53 C0MM0N/BLK22/ DUMMY2,ND 54 C0MM0N/BLK2O/ DUMMY3(2: 14) .ESTPKFLW,OUTF LW,PKFLW(3,2: 14) 55 C0MM0N/BLK34/ BASEFLOW ~ " " " "v 7~ 1 56 * 5 7 ***** L o 0 p to add the s c a l a r v a l u e to the PROBABLE OUTFLOW HYDROGRAPH 58 * : ... ' 59 DO 201 1=1.MXFLNT 60 201 OUTF LW(I ,2,2) = OUTFLW(1.2,2) + BASEFLOW 6 1 * - . . _ . . _ . e 2 " ***** Loop to add the s c a l a r v a l u e to each of the PEAK OUTFLOW v a l u e s 63 * 64 DO 202 ID = 2 . 14.ND 65 NC = 2 66 IF(ID.EO.2) NC = 1 67 DO 202 1=1,NOPT,NC 68 J = I •>• NP 69 PKFLW(J.ID) = PKFLW(d.ID) + BASEFLOW 70 202 CONTINUE - . . . . • 71 * -• • . - .'• - -72 ***** The ESTIMATED PEAK OUTFLOW must a l s o be s c a l e d up w i t h the_ 73 . ***** BASEFLOW 74 * -75 ESTPKFLW = ESTPKFLW + BASEFLOW ' . 76 END 1" . ... .VV -102 77 * - _ ... 78 79 * 82 BLOCK DATA + + + + 84 * I n i t i a l i z e s many of the -vari ab1es used throughout the program and .* 85 * subprograms , * 87 R E A L * 4 EFRNVL(3,8: 14 ) ,I IR(3 ) .OUTFLW(400.3.2: 14 ) 88 CHA RACT E R * 4 VB(2: 14) 89 CHARACTER*10 LPH 90 CHARACTER"-1 1 VNAMED (15) 91 CHARACT ER * 2 2 TATPNM(4).UNITS,VNAME ( 15) 92 CHARACTER*28 ENTOPT 93 CHARACTER*30 BAS INHO.DATEHD,USERHD 94 CHARACTER'MO CLHEAD 95 CHARACTER*50 CLMNUL(9),CMNUL(4),CWMNUL(5).DMNUL(4),ECMNUL(5) 96 CHARACT E R * 50 ENTMNUL(4),HEADING.MMNUL(6) ,M0DMNUL(5) 97 CHARACTER * 50 PMNUL(4),POMNUL(4),RMNUL( 3 ) .TAMNUL(5),VMNUL(17) 98 CHARACTER*60 VARMNU(15),VHD(2) 99 COMMON/BLK1/ CLMNUL./BLK2/ CMNUL./BLK3/ CWMNUL,/BLK4/ DMNUL 100 C0MMCN/BLK5/ ECMNUL./BLK6/ N0PT./BLK7/ MMNUL./BLK8/ IPAUSE 101 C0MM0N/BLK8A/ ENTMNUL./BLK8B/ MODMNUL 102 COMMON/B LK9/ RMNUL,/8LK10/ VARIABLE(3, 15 ) ,/BLK 1 1/ NP ID.NC/BLK13/ vJC. VMNUL./BLK 14/ IVC ~': K 1 ,MNUID,VNAME EFRAIN(400,3,2: 14 ) , TARREA( 100.3.2: 14) DT,MXFLNT,/BLK18/ IFLRN,IFLTA . . .. _ .. MXTANT(3 , 2 : 14 ) , PARREA ( 100, 3 , 2 : 5 ) - --. .. ..... SUBVAR(2: 14),ESTPKFLW.OUTFLW,PKFLW(3.2: 14 ) .STDDEV CORCOV( 14.14). ITATYPE,TATPNM EPSF LW,ND,/BLK23/ MXSTNT(3,8:14),RAINt400.3.3: 14! LFLAG.LPO,LPOT./BLK25/ ENTOPT.HEADING JL,L./BLK27/ PMNUL,POMNUL.TAMNUL.VB BASINHD,DATEHD,USERHD,/BLK29/ VHD,VNAMED LPH,VARMNU,/BLK31/ CLHEAD,MAXA(2).UNITS MFLRN.NPRN,/BLK33/ MF LTA.NPTA./BLK34/ BASEFLOW ^ E F RNVL _. _ 117 DATA BASINHD,OATEHD/2*' . '/ 118 DATA ENTOPT/' E n t e r d e s i r e d o p t i o n code >'/ - - — 119 - D A T A EPSFLW/0.70/.LPO/-~1/ - " -. - - I . . _._ 120 DATA HEADING/' CODE OPTION'/ "•'_; ' " ' '. _ _ 121 DATA I PAUSE/O/. I TATYPE/1 / - —• - — — -122 " C ATA L P H / " ( L , P , H ) ? ' / ' ' ' ' ' -'^ ' • ' • ' : " : • • - ••••• ; • " 123 DATA MNUID/O/,MXFLNT/400/ 124 DATA ND.NOPT.NP/1.1,1/ 125 DATA USERHD/' '/ 126 DATA (CORCOV(I,2),1=2,14)/1.0,-0.8,0.1.-0.1,-0/8,6*0..0,0.5,-0.5/ _ : 127 . ._ DATA (CORCOV( I ,3) . 1 = 3, 14)/1 .0,-O. 2, . 1 ....8 ,-0.-7..3* . 3,2*0.0.-0. 2. . 2/ 128 " DATA (C0RC0V(I,4).I=4,14)/1 • 0. -0. 6 , -0 • 2 7oV2 , 3 » - 0. 1 .'4 «Q. 0/ - ' jr"""-129 - DATA ' ( CORCOV( I , 5 ) , I =5 , 1 4)7 i .6 , O .27-0::2 r3*0~. 1 T4 *0 '. O/^T.~I"-"'-- / — — - ~ '130 - - DATA (CORCO V ( I , 6 ) , 1=6,14) /'170. -O r2 , 3*0:2 ,:2:*0T'0;'-0 . 1TO: i " / " — i 131 DATA ( CORCOV ( 1.7) , 1=7, 14)/ 1 :0, 3 * - O . 1 ,0: tv -O ... 1 TO . 1 . -0 . 5/ • -. 132 DATA (CORCOV(I,8),1=8,14)/1.0,0.8.0.5,4*0.0/ 133 DATA (CORCOV( I ,9) , 1=9 , 14-)/1 .0,0. 5,-0.-1 .0. 1 ,-0. 1 ,0. 1/ -134 DATA (CORCOV( I , 10) , 1= 10, 14)/-1 .0.-O. 4 ,0. 4 ,-O. 5 .0. 1/ 135 DATA (C0RC0V(I, 1 1 ) , 1 = 1 1 , 14)/1 .0,-0. 1,0. 1,-0.2/ 136 DATA (CORCOVfI , 12) , 1 = 12, 14)/1 .0.-0. 1 ,0. 1/ 137 DATA""CC0RC0VtIT13) ; T= V 3 r l 4 ) / V. 0V~0T3~/ 138 DATA CORCOV( 14 .- 14 )/ 1 . 0/ 139 DATA TATPNM/'Cumu1 a t i v e P e r c e n t a g e ' , 'Cumulative Area', 140 1 ' Incremental' P e r c e n t a g e ' r ' l ncremental A r e a ' / - - — 141 DATA VB/'AREA' , 'TC ' , 'BWR ' , 'T-AI' . ' M-K ','M-X ','IIR ','SIR ', 142 1 ' IRRT ' '. ' I-OI ' . ' I-DS' , ' RD ' . 'DMI '/ 143 DATA VHD/' VARIABLE LOW PROBABLE HIGH 144 1 145 1' - VARIABLE — VALUE '/ 146 DATA VNAME/'T1 me.Interva1 ', 'Area' . 'Time of C o n c e n t r a t i o n ' , 147 1'Basin Width R a t i o ' , 'T-A I n f l e c t i o n P o i n t ' . 'Musk 1ngum "K"' , 148 1'Muskingum " X " ' . ' I n t . I n f i l t r a t i o n ' , 'Sat. I n f t 1 t r a t i o n ' , 149 1 ' I n f l . R e d u c t i o n Time','I-D Intercept','.I-D S l o p e ' , 150 1 ' R a i n f a l l Durat1 on'.'Durat1 on of Max. Int.',.'Basef1ow'/ 151 .-: DATA VNAMED/' hour s ' , ' h e c t a r e s ' , 'hours' ,2*' '-.'hours'.'" ', -• -152 12*'mm/hour','hours','mm/hour',' ',2 *'hours', 'cms'/ 153 DATA CLMNUL/'CALCULATIONS LIST MENU:'. • - -154 1 ' M Mean and St a n d a r d D e v i a t i o n of Peak', — 155 1' 0 " E s t i m a t e d O u tflow Hydrograph V a l u e s ' , 103 COMMON/BLK 12/ 104 " COMMON/BLK 15/ 105 COMMON/BLK 16/ 106 COMMON/BLK17/ 107 COMMON/BLK19/ 108 COMMON/BLK20/ 109 COMMON/BLK21/ 110 COMMON/BLK22/ 111 COMMON/BLK24/ 112 . COMMON/BLK26/ 113 COMMON/BLK28/ 114 C0MM0N/BLK30/ .115 COMMON/B LK3 2/ 116 . COMMON/BLK35/ 103 156 1' P P l o t "of Outflow Hydrograph', 157 1 ' R Ra i n f a l 1 Va1ues 158 1' E E f f e c t i v e R a i n f a l l V a l u e s ' , 159 1' T Time-area V a l u e s ' , 160 1' V E f f e c t i v e R a i n f a l l V o l u m e ( s ) ' . 161 1' S Summary of Peak Flows'/ 162 DATA CMNUL/'CALCULATI-ONS MENU:', 163 1' L L i s t C a l c u l a t e d V a l u e s ' , 164 1' P P r i n t C a l c u l a t e d V a l u e s ' , 165 1' W W r i t e V a l u e s to a F i l e ' / 166 DATA CWMNUL/'FILE WRITE MENU:', 167 1' R R a i n f a l l V a l u e s ' , 168 1' E E f f e c t i v e R a i n f a l l V a l u e s ' , 169 1' T Time-Area Curve V a l u e s ' , 170 1' 0 E s t i m a t e d Outflow Hydrograph V a l u e s ' / 171 DATA DMNUL/'DATA MENU:', 172 1' I Input', 173 1 ' L L i s t ' , 174 1 ' M M o d i f y ' / 175 DATA ECMNUL/'ESTIMATION PARAMETER MENU:'. 176 1' 1 Low'. 177 1' 2 P r o b a b l e ' , 178 1 ' 3 High' . 179 1' -1 Ret u r n to P r e v i o u s Menu'/ 180 DATA ENTMNUL/'ENTRY OPTION MENU:', 18 1 1' F F i l e ' . 182 1 ' T T e r m i n a l ' , ' 183 1' C C a l c u l a t e ' / 184 DATA MMNUL/'MA IN MENU:', 185 1' I I n t r o d u c t i o n ' , 186 1 ' D Data Menu', 187 1' C C a l c u l a t i o n s Menu', 188 1' P Program Parameters Menu', 189 1' E E x i t From Program'/ 190 DATA MODMNUL/'MODIFICATION OPTIONS MENU:'. 191 1' F E n t e r New V a l u e s From a F i l e ' , 192 1' T En t e r New V a l u e s From T e r m i n a l ' , . 193 1' C C a l c u l a t e New Values'.. 194 __ .1 ' M Mod i f y Ex i s t i ng V a l u e s From T e r m i n a l ' / 195 DATA PMNUL/'PROGRAM PARAMETERS MENU:', 196 1' L L i s t Parameters', 197 1' P P r i n t Parameters', " ' - • 198 1 ' M M o d i f y P a r a m e t e r s ' / - 199 . DATA POMNUL/'PARAMETER MODIFICATION MENU:',- — - """ ; f E " ~FTbw I n t e r v a 1 "Ep"s i 1 on':v? 201 1' T Time-Area Format', 202 1' C C o r r e l a t i o n - C o e f f i c i e n t s ' / 203 DATA RMNUL/'RUN TYPE MENU:', 204 1' D D e t e r m i n i s t i c ' , 205 1' P P r o b a b l i s t i c ' / 206 _ DATA T AMNUL/ 'TIME- AREA FORMAT MENU : ^  ; • _ ""' 207 1' 1 — — c u m u l a t i v e P e r c e n t a g e ' ; """"" " : " — ' 208 1' 2 -Cumulative A r e a ' , " " ~ — "" .:-"•-209 1' 3 Incremental P e r c e n t a g e ' , — 210 1' 4 Incremental A r e a ' / 211 DATA VARMNU/' Time I n t e r v a l i n hours ? ... 212 1' D r a i n a g e Area i n h e c t a r e s . ? 213 1' Time of C o n c e n t r a t i o n i n hours ? 214 1' B a s i n . W i d t h R a t i o ? (1.0 <= r a t i o <= 2.0) "' ' 2 1 5 " " -" V " Time-Area Curve -" I n f l ect'i on "Po i nt"~? tOVO ""< = " x~<= rrO")"T - 216 1' Muskingum "K" i n hours? - .'., 2 17 1' Muskingum " X " ? ( 0 . 0 < = X < = 0 . 5 ) 218 1' I n i t i a l I n f i l t r a t i o n Rate i n m i l l i m e t e r s per hour ? ', 219 1' S a t u r a t e d I n f i l t r a t i o n Rate i n m i l l i m e t e r s per hour ?'. 220 1' I n f i l t r a t i o n Rate R e d u c t i o n Time i n hours ? 221 1' I n t e n s i t y - D u r a t i o n Curve I n t e r c e p t i n m i l l i m e t e r s .7 222 1' I n t e n s i t y - D u r a t i o n Curve S l o p e ? 223 1' D u r a t i o n of R a i n f a l l Event i n hours ? -224 1' D u r a t i o n of Maximum I n t e n s i t y i n hours? 225 1' B a s e f l o w i n c u b i c meters per second ? '/ 226 DATA VMNUL/'VARIABLE MENU:', 227 1 ' 1 T ime Interva1 ', 228 1 ' 2 Are a ' , 229 1' 3 Time o f " C o n c e n t r a t i o n ' , _ — 230 1' 4 B a s i n Width R a t i o ' , 231 1' 5 T-A I n f l e c t i o n P o i n t L o c a t i o n ' , 232 1 ' 6 _^Musk1ngum "K " ' . 7 Musk i ngum "X"' . 8 • I n i t t a l -Inf i.l-trat ion.'. _ .. 9 S a t u r a t e d I n f i l t r a t i o n ' , 10 I n f i l t r a t i o n R e d u c t i o n Time' 11 I-0 Curve I n t e r c e p t ' , 12 I-D Curve S1 ope' . 13 R a i n f a l l D u r a t i o n ' , 14 D u r a t i o n of Maximum I n t e n s i t y ' 1 5 Baseflow', -1 R e t u r n To P r e v i o u s Menu'/ 233 234 _ . - . 235 236 237 238 239 240 • 24 1 242 243 END 244 * 245 * 246 * 247 SUBROUTINE CLHFRM(I FLAG) 24Q. + + ^ 249 * C o n t r o l s the format of the heading t h a t p r e c e e d s a CALCULATED VALUE 250 * t e r m i n a l s c r e e n 1 i s t i ng. 252 CHARACTER CLHEAD *40,UNITS* 22,VNAME( 15) *-22 _ 253 C0MM0N/BLK6/ NOPT,/BLK 1 2/ ID./BLK13/ JC 254 COMMON/BLK15/ I DUMMY 1,IDUMMY2,VNAME 255 C0MM0N/BLK31/ CLHE AD,I DUMMY3(2) .UNITS' 256 101 FORMAT(/,6X.A<JHD>,' due to the ',A22) 25 7 102 F0RMAT(/,6X, 'TI ME(HR)' , 15X, 'LOW ,8X, 'PROBABLE' , 10X , 'HIGH' ,/) 258 103 FORMAT(6X, ' ( ' ,A<JUD>. ' ) ' ) 259 104 F0RMAT(/,6X,A<JHD>) 260 105 F0RMAT(/,6X.'TIME(HR)',13X.'VALUE'./) 261 -* - — • - - - . . . . . . . 262 ***** j c - o i n d i c a t e s t h a t a new s c r e e n of d a t a , i s about to be l i s t e d . 263 264 IF(JC.EO.O) THEN 265 CALL LENGTH(CLHEAD,JHD) 266 CALL LENGTH(UNITS,JUD) 267 * 268 ***** Sets the format to c o r r e s p o n d to the DETERMINISTIC program mode 269 * 270 _IF(NOPT.EO.1) THEN 271 ._. ...JlJf_PRINT 104.,. CLHE AD ' _ '_" 272 ASSIGN 105 TO IHD 273 ELSE ~ 274 * - - . _ 275 ...***** S e t s the format to c o r r e s p o n d to the PROBABLISTIC program 27-6- •****_*_— "mode," except.-for . the case .when the .OUTFLOW ..HYDROGRAPH VALUES 277—----—- Tte».-».*»^^^are^t^^-bg-^H-.5-ted-: — - — • ^ ^ • ^ • ^ . i r = ^ r - ^ - ; r -~ -278 * * " " " ' " ~ ~ ' ~ ~ " 279 IF(IFLAG.E0.2) THEN 280 PRINT 104, CLHEAD 281 ASSIGN 105 TO IHD 282 '. ELSE .. . ... -283 PRINT 101, CLHEAD,VNAME(ID) — ~ . -"284"" — rr^=rA"S"STGN"~102~T0 THCP ~ — — r — — ~ 285 — ~ END I F— . ~ - ----- — --- — -286 - END IF — - - - - -287 PRINT 103, UNITS 288 — PRINT IHD _^ . 289 END IF 290 END. 291 * 292 * •- -293 ' * . 294 SUBROUTINE CLHFRMW(I FLAG) 295' — ********** **-*•* *********************************** *** ******************* 296 * C o n t r o l s the format of the heading that p r e c e e d s a CALCULATED VALUE 297 * hardcopy l i s t i n g . 298 *********************************************************************** 299 CHARACTER CLHEAD*40,UNITS*22.VNAME( 15 ) *22 300 C0MM0N/BLK6/ NOPT,/BLK12/ ID./BLK13/ -JC 301 COMMON/BLK15/ K 1 ,MNUID,VNAME 302 COMMON/BLK3 1 / CLHEAD.I DUMMY 1(2),UNITS -303 101 FORMAT(/.6X,A<JHD>,' due to the ',A22) 304 102 FORMAT(/,6X, 'TI ME(HR)' , 15X, 'LOW' .8X. 'PROBABLE ' , 10X, 'HIGH' ,/) 305 103 FORMAT(6X, '( ' ,A <JUD>, ' ) ' ) 306 104 F0RMAT(/,6X,A<JHD>) ' - -307 105 F0RMAT(/,6X,'TIME(HR)',13X.'VALUE',/) 308 * - ,. 309 ***** j c = 0 i n d i c a t e s t h a t a new s c r e e n of data i s about to be 1 i s t e d . 105 3 10 * 311 IF(uC.EQ.O) THEN . „ . _ 312 CALL LENGTH(CLHEAD,JHD1 313 CALL LENGTH(UNITS,JUD) 314 * 315 ***** S e t s the format to c o r r e s p o n d to the DETERMINISTIC program mode. 316 * 317 IF(N0PT.E0.1) THEN 318 WRITE(2,104) CLHEAD 319 ASSIGN 105 TO IHD 320 ELSE 32 1 3 2 2 ***** S e t s the format to c o r r e s p o n d to the PROBABLISTIC program 323 ***** mode, except f o r the case when the OUTFLOW HYDROGRAPH VALUES 324 ***** a r e to be l i s t e d . 325 * 326 I F ( I FLAG.EO.2) THEN 327 WRITE(2.104) CLHEAD 328 ASSIGN 105 TO IHD 329 ELSE 330 WRITE(2.101) CLHEAD,VNAME(ID) 331 ASSIGN 102 TO IHD 332 ' END IF 333 END IF 334 WRITE(2. 103) UNITS 335 WRITE(2.IHD) -336 END IF 337 END 338 * 339 * 340 * 342 SUBROUTINE CLMNUS(*) 344 * L i s t s the CALCULATED VALUES on the t e r m i n a l or w r i t e s them to a f i l e * 345 * which i s l a t e r queued f o r p r i n t i n g on a hardcopy d e v i c e . * 3 4 g ***********************.**************************************** ******** 347 REALM AREA(3),EF RNVL(3,8: 14) ,TA(3 ) ,OUT F LW(4 00,3.2:14) 348 CHARACTER*50 CLHEAD*40,CLMNUL(9),CLRVT100 349 ' CHARACTER*22 REPLY *2 , TATPNM( 4 }7UNI TS", VNAME ( 1 5 ) ' — " 350 COMMON/BLK 1 / CLMNUL,/BLK6/ NOPT,/BLK10/ VARI ABLE(3, 1 5 ) , / BLK 11/ NP 35 1 _ COMMON/BLK12/ ID,NC./BLK13/ JC./BLK14/ IVC ;  352 ~ COMMON/BLK15/ IDUMMY1,IDUMMY2.VNAME --353 COMMON/BLK 16/ EFRAIN(400,3,2: 14) ,TARREA(100,3,2: 14) 354 COMMON/BLK 17/ DT,MXFLNT, /BLK19/ MXTANT(3.2: 14.),PARREA(100 .3 ,2:5) _ 355 " ' C0VMCN/BI.K18/ IFLRN, TFL "A —r~= ^-^=.: •- .- • •=•.-. •••• 356 COMMON/B LK20/ SUBVAR(2: 14),ESTPKFLW,OUTF LW,PKFLW(3.2: 14).STDDEV 357 COMMON/B LK21/ DUMMY 1( 14, 14), I TATYPE,TATPNM 358 COMMON/BLK23/ MXSTNT(3,8: 14) ,RA IN(400.3.8: 14) 359 COMMON/BLK24/ IDUMMY3,LPO,LPOT,/BLK26/ JL.L 360 C0MM0N/BLK31/ CLHEAD,MAXA(2),UNITS 361 COMMON/BLK32/ MFLRN , NPRN ,/BLK33/ MFLTA". NPTA ,/BLK35/ EFRNVL 362 ~ "EQUIVALENCE ( ARE A ( 3 )", VAR TABLE ( 6 ) )"'•-'• " - - - - - - ' ' ' 363 _ PARAMETER (CLRVT 100 = CHAR ( 27 ) / / ' [ ; f '//CHAR ( 27-)-// ' [ J '••)•-. — 364 101 FORMAT(/,2X,A40,F10.3, A4) . . . . . . \ .. . _ .. 365 102 F0RMAT(22X.A24./) 366 103 F0RMAT(/,8X,A8, 1 2X,A9 „4X,A 10,2X.A 16,/) _. 367 104 F0RMAT(2X , A22 , 2X , F 10. 2 , 4X , F 1.0. 2 , 4X . F 10. 2 ) - " 368 105 FORMAT(2X,F10.2,4X,<L>(X),<NOPT>(5X,F10.2)) 369 106 F0RMAT(2X,'Probable Va l u e : '.F10.2,' m i l l i m e t e r s ' , / ) 370 107 FORMAT ( 1 X r/~) 371 * ~ 372 ***** The 'SUMMARY OF PEAK FLOWS' o p t i o n i s l i s t e d o n l y when the program 373 ***** i s 1 n t n e PROBABLISTIC mode. -- -- - ---374 * 375 MD = 9 376 IF(NOPT.EO.1) MD = 8 377 301 CALL PRNTMNU(CLMNUL.MD) 378 READ ' (A2 ) ' .REPLY " 379 PRINT*, CLRVT100 380 IF LAG = 0 2Q\ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 382 * RAINFALL VALUES: ( A l t h o u g h a c t u a l RAINFALL VALUES may be e n t e r e d * .383 * from the t e r m i n a l or r e a d from a f i l e , they a r e s t i l l t r e a t e d as - * 384 * a s e t of CALCULATED VALUES f o r 1 i s t i n g p u r p o s e s . . * 3gg ************************************************************************ 386 IF(REPLY . EO . 'R ') THEN 387 * . . . . . . . . . :-: 106 388 ***** I n i t i a l i z a t i o n of f o r m a t t i n g v a r i a b l e s . 389 * 390 ID = 14 391 IF(MFLRN.E0.1) IFLAG=2 392 CLHEAD = ' R a i n f a l l ' 393 UNITS = ' M i l l i m e t e r ' s ' 394 IF(MFLRN.E0.3) THEN 395 302 IVC = 3 396 CALL VCH00SE(*3O1) 397 MAXA(1) = MXSTNT(1.13) 398 MAXA(2) = MXSTNT(2,13) 399 END IF 400 303 L = 1 401 JC = 0 402 JL = 1 403 IF(LPO.EQ.I) CALL CLHFRMW(IFLAG) 404 DO 201 1 = 1,MX STNT(3, ID) 405 IF(LPO.NE.I) CALL CLHFRM(IFLAG) 406 IF(MFLRN.E0.3.AND.ID.EO. 13) CALL CLVFRMtI ) 407 * 408 ***** W r i t e s v a l u e s to the ' p r i n t e r ' f i l e . 409 * 4 10 I F(LPO . EO. 1) THEN 411 WRITE(2,105) DT * I , (RAIN( I , J + NPRN, ID) , J = JL,MFLRN) 412 ELSE 413 * 414 ***** L i s t s v a l u e s on the t e r m i n a l s c r e e n . ~ ~ 4 1 5 * 416 PRINT 105, DT*I,(RAIN(I,J+NPRN,ID).J=JL,MFLRN) 417 CALL WAITSTOP(*304) 415 E NDIF 419 201 CONTINUE 420 IF(LPO . EQ.- 1 ) CALL WAIT 421 IF(LPO.EO.I) CALL PRNTCNFRM 422 * 423 ***** Invokes the LIST/PRINT o p t i o n . -- 424 * • ..... _. . " 425 " 304. IF(LPO.EO.O) CALL PRINT(*303) - ~ - -426 LPO = LPOT 427 IF(MFLRN.EO.3) GOTO 302 -428 GOTO 301 ~ 429 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * _ . Z-LL-*. .—43CX .__.„* EFF_ECTI VE...RAINFALI VALUES.:... " _ *.~~ 43 1 *'* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *~* * * * * * * * * * * * * * * * *"* * * * * *~* * * '*" . 432 ELSE I F(REPLY.EO. 'E ') THEN 433 * 434 ***** I n i t i a l i z a t i o n of f o r m a t t i n g v a r i a b l e s . 435 * 436 I D = 1 4 —.- .:_ -_. . .437 .. ._ IF(MFLRN.E0..1)_J.FLAG"=2 . — Z l - - - - - - - I * • 438 CLHEAD = ' E f f e c t i v e R a i n f a l l ' .«•- _' "" ' ~ . 439 UNITS = ' M i l l i m e t e r s ' .. _ 440 IF(MFLRN.EO.3) THEN 44 1 305 IVC = 2 442 CALL VCHOOSE(*301) 443 MAXA(1) = MXSTNT(1,13) * 444 MAXA(2) = MXSTNT(2.13) 445 ._ . END I F : 446 306 L = 1 447 JC = O ... .......448 JL = 1 449 IF(LPO.EO. 1 j CALL CLHFRMW(I FLAG) 450 i DO 202 1=1,MXSTNT(3,ID) 451 ; IF(LPO.NE.I) CALL CLHFRM(IFLAG) 452 IF(MFLRN.E0.3.AND.ID.EO. 13) CALL CLVFRM( I ) 453 * 454 ***** W r i t e s v a l u e s to the ' p r i n t e r ' f i l e . 455 * 456 IF(LP0.E0.1) THEN 457 • WRITE(2.105) DT*I,(EFRAIN(I.J+NPRN.ID),J=JL,MFLRN) 458 , ELSE . -459 ; * • _ -- " 460 ***** L i s t s v a l u e s on the t e r m i n a l s c r e e n . r 461 * 462 PRINT 105, DT* I , ( E FRA IN( I . J+NPRN , ID ) . J = JL . MFLRN ) 463 ; CALL WAITST0P(*307) 464 : END IF _ J ^ 107 465 202 CONTINUE 466 IF(LPO.EO. - 1 ) CALL WAIT — • ' — 467 IF (LPO :J:O^J_) CALL PRNTCNFRM . 468 * 469 ***** Invokes the LIST/PRINT o p t i o n . 470 * 471 307 IF(LPO.EO.O) CALL P~RINT(*306) 472 LPO = LPOT 473 IF(MFLRN.EO.3) GOTO 305 474 GOTO 301 4 7 5 * * * * * * * * * * * * * * * * * * * * * * * * * * * * . * * * * * * * * * * * * * + * * * * * * * + * * * * * * * * + *•*-•'<********** 476 * TOTAL RAINFALL VOLUME: The volume i s e x p r e s s e d i n m i l l i m e t e r s s i n c e * 477 * i t i s assumed t h a t the r a i n f a l l i s u n i f o r m l y d i s t r i b u t e d over the * 478 * e n t i r e d r a i n a g e b a s i n . * * * * * * * * * * * * * * * * * * * * * * : * * * * * * * * * * * * * * * * * * * * » - * + * > * - + * * > * * * * * * * * * * * I-. * * * * * * * * * 480 ELSE I F(REPLY.EO. 'V ') THEN 481 * 482 ***** Only the volumes a s s o c i a t e d w i t h the c u r r e n t s e t s of EFFECTIVE 483 ***** RAINFALL v a l u e s a r e c a l c u l a t e d ; the PROBABLE volume i s c a l c u -484 ***** l a t e d from the EFFECTIVE RAINFALL due to the PROBABLE STORM 485 ***** PATTERN. 486 * 487 315 ID = 14 488 NC = 1 489 . CALL EFRNVLCLC . . . . . . 490 IF(LPO.EO.1) THEN 491 WRITE(2.102) 'TOTAL EFFECTIVE RAINFALL' 492 WRITE(2.106) EFRNVL(2,14) 493 ELSE - .. - — 494 PRINT 1C2. 'TOTAL EFFECTIVE RAINFALL' 495 PRINT 10S. EFRNVL(2,14) 495 END IF 497 IF(N0PT.E0.3) THEN 498 IF(LPO. EO. 1 ) THEN 499 WRITE(2.103). 'VARIABLE'. 'LOW (mm)'. 'HIGH (mm)' 500 WRITE(2.107) 501 ELSE 502 •- -- PRINT 103. 'VARIABLE'-. 'LOW (mm)'. 'HIGH (mm)' 503 . PRINT 107 - - — " 504 END IF 505 NC = 2 506 DO 217' ID = 8, 10 507 CALL EFRNVLCLC 508 ___I F (LPO . EO . 1.) THEN f . " _ .' ~ '. 509- ' " WRITE(2.104) VNAME (ID) , 7 E F RNVL (T, ID) . E FRNVL"( 3 . ID) 510 ELSE 511 PRINT 104, VNAME(ID), EFRNVL(1 , ID ) . E F RNVL(3,ID) 512 END IF 513 217 CONTINUE --514 - IF( IFLRN. NE . 1 ) THEN . - " ' - -• 515 ... _ _ . DO 218 ID».1-1-...1.3.. 1__ 516 CALL EFRNVLCLC 1 LL L „ " 517 -• 218 CONTINUE " J " " ™ _ " _ f 518 DO 219 ID= 11,14 5 19 IF(LPO.EO.1) THEN 520" WRITE(2.104) VNAME(ID). EFRNVL( 1 ,ID ) , EFRNVL(3.ID) 521 ELSE -522 PRINT 104, VNAME(ID), EFRNVL(1 .ID ) . E F RNVL(3.ID) 523 _ END I F 524 219 CONTINUE 525 END IF _ 526 END IF .. . . . 527 IF(LPO.EO.- 1 ) CALL WAIT 528 IF(LPO.EO.I) CALL PRNTCNFRM 529 * 530 ***** Invokes the LIST/PRINT o p t i o n . 531 * 532 IF(LPO.EO.O) CALL PR INT(*315) 533 LPO = LPOT 534 GOTO 301 5 3 5 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 536 * TIME-AREA VALUES: ( A l t h o u g h a c t u a l TIME-AREA VALUES may be e n t e r e d . * 537 * from the t e r m i n a l o r r e a d from a f i l e , they a r e s t i l l t r e a t e d as a * 538 * s e t of CALCULATED VALUES f o r l i s t i n g p u r p o s e s . * 532 ************************************************************************ 540 ELSE IF(REPLY.EO.'T ') THEN 541 108 "542 ****** I n i t i a l i z a t i o n of f o r m a t t i n g v a r i a b l e s . 543 * 544 ID = 2 545 IF(MFLTA.EO.1) IFLAG=2 54G CLHEAD = 'Time-Area Curve V a l u e s ' 547 UNITS = TATPNM( ITATYPE ) 548 IF(MFLTA.EO.3) THEN 549 308 IVC = 1 550 CALL VCH00SE(*301) 551 MAXA(1) = MXTANT(1,3) 552 MAXA(2) = MXTANT(2,3) 553 END I F 554 309 L = 1 555 JC = 0 556 JL = 1 557 IFtLPO.EQ.1) CALL CLHFRMW(IFLAG) 558 DO 203 I = 1 , MXTANT ( 3-NP . I 0 ) 559 IF(LPO.NE.1) CALL CLHFRM(IFLAG) 560 * 56 1 ***** C a l c u l a t e s a p p r o p r i a t e TIME-AREA VALUES a c c o r d i n g to the c u r -562 ***** r e n t v a l u e of the TIME-AREA FORMAT. 563 * 564 ***** 'CUMULATIVE AREA' format. 565 566 IF(ITATYPE.EO.2) THEN 567 DO 204 J =1,MFLTA 568 JID = J+NPTA 569 IF(ID.NE.2) JID = 2 ' 570 204 TA(J+NPTA) = PARREA(I.J+NPTA,ID)*AREA(JID) 57 1 * 572 ***** 'INCREMENTAL PERCENTAGE' format. 573 * 574 ELSE IF(ITATYPE.EO.3) THEN 575 DO 205 J=1,MFLTA 576 - JID = J+NPTA 577 IF(ID.NE.2) JID=2 578 - 205 - - TA(J+NPTA) = TARREA(I,J+NPTA.ID)/AREA(JID)* 100.0 - -579 • * - - . -580 ***** . 'INCREMENTAL AREA' format. 58 1 * 582 ELSE IF(ITATYPE.E0.4) THEN _583 : : ' DO 206 J= 1', MFLTA ; J584 1___T 206 TA ( J+NPTA ) » JARREA( I . d+NPTA . I'D] " _ _"_ " 585 " **";* ~ : * ' * * 586 ***** 'CUMULATIVE PERCENTAGE' format. 587 * 588 ELSE 589 DO 207 J=1,MFLTA 590 207 . TA ( J+NPTA ) = PARREA(I,J+NPTA,ID)* 100.0 -.59-1-- END IF - ._ _ 592 "~ IF(MFLTA.EO.3.AND.ID.EO.3) CALL CLVFRM(I) 593 * "" " 594 ***** W r i t e s v a l u e s t o the ' p r i n t e r ' f i l e . 595 * 5 9 6 I F ( L P O . E O . 1 ) THEN 597 WRITE(2,105) DT* I,(TA(J+NPTA ) , J = JL,MFLTA ) 598 ELSE 599 _ * . _ . 600 ***** L i s t s v a l u e s on the t e r m i n a l s c r e e n . 601 * 602 __ PRINT 105, DT* I , (TA( J + NP T A ) , J = d1-.MFLTA) 603 " ~ " "' " " "CALL WAITSTOP(*310) 604 END IF 605 203 CONTINUE 606 IF(LPO.EO.- 1) CALL WAIT 607 IF(LPO.EO.f) CALL PRNTCNFRM 608 * 609 ***** Invokes the LIST/PRINT o p t i o n . 610 * 611 310 IF(LPO.EQ.O) CALL PRINT(*309) 612 LPO = LPOT 613 IF(MFLTA.EO.3) GOTO 308 614 * GOTO 301 6 15 ELSE 616 CONTINUE ,'r 6 17 END IF ',' 618 ..**.*****.*.****•**• * * * *****»************..****.************.**********'•; 109 619 * The PEAK OUTFLOW SUMMARY i s l i s t e d o n l y i f i n the PROBABLISTIC pro- k 620 * gram mode. " ~ ~ " " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i: * * * * * * * * * * * * * * * * * * * * * * * + * + ** *** 622 IF(NOPT.EO.3.AND.REPLY.EO.'S ') THEN 623 * 624 ***** W r i t e s v a l u e s to the ' p r i n t e r ' f i l e . 625 626 31 1 IF(LP0.EO. 1 ) THEN 627 WRITE(2,102) ' SUMMARY OF PEAK FLOWS ' 628 WRITE(2,103) 'VARIABLE' , 'LOW(CMS)' . 'HIGH(CMS)' , '% of VARIANCE' . 629 DO 208 1=2,3 630 IF( I .EO.3.AND.IFLTA.EO. 1) GOTO 208 631 WRITE(2,104) VNAME(I),PKFLW(1.I),PKFLW(3,I).SUBVAR(I) 632 208 CONTINUE 633 IF(IFLTA.NE.1) THEN 634 DO 209 1=4,5 635 209 WRITE(2,104) VNAME(I),PKFLW(1.I).PKFLW(3,I).SUBVAR(I) 636 END IF 637 DO 210 1=6,10 638 210 WRITE(2,104) VNAME(I).PKFLWf1.I),PKFLW(3.I),SUBVAR(I) 639 IF(IFLRN.NE.1) THEN -640 DO 21 1 1 = 11, 14 64 1 211 WRITE (2, 104) VNAME ( I ) , PKF LW f 1 , I ) , PKF LW ( 3 . I_) . SUB V AR ( I ) 642 END IF 643 * . '. .... g44 ***** L i s t s v a l u e s on the t e r m i n a l s c r e e n . 645 * 646 ELSE 647 " PRINT 102, ' SUMMARY OF PEAK FLOWS > ' '" 648 PRINT 103,'VARIABLE','LOW(CMS)','HIGH(CMS)'.'% of VARIANCE' 649 DO 212 1=2.3 S50 . IF(I.EO.3.AND.IFLTA.EO.1) GOTO 212 651 PRINT 104, VNAME(I),PKFLW(1,I),PKFLW(3,I).SUBVARfI) 652 212 CONTINUE 653 IF(IFLTA.NE.1) THEN 654 DO 2.13 1=4,5 655 213 PRINT 104, VNAME(I),PKFLW(1.I),PKFLW(3.I),SUBVAR(I) 656 - END IF - -~ " - — 657 ~ DO 214 1=6,10 .. . _ 658 -214 PRINT 104,. VNAME(I),PKFLW(1,I).PKFLWf3,I).SUBVARfI) 659 .._ IF(IFLRN.NE.I) THEN.... 660 ' DO 2 15 1=11,14 _ 6 6 1 _7„215 PRINT 104 , VNAME (I ), PKFLWf 1 , I ), PKFLWf 3, I ), SUBVARf I ) .- ;. . . . * 662 ._ . * _ END IF .' .. . ... . _' .i'ZV __. ._ I l " . i'.'Zl ... 663 END IF ~ ' • - "." ; • — - .'. 664 IF(LPO.EO.- 1) CALL WAIT 665 IF(LPO.EO.I) CALL PRNTCNFRM 666 * 667 ***** Invokes the LIST/PRINT o p t i o n . - - -•---669 :--^r—=-~I-.F-(.L-PO . EO . O )— CALL—PR I NT ( *3-1-1-) '- __Z7. _-. ...._.7.7 670 _ "LPO - LPOT ; "_ _ ~ _ - _ '_ " ' 77 . .. .67 1 ;_~7_ . _ GOTO "301 ... .... .. "... 7 672 END IF Q"73 ********************************* 674 * MEAN PEAK OUTFLOW and STANDARD DEVIATION: ""• * gy^ ************************************************************************* 676 IF(REPLY.EO.'M ') THEN _._62T * ; 678 ***** W r i t e s v a l u e s to the ' p r i n t e r ' f i l e . 679 * _.680 312 . _.IF( LPO. EO. 1 ) THEN _. _. ._ _ 681 WRITE(2.101) ' Mean Peak Flow is',ESTPKFLW, ' cms' 682 WRITE(2,101) ' S t a n d a r d D e v i a t i o n of Peak Flow is'.STDDEV,' cms' 683 WRITE(2,*) ' ' 684 * 685 ***** L i s t s v a l u e s on the t e r m i n a l s c r e e n . 686 * 687 ELSE 688 PRINT 101.' Mean Peak Flow 1 s'.ESTPKFLW, ' cms' 689 PRINT 101,' S t a n d a r d D e v i a t i o n of Peak Flow is'.STDDEV.' cms' 690 PRINT*, ' ' .691 ENDIF 692 IF(LPO . EO. -1) CALL WAIT 693 IF(LPO.EO.I) CALL PRNTCNFRM 694 * 695 ***** Invokes the LIST/PRINT o p t i o n . 696 • 697 IF(LPO.EO.O) CALL PRINT(*3I2) - — - . . . . .. 698 LPO = LPOT g g g ******** * ******* ****************************************** *************** 700 ~* OUTFLOW HYDROGRAPH VALUES: (Only the s e t of v a l u e s c a l c u l a t e d from * 701 * the PROBABLE e s t i m a t e s of the USER SUPPLIED VARIABLES may be l i s t e d . * 702 * * * * * * * * * * * * * * * * * * * * * * * * * * *-* * * * * * * * * * * * * * * * * * * * . * * * * * * * * * * * * * * * * * * * * * ***:*• 703 ELSE I F(REPLY . EO. '0 ') THEN 704 * • 705 * * * * * I n i t i a l i z a t i o n of f o r m a t t i n g v a r i a b l e s . 706 * 707 708 UNITS = 'Cubic Meters/Second' 709 313 L = 1 710 JC = 0 7 1 1 IFLAG = 2 ' -7 12 MXFL = MXFLNT 7 13 IF(LPO.EQ.1) THEN 7 14 CALL CLHFRMW(IFLAG) 7 15 CALL MXFLCLC(MXFL ) 7 16 END IF ' •-- - • 7 17 DO 2 16 1 = 1,MX F L 7 18 IF(LPO.NE.I) CALL CLHFRM(IFLAG) 7 19 * 720 * * * * * W r i t e s v a l u e s to the ' p r i n t e r ' f i l e . 72 1 * 722 IF(LPO.EO.1) THEN 723 WRITE(2,105) DT*I,OUTFLW(I,2,2) 724 . . * ._ _ - - - - - . .. - .. _ .. 725 * * * * * L i s t s v a l u e s on the t e r m i n a l s c r e e n . . _ 726 * 727 ELSE 728 PRINT 105, DT* I ,OUTF LW(1,2,2) 729 IF(LPO.EO.- 1) THEN 730 CALL WAITSTOP(*301) 731 ELSE 732 CALL WAITSTOPf*3141 733 END IF 734 . . END IF . . . . . * _ * 1 * "_" 735 216 CONTINUE 736 IF(LPO.EQ.- 1) CALL WAIT " -' 737 IF(LPO.EO.I) CALL PRNTCNFRM -738 * 739 * * * * * Invokes -the LIST/PRINT option.' . . . " ... ....... 740" "'.. '~* 7. ' . .. " ; - -. • - . ^  . .. . . . . . .... — . . . _ 741 314 IF(LPO.EQ.O) CALL PRINT(*313) 742 LPO = LPOT 743 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 744 * PLOT OF OUTFLOW HYDROGRAPH: ' *. 745 - * * * * * * : * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 746 ELSE IF (REPLY . EO. ' P '") THEN ' - "•" ----- .... 747 "•' CALL PLOTHYD : — '.-" ~;- " :-. - -. 748 • ' • ELSE "IF (REPLY". EO: ' ~' )- THEN ' - - - -749 RETURN -750 ELSE IF(REPLY . EO. 'MM' ) THEN 751 RETURN 1 - "... 752 ELSE ; 753 CALL ERR0R(*301) 754 END I F 755 GO TO 301 756 — END 757 758 - - -+ — - - — " - — • — — - — • - — 759 * 760 * 76 1 SUBROUTINE CLVFRM(I) . 762 *************************************************+********************** 763 * R e s e t s the forma111ng v a r iab1es used i n CLMNUS ~ . * 764 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 765 CHARACTER DUMMY 1*40 766 C0MM0N/BLK26/ JL,L./BLK31/DUMMY 1 ,MAXA(2) 767 IF ( I . GT . MAXA ( 1 ) ) THEN . - """"" 768 JL = 2 .. 769 L = 16 " ." . " . 770 ENDIF -77 1 - IF(I.GT.MAXA(2)) THEN 772 JL = 3 . .. ' I l l 773 L = 31 774 — ""END IF • - -775 END 776 * ' . 777 * 7 78 * 779 SUBROUTINE CMNUS 730 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 78 1 * C o n t r o l s the CALCULATED VALUES o p t i o n s . * 782 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 783 CHARACTER*50 CLRVT100,CMNUL(4). REPLY *2 784 COMMON/BLK2/ CMNUL,/BLK6/ NOPT,/BLK18/ IFLRN.IFLTA 785 COMMON/BLK24/ LFLAG,LPO,LPOT 786 PARAMETER(CLRVT100=CHAR(27)//'[;f'//CHAR(27)//'[J') 787 101 F0RMAT(3X,'ONE MOMENT PLEASE . . .',$) 788 PRINT*,CLRVT100 789 PRINT 101 790 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + *** * * * * * * * * * * * * * * * *-»•**** 79 1 * C a l l s v a r i o u s c a l c u l a t i o n s u b r o u t i n e s a c c o r d i n g to the c o n d i t i o n s * 792 * s e t by s e v e r a l f l a g s . . * 722 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 794 IF(IFLTA.NE.1) CALL TACLC 795 IF(IFLRN.NE.1) THEN 796 CALL RNCLC 797 . CALL EFRNCLC 798 END IF 799 CALL HYDCLC 800 CALL BASFLWCLC 801 IF(NOPT.EO.3) CALL STDFLWCLC ~ g02 ""  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 803 " * L i s t s the CALCULATED VALUES o p t i o n s a v a i l a b l e and p r o c e s s e s the r e - * 804 * sponse. * Q 0 5 A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 806 305 CALL PRNTMNU(CMNUL,4 ) 807 READ '(A2)',REPLY Q03 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 809 * I f the response i s to l i s t the VALUES: * Q^O * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 811 IF ( REPLY . EO. ' L ') THEN -----8 12 ".. . LPO = -1 813 _ LPOT = -1 814 "". . CALL CLMNUS ( *301 ) ' g-jg ************************************************************************ 816 ?_ Lf._the.. cespo.nse .1 s._to._p.M njt ...a hardcopy...of _ t h e VALUESj^ _ * 3 iy — - ********************************"***.************************************* 818 ELSE I F(REPLY.EO. 'P ') THEN 819 * 820 •- ***** C r e a t e s a f i l e to which v a l u e s may be w r i t t e n . A f t e r the con-821 ***** t e n t s of the f i l e have been queued to the hardcopy d e v i c e , the 822-;-"- •--***** f i l e i s destroyed.--- ". • " - . 824 . T - _ f . 0 P E N ( 2 , S T AT UST 'UNKNOWN ' F I L E = '"p RI NT . DAT' ".DISPOSE =" 'PRINT/DELETE', 825 1 ERR = 303,IOSTAT=I ERR ) ' 826 ~* 827 ***** A l l o w s a c t i v a t i o n of the LIST/PRINT o p t i o n . 828 * "! " " ' " 829 CALL PRNTOPT ' 830 LPO = 1 831 CALL, HDPRNT 832 _ LPO = LPOT 833 CALL CLMNUS(*302) 834 . .... _ LPO = _-1 _ _ _ 835 * 836 ***** D e l e t e s ' p r i n t e r ' f i l e i f no VALUES have been w r i t t e n to i t 837 ***** w h i l e i n CLMNUS. ( 838 * - ' 839 IF(LFLAG.EQ.-I) THEN 840 CLOSE(2.DISPOSE='DELETE'.ERR=303.IOSTAT=IERR) 84 1 * 842 ***** Queues ' p r i n t e r ' f i l e to the hardcopy d e v i c e , then d e l e t e s i t . 843 * ..... . • 844 ELSE 845 CL0SE(2,0ISP0SE='PRINT/DELETE' ,ERR = 303.IOSTAT = I ERR) 846 " END IF 847 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 848 * I f the re s p o n s e i s to w r i t e VALUES to permanent f i l e s : "' - * 84g * * * * * . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ** " — z ' ; ~ i 112 850 ELSE IF(REPLY.EO.'W ') THEN 851 CALL CWMNUS(*301) 852 ELSE IF(REPLY.EO . ' ' .OR.REPLY.EO. 'MM' ) THEN 853 301 • RETURN 854 ELSE 855 CALL ERR0R(*305) 856 END IF 857 GO. TO 305 g 5 g *******************************.****** **•**:(• ********************-*-*** ****** 859 * Al l o w s c o n t r o l to r e t u r n to the MAIN MENU from CLMNUS. 860 * (See notes above f o r an e x p l a n a t i o n of CLOSE s t a t e m e n t s . ) * QQ \ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 862 302 LPO = -1 863 IF(LFLAG.EO.- 1) THEN 864 CLOSEt 2 . DISPOSE='DELETE'., EPR = 303 , IOSTAT = IERR ) 865 ELSE 866 CL0SE(2.DISP0SE='PRINT/DELETE',ERR=303,IOSTAT=IERR) 867 END IF 868 RETURN 869 - 303 CALL ERRCODE(I ERR ) 870 IPAUSE = 1 87 1 GOTO 305 872 END 873 * _ _ 874 * 875 * . . . 876 SUBROUTINE CWMNUS(*) 877 * * * •. **************************************************************.****** 878 * W r i t e s a s e l e c t s e t of CALCULATED VALUES to permanent f i l e s . The * 879 * f i l e s a r e f o r m a t t e d so t h a t the s t o r e d v a l u e s may be used by a s y s - * 880 * tern p l o t t i n g r o u t i n e . * Q Q 1 *************+*********************************************•************ 882 REAL*4 AREA(3),OUTFLW(400.3.2:14) 883 CHARACTER CWMNUL(5)*50,REPLY*2 884 COMMON/BLK3/ CWMNUL./BLK6/ N0PT./BLK8/ IPAUSE 885 COMMON/BLK10/ VARIABLE(3. 15) ,/BLK1 1/ NP,/BLK12/ ID./BLK14/ IVC 886 COMMON/BLK16/ EFRA IN(400.3,2: 14) ,TARREA( 100.3,2: 14) 887 _ COMMON/BLK17/ DT,MXFLNT,/BLK 19/ MXTANT(3,2: 1 4 ) , PARREA( 100.3,2:5) 888 " " ' COMMON/BLK20/ DUMMY 1 (2 : 14 ) ,DUMMY2,OUTFLW,DUMMY3(3,2 :J4) " 889 COMMON/BLK21/ DUMMY4(14,14),ITATYPE 890 COMMON/BLK23/ MXSTNT(3,8:14),RAIN(4CO,3,8:14) — -" -891 COMMON/BLK32/ MFLRN,NPRN,/BLK33/ MFLTA.NPTA - ' •-892 EQUIVALENCE (AREA(3 ) ,VARI ABLE(6)) 893 101 FORMAT ( 1X.F10.2) _.. 894 • • — — * • * • * • * * * * * • * * - * * * * . * * . * * * * _ * * * * . * * * * * * . * * . * * * * * * * * * . * * * * * * * . * . * _ * j * * * * . * * * * * * . * * . * , * _ * . * * . * . * . . * . * . . . „ 895 * L i s t s the VALUES t h a t may be w r i t t e n to permanent f i l e s and p r o c e s - * 896 * ses the res p o n s e . * 897 ************************************************************************ 898 100 CALL PRNTMNU(CWMNUL,5) 899 READ ' (A2) ' , REPLY 900 JD = 2 9Q 1 -. _ ... * * *:* ** * * * * * *'* *********** * * * ***** * * *-.*^r* * * **** *-***-** * -*-*-* * * * * *.* *•*-* .*_*..*.* ** * *-* 902 ' * -If the res p o n s e i s OUTFLOW HYDROGRAPH-VALUES : --(Only the s e t - o f —-*- — 903 * v a l u e s c a l c u l a t e d from the PROBABLE e s t i m a t e s of the USER SUPPLIED * 904 * VARIABLES may be w r i t t e n . * g05 ************************************************************************ 906 IF(REPLY.EO.'0 ') THEN 907 CALL OPENWFL 908 MXF L = MX F LNT 909 CALL MXF LCLG ( MXFL ) 910 DO 201 1=1,MXFL 911 201 WRITE(3,101) OUTFLW(I,2,2) 912 - CLOSE (3, IOSTAT = IERR,- ERR = 310) — '-- - • * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 914 * If the res p o n s e i s RAINFALL VALUES: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 916 ELSE IF(REPLY.EO.'R ') THEN 917 ... ID = 14 ' _ 918 IF(MFLRN.EO.3) THEN 919 302 IVC = 3 920 CALL VCH00SE(*1OO) 921 303 CALL ECHOOSE (UD, *302) ' 922 END IF 923 - CALL OPENWFL 924 DO 202 1=1,MXSTNT(JD+NPRN,ID) 925 202 WRITE(3,101) RAIN(I,JD,ID) 926 _ CLOSE (3, IOSTAT = I ERR, ERR = 31C0__ —_ " 113 927 IF(MFLRN.EO.3) GOTO 303 g 2 8 ****** + ***** * * * * * * * * * * * * * * * * * * * * * * * * * * * * *********:4***************.*-fc***^ 929 * If the r e s p o n s e i s EFFECTIVE RAINFALL VALUES: g 3 Q * * * * * * * * A * * * * * * * * * * * * * * * * * * * * * * * * 9 3 1 ELSE IF (REPLY . EO. ' E '_)_ THEN_ 932 ID = 14 ' " 933 IF(MFLRN.EO.3) THEN 934 304 IVC = 2 9 3 5 CALL VCHOOSE(* 100) 936 305 CALL ECHOOSE(JO,*304) 937 ELSEIF(MFLRN.EO.1.AND.NOPT.EO.3) THEN 938 306 IVC = 4 939 CALL VCHOOSE(* 100) 940 307 CALL ECHOOSE(JD,* 306) 941 END IF 942 CALL OPENWFL 943 DO 203 I= 1 ,MXSTNT(JD + NPRN, ID) 9 4 4 203 WRITE(3,101) EFRAIN(I.JD,ID) 945 CLOSE ( 3 . IOSTAT = I ERR, ERR = 310) 946 IFfMFLRN.EO.3) GOTO 305 947 IF(MFLRN.EO.1.AND.NOPT.EO.3) GOTO 307 g^Q **** + ************* * *********** * ************** M ***************** •!•* + ** *-* + + + 949 * If the res p o n s e i s TIME-AREA VALUES: 'y g^Q *****-*• + * * * * * * * * * : l - * * * * * * * * * * * * * + : f * * * * * * * * * ********* 951 ELSE IF(REPLY.EO. 'T ') THEN 952 ID = 2 953 IF(MFLTA.EO.3) THEN 954 308 IVC = 1 955 CALL VCHOOSE( * 100) -956 309 CALL ECHOOSE(JD.*308) 957 ENDIF 958 CALL OPENWFL 959 DO 204 I=1,MXTANT(JD,ID) 960 961 ***** C a l c u l a t e s a p p r o p r i a t e TIME-AREA VALUES a c c o r d i n g to the c u r -962 ***** r e n t v a l u e of the TIME-AREA FORMAT. 963 * g64 ***** 'CUMULATIVE AREA' format. 965 * - • •• • . ._ . • • 966 IF(ITATYPE.E0.2) THEN 967 JID = JD _ """ ~" 968 " IF(ID.NE.2) JID=2 969 TA = PARREA(I.JD,ID)*AREA(JID) 970 * • -J ' • _ _ 97 ' ' *'*-** • ' INCRHMEN' AL PERCENTAGE '. .Fcrma.tr' ' * : - - - - - -972 * 973 ELSE IF(ITATYPE . EO . 3 ) THEN 974 JID = JD - -975 IF(ID.NE.2) JID = 2 - .... ' - . . . . ' „ 976 -. . TA = TARREAfI .JD, ID)/AREA(JID)* 100.0 - - -9 7 7 * . . . 978 ***** ' INCREMENTAL AREA' format . ' -" " _ • 979 * : r - ~ - ' " 980 ELSE IF(ITATYPE.EO.4) THEN ~ 981 TA = TARREA(I.JD,ID) 982 * —•-983 ***** 'CUMULATIVE PERCENTAGE' format. 984 * 985 ___ _ ELSE _ "986"" " " TA""= PARREA ( I . JD , ID~) * i 00 . 0 987 ENO IF 988 204 WRITE(3,101) TA 989 CLOSE ( 3 , IOSTAT'IERR! ERR='310) _ ^' """ " " 990 IF(MFLTA.EQ.3) GOTO 3 0 9 " 991 ELSE IF(REPLY.E0. ' ') THEN 992 RETURN 993 ELSE IF(REPLY.EO.'MM') THEN 994 RETURN 1 995 ELSE 996 CALL ERR0R(*100) 997 END IF 998 GOTO 100 9 9 9 310 CALL ERRCODE(I ERR ) 1000 ' I PAUSE = 1 1001 GOTO 100 1002 END 114 1004 1005 * 1007 SUBROUTINE DATENT(*,* ) 1008 ****************************** 1009 * A l l o w s input of USER SUPPLIED VARIABLES from the t e r m i n a l . The VAR- * 1010 * IABLES a s s o c i a t e d w i t h the TIME-AREA and RAINFALL a r e o n l y e n t e r e d " 1011 * i f ' CALCULATE' i s the c u r r e n t e n t r y o p t i o n . * 4Q12 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1013 CHARACTER LPH*10.VARMNU(15)*60 1014 C0MM0N/BLK6/ NOPT,/BLK8/ IPAUSE 1015 COMMON/BLK10/ VARI ABLE(3. 15)./BLK1 1/ NP 1016 COMMON/BLK12/ ID./BLK17/ DT./BLK18/ I DUMMY 1 . IFLTA 1017 COMMON/BLK30/ LPH,VARMNU,/BLK34/ BASEFLOW 1018 101 FORMAT(/,2X,AGO,/) 1019 102 FORMAT(4X,'(Must be g r e a t e r than ',F7.3.')'./) 1020 103 FORMAT(3X,A 10. ' > ' , $ ) 1021 104 F0RMAT(3X,'>',$) 1022 **************************************************** + ********** 1023 * L i s t s the name of the VARIABLE to be e n t e r e d , a n d a c c e p t s the v a l u e 1024 * ( o r v a l u e s i f the program i s i n the PROBABLISTIC mode). J 1025 ************************************************************** ***^t -**•* + '•• 1026 301 PRINT 101,VARMNU(ID) 1027 IF(ID.EQ.S) PRINT 102. 0.5*DT 1028 IF(ID.EO.1) THEN 1029 302 PRINT 104 1030 READ(*.*.ERR=320, IOSTAT=IERR) DT 1031 * 1032 ***** Checks i f the TIME INTERVAL i s b a s i c a l l y z e r o . 1033 * - - • • 1034 IF(DT,GE.0.0.AND.DT.LT.0.001) CALL ERR0R(*3O2) 1035 00 203 1=1.3 1036 203 VARI ABLE(I. 1) = DT 1037 ELSEIF(ID.EO.15) THEN 1038 PRINT 104 1039 READ(*.*.ERR=320. IOSTAT=IERR) BASEFLOW 1040 00 204 1=1,3 1041... 204 VARIABLE(I.15) = BASEFLOW 1042- ELSEIF( ID. EO. 3. AND ..IFLTA . EO. 1 ) THEN 1043 •- PRINT 104 1044 READ(*.*,ERR = 320, IOSTAT=I ERR) VARIABLE(2,3) 1045 ELSE — ' — " 1046 IF (NOPT . EO . 3 ) THEN 1047 PRINT 103, LPH • -" 1048' f " £ L S E " " " — ; ' ' • 1049 PRINT 104 1050 END IF 1051 READ(*,*,ERR = 320. IOSTAT = I ERR) (VARIABLE(I+NP,ID),I=1.NOPT) 1052 * 1 0 5 3 . . . * * * * * Checks i f the v a l u e ( s ) of BASIN WIDTH RATIO i s ( a r e ) w i t h i n , t h e ...1054 . . . i . , . * * * * * ...proper range. _ _ "'" _ ' _ - • ~_ 1055 * "~" " - " " ' ' . ' 1056 IF(ID.EO.4) THEN 1057 - DO 201 K=1,N0PT ' " " - " 1058 IF((VARIABLE(K+NP,4).LT.1.O.OR.VARIA8LE(K+NP,4).GT.2.0) 1059 1.AND.VARIABLE(K+NP,4).GT.O.0) CALL ERR0R(*3O1) 1060 201 CONTINUE 1061 END IF 1062 * 1063 ***** Checks i f the v a l u e ( s ) of TIME-AREA INFLECTION POINT LOCATION ~ 1 0 6 4 " ***** i s ( a r e ) w i t h i n the p r o p e r range. -- . r . . 1065 * 1066 I F ( 10 . EO . 5 ) THEN - - . 1067 , ; DO.202 K=1,NOPT 1068' IF(VARIABLE(K+NP,5).GT.1.0) CALL ERROR(*301) 1069 . 202 ' CONTINUE 1070 END IF 1071 IF(N0PT.EQ.3) CALL PDNTCHK(VARIABLE(1,ID).*301) 1072 * 1073 ***** Checks i f the v a l u e ( s ) of MUSKINGUM "K" i s ( a r e ) w i t h i n the 1074 ***** p r o p e r range. 1075 * 1076 IF(ID.EQ.6) THEN 1077 DO 205 K=1,N0PT 1078 IF(VARI ABLE(K+NP,6).LE.(0.5*DT)) CALL ERR0R(*3O1) 1079 - 205 ; CONTINUE 1080 ... END IF 1 0 8 1 .„ END IF .. _ . ; . 115 108 2 * 1083 * * * * * Checks i f the v o l u e ( s ) of MUSKINGUM "X" i s ( a r e ) w i t h i n 1084 * * * * * the p r o p e r range. 1085 * 1086 IF(ID.E0.7) THEN 1087 DO 206 K =1.NOPT 1088 IF(VARIABLE(K+NP,7).GT.0.5) CALL ERR0R(*301) 1089 206 CONTINUE 1090 END- IF 1091 * 1092 * * * * * If the PROBABLE e s t i m a t e of any of the e n t e r e d VARIABLES i s neg-1093 * * * * * t i v e . c o n t r o l i s p a s s e d to the p r e v i o u s menu. 1094 * 1095 IF(VARIABLE( 1+NP. ID).LT.0.0) RETURN 2 1096 IF(ID.EO. 1 .OR.ID.EO.3) CALL MXTANTCLC( *303 ) 1097 RETURN 1098 * 1099 * * * * * I n d i c a t e s an e r r o r c o n d i t i o n w i t h i n MXTANTCLC. C o n t r o l i s passed 1 100 * * * * * to the menu in DMNUS. 1 101 * 1 102 320 CALL ERRCODE(I ERR.*301 ) 1 103 303 IPAUSE = 1 1 104 RETURN 1 1 105 END 1 107 * 1 108 1 109 * 1 1 10 SUBROUTINE DATIN(*) 1111 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1112 * C o n t r o l s the in p u t of the USER SUPPLIED VARIABLES. 1113 * * * * * • • f t * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * - * - . * * * * * * * * * * * . * ** * * * * * * * * 1114 CHARACTER*30 BASINHD,DATEHD,USERHD 1115 CHARACTER CLRVT100*50,REPLY *2.TEMP* 30 1 1 16 COMMON/BLK6/ NOPT,/BLK10/ VARIABLE(3, 1 5) ./BLK12/ ID 1117 COMMON/BLK19/ IDUMMY1(3,2:14),PARREA(100.3.2:5) 1118 COMMON/BLK18/ IFLRN. IFLTA,/BLK23/ I DUMMY2(3.3: 14),RA IN f400.3.8: 14) 1119 COMMON/BLK28/ BAS INHD,DATEHD,US ERHD -1 120 PARAMETER(CLRVT100=CHAR(27)//' [ ; f '//CHAR(27)//'[d') 1121 - 101 F0RMAT(/,2X,A32) .1 122 102 FORMAT(2X,8(' ').'MAXIMUM LENGTH',8('_')./,1X,'>',$) 1123 301 CALL RUNMNUS(*305,*30G) 1 124 ~ PRINT*,CLRVT100 . " -1 125 REPLY = DATEHD 1126 - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1127 - - * A r lows e n t r y of header I n f o r m a t i o n " — - • • 1 128 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1 129 IF(REPLY.EO.' ') THEN 1 130 • PRINT 101. 'Date ? 113 1 PRINT 102 1 132 READ ' (A3C) ' . DATEHD .- . 1 133 PRINT 101. 'Your name ? '"" '- --"""" 1134 _._.„ " P R I N T 102 " ""•' ' " 1 135 — READ '(A30)'. USERHD ' - -1 136 ENOIF -- . . _ .. 1 137 PRINT 101, 'Name of d r a i n a g e b a s i n 7 1138 PRINT 102 -1 139 READ '(A30)'. TEMP , 1 140 REPLY = TEMP 1141 IF(REPLY.NE . ' ') BASINHD = TEMP 1 142 * * * * * * * * * . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-•*-* * * * * * * * * *-*•* * * * * * * *-*-*-*-*•+ *.*-* * *-*-* 1 143 * I n i t i a l i z a t i o n of v a r i a b l e s and f l a g s to z e r o . * 1 144 . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ""'1145 " IFLTA = 0 1 146 IFLRN = 0 1 147 DO 201 1=1,100 1148 201 PARREA( I , 2 , 2) = 0.0 1149 DO 202 1=1,400 1150 202 RAIN(I.2,14) = 0.0 115 1 DO 203 ID= 1,15 1152 ' '" DO 203 K=1,3 1 153 203 VAR I ABLE(K,ID) = 0.0 1 154 A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1 155 * Loop to a l l o w input of each VARIABLE. . * 1 156 .. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1 157 DO 204 10=1.15 1158 .: * 1 159 * * * * * A l l o w s s p e c i a l i n p u t o p t i o n s f o r the TIME-AREA r e l a t e d VARIABLES i 116 1160 ***** to be s e l e c t e d . .. . 116 1 * 1162 I F ( ID . EQ.4) THEN 1163 PRINT*. CLRVT100 1164 302 PRINT*. ' TIME-AREA CURVE " 1 165 CALL ONTOPT ] | 'f"l66 READ ' ( A 2 ) ' . REPLY 1167 IF(REPLY.EO.'M ') CALL ERR0R(*302) 1168 CALL TANTOPT(REPLY,* 304,* 204,* 306, *305. *302, * 305) 1169 END IF 1170 * 1171 ***** A l l o w s s p e c i a l input o p t i o n s f o r the RAINFALL r e l a t e d VARIABLES 1172 ***** t o D e s e l e c t e d . 1173 * 1174 IF(ID.EO.11) THEN 1175 PRINT*. CLRVT100 1176 303 PRINT*. ' RAINFALL VALUES' 1177 .CALL DNTOPT 1 178 READ ' (A2) ' , REPLY 1179 IF(REPLY.EO.'M ') CALL ERR0R(*303) 1180 CALL RNNTOPT(REPLY,*304,*204.*306,*305,*303) 1181 END IF 1182 IF(ID.EO.5.AND . IFLTA.EO. 1 ) GOTO 204 1183 I F ( ID . NE . 15 . AND . ID . GE 1 2 . AND . I FLRN . EO . 1 ) GOTO 204 1 184 304 CALL DATENT(*305,*301 ) 1185 204 CONTINUE 1186 *********************************************** ************************** 1187 ' * I n d i c a t e s an e r r o r c o n d i t i o n w i t h i n MXTANTCLC. C o n t r o l i s passed * 1188 ' * to the menu i n DMNUS. . . • - * -j-fgg ************************************************************************ 1190 305 IF(IFLTA.EO. 1 ) CALL DTACLC 1191 IF(IFLRN.EQ . 1 j CALL EFRNCLC 1192 RETURN 1 19 3 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1194 * C o n t r o l i s p a s s e d to the MAIN MENU. * 1 1 9 5 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1196 • 306 I F ( I F LT A . EO - 1 ) CALL DTACLC - -- -1197 - IF(IFLRN.EO.1) CALL EFRNCLC - • -... 1.198 ..". . .. RETURN 1 1199 END 1200 * 1201 * ^ 1202 * _ ; -__-__, 12C3 SUBROUTINE DATLIST " •.—-..-=-•;= ._--- -._._._... •J 204 *************************** 1205 * C o n t r o l s the l i s t i n g of the USER SUPPLIED VARIABLES. * 1206 ************************************************************************ 1207 • CHARACTER CLRVT 100*50. VHD ( 2 ) *60. VNAME ( 15 ) *22 , VNAMED ( 15 )* 1.1 1208 COMMON/B LKG/ NOPT , /BLK 10/ VAR I ABLE ( 3 , 1 5 ) . /BLK 1 1 / NP _ - ~ : -1209 -'-' COMMON/BLK 15/ I DUMMY 1 , IDUMMY2 ..VNAME ,/BLK.18/ IFLRN. IFLTA. _. 1 2 1 0 " C O M M O N / B L K 19/ MXTANT (3,2": 14), PARRE A ( 100 ,"3 , 2 : 5 ) " - ~f: : 1211 COMMON/BLK23/ MXSTNT ( 3 , 8 : 14 ) , R AIN ( 400 . 3 . 8 : 14 ) ' •'—:"~ " " " r" 1212 C0MM0N/BLK24/ IDUMMY3,LP0,/BLK29/ VHD.VNAMED 12 13 PARAMETER(CLRVT100 = CHAR(27)//'[;f'//CHAR(27)//' [ J') 1214 ' 101 FORMAT(/,17X.A30,/) 1215 102 FORMAT(2X.A22.<2 + NP*10>(X). -N0PT>F10.3.2X.A11) 1216 103 F ORMAT(2X.AG0,/) ...1.217 _ 104 F0RMAT(2X , F6 . 2, <MAX- 1>( . F6 . 2) ) _ 1218 _ 105 FORMAT(2X,F6.2) 1219 " * . 1220 * * * * * i n i t i a l i z e s f o r m a t t i n g v a r i a b l e s . ' 1221 * " ~ ----- ' 1222 MAXTA;= MXTANT(2,2)/10 + 1 1223 ~ MAXRN . = MXSTNT ( 3 , 1 3 ) / 10 + 1 1224 .-- • IF(LP0.E0.-1 ) PRINT*, CLRVT100 1225 ~" IF(LPO.EO.I) THEN 1226 A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1227 -.* W r i t e s the VARIABLES to the ' p r i n t e r ' f i l e or l i s t s them on the t e r - * 1228 * minal s c r e e n , depending on the c u r r e n t v a l u e of LPO. * 1229 ***********************************************.***********************+* 1230 " WRITE(2,101) ' USER SUPPLIED DATA ' 1231 WRITE(2.103) VHD(1+NP) _ - . 1 1232 00 201 1=1.15 '•••-'.' 1233 * ... . 1234 "' . ***** Checks i f the a c t u a l TIME-AREA or RAINFALL v a l u e s have been 1235 ***** . e n t e r e d from the t e r m i n a l or have been read from a f i l e . 1236. . ***** (The r e l a t e d VARIABLES w i l l be w r i t t e n to the ' p r i n t e r ' f i l e 117 1237 * * * * * i f the a c t u a l v a l u e s have not been e n t e r e d ; the a c t u a l v a l u e s . .... 1238 * * * * * w i l l be c a l c u l a t e d l a t e r . ) 1239 * 1240 IF(IFLTA.EQ. 1 .AND . (I .EQ.4.OR. I . EO.5)) GOTO 201 124 1 IF( IFLRN.EQ. 1 .AND. I .GE. 1 1 .AND. I .LE. 14) GOTO 201 1242 WRITE(2, 102 ) VNAME(I).(VARIABLE(J + NP. I ) . .J =1 .NOPT) .VNAMED( I ) 1243 201 CONTINUE 1244 * 1245 * * * * * W r i t e s the a c t u a l TIME-AREA v a l u e s to the ' p r i n t e r ' f i l e i f they 1246 * * * * * were e n t e r e d . 1247 * 1248 IF(IFLTA.EO.1) THEN 1249 WRITE(2,101) ' TIME-AREA VALUES 1250 DO 202 1=1. MAXTA 1251 I REM = MXTANT(2.2) - I* 10 1252 IF(IREM.LT.0) THEN 1253 MAX = 10 + IREM '-1254 ELSE 1255 MAX = 1 0 1256 END I F 1257 ASSIGN 104 TO IHD 1258 IF(MAX.EQ.I) ASSIGN 105 TO IHD 1259 202 WRITE(2,IHD) (PARREA(J+(I-1)*I0.2,2).J=1.MAX) 1260 END IF 1 26 1 * 1262 * * * * * W r i t e s the a c t u a l RAINFALL v a l u e s to the ' p r i n t e r ' f i l e i f they-1263 * * * * * were e n t e r e d . 1264 * .1265 IF(IFLRN.EO . 1 ) THEN 1266 WRITE(2,101) ' RAINFALL VALUES 1267 DO 203 1=1, MAXRN 1268 IREM = MXSTNT(3. 13) - 1*10 1263 rt-fTr^r*ii-r/~>^ t i in ». I 1270 MAX = 10 + IREM 127 1 ELSE 1272 MAX = 10 1273 END I F 1274 ASSIGN 104 TO IHD 1275 IF(MAX.EO.I) ASSIGN 105 TO IHD "" ' 1276 203 WRITE(2.IHD) (RAIN(U+(I-1 )* 10.2, 13 ) ,0= 1 .MAX) 1277 - END I F 1278 ELSE 1279 PRINT 101.' USER SUPPLIED DATA .1280. PRINT 103. VHD(1+NP) =-128-1 DO 2C4 -1 = 1, 15 — ; : — - ----- ". * - -—... - ' 1282' * 1283 * * * * * Checks i f the a c t u a l TIME-AREA or RAINFALL v a l u e s have been 1284 * * * * * e n t e r e d from the t e r m i n a l or have been r e a d , f r o m a f i l e . 1285 * * * * * (The r e l a t e d VARIABLES w i l l be l i s t e d i f the a c t u a l v a l u e s .1286 * * * * * have not been e n t e r e d : ..the a c t u a l v a l u e s w i l l be c a l c u l a t e d 1287 * * * * * l a t e r . ) ' " " -~ ' 1288 _ * „ : . : „ : i z _ i 1289 IF( IFLTA . EQ . 1.. AND . ( I . E0.4 .OR . I . EO . 5 ) ) G0T0.;204 - •.- --1290 IF(IFLRN . EO . 1 .AND.I .GE. 1 1 .AND.I .LE. 14) GOTO 204 . 1291 PRINT 102.VNAME(I ) , (VARI ABLE(U + NP, I ) .J=1 .NOPT).VNAMED(I ) 1292 204 CONTINUE 1 293 * „ 1294 * * * * * L i s t s the a c t u a l TIME-AREA v a l u e s i f they were e n t e r e d . 1295 * 1 296 I r ( I F L T A . t 0 . 1 ; T H E N 1297 PRINT 101,' TIME-AREA VALUES 1 298 DO 205 1=1, MAXTA 1299 — IREM = MXTANT(2.2) - 1*10 -- ~. ~ -1300 . I F( IREM.LT.0) THEN 1301 MAX = 10 + IREM 1302 ELSE 1303 MAX = 10 " 1304 END I F 1305 ASSIGN 104 TO IHD 1306 IF(MAX.EQ.I) ASSIGN 105 TO IHD 1307 205 PRINT IHD, (PARREA(J+(I-1)* 10.2.2),0=1.MAX) 1308 END IF 1309 * 1310 . * * * * * L i s t s the a c t u a l RAINFALL v a l u e s i f they were e n t e r e d . 13 11 * 1312 IF(IFLRN.EO.1) THEN . 1313 PRINT 101 . ' RAINFALL VALUES ' . _ 118 1314 DO 206 1=1. MAXRN 1315 I REM = MXSTNT(3,13) - 1*10 1316 IF(IREM.LT.O) THEN - - - - - _ 13 17 MAX = 10 + IREM 1318 ELSE 1319 MAX = 10 1320 END IF 132 1 ASSIGN 104 TO IHD 1322 IF(MAX.EO.I) ASSIGN 105 TO IHD 1323 206 PRINT IHD, (RA IN(J+(I - 1)* 10,2 , 13).J=1.MAX ) 1324 END IF 1325 END IF 1326 END 1327 * 1328 1329 * 1331 SUBROUTINE DATMOD(* ) 1332 ****************************************************************+*****-** 1333 * C o n t r o l s m o d i f i c a t i o n of the USER SUPPLIED DATA * 1334 ************************************************************************ 1335 CHARACTER RE PLY * 2 1336 CHARACTER*50 CLRVT100,HEAOING,ENTOPT * 28,TA VMNUL,RNVMNUL,VMNUL( 17) 1337 C0MM0N/BLK6/ N0PT./BLK8/ IPAUSE,/BLK10/ VARI ABLE(3, 1 5 ) ,/BLK 1 2/ ID 1338 COMMON/BLK 13/ JC,VMNUL,/BLK18/ 'IFLRN,IFLTA 1339 COMMON/BLK19/ MXTANT(3,2: 1 4 ) ,PARREA( 100.3,2:5) 1340 C0MM0N/BLK23/ MXSTNT(3,8:14),RAIN(400,3.8:14) 1341 COMMON/BLK25/ ENTOPT.HEADING 1342 PARAMETER!CLRVT100 = CHAR(27)//' [:f ' //CHAR(27)//'tJ' ) 1343 DATA TAVMNUL/' 4 Time-area v a l u e s ' / 1344 DATA RNVMNUL/' 11 ' R a i n f a l l v a l u e s ' / 1345 101 FORMAT(15X.A50,//) 1346 102 F0RMAT(20X.A50) 1347 103 FORMAT(/,' P o s i t i o n of '.A9.' v a l u e to be m o d i f i e d ? (0 to end)',/) 1348 104 FORMAT(/,' P o s i t i o n ',13.' does not e x i s t ' . / ) 1349 105 FORMAT(/, ' The O l d ' ,A 10,<NOPT>F10.3./) 1350 106 FORMAT(/,' New v a l u e >',$) 1351 107 FORMAT(/,20('*'),14.' Time-area v a l u e s a re needed ' . 2 0 ( ' * ' ) , / ) 1352 108 FORMAT(/.1X.A28,$) 1353 109 FORMAT ( 1X ,'>'.$) -1354 -1 10 FORMAT(/, 1X,-5('*'),' R a i n f a l l based on a—' , F6 . 2 hour t i m e - i n t e r v -1355 1al i s now needed ',5('.*')./) 1 3 5 5 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1357 * L i s t s USER SUPPLIED VARIABLES t h a t may be "modified " ""* 1358 ************************************************************************ 1359 "301' CALL PAUSE f I PAUSE) •_ ~ ~ " _ 1360 "' PRINT " .0. , VMNUL ( 1 ) ,^R——•„ - - - - :" - v.. -.7 ~-~7_==---1361 PRINT 101, HEADING 1362 DO 200 1=2,17 1363 IF(IFLTA.EO.1.AND.I.EO.5 ) THEN . . . 1364 PRINT 102, TAVMNUL --. 1365 GOTO. 200 ••- - _ . ' ..... 1366 .'_ END I F. j . . ; ' ' _ _ . . ' . 1367 -~ _ IF (I FLRN . EO . •[ .AND .1 . EO . 1_2 ) THEN_~" _ '_ _ 1368 "' PRINT 102, RNVMNUL • " - " " " -1369 GOTO 200 ~ " - • . _ " - " - • ... 1370 END IF 1371 -• IF( IFLTA.EO. 1 .AND.I.EO.6) GOTO 200 1372 I F ( I FLRN . EO . 1 . AND . I . GT . 1 2 ."AND . I . LT . 16 ) GOTO 200 1373 PRINT 102. VMNUL(I) 1374 200 .CONTINUE 1375" """""PRINT"*,"""""' ' " " " 1376 PRINT 108, ENTOPT 1 3 7 7 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1378 "* Checks ^ o r i n v a l i d c h o i c e of VAR I ABLE to be m o d i f i e d " ' ~ '""*' 137g ************************************************************************ 1380 READ(*,*.IOSTAT=IERR) ID 1381 IF(IERR.NE.O) THEN 1382 IPAUSE = 1 - " -1383 CALL ERRCODE(IERR,*301) 1384 END IF 1385 IF(ID.EO.-I) GOTO 312 1386 IF(ID.LT.-1.OR.ID.GT.15) CALL ERR0R(*3O1) 1387 I F ( I F L T A . EO . 1.AND.ID.EO.5) CALL ERR0R(*301) 1388 IF(IFLRN.EO.1.AND.(ID.GE.12.AND.ID.LE.14)) CALL ERR0R(*3O1) 1389 IF(ID.EO.O) CALL ERR0R(*301) 1390 **********************************************************+************* 1391 * Invokes the TIME-AREA m o d i f i c a t i o n o p t i o n i f the ACTUAL y^LUES__were * 119 1392 * e n t e r e d from the t e r m i n a l or r e a d from a f i l e . - - + 1393 ************************************************** ***********+•****•'•***** 1394 302 IF(IFLTA.EQ.1.AND.ID.EQ.4) THEN 1395 CALL PAUSE( I PAUSE ) 1396 PRINT*,' . TIME-AREA CURVE' 1397 303 CALL DMD0PT(5) 1398 READ ' ( A2 ) ' , REPLY ' 1399 " " - ~ CALL TANTOPT( REPLY 7*301 ~. *30 1*3 13 , *301 , *303 , *3 12 ) 1400 * 1401 ***** M o d i f i c a t i o n from t e r m i n a l 1402 * 1403 304 PRINT 103. 'TIME-AREA' 1404 PRINT 109 1405 REA0(*,*,IOSTAT = IERR ) J 1406 I F ( I ERR.NE.0) CALL ERRCODE(I ERR,*304) 1407 IF(u.EQ.O) GOTO 301 1408 IF(J.LT.0.OR.u.GT.MXTANT(2.2)) THEN 1409 PRINT 104, J 1410 GOTO 304 14 11 END IF 1412 305 PRINT 105, ' v a l u e i s '. PARREA(J,2.2) 1413 PRINT 106 1414 READ(*,*.IOSTAT=IERR) PARREA(J,2,2) 1415 IF(IERR.NE.C) CALL ERRCODE(I ERR.*305) 14 16 * 1417 ***** Checks f o r a s c e n d i n g o r d e r 14 18 * 1419 VARTA1 = 0.0 1420 IF(J.NE.1) VARTA1 = PARREA (<J-1 . 2 , 2 ) 1421 VARTA2 = PARREA(J,2,2) 1422 V A R T A 3 = 1 . 0 -1423 IF(U.LT.MXTANT(2,2 ) ) VARTA3 -= PARREA ( J+ 1 , 2 , 2 ) 1424 CALL TACHECK(VARTA1,VARTA2,VARTA3.*305) 1425 GOTO 304 14 26 *********************** 1427 * Invokes the RAINFALL m o d i f i c a t i o n o p t i o n i f the ACTUAL VALUES were * 1428 * e n t e r e d from the t e r m i n a l o r r e a d from a f i l e ' *' 1429 ************************************************************************* 1430 ELSE IF(IFLRN.EO. 1 .AND.ID.EO. 1 1 ) THEN —' - 1431 PRINT*, CLRVT100 1432 306 PRINT*,' RAINFALL VALUES' 1433 . .CALL DMD0PT(5) _ 1434 ... •. .- • READ ' (A2) ' , REPLY - ... ..^ •-.-=- - • - - T ^ . - • 1435 CALL RNNTOPT(REPLY,*301,*301,*313.*301,*306) " 1436 . * 1437 ***** M o d i f i c a t i o n from t e r m i n a l 1438 * 1439 307 PRINT 103. ' r a i n f a l l ' "~ " . 1440 . ..PRINT 109 — ~ . ~_ . - . ^ ^ . - . — - 7 1-44 1 READ( * , « . I0STAT=IERR) U -• 7 -1.442 .- - I.F( IERR . NE . O)- CALL.. ERRCODE( I ERR.,,*307.)7 .. . . . 1443 IF(J.EO.O) GOTO 301 ... 1444 IF(J.LT.O.0R.J.GT.MX STNT(3, 13)) THEN 1445 PRINT _104, J _ _ 1446 " GOTO 307 1447 END IF 1448 308 PRINT 105. ' v a l u e i s ', RAIN(J,2,14) .t449 - .PRINT—106 1450 READ(*,*.IOSTAT=IERR) RA I N(-0 , 2 , 1 4 ) 1451 IF(IERR.NE.O) CALL ERRCODE(I ERR,*308) 1452 _ . GOTO 30.7 _ .... 1453 ELSE 14^4 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1455 * Invokes the TIME-AREA m o d i f i c a t i o n o p t i o n i f the ACTUAL VALUES were * 1456 * c a l c u l a t e d from the a p p r o p r i a t e USER SUPPLIED VARIABLES. *• 1 4 5 7 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1458. IF(ID.E0.4.0R.ID.E0.5)THEN 1459 PRINT*, CLRVT100 1460 309 PRINT*,' TIME-AREA VALUES' 1461 CALL DMD0PT(4) 1462 READ ' ( A 2 ) ' . REPLY 1463 IF(REPLY.E0. 'M ') CALL ERR0R(*309) .. ' 1464 CALL TANTOPT(REPLY,*311,*301,*313,*301.*309,*312) 14 g 5 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1466 * Invokes the RAINFALL m o d i f i c a t i o n o p t i o n i f the ACTUAL VALUES were * 1467 * c a l c u l a t e d from the a p p r o p r i a t e USER SUPPLIED VARIABLES. * 1468 ************************************************.************.*. *********** 120-1469 "~ELSE I F ( ID . GE . 1 1 . AND . ID . LE . 1 4 ) THEN 1470 PRINT*, CLRVT100 1471 310 PRINT*,' . RAINFALL VALUES' 1472 CALL DMD0PT(4) 1473 READ ' (A2 ) ' . REPLY 1474 I F(REPLY.EO. 'M ') CALL ERR0R(*310) 1475 CALL RNNTOP T(REPLY,*31 1 ,*301 ,* 313.* 301 .* 310) 1476 ELSE ] z\f 7 A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * . * • * • * * ***********+ + + *•*•** + + * + * 1478 * M o d i f i c a t i o n of USER SUPPLIED VARIABLES from the t e r m i n a l . * 1479 * (The TIME-AREA and RAINFALL VARIABLES are m o d i f i e d o n l y i f the * 1480 * 'CALCULATE NEW VALUES' o p t i o n i s chosen i n the r e s p e c t i v e m o d i f i c a - * 1481 * t i o n o p t i o n s r o u t i n e . ) ' - * 1482 ******************************************** **•*•<• ************ ************ 1483 311 IF(N0PT.EQ.1.0R.ID.E0.1.0R.ID.EQ.15.0R.(IFLTA.EQ.1.AND.I0.EQ. 1484 1 3)) THEN 1485 PRINT 105, ' v a l u e i s ', VAR I ABLE ( 2 .'ID) 1486 ELSE 1487 PRINT 105. ' v a l u e s a r e ' . (VARIABLE(K,ID),K=1,3) 1483 END IF 1489 CALL DATENT(*312) 1490 IF(ID . EO. 1 ) THEN 1491 IF(IFLRN.EO.1) PRINT 110. VARIABLE(2,1) 1492 IF(IFLTA.EO. 1 ) PRINT 107, MXTANT(2.2) 1493 IPAUSE = 1 1494 ELSEIF(ID.EO.3.AND.IFLTA.EO.1) THEN 1495 PRINT 107, MXTANT(2,2) 1496 IPAUSE = 1 1497 END IF 1498 GOTO 301 1499 END IF 1500 END IF 1501 312 IF(IFLTA.EO.1) CALL DTACLC 1502 IF(IFLRN.EQ.1) CALL EFRNCLC 1503 RETURN " — • ' -1504 **************************** *~* * ***•**•*•*•* ***** * *•*-* *•*•* ****** *•*-*-*-*-* *-*-*•* 1505 * Returns to the MAIN MENU — - * 1506 ************************************************************************ 1507 313 IF(IFLTA.EO. 1 ) CALL DTACLC 1508 IF( IFLRN. EO. 1 ) CALL EFRNCLC _ • _ _ . 15C9 ... . .... ... .RETURN 1 1 1 1 . . . 1 . . . . . . . . . J . . , 7 1 . 7 . . . . . . . . . . . . ... 1510 END ' ' '•'""" " ' " ' " : ' : " - • 1511 1512 * 1513 * 1j51j4 SUBROUTINE DMDOPT ( IDIM) 1515 ************************************************************************ 1516 -"-"*— C o n t r o l s s e l e c t i o n of the "TIME-ARE A" and—the RAINFALL - mod i-f.-i-.ca t-i on •*— -15 17 - * o p t i o n . -- -- ..- - — . 7 * .. 1518 *****************************************-*-. + ******************** *-+ * **.**. * 1519 CHARACTER*50 MODMNUL(5) 1520 COMMON/BLK8/ IPAUSE,/BLK8B/ MODMNUL 1521 IPAUSE = 1 1522 CALL PRNTMNU(MODMNUL,IDIM) 1523 END 1524 - *-1525 * 1526 * 1527 SUBROUTINE DMNUS — .. . ... 1528 ************************************************************************ 1529 * C o n t r o l s the USER SUPPLIED VARIABLES o p t i o n s . * 1530 ********************************************* 1531 CHARACTER*50 DMNUL(4),REPLY*2 1532 .. COMMON/BLK4/ DMNUL 1533 301 CALL PRNTMNU(DMNUL.4) 1534 READ ' (A2) ' .REPLY 1535 * 1536 ***** Input of VARIABLES 1537 * ~ .. - . 1538 IF(REPLY.EO.'I ') THEN 1539 CALL DATIN(*302) 1540 * 1541 ***** L i s t i n g of VARIABLES 1542 * 1543 ELSE IF(REPLY.EQ.'L ') THEN 1544 CALL DATLIST 1545 CALL WAIT " -'. _ ._ 121 1546 * 1547 * * * * * M o d i f i c a t i o n of VARIABLES 1 548 * 1549 ELSE IF(REPLY.EO.'M ') THEN 1550 CALL DATMOD(*302) 155 1 ELSE IF(REPLY.EO.' ':0R.REPLY.EO.'MM') THEN 1552 RETURN 1 553 ELSE 1554 CALL ERR0R(*3O1) 1555 END I F 1556 GO TO 301 1557 302 RETURN 1558 END 1559 * 1560 * 156 1 * 1562 SUBROUTINE DNTOPT 1563 * * * * * * 1564 * C o n t r o l s s e l e c t i o n of the TIME-AREA and the RAINFALL e n t r y o p t i o n . * 1565 ********************* 1566 CHARACTER*50 ENTMNUL(4) 1 567 COMMON/BLK8/ I PAUSE,/BLK8A/ ENTMNUL 1568 I PAUSE = 1 1569 CALL PRNTMNUfENTMNUL.4) 1570 END 157 1 * 1572 * 1573 * 1574 - SUBROUTINE DTACLC 1575 * * *******************************_*****+*****+*** * 1576 C a l c u l a t e s the INCREMENTAL AREA format of the a c t u a l TIME-AREA v a l -1577 * ues i f and o n l y i f the a c t u a l TIME-AREA v a l u e s 'were e n t e r e d from the -1578 * t e r m i n a l or r e a d from a f i l e . * 1579 ***** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ***^******_*. ********** * 1580 R EAL * 4 AREA(3 ) 158 1 COMMON/BLK6/ NOPT,/BLK10/ VARI ABLE(3, 15) ,/BLK1 1/ NP .-1582 COMMON/BLK16/ DUMMY 1(400,3.2:14),TARREA(100.3.2:14) - • • - 1583 COMMON/BLK19/ MXTANT(3,2:14),PARREA(100.3.2:5 ) 1584 EQUIVALENCE (AREA(3).VARIABLE(6)) 1585 DO 201 0=1 ,NOPT ""'.""' 1586 M = U+NP 1587 TARREA( 1 ,M,2) = PARREA( 1 .2,2)*AREA(M) 1588 -~-. DO 201 1=2, MXTANT(2,2) 20 f -TARREA ( I , M.2 )' "= " (PARREA ( IT2V2 ) -' PARREA'f I - 1 . 2.2 )") * AREA ( M ) ---... 1590 IF(N0PT.E0.3) THEN 159 1 DO 202 ID=3,14 1592 NC = 2 1593 I F ( I D . E 0 . 1 4 ) NC = 1 1594 DO 202 <J = 1 , 3 . NC ._._'„ 1595 - DO 202 1 = 1 ,MXTANT(2,2) "1596" •202 'TARREAf I . JT'ID)""""^ 'TARREA f I ,2,2") "" ' '"'" ":" 1597 ••- ELSE -'»-"•' • - - - - - -1598 "'•DO 203 I= i .MXTANT(2,2) 1599 203 TARREA(1,2. 14) = TARREA(1.2,2) •1600 END I-F - — 1601 END 1602 * 1603 * 1604 * . „ 1605 SUBROUTINE ECHOOSE(JD,* ) 1606 * * * * * ************************************** + ***.** + + ********** + :********.* + "1607 * A l l o w s the c h o i c e of'"whether the LOW. PROBABLE, or HIGH e s t i m a t e of 1608 * the c u r r e n t l y s p e c i f i e d USER SUPPLIED VARIABLE, i s to be used to 1609 * i d e n t i f y the s e l e c t i o n of a s e t of CALCULATED VALUES when the p r o - * 1610 * gram i s i n the PRDBABLISTIC mode. 1 * 16 11 + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * " 1612 CHARACTER ECMNUL(5)*50 1613 COMMON/BLK5/ ECMNUL 16 14 301 CALL PRNTMNUf ECMNUL,5) 1615 - READ(*,*,IOSTAT=IERR ) JD 1616 IF(IERR.NE.0) CALL ERRCODE(I ERR,*301 ) 16 17 IF(UD.EQ.-I) RETURN 1 1618 I F (<J0 . LT . 1 . OR'. UD . GT . 3 ) CALL ERROR (•* 30 1 ) !-• 16 19 END 1620 * 1621 * 1622 * • i 122 1623 SUBROUTINE EFRNCLC _ _. _ .... I (5 2 4 A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * • * * + * * * * • • * * * * * * * * * . • . - * * + * + * * * * -1625 * C o n t r o l s the c a l c u l a t i o n o f t h e EFFECTIVE RAINFALL v a l u e s a c c o r d i n g * 1626 * to the s p e c i f i e d o p t i o n s . * 16 27 *****.******.************.************ ***************+******************+.+ 1628 COMMON/BLK6/ NOPT,/BLK12/ ID,NC,/BLK16/ EFRAIN(400,3.2: 14) 1629 COMMON/BLK17/ DUMMY 1 ,MXFLNT 1630 _ COMMON/BLK 18/ IFLRN,/BLK23/ MXSTNT ( 3 . 8 : 1 4_) . RAJN(_4_00_._3 , 8 : 14 ') 163 1 COMMON/BLK32/ MFLRN 1 g 3 2 A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1633 * If the a c t u a l RAINFALL v a l u e s have been e n t e r e d from the t e r m i n a l * 1634 * or read from a f i l e , then the u n a f f e c t e d i n d i c e s r e l a t i n g to the * 1635 * number of n e c e s s a r y RAINFALL v a l u e s per set are equated to the i n - * 1636 * dex c o r r e s p o n d i n g to the HIGH v a l u e of the DURATION OF MAXIMUM * 1637 * INTENSITY. * 1638 ************************************************************************ .1.639 _IF(MF_RN_EO. 1) THEN 1640 DO 201 ID = 8.14 1641 DO 201 M=1,3 1642 _ MXSTNT(M,ID) = MXSTNT(3,14) 1643 DO 201 1=1,MXSTNT(3,14) 1644 RAIN(I.M.ID) = RAIN(I,2.14) 1645 201 CONTINUE 1646 END IF 1 g 4 7 ************************************************************************ 1648 * The EFFECTIVE RAINFALL v a l u e s a r e i n i t i a l i z e d to z e r o . * 1649 A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * . * * * * * * * * * * * * * * * * * * * 1650 •- DO 202 ID = 2,14 • • - - -•- ..... 1651 DO 202 M=1,3 • -- - -• -1652 DO 202 1 = 1 ,MXFLNT 1653 202 EFRAIN(I,M,ID) = 0.0 1654 ******************** 1655 * The s e t of v a l u e s c o r r e s p o n d i n g to the PROBABLE DURATION OF MAXIMUM * 1656 * INTENSITY i s used as the PROBABLE v a l u e of the EFFECTIVE RAINFALL * 1657 * v a l u e s . * 1658 ************************************************************************ 1659 .. ID = 14 ... ... . . .. . . 1660 NC = 1 1661 CALL HORTON 1662 **************** *"* ****************************************************** 1663 *"" When the program i s i n the PROBABLISTIC mode, one s e t of v a l u e s i s * 1664 * c a l c u l a t e d each from the LOW and HIGH e s t i m a t e s of the USER SUPPLIED* - 1665 *—VARIABLES t h a t c o r r e s p o n d t o — t h e EFFECTIVE RAINFALL v a l u e s . - •-* -•• - ^ 666 ****** * *"* * * * *•* i**-* 1* ****** *-*-*-**•** ***** ******* *'**.*-*. *.*:** * * *_:* *i*:*.* *.* *,* * * * *. --~ 1667 IF(N0PT.E0.3) THEN 1668 NC = 2 1669 DO 203 ID=8,10 1670 CALL HORTON 1671 203 CONTINUE.- . . . . ' .... -1672 * • "J * _ •_ _ _ * 1673 ***** '"""These s e t s a r e c a l c u l a t e d o n l y ' i f t h e a c t u a l RAINFALL v a l u e s " - 1674 ***** were not' r e a d ' from" a " f i l'e or" e n t e r e d from "the t e r m i n a l " ' . " 1675 * " '"" "" 1676 I F(IFLRN.NE. 1) THEN 1677 -• -DO 204 10=11, 13 - --- -. 1678 CALL HORTON 1679 204 CONTINUE 1680 END IF ^ gg ^  * * * **-*"*-*-** * * * *-**-*-** * * * * **-*r*-* * * * * A**-*-**-*-*-**-* **-*-*-**-* * •** * * * _ * * * * * * * * * *-*-**-** 1682 . * A l l u n a f f e c t e d s e t s a r e equated to the se t of-PROBABLE EFFECTIVE * 1683 * RAINFALL v a l u e s . * •jgg4 A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * * * * - ---1685 DO 2Q5 ID=2,7 1686 DO 205 M=1,3 1687 DO 205 I=1,MXSTNT(2,14) , _ 1688 J205 EFRAIN(I_. M ,._I_D)_ =_ Ef RAIN( I .2.14) _ ' 1689 " ~' DO 206 10 = 8, 13 1690 DO 206 1=1,MXSTNT(2,14) 1691 206 EFRAIN(I,2,ID) = EFRAIN(I.2.14) 1692 ************************************************+*********************** 1693 * When the program i s i n the DETERMINISTIC mode, the s e t of v a l u e s * 1694 * c o r r e s p o n d i n g to the PROBABLE e s t i m a t e of the AREA 1s equated to the *. 1695 * PROBABLE s e t of v a l u e s . * <ggg ************************************************************************ 1697 ELSE 1698 DO 207 I=1.MXSTNT(2, 1 4 ) 1699 207 EFRAI_N( I . 2. 2) = EFR A IN ( I . 2 . 1 4 ) _ ' 123 1700 END I F 1701 END 1702 * 1703 * 1704 * 1705 SUBROUTINE EFRNVLCLC . 170S * * *********************************************************** * * * ******* * 1707 * C a l c u l a t e s the TOTAL EFFECTIVE RAINFALL a c c o r d i n g to the spe c i f i ed * 1708 * opt i ons. * 1709 * * *********************************************************** * + *.+. * * * + 17 10 R E AL * 4 EFRNVLf 3,8:14) 17 11 COMMON/BLK6/ NOPT,/BLK1 1/ NP./BLK12/ ID.NC 17 12 COMMON/BLK 16/ EFRA IN( 400., 3,2: 14) 17 13 C0MM0N/BLK23/ MXSTNT(3.8: 1 4 ) ,/BLK35/ EFRNVL 1714 DO 201 1=1.NOPT.NC 17 15 J = I + NP 1716 EFRNVL(J . ID) = 0.0 17 17 DO 201 K=1,MXSTNT(J,ID) 17 18 EFRNVL(J.IO) = EFRNVL(J,ID ) + EFRA IN(K.J.ID) 17 19 201 CONTINUE 1720 END 172 1 * 1722 * 1723 1724 SUBROUTINE ERRCODE(I ERR.* ) - -• _ 1725 * * ********************************-.-*********** ******** ******* * * * **•*• + *** * 1726 * P r o c e s s e s input e r r o r . c o n d i t i o n : ^ and l i s t s a p p r o p r i a t e messag es on * 1727 the t e r m i n a l s c r e e n . * 1728 * * ********************************************* *•> * *********** * * * * * k * * * * * 1729 101 FORMAT(/, 1X,5( '*' ), 1X,A40,25( '* ' ) . /) 1730 102 FORMATf1X,'IOSTAT = ',13) 173 1 1732 RETURN 1733 ELSE IF(IERR.E0.29) THEN 1734 PRINT 101, 'The f i l e was not found *****************' 1735 ELSE I.Ff IERR.E0.34) THEN 1736 PRINT 101, 'The f i l e i s a l r e a d y open * » * * * * * * * * * * * * * ' 1737 ELSE IF(IERR.EO.43) THEN • -1738 PRINT 101, ' I n v a l i d f i l e s p e c i f i c a t i o n *************' . . . 1739 ELSE IF(IERR.EO.59) THEN 1740 PRINT 101. 'Improper i n p u t *************************' 174 1 ELSE 1742 PRINT 101. ' U n i d e n t i f i a b l e e r r o r *******************' ,-—11743 - -PRINT.. 1.02 1.ERR. . . . .. 1744 PRINT 101, 'Refer to the VAX-11 USER GUIDE (p 7-2) 1745 CALL WAIT 1746 END IF 1747 RETURN 1 1748 END 1749 * - - _ - ~ " - -1750 - * ... — ' - _ : .. - :— - - — r - - ^ r r — v . - - : — - - v •• 1-75 1 * 1752 SUBROUTINE E R R 0 R ( * ) 1753 ************************************************************** + * ******* * 1754 * L i s t s an e r r o r message on the t e r m i n a l s c r e e n whenever a 1 og i ca 1 * 1755 * in p u t e r r o r i s d e t e c t e d by one of the v a r i o u s r o u t i n e s in the pro- * 1756 + gram. * 1757 * * ************************************** :!; + ******* *^ ********** *• * * ******* * 1758 - - CHARACTER CLRV-T 100*50 -- — - ... 1759 COMMON/BLK8/ IPAUSE 1760 PARAMETER(CLRVT100=CHAR(27)//'[;f'//CHAR(27)//'[J') 176 1 101 FGRMATC/.1X,5('*').IX,A40,25('*')./) 1762 PRINT*, CLRVT100 1763 PRINT 101, ' I n v a l i d r e s p o n s e : P l e a s e t r y a g a i n . ***' 1764 i PRINT*,' ' 1765 IPAUSE= 1 • 1766 RETURN 1 1767 END 1768 * 1769 * 1770 " * 177 1 SUBROUTINE FILENT(VAR,J,IMX,IFLAG,*) 1772 * * ************************************************************** ******** 1773 : * A l l o w s a c t u a l TIME-AREA or RAINFALL v a l u e s to be r e a d from a •' f i l e . * 1774 • ************************************************************* ********** * 1775 DIMENSION VAR(J,1.1) 1776 CHARACTER REPLY*_2, CLRVT 100*50 124 1777 COMMON/BLK8/ I PAUSE,/BLK19/ MXTANT(3,2: 14) 1778 PARAMETER(CLRVT 100 = CHAR( 27 ) / / ' [ ; f .'.//CHAR{ 27 ) / / : [U.'J ... .... 1779 101 FORMAT(/. 1X. 15( '•' ) , I 4 , ' d a t a v a l u e s were read from the f i l e ', 1780 115('*')./) 178 1 102 FORMAT(/, 1X,70( '*' ) ) 1782 103 FORMAT(11X.A50) 1783 104 FORMAT( IX,70( ' * ' ) . / ) • 1784 105 FORMA T ( / , ' C o n t i n u e 7, (Y/N) >'.$) 1785 JF LAG = 0 1786 DO 201 1=1.0 1787 READ(4,*,END = 302.ERR = 303.IOSTAT = IERR ) VAR(I. 1 . 1 ) 1788 + 1789 * * * * * If TIME-AREA v a l u e s a r e b e i n g r e a d i n , they a r e checked f o r as-1790 * * * * * cend i ng o r d e r . 179 1 * 1792 IF(IFLAG.EO.1) THEN 1793 VARTA1 = 0.0 1794 IF ( I .NE. 1 ) VARTA1 = VAR( 1-1,1.1) 1795 VARTA2 = VAR( 1,1,1) 1 796 CALL TACHECK(VARTA1.VARTA2,1.0.*301) 1797 GOTO 201 1798 30 1 OFLAG = 1 1 799 END I F 1800 201 IMX = I 1801 302 CL0SE(4) 1802 - . . . . . . 1803 * * * * * V e r i f i e s a completed r e a d by l i s t i n g the number of v a l u e s r e a d on 1804 * * * * * the t e r m i n a l s c r e e n . 1805 * - ... - ... . . 1806 PRINT*, CLRVT 100 - - - - . -- ... 1807 PRINT 101, IMX 1808 IPAUSE = 1 1809 * 18 10 * * * * * The number of TIME-AREA v a l u e s t h a t s h o u l d be read has been p r e -181 1 * * * * * d e t e r m i n e d by MXTANTCLC. If the two v a l u e s do not agree, con-18 12 * * * * * t r o l i s p a s s e d to the menu i n DMNUS. 1813 * 18 14 IF( IFLAG. EQ...1 ...AND ..IMX . NE . MXTANT (2,2)) THEN 1815 PRINT -102 - - - - . .... . 18 16 PRINT 103,'The number of TIME-AREA v a l u e s r e a d from your f i l e ' 18 17 PRINT 103.'does not match the number t h a t s h o u l d have been ' 1818 PRINT 103,'read a c c o r d i n g , to your TIME OF CONCENTRAION and ' 18 19 PRINT 103,'TIME INTERVAL v a l u e s . P l e a s e check these a g a i n . 1820 PRINT -104- — • - • — - •— 182'1 MXTANT (2 . 2) = I MX ." . - ' "' '' ' ..: ' ' '•'•• ~ " ' ' 1822 RETURN 1 1823 END I F 1824 * 1825 * * * * * If the TIME-AREA v a l u e s a r e not ...in a s c e n d i n g o r d e r , the user i s 1826 * * * * * g i v e n the o p t i o n to c o n t i n u e the program or r e t u r n to the menu 1827 * * * * * i n s u b r o u t i n e DMNUS." . . . . . . . ~1828~ * - - - •• — — 1829 ;v _ — IF (OFLAG'. EO. 1 ) THEN • '" :~ ~ - - - ~ . — 1830 "" PRINT 105 " "'- -"" 183 1 READ '(A1)'. REPLY 1832 IF (REPLY .NE . ' Y-•'-•)- RETURN 1 —.. _. 1833 END IF , 1834 RETURN 1835 303 CL0SE(4 ) 1836 CALL ERRCODE ("IERR")"" "" " " 1837 RETURN .1 1838 END 18 3 9 * . . . . . . . . . . _ 1840 * 1841 * 1842 SUBROUTINE HDPRNT 1843 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1844 * W r i t e s s e v e r a 1 s t r i ngs to the ' p r i n t e r ' f i l e as a header f o r hard- * 1845 * copy l i s t , ngs. * 1846 * * * * * *************.+ . * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * • * * * * * * * * * * * * * * * * * * * * * * * * 1847 CHARACTER*30 BASINHD.DATEHD,USERHD 1848 COMMON/BLK11/ NP./BLK28/ BASINHD,DATEHD.USERHD 1849 101 FORMAT(/,1X,70('*'),/) 1850 102 F0RMAT(2X.'DATE: ',A<LN>) 185 1 103 F0RMAT(2X,'USER: ',A<LN>) 1852 104 F0RMAT(2X,'DRAINAGE BASIN: ',A<LN>./) 1853 WRIT E(2 , 10 1 ) 125 1854 CALL LENGTH!DATEHD.LN) 1855 WRIT E(2, 102 ) DATEHO 1856 CALL LENGTH(USERHD,LN) 1857 WRITE(2, 103) USERHO 1858 CALL L ENGTH(BA SINHO,LN) 1859 WRI TE(2 , 104) BASINHD 1860 CALL DATLIST 186 1 WRITE(2. 101 ) 1862 f END 1863 * 1864 * 1865 1866 SUBROUTINE HORTON 1867 * * -fc * * * + * * * + * * : * * # + * * * * * * * + * * + + * * * * * * * + + * • ^ -> 1868 * Ca1 c u l a t e s the a c t u a l EFFECTIVE RAINFALL v a l u e s u s i n g H o r t o n ' s equa- * 1869 * t i o n . * 1870 * * * * * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * 187 1 DIMENSION M(8:14) 1872 REAL*4 I I R ( 3 ) , S I R ( 3 ) , T 9 0 ( 3 ) 1873 C0MM0N/BLK6/ NOPT,/BLK 10/ VARIABLE(3 . 1 5 ) ,/BLK 1 1/ NP./BLK1 2/ ID.NC 1874 COMMON/BLK16/ EFRA IN(400,3,2: 14) ,/BLK 1 7/ DT.MXFLNT 1875 C0MM0N/BLK2 3/ MXSTNT(3,8: 14),RA IN(400.3,8: 14) 1876 EQUIVALENCE (I I R ( 3 ) , V A R I A B L E ( 2 4 ) ) , ( S I R ( 3 ) , V A R I A B L E ( 2 7 ) ) 1877 EQUIVALENCE (T90(3),VARIABLE(30)) 1878 * 1879 * * * * * R e s e t s each VARIABLE to the PROBABLE e s t i m a t e each time a new 1880 * * * * * independent VARIABLE i s to be used. 188 1 * 1882 00 201 1=8.14 1883 201 M ( I ) = 2 1884 He 1885 * * * * * C a u s e s t h e i n d e p e n d e n t VARIABLE t o P e i n c r e m e n t e d f r o m the LOW 1886 * * * * * to the HIGH e s t i m a t e . 1887 * 1888 DO 202 u=1.NOPT.NC 1889 M(ID) = J+NP 1890 * 189 1 * * * * * C a l c u l a t e s the n e c e s s a r y c o n s t a n t s . 1892 * • • -1893 D = DT/T90(M(10)) 1894 DIS = D T M I I R ( M ( 8 ) ) - S I R ( M ( 9 ) ) ) 1895 IF(DIS.LT.O.O) DIS = O.O 1896 DS = DT*SIR(M(9)) -1897 - * _ ; _ . - . „ . . - . _ _ _ . . .... _ ..... . LL 1898 * * * * * Loop t h a t c a l c u l a t e s the a c t u a l v a l u e s . 1899 * 1900 DO 203 1=1.MXSTNT(M(ID),ID) 1901 EFRAIN(I,M(ID). ID) = RAIN(I ,M(ID) , ID )-DIS* EXP(-D*( I -1))-DS 1902 * 1903 * * * * * P r e v e n t s n e g a t i v e VALUES. . ... 1904 * ... - - ..- • •• -• — — 1905 IF( EFRAIN( I , M( ID )., ID) . LT .0.0) EFRAINf I . M ( ID) , ID) C O 1906 203 CONTINUE "L 1907 202 CONTINUE 1908 END 1909 * 1910 * 19 11 * 1912 . SUBROUTINE HYDCLC. .... 1913 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 1914 * C o n t r o 1 s t h e c a l c u l a t i o n o f t h e ou t f 1 o w h y d r o g r a p h s a c c o r d i n g to the 1915 * s p e c i f i e d o p t i o n s . * 1916 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - > • * * * * * * * * * * * * * * * * * * * * * * 19 17 R E A L * 4 ' DUMMY 2(400.3,2:14) 1918 COMMON/BLK6/ NOPT,/BLK12/ ID,NC,/BLK18/ IFLRN,IFLTA 1919 COMMON/BLK20/ DUMMY 1(2: 14 ) ,ESTPKFLW.DUMMY2.PKF LW(3,2:14). STDDEV • 1920 * 1921 * * * * * I n i t i a l i z e s the PEAK OUTFLOW of each hydrograph to z e r o . 1922 * 1923 DO 201 1=2, 14 1924 DO 201 J=1.3 1925 201 PKFLW(J.I) = 0.0 1926 * _. 1927 * * * * * Only one hydro g r a p h i s c a l c u l a t e d i n the DETERMINISTIC mode. 1928 * 1929 ID = 2 19,30 _ NC = 1 . . 126 - - - 1931 CALL MUSKNGM -1932 * 1933 ***** I f the program i s i n the DETERMINISTIC mode, the STANDARD 1934 ***** DEVIATION i s s e t equal to z e r o . (The MEAN PEAK o u t f l o w 1935 ***** i s always equal to the PROBABLE PEAK o u t f l o w v a l u e . ) 1936 * . -1937 IF(NOPT.EO.1) STDDEV = 0.0 1938 ESTPKFLW = PKFLW(2,2) 1939 * 1940 ***** One hydrograph each i s c a l c u l a t e d f o r the LOW and HIGH e s t i m a t e s 194 1 ***** of the i n d i c a t e d USER SUPPLIED VARIABLES when the program i s i n 1942 ***** the PROBABLISTIC mode. 1943 .* 1944 IF(N0PT.E0.3) THEN 1945 NC = 2 1946 ID = 3 1947 CALL MUSKNGM 1948 IF(IFLTA.NE.1) THEN 1949 DO 202 ID=4,5 1950 CALL MUSKNGM 195 1 202 CONTINUE 1952 END I F 1953 DO 203 ID=6.10 1954 CALL MUSKNGM 1955 203 CONTINUE 1956 IF(IFLRN.NE.1) THEN 1957 DO 204 ID= 11,14 1958 CALL MUSKNGM ... - - 1959 204 CONTINUE 1960 END IF 196 1 END I F 1962 END 1963 * 1964 * 1965 * 1966 SUBROUTINE IMNUS 1967 ***** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ***•*-*************-• ******* . . . . 1968 * L i s t s the program i n t r o d u c t i o n i n the t e r m i n a l s c r e e n . * 1969 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *'* * * * * * * * * * * * * * * * * * * * * * * * * * * 1970 CHARACTER*50 CLRVT100 1971 - PARAMETER(CLRVT100=CHAR(27)//'[;f'//CHAR(27)//'[J') 1972 5 FORMAT(1X.A67) - 1973 -6 FORMAT(//, 1X.A67,/) • . - _ r - - = r r ^ _ _ _ _ _ t 9 TAT" - - - _ = T = r - 7 - "FORMAT ( 1 XTA67 r / _ ) ~ ~ ~ — - " - •• --. . r -=-_ s-.-™r 1975 PRINT*, CLRVT100 1976 PRINT 7,'INTRODUCTION: 1977 PRINT 5,' T h i s program i s d e s i g n e d to c a l c u l a t e the e x p e c t e d ' 1978 PRINT 5,'f1ow from a d r a i n a g e b a s i n due to a s i n g l e r a i n e v e n t . ' 1979 PRINT 5.'Although more s o p h i s t i c a t e d programs e x i s t , EPFFM i s ' 1980 - - PRINT 5, ' e s p e c i a 11y u s e f u l f o r b a s i n s w i t h l i t t l e or no r e c o r d e d ' - : 198 1 — _. PRINT" 5',-'data s i n c e T t ~ 1 s based on e s t i m a t e s of s e v e r a l v a r i a b l e s ' -"1982 ... PRINT 5 , ' s u p p l i e d by the u s e r . The program may be o p e r a t e d i n ' -.1983 -• PRINT 7,'two modes; DETERMINISTIC or PROBABLISTIC: 1984 PRINT 5,' In the DETERMINISTIC mode, the r e s u l t i s a s i n g l e ' 1985 PRINT 5 ,-•' f 1 ow hydrograph-w i t h no e s t i m a t e of the e r r o r . . The' 1986 PRINT 5. ' PROBABLI ST IC mode, -however, y i e l d s the mean and s t a n d a r d ' 1987 PRINT 5 , ' d e v i a t i o n of the peak flow from LOW, PROBABLE, and HIGH' 1988 PRINT 5 , ' e s t i m a t e s of the v a r i o u s u s e r s u p p l i e d v a r i a b l e s . ' " 1989 - PR I NT -57"'These e s t i m a t e s r e p r e s e n t " " t h e upper and 1ower l i m i t s o f — 1990 PRINT 5,'an 80% c o n f i d e n c e i n t e r v a l . (That i s the 10% and 90%' 199 1 PRINT 5 , ' v a l u e s . ) An o u t f l o w hydrograph i s a l s o c a l c u l a t e d from' - 1992 PRINT 7,'the p r o b a b l e e s t i m a t e s of the v a r i a b l e s . 1993 CALL WAIT 1994 PRINT 6,' O p e r a t i o n of EPFFM i s ver y s i m p l e . J u s t s e l e c t t h e ' 1995 PRINT 5, ' d e s i r e d o p t i o n code from the d i s p l a y e d menu. If the' 1996 PRINT 5, 'expected r e s p o n s e i s an ALPHA-NUMERIC CHARACTER, you 1997 PRINT 5,'may: 1998 PRINT 5.' a) r e t u r n to the PREVIOUS MENU by p r e s s i n g RETURN 1999 PRINT 5,' b) r e t u r n to the MAIN MENU by e n t e r i n g MM 2000 PRINT 5,' 2001 PRINT 5.'When the r e s p o n s e 1s a NUMERIC CHARACTER, you may r e t u r n ' 20O2 PRINT 5,'to the PREVIOUS MENU ONLY by e n t e r i n g -1. Any o t h e r ' 2003 PRINT 5. ' n e g a t i v e v a l u e w i l l most - l i k e l y r e s u l t i n an e r r o r mes-' 2004 PRINT 5,'sage. ' 2005 CALL WAIT 2006 END :" 2007 * _ i _. 127 2008 2009 2010 201 1 2012 2013 2014 2015 2016 2017 2018 2019 2020 202 1 2022 2023 2024 2025 2026 2027 2028 2029 2030 203 1 2032 2033 2034 2035 2036 2037 2038 2039 2040 204 1 2042 2043 2044 2045 . 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 "2057 2058 2059 2060 2061 2062 2063 2064 2065 2066-2067 2068 2069 2070 207 1 2072 2073 2074 2075 2076 2077 2078 2079 2080 208 1 2082 2083 2084 r * * * * * * H SUBROUTINE LENQTH(STRING,LN) *********************************************< * C a l c u l a t e s the l e n g t h of a pa s s e d s t r i n g . * * * * * * * * * * * * * * * * * * * * * * * * * * * . * * * * * * * * * * * * * * * i; + * -I CHARACTER STRING*(*) LN = IN0EX(STRING,' ') - 1 IF(LN.LE.O) LN = LEN(STRING) END SUBROUTINE MUSKNGM * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ^ k Uses the Muski ngum me thod of ca1cu1 at i ng an out f1ow hydrograph * I * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * r k * . * * i REALM CMK(3).INFLW(400) ,OUTFLW(400.3.2: 14) .TC(3 ) ,CMX(3) DIMENSION M(14) C0MM0N/BLK6/ NOPT,/BLK10/ VARI ABLE(3. 1 5 ) ./BLK 1 1 / NP./BLK12/ ID.NC COMMON/BLK16/ EFRAIN(400.3.2:14).TARREA(100.3.2:14) COMMON/BLK17/ DT,MXFLNT./BLK 19/ MXTANT(3.2: 14) COMMON/BLK20/ DUMMY 1(2:14),DUMMY2,OUTFLW,PKFLW(3,2:14).STDDEV COMMON/BLK22/ EPSFLW,/BLK23/ MXSTNT(3.8:14) EQUIVALENCE (TC(3).VARIABLE(9 ) ) EQUIVALENCE (CMK(3),VAR I ABLE( 1 8 ) ) , (CMX(3) ,VARIABLE(21) ) ***.*****************************************+**************+***********, ' Loop t h a t c a l c u l a t e s one hydrograph each f o r the LOW and HIGH e s t i -* mates of the s p e c i f i e d USER SUPPLIED VARIABLE. (***». A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * * * * * * * * * * * * * * » * • < * * * * * 201 * * * * * * * * * * Resets each VARIABLE to the PROBABLt e s t i m a t e each time a new independent VARIABLE i s to be used. DO 201 1=2,14 M(I) = 2 CONTINUE Causes the independent VARIABLE to be' incremented from the LOW the HIGH estimate." DO 202 <J= 1 , NOPT , NC . M( ID) = «J+NP - . . 203 * -*"**"*-* -- * * * * * 205 R e - i n i t i a 1 i z e s each h y d r o g r a p h to z e r o . DO 203 1=1.MXFLNT INFLW(I) = 0.0 0UTFLW(I,M(ID),ID) = 0.0 Cal cu 1 a'te's~a"1 l'coe'f f "i "c i-ehts "and constant's-used by the-Muskingum method. AK = 1.0/(360.0*DT) CMKX = ...CMK(M(6) )*CMX(M(7) )_ .... DT5 = 0.5*DT CO = (DT5-CMKX)/(CMK(M(6))-CMKX+DT5) C1 = (CMKX+DT5)/(CMK(M(6))-CMKX+DT5) - C2 -=-(/CMK ( M( 6 )-)-CMKX -DT5 ) / ( CMK ( M( 6 ) ) -CMKX + DT5 ) C a l c u l a t e s the i n f l o w v a l u e s . DO 204 K=2, MXFLNT NI = MXTANT(M(ID),ID) IF(K- 1 .LT.NI) NI = K-1 DO 205 NA=1, NI TAEF = TARREA(NA,M(ID),ID)*EFRAIN(K-NA,M(ID).ID) INFLW(K) = INFLW(K)+AK*TAEF CONTINUE C a l c u l a t e s the o u t f l o w v a l u e s . CINFLW = C0*INFLW(K) + C1 * INFLW(K-1) - OUTFLW(K,M(ID),ID) = CINFLW + C2*OUTFLW(K- 1,M(ID),ID) IF(OUTFLW(K,M(ID),ID).LT.0.0) OUTFLW(K.M(ID),ID) = 0.0. Determines the PEAK o u t f l o w v a l u e . - - \ 128 208 5 « • •• .......... . . . . . . . . . 2086 IF(OUTFLW(K,M(ID) . 10) .GT.PKFLW(M(10). ID)) THEN 2087 PKFLW(M(ID) ,ID) = 0UTFLW(K,M(ID),ID) 2088 IF(ID.EO.2.AND.M(ID).EO.2) KPKNT = K 2089 END IF • 2090 * 2091 ***** Checks f o r the t a i l - e n d of the hydrograph: If the o u t f l o w 2092 ***** v a l u e i s l e s s than the EPSILON f r a c t i o n of the PEAK out-2093 ***** flow, c a l c u l a t i o n s a re t e r m i n a t e d . ( T h i s does not a p p l y to 2094 ***** -the hydrograph c a l c u l a t e d from the PROBABLE e s t i m a t e of 2095 ***** T N E AREA. ) 2096 * 2097 IF(ID.NE.2.AND.M(ID) .NE.2.AND.K.GT.KPKNT.AND.OUT F LW(K.M(ID) . 2098 1 ID ) .LT.EPSFLW*PKFLW(M(ID).ID)) GOTO 202. 2099 204 CONTINUE 2 100 202 CONTINUE 2101 END 2102 * 2103 * . • 2104 * 2105 SUBROUTINE MXFLCLC(MXFL) 2 1 QQ ****+********* + *** + * * * * * * * * * * * * . * * * * * * * * * . * * * * * * *,•*•.[.******** **:,-**+.•****** 2107 * All o w s the user to s e l e c t the number of OUTFLOW HYDROGRAPH v a l u e s to * 2108 * be 1 i s t e d . 21Q9 *****..^****************************************** *-********************* 2110 COMMON/BLK17/ DT.MXFLNT 2111 101 F0RMAT(/,2X,A5O) 2112 102 F0RMAT(2X.'(Maximum i s ' ,F6.2, ' hours ) >':%) 2113 301 PRINT 101.'How many hours of flow d a t a do you want - l i s t e d ? ' 2114 PRINT 102. DT*MXFLNT 2115 READ(* , * . IOSTAT = IERR) TIME 2116 . IF(IERR.NE.O) CALL ERRCODE(I ERR,*301) 2117 * 2 118 ***** checks f o r a v a l i d r e s p o n s e . 21 19 * 2120 IF(TIME.GT.(MXFLNT*DT).OR.TIME.LE.0.0) CALL ERR0R(*3O1) •---2121 - - MXFL = I NT (TI ME /DT) .... -2122 - .- - END - . ... , 2123 * 2124 * 2125 * 2126 SUBROUTINE MXTANTCLC(*) 2127" "****•************* *"* ******** *-* * * * *-*-** *******-.* * * * * * * * * * * * . * * * J - . * * _ * _ . • * * * 2128 " ~ ~ " C a f e u V a t e s ~~the "index "that""specTfTei"' the^nurnber "of ~TIM_~ARE"A^values™*" 2129 * r e q u i r e d by the program. * 2130 ******************* 2131 REAL*4 TC(3) 2132 COMMON/BLK6/ NOPT,/BLK10/ VARIABLE(3, 15 ) ./BLK 1 1 / NP .. 2133 .... . COMMON/BLK 1 7/ DT , /BLK 19/ MXTANT ( 3 . 2 : 1 4 ) ,/BLK 1 8/ IDUMMY 1 , I FLTA 2-1.3-4—__ EQUIVALENCE ( TC (3 L,_VAR.I ABLE_(_9_).)_ : _ _ 2135 '"_____ 101 F0RMAT(/ L1X, 70( ;*^) ) " _ "" " " ~ 213 6 " 102 FORMAT ( 1 1X , A50 ) - - - - - - -2137 " 103 FORMAT(1X,70('*'),/) " - - - -- _ . 2138 2139 ***** p r e v e n t s a ' d i v i d e - b y z e r o ' e r r o r . •— 2140 * 2141 I F ( T C ( 2 ) .EO.0.0) RETURN 2 1 4 3 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2144 * If the a c t u a l TIME-AREA v a l u e s have been enter'ed"TFom t'rTe Fe~rminal *" 2145 * or read from a f i l e , then the LOW and HIGH TIME OF CONCENTRATION * 2146 * e s t i m a t e s a re s e t equal to the PROBABLE e s t i m a t e . * 2147 ************************************************************************ 2148 IF(IFLTA.EO.1) THEN 2149 DO 205 1=1,3.2 2150 205 TC( I ) = TC(2) - 2151 ENDIF 2 1 _ 2 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2153 * When the program i s i n the PROBABLISTIC mode, one v a l u e of the index* 2154 * i s c a l c u l a t e d f o r each of the LOW, PROBABLE, and HIGH e s t i m a t e s of * 2155 * the TIME OF CONCENTRATION. . * 2156 ************************************************************************ 2157 DO 201 1=1,NOPT • 2158 J = I + NP -2159 • MXTANT(J,3) = INT(TC(J)/DT) 2160 IF(TC(J)/DT.GT.REAL(MXTANT(J,3))) MXTANT(d,3 ) = MXTANT(J.3)+1 2161 * 2162 ***** P r e v e n t s the v a l u e of the index to exceed the index's dimension. 129 2 163 2 164 2 165 2 166 2 167 2 168 2 169 2170 2 17 1 2 172 2173 2 1 74 2 175 2 176 2177 2 178 . 2 179 2 180 2181 2 182 2 183 2 184 2185 2 186 2187 .'.188 :" 189 2190 2 19 1 2 192 2 193 2 194 2 195 2 196 2 197 2198 2199 2200 2201 2202 2203 2204 2205 -2206—. 2207 2208 2209 2210 221 1 2212 22 13 2214 22 15 2216 2217 2218 22 19 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 ( I f i t does, c o n t r o l i s passed to the menu i n DMNUS. IF(MXTANT(J.3).GT.101) THEN PRINT 101 PRINT 102.'The maximum number of TIME-AREA INTERVALS, which ' PRINT 102.'is 100., has been exceeded by your c o m b i n a t i o n of ' PRINT 102.'the TIME INTERVAL and the TIME OF CONCENTRAION. ' PRINT 102,'Please e n t e r an a p p r o p r i a t e , c o m b i n a t i o n . PRINT 103 RETURN 1 END IF 201 CONTINUE * * * * * * * * * * * * * * * * * * * * * t * * * * * * * * * * * * * * * * * * * * I f the program i s i n the PROBABLISTIC mode, a l l v a l u e s of the which a r e not a f f e c t e d by the TIME OF CONCENTRATION w i l l be se the PROBABLE index v a l u e . i ndex t to r * * *-* * * c * * * * * * * * * * * * * * * * * * * * * * I * * * * * * * * * -203 202 204 IF(NOPT.EO.3) THEN DO 202 JD = 2,14 IF(JD.EQ.3) GOTO 202 DO 203 J= 1 , 3 MXTANT(J,JD) = MXTANT(2,3) CONTINUE ELSE DO 204 J=1,3 MXTANT(J,2) = MXTANT(2,3) END IF END SUBROUTINE CPENF2FL(* *) fc********* ******** ******* ***************:**********-*** ************* ****** * Opens a f i l e from which the a c t u a l TIME-AREA or RAINFALL v a l u e s a r e * * ' to be r e a d . * <***** ****************************************************************** CHARACTER*15 FLNAME, TEST*2 101 FORMAT(/,2X. 'F i1ename > ' , $ ) " " " " 301 PRINT- 101 ~ " ' READ ' (A 15) ' , FLNAME - --- _ • TEST = FLNAME . . K * * * * e * * * * e * * * * . + * + * « * * * * t * * * * * * * * * * * * * * IT * * * * r * * * * e * * * Hr , * * * * < * * * * t * * * * t * * * * Depending on the l o c a t i o n of the c a l l i n g statement and _wh_ich type of . v a l u e s - a r e t o _be....£gad_ in.... cont ro.l_. i s...passed . to the, p r e y ipus .. menu. If TIME-AREA v a l u e s a r e to be read, then c o n t r o l i s " passed to one of the f o l l o w i n g : Label S u b r o u t i n e 302 DATIN 303 DATMOD " 308 . .... . . DATMOD I f . however, RA INFALL.. va.l ues. are ..to be. read._ t hen ...cont ro 1 i s _ pas -to one of the f o l l o w i n g : ... Label S u b r o u t i n e 303 DATIN 306 DATMOD 309 " DATMOD I F ( I EST . EO... ).__RE.TURN .2.. ***** C o n t r o l i s p a s s e d to the MAIN MENU. IF(TEST.EO.'MM') RETURN 1 0PEN( 4; F I LE = FLNAME, DISPOSE""'SAVE' , STATUS = ' OLD ' , ERR = 302. 1REC0RDTYPE='VARIABLE' , IOSTAT=I ERR) RETURN 302 CALL ERRCODE(I ERR.*301) END SUBROUTINE OPENWFL - - . ******************** ***************************************************•< * Opens a permanent f i l e t o which c e r t a i n CALCULATED VALUES may be 4 * wr i t t e n . 1 **************************************************************** * * * * * * * i CHARACTER* 15 FLNAME . -130 2240 101 FORMAT(/,2X,'Fi1ename >',$) 224 1 PRINT 101 2242 READ ' (A15) ' , FLNAME 2243 OPEN(3,FILE-FLNAME. DISP0SE='5AVE'.STATUS?'NEW, ERR = 301 2244 1 IOSTA T = IE RR) 2245 RETURN 2246 301 IPAUSE = 1 2247 CALL ERRCODE(IERR) 2248 END 2249 * 2250 + 225 1 * 2252 SUBROUTINE PAUSE(I PAUSE) 2253 .* * * * * * * * *•* * * * * * * * * * * * *.* * * * * * * * * * * * * * * * * * + * * * * * * * * * * * * * * * * * * * * -r * * ;tr * * •>. * * > * 2254 * D e t e r m i n e s i f the t e r m i n a l s c r e e n s h o u l d be c l e a r e d b e f o r e a } i s t f ng. * 2255 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * .* * * * * 2256 CHARACTER*50 CLRVT100 2257 * 2258 * * *** The f o l l o w i n g statement i s termina1(VT100). dependent 2259 * 2260 PARAMETER (CLRVT 100=CHAR( 27 ) / / ' [ : f ' //CHAR ( 2 7 ) / /.' [ <J ' ) 226 1 IF(IPAUSE.EO.O) THEN 2262 PRINT*. CLRVT100 2263 END IF 2264 IPAUSE=0 2265 END 2266 * 2267 * 2268 * 2269 SUBROUTINE PDNTCHK(V,*) 2270 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2271 * Checks f o r a s c e n d i n g o r d e r i n when the LOW. PROBABLE and HIGH e s t - * 2272 * imates of the USER SUPPLIED VARIABLES a re e n t e r e d from the term i na1. * 2273 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2274 DIMENSION V(3,1) 2275 101 FORMAT(/,1X,70('*')) 2276 102 FORMAT(1X.70( '* ' ) ) - • - -2277 103 FORMAT(3X,'Values '.3F10.2,'- a r e not i n a s c e n d i n g order-' -) - — — 2278 IF ( V( 2, 1 ) . LT . V( 1 , 1 ) .OR . V(3, 1 ) .'LT . V(2 . 1 ) ) THEN 2279 PRINT 101 2280 PRINT 103. (V(K.1),K=1,3) 2281 PRINT 102 .2282 * - — _ — 2283 * * *** "Passes c o n t r o l to VabeT:l3di "in 0 A T E N T " ™ ' ' " " ^ I 1 5 ^ 2284 RETURN 1 2285 END I F 2286 END 2287 * 2288 * 2289 * 2290 SUBROUTINE P L O T H Y D " " _ ... ._ 229 1 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-* 2292 * S u b r o u t i n e to p l o t the o u t f l o w hydrograph * • 2293 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2294 REAL*4 0UTFLW(4OO.3,2: 14) ,X(6) , Y(20) —• 2295 INTEGER*4 IPL0T(6O) * 2296 CHARACTER * 1 GO, Y T I T L E ( 2 0 ) . PLOTFLW(60,21) 2297 COMMON/BLK17/ DT,MXFLNT,/BLK24/ IDUMMY 1 ,LPO.LPOT 2298 COMMON/BLK20/ DUMMY 1 ( 2 : 14). ESTPKFLW ," OUTFLW . DUMMY2 C37 2T1"4' T 2299 DATA YTITLE/3* ' ' , '0' , 'u ' . ' t ' . ' f ' . ' 1 ' , 'o' . 'w' .2*' ', ' * ' ' c ' , ' m ' , 2300 1's','*',3*' '/ 2301 DO 201 1= 1 . 20 " -2302 DO 201 «J=1.60 2303 201 PLOTFLW(J.I) = ' ' 2304 DO 206 1=1,60 2305 206 PL0TFLW(I,21) = '-' 2306 DO 207 1=1.5 2307 207 PL0TFLW(I * 12.2 1 ) = ' + ' 2308 101 F0RMAT(2X,A1 ,8X, ' | ' ,60A 1) 2309 102 FORMAT(8X, '0.0' , , + / .60A 1) 2310 103 FORMAT(8X,F6.2,4(6X,F6.2),4X,F6.2) 23 1 1 104 F0RMAT(/.35X,'Time * h o u r s * ' ;8X . A 15,$ ) 2312 105 F0RMAT(/,' How many hours of flow d a t a do you want p l o t t e d ?') 2313 106 FORMAT(2X, ' ( ' ,F6.2, '<= Time <= ' . F6 . 2 . ' ) >',$) 2314 107 FORMAT(/,1X,71('*')) 2315 108 FORMAT( 19X, 'Too ',A5,' a v a l u e . P l e a s e t r y a g a i n !' ) 2316 109 FORMAT(1X,71('*') ./) 131 2317 110 FORMAT(/,27X,'Outflow Hydrograph',//) 2318 111 FORMAT(2X,A 1 , 1X,F7.2, ' + ' ,60A1 ) " "' " "" " ' 23 19 a * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ^ 2320 * C a l c u l a t i o n of s c a l i n g f a c t o r s * 2 3 2 1 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * . * * * * * * * * * * * • * * * * * * * * * * * 2322 301- PRINT 105 2323 PRINT 106, 60.0*DT, MXFLNT*DT , 2324 R EAD(*,*,I05TAT=IERR) TIME 2325 IF( IERR.NE.0) CALL ERRCODE(I ERR.*301) 2326 IF(TIME.GT.MX FLNT*DT) THEN 2327_ PRINT 107  2328 PRINT 108, ' l a r g e ' 2329 PRINT 109 2330 GOTO 301 2331 "ELSE TF (TIME.LT.60.0*DT) THEN 2332 PRINT 107 2333 PRINT 108, ' sma11' 2334 PRINT 109 2335 GOTO 301 2336 END IF 2337 ISCALE = INT(TIME/(60.0*DT)) 2338 IF(TIME/(60.0*DT) .GT.REAL(ISCALE)) I SCALE = ISCALE + 1 2339 X(1) = 0.0 2340 DO 202 1=1,5 2341 202 X(I+1) = 12.0*I*ISCALE*DT 2342 Y( 1 ) = ESTPKFLW 2343 DO 203 1=1,3 2344 203 Y(1 + 5*I) = ESTPKFLW*(4 - I)/4.0 2345 ********************** -2346 * Placement of p l o t t i n g symbol i n t o a p p r o p r i a t e c o o r d i n a t e s * 234 7 ************************************************************************ 2348 DO 204 I = 1 , SO 2349 JSCALE = IMSCALE 2350 IF(JSCALE.GT.MXFLNT) JSCALE = MXFLNT 2351 TEMPVAR = "OUTFLW(JSCALE,2,2)/ESTPKFLW* 20.O 2352 IPLOT(I) = INT(TEMPVAR) 2353 IF (TEMPVAR . GT . REAL( IPLOT( I ) ) ) IPLOT(I) = IPLOT(I) -:- 1 ' "" ' ' " 2354 204 PLOTFLW( I, 2 1 - IP LOT( I ) ) = '*' "--2 3 5 5 " " " ' * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ' * * * * * ' * ' * ' * * * * * * * * * " * " * * * * + * * * * • * * ' * * * * * * 2356 * - Queue i ng of p 1 ot t i ng d a t a to the p r i n t e r — * 2357 ************************************************************************ 2358 302 IF(LPO.EO.I) THEN ._. 2359 ~WRITE(2, 1 10) ' _ _ •"" - - 236Q- _^~-.fiQ_-_208 1 = 1,20 T . ^ ^ . . " ^ ! ' " Z „ . _ 1 ™ Z _ L _ 1 _ I _ 2361" " IF ( I . EO . 1 . OR . I". EO . 6 . OR . I". EO". 1 l" . OR: r.-EO . 16 ) THEN 2362 WRITE(2. 1 1 1 ) . YT I TLE ( I ) . Y ( I ) . ( PLOTF LW (. J , I ) , J= 1 , 60 ) 2363 ELSE 2364 WRITE(2.101), YTITLE(I).(PLOTFLW(J,I).J=1,60) 2365 END IF - - -2366 ^ 208 CONTINUE ""'---' " "-"--•; • .---2367- -- -~ —WR-I-TE(2 .-1.02-)—-(-:PLOTFLW( - J ,-M-)-,J = -W-60 ) •— — H I 2368 I .... WRITE (2. '03).. .(.X ( I _)._.. I = 1.. .6 ) ._ .-2369' _ .. WRITE (2, 104 ) , L '.Z .' . _ ._ " 2370 ELSE ' ~ 237>f ************************************************************************ "2372 * P r i n t i n g of p l o t t i n g d a t a to t e r m i n a l s c r e e n - ~~ * 2373 ********************************* *** ******************** + **************** 2374 DO 205 1=1,20 237.5 -. IF(.I...E.0.„1_..QR..-I_.E.a..6_...0R...I E.0...1 1 .OR ..I ..E.Q .L6.).__THEN 2376 PRINT 111. Y T I T L E ( I ) , Y ( I ) . ( P L O T F L W ( J . I ) . J = 1 , 6 0 ) 2377 ELSE . .' 2378 . ... .... PRINT.10.1. YTITLE(I).(PL0TFLW(J,I),J=1,6O) 2379 END IF 2380 205 CONTINUE 2381 PRINT 102. (PLOTFLW(J,21),J=1,60) 2382 PRINT 103, (X(I),I = 1,6 ) ' 2383 PRINT 104, ' ( P r e s s r e t u r n ) > ' 2384 READ '(A 1 ) ' , GO 2385 END IF . ... ' _ 2386 IF(LPO.EO.I) CALL PRNTCNFRM " 2387 IF(LPO.EO.O) CALL PRINT(*302) • _ -2388 LPO = LPOT " ' 2389 END 2390 * 2391 * 2392 * . . . . ' 2394 SUBROUTINE PMNUS 132 2395 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - „ - * * * * * * * * * * * * * * * * * - . + * * * * * + + 2396 * C o n t r o l s the o p t i o n s f o r the PROGRAM PARAMETERS. * 2397 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + *. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2398 CHARACTER* 50 CLRVT 100, PMNUL ( 4 ) . POMNUL (4 ) •, TAMNUL ( 5 ) 2399 CHARACTER REPLY*2,TATPNM(4)* 22.VB(2: 14)*4 2400 C0MM0N/BLK8/ IPAUSE./BLK2 1 / C0RC0V( 14, 14) ,ITATYPE,TATPNM 2401 COMMON/BLK22/ EPSFLW,/BLK24/ IDUMMY 1 .LPO 2402 C0MM0N/BLK27/ PMNUL,POMNUL.TAMNUL,VB 2403 PARAMETER(CLRVT 100 = CHAR(27)//'[ ;f ' //CHAR(27)//' [ J ' ) 2404 101 FORMAT( 1 1X, 'PARAMETER' ,26X, 'VALUE' ,/) 2405 102 F0RMAT(5X, 'Flow i n t e r v a l EPS ILON' ,2 1 X . F4 . 2 ) 2406 103 FORMAT(5X,'TIME-AREA l i s t i n g format'. 9X.'"'. A<JTA>,'"'./) 2407 •104 F0RMAT(22X.'CORRELATION COEFFICIENTS') 2408 105 FORMAT( 1X,'VARIABLE',2X,13(1X,I2,2X)) 2409 106 FORMAT(1X.I2,':',A4.1X,<L>('.'),<13>F5.1) 24 10 107 FORMAT(/,2X,A60) 24 1 1 108 FORMAT(2X,A60,' >'.$) 24 12 109 FORMAT(1X,74( ' ' ) ) 24 13 1 10 FORMAT(/, 1X.A39,/) 24 14 1 1 1 FORMAT(/,' The o l d v a l u e i s '.F4.2./) 24 15 1 12 FORMAT( ' New ' .A 10, ' >' ,$ ) 24 16 30 1 CALL PRNTMNU(PMNUL,4) 24 17 READ'(A2) ' . REPLY 24 18 LPO = - 1 24 19 * * * * * * * * * * * * * * * * * * * * * * * * * < * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ;k * * * * * * * * * 2420 * Opens a temporary ' p r i n t e r ' f i l e , then destroys- i t aft'er the * 242 1 * c o n t e n t s have been queued to a hardcopy, d e v i c e . + ... 2422 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *•** * * * * * * * * * * * * * * * * * * *.* * * * } * * * * * * * * * -+ 2423 IFfREPLY.EO.'P ') THEN . 2424 LPO = 1 2425 .0PEN(2,FILE = 'PRINT.DAT'.DISPOSE = 'PRINT/DELETE'.IOS TAT = I ERR . 2426 1 STATUS = 'UNKNOWN') 2427 IF(IERR.NE.0) CALL ERRCODE(I ERR.*301 ) 2428 CALL HDPRNT 2429 END I F 2430 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2431 * W r i t e s the PARAMETERS to the ' p r i n t e r ' f i l e o r l i s t s them, on the- * 2432 * t e r m i n a l s c r e e n . * 2433 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2434 IF(REPLY.EQ.'L '.OR.REPLY.EO.'P ') THEN 2435 IF(LPO.EO.1) THEN 2436 WRITE(2. 101 ) •• . — 2437 ~ " WRITE(2, 102)' "EPSFLW"' — • --=======• — - . ~— - --2438 CALL L ENGTH(TATPNM(ITATYPE),JTA) 2439 WRITE(2.103) TATPNM(ITATYPE) 2440 WRITE(2.104) 244 1 WRITE(2.105) (J,J=2,14) 2442 WRITE(2. 109) 2443 . * 2444 * * * * * "L" i s a format v a r i a b l e t h a t c o n t r o l s "the "layout of the 2445 * * * * * CORRELATION COEFICIENT l i s t i n g . -" ~ • 2446 * 2447 L = -4 2448 DO 201 1=2,14 2449 L = L + 5 * 2450 201 WRITE(2, 106) I,VB(I ) ,(CORCOV(K,I ) ,K = I, 14) 2451 . CL0SE(2, DISPOSE = 'PRINT/DELETE', IOSTAT=IERR) 2452 IF(IERR.NE.0) CALL ERRCODE(I ERR,*301) 2453 PRINT 110, 'Program parameters queued f o r p r i n t i n g ' 2454 ELSE 2455 PRINT*. CLRVT100 2456 PRINT 101 2457 PRINT 102,EPSFLW 2458 CALL LENGTH(TATPNM(ITATYPE),JTA) 2459 PRINT 103.TATPNM(ITATYPE) 2460 PRINT 104 2461 PRINT 105, (J.J=2,14) 2462 PRINT 109 2463 L = -4 2464 DO 202 1=2.14 2465 L = L+-5 2466 202 PRINT 106. I,VB(I),(CORCOV(K.I ),K=I,14) ~ 2467 END I F 2468 CALL WAIT 2469 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2470 * Al lows m o d i f i c a t i o n of the PARAMETERS from the t e r m i n a l . " * 247 1 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 133 2472 ELSE IF(REPLY.EO.'M ') THEN 2473 302 CALL PRNTMNU(POMNUL.4) 2474 READ'(A2)', REPLY " 2475 * 2476 ***** EPSFLW a l l o w s c o n t r o l of the l e n g t h of the OUTFLOW HYDROGRAPH 2477 ***** r e c e s s i o n c u r v e . 2478 * 2479 IF(REPLY.EO.'E ') THEN 2480 310 PRINT 111. EPSFLW 2481 PRINT 112, 'Epsi1 on ?' 2482 READ(*,*,IOSTAT=IERR) EPSFLW 2483 IF(IERR.NE.O) CALL ERRCODE(I ERR.*310) 2484 * 2485 ***** TIME-AREA FORMAT s p e c i f i e r . 2486 * ^2487 ELSE I F ( REPLY . EO . ' T ') THEN 2488 303 CALL PRNTMNU(TAMNUL;5 ) 2489 READ(* , *,IOSTAT=IERR ) ITATYPE 2490 IF(IERR.NE.0) THEN 2491 IPAUSE = 1 2492 CALL ERRCODE(I ERR,*303) 2493 ENOIF 2494 IF(ITATYPE.EO.- 1 ) GOTO 302 2495 * 2496 ***** Checks f o r i n v a l i d r esponse. 2497 * . . 2498 IFfITATYPE.LT. 1.OR. ITATYPE.GT.4.OR.ITATYPE.EQ.0)CALL ERR0R( k3O3) 2499 * 2500 ***** CORRELATION COEFICIENTS 2501 2502 ELSE IF(REPLY.EO.'C ') THEN 2503 PRINT 105. (d.J=2.14) 2504 PRINT 103 2505 L = -4 2506 DO 203 1=2,14 2507 L = L+5 2508 203 PRINT 106, I,VB(I),(CORCOV(K,I),K=I,14) 2509 304 PRINT 107,'Enter the ID numbers of the two c o r r e l a t e d v a r i a b l e s ' 2 5 1 0 " ' PRINT 108,'and the n e w ' c o r r e l a t i o n c o e f f i c i e n t . (0,0.0 to a u i t ) ' 2511 " 305 " READ(*,*,IOSTAT = IERR) ID 1 ,ID2,TCORCOV 2512 - IF(IERR.NE.O) CALL ERRCODE(I ERR.*304 ) -2513 IF(IDI.EQ.O) GOTO -302 2514 2515 ._*****_ _Checks f o r . . i n v a l i d r e s p o n s e s . 2517 IF ( ID 1 . LT . 2 .OR . ID1 . GT .' 14 .'OR . ID2 . LT . 2 . OR . ID2 . GT . 14 ) THEN 2518 CALL ERR0R(*304) 2519 END IF 2520 IF(TCORCOV.LT.-1.0.OR.TCORCOV.GT.1.0) THEN 252 1 CALL ERROR (*306) " " " _ .2522 306 ' PRINT 108,'(-1.0 <= C o r r e l a t i o n c o e f f i c i e n t <= 1.0)---; 2523' GOTO 305 - . . --. — : .• :: ----- -2524 .. " END IF . - . "'.- l" 2525 - * - - --. -2526 ***** " Rearranges the a r r a y d i m e n s i o n s p e c i f i e r s to match the de-2527 ***** d a r e d d i m e n s i o n s ofCORCOV. 2528 * 2529 IF(ID 1 .LT. ID2) THEN 2530 IDT = ID1 253 1 ID 1—=—ID2 — --2532 .. ID2 = IDT 2533 END IF — - - 2534 - CORCOV( ID1 . ID2) =- TCORCOV — - -2535 GOTO 304 2536 ELSE 'IF(REPLY.EO. ' ') THEN 2537 GOTO 301 2538 ELSE IF(REPLY.EO.'MM') THEN 2539 GOTO 307 2540 ELSE 2541 CALL ERR0R(*302) 2542 ENDIF 2543 GOTO 302 2544 ELSE IF(REPLY . EO. ' '.OR.REPLY.EO.'MM')• THEN 2545 307 RETURN " ._ 2546 ELSE 2547 CALL ERROR(*301 ) 2548 ENOIF 134 2549 GOTO 301 2550 END 255 t * 2552 * 2553 * 2554 SUBROUTINE PRINT(*) . 2555 * * * * * * * * * * * * * * * * * * * * * * * * 2556 * Detemines i f the l i s t e d CALCULATED VALUE i s to be w r i t t e n to the * 2557 * hardcopy f i l e when the LIST/PRINT o p t i o n i s a c t i v a t e d . + 2558 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2559 CHARACTER REPLY *2 2560 COMMON/BLK24/ LFLAG,LPO.LPOT 2561 101 FORMAT(/,' Do you want t h i s p r i n t e d ? (Y/N) >'.$) 2562 PRINT 101 2563 READ ' ( A ) ' , REPLY 2564 IF(REPLY.EQ.'Y') THEN * 2565 LPOT = 0 2566 LPO = 1 2567 LF LAG = 1 2568 * 2569 ***** if t n e r e p i y i s 'yes', then c o n t r o l i s p a s s e d to b e g i n n i n g of 2570 * * * * * the rou t i ne t h a t g e n e r a t e d the 1 i s t i ng and w r i t e s the 1 i s t i ng 257 1 * * *** to the ' p r i n t e r ' f i l e . ( T h i s i s accomp1 i shed by use of the 2572 * * *** f l a g s LPO, LPOT. and LFLAG.) 2573 . * 2574 RETURN 1 2575 END I F 2576 __ . END . 2577 * 2578 * 2579 * 2580 SUBROUTINE PRNTCNFRM 258 1 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * * * * * * * * 2582 * S u b r o u t i n e to print a message to the t e r m i n a l c o n f i r m i n g t h a t the * 2583 * s e l e c t e d d a t a has been queued to the p r i n t e r . * 2584 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2585 CHARACTER CLRVT100*50 2586 ... " COMMON/BLK8/ IPAUSE 2587 : PARAMETER (CLRVT 100=CHAR( 2 7 ) / / ' [ ; f ' //CHAR (27 )'// ' [ J ' ) 2588 101 FORMAT(/,1X,'* S e l e c t i o n has been queued f o r p r i n t i n g . /) 2589 — PRINT*, CLRVT100 — — 2590 PRINT 101 2591 „ . I PAUSE = 1 1500 . . -FNin - "-" -2593 * 2594 * 2595 * 2596 SUBROUTINE PRNTMNU(MENU,MD) 2597 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2598 . . * L i sts""menus on the t e r m i n a l * 2599 * * * * *-*-*L* *-* ****** *-* * *-*-*-* .*-*-*-*-* -h *.*•* *-*-* *.*-* *~* * * *.*.*.* ****** *..* ******** *  * *.* * *..  2600 _ . CHARACTER*50 ENTOPT*28,HEADING,MENU(20) 2601 - C0MM0N/BLK8/ I PAUSE ,/BLK 1 4/ IVC./BLK15/ K1.MNUID 2602 COMMON/BLK25/ ENTOPT,HEAD ING 2603 101.FORMAT(15X.A50,//) 2604 102 FORMAT(20X.A50,/) 2605 103 FORMAT(2OX,A50) 2606 104 FORMAT(1X,A28,$) •2607 CALL—PAUSE( IPAUSE) • — • 2608 PRINT 101, MENU(1) 2609 PRINT 101. HEADING 2610 K 1 = 2 - -261 1 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 26 12 * MNUID = 99 i d e n t i f i e s the c a l l i n g program as VCHOOSE * 2613 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2614 IF(MNUID.EO.99 ) K1 = 3 • 2615 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2616 * IVC i d e n t i f i e s the program mode as PROBABLISTIC and c o n t r o l s the + 26 17 * s t a r t i n g p o i n t of the l i s t i n g of the USER SUPPLIED VARIABLES * 26 18 * The v a l u e o f : 1 I d e n t i f i e s the p o i n t as AREA * 2619 * 2 i d e n t i f i e s the p o i n t as INITIAL INFILTRATION RATE * 2620 * (2 i s used when MD = 15) . * 2621 * 3 i d e n t i f i e s the p o i n t as I-D INTERCEPT * 2622 * 4 i d e n t i f i e s the p o i n t as INITIAL INFILTRATION RATE + 2623 * (4 i s used when MD = 10) * 2624 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * • * * * * * * * * * * * * * * * * * * * 2625 IF(IVC.E0.2.0R.IVC.E0.4) K1 = 9 i . 135 2626 IF(IVC.EO.3 ) K 1 = 12 2627 * A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * . * * * * * * * * * * 2628 * If t h e r e a r e too many 11nes i n the menu to be pr i n t e d d o u b i e - s p a c e d * 2629 * on a ' s i n g l e s c r e e n , then the menu i s p r i n t e d s i n g l e - s p a c e d . * 2630 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * •****. A * * * * * - * * * * * * - * * * * * * * * 263 1 IF((MD-K1).GT.5) THEN 2632 DO 201 K = K1, MD " 2633 PRINT 103, MENU(X ) 2634 201 CONTINUE 2635 IF(IVC.NE.O) PRINT 103, MENU(17) 2636 PRINT*, ' ' 2637 ELSE 2638 * A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2639 * The menu i s p r i n t e d d o u b l e - s p a c e d . * -2640 * * * * * * * * * * * * * * * * * * * * 264 1 DO 202 K = K 1 . MD 2642 202 PRINT 102, MENU(K ) 2643 IF(IVC.NE.O) PRINT 102, MENU(17) 2644 END IF 2645 PRINT 104, ENTOPT 2646 END 2647 * 2648 * 2649 * 2650 SUBROUTINE PRNTOPT 265 1 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * **.*- * * * * * * .* 2652 * A l l o w s the u s e r to chooses i f the s e l e c t e d CALCULATED VALUE i s * 2653 * l i s t e d on the t e r m i n a l s c r e e n b e f o r e i t i s w r i t t e n to the ' p r i n t e r ' * 2654 * f i l e and queued to a hardcopy d e v i c e . * 2655 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2656 CHARACTER REPLY * 2 2657 COMMON/BLK24/ LFLAG.LPO,LPOT 2658 101 FORMAT(/,' Do you want to use the l i s t / p r i n t o p t i o n ? (Y/N) >',$) 2659 301 PRINT 101 2660 READ ' ( A ) ' ,REPLY 2661 IF(REPLY.EO•'Y') THEN 2662 LPO = 0 2663 LPOT = 0 2664 -_. LFLAG = -1 _ _ . „ 2665 ELSE IF(REPLY.EO.'N'.OR.REPLY.EO.' ') THEN 2666 LPO = 1 2667 -- LPOT = 1 • - - — 2668 LFLAG = 1 " -2669 - ELSE - - - - -- ... . '2670 "'" CALL"' ERROJ7C'*3O-1''0~~-"~~"=__r-:==r^: • • -• = 2671 END IF ' 2672 END 2673 * 2674 * 2675 * ...... ... _ 2676 SUBROUTINE RNCLC ' 2677 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *"*"* * * * * * * * * *"*""* *"*'* *""* *"* * * * * * * * * * * * * * * * * * * * * * '2678 * Ca 5 cu1 a te s the a c t u a l RAINFALL v a l u e s i f and o n l y i f the a c t u a l s - * 2679 * v a l u e s were not e n t e r e d from the t e r m i n a l or read from a f i l e . * 2680 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2681 - - REALM RDURATN( 3 ) . DRMX INT ( 3 )-. RNTRCPT ( 3 ) .RSLOPE( 3 ) . TRAINf 400) 2682 INTEGER*4 M(14) • 2683 C0MM0N/BLK6/ NOPT,/BLK10/ VARI ABLE(3, 15 ) ./BLK11/ NP 2684 COMMON/BLK17/ DT,MXFLNT 2685 C0MM0N/BLK237 MXSTNT(3,8: 14),RAIN(400.37STT4 ) 2686 EQUIVALENCE (RDURATN(3) ,VARI ABLE(39)) , (RNTRCPT(3),VARIABLE(33)) 2687 EQUIVALENCE (RSLOPE(3 ) ,VARIABLE(36)), (DRMXI NT(3) ,VARIABLE(42)) 2688 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2689 * When the program i s i n the PROBABLISTIC mode, one s e t of RAINFALL * 2690 * v a l u e s i s c a l c u l a t e d from each of the LOW and HIGH e s t i m a t e s of the * 269 1 * USER SUPPLIED VARIABLES t h a t a f f e c t these v a l u e s . A l s o , one s e t i s * 2692 * c a l c u l a t e d from the PROBABLE e s t i m a t e of the DURATION OF MAXIMUM * 2693 * INTENSITY. "(The RAINFALL s e t c a l c u l a t e d from the PROBABLE e s t i m a t e * 2694 * of the DURATION OF MAXIMUM INTENSITY i s used as the PROBABLE s e t of * 2695 * va1ues. ) * 2696 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2697 DO 201 ID = 11,14 2698 * 2699 * **** R e s e t s each VARIABLE to the PROBABLE e s t i m a t e each time a new 2700 * **** independent VARIABLE Is to be used. 2701 * - " . 2702 DO 202 1=11.14 136 2703 202 M(I) = 2 2704 NC = 2 - . . . . . . 2705 IF ( ID . EO. 13 .OR . ID . EO.. 14) NC=1 2706 * 2707 ***** Causes the independent VARIABLE to be incremented from the LOW 2708 ***** t n e HIGH e s t i m a t i o n v a l u e . 2709 • * • 2710 DO 201 0=1.NOPT,NC 2711 M(ID) = O+NP 2712 * 2713 ***** I n i t i a l i z e s each s e t of v a l u e s to z e r o . 27 14 2715 DO 203 1 = 1,MXFLNT 2716 TRAIN(I) =0.0 2717 203 RAIN(I,M(ID),ID) = 0.0 27 18 * 2719 ***** C a l c u l a t e s an index to c o n t r o l the maximum number of v a l u e s 2720 ***** to be c a l c u l a t e d . 2721 2722 N = INT(RDURATN(M( 13) )/DT) 2723 IF(RDURATNfM(13))/DT.GT.REAL(N)) N=N*1 2724 * 2725 ***** C a l c u l a t e s an index to c o n t r o l the maximum number of v a l u e s 2726 ***** t o b e c a l c u l a t e d at the peak i n t e n s i t y . 2727 * 2728 MPEAR = I NT(DRMXI NT(M( 14) )/DT) 2729 IF(DRMXINT(M(14))/DT.GT.REAL(MPEAK)) MPEAK=MPEAK+1 2730 * 2731 ***** C a l c u l a t e s temporary v a l u e s from the INTENSITY-DURATION 2732 ***** CURVE e q u a t i o n . -. --2733 2734 DO 204 1=1,MPEAK 2735 TR A I N ( I ) = RNTRCPT ( M ( 1 1 ) ) * ( DT * MP E AK .) * * ( 1 .0"RSLOPE(M( 1 2 ) ) .) 2736 1 /REAL(MPEAK) 2737 204 CONTINUE 2738 DO 205 I=MPEAK+1,N 2739 TRAIN(I)=RNTRCPT(M( 1 1 ) ) * ( D T * I ) * * ( 1 .0-RSLOPE(M( 1 2 ) ) ) -2740 1RNTRCPT(M( 1 1 ) )*(DT*( 1-1 ))*•*( 1 .0-RSLOPE.M. 12.) ) ) 2741 205 CONTINUE — — 2742 * . . . . _ 2743 ***** The temporary v a l u e s a r e arr a n g e d so th a t the peak i n t e n s i t y 2744 ***** o c c u r s mid-storm. . 2745 * -2746 n _;_ " — " ~~ 2748 IF(REAL(N)/2.0.GT.REAL(MID)) THEN 2749 RAIN(1,M(ID),ID) = TRAIN(N) 2750 K=1 275 1 END IF -- .._ 2752 OA = 0 .. —' _. . . -2753 ' 1.D0. .207 I =.1... M.I D - .__ _._ ' — 2754 '" RAIN( I+K"7M( ID) , ID ) =TRAIN(N-OA-K-1')" . . ~ 2755 """ RAIN. I+K<-MID.M( ID) , ID) - TRAIN. 2*0A) • " ~ 2756 207 " "OA = OA + 2 " " " " " ~ ""' " -2 7 5 7 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2758 * A g l o b a l index v a r i a b l e i s s e t e q u a l - t o the number of RAINFALL v a l u e s * 2759 * c a l c u l a t e d above. I t i s a l s o i d e n t i f i e d by the e s t i m a t e of the i n - * 2760 * dependent VARIABLE. * 27gi ************************************************************************ 2762 MX S TNT~( M (T D ) 7l~D)~=~ N 2763 IF(NOPT.EO.1) MXSTNT(3,ID) = N 2764 201 CONTINUE 27g5 ****************#**•****************************.•** *-* ********************* 2766 * Causes a l 1 s e t s of RAINFALL VALUES which a re not a f f e c t e d by any of * 2767 * the USER SUPPLIED VARIABLES to be set equal to the PROBABLE s e t of * 2768 * v a l u e s . ( T h i s i n c l u d e s the g l o b a l index r e c o r d i n g the number of * 2769 * v a l u e s c a l c u l a t e d . ) . . . _ ' * 27 7Q ************************************************************************ 2771 IF(N0PT.E0.1) GOTO 301 2772 DO 208 ID=8.10 2773 DO 208 0=1,3 2774 M(ID) = 0 2775 MXSTNT(M(ID),ID) = MXSTNT(2.14) 2776 .00 208 I=1,MXSTNT(2,14) 2777 RAIN(I,M(ID ) ,ID) = RAIN(I.2,14) 2778 208 CONTINUE 2779 301 DO 209 10=11.13 137 . 2780 MXSTNT ( 2 , ID) = MXSTNT{2.14) 278 1 DO 209 1=1,MXSTNT(2,14) 2782 RAIN(I.2,ID) = RAIN(I.2,14) 2783 209 CONTINUE 2784 END 2785 2786 * 2787 * 2788 SUBROUTINE RNNTOPT(REPLY,*,*,*,*.*} 2789 * * * * * * * * * * * * + * * * + * * + * * * * * * + * * * * . * + * * * * * + + **•.+.+ * + + * • . * * * * * * * + * + * * - * * * * * * * * * 2790 * C o n t r o l s the RAINFALL e n t r y o p t i o n s . * 279 1 * * * * * * * * * * * * * * * + + * * * * * * * * * * * * * * * * * * * * * * * * * * • * -|- * * * * * * * * * * * » ~ * * * 1- + * . + 2792 CHARACTER REPLY * 2 .2793 X0MM0N/.B.LK6/ NOPT,/BLK I 2/ .I.D./BLK18/ IFLRN. IFLTA 2794 COMMON/BLK23/ MXSTNT(3,8: 14 ) ,RAINt 400,3.8: 14) 2795 COMMON/BLK32/ MFLRN,NPRN 2796 101 FORMAT(/,1X,'Number of v a l u e s to be e n t e r e d >',$) 2797 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * » »: * * * * * * * * * 2798 * The a c t u a l v a l u e s a r e to be read from a f i l e . * 2799 * * A * * - * - * * * * * * * * * - * * * - * * * * * * * * - * * * * * * * * - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2800 IF(REPLY.EO.'F ') THEN 2801 IFLRN = 1 2802 MFLRN = 1 2803 NPRN = 1 2804 IMX = 0 2805 CALL OPENRFL(*301,*302) 2806 CALL FI LENT(RA IN( 1,2,14),400,IMX.0) 2807 MXSTNT(3,14) = IMX 2808 * 2809 ***** Depending on the l o c a t i o n of the c a l l i n g s t a t e m e n t . cont r o l i s 28 10 * * *** p a s s e d to one of the f o l l o w i n g : 28 1 1 * * *** Label S u b r o u t i n e 28 12 * * *** 204 DATIN 28 1 3 * * *** 301 DATMOD (The i n i t i a l menu i n the rou t i ne. ) 28 14 * 28 15 RETURN 2 23 16 * * * * * * * * * * * * * * * * * * * * * 4r * * * * * * * * * * 2817 * The a c t u a l v a l u e s a r e to be e n t e r e d from the t e r m i n a l * 28 18 * * • A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * . ! - * * * * * * * * * * .* * * * * * * * * * * 28 19 ELSE IF(REPLY.EO.'T ') THEN 2 8 2 0 - 303 IFLRN = 1 --282 1 MFLRN = 1 2822 NPRN = 1 - 2823" PRINT "101 — " " ' - ~ • — - - - - - - — 2824 READ(*,*,IOSTAT=IERR) MXSTNT(3,14) 2825 IF ( I ERR.NE.0) CALL ERRCODE(I ERR."303) 2826 IMX = MXSTNT(3,14) 2827 CALL TRMNLNT(RAIN(1,2,14),IMX,0.* 302) 2828 * 2829 * * *** . "See note above f o r d e s t i n a t i o n of RETURN 2. -2830 ' *—- ' '"' • • - '"' ~ " • ~ " — " ' . - :. --283.1_._ - RETURN 2 2832 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2833 * The actua1 v a l u e s a r e to be ca1cu1 a ted i * 2834 . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2835 ELSE IF(REPLY.EO.'C ') THEN. 2836 IF(IFLRN.EO.1) THEN 2837 IFLRN = 0 "2838 ' • "— ~ ~- I F ( NOP T . EO . 1 ) THEN — -2839 MFLRN = 1 2840 NPRN = 1 284 1 ELSE 2842 MFLRN = 3 2843 NPRN = O : 2844 END IF 2845 DO 201 ID=11,14 2846 CALL DATENT(*201,*302) 2847 201 CONTINUE 2848 DO 202 1=1,400 2849 202 RAIN(I,2.14) = 0.0 2850 END I F 2851 * .• 2852 ***** If the RAINFALL v a l u e s a re b e i n g i n i t i a l l y c a l c u l a t e d , then 2853 ***** c o n t r o l i s p a s s e d to l a b e l 304 . in DATIN. which c a l I s DATENT. 2854 ***** I f the RAINFALL v a l u e s a r e b e i n g mod i f i ed. and have a l r e a d y 2855 ***** been e n t e r e d from the t e r m i n a l or a f i l e , then the c o n t r o l i s 2856 ***** p a s s e d to l a b e l 301 i n DATMOD. wh i ch i s the i n i t i a l menu. 138 2857 ***** i f the RAINFALL v a l u e s a r e b e i n g m o d i f i e d , and were p r e v i o u s l y 2858 ***** c a l c u l a t e d , the c o n t r o l i s passed to l a b e l 310 i n DATMOD, 2859 ***** which c a l l s DATENT. 2860 * 2861 RETURN 1 2862 ELSE I F ( REPLY . EO . ' M '-) THEN 2863 RETURN 2864 ******.********* + *************** + ********************************* + .*.***** 2865 * C o n t r o l i s p a s s e d to the c u r r e n t o p e r a t i n g menu. * 2866 ************************************************************************ 2867 302 RETURN 5 2868 ELSE IF(REPLY.EO . ' ') THEM 2863 ******************** 2870 * C o n t r o l i s p a s s e d to the p r e v i o u s menu. * 28 7 1 ************************************************************************ 2872 RETURN 4 2873 ELSE IF(REPLY . EO . 'MM') THEN 2 3 7 4 * * * * * * * * * * * * * * * * * *•* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2875 * C o n t r o l i s p a s s e d to the MAIN MENU. * 2876 A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * * * * * * * f * ************* ********** 2877 301 RETURN 3 2878 ELSE 2879 CALL ERR0R(*302) 2880 • END IF 288 1 END 2882 * 2883 * 2884 * 2885 SUBROUTINE RUNMNUS(*,*) 2886 ************************************************************************* 2887 * A l l o w s the u s e r to choose a DETERMINISTIC or PROBABLISTIC program * 2883 * mode. * 2889 ************************************************************************ 2890 CHARACTER REPLY*2,RMNUL(3)*50 2891 C0MM0N/BLK6/ NOPT,/BLK9/ RMNUL,/BLK1 1/ NP,/BLK22/ DUMMY 1 ,ND 2892 "C0MMCN/BLK32/ MFLRN,NPRN./BLK33/ MFLTA,NPTA 2893 301 CALL PRNTMNU(RMNUL,3) 2894 READ '(A)'.REPLY ~ " 2895 IF(REPLY.EQ.'D') THEN 2896 NOPT = 1 2897 ----- - NP = 1 2898 ND = 13 .2899 . _ MFLRN = 1 -2900=-=.-_.-=— MF L-T-A- =—1 r — _ :™_.._._.__!.._.. --—=-2901 NPRN = 1 2902 NPTA = 1 2903 ELSE IF(REPLY.EO.'P') THEN 2904 NOPT = 3 2905 NP = O ' . 2906 1 —z: ND = 1 - - - ~" .. - ..-2907 MF! RN = 3 -~- - ------ . - — 2908 - - MFLTA = 3 ;  2909 - _ NPRN = O 2910 NPTA = O 2911 _ .... ELSE IF ( REPLY . EO . ' ') THEN 2912 RETURN 1 2913 ELSE IF(REPLY.EO.'MM' ) THEN 2914 RETURN 2 2915 ELSE- —- - - - - — - — -2916 CALL ERROR(*301) . 2917 END IF 2918 - END 2919 * 2920 * 292 1 * 2922 SUBROUTINE STDFLWCLC 2923 ************************************************************************ 2924 * C a l c u l a t e s the STANDARD DEVIATION of the PEAK OUTFLOW i f the program* 2925 * i s 1n the PROBABLISTIC mode. * 2926 ************************************************************************ 2927 REAL*4 DLTPKFLW(2 : 14 ) , DUMMY 1(400,3,2: 14), TEMPVAR(2:14) 2928 COMMON/BLK20/ SUBVAR(2: 14),DUMMY2,DUMMY 1 ,PKFLW(3,2: 14) ,STDDEV 2929 C0MM0N/BLK21/ C0RC0V( 14. 14) _ •"" 2930 VARIANCE = O.O 2931 DO 201 1=2,14 2932 201 DLTPKFLW(I) = PKFLW(3',I) - PKFLW( 1.1) 2933 DO 202 1-2, 14 | . ... ... _ ._ 139 2934 TEMPVAR(I) = 0.0 2935 DO 204 J= I . 14 2936 C = 2.0 2937 IF(I.EQ.u)C=1.0 2938 TEMP = C*DLTPKFLW(I)*DLTPKFLW(J)*CORCOV(J,I) 2939 IF(TEMP . LT .0.0) T-EMP = TEMP*-1.0 2940 TEMPVAR(I ) = TEMPVAR(I) + TEMP 294 1 204 CONTINUE 2942 VARIANCE = VARIANCE + TEMPVAR(I) 2943 202 CONTINUE 2944 DO 203 1=2,14 2945 203 SUBVAR(I) = 100.0*TEMPVAR(I)/VARIANCE 2946 STDDEV = SORT(VARIANCE )/2.56 2947 END 2948 * ' -. 2949 * 2950 * 2951 SUBROUTINE TACHECK(VARTA1,VARTA2.VARTA3.*) 2g^2 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2953 • * Checks the a c t u a l TIME-AREA v a l u e s f o r a s c e n d i n g o r d e r when they are * 2954 * b e i n g e n t e r e d from a t e r m i n a l or r e a d from a f i l e . * 2955 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2956 101 FORMAT(/.13X,' The TIME-AREA v a l u e of '.F10.2.' i s too l a r g e ' , / ) 2957 102 FORMAT(/,15X,' The next v a l u e of '.F10.2,' i s too s m a l l ' , / ) 2958 103 FORMAT(/,13X,' The TIME-AREA v a l u e of '.F10.2,' i s too s m a l l ' , / ) 2959 104 FORMAT(/, 1X,7 1 ( '*' )) 2960 105 FORMAT( 1X, 7 1 ( ' * " ' ) , /) 2961 IF(VARTA2.LT.VARTA1.OR.VARTA2.LT.0.0) THEN 2962 -PRINT 104 2963 PRINT 103. VARTA2 2964 PRINT 105 2965 RETURN 1 2966 ELSE IF(VARTA2.GT.1.0) THEN  - 2 9 6 7—• ' — : PRINT 104 2968 PRINT 101. VARTA2 2969 PRINT 105 2970 - - - RETURN . 1 .... 2971 - ELSE IF(VARTA3.LT.VARTA2) THEN 2972 PRINT 104 2973 PRINT 102. VARTA3 2974 ' " " PRINT 105 2975 END IF 2976 END "2977 * - - " " " ' " -. . -2978 * 2979 * 2980 - SUBROUTINE TACLC 298 1 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2982 ..* C a l c u l a t e s the. a c t u a l - TIME-AREA v a l u e s i f and o n l y i f the a c t u a l * .2983." 111.. va 1 ues were n o t e n t e r e d " f pom the t e r m i n a l or r e a d from a f i l e . _ * '"2984 *•*-.***-**"* *-* * * * * * * * * * * *-* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *-* * * * "2985 -" REA L * 4 " AREA(3) , AWTW (-3 ) ,BRATI0(3) , TC ( 3 ) 2986 " : INTEGER*4 M(14). 2987 COMMON/BLK6/ NOPT,/BLK10/ VARIABLE(3, 15 ) ,/BLK11/ NP 2988 COMMON/BLK 16/ DUMMY 1 (-400 , 3 , 2 : 1 4 ) , T ARRE A ( 100, 3 , 2 : 14 ) 2989 COMMON/BLK17/ DT,/BLK19/ MXTANT(3.2:14),PARREA(100,3,2:5) 2990 EQUIVALENCE (AREA(3),VARIABLE(6)), (AWTW(3 ) ,VARI ABLE( 1 5 ) ) 2991 EQUIVALENCE (BRAT 10(3 ) ,VARIABLE( 12) ) ,(TC(3 ) ,VARIABLE(9 ) ) "2992 * * *"'**~*r* * ** *"*—*"** ****-************ *-* **************************** *-*-*-* *•*-* * *•* * *-2993 * When the program i s i n the PROBABLISTIC mode, one se t of TIME-AREA * 2994 * v a l u e s 1s c a l c u l a t e d from each of the LOW and HIGH e s t i m a t e s of the * 2995 " * USER SUPPLIED VARIABLES t h a t a f f e c t t h ese v a l u e s . A l s o , one s e t i s * 2996 * c a 1 c u l a t e d . f r o m the PROBABLE e s t i m a t i o n of the TIME OF CONCENTRATION.* 2997 * (The TIME-AREA s e t c a l c u l a t e d from the PROBABLE e s t i m a t i o n of the * 2998 . * TIME OF CONCENTRATION i s used as the PROBABLE s e t of v a l u e s . ) *. 2999 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 3000 DO 201 ID=2.5 -3001 NC=2 • 3002 IF(ID.EQ.2)NC=1 3003 * 3004 ***** R e s e t s each VARIABLE to the PROBABLE e s t i m a t i o n each time a new 3005 ***** independent VARIABLE i s to be used; 3006 3007 DO 203 1=2.5 3008 203 M(I)=2 " ' . 3009 * ' . 3010 ***** Causes the independent VARIABLE toJbe incremented from the LOW 140 3011 ***** the HIGH e s t i m a t i o n v a l u e . 3012 * 3013 DO 202 J=1,N0PT,NC 3014 M(ID)=J+NP 3015 * 301G ***** I n i t i a l i z e s each s e t of v a l u e s to z e r o . 3017 * 3018 DO 204 1=1.100 3019 PARREA(I,M(ID),ID) =0.0 3020 204 TARREA(I,M(ID),ID) = 0.0 3021 * 3022 ***** C a l c u l a t e s the c o n s t a n t s . 3023 * 3024 A1 » 2.0 - BR AT 10 ( M (4 ) ) '3025 B1 = 1.0/AWTW(M(5)I )*(BRAT 10(M(4))-1.0) 3026 B3 = ( 1 .0-AWTW(M(5)))*( 1 .0-AWTW(M ( 5 ) ) ) 3027 B2 = (AWTW(M(5))+BRAT 10(M(4))*( 1 .0-AWTW(M(5) ) )-1 .0)/B3 3028 IMID = INT(AWTW(M(5))*TC(M(3))/DT) 3029 * 3030 ***** C a l c u l a t e s the CUMULATIVE PERCENTAGE v a l u e s of the TIME-AREA 3031 ***** c u r v e . 3032 * 3033 DO 205 1=1,IMID 3034 DIT = REAL( I ) * DT/TC(M(3)) 3035 205 PARREA(I,M(ID) ,ID) = (A 1 *DIT + B1*DIT*DIT) 3036 DO 206 I = I MID*1,MXTANT(M(ID),ID)- 1 3037 DIT = REAL(I) * DT/TC(M(3)) 3038 206 PARREA(I,M( ID) , 10) = (1.0-A 1 *( 1.0-DIT)-B2*(1 .O-DIT)*(1 .0-DIT) ) 3039 PARREA(MXTANT(M(ID),ID),M(ID),ID) = 1.0 . . . 3040 * 3041 ***** C a l c u l a t e s the INCREMENTAL AREA v a l u e s of the c u r v e . 3042 3043 TARREA( 1,M(ID),ID ) = PARREA(1 ,M( ID), IDi 1AREA(M(2 ) ) 3044 DO 207 I=2,MXTANT(M(ID),ID) 3045 PAR2 = PARREA(I,M(ID),ID)-PARREA(I - 1 ,M(ID),ID ) 3046 207 TARREA(I,M(ID),ID) = PAR2 * AREA(M(2)) " 3047 202 CONTINUE 3048 ************************************************************************ 3049 * Causes a l l s e t s of TIME-AREA v a l u e s which a r e not a f f e c t e d by any o f * 3050 * the USER SUPPLIED VARIABLES to be s e t equal to the PROBABLE s e t o f ' " * 3051 * va 1 ues. . * : 3052 **************************************************************** *.* ****** " 3053 IF(ID.E0.2) GOTO 201 3054 DO 208 I=1,MXTANT(2,2) ^ ;___-_3055 a PARRE A (-1 ,-2 , ID ) --= -P ARRE A (I.-,-2-,-2 ) W__-.-._^-^==-.TTr.^=_=—_-,r^ 3056 208 TARREA(I,2.ID) = TARREA(1,2,2) 3057 201 CONTINUE 3058 IF(NOPT.EO.1) RETURN 3059 DO 209 ID=6,14 3060 DO 209 J=1,3,2 _ 3061 M( ID) = J -.-' ' ~r~—^ __f-.3062 • - - DO 2 10 —1-= 1 .MXTANT (2,2) ' ' • • •• ~ ~ ~ • • • • • 3063 210 TARREA( I ,M( ID) , ID) = TARREA ( 1,2,2) -~ — --' • 3064 209 CONTINUE - • --3065 END 3066 * 3067 * , 3068 * 3069 SUBROUTINE TANTOPT(REPLY,*,*,*,*,*,*) 3070 - - - ~- * * ******* ** * **************** *.**.** *.*.* *.* * *.*.* + *.* * *.* *.*.*.*_*.* *.* *.* * *,_*.*_* **+.+ ** *.*.*„ 3071 * C o n t r o l s the TIME-AREA e n t r y o p t i o n s . .... * 3072 ************************************************************************ - — • - 3073 CHARACTER REPLY*2 • - •- •--3074 C0MM0N/BLK6/ NOPT,/BLK12/ ID./BLK18/ IDUMMY 1,IFLTA 3075 COMMON/BLK19/ MXTANT(3,2: 14 ) ,PARREA(100.3.2:5) 3076 C0MM0N/BLK33/ MFLTA.NPTA 3077 ************************************************************************* .; 3078 *. The a c t u a l v a l u e s a r e to be read from a f i l e . * 3079 ************************************************************************ 3080 IF(REPLY.EO.'F ' ) THEN 308 1 IFLTA = 1 L'v__ "3082 MFLTA = 1 . : . . '.;• - , 3083 NPTA = 1 #VWrf4_-'3084 CALL MXTANTCLC (*303) - — -7. .' ; 3085 " CALL OPENRFL ( *301 . *302) •::-'.';•.' ' .' .:\3086 - IMX = 0 . • • - :- 3087 CALL F_I LENT ( PARRE A ( 1 , 2 , 2 ) . 100. I MX , 1 . *303) • 141 3088 * 3089 ***** Depending on the l o c a t i o n of the c a l l i n g s t atement, c o n t r o l i s 3090 ***** p a s s e d to one of the f o l l o w i n g : L 3091 ***** Label S u b r o u t i n e 3092 ***** 204 DAT IN 3093 ***** 3ot DATMOD (The i n i t i a l menu i n the r o u t i n e . ) 3094 * 3095 RETURN 2 309 6 ****************** 3097 * The a c t u a l v a l u e s a r e to be e n t e r e d from .the t e r m i n a l . * 3098 ************************************************************************ 3099 ELSE IF(REPLY.EQ.'T ') THEN 3100 IFLTA = .1 3101 MFLTA = 1 .3102 NPTA = 1 3103 CALL MXTANTCLC(*303) 3104 IMX = MXTANT(2,2) 3105 CALL TRMNLNT(PARREA(1 ,2.2 ) .IMX, 1 . -302) 3 106 * 3107 ***** see note above f o r RETURN 2. 3 108 * 3109 RETURN 2 3110 ************************************************************************ 3111 * The a c t u a l v a l u e s a r e to be c a l c u l a t e d . * 3112 ************************************************************************ 3113 ELSE IF(REPLY.EO.'C ') THEN 3114 IFI IFLTA . EO. 1) THEN 3 115 IFLTA = 0 3116 I F i NOPT . EO. 1 ) THEN . 3117 MFLTA = 1 3118 NPTA = 1 3119 ELSE 3 120 MFLTA = 3 312 1 NPTA = 0 3122 END I F 3123 DO 201 10=3.5 3124 CALL DATENT(*303,*304) 3125 201 CONTINUE 3 126 DO 202 1= 1 ,'101 "" 3127 202 PARREA(1,2,2) = 0 . 0 3128 END IF ;-3 129 * — ... 3130 ***** i f the TIME-AREA v a l u e s a r e b e i n g i n i t i a l l y c a l c u l a t e d , then 3131 ***** c o n t r o l i s pa s s e d to l a b e l 304 i n DATIN, which c a l l s DATENT... 3-1 32 ——...«««*» I-f~t he—T-IME — ARE A-va-1 ues - are- be i ng-mod-i.-fVi.ed;-.and - have.-_a_l-. ready =_____ 3133 ***** been e n t e r e d from the t e r m i n a l or a f i l e , then the c o n t r o l I s " " 3134 ***** p a s s e d to l a b e l 301 i n DATMOD, which i s the i n i t i a l menu. 3135 ***** if the TIME-AREA v a l u e s a re b e i n g m o d i f i e d , and were p r e v i o u s l y 3136 ***** c a l c u l a t e d , the c o n t r o l i s passed to l a b e l 310 i n DATMOD, 3137 ***** which c a l l s 'DATENT. ' " . _ '" 3138 --*. "" ~ ' " " :": * * '- ' - ' '.*• -3139 -- . . RETURN 1 . .- .- ----- '. * - . . . 314Q ELSE I F ( REPLY . EQ . ' M ' ) THEN • • "- • L_ — .-3141 RETURN- " ' ... • - — 3142 * * * * * * * * * * * * * * *.* A * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 3143 * C o n t r o l , i s passed- to the c u r r e n t opera t i ng menu . „.._. * . 3^44 ********************* *•* ******************** + . : * * -.1. :k * * * * * * * * * * * * * * * * * * * * * * * 3145 302 RETURN 5 ' 3146 ELSE IF(REPLY.EQ.' ') THEN 3 -j 4 7 * * * * * * * * * * *•* * * * * * * * * * * * * * *-*-*•* *•*-* * *•**-*•*-*-*•*-*-*•*-*•*-*••*•*-** *-**-**-**-*-*•*-*,-*.**-*-*-**-*-*.*— 3148 * C o n t r o l i s pa s s e d to the p r e v i o u s menu. - * 3<4g ************************************************************************ 3150 304 RETURN 4 ' - -3151 ELSE IF(REPLY.EO.'MM') THEN 3^52 ************************************************************************ 3153 * C o n t r o l i s p a s s e d to the MAIN MENU. • + 3154 ***********************************************.************************* 3155 301 RETURN 3 3156 ELSE 3157 CALL ERROR(*302) " 3 158 END IF 3159 — ****************************************************************** .******• 3160 * C o n t r o l Is p a s s e d to the menu In DMNUS. - * 31g1 ************************************************************************. 3162 303 RETURN 6 "" :. ... 3163 " END " " — . -142 3 165 3166 * 3167 SUBROUTINE TRMNLNT( VAR , MAX , I FLAG, * ) -— - -- - -3 1 g 8 ********************************************+*************************** 3169 * C o n t r o l s the t e r m i n a l e n t r y of the a c t u a l TIME-AREA and RAINFALL * 3170 * v a l u e s . 3171 ************************************************************************ 3172 DIMENSION VAR (MAX , 1 , 1-) 3173 101 FORMAT(/.1X,'Value number ',13,' >'.$) 3174 3175 . ***** P r e v e n t s the l a s t TIME-AREA v a l u e from b e i n g e n t e r e d from the 3176 ***** t e r m i n a l s i n c e t h i s must be equal to 1.0. 3 177 * 3178 IF(IFLAG.EO . 1) MAX = MAX - 1 3179 * 3180 ***** Loop t h a t r e a ds the v a l u e s from the t e r m i n a l . 3181 * .. 3182 00 201 1=1,MAX 3183 301 PRINT 1 0 1 , 1 3184 READ(*,*,I0STAT=IERR) VAR(I,1,1) 3185 IF(IERR.NE.O) CALL ERRCODE(I ERR.*301 ) 3186 * 3187 ***** C o n t r o l i s p a s s e d to the p r e v i o u s l y l i s t e d menu. 3188 * 3189 IF(VAR(I, 1. 1 ) .LT.0.0) RETURN 1 3190 * 3191 ***** Checks the TIME-AREA v a l u e s f o r a s c e n d i n g o r d e r . 3192 * 3193 I F ( I FLAG.EO. 1) THEN -3194 VARTA 1 = 0.0 -3195 I F ( I . N E . t ) VARTA1 = VAR(I - 1, 1.1). -3196 VARTA2 = VAR(I,1,1) 3197 CALL TACHECK(VARTA1 .VARTA2. 1 .0.*301) 3 198 END I F . . . 3199 201 CONTINUE 3200 * . 3201 ***** The f i n a l TIME-AREA v a l u e i s s e t equal to 1.0. 3202 " * 3203 .' IF (I FLAG . EO . 1 ) THEN ' 3204 " ' .' ' MAX = MAX + 1 . - _. ... - -. -.: 3205 • ' - VAR(MAX,1,1) = 1 . 0 3206 '; END I F 7 " ""' "3207 ; END ""•• ~ - " ~ 3208 ; * " 3209 • * -3211 - SUBROUTINE VCHOOSE(*) 3212 ************************************************************************ 3213 - * - A l l o w s i d e n t i f i c a t i o n of the USER SUPPLIED VARIABLE t h a t a f f e c t s the * 3214 " > c u r r e n t l y chosen CALCULATED VALUE .... _.. . .* 3 2 15 " - —•* *************************************** *_*.+ ************ * * ************ * * * "J3216" •—TTT"~-_ : CHARACTER V M N U L ( 1 7 ) * 5 0 ' ; ' T j r i T ^ J s '"r^5~rrC0MM0N/BLK8/ "IPAUSE , /BLK 12/~TD','"?BLkT 3/ I DUMMY 1 ."VMNUL .'/BLK14/: TVC T 1 3 2 1 8 - — ^ ' - COMMON/BLK 15/--K1"", MNUID- " ."~ - -- . "3219 ~"—"• 301 MNUID = 99 " 3220 MD = 15 3221 IF(IVC.EQ.I) MD = 6- - . -3222 IF(IVC.E0.4) MD = 1 1 •» 3223 CALL PRNTMNU(VMNUL,MD) 3224 MNUID = O ""3225 1 READ ( * ;"*"7T0STAT= rERR")"~ID 3226' IF(IERR.NE.O) THEN •- - -3227 IPAUSE = 1 "3228 CALL ERRCODE ( I ERR , *301 ) " "" "" -3229 END IF 3230 IF(ID.EO.-I) THEN 3231 . IVC = 0 . 3232 ************************************************************************ 3233 * Passes c o n t r o l to the p r e v i o u s menu. - * 3234 ************************************************************************ 3235 - RETURN 1 "~" ' 3236 - END IF 3237 * .. " ' -"-3238 . . ***** Checks f o r an i n v a l i d r e s p o n s e . "r. ' 3239 * "-• "- - . 3240 IF(ID.LT.(K1-1 ).OR.ID.GT.(MD-1)) THEN 3241 CALL ERROR - 'r " ... _ 143 3242 GOTO 301 3243 ELSE 3244 IVC = 0 3245 RETURN 3246 END IF 3247 END 3248 * 3249 * 3250 * 3251 SUBROUTINE WAIT 3252 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * • * * * * * * * * * * * * * * * * + + * * * * * * * * * * * * * * * * * * * * * 3253 * Suspends s c r e e n s c o l l t n g a c t i o n d u r i n g a l i s t i n g . *-3254 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 'k ****** 3255 CHARACTER G0*1 3256 101 FORMAT(/,' P r e s s r e t u r n to c o n t i n u e : ' , $ ) 3257 PRINT 101 "3258 "READ ' ( A ) ' , GO 3259 END 3260 * 3261 * 3262 * 3263 SUBROUTINE WAITSTOP(*) 3264 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 3265 * Suspends s c r e e n s c r o l l i n g a c t i o n d u r i n g a some l i s t i n g s and p r o v i d e s * 3266 * the o p p o r t u n i t y to t e r m i n a t e the l i s t i n g i f d e s i r e d . * 3267 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 3268 CHARACTER G0*1 3269 COMMON/BLK13/ JC 3270 101 F0RMAT(/,A5O.':',$) .3271 JC = JC+1 3272 IF(JC.EO.15) THEN 3273 PRINT 101.' P r e s s r e t u r n to c o n t i n u e or e n t e r "S" to st o p ' 3274 JC = 0 3275 READ'(A)', GO 3276 IF(GO.EO.' ') THEN 3277 RETURN 3278 ELSE 3279 RETURN 1 3280 END I F 3281 ENDIF 3282 :.~ END APPENDIX C: Computer Listing of EPFFM 145 a c 2 -< 1 1 DT 5 a — i o a X ) X z • •z. cz r-1 DLTPKFLW (2:14) | OIT | DIS j DATE HD a | CWMNUL (5) | r-i O 33 n o < •F--t-n 2 X U J 1 CMNUL(4 ) n 2 X r-i 2 U J 1 CLRVTIOO ] | CLMNUL (9) | | CLHEAD | CINFLW 1 CO, CI, C2 1 r-i |.8RATI0(3) 1 | BASINHD 1 1 BASEFLOW 1 1 B1 . B2, B3 | [ AWTW (3) | AREA (3) > > Variable (dimensions) U J a B A S F L W C L C 4 4 a • • 9 a a a a a a B L O C K DATA 8 2 a C L H F R M 2 4 7 • C L H F R M W 2 9 4 a< - - o a a a C L M N U S 3 4 2 C L V F R M 761 a • - C H f J U S 7 7 9 • a a C W M N U S 8 7 6 o o D A T E N T 1 0 0 7 • • a D A T I N 1 1 1 0 ' a D A T L I S T 1 2 0 3 D A T M O D 1331 » D M D O P T 15 : 4 a D M N U S 1 5 2 7 D N T O P T 1 5 6 2 - a D T A C L C 1 5 7 4 E C H O O S E 1 6 0 5 E F R N C L C 1 6 2 3 E F R N V L C L C 1 7 0 5 -E R R C O D E 1 7 2 4 o E R R O R 17 S2 a I F I L E N T 1 7 7 1 a a | H D P R N T 1 8 4 2 o a o a 1 1 I ! H O R T O N ' 1 8 6 6 i i H Y D C L C 19 12 1 1 ! *• I I 1 i i i i I W M M C i 9 55 j L E N G T H 20 10 r-O o • a a a a a I a M U S K M G M 2 021 ! M X F L C L C 2 1 0 5 • I M X T A N T C L C 2 1 2 6 O P E N R F L 2 1 9 4 O P E N W F L 2 2 34 a P A U S E 2 2 5 2 P D N T C H K 2 2 69 r-O • P L O T H Y D 2 2 9 0 • a P M N U S 2 3 9 4 P R I N T 2 5 5 4 a P R N T C N F R M 2 5 8 0 P R N T M N U 2 5 9 6 P R N T O P T 26 50 e • R N C L C 2 6 7 6 R N N T O P T 2 7 8 8 - R U N M M U S 2 8 85 — o a a S T D F L W C L C 2 9 22 T A C H E C K 29 5 1 - • • a a a a • T A C L C 29 80 T A N T O P T 3 0 6 9 T R M N L N T 3167 V C H O O S E 3 2 1 1 W A I T 32 51 WAI T S T O P 3 2 6 3 H cr a i o r-i O CO CO I l-i (D O ro n ro o m c o c cr i-i O 3 ro M 3 i-1 O CJ 3 < CJ i-( H-CO cr i—' ro w < r-i ITATYPE | ISCALE | IREM 1 IPLOT (60) 1 IPAUSE z Tl r-« O o 2 X 1 IMID XI UJ a | IFLTA IFLRN | I FLAG | IERR O c -c 1 a | I DIM O o a [HEADING CT O | FLNAME | ESTPKFLW | EPSFLW 1 ENTOPT m z —i cr rrt ~n •XI Z. < I— UJ Co .£> m -n X} > Z. o UJ m n Z a i— u i Variable (dimensions) e 9 9 B A S F L W C L C 4 4 • a 9 a 9 9 a 9 9 9 9 9 '9 9 B L O C K DATA 8 2 9 9 UJ 9 C L H F R M 2 4 7 a 9 9 C L H F R M W 2 9 4 • 9 • 9 9 UJ e 9 0 a a C L M M U S 3 4 2 9 9 C L V F R M 761 a 9 9 9 C M N U S 7 7 9 9 e a 9 9 9 9 C W M N U S 8 7 6 • 9 9 9 9 D A T E N T 1 0 0 7 9 • 9 9 D A T I N 1 1 1 0 s • 9 0 UJ a Q A T L I S T 1 2 0 3 a a a 9 9 9 a 9 D A T M O D 1-3 3 1 -• 9 D M D O P T 1 5 1 4 D M N U S 1 5 2 7 9 a D N T O P T 1 5 6 2 9 9 D T A C L C 1 5 7 4 - 9 9 E C H O O S E 1 6 0 5 a 9 9 9 E F R N C L C 16 23 O 9 9 a E F R N V L C L C 1 7 0 5 9 E R R C O D E 1 7 2 4 9 E R R O R 17 5 2 a 9 9 a a F I L E N T 1 7 7 1 H D P R N T 1 8 4 2 i a 9 9 9 H O R T O N 1 8 6 6 i l 9 9 9 a a H Y D C L C 19 12 1 i M I I U S 1 9 6 6 L E N G T H 2 0 10 9 9 9 O a M U S K M G H 2 0 21 9 M X F LC LC 2 1 05 9 - 9 M X T A M T C L C 2 1 2 6 9 a O P E t l R F L 2 1 9 4 a 9 9 O P E . N W F L 2 2 34 a P A U S E 22 52 P O N T C H K 2 2 6 9 o • 9 9 • a P L O T H Y D 2 2 9 0 9 9 9 9 P M N U S 2 3 9 4 P R I N T 2 5 5 4 a P R N T C N F R M 2 5 8 0 • • a a P R N T M N U 2 5 9 6 P R M T O P T 26 50 9 9 R N C L C 2 6 7 6 9 9 a a 9 9 R N N T O P T 2 7 3 8 R U N M N U S 2 8 85 a S T D F L W C L C 2 9 2 2 T A C H E C K 29 51 a 9 9 T A C L C 29 80 a • - 9 • T A M T O P T 3 0 6 9 a 9 a T R M N L N T 3 1 6 7 a • 9 -• a V C H O O S E 3 2 1 1 • W A I T 32 51 • WA! T S T O P 3 2 6 3 1 MFLTA j MFLRN 2 m c z r o o 2 a 2 3> X —( }> | MAXRN MAXA(2) | MAX 2 CD 2 2 j LPOT | L P 0 | LPH 1— z : | LFLAG i— j KPKNT PC onr | —i 3> JSCALE a rc a | JFLAG o > Variable (dimensions] a B A S F L W C L C 4 4 • a a a a a a a a a a B L O C K D A T A 8 2 a 9 a C L H F R M 2 4 7 a 0 a C L H F R M W 2 9 4 a a a a e a a 9 a a a C L H N U S 3 4 2 a - a i 9 C L V F R M _ 7 5 1 o a a j C H N U S 7 7 9 a a a a C W M N U S 8 7 6 a a D A T E N T 1 0 0 7 a D A T I N 1 1 1 0 e a a a a D A T L I S T 1 2 0 3 o a a D A T M O D 1 3 3 1 0 M 0 0 P T 1 5 1 4 O M N U S 1 5 2 7 D N T . O P T 1 5 6 2 a j 1 a D T A C L C 1 5 7 4 a E C H O O S c 1 6 0 5 a a 1 E F R N C L C 1 6 2 3 » • E F R N V L C L C 1 7 0 5 E R R C O D E 1 7 2 4 i E R R O R 1 7 5 2 i i • a a F I L E N T 1 7 7 1 o j H D P R N T 1 8 4 2 ! a 1 a M O R T O N 1 8 6 6 i i i 1 I a H Y D C L C - 1 9 12 1 i 1 1 i M M U S 1 9 6 6 1 1 1 1 1 i l « 1 ! " 1 i i i i i i | I 1 1 l i L E N G T H 2 0 10 O | o 0 9 M U S K N G M 2 0 2 1 I ! M X F L C L C 2 1 0 5 1 9 a M X T A N T C L C 2 1 2 6 O P E N R F L 2 1 9 4 O P E N W F L 2 2 3 4 P A U S E 2 2 5 2 o P D N T C H K 2 2 6 9 a a a a P L O T H Y D 2 2 9 0 a a a a a P M N U S 2 3 9 4 a a a P R I N T 2 5 5 4 P R N T C N F R M 2 S 8 0 a a a a P R N T M N U 2 5 9 6 a a a P R I - J T O P T 2 6 5 0 a a a a R M C L C 2 6 7 6 a R N N T O P T 2 7 8 8 a a R U N M M U S 2 8 8 5 a S T D F L W C L C 2 9 2 2 T A C H E C K 2 9 5 1 a a T A C L C 2 9 8 0 • T A N T O P T 3 0 6 9 • T R M N L N T 3 1 6 7 a a V C H O O S E 3 2 1 1 — — — — — — — a W A I T 3 2 51 W A I T S T O P 3 2 6 3 148 33 Z < z c 1— | RNTRCPT (3) XI Z r— UJ XI m XI i — -< XJ a c X) > —< o z UJ XI > z o UJ CO -a o 3 Z cz r— XI 3 z c: i — j> XI r~ O —( -n r— s: o ro X) -n i — s; UJ ro J PARREA (100, 3, 2:5 I | XI > XI ro O cz —1 T l 1— s: o JO UJ INJ •P" Z X) — t > Z XI XI z Z X) Z O XI —< Z z o Z r-i Z > Z X —1 > z —1 UJ 4> MXSTNT (3, 8:14) 3 X -Tl I— z —1 2 X -n i — 3 XI rn > 3 O o 3 Z CZ 1— un Z CZ a 3 z cz r — o O Variable (dimensions) 9 9 9 9 9 9 9 9 B A S F L W C L C 44 9 0 • 9 9 9 9 9 9 9 9 9 9 9 9 9 9 0 9 BLOCK DATA 82 9 CLHFRM 247 9 CLHFRMW 294 .... . - 9 0 0 9 0 .9 e 9 9 9 0 9 a 9 CLMNUS 342 C L V F R M 761 9 0 CMNUS 779 a 9 9 9 9 e 9 9 9 3 a a CWMNUS 876 9 9 DATENT 1007 9 9 9 9 DAT IN 1110 9 9 9 9 0 o DAT LIST 1203 9 9 9 9 « 9 9 DATMOD 1331 0 DMDOPT 1514 9 DMNUS 1527 DNTOPT 1 562 9 9 9 9 0 DTACLC 1574 ECHOOSE 1605 9 • 9 9 9 EFRNCLC 16 23 9 9 9 9 EFRNVLCLC 1705 ERRCODE 172 4 ERROR 17 52 9 9 F1L E N T 1771 9 HDPRNT 1842 9 9 9 9 9 HORTON 1866 I a 9 HYDCLC 19 12 | 1 i I l 1 I ! ! MNUS 1966 L ENGTH 20 10 9 9 9 9 0 9 9 9 9 9 MUSKNGM 2 0 21 9 9 M X F LC LC 2105 9 0 9 MXTANTCLC 2126 O P E H R F L 2194 OPENWFL 2 234 PAUSE 2 2 52 PDMTCHK 2 2 69 0 9 9 PLOT HYD 2290 0 9 9 1 PMNUS 2394 0 PR INT 2 5 54 PRNTCNFRM 2580 9 P R N T M N U 2 5 96 o PRMTOPT 26 50 9 0 9 a 0 9 0 9 e 0 9 RNCLC 2676 e 9 a 0 9 RNNTOPT 278 8 9 o 9 9 9 0 9 RUNMNUS 2 8 85 0 STDFLV/CLC 2 922 TACHECK 2951 9 0 0 9 9 9- TACLC 29 eo 9 9 9 0 9 TANTOPT 3 069 TRMNLNT 3167 0 VCHOOSE 3211 WAIT 32 51 WAI TSTOP 3263 CD W 1 > —( > ro 1 VARTA1 VARMNU (15) VARIANCE | VARIABLE ( 3.15 I VAR (*. 1,1 ) V (3.1 ) USERHO UNITS — i > z -r-o CD 1 TIME TEST — i rn X) < > X! ro -P-TEMPVAR TEMP . (real) 1 TEMP (character) | TCORCOV TC(3) TAVMNUL TAT P N M ( <.) — i XI X) m > CD CD UJ ro 1 TAMNUL(5) TAEF 1 TA (3) | T90(3) Ln CZ CD < •> XI ro STRING | STOOEV | SIR (3) RSL0FE(3) Var i a ble ( di men sion s) B A S F L W C L C 4 4 • • • a a a a a a B L O C K DATA 8 2 a C L H F R M 2 4 7 a C L H F R M W 29 4 9 a 0 9 a a o C L M N U S 3 4 2 C L V F R M ~ 761 C M N U S 7 7 9 0 a a C W M N U S 8 7 6 o 9 D A T E N T 1 0 0 7 9 a a D A T I N 1110 9 D A T L I S T 1 2 0 3 9 9 • a D A T M O D 13-31 D M D O P T 1 5 1 4 O M N U S 1 5 2 7 O N T O P T 1 5 6 2 9 a D T A C L C 1 5 7 4 E C H O O S E - 1 6 0 5 E F R N C L C 16 23 E F R N V L C L C 1 7 0 5 E R R C O D E 1 7 2 4 E R R O R 17 5 2 a F I L E N T 1 7 7 1 a H D P R N T 1 8 4 2 9 o a H O R T O M 1 8 6 6 a H Y D C L C 19 12 I M H U S 1 9 6 6 9 L E N G T H 20 10 9 0 a a 9 M U S K I I G M 2 021 a M X F L C L C 2 1 0 5 a a M X T A N T C L C 2 1 2 6 a O P E N R F L 2 1 9 4 O P E N W F L 2 2 3 4 P A U S E 22 52 9 P O N T C H K 22 6 9 a a P L O T H Y D 2 2 9 0 a a a P M N U S 2 3 9 4 P R I N T 2 5 54 P R N T C N F R M 2 5 8 0 P R N T M N U 2 5 9 6 P R N T O P T 26 50 a a a R N C L C 2 6 7 6 R N N T O P T 2 7 8 8 R U N M N U S 2 8 85 • a a a a S T D F L V / C L C 2 9 22 • • T A C H E C K 2 9 5 1 s a a T A C L C 2 9 8 0 T A N T O P T 3 0 6 9 • • a T R M N L N T 3167 V C H O O S E 3 2 1 1 W A I T 32 51 W A I T S T O P 3 2 6 3 ro 150 YTITLE (20) Y (20) X (6) < z 3> 2 m a VNAME (15) VMNUL (17 ) VHO (2) . < CD ro VARTA3 Variable (dimensions) B A S F L W C L C 4 4 a a a a a B L O C K DATA 8 2 s C L H F R M 2 4 7 a C L H F R M W 2 9 4 a C L H N U S 3 4 2 C L V F R M 761 C M M U S 7 79 C W M N U S 8 7 6 D A T E N T 1 0 0 7 D A T I N 1 1 1 0 a a a D A T L I S T 1 2 0 3 e 0 D A T M O D 13 31 D M D O P T 1 5 1 4 D M N U S 1 S 2 7 D N T O P T 1 5 6 2 D T A C L C 1 5 7 4 E C H O O S E 1 6 0 5 E F R N C L C 16 2 3 E F R N V L C L C 1 7 0 5 E R R C O D E 1 7 2 4 E R R O R 1 7 5 2 F I L E i l T 1 7 7 1 H D P R N T 1 8 4 2 H O R T O N 1 8 6 6 H Y O C L C 1 9 1 2 IM I I U S 19 66 i L E ' . ' n T H 2 0 10 I M U S K N G M 2 0 2 1 M X F LC LC 2 1 0 5 M X T A N T C L C 2 1 2 6 O P E N R F L 2 1 9 4 O P E N W F L 2 2 3 4 P A U S E 2 2 52 P D N T C H K 2 2 6 9 a a a P L O T H Y D 2 2 9 0 a P M N U S 2 3 9 4 P R I N T 2 5 5 4 P R N T C N F R M 2 5 8 0 P R M T M N U - 2 5 9 6 P R M T O P T 2 6 5 0 R N C L C 26 76 R N M T O P T 2 7 8 8 R U N MN U S 2 8 85 S T D F L W C L C 2 9 2 2 a T A C H E C K 29 51 T A C L C 2 9 8 0 T A N T O P T 3 0 6 9 T R H N L N T 3 167 a V C H O O S E 3 211 W A I T 32 51 W A I T S T O P 3 2 6 3 01 I 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
http://iiif.library.ubc.ca/presentation/dsp.831.1-0062645/manifest

Comment

Related Items