Flood forecasting and flood flow modeling in a river system using ANN

In terms of predicting the flow parameters of a river system, such as discharge and flow depth, the continuity equation plays a vital role. In this research, staticand routing-type dynamic artificial neural networks (ANNs) were incorporated in the multiple sections of a river flow on the basis of a storage parameter. Storage characteristics were presented implicitly and explicitly for various sections in a river system satisfying the continuity norm and mass balance flow. Furthermore, the multiple-input multiple-output (MIMO) model form having two base architectures, namely, MIMO-1 and MIMO-2, was accounted for learning fractional storage and actual storage variations and characteristics in a given model form. The model architecture was also obtained by using a trial-and-error approach, while the network architecture was acquired by employing gamma memory along with use of the multi-layer perceptron model form. Moreover, this paper discusses the comparisons and differences between both models. The model performances were validated using various statistical criteria, such as the root-meansquare error (whose value is less than 10% from the observed mean), the coefficient of efficiency (whose value is more than 0.90), and various other statistical parameters. This paper suggests applicability of these models in real-time scenarios while following the continuity norm.


INTRODUCTION
A watershed, a drainage basin, or a catchment represent an area enclosed by a topographic boundary that coincides with the hydrologic boundary. Precipitation falling onto a catchment is carried by a network of stream channels generally to a single point downstream of the catchment. During this entire phenomenon, many other processes that are parts of the hydrological cycle within the reach of the watershed are also undergoing. This makes every watershed an attractive unit to study hydrology because elemental budgets can be readily defined, bound by mass balances for catchments, particularly for small ones.
Five processes are at work in the hydrologic cycle, namely (1) condensation (the process of water vapor turning back into liquid water), (2) precipitation (any liquid or frozen water that forms in the atmosphere and falls back to the Earth), (3) infiltration (the process by which water on the ground surface enters the soil), (4) runoff (the process that occurs when there is more water than land can absorb, which can come from natural processes and human activities), and (5) evapotranspiration (the sum of evaporation from the land surface plus transpiration from plants).
Recorded time series data for any hydrologic cycle component form the basis and are necessary for the development of a hydrologic model, and many such models have been developed and used to address many hydrological issues (Choudhury & Roy 2015). Ranging from statistical modeling to physically-based, deterministic modeling techniques, there are many approaches for the analysis of the hydrologic processes. A considerable gap has invariably existed between research and practice in hydrology. Practitioners must be better informed about the state-of-the-art ways of process understanding, and researchers must know about the nature of the problems faced by practitioners. While making a more accurate and timely prediction of any hydrologic process, the main concern that must be addressed by hydrologists is the complexity and uncertainty of these processes, which is time dependent. Hydrologists have put their efforts into better understanding the hydrologic processes for accurate predictions. The results presented in this paper validate the use of artificial neural network (ANN)-based models in flow variation to determine actual and fractional storage. The following section presents a brief account of various models and techniques for modeling hydrologic systems, particularly for river flow predictions.

HYDROLOGICAL MODELS
Models that represent the hydrologic cycle conceptually and are based on hydrologic forecasting are termed hydrological processes. Starting from the second half of the 19th century, hydrological models have been developed to solve several problems in drainage systems, flow at the basin outlet, and many other hydrological problems. Singh (1988) described the different types of hydrological models.
Water balance equation-based conceptual models accounting for continuous volumes have been developed using a simulation technique during the early 19th century. These models could successfully explore the response of a watershed with a wide range of weather variations over time. The functioning of these models is governed by the parameters representing the processes of a drainage system that must be estimated by optimizing an objective function. This may produce unrealistic values for the parameters due to erroneous data and the inaccurate descriptions of the various processes involved in the models. Additionally, the observation condition during data collection cannot be guaranteed (Sorooshian & Gupta 1983). To establish a link to a real physical connection between the model parameters and the reality, Freeze & Harlan (1969) proposed better mathematical models. On the basis of surface flow, these models implicate physical knowledge in describing certain phenomena, such as flow in unsaturated zones and flow below water tables, which are expressed by the means of differential equations. The distributed models can also take care of the spatial variability of hydrologic outputs, such as runoff and inundation area, due to the topographical features of a watershed, and are also in use presently.
The hydrological models can be classified into theoretical and conceptual models, which are also known as empirical models based on a modeling approach. These models may be linear in nature or can depict non-linearity depending upon time variability. There is considerable overlapping of the various classes of models; thus, the categorization of the models is not rigid. The following section and Tables 1 and 2 display some important models and the modeling techniques that are developed and utilized in the areas of hydrology, particularly flood flows, their descriptions, and applications.

