An artificial neural network model for rainfall forecasting in Bangkok, Thailand

The present study developed an artiﬁcial neural network (ANN) model to overcome the di ﬃ culties in training the ANN models with continuous data consisting of rainy and non-rainy days. Among the six models analyzed the ANN model which used generalized feedforward type network and a hyperbolic tangent function and a combination of 5 meteorological parameters (relative humidity, air pressure, wet bulb temperature and cloudiness), and the rainfall at the point of forecasting and rainfall at the surrounding stations, as an input for training of the model was found most satisfactory in forecasting rainfall in Bangkok, Thailand. The developed ANN model was applied to derive rainfall forecast from 1 to 6 h ahead at 75 rain gauge stations in the study area as forecast point 10 from the data of 3 consecutive years (1997–1999). Results were highly satisfactory for rainfall forecast 1 to 3 h ahead. Sensitivity analysis indicated that the most important input parameter beside rainfall itself is the wet bulb temperature in forecasting rainfall. Based on these results, it is recommended that the developed ANN model can be used for real-time rainfall forecasting and ﬂood management in Bangkok, Thailand.


Introduction
Accurate information about rainfall is essential for the use and management of water resources. In the urban areas, rainfall has a strong influence on traffic control, the operation of sewer systems, and other human activities. Nevertheless, rainfall is one of the most complex and difficult elements of the hydrology cycle to understand and to model 20 due to the tremendous range of variation over a wide range of scales both in space and time (French et al., 1992). The complexity of the atmospheric processes that generate rainfall makes quantitative forecasting of rainfall an extremely difficult task. Thus, accurate rainfall forecasting is one of the greatest challenges in operational hydrology, despite many advances in weather forecasting in recent decades (Gwangseob and rithms have helped overcome a number of limitations in the early networks, making the practical applications of ANN more applausible. Based on the structure of the neural networks and the learning algorithm, various neural network models have been studied and targeted at solving different sets of problems. Neural networks have been widely applied to model many of nonlinear hydrologic 10 processes such as rainfall-runoff (Hsu et al., 1995;Shamseldin, 1997), stream flow (Zealand et al., 1999;Campolo and Soldati, 1999;Abrahart and See, 2000), groundwater management (Rogers and Dowla, 1994), water quality simulation (Maier and Dandy, 1996;Maier and Dandy, 1999), and rainfall forecasting. More detailed discussion regarding the application of ANN in hydrology can be referred to in the special 15 technical report of Journal of Hydrologic Engineering (ASCE, 2000). A pioneer work in applying ANN for rainfall forecasting was undertaken by French et al. (1992), which employed a neural network to forecast two-dimensional rainfall, 1 hour in advance. Their ANN model used only present rainfall data, generated by a mathematical rainfall simulation model, as input for training data set. This work is, however, limited in a number 20 of aspects. For example, there is a trade-off between the interaction and the training time, which could not be easily balanced. The numbers of hidden layers and hidden nodes seem insufficient, in comparison with the numbers of input and output nodes, to reserve the higher order relationship needed for adequately abstracting the process. Still, it has been considered as the first contribution to ANN's application and estab-25 lished a new trend in understanding and evaluating the roles of ANN in investigating complex geophysical processes. Abraham et al. (2001) used an artificial neural network with scaled conjugate gradient algorithm (ANN-SCGA) and evolving fuzzy neural network (EfuNN) for predicting Interactive Discussion the rainfall time series. In the study, monthly rainfall was used as input data for training model. The authors analyzed 87 years of rainfall data in Kerala, a state in the southern part of the Indian Peninsula. The empirical results showed that neuro-fuzzy systems were efficient in terms of having better performance time and lower error rates compared to the pure neural network approach. In some cases, the deviation of the 5 predicted rainfall from the actual rainfall was due to a delay in the actual commencement of monsoon, El-Niño Southern Oscillation (ENSO).
Another study of ANN that relates to El-Niño Southern Oscillation was done by Manusthiparom et al. (2003). The authors investigated the correlations between El Niño Southern Oscillation indices, namely, Southern Oscillation Index (SOI), and sea 10 surface temperature (SST), with monthly rainfall in Chiang Mai, Thailand, and found that the correlations were significant. For that reason, SOI, SST and historical rainfall were used as input data for standard back-propagation algorithm ANN to forecast rainfall one year ahead. The study suggested that it might be better to adopt various related climatic variables such as wind speed, cloudiness, surface temperature and air 15 pressure as the additional predictors. Toth et al. (2000) compared short-time rainfall prediction models for real-time flood forecasting. Different structures of auto-regressive moving average (ARMA) models, artificial neural networks and nearest-neighbors approaches were applied for forecasting storm rainfall occurring in the Sieve River basin, Italy, in the period 1992-1996 with 20 lead times varying from 1 to 6 h. The ANN adaptive calibration application proved to be stable for lead times longer than 3 h, but inadequate for reproducing low rainfall.
Another application was described by Koizumi (1999), who employed an ANN model using radar, satellite and weather-station data together with numerical products generated by the Japan Meteorological Agency (JMA) Asian Spectral Model for 1-year 25 training data. Koizumi found that the ANN skills were better than persistence forecast (after 3 h), the linear regression forecasts, and numerical model precipitation prediction. As the ANN used only 1 year data for training, the results were limited. The author believed that the performance of the neural network would be improved when In summary, results from past studies have shown that ANN is a good approach to forecast rainfall. The ANN model is capable to model without prescribing hydrologi-5 cal process, catching the complex nonlinear relation of input and output, and solving without the use of differential equations (Luk et al., 2000;Hsu et al., 1995;French et al., 1992). In addition, ANN could learn and generalize from examples to produce meaningful solution even when the input data contain errors or incomplete (Luk et al., 2000). In fact, while the numbers of studies on application of ANN in rainfall forecasting 10 using discontinuous time series data are conducted, studies on continuous time series data are few. Most of the studies in the past used discrete data to train ANN model, training data was screen out from collected (and/or generated) data so it contains only rainy time (i.e., rainfall events or monthly rainfall data). Because the models are trained with rainy input data, and are typically ran in batch mode, the output forecast is issued 15 only after the occurrence of the rainfall events. It means that these models can predict rainfall only when rain occurs, they can tell how long the rain will last but not whether it will rain or not. When using continuous past rainfall data which contained both rain and no rain days as input to train ANN model, no rain periods with zero value makes no change in weights update process so ANN could not recognize the pattern and give 20 low accuracy result. For those reasons, most of the study of ANN on rainfall forecast in the past is not suitable to apply in real time forecasting.
The main objective of this paper is to develop real time ANN based rainfall forecasting model using observed rainfall records in both space and time. In order to overcome the problem encountered in training ANN model with continuous data, an optimum Introduction  (1997 to 1999). Moreover, aside from the rainfall data, additional predictors such as relative humidity, air pressure, wet bulb temperature, cloudiness, and rainfall from surrounding rain gauge stations, were also adopted to improve the prediction accuracy. Sensitivity analysis is also taken in account to grade the important factor of each input to the model performance.

2 Study area
Bangkok, the capital and also the largest city in Thailand, is also one of the highly developed cities of Southeast Asia. Having a land area of 1569 km 2 , it is located in the central part of the Thailand on the low, flat plain of the Chao Phraya River, with latitude 13.45 • N and longitude 100.35 • E. The city which sits at a distance extending from 27 10 to 56 km from the river mouth adjacent to the Gulf of Thailand, has a tropical type of climate with long hours of sunshine, high temperatures and high humidity. There are three main seasons; Rainy (April-October), Winter (November-January) and Summer (February-March). The average low temperature is approximately in low to mid 20 • C and high temperature in mid 32 • C (Thai Meteorological Department, 2005). Bangkok 15 receives a very high average annual rainfall of 1500 mm and is influenced by the seasonal monsoon. The city is affected by flood in a regular basis. When rainfall comes, most of the daily activities are nearly paralyzed. Some of the immediate consequences of a heavy rainfall in Bangkok are: water clogging in the streets, heavy traffic jams, blackouts, and direct or indirect economic losses.

20
The flood events in Bangkok occur from two sources: the rainfall and the rise in water level in Chao Phraya River due to large flow from upstream. In the past, most of the occurrence of high river flow and heavy rains in the city resulted in severe flooding. However, with the construction of a dam upstream and a dike along the riverbank in Bangkok, nearly all parts of the city are now protected from flooding. Land use in Introduction The construction of drainage infrastructure has not kept pace with land-use change due to lack of funds. Hence, capacity of the drainage system has become more and more insufficient. In addition, lack of hydrological information and the failure of gravity to effectively remove drainage water from the city make urban flooding inevitable during the wet season. For a developing city like Bangkok, one of the best ways to cope 5 with the flooding problem is to provide advance rainfall forecasting and flood warning.
Knowing the condition of rainfall in Bangkok in advance can help in managing and dealing with problems due to flooding. The Department of Drainage and Sewage (DDS) of Bangkok Metropolitan Administration (BMA) had established Bangkok Metropolitan Flood Control Center (FCC) in 10 1990 for systematic and efficient management of operation and control of flood protection facilities. BMA has 53 online tipping bucket type rain gauge stations scattered throughout Bangkok and sensors installed at the canal gates and pumping stations that collect water level data. The observed data is transferred in real time to FCC by UHF radio signals every 15 min. Furthermore, Thai Meteorological Department (TMD) owns 15 a network of 51 rain gauge stations covering Bangkok and nearby areas. Both rain gauge networks consist of rain gauges of tipping bucket type with 0.5 mm accuracy. These data are now available in the Internet and can be used for online applications. Locations of these rain gauges are shown in Fig. 1.
At present, there is no reliable rainfall forecast mechanism using rain gauge data.

20
Bangkok uses only radar data with the SCOUT program to forecast rainfall (Chumchean et al., 2005). Based upon the historical data (rain gauge data) and the current situation, the flood forecast analysis is manually carried out at FFC. After a decision about control policy is made based on this analysis, the flood control protection command is then broadcasted to all remote control stations (gates and pumping station).

25
This system is acceptable in terms of real time data transmission but not efficient in terms of urban flood forecast and flood management. Therefore, there is a need to investigate and apply an accurate technique for rainfall forecasting, using rain gauge data. ANN with its advantages such as computation speed, learning capability, fault Interactive Discussion tolerance and adoptability, has been selected to be a tool for short-term rainfall forecast for Bangkok area. The model is mimic design, so it can be applied not only to Bangkok area but also to other tropical developing urban areas as well.
Historical rainfall data was collected from 104 stations of BMA and TMD rain gauge networks in order to train ANN model. After analysis and screening of data, only 75 5 stations inside Bangkok area were used to train ANN model, while the other 29 stations which are located outside Bangkok were discarded. Meteorological data collected from TMD contains hourly measurement of seven parameters: cloudiness, relative humidity, wet bulb temperature, dry bulb temperature, air pressure, wind speed and average hourly rainfall intensity of all rain gauges. Figure 2 shows the average monthly rainfall in Bangkok for a period from 1991 to 2003. It is observed that there are two peaks of rainfall during one year, the first in May, and the second in October. Climatological data during the period 1991-2004 showed that the average annual relative humidity was about 81% with the average maximum relative humidity of 93% and average minimum relative humidity of 52%. The data also 15 showed that the average annual temperature was 26.8 • C, with average maximum temperature of 33.4 • C in April and average minimum temperature of 20.4 • C in December. Rainfall data revealed an annual rainfall of 1869.5 mm with the highest average monthly rainfall of approximately 381 mm observed in October, and the lowest average monthly rainfall of about 12 mm occurring in December, usually the driest month of the year.

Artificial Neural Network
An artificial neural network is an interconnected group of artificial neurons that has a natural property for storing experiential knowledge and making it available for use. The artificial neuron uses a mathematical or computational model for processing of information based on a connectionist approach to computation, akin to a human brain. In to biological systems, involving adjustments to the synaptic connections that exist between the neurons. Learning often occurs by example through training or exposure to a trusted set of input/output data where the training algorithm iteratively adjusts the connection weights (synapses), and these connection weights store the knowledge necessary to solve specific problems.

5
The multilayer perceptron (MLP) is one of the most widely implemented neural network topologies. Generally speaking, for static pattern classification, the MLP with two hidden layers is a universal pattern classifier. MLPs are normally trained with the backpropagation algorithm. In fact the renewed interest in ANN was in part triggered by the existence of back-propagation. The back-propagation rule propagates the errors 10 through the network and allows adaptation of the hidden units. Two important characteristics of the multilayer perceptron are: its nonlinear processing elements (PEs) which have a nonlinearity that must be smooth (the logistic function and the hyperbolic tangent are the most widely used); and their massive interconnectivity (i.e. any element of a given layer feeds all the elements of the next layer). 15 The multilayer perceptron is trained with error-correction learning, which means that the desired response for the system must be known. Error correction learning works in the following way: from the system response at PE i at iteration n, d i (n), and the desired response y i (n) for a given input pattern, an instantaneous error e i (n) is defined by Using the theory of gradient-descent learning, each weight in the network can be adapted by correcting the present value of the weight with a term that is proportional to the present input and error at the weight, i.e.
The local error δ i (n) can be directly computed from e i (n) at the output PE or can be 25 computed as a weighted sum of errors at the internal PEs. The constant η is called the step size. This procedure is called the back-propagation algorithm. Momentum learning is an improvement to the straight gradient descent in the sense that a memory term (the past increment to the weight) is used to speed up and stabilize convergence.

HESSD
In momentum learning the equation to update the weights becomes where α is the momentum. Normally α should be set between 0.1 and 0.9. The 5 standard back-propagation algorithm is as follow: 1. Initialize all weights and bias (normally a small random value) and normalize the training data.
2. Compute the output of neurons in the hidden layer and in the output layer using a generalized feedforward network can solve. In practice, however, generalized feedforward networks often solve the problem much more efficiently. A classic example of this is the two-spiral problem. Without describing the problem, it suffices to say that a standard MLP requires hundreds of times more training epochs than the generalized feedforward network containing the same number of processing elements. A simple 20 generalized feedforward neural network with two hidden layers is shown in Fig. 3. An optimal ANN architecture may be considered as the one yielding the best performance in terms of error minimization, while retaining a simple and compact structure. This important step involves the determination of the ANN's architecture and selection 192 Introduction Interactive Discussion of a training algorithm. There are two important issues concerning the implementation of artificial neural networks, that is, specifying the network size (the number of layers in the network and the number of nodes in each layer) and finding the optimal values for the connection weights.
In the process of specifying the network size, an insufficient number of hidden nodes 5 causes difficulties in learning data whereas an excessive number of hidden nodes might lead to unnecessary training time with marginal improvement in training outcome as well as make the estimation for a suitable set of interconnection weights more difficult (Zealand et al., 1999). There is no specific rule to determine the appropriate number of hidden nodes; yet the common method used is trial and error based on a 10 total error criterion. This method starts with a small number of nodes, gradually increasing the network size until the desired accuracy is achieved. Fletcher and Goss (1993) proposed a suggestion number of node in the hidden layer ranging from (2n+1) to (2 √ n+m) where n is the number of input node, and m is the number of output node. The number of input and output nodes is problem-dependent, and the number of input 15 nodes depends on data availability. In addition, the selection of input should be based on priori knowledge of the problem, prevailing synoptic weather condition over study area. A firm understanding of the hydrologic system under consideration is necessary for the effective selection of input data (Ahmad and Simonovic, 2005).
Regarding the second issue, several training processes are available to find the val-20 ues of connection weights. These algorithms differ in how the weights are obtained. The selection of training algorithm is related to the network type, computer memory, and the input data. As implied in this study, the standard back propagation algorithm is used in ANN training based on its most popular success, but still there are others, such as QuickProp (QP), Orthogonal Least Square (OLS), Levemberg-Marquart (LM),

25
Resilient Propagation Algorithm (RPROP). Coulibaly (2000) stated that ninety percent of ANN models applied in the field of hydrology used the back propagation algorithm. This algorithm involves minimizing the global error by using the steepest descent or gradient approach. The network weights and biases are adjusted by moving a small Introduction Interactive Discussion step in the direction of the negative gradient of the error function during each iteration. The advantage of this algorithm lies in its simplicity.

ANN models
In this study, ANN model was applied for each of 75 rain gauge stations in Bangkok, to forecast rainfall from 1 to 6 h ahead as forecast point. Six distinctive alternative models 5 were initially tested in one station in order to find the optimum ANN model which can then be employed for all others stations. Station E18, located in the Sukhumvit area, where a real-time flood forecasting system is currently developed, was chosen as a sample station in order to design the ANN model structure. To enable the selection of the best model, the training data set should include the high, medium and low rainfall periods. Therefore, 1997, 1998 and 1999 rainfall data were chosen as the training data sets, and the 1998 data was chosen as the cross-validation data set. Detailed description of the six models are presented in Table 1. The first model (A) used multilayer perceptron network with simple structure, five nodes in the input layer, two hidden layer with 5 hidden nodes in each of the two layers, 15 and one node in the output layer corresponding to the observed hourly rainfall. Inputs to the model were present hourly rainfall data (t) and four hour lag time of E18 station from (t−4) to (t−1), while the output was rainfall intensity of the next hour (t+1). The transfer function in nodes is the well-known sigmoid function. For the second model (model B), the network type, transfer function and input of training data set were kept 20 unchanged but the number of hidden nodes in both hidden layers were increased from 5 to 10. In the third model (C), network type was changed from simple MLP to Generalized feedforward network. Data used to train the model was the same as the previous two models (A and B). The fourth model (D) adopted Generalized feedforward, network, with the same transfer function sigmoid, but different input data as well as model structure. The self-learning nature of ANN normally allows it to predict without exten-Introduction Interactive Discussion sive prior knowledge of all processes involved. However, a good understanding of the physics involved, and a hypothesis on how different processes (and their state variable) interact with each other would help in evaluating the generality of the relationship when analyzing data. Therefore, the data sets used for training should represent the physically based dynamic range of the forecast. Triggered by this idea, five meteorology 5 parameters were added into the training data set, but the past rainfall data was not included since the data brings more zero value to the training process (for no rain period). This resulted to six input data for model D, which included relative humidity, wet bulb temperature, air pressure, cloudiness, average hourly rainfall intensity of all rain gauges, and present rainfall of E18 station. Hence the model structure was modified by changing input nodes to 6, increasing the number of node in the first hidden layer to 16, changing the second hidden layer to 12, but still 1 node in the output layer. The fifth model (E) retains the same model structure as model D, except the transfer function, where the tanh function was used instead of the sigmoid function. In the last model (F), the rainfall data of stations around E18 were considered. A correlation anal- 15 ysis was applied to 75 rain gauge stations in Bangkok to determine which stations are strongly related to E18. Results of the analysis revealed higher correlation of stations E00, E19 and E26 with E18 compared with other stations. Thus the present hourly rainfall data of these three stations were added to the training data set of model E for the formulation of model F. The change in input data resulted to an increase in the 20 number of node in input layer to 9, increase in the number of hidden nodes to 22 and 11 for the first and second hidden layers, respectively.

Comparison of ANN model
The one hour forecast accuracy of all six ANN models was evaluated by calculating Error (RMSE) and Correlation Coefficient (R 2 ), described in Table 2. From the training results of ANN models, forecasted rainfall was plotted against the observed data to determine the relationship of these two variables (Figs. 5,7 and 9). It was observed that the RMSE for all models seemed to be small at less than 2 mm per hour. This value however, does not seem to be significant since the total number of rainy period 5 in both forecasted and observed data are very small compared to the total patterns of training data. Example of 24 h computation on 21 August 1998 for each model were also plotted (Figs. 4, 6 and 8) Fig. 4. Both models gave some false forecast and the forecasted rainfall differed with observed data from few to more than 20 mm/h. It was observed in the scatter plot in Fig. 5  Interactive Discussion ized feedforward network worked better than simple multilayer perceptron network. For Model D, the change of input of training data improved the results with higher EI values of 50.17% and 49.5% in the training stage and testing stage, respectively. For both models C and D, RMSE value is less than 2 mm/h, indicating minimal change compared with RMSE of models A and B, but viewed in the Fig. 6, the gap between 5 forecasted rainfall of model C and D and observed data is much more smaller than that of models A and B (Fig. 4). As shown in Fig. 7 where the trend line in the scatter graph is still laid down under the 1:1 line, with the small angle presenting a low correlation coefficient value (0.56 for model C and 0.64 for model D), indicating these two models still gave overestimation of rainfall forecast. On the contrary, the addition of meteo-10 rology parameters such as relative humidity, air pressure above mean sea level, total cloudiness, wetbulb temperature, and average rainfall of all stations, into the training data set for model D improved the accuracy of forecast.
For model E, the use of hyperbolic tanh function instead of the sigmoid function brought a very interesting result. The EI of the model levels up to 66.71% and 68.5% 15 in the training stage and in the testing stage, respectively, with R 2 of 0.69 in training stage and 0.71 in testing stage. As seen in Figure 8, forecasting for the same day of 21 August, 1998 using model E, resulted to better accuracy. The tanh function with the range of each neuron in the layer between −1 and 1 showed a better performance compared with the sigmoid function where the range of each neuron in the layers is 20 between 0 and 1.
Model F gave the highest performance in terms of efficiency and forecasting. The efficiency attained at 1 h is between 97.35% and 96.52% in the training stage and testing stage, respectively. A scatter plot of model F (see Fig. 9) shows that the trend line almost coincided with the 1:1 line, corresponding to a correlation coefficient of 0.96. 25 Therefore, this model was used to forecast rainfall at lead-time of one to six hours at all rain gauge stations in Bangkok.

Sensitivity analysis
While training a network, the effect that each of the network inputs is having on the network output should be studied. This provides feedback as to which input channels are the most significant, based on which we may decide to prune the input space by removing the insignificant parameters. This will reduce the size of the network, which 5 in turn reduces the complexity and the training time. Sensitivity analysis is a method for extracting the cause and effect relationship between the inputs and outputs of the network. This work is done by removing each input channel in turn and then comparing the statistical indicator such as EI, RMSE and R 2. . The greater the effect observed in the output, the greater the sensitivity with respect to the input. In order to ensure the accurate output from the model, the input sensitive analysis was carried out and compared with the results from model F. As mentioned in the preceding section, the inputs into the final model (F) are total cloudiness, air pressure (HPa), relative humidity (%), wetbulb temperature (˚C), average rainfall from TMD (mm/h), rainfall from three surrounding stations (strongly connected with station E18) (mm/h), and rainfall from 15 E18 station (mm/h), 6 alternative models were run for the sensitivity analysis. These 6 alternative models maintained the same network architecture, using the tanh function and forecasting rainfall 1 h ahead. As can be seen from Table 3, the most significant input is wetbulb temperature. The model running without wetbulb temperature as input obtained an EI reduced from 20 97.35% of that of the model F, to 80.62% in the training stage. The second most important parameter is humidity since in the model without humidity, EI was down to 83.22% in the training stage. Other important parameters are pressure and rainfall from surrounding station. The average rainfall of all stations collected from the main TMD station RS26 stays as the fifth important parameter, with an EI decreasing to 86.37% for the model running without this parameter. Lastly, the model running without cloudiness gave slightly changing result compared with the model F, with an EI reduced to 87%.

Rainfall forecasting
Based on the results of designing stage with six models tested on station E18, model F which gave the highest performance in term of efficiency and forecasting was employed to forecast rainfall from 1 to 6 h ahead for all 75 stations. Three years rainfall and meteorology data were available, so model performance was evaluated using 5 cross-validation to maximize data available for training. By this method, performance statistics can be generated for the entire 3 y period. To evaluate the performance of models, the same three indices EI, RMSE and R 2 were used.  Fig. 10. In this figure, co-ordinates of all stations, the observed rainfall data and the predicted rainfall data for all 75 stations are fed into the Surfer program for plotting the rain map. Therefore, the comparison of the observed and forecasted rainfall for the whole Bangkok area can be seen clearly. The Kriging method was used for scattered data interpolation. As seen in Fig. 10, at 8 h, there were light rain at some stations and 1 h forecast could forecast quite accurately. At 9 h, rain became heavier on the east side of Bangkok, forecasting of 2 h also presented a nice shape of rain map, but there were some stations giving false forecast, and darker legend color also indicates underestimated prediction. Rainfall forecast at 3 h ahead also gave underestimated result in most stations. The 15 rain moved into the center of the area (observed at 10 h), but in the 3 h forecast, rain not only appeared in the center but also in left lower corner of the map. From 11:00 h to 13:00 h, rain has reduced and stopped, but in the forecast result, there were still rainfall at some stations. Figure'10 revealed a similar conclusion as Table 4, that is, rainfall forecast for 3 to 6 h is not so good, but is still considered to be a reasonable non-linear 20 approximation. By presenting forecast result in rain map, this could provide a better view of the whole picture of rainfall forecast for all stations in the area.

Conclusions
In Interactive Discussion els were tested to identify the appropriate model design to overcome the difficulty of training ANN with continuous rainfall data. Comparison of 1 h rainfall forecast of these six models showed that combination of meteorology data with rainfall data as training data has significantly improved the forecast accuracy. Result of designing stage also concluded that Generalized Feedforward network and hyperbolic tanh function proved 5 to work well in this study. With appropriate network architecture, ANN model is able to learn from continuous data which contained both rain and no rain period, thus the model can be adopted to run online forecasting. While ANN is considered as data driven approaches, and the selecting of input data in this study was limited on the availability of the data, it is still important to determine 10 the dominant model inputs, as this increases the generalization ability of the network for a given data. Furthermore, it can help reducing the size of the network and consequently reduces the training times. Choosing suitable parameters for the ANN models is more or less a trial and error approach. In this study, sensitive analyses were used in conjunction with judgment to rank the important factor of each input to the model 15 performance.
The ANN model in this study is very robust, characterized by fast computation, capable of handling the noisy and approximate data that are typical in weather data. The predicted values of all 75 stations matched well with the observed rainfall in case of forecasts with short lead times, 1 or 2 h. Not only that, the rainfall forecasting for 3 h 20 ahead using ANN also provided reasonable results. The efficiency indices were gradually reduced as the forecast lead time increased from 4 to 6 h. Although the model performance of 6 h forecasting was low and the forecasting was not as accurate as expected, this model still has some practical applications in flood management for the study area. Overall, the study indicates that the use of time series analysis techniques 25 (ANN model) for rainfall forecasting may allow an extension of the lead-time above 6 h, whereby a reliable flood forecast which provides a quick prediction based on the past values may be issued. Based on these results, it can be concluded that ANN is an appropriate predictor for real-time rainfall forecasting in rainfall stations in the Bangkok