Real-Time Flood Forecasting using Satellite Precipitation Product and Machine Learning Approach in Bagmati River Basin, India

Real-time �ood forecasting (RTFF) is crucial for early �ood warnings. It relies on real-time hydrological and meteorological data. Satellite Precipitation Products (SPPs) offer real-time global precipitation estimates and have emerged as a suitable option for rainfall input in RTFF models. This study �rst compared the daily SPP data of Integrated Multi-Satellite Retrievals for Global Precipitation Measurement (IMERG) with observed rainfall data of Indian Meteorological Department (IMD) from the year 2001 to 2009 using contingency tests. Hourly rainfall from this SPP is used to build four RTFF models based on machine learning: feedforward neural network (FFNN), extreme learning machine (ELM), wavelet-based feedforward neural network (W-FFNN), and wavelet-based extreme learning machine (W-ELM). These models have been trained and tested with the observed data. The model’s performance was also evaluated using various statistical criteria. Results showed good correlation between IMERG and observed data, with a probability of detection (POD) of 85.42%. Overall, wavelet-based models outperformed their singular counterparts. Among the singular models, the FFNN model performed better than ELM, with satisfactory predictions till 5 days of lead time. Further, developed models have been used to forecast hourly water levels at Hayaghat gauging site of Bagmati River with different lead times from 1 hour to 10 days. For a 7-day lead time, only W-FFNN performs well, whereas none of the models performs satisfactory results for a 10-day lead time.