LITERATURE SURVEY BASED ON MODELS
Physically-based models represent the physical phenomena happening in the real world scenario. However, these models depicting subsurface flow or surface runoff can be way more complex when observed. Being formulated by non-linear partial differential equations, their components in the hydrological processes are presented using certain governing equations of motion, such as continuity and momentum equations, which are based on mass balance flow. These equations are usually solved numerically using a finite element procedure of spatial discretisation, but solutions can exist (Wheater et al. 1993) for these equations that are analytical in nature. Beven (2012) described physical models by measurable parameters that can provide the simulation methodology of the surface runoff response without employing any calibration measure. Although they respond powerfully for hydrological processes, they still have many limitations and raise numerous important issues to be addressed. The estimation of the parameters involved in a physical model or the exploration of the model for the state variables generally requires some laboratory or in situ experimentations and thus may have some induced errors due to the nature of the experiment. In addition, there is a brief review of the work conducted by researchers in river flow studies, and their analyses are exhibited in Tables 1 and 2. Beven (2004) also suggested that if models have a larger scale, then they may require independent properties that are of a spatial-temporal scale. Some situations require that a simplified form of a governing equation, such as the Green-Ampt equation or the St. Venant equation, be employed to represent the physics involved in the process (Mein & Larson 1973); hence, being deviated from a true physical basis raises additional questions. In a physics-based model, parameters should be measurable, but this may not be possible in practice (Wheater 2002) as measurements cannot be made at a point.

METHODOLOGY Flood forecasting models
The issuance of flood warnings is recognized to be a highly essential requirement for flood damage management and mitigation, which leads to a high expectation for flood forecasting in terms of the magnitude and timing of the occurrence of floods. Thus, the earlier methods of flood forecasting by simple extrapolation from a gauged site may no longer be sufficient (Moore et al. 2005) as real-time flood forecasting requires rapid computation methods to give enough lead time. Catchment or watershed modeling is just one of the crucial elements of a hydrological system as it provides flow at a single point in a stream, but during flood, the flow at an upstream point causes damage to its downstream. The effectiveness and efficiency of an integrated flood forecasting and warning system may obviously depend on a watershed model. Flood forecasting models can be categorized as rainfallrunoff and flood routing models. In the study of Choudhury & Roy (2015), storage variables and flow rates are interlinked and governed by the following equation: where S (t) ¼ storage parameter calculated explicitly at time t; Q u t ¼ discharge at the upstream section calculated at time t; Q d t ¼ flow rate/discharge obtained at the downstream section at time t; and ψ ¼ river basin characteristics.
In the case of characteristics, flow variation and flow at upstream and downstream stations that produce no flow after time t can be written as the following: Equations (2) and (3), giving discharge at time t þ Dt for the upstream and downstream sections of a river system, are obtained as per the work of Choudhury & Roy (2015). Here, they did not account for the consideration of storage rate change variables explicitly while forecasting river flow. Being an important parameter while issuing a forecast in a basin channel, storage must be incorporated while modeling a river system.
Similarly, for the Muskingum model in a river reach, equations for the flow at upstream and downstream can be given by Choudhury et al. (2002) and Choudhury & Sankarasubramanian (2009).
Equation (4) can be split into N different parts, while Equation (5) depicts no flow at all upstream gauging stations at time t þ Dt, having an initial flow state given by [(1 À α) Q p t * upstream flow shift factors], (1 À β) Q d t at downstream depicts fractional storage in the river system. With regard to fractional storage change, the relationship between discharge at upstream and that at downstream for a river system can be written as a function of channel reach properties given by Choudhury & Roy (2015).
Here, p signifies the number of inflows/upstream section in a river system. The overall equation signifies discharge at an upstream section at time t þ Δt in a river system.
The fractional storage change is complementary and sum to actual storage change. Models used in forecasting are multiple-input multiple-output (MIMO) ANN models by Choudhury & Roy (2015) that predict upstream and downstream flows along with storage rate changes.
For predicting flow at upstream and downstream stations, ANNs having similar numbers of input and output nodes may be taken as Q u t , Q d t as inputs and Q u tþDt , 0 as the desired output data set. For prediction in the downstream flow section of a river channel, Q u t , Q d t as inputs and 0, Q u tþDt as outputs can be utilized (Choudhury & Roy 2015). Here, this predicting model can be termed as MIMO-1 ANN, but along with river flow, gauge height, and storage rate, change parameters can also be evaluated simultaneously. Furthermore, here, storage implies the average or mean calculated of all the gauge heights from inflow and outflow stations. The average mean depth of all the gauging stations depicts the storage rate change parameter. Combining two MIMO-1 ANNs, such as Q u t , Q d t and Q u tþDt , Q d tþDt , for learning the actual storage variation will be termed as the MIMO-2 ANN model given in the work of Choudhury & Roy (2015). Conversely, MISO ANNs are used to forecast one single station and learn arbitrary storage change, where training networks can be Q u t , Q d t as inputs and Q u tþDt /Q d tþDt as one single output. The use of gamma memory in a focused form is depicted in Figure 1, where the MIMO model form is applied and has adaptable memory characteristics.