Introduction
Flood poses signi cant threat to life and property.This risk is increasing day by day due to rapid population growth and climate change.To mitigate losses from ood, two approaches are employed, viz., structural and non-structural measures.
Structural measures involve building reservoirs, levees, and improving channels.Non-structural measures focus on developing ood forecasting systems, implementing oodplain zoning, and organizing evacuation and relocation efforts (Subramanya 2008).
The Bagmati River, which ows from Nepal to Bihar in India, is a chief reason of ooding in the area almost every year.Especially Bihar region having dense population suffers signi cant loss of life and property during oods.However, government's proposal of constructing embankments along banks to control ood has been opposed by local people due to past failure of these structures.They fear that building embankments and its failure or breach will result in loss of land, livelihood and affect the fertile soil brought by the river.So, there is need of non-structural measures of ood management like real time ood forecasting (RTFF) in this region.
RTFF is the method of forecasting ood discharge or water level by using real-time hydro-meteorological data (Todini 2005;Tshimanga et al. 2016).It involves collection of real-time data such as precipitation, water level, discharge, evapotranspiration, temperature, humidity, and others, which are input for the rainfall-runoff models and stream ow routing programs to forecast water level or ood discharge for a lead time ranging from few hours to few days.Lead time is the amount of time available between when a ood forecast is issued and when the expected ooding event is anticipated to occur.A longer lead time allows for better preparation, evacuation, and property protection (Jain et al. 2018).However, developing countries like India face challenges due to ine cient weather networks, different terrains and sparse rain gauge stations distribution resulting in data scarcity and hindering real-time ood monitoring (Belabid et al. 2019;Yeditha et al. 2020).To overcome from these issues, Satellite Precipitation Products (SPPs) have arisen as a viable alternative for obtaining precipitation data, providing extensive spatial and temporal coverage.SPP uses remote sensing and space science to estimate precipitation and provide data for ungauged basins and inaccessible remote areas.Unlike rain gauge data, SPPs are not prone to errors such as wind-induced under-catch or evaporation (Yeditha et al. 2020).
The SPPs generally used for precipitation measurement are Integrated Multi-Satellite Retrievals for Global Precipitation Measurement (IMERG) (Huffman et al. 2019), Tropical Rainfall Measuring Mission (TRMM) (Huffman et al. 2007) and Climate Hazards Group InfraRed Precipitation with Station data (CHIRPS) (Funk et al. 2015).Most of these data are free of cost and easily accessible without restriction in real-time.These SPPs integrated with various hydrological and climatological models have proven to be very effective for ood, drought, weather, soil erosion and landslide monitoring (Belabid et Yeditha et al. 2022).However, before using SPP in any study, its quality should be checked and compared with observed ground-based rainfall data (Kumar et  There are three types of rainfall-runoff and ood forecasting models: physical, conceptual, and data-driven (Yeditha et al. 2020;Sezen and Partal 2022).Physical models, like MIKE Flood and HEC-RAS, represent detailed physical processes in a watershed but require extensive data.Conceptual models, such as SCN Curve Number and HEC-HMS, are based on mathematical equations and expert knowledge but may not capture all system complexities.Data-driven models, like Arti cial Neural Networks (ANNs), use statistical and machine learning techniques and adapt to changing conditions for realtime forecasting (ASCE 2000a,b).However, they are less reliable for limited or poor-quality data.Studies have explored conceptual and physical models with SPPs as rainfall input and achieved good results (Kumar et  Various studies have suggested that the e ciency of individual singular ML models can be further enhanced by incorporating wavelets, which are mathematical functions commonly used for non-stationary time series analysis in hydrology.In a study by Maheswaran and Khosa (2012), wavelets, viz., db1 (Haar), db2, db3, db4, Sym4, and Spline-B3 were compared for hydrologic forecasting using time series data in a Wavelet Volterra Coupled model.The results revealed that Haar wavelets performed well for time series with short memory and transient features, while db2 and spline wavelets were better suited for long-term features.However, the study emphasized the importance of selecting the appropriate wavelet based on the data through proper analysis.Other studies by Tiwari and Chatterjee 2010, Shoaib et al. 2014, Sehgal et al. 2014, Nanda et al. 2016, Yeditha et al. 2020, and Linh et al. 2021 also demonstrated the bene ts of combining wavelets with ML models to improve forecasting accuracy.However, very few studies, especially in India, have explored the use of wavelets and ML models with SPP for RTFF.
Based on the previous studies, the ML models, viz., FFNN and ELM have been selected for the development of ood forecasting models.This paper has two main objectives.First, to compare the daily SPP data of IMERG with observed rain gauge data of Indian Meteorological Department (IMD) and second, to develop singular machine learning models (FFNN and ELM) and wavelet-based hybrid machine learning models (W-FFNN and W-ELM) using the hourly rainfall data of IMERG for forecasting ood water levels at Hayaghat gauging site of the Bagmati River basin.The models have been used to forecast ood levels with lead times of 1 hr, 3 hrs, 6 hrs, 12 hrs, 1 day, 3 days, 5 days, 7 days, and 10 days.

Study Area
Figure 1 shows the study area with river networks, rain gauge stations, water level gauge stations, and major districts of Bagmati River basin in India.It also shows the Bagmati River and its tributaries Lalbhekya, Lakhandei, Khiroi and Adhwara group of rivers.The Bagmati River originating from the Shivpuri range of hills in Nepal at 1500 m above msl, is a perennial river that ows through the districts of Sitamarhi, Sheohar, Muzaffarpur, Darbhanga, and Samastipur in Bihar State of India.
The river basin lies to the north of the Ganga River.It has length of 394 km in Bihar and 195 km in Nepal, with basin area of 6500 km 2 in Bihar and 7884 km 2 in Nepal.To the north of its source, the Himalayan range of hills lies, which is at a higher elevation draining into its neighboring rivers Kosi and Gandak.The Bagmati River meets the Kamla River at Jagmohra village of Samastipur and then nally outfalls into the Kosi River near Badlaghat, Khagaria.The elevation of rain gauge stations -Benibad, Dheng, Hayaghat and Kamtaul are 54 m, 74 m, 46 m and 55 m, respectively.The basin experiences an average yearly precipitation of 1255 mm.The average annual temperature is 27°C.The river has mainly alluvial soil type.

Data Used
Daily rainfall data of satellite precipitation product, viz., IMERG, created by the National Aeronautics and Space Administration (NASA) and Japan Aerospace Exploration Agency (JAXA) have been used.IMERG uses low-earth orbit and geostationary satellite data, along with microwave-calibrated infrared satellite estimates to deliver rainfall estimate.The quickest version of IMERG provides rainfall data within 4 hours of the observation (Huffman et al., 2019).The "Final Run" data of IMERG with a spatial resolution and spatial coverage of 0.1°× 0.1° and 60° N − 60° S respectively were used.They provide half-hourly and daily rainfall data with coverage from 2000 to the present time.Access to these data is obtainable through the website https://giovanni.gsfc.nasa.gov/giovanni/.
For quality assessment of IMERG data, observed daily data of rainfall at four rain gauge stations, viz., Benibad, Dheng, Hayaghat and Kamtaul were collected from IMD from the year 2001 to 2009.Monthly rainfall from the year 2001 to 2014 were also provided by IMD.To develop a RTFF model based on machine learning, it was necessary to collect hourly rainfall and water level data.For this, half-hourly IMERG data were downloaded and later converted to hourly rainfall data.The hourly water level gauge data at Hayaghat gauging site for the South-West (SW) monsoon and post-monsoon period from year 2001 to 2014 were also collected.

Methodology
Figure 2 depicts the owcharts that illustrate the methodology employed for the research.Due to lack of hourly rainfall data from IMD, the daily rainfall data from IMD and IMERG were compared at the basin level using the contingency test.Since daily rainfall data represent the aggregation of 24 hours of hourly rainfall data, so, it was assumed that the SPP performing better at the daily level would also perform better at the hourly level.Observed mean rainfall over the Bagmati River basin was computed using the Thiessen polygon method for rain gauge stations, while for SPP, mean precipitation was computed using the Thiessen polygons based on the grid points within the basin.After comparing the daily data, the hourly rainfall data for the South-West (SW) monsoon and post-monsoon periods of IMERG from the year 2001 to 2014 were used in developing different machine learning-based RTFF models.The outcomes of the models were compared, and the most suitable ML model for RTFF was determined.The detailed methodology is discussed in further section.

SPP Evaluation
The contingency test for SPP consist of evaluation of four categorical metrics: Hit (H), Miss (M), False Alarm (F), and Correct Negative (Q).These metrics assess the satellite's capability to distinguish between days with rainfall and days without rainfall.Two contingency indices, Probability of Detection (POD) and False Alarm Ratio (FAR), were computed based on these metrics.POD quanti es the satellite's accuracy in correctly identifying events that match the observed data, while FAR measures the instances where the satellite registers events that do not align with the observed data.A POD value of 1 signi es perfect detection of all positive events without any misses, indicating high accuracy.A FAR value of 0 implies no false alarms, showcasing precise and accurate identi cation of positive events.Studies by Hogan et 1 and Table 2, respectively.In this study, rainfall events are de ned as instances where the amount of rainfall exceeds a threshold value of 0.1 mm/day.

Machine Learning Models for Real-Time Flood Forecasting
Four RTFF models have been developed using MATLAB R2020a.The basic architecture and functioning of these models are discussed in the proceeding sections.

Feed Forward Neural Network (FFNN)
FFNN entails an input layer, hidden layers, and an output layer.Data such as rainfall, water level, discharge, and various meteorological and hydrological parameters are taken as input.The hidden layers process this input data using a series of mathematical functions and nonlinear transformations.Through the modi cation of weights and biases in the connections between nodes, the neural network can undergo learning processes that enable it to identify patterns and make predictions using input data (ASCE 2000a,b).Finally, the output layer produces the predicted value, such as the water level or discharge.
The architecture of the FFNN model for RTFF is shown in Fig.

Extreme Learning Machine (ELM)
ELM is an ML algorithm categorized under FFNN.Differing from conventional neural networks, ELM adopts a unique approach where it trains the output weights of network in a single step, rather than iteratively updating them using 1 where, n represents the count of nodes, denotes the index of hidden neuron, O corresponds to weight vector connecting hidden nodes to output nodes, denotes target value connected with the th hidden node, denotes input data accompanying with the th hidden node, denotes weight linking input data to the hidden node, denotes bias term of th hidden node and M represents the model's output.
To determine the output weights in an ELM model with P input neurons and Q hidden neurons, the Moore-Penrose pseudoinverse is utilized (Huang et al. 2006;Yeditha et al. 2020).The input-hidden weight matrix is represented as A with dimensions Q × P, where each row corresponds to the weight vector linking input neurons to hidden neuron.Let X be the input data matrix with dimensions P × L, where L is the number of training samples.The pseudoinverse of a matrix A, denoted as A + , is calculated using the following equation: Where, A T is the transpose of matrix A, and (A T A) −1 is the inverse of the product of A T and A.
Finally, the output weights W are computed as: Where, Y denotes target output vector.
Figure 4 presents the structure of ELM model employed for RTFF.Within this framework, W denotes weights associated with the input layer, b signi es biases that are randomly generated and not subject to subsequent training, ƒ represents activation function, h i represents hidden neurons, R i and WL i represent input data, β represents optimal bias values, T i denotes target data, and WL M corresponds to model outputs pertaining to water level.

Wavelet-based Hybrid Models
Wavelets are mathematical functions with nite duration and zero mean and play a crucial role in the analysis of nonstationary time series.In contrast to the Fourier transform, which emphasizes frequency domain information exclusively, wavelet transforms utilize localized basis functions known as wavelets.Wavelets possess the unique characteristic of being localized in both time and frequency domains.This property allows to simultaneously capture time and frequency information, making them well-suited for analyzing signals or data with localized features or time-varying patterns.This allows more comprehensive understanding of the data and overcome the limitations of Fourier analysis (Roshni et al. 2019).
In hydrology, hydrometeorological time-series data are analogous to wavelet input signal.
Wavelet transform represents time series using mother wavelet (detail function, ) and father wavelets (scaling function, ).However, before using these input and target data for model development, normalization (Min-Max Feature Scaling) was done to scale the input features to have a consistent range between 0 and 1.

Input Selection and Processing
Based on the results of the lag analysis, the input combination for the model used to forecast water levels at any lead time is as follows: Where, represents the forecasted output by the model at a lead time of hour, and denote the current rainfall and water level respectively, value refers to the lag determined by CCF analysis and denote the lags determined by autocorrelation function and partial autocorrelation function analysis respectively.For computing the level at a speci c lead time, , the output target for the corresponding lead time should be used, i.e., for forecasting level at a lead time of hours, the output target should be

Model Training and Testing
The total normalized data were divided into 70% for training and 30% for testing to develop models.For the FFNN-based model, the Levenberg-Marquardt backpropagation algorithm was used as learning method.The FFNN-based models were con gured with varying numbers of hidden neurons, ranging from 1 to 10, and employed the TANSIG transfer function.The model was trained iteratively with a maximum of 10,000 epochs, minimum gradient of 10 − 7 , learning rate of 0.9, and maximum validation check of 1000.The stopping criterion for the network was mean square error of 0. Both the hidden layer weights and output layer weights were trained iteratively.
The learning method used was simple linear regression for the ELM-based models with sine function as the activation function.The model consists of one hidden layer with randomly generated weights.Only a single pass of the entire training data was used during the training process through the neural network.Haar wavelet was employed to develop the hybrid models (Maheswaran and Khosa 2012).This wavelet is a square-shaped pulse or step function that is zero outside the nite support interval and takes a constant value within its support.The Haar wavelet has a xed length and a xed height and is orthogonal to itself and its dilated versions.The level of decomposition was selected as 10.After model development, the outputs were denormalized to their original scale, and the model's performance was assessed using various performance criteria.

Performance Criteria for Model
The model's performance was assessed using four statistical metrics: Coe cient of Correlation (R), Nash-Sutcliffe E ciency (NSE), Root Mean Square Error (RMSE), and Mean Absolute Error (MAE).R indicates the linear association between two variables and varies between − 1 and + 1. NSE measures the relative difference between residual and observed variances, with values closer to 1 indicating better performance (Nash and Sutcliffe 1970).NSE is robust to outliers and penalizes both overestimation and underestimation.RMSE and MAE are the measures to calculate error between predicted and observed values, with lower values indicating greater accuracy.Unlike RMSE, MAE is not affected by outliers.

If
= ith observed data, = ith simulated data of model, = mean of the data and N = number of observations, then the different performance criteria to evaluate the models are as follows:- Page 9/28 Further, Cumulative Distribution Function (CDF) plot presented in Fig. 7, compared the mean daily rainfall data of observed and IMERG over the basin.Results showed a close match in the daily range of data across different thresholds of rainfall.
Notably, the IMERG data successfully detected an extreme daily rainfall magnitude of 199.44 mm as compared to the observed data.Figure 8 shows the comparison of rainfall data of observed and IMERG for South-West (SW) monsoon and post monsoon.These two seasons brings the most of the rainfall of the year in the basin.Both the data matches well in South-West (SW) monsoon, whereas there is slight variation in the post monsoon data.IMERG data consistently align with the reported observed rainfall magnitudes during these seasons.So, it can be inferred that IMERG data are suitable for ood studies in Bagmati River basin.

Analysis of Water Level Data
Table 4 provides information about the ood level indicator at Hayaghat gauging site, which is important for people residing nearby and authorities to prepare for potential ood management.
The descriptive statistics for water level recorded at Hayaghat gauging site for South-West (SW) monsoon and post monsoon period from the year 2001 to 2014 is presented in Table 5.The mean water level for a particular year was calculated by adding all hourly water levels of SW monsoon and post monsoon of that year and then dividing by the total number of observations of water levels taken during that period.The median values were determined as the middle value when all the water level data were arranged in ascending order.The standard deviation was calculated by nding the difference between each water level and the mean, squaring each difference, adding them up, dividing by the total number of water levels minus one, and then taking the square root.

Determination of Lags and Wavelet Decomposition
The graphs of ACF, PACF and CCF are shown in Fig. 9, Fig. 10, and Fig. 11, respectively.UCB and LCB denotes 95% upper and lower con dence bounds respectively.If the estimated value exceeds the UCB or falls below the LCB, it may be considered statistically signi cant.The lags for the dependent variable (water level) were determined using ACF and PACF.The lags for the independent variable (rainfall) were determined using CCF.It was found from ACF result that the water level at time t was signi cantly correlated with the water level 20 hours earlier being all the values of ACF up to 20 hrs, are higher than UCB.This suggested that there was a persistent pattern in the water level uctuations and that the system being modelled had a memory of past conditions that persisted for at least 20 hours.
Similarly, PACF analysis revealed a notable spike in the PACF value at a lag of 0.2, indicating a signi cant direct correlation between the water level at time t and the water level 5 hours earlier, after accounting for the effects of intermediate lags.This nding suggests that short-term patterns or uctuations in the system also in uence the changes in the water level.Since in real-time forecast, short-term patterns or uctuations in the system is accounted, a 5 hours lag was considered for the input data of the water level for further modeling.
CCF results inferred that rainfall and corresponding changes in the water level showed correlation up to 20 hours.This was indicated by all CCF values surpassing the Upper Con dence Bound (UCB).However, adopting a lag of 20 hours for model development would introduce unnecessary complexity and require longer computational time.Furthermore, for this lag of 20 hours, the CCF values ranged between 0.015 and 0.02, which is considered statistically insigni cant.Hence, a threshold of 0.02 was set for the CCF values.Consequently, the lag corresponding to a CCF value of 0.02 was determined to be 5 hours.Thus, a 5-hour lag was deemed appropriate for incorporating rainfall data into the subsequent modelling process.
Based on these input lags, the input combination for FFNN-based model and ELM-based model were taken as per Eq. 7.For example, for forecasting at 3 hr lead time, the input combination was taken R(t), R(t-1), R(t-2), R(t-3), R(t-4), R(t-5), WL(t), WL(t-1), WL(t-2), WL(t-3), WL(t-4), WL(t-5) with output target as WL(t + 3).Table 6 presents the ideal number of neurons in hidden layers for different models at different lead times.It was observed that the FFNN-based model performed better with a lesser number of neurons.However, even with fewer neurons, the computational time was higher for FFNN-based models.This suggested that the FFNN model incurred a higher computational overhead or complexity due to the involvement of multiple iterations.On the other hand, the ELM model was faster in creating the network as it involved a single-iteration learning procedure, which signi cantly reduced the computational time as compared to the iterative learning process of the FFNN model.14 presents the violin plot for the comparison of the forecasted water level by all the models with the observed water level for long-range forecasts.As the lead time increases, the violin plot for the ELM-based model shows greater distortion in shape.Additionally, the ELM-based model generally exhibits a smaller interquartile range but with higher outliers.On the other hand, the FFNN-based model demonstrates a better distribution, with the W-FFNN model maintaining a comparable distribution even at higher lead times, such as 7 days.However, at a lead time of 10 days, all models exhibit dissimilar distributions compared to the observed values.
In nutshell, the W-FFNN model performs satisfactorily up to lead time 7 days, whereas the W-ELM model produces satisfactory results up to lead time 3 days.In contrast, the singular FFNN and ELM models perform satisfactorily up to 5 days and 3 days, respectively.This observation indicates that with increasing lead time, the performance of all models decreases.On average, the W-FFNN model improved the NSE by 4.58% in long-term forecasts, and the W-ELM model improved it by 11.98% compared to their singular models.15 presents the simulated results of all models for the ood event in 2011 at different lead times.The High Flood Level (HFL), danger level, and warning level are denoted by red-dash, orange-dash, and yellow-dash lines, respectively.The observed water level surpassed the danger level on October 1, 2011, at time 06:00:00, reached its peak value of 47.52 m on October 6, 2011, at time 18:00:00.A consistent rising limb, peak, and falling limb were observed for all models till 12 hours lead time, indicating a favorable overall t.However, the ELM model exhibited a slight underestimation of the peak and falling limb at 12-hour lead time.From the lead time of 1 day onwards, variations in the model outputs became apparent, with occasional over-or under-predictions of the ood water level as compared to the observed data.Notably, at longer lead times such as 3 days, 5 days, and 7 days, the singular models (FFNN and ELM) exhibited higher variations between their outputs and the observed data as compared to the hybrid models (W-FFNN and W-ELM).W-FFNN model performed best, displaying the highest degree of overlap between its output and the observed water level for all the lead times.However, at a lead time of 10 days, all models performed poorly and failed to accurately capture the actual pattern of the observed water level.

Conclusions
In this study, ML-based RTFF models have been developed for the Bagmati River basin of Bihar in India.The lack of rainfall data obtained at ground stations at ne spatial and temporal resolution in the region causes hindrance in developing a robust RTFF model.To overcome these problems, SPP data of IMERG were compared with the observed data and used for model development.IMERG data closely matched with the observed data and can be considered as an substitute source of rainfall data for the Bagmati River basin.The "Haar" wavelet-based hybrid models have performed better than their singular counterparts.FFNN-based singular and hybrid models outperformed both ELM models in most of the cases.For short-term ood forecasting (lead time of 1 hour to 1 day), singular and hybrid models performed very well and FFNN-based models give best results for almost all lead times.For long-term ood forecasting (lead time of 3 days to 10 days), performance of singular models were not satisfactory but wavelet-based hybrid models performed well.The W-FFNN model demonstrated satisfactory performance, accurately forecasting ood water levels till 7 days lead time.On the other hand, W-ELM model achieved satisfactory results but was limited to 3 days lead time.Overall, W-FFNN model was deemed a robust RTFF model due to its ability to produce precise forecasts for longer lead time.The study of ood forecasting results were phenomenal, making IMERG a viable option for further study on ood, drought, soil erosion, climate change, and other factors in the Bagmati River basin.

Declarations
On behalf of all authors, the corresponding author states that there is no con ict of interest.

References Figures
Page 18/28 ACF for hourly water level.
PACF for hourly water level Page 25/28 CCF between hourly rainfall and hourly water level.
Wavelet decomposition of rainfall inputs using Haar wavelets.
al. (2010), Sireesha et al. (2020) and Navale et al. (2020) have used these categorical metrics in contingency tests.The methods of computing contingency metrics and contingency indices have been presented in Table backpropagation.This allows ELM to train much faster than traditional neural networks and avoid the problem of getting stuck in local minima.The input weights of the ELM network are randomly generated and xed(Huang et al. 2006).It has a low computational cost and can handle large-scale data e ciently.However, ELM has limited interpretability due to the use of randomly generated input weights and xed hidden layer activation functions.The effectiveness of ELMs is mainly determined by hidden nodes, and this aspect is quantitatively described using equation (Huang et al. 2006; Yeditha et al. 2020) : Mother and father wavelets are basic waveforms used in wavelet analysis to construct a complete wavelet that can be used to analyze signals with localized features and overall shape, respectively.Mother wavelet function is used to yield the scaling function(Yeditha et al., 2020).The admissibility conditions to consider as a wavelet are(Agarwal et al. 2016;Yeditha et al. 2020):

=
Functions generated through the translation of father wavelet.= Functions generated through the dilation of mother wavelet.= Total scales for assessment = Length of time series (1 to n)` = Approximations coe cients = Wavelet transform coe cients (scales to 1) In hydrological forecasting, the Discrete Wavelet Transform (DWT) is commonly used in signal decomposition due to the discrete structure of observed hydrometeorological time-series data.DWT is better for representing natural components and removing unnecessary noise in the signal.It does not have any redundant variables and requires less memory, resulting in a better outcome (Adamowski and Sun 2010; Roshni et al. 2019).In DWT, two sets of coe cients are generated for an input signal x: high-pass approximation coe cients (a 1 ) for low frequency and low-pass detail coe cients (d 1 ) for high frequency.After performing wavelet decomposition on the input, it exhibits the structure [a n , d n , d n−1 ,..., d 2 , d 1 ].For developing the wavelet-based hybrid models, mother wavelet function is selected and then a suitable scale of decomposition for the input signal of rainfall R(t) is determined.Based on the study of Yang et al. (2016) and Reddy et al. (2022), the minimum ( and maximum ( level of decomposition can be determined by and respectively.Here, is the data length.The process of wavelet decomposition is conducted using the maximal overlap discrete wavelet transform (MODWT) function available in MATLAB R2020a.This gives the discrete wavelet coe cient of input signals which is used as a new time-series input for the singular model.This combination of wavelet and singular models generates W-FFNN and W-ELM models.The architecture of the wavelet-based hybrid model for RTFF is shown in Fig. 5.

A
total of 44170 numbers of mean hourly rainfall data and 44170 numbers of hourly water level data at the Hayaghat gauging site were available from the year 2001 to 2014.These data were used as input for RTFF model development.Before developing the neural network model, lags of inputs data were determined using Autocorrelation Function (ACF), Partial Autocorrelation Function (PACF), and Cross-Correlation Function (CCF) (Tiwari and Chatterjee 2010; Yeditha et al. 2022).
l min = int [log (k)] along the years.Factors such as weather patterns, river morphology, land use changes, human water withdrawals and other environmental factors are supposedly the causes of such variability of water levels.In this study, model performance has been validated using ood water level of the year 2011.

Figure 12
Figure 12 shows wavelet decomposition of rainfall inputs at scale 10 using Haar wavelet.It produced 10 sets of detail coe cients (d 1 to d 10 ) and one set of approximation coe cients (a 10 ) on decomposition.Where, d 1 set represents the highest frequency components of the signal whereas d 10 represents the lowest frequency components.The nal approximation is represented by a 10 , which indicates the overall trend of the signal.These coe cients were used as input for the development of the wavelet-based hybrid model.For W-FFNN and W-ELM, the decomposed signal of IMERG rainfall was used in the input combination.

Figure 1 Study
Figure 1

Figure 3 Architecture
Figure 3

Figure 4 Architecture
Figure 4

Figure 5 Flow
Figure 5
al. 2017; Li et al. 2018; Belabid et al. 2019; Belayneh et al. 2020; Llauca et al. 2021; Zhou et al. 2021; Soo et al. 2022; Mokhtari et al. 2022).Datadriven machine learning (ML) models, particularly those using ANNs, have emerged as reliable options for ood forecasting (Li et al. 2014; Kim et al. 2016; Nanda et al. 2016; Tripura and Roy 2018; Ghose 2018; Yeditha et al. 2022).These ML models, inspired by the human brain, can predict water level or ood discharge without relying on a basin's internal hydraulic structure.However, they are often considered black box models as they don't provide explicit information on how they arrived at their outputs (Kumar et al. 2018).For discharge and water level forecasting, ML models like Feed Forward Neural Network (FFNN), Extreme Learning Machine (ELM), Long Short-Term Memory (LSTM), Decision Tree (DT) and Support Vector Machine (SVM) are often used (Jain et al. 2018; Piadeh et al. 2022; Yeditha et al. 2022)
Comparison of IMERG and Observed Rainfall DataThiessen Polygon for the rain gauge stations and grid points of IMERG is shown in Fig.6.For the IMERG, 51 grid points were inside the basin.The results of contingency test is presented in Table3.Overall, the IMERG data showed reasonably good performance in detecting precipitation events in the basin with a POD of 85.42%.Result of contingency test showed that SPP with POD > 70% is acceptable for ood studies (Su et al. 2019; Yeditha et al. 2020; Yeditha et al. 2022; Weng et al. 2023).

Table 3
Contingency metrics and contingency indices for IMERG data.

Table 4
Flood level indicator for Hayaghat gauging site.

Table 5
Descriptive statistics of water level for Hayaghat gauging site.

Table 6
Optimal number of neurons for different model.

Table 7
presents the model performance for short-term ood forecasting in real-time for training and testing.In the shortrange ood forecast (lead times of 1, 3, 6, 12 hours, and 1 day), all models performed well with high values of NSE and R, and low values of RMSE and MAE.The FFNN-based model gave the best result almost at all lead time as compared to other models.The hybrid models, W-FFNN and W-ELM models generally perform better than singular FFNN and ELM models, especially for longer lead times.Figure13shows the violin plot between observed and model outputs for short-range forecasts.Based on the shape of the violin, it can be inferred that the results of all models have similar distribution as observed till 12 hours of lead time.Also, the white dot represents the median value of simulated water levels by all models at different lead time, which ranges from 42.68 m to 46.71 m and are very close to median value of observed water level, 42.68 m.The interquartile range of the observed water level is from 41.15 m to 45.12 m.A similar interquartile range is seen in the model outputs at different lead time.However, at a lead time of 1 day, the ELM and W-ELM showed little varying shape.

Table 8
presents the model performance for long-term ood forecasting in real-time for training and testing.The performance of all the models for longer lead time forecasts have been reduced as compared to short lead time forecasts, (i.e.lead times of 3, 5, 7, and 10 days), with lower NSE and R values and higher RMSE and MAE values.However, W-FFNN and W-ELM models still outperformed their singular FFNN and ELM models.In the testing phase, the W-FFNN model achieved an NSE value of 0.843, 0.697, 0.573, and 0.364, and an R value of 0.919, 0.838, 0.765, and 0.636 for lead times of 3, 5, 7, and 10 days, respectively.The W-ELM model achieved an NSE value of 0.781, 0.586, 0.375, and 0.035, and an R value of 0.898, 0.816, 0.741, and 0.631 for the same lead times.Performance shows that W-FFNN model is better than W-ELM model.Figure

Table 7
Results of short-range ood forecast in real time for training and testing.

Table 8
Results of long-range ood forecast in real time for training and testing.