Flood routing models
A routing type model evaluates the flow at the divergent points of the stream/river utilizing the flood flow data at upstream gauging sites. These models play a crucial role in reservoir operations, flood forecasting, and the evaluation of the environmental impacts of river regulations. Several methods are available in the literature toward this. Broadly, these methods can be classified as follows: (1) hydrologic method of routing and (2) hydraulic method of routing. The hydraulic method is based on the actual physics of flow, while the hydrologic method utilizes a conceptual or system approach.
The hydrologic routing method employs essentially the continuity equation in a spatially lumped form. Additionally, the hydrological routing is limited for application to single valued depth-discharge relations, where observed inflow-outflow hydrographs exist. Some of the important flood routing models, developed by the hydrologic method of routing, are storage routing models, the Muskingum model, the Kalinin-Milyukov model, the lag and route model, the variable travel time (VTT) method, and the variable storage coefficient (VSC) method.

ANN application in river flow studies
The application of ANNs in a river flow study has been implemented since the 19th century. Few authors have experienced certain challenges based on data-driven modeling relevant to river basin management, while some have predicted stream flow using an ANN model. A validation data set of examples was employed to tune the hyperparameters of the classifier used. Moreover, the available data, which have known input and output values, were split into a training set (approximately 80% of the data) and a test set (the remaining percent). The training data set was also utilized to train the neural network. Evidently, ANNs had better performance in comparison with the analytic non-linear power model. Tayfur (2002) and Kisi (2004) used ANN models for monthly stream flow forecasting. On comparing the performance of ANNs with that of the autoregressive model (AR) model, the authors validated that ANNs outperform the AR model. Choudhury & Roy (2015) developed a flood forecasting system using the statistical and ANN techniques and suggested that ANNs outperform statistical methods. Moreover, the application of ANNs in river flow studies can also be found in the works of Choudhury & Ullah (2014), Aboutalebi et al. (2016), and Sil & Choudhury (2016). Mostly, ANN models rely on flow matching techniques to forecast the flow in river flow modeling. Researchers have given routing-type ANN models that use flow variables with exogenous variables in forecasting flow at only the downstream river reach. To satisfy a mass balance criterion in a river reach/river system, routing-type ANN models should observe continuity norms. Nevertheless, routing-type ANN models, which are available in the literature, do not consider storage variation and thus may not be fully satisfying the law of conservation of mass in river reaches while issuing a forecast. Most of the ANN models for river flow studies and other hydrologic areas are static Multilayer perceptrons (MLPs) to predict flow parameters. Moore et al. (2005) reviewed more than 40 studies on the forecasting of water resource-related variables but verified that only two studies used static MLP networks without any memory parameter. Flood flow in river reaches is highly nonlinear and time varying, characterized by changes in channel parameters over time. In addition, Choudhury & Roy (2015) suggested that the MLPs being feed forward with no recursion or memory elements can only map instantaneous flow data and also cannot recognize and integrate temporal variations in the input data sets. Table 5 depicts the network architecture employed, and memory by MLPs is stored and represented by Equation (4). Thus, the application of static MLPs in forecasting flood flows, which is a time varying process, may not be preferable if the accuracy and timeliness of forecast are highly necessary.
In estimating the weights utilized while training ANNs, Equation (9) as given by DeVries & Principe (1992) can be minimized locally as the following: where d(t) implies the desired output, while the latter y(t) signifies the corresponding network output. In the case of MLPs and time delay neural networks (TDNNs), which are feed forward networks, given that mapping is instantaneous and that an error gradient does not depend on time, weights in networks get updated by applying the back-propagation technique (Rumelhart et al. 1986). A simple partial derivative is used to update the network weights while training, as given by Werbos (1990) in Equation (10).
Here, net i (t) ¼ is the summation of the product of w i,j and x j (t) from j ¼ 1 to N 1, i.e., P N j¼1 w i,j x j (t). Here, N 1 is the number of nodes in the previous layer. Dw i,j is the product of a learning rate to a simple partial derivative, i.e., Àh @E @[ w i,j ] . Here, h is a learning rate, while the latter is a simple partial derivative. The rate of increment in the weight can be computed using an ordered derivative as @E=@[ w i,j ] ¼ ordered derivative of the error function with respect to weight. Here, @E=@[ w i,j ] ¼ E_w i,j , which is the product of E_net i (t) and x j (t).
Here, net i (t) is a function of the current activation only in node j, and for a recurrent network, such as gamma memory, net i (t) can be given as follows (Werbos 1990): Neurons and synapses, which are both in charge of computing mathematical operations, are the main elements of NN. NNs are nothing but a series of mathematical computations: each synapsis holds a weight, while each neuron computes a weighted sum using input data and the weight of synapses. Gamma memory NN was employed because it outperformed other ANN models.
Considering that the state of a time-dependent process is a function of its previous states, the ANN models that can store and utilize past information are found to be more efficient in analyzing these processes. Memory by feed forward delays and memory by feedback delays are two ways to assimilate memory. Memory by feed forward delays can also be processed by TDNNs as mentioned by Lang et al. (1990).
The self-recurrent network by Jordan (1986) and Elman & Zipser (1988) suggested memory by feedback delays. Here, recurrent units that hold a trace of the past input or neural states are utilized. In the recent past, a few researchers have applied various types of recurrent ANN models to incorporate temporal dimensions for a hydrologic problem, and the results are encouraging. Additionally, this network can be utilized in estimating the other parameters of river flow studies and gives promising results with the use of regression-based techniques (Aparajita et al. 2021). MLP with manual up gradation having a window approach is also a case in which a fixed number of past information selected by the user is presented as an input to the MLP network. As fixed numbers of past samples are used as inputs, the network possesses a fixed or static memory. Most of the ANN-based flood forecasting models available in the literature are capable of providing a forecast at a single location and do not possess forecast updating capability. This restricts the applicability of these models in real-time situations.
A TDNN creates memory by delaying the input sequences, and the applications of the TDNN in river flow studies are available in the works of Coulibaly et al. (2001). A limitation of TDNNs and MLPs with memory is that with memory depth being fixed and pre-decided, the selected memory depth may not follow the spatial-temporal features of the input data, giving poor results.

RESULTS AND DISCUSSION
The application of the ANN models to meet the objectives is tested in the Tar-Pamlico River Basin, North Carolina, USA, by training the model using the concurrent flow rate data of four sections viz., Rocky Mount, Hilliardston, Enfield, and Tarboro, as shown in Figure 2. The data have been collected from the USGS stream flow archive (https://waterdata.usgs.gov/nc/nwis/current/?type=flow&group_key=basin_cd), where concurrent flow records for the aforesaid gauging stations from 29 July, 2004, to October 1, 2004, are utilized. The 786 concurrent data sets having stream flow and gauge height spaced at two-hour intervals were used in this research.
For showcasing the applicability of ANN models in forecasting flow depth and rates (discharge) in the bounding sections in a river system, the MIMO-1, MIMO-2, and MISO models with divergent ANNs, such as ANNs having memory and not having memory, are applied to river systems as shown in Figures 1 and 3. From the performance results obtained by applying ANN models in river basins, listed in Tables 3 and 4 in the TAR Basin, it may be found that all ANN models perform satisfactorily in forecasting flow rates and flow depths at multiple sections in the basins. RMSE values are in the range of 1 to 500 cusec for forecasting flow rates for the models, and the coefficients of the correlation 'R' value, which measures the efficiency of the models, are very close to unity; the model performances may be considered satisfactory. In the case of flow depth forecasting,   the RMSE ranges from 0.1 to 0.9 m; R is close to unity, and for forecasting storage rate change, the RMSE ranges from 280 to 480 cusec with the R value being close to unity. It may be noted that the RMSE value for forecasting storage rate change is comparatively more than the RMSE value for the flow series, and higher RMSE for forecasting the storage variable is mainly due to the fact that storage variation, being a function of the flow variations, has higher nonlinearity compared with the flow variations, resulting comparatively in less accurate forecasts when predicted by using a network with the same topology. Additionally, Table 3 exhibits that the RMSE values for predicting average flow depths representing storage states by the MIMO-1 and MIMO-2 models are less than 0.15 m and indicates that storage evolution modeling using average flow depth in a reach is possible with satisfactory model performances.
As mentioned earlier, the MIMO-1 model formulation has advantages in real-time forecasting as some of the accuracy obtained in matching zero flow forecasts can be computed at the time of issuing forecasts, and the accuracy of the real flow forecast at a section can be ascertained at the time of issuing forecasts.
The two specific flow parameters used in the study are flow rate (discharge) and flow depth. Discharge refers to the volume of water moving down a stream or river per unit of time, which is commonly expressed in cubic feet per second or gallons per day. The flow rate of a stream is equal to the flow velocity (speed) multiplied by the cross-sectional area of the flow. The equation Q ¼ AV (Q ¼ discharge rate, A ¼ area, V ¼ velocity) is sometimes known as the discharge equation. Normal depth is the depth of flow that would occur if the flow is uniform and steady and is generally predicted using the Manning equation. The Manning equation is a widely used and very versatile formula in water resources. It can also be utilized to compute the flow in an open channel, compute the friction losses in a channel, derive the capacity of a pipe, and check the performance of an area-velocity flow meter. Furthermore, the continuity equation plays a critical role in the prediction of the flow parameters of a river system. Common applications where the continuity equation is used are pipes, tubes, and ducts with flowing fluids or gases; rivers; and overall processes as power plants, logistics in general, roads, computer networks, and semiconductor technology. In addition, the continuity equation represents that the product of the cross-sectional area of the pipe and the fluid speed at any point along the pipe is always constant. This product is equal to the volume flow per second or simply the flow rate. The continuity equation is given as the following: R ¼ A v ¼ constant. The results obtained in modeling flow and storage variation in the TAR Basin given in Figures 4 and 6 confirm that forecasted flow series, flow depth series, average flow depth series, and storage rate change series match closely the respective observed series in the river system, indicating satisfactory results. Further, Figures 4 and 6 depict the comparison of results in the instantaneous and average storage rate change variables in the MLP and GMNN model forms.
In the research reported in this work, network architectures used and the other relevant details of training the model form are given in Table 5; the model architecture is based on a trial-and-error approach. Figure 1 shows the gamma memory unit of the focused gamma memory neural network. Memory order P shows that the data are either in the current observation or are used in lagged form. P ¼ 0 always depicts the current observation, while value 1 means memory order in the current observation and one lagged input.

CONCLUSION
The use of various models for hydrologic modelling, including those used for river flow forecasting, depends on the purpose, catchment characteristics, and time requirements. Distributed models can incorporate physical, hydrological, and topographical features to take care of the spatial variation of model inputs in determining hydrologic outputs, such as runoff generation, inundation area, and flood damage. Most of the hydrological models are data intensive, and the lack of a pertinent data set may become a hindrance in hydrological model development and applications.
The Muskingum model is a less complicated hydrologic routing method for estimating downstream discharge in a single river reach using the flow rates of the upstream section. The conversion of multiple inflows into a single equivalent inflow is useful for describing unsteady flow in a river system (Choudhury 2007). Hydrologic problems, such as those involving unsteady river flow, are time-dependent; hence, time-series models have been extensively employed in modeling river flow. As flow through a river, especially during unsteady flow condition, is a highly non-linear and complex process, data-driven models, such as ANNs, are found to be useful in modeling unsteady flow in river reaches.
ANNs can learn high non-linearity from the data sets and are useful for modeling complex hydrological problems. The literature reveals that most of the river flow studies have been conducted to simulate and forecast flow at a single downstream point in a river reach/river system. Most of the ANN models utilized to forecast flow parameters in a river system rely on a flow matching technique and may not be obeying the fundamental law of conservation of mass in a river reach/system. There is a scarcity of models that can learn temporal storage variations in a reach, and ANN models are required to be developed for such cases so that storage variation along with flow variation in a reach can be learnt. There is also a lack of models that can give forecasts for several sections in a river system, and ANN models that can forecast concurrent flows in multiple sections are required.
Most of the ANN models that are used for river flow forecasting are static MLPs that do not take care of temporal variation in the non-linear unsteady river flow processes. The results of temporal ANN models in flood Water Practice & Technology Vol 16 No 4, 1203 forecasting can be seen in performances given in Table 4 and Figure 5, where it can be reported that in this study, while training MIMO and MISO ANNs implicitly and explicitly, a particular arrangement of data sets can be forecasted well while obeying the continuity principle and mass balance flow. The model performances evaluated in terms of various statistical criteria depict satisfactory results, as shown in Table 4. The use of some other memory parameters, which are dynamic, such as Laguaare, must be explored more in the case of spatial-temporal river flow studies. Obtaining more about the weight parameter defines the physics of the model more appropriately and can be further investigated.

DATA AVAILABILITY STATEMENT
All relevant data are available from an online repository or repositories at https://waterdata.usgs.gov/nc/nwis/ current/?type=flow (accessed 15 March 2020).  Water Practice & Technology Vol 16 No 4, 1204