Application of Neural Network Models and ANFIS for Water Level Forecasting of the Salve Faccha Dam in the Andean Zone in Northern Ecuador

: Despite the importance of dams for water distribution of various uses, adequate forecasting on a day-to-day scale is still in great need of intensive study worldwide. Machine learning models have had a wide application in water resource studies and have shown satisfactory results, including the time series forecasting of water levels and dam ﬂows. In this study, neural network models (NN) and adaptive neuro-fuzzy inference systems (ANFIS) models were generated to forecast the water level of the Salve Faccha reservoir, which supplies water to Quito, the Capital of Ecuador. For NN, a non-linear input–output net with a maximum delay of 13 days was used with variation in the number of nodes and hidden layers. For ANFIS, after up to four days of delay, the subtractive clustering algorithm was used with a hyperparameter variation from 0.5 to 0.8. The results indicate that precipitation was not inﬂuencing input in the prediction of the reservoir water level. The best neural network and ANFIS models showed high performance, with a r > 0.95, a Nash index > 0.95, and a RMSE < 0.1. The best the neural network model was t + 4, and the best ANFIS model was model t + 6.


Introduction
In hydrology and water resource management, machine learning models (ML) have solved highly complex problems and have allowed a broad spectrum of opportunities and uses for technicians and experts in the area [1]. Their growth in popularity began in the nineties, when they were applied for predicting rainfall and runoff time series, which normally have a high degree of temporal variability and non-linear relationships [2,3]. Modeling is possible thanks to their ability to extract relationships between the input and output data without entering the physics of the phenomena involved [4]; this is an advantage, as it simplifies a large portion of the field data collection and reduces the time invested in modeling as well as the cost involved in those activities.
Nowadays, neural networks (NN) and adaptive neuro-fuzzy inference systems (AN-FIS) models are two of the most used ML tools. These models are mainly used for predicting, filling, and classifying data series. For instance, they have been used to forecast water consumption demands in urban areas [5,6], determine groundwater quality and transport pollutants [7,8], classify and simulate tributary rivers [9,10], and generate early warning systems [11]. However, applications are continually being developed to meet new needs. Recent applications include the management of dams, which are a vital civil engineering infrastructure for the correct functioning of modern society.
Dams, which are a type of infrastructure for integrated water resource management (IWRM), are used for water storage, flood control, electric power generation, and recre-m 3 , and is located within the Oyacachi and Papallacta parishes in the province of Napo within the Cayambe-Coca Ecological Reserve [27]. The Salve Faccha dam is located on a high Andean plateau, as its altitude ranges between 4000 and 4500 m above sea level. The area belongs to the Bioclimatic region of Páramo Lluvioso because it has an annual rainfall of between 1000 and 1500 mm [28]. The daily temperature is highly variable, with a maximum range of 17 °C during the day and a minimum of −2 °C at night. There are three predominant plant covers: Herbaceous Páramo, Páramo de Páramo, and Shrub Páramo [29].
The reservoir receives runoff from six small catchments with a total extension of 14.24 km 2 . The contributing catchments show a variable topography which includes steep terrain with medium slopes ranging from mild to moderate (14-29%). The highest percentage of the area has gentle slopes and volcano-sedimentary deposits [27]. The compactness indices slightly exceed one in all the catchments, which indicates longer concentration times. The shape factor of the catchments is less than 1, which denotes a slight elongation and thus a lower incidence of floods influenced by the shape.
In terms of data availability, daily rainfall and water levels data are available from 1 January 2012 to 31 December 2019 from stations P68 and C13 ( Figure 2). These data series were provided by the Department of Water Resources of the Empresa Pública Metropolitana de Agua Potable y Saneamiento de Quito (EPMAPS). It should be noted The Salve Faccha dam is located on a high Andean plateau, as its altitude ranges between 4000 and 4500 m above sea level. The area belongs to the Bioclimatic region of Páramo Lluvioso because it has an annual rainfall of between 1000 and 1500 mm [28]. The daily temperature is highly variable, with a maximum range of 17 • C during the day and a minimum of −2 • C at night. There are three predominant plant covers: Herbaceous Páramo, Páramo de Páramo, and Shrub Páramo [29].
The reservoir receives runoff from six small catchments with a total extension of 14.24 km 2 . The contributing catchments show a variable topography which includes steep terrain with medium slopes ranging from mild to moderate (14-29%). The highest percentage of the area has gentle slopes and volcano-sedimentary deposits [27]. The compactness indices slightly exceed one in all the catchments, which indicates longer concentration times. The shape factor of the catchments is less than 1, which denotes a slight elongation and thus a lower incidence of floods influenced by the shape.
In terms of data availability, daily rainfall and water levels data are available from 1 January 2012 to 31 December 2019 from stations P68 and C13 ( Figure 2). These data series were provided by the Department of Water Resources of the Empresa Pública Metropolitana de Agua Potable y Saneamiento de Quito (EPMAPS). It should be noted that within the reservoir area, there are three hydrometric stations installed; however, they were not used in this study because they were recently installed, so there is limited information to be used as input for the DL models. Precipitation in the area is present throughout the year. Most rainfall in the region occurs between April and July. that within the reservoir area, there are three hydrometric stations installed; however, they were not used in this study because they were recently installed, so there is limited information to be used as input for the DL models. Precipitation in the area is present throughout the year. Most rainfall in the region occurs between April and July.

Generalities of Neural Networks and ANFIS
Currently, there are several artificial intelligence techniques that can be applied to forecast the water level within reservoirs [30]. For the present research, neural networks were used because they are models that can reliably solve non-linear problems than traditional methods such as the moving average model or the autoregressive moving average model [31,32]. At the same time, neural networks are simple enough to be interpreted by the technicians and water practitioners who handle the reservoir. On the other hand, ANFIS was used because it is a more complex model than the highperformance neural networks, and it has the ability to handle the uncertainty of hydrological and climatic processes [33]. It has been shown that ANFIS tends to perform better than neural networks for the prediction of reservoir water levels [34]. However, its training and interpretation is usually more complex compared to neural networks. Nevertheless, previous research shows that both models have successfully been applied to forecast reservoir levels on a daily basis [35,36].

Neural Networks
A feed-forward neural network is a closed complex network made of several simple nodes that simulate the neural structure of the human brain. Typically, it consists of three connected parts or layers: the input layer, the hidden layer where the neurons are located, and the output layer [37], as shown in Figure 3. When using a neural network, the inputs in the first layer are multiplied by the weights (wi) of the connections, which determine their importance. A summation of these multiplications is conducted within a neuron, and a bias of the node is then added. The result of each neuron is determined from the sum weight of all its inputs or nodes that pass through a non-linear function called the activation function, determining the level of activation. The most used transfer function is the sigmoidal (tan-sigmoid) function, as shown in the graph.

Generalities of Neural Networks and ANFIS
Currently, there are several artificial intelligence techniques that can be applied to forecast the water level within reservoirs [30]. For the present research, neural networks were used because they are models that can reliably solve non-linear problems than traditional methods such as the moving average model or the autoregressive moving average model [31,32]. At the same time, neural networks are simple enough to be interpreted by the technicians and water practitioners who handle the reservoir. On the other hand, ANFIS was used because it is a more complex model than the high-performance neural networks, and it has the ability to handle the uncertainty of hydrological and climatic processes [33]. It has been shown that ANFIS tends to perform better than neural networks for the prediction of reservoir water levels [34]. However, its training and interpretation is usually more complex compared to neural networks. Nevertheless, previous research shows that both models have successfully been applied to forecast reservoir levels on a daily basis [35,36].

Neural Networks
A feed-forward neural network is a closed complex network made of several simple nodes that simulate the neural structure of the human brain. Typically, it consists of three connected parts or layers: the input layer, the hidden layer where the neurons are located, and the output layer [37], as shown in Figure 3. When using a neural network, the inputs in the first layer are multiplied by the weights (w i ) of the connections, which determine their importance. A summation of these multiplications is conducted within a neuron, and a bias of the node is then added. The result of each neuron is determined from the sum weight of all its inputs or nodes that pass through a non-linear function called the activation function, determining the level of activation. The most used transfer function is the sigmoidal (tan-sigmoid) function, as shown in the graph.
One of the most significant benefits of neural networks is their ability to learn patterns in data from the training process by modifying the weight of the networks' connections and neuron bias by comparing model inputs and outputs. For supervised training models, a training algorithm (such as the backpropagation type) is used to minimize the output error when comparing the resulting value with the real one for each iteration of weight adjustment in a process called an epoch [37]. For a more detailed explanation of neural networks, we recommend reviewing [1,38].  One of the most significant benefits of neural networks is their ability to learn patterns in data from the training process by modifying the weight of the networks' connections and neuron bias by comparing model inputs and outputs. For supervised training models, a training algorithm (such as the backpropagation type) is used to minimize the output error when comparing the resulting value with the real one for each iteration of weight adjustment in a process called an epoch [37]. For a more detailed explanation of neural networks, we recommend reviewing [1,38].

Functioning of ANFIS Model
Adaptive neuro-fuzzy inference system or ANFIS is an information processing model that uses fuzzy logic in an interconnected system that is trained with a supervised training system [39]. ANFIS combines the best of fuzzy logic, combining a system of rules that represent expert knowledge with the ability of NNs to be trained to capture the relationships between inputs and outputs. Decision rules are created through the use of expert knowledge or patterns and trends in data series. Despite this, the computational cost and training time is relatively high, especially in the training phase.
In order to simplify the explanation of how ANFIS function, let us have a two-input ("x" and "y") model with one output, "z" for fuzzy Sugeno architecture. The typical model of an if-then rule of fuzzy logic is [34]: Rule 1: If "x" is A1 and "y" is B1, then: f1 = p1*x + q1*y + r1; Rule 2: If "x" is A2 and "y" is B2, then: f2 = p2*x + q2*y + r2.

Functioning of ANFIS Model
Adaptive neuro-fuzzy inference system or ANFIS is an information processing model that uses fuzzy logic in an interconnected system that is trained with a supervised training system [39]. ANFIS combines the best of fuzzy logic, combining a system of rules that represent expert knowledge with the ability of NNs to be trained to capture the relationships between inputs and outputs. Decision rules are created through the use of expert knowledge or patterns and trends in data series. Despite this, the computational cost and training time is relatively high, especially in the training phase.
In order to simplify the explanation of how ANFIS function, let us have a two-input ("x" and "y") model with one output, "z" for fuzzy Sugeno architecture. The typical model of an if-then rule of fuzzy logic is [34]: Rule 1: If "x" is A 1 and "y" is B 1 , then: f 1 = p 1 *x + q 1 *y + r 1 ; Rule 2: If "x" is A 2 and "y" is B 2 , then: f 2 = p 2 *x + q 2 *y + r 2 .   ANFIS models consist of five layers or phases consisting of [40] (1) fuzzificatio the rules phase, (3) the normalization phase, (4) the de-fuzzification phase, and (5 overall output phase ( Figure 4b).
In the first layer, the inputs are transformed using the membership functions.
Ai and Bi represent the transfer function, and Ai (or Bi-2) is a fuzzy set assoc with this node characterized by the transfer function shape. In general, the Gau function is used due to its concise notation and smoothness. These transfer functions the decision thresholds of a variable on a scale from 0 to 1, defined by the follo equation, where {ai, bi, ci} are the parameters that define the form of the transfer func in Equation (2): In the second layer, the firing strength of the rules (wi) is determined, for whic resulting values of the previous layer are multiplied, giving adjusted nodes. Each represents the firing strength of each rule.
Normalization, which divides the fire strength that is obtained per layer by the of all the connection weights is conducted in the third layer. ANFIS models consist of five layers or phases consisting of [40] (1) fuzzification, (2) the rules phase, (3) the normalization phase, (4) the de-fuzzification phase, and (5) the overall output phase (Figure 4b).
In the first layer, the inputs are transformed using the membership functions.
Ai and Bi represent the transfer function, and Ai (or Bi−2) is a fuzzy set associated with this node characterized by the transfer function shape. In general, the Gaussian function is used due to its concise notation and smoothness. These transfer functions show the decision thresholds of a variable on a scale from 0 to 1, defined by the following equation, where {a i , b i , c i } are the parameters that define the form of the transfer functions in Equation (2): In the second layer, the firing strength of the rules (w i ) is determined, for which the resulting values of the previous layer are multiplied, giving adjusted nodes. Each node represents the firing strength of each rule.
Normalization, which divides the fire strength that is obtained per layer by the sum of all the connection weights is conducted in the third layer.
In the fourth layer, the result of the previous layer is multiplied by multiple linear equations, which represent the rule systems of the Sugeno type ANFIS model defined above [1].
where Li 4 is the fourth layer output, f i is multiple linear equations, Li 3 is the third layer output, p, q, r are the multiple linear equation parameters, and x i and y i are the inputs of the membership degree.
In the fifth layer, all of the outputs of the fourth layer are added, giving the final results. The model can be trained using the hybrid-type learning algorithm, which combines leastsquares estimators and the descending gradient method [39].
One disadvantage of traditional ANFIS-type models is their complex and demanding modeling when using more than six input variables due to the substantial increase in conditionals [41]. For example, for a ten-input model with three membership functions, each could have a total of 59,049 conditionals. Increasing the number of conditionals also increases the training time of the model due to the high complexity, which comes with the risk of obtaining unsatisfactory validation results. One solution is using data clustering techniques to separate large data series into groups where their behavior is similar. Groups of variables are obtained and activated by approximating them to the center of a radio cluster [42]. There are several clustering techniques such as c-means clustering [43], mountain clustering [44], G-K fuzzy clustering [45] and subtractive clustering [46]. Each grouping has a weight determined by the center of the clustering.

Quality Control of Data
A homogeneity test was performed, which determined the significant trend changes in the data due to measurement errors that include sensor failures and station position changes. The statistical program Rh test V3 was used based on the penalized maximal t-test for precipitation series and reservoir level to find statistically significant change points [47]. A reliability of 95% was used for the test as it was the most reliable, and the presence of type 1 change points were not considered homogeneous data [48].
Deterministic methods were used to fill in the missing precipitation data. First, the correlation between stations was determined, and a polynomial line of tendency was then fitted to the data. The missing data were filled in according to the highest correlation with the closest stations [49]. The moving mean method was used with a six-day moving window [50] and filled in using the average of the intermediate values with the MATLAB outlier tool to correct outliers.

Determination of Predictors and Delay as Input
The model input and delay days were selected using the autocorrelation and crosscorrelation between variables. These methods were selected because they are frequently used and for their excellent performance in hydrology models [21,51,52]. Generally, the graph measures the linear relationship between lagged values in a time series. Delay days that do not fall within a confidence limit (in this study, 95%) have some significant relationship and are not a statistical fluke. In case of encountering a seasonality when using a Fuller Dicker test (which makes it difficult to detect the number of delays in the graph), the seasonality will be removed from the subtraction of a series of mobile means for a better reading of the graph.

Neural Network and ANFIS Models Configuration
The use of cross-validation in machine learning model development is common. This methodology consists of dividing the data into three different groups called training, validation, and testing. The first is applied to train the neural network in different configurations. The second group validates the performance of the neural network during training. Finally, the test group is used to test the model using new information that the model has not processed before. There are 2920 rainfall and water level observations, which were split into 70% for the training, 15% for validation, and 15% for test models (November 2018 to December 2019).
An input-output neural network available in the MATLAB neural net time series library was used in this study. In these models, the number of delay days used (x-n) is specified to determine the output of the target. The inputs were normalized in a range of (−1, 1) in order to avoid certain inputs having more weight than others. The tangentialsigmoid type was used to capture the normalization range of the data. The output equation is linear because it allows the interpretation of higher values of the reservoir level not used in the training phase. The Levenger-Marquart training algorithm is used due to having a low training time with satisfactory results. The neural network architecture has been defined by trial and error based on the minimization of the training and validation error for an optimal generalization of the model results [53].
For ANFIS, the subtractive clustering method was used with an initial acceptance radius of 0.5 to 0.8 with a maximum of 500 iterations of training and validation in the Matlab fuzzy library. The same inputs from the neural networks were used for the model. However, the number of delay days was limited to four days due to the increased training time. The Gaussian transfer function was used as it is the only one in the ANFIS algorithm for subtractive clustering.

Model Performance Criteria
The correlation coefficient (CC), RMSE (root mean square error), and the Nash-Sutcliffe (NS) efficiency test were used to measure the performance of the models due to their regular use in hydrological modeling [54] (Equations (5)- (7)). In general, the closer the CC and NS values are to 1, and the closer the RMSE is to 0, the better the model is at predicting. Models will be considered models of high precision if the CC and NS values are more significant than 0.9, and the RMSE value is less than 0.1 [55]. Taylor diagrams were used to make a multi-objective evaluation, which are graphic representations between the modeled and observed series of three statistical metrics: Pearson's correlation coefficient, the root mean square error (RMSE), and the standard deviation. Model performance was also evaluated for the dry and rainy seasons. The dry season was considered to be from April to June. The maximum and the minimum water levels of the reservoir were also observed and were consistent during the indicated dry and wet seasons.
where X i is the actual value of reservoir water level, X is the mean of the actual value, Y i is the prediction of reservoir water level, and Y is the mean of the prediction of the actual value of the water level.

Prediction Confidence Intervals Development
The Bootstrap percentile-t method was used to determine the confidence intervals of the predictions. This method was selected because it was applied to generate the confidence intervals for the reservoir level forecasts [42] and the confidence intervals for the monthly precipitation predictions [56]. The t-percentile method generates t-values of the classical theory of confidence interval generation. It is assumed that for the Bootstrap samples, the data series, and each sample the statistical parameter of interest θ is determined (which in the case of the investigation are the predictions of the reservoir level), and the standard error of the parameter of the samples is estimated [57]. For a confidence interval t with a reliability of 95%, the construction is as follows: θ = predicted value, se = the Bootstrap standard error, and t n−1 = the alpha value of the percentiles (Equation (8))

Selection of Predictors
Adequate identification of the predictors of a model is essential for its proper functioning, in some cases showing even greater importance than the selection of the best model architecture [58]. The autocorrelation between the variables does not exhibit a useful pattern to determine the maximum delay period due to the seasonality, as observed in Figure 5a. Equally important, the cross-correlation graph between precipitation and the trending level ( Figure 5b) shows a low correlation (<0.1) and is close to the limit of significant error represented by the blue lines. Therefore, the variable of rainfall and water level with seasonality has little relationship at the daily time steps. For this reason, a more in-depth analysis of the time series relationship was developed.

Selection of Predictors
Adequate identification of the predictors of a model is essential for its proper functioning, in some cases showing even greater importance than the selection of the best model architecture [58]. The autocorrelation between the variables does not exhibit a useful pattern to determine the maximum delay period due to the seasonality, as observed in Figure 5a. Equally important, the cross-correlation graph between precipitation and the trending level (Figure 5b) shows a low correlation (<0.1) and is close to the limit of significant error represented by the blue lines. Therefore, the variable of rainfall and water level with seasonality has little relationship at the daily time steps. For this reason, a more in-depth analysis of the time series relationship was developed. The residuals of the water level time series were calculated to make the model nonseasonal. The process was conducted to better determine the delay. The new data were obtained from the subtraction between the level and a 20-day moving average, capturing the seasonality. Figure 6a shows the autocorrelation of the non-stationary level where we The residuals of the water level time series were calculated to make the model nonseasonal. The process was conducted to better determine the delay. The new data were obtained from the subtraction between the level and a 20-day moving average, capturing the seasonality. Figure 6a shows the autocorrelation of the non-stationary level where we have 18 days without entering the significant error, which is represented by the blue line. Regarding the cross-correlation with rainfall (Figure 6b), it increases to a maximum of 0.3. Since the maximum autocorrelation of the graphic is 0.3, it could be inferred that precipitation might not be the most crucial variable in NN and ANFIS models. In conclusion, 13 lag days were selected as input (see Figure 6b).
Precipitation may be a poor predictor within the ANFIS and NN models. The study area is still characterized by a poor distribution of hydrometeorological stations. The public water company, EPMAPS, is in charge of the hydrological monitoring of the area, and it is currently installing additional water monitoring stations. Therefore, future hydrological models will have more precipitation and discharge data availability. Moreover, the Andean páramos have high climatic variability [59], which, together with the limited water sampling stations, complicates the estimation of precipitation input for the Salve Faccha reservoir. Moreover, in the northern Andean paramo, soil properties have been documented as highly porous with high organic matter content, so they have a buffer capacity for precipitation events, a high-water retention capacity within the soil reservoir, and a strong regulating capacity of baseflow [60]. Due to soil properties, it is unlikely that water levels within the reservoir are highly responsive to precipitation events.
Through trial and error, it was determined that the data series of the water level with filters should be included to increase the models' recommended performance [61]. Six inputs were selected: (1) the water level with seasonality, (2) the water level moving average, (3) the non-seasonality water level, (4), the water level without linear trend, and (5 and 6) the rainfall series of stations P68 and C13. Due to the low cross-correlation of rainfall with the water level, models with and without rainfall were tested to determine the impact of the inclusion and exclusion of these variables on their performance.
Water 2021, 13, x FOR PEER REVIEW 10 of 18 have 18 days without entering the significant error, which is represented by the blue line.
Regarding the cross-correlation with rainfall (Figure 6b), it increases to a maximum of 0.3.
Since the maximum autocorrelation of the graphic is 0.3, it could be inferred that precipitation might not be the most crucial variable in NN and ANFIS models. In conclusion, 13 lag days were selected as input (see Figure 6b).
(a) (b) Precipitation may be a poor predictor within the ANFIS and NN models. The study area is still characterized by a poor distribution of hydrometeorological stations. The public water company, EPMAPS, is in charge of the hydrological monitoring of the area, and it is currently installing additional water monitoring stations. Therefore, future hydrological models will have more precipitation and discharge data availability. Moreover, the Andean páramos have high climatic variability [59], which, together with the limited water sampling stations, complicates the estimation of precipitation input for the Salve Faccha reservoir. Moreover, in the northern Andean paramo, soil properties have been documented as highly porous with high organic matter content, so they have a buffer capacity for precipitation events, a high-water retention capacity within the soil reservoir, and a strong regulating capacity of baseflow [60]. Due to soil properties, it is unlikely that water levels within the reservoir are highly responsive to precipitation events.
Through trial and error, it was determined that the data series of the water level with filters should be included to increase the models' recommended performance [61]. Six inputs were selected: (1) the water level with seasonality, (2) the water level moving average, (3) the non-seasonality water level, (4), the water level without linear trend, and (5 and 6) the rainfall series of stations P68 and C13. Due to the low cross-correlation of rainfall with the water level, models with and without rainfall were tested to determine the impact of the inclusion and exclusion of these variables on their performance. Table 1 shows the performance metrics for the neural network forecasts over 1 to 6 days. No improvement or worsening is observed when comparing the results with/without including rainfall as input according to performance metrics. The two types of models have a high correlation with a Nash index very close to one, with an RMSE less than 0.1. However, networks with no precipitation input require fewer lag days for the  Table 1 shows the performance metrics for the neural network forecasts over 1 to 6 days. No improvement or worsening is observed when comparing the results with/without including rainfall as input according to performance metrics. The two types of models have a high correlation with a Nash index very close to one, with an RMSE less than 0.1. However, networks with no precipitation input require fewer lag days for the fiveand six-day predictions. Therefore, they are accepted as superior because they need less information to obtain equally satisfactory results. This result supports the autocorrelation values indicated in Section 3.1 when considering precipitation as a low-impact variable for water level predictions. For example, Hussain and collaborators only used precipitation to predict the water level of the next day, obtaining errors of up to 44% during the test period [11].

Neural Network Results
The best-performing models without rainfall contain 15-20 neurons with a single hidden layer, except for the two-day prediction model, which required 30 nodes for the best results. Based on performance metrics, the best model is the four-day prediction model with an RMSE of 0.046 with a maximum of 0.18 m with a 95% confidence interval, followed by the one-day prediction model with an RMSE of 0.053 (Figure 7a). The errors of the other days are very close, with RMSE less than 0.1. As in other recent studies [62], our results tend to worsen as the difference between the input days and the days to forecast increases, however, these high-performance results can be maintained. Equally important, the best performance models are obtained with simple model architectures with fewer nodes, similar to the study by Piri and Rezaei, who predicted reservoir levels with a single hidden layer with less than 10 nodes and inputs from past levels in 2016 [19].
The performance of the models is observed in the Taylor diagram, where zero represents the actual data series, and the numbers are the forecast days of each selected neural network (Figure 7b). However, subsequent studies should evaluate the average efficiency of the same architecture to avoid selecting models optimized in local minima, as they have low generalizability and present poor results from data other than those used for calibration. In this diagram, point 0 is real observation data, and 1 to 6 are the models from t + 1 to t + 6 respectively, as shown in Table 1.

ANFIS Results
The results were split into models with rainfall (WP) and models without precipitation (WOP) in Table 2. Information from the various three days was needed to obtain the best results to predict the reservoir level for the models with precipitation. Despite this, the one and two-day predictions were more similar to the naive-type In this diagram, point 0 is real observation data, and 1 to 6 are the models from t + 1 to t + 6 respectively, as shown in Table 1. Symbology. W = models with precipitation, WOP = models without precipitation, RMSE = root mean square error, NS = Nash-Sutcliffe efficiency.

ANFIS Results
The results were split into models with rainfall (WP) and models without precipitation (WOP) in Table 2. Information from the various three days was needed to obtain the best results to predict the reservoir level for the models with precipitation. Despite this, the one and two-day predictions were more similar to the naive-type predictions. These models are characterized by the replication of the previous value as the prediction value. This result is similar to the neural network models with a three-day delay. Therefore, it can be concluded that three and four days of delay input is not enough information to generate predictive t + 1 and t + 2 models for neural networks and ANFIS. Symbology. WP = models with precipitation, WOP = models without precipitation, RMSE = root mean square error, NS = Nash-Sutcliffe efficiency.
Slightly better performance is observed with a shorter training and validation time due to having fewer entries to cluster despite having entries spanning up to four days. As with previous neural network models, it can be concluded that the precipitation variable is not needed to forecast the reservoir level for up to six days. Despite this, the one-day forecast and two-day forecast models are similar to the naive models. The best model for ANFIS was for t + 6, with an RMSE of 0.0737 with four days of delay (Figure 8a), which agrees with the ability of the models to make predictions at different time periods when determining reservoir water level predictions up to three days into the future, as obtained by [20]. The Taylor diagram of all of the ANFIS models presents a highly accurate performance that is very close to the actual data series because they are grouped (Figure 8b). Table 3 indicates the performance of the neural networks and ANFIS by season. A good performance can be observed in the rainy and dry seasons. The error in the rainy season is greater in the months when the dam level begins to increase at the beginning of the season because this period has been the wettest month since 2012, as seen in the participation heat map in the graph in Figure 9. An increase in the DL models is expected due to incorrect generalizations when entering values with different trends or values that are higher than those used for the training period [1]. Furthermore, the rainy season shows greater variability than the dry season, which makes it difficult for the model to produce a better forecast. Despite this, the models can generalize and predict with a low error frequency, mainly due to the low influence of rainfall on the variability of the water level over time. This result is possible with the linear transfer function in the final layer of the neural network.
due to having fewer entries to cluster despite having entries spanning up to four days. A with previous neural network models, it can be concluded that the precipitation variab is not needed to forecast the reservoir level for up to six days. Despite this, the one-da forecast and two-day forecast models are similar to the naive models. The best model fo ANFIS was for t + 6, with an RMSE of 0.0737 with four days of delay (Figure 8a), whic agrees with the ability of the models to make predictions at different time periods whe determining reservoir water level predictions up to three days into the future, as obtaine by [20]. The Taylor diagram of all of the ANFIS models presents a highly accura performance that is very close to the actual data series because they are grouped (Figur 8b). In this diagram, point 0 is real observation data, and 1 to 6 are the models from t + 1 to t + 6 respectively, shown in Table 2. Table 3 indicates the performance of the neural networks and ANFIS by season good performance can be observed in the rainy and dry seasons. The error in the rai season is greater in the months when the dam level begins to increase at the beginning the season because this period has been the wettest month since 2012, as seen in participation heat map in the graph in Figure 9. An increase in the DL models is expec due to incorrect generalizations when entering values with different trends or values t are higher than those used for the training period [1]. Furthermore, the rainy season sho greater variability than the dry season, which makes it difficult for the model to produ a better forecast. Despite this, the models can generalize and predict with a low er frequency, mainly due to the low influence of rainfall on the variability of the water le In this diagram, point 0 is real observation data, and 1 to 6 are the models from t + 1 to t + 6 respectively, shown in Table 2.

Conclusions
Prediction models for the water levels of the Salve Faccha dam were generated up to six days in advance using neural network models and ANFIS models. The neural network models required up to 13 days of delay and architectures of less than 30 nodes with satisfactory results. On the contrary, the ANFIS models were able to obtain similar results using up to four days of previous information. However, t + 1 and t + 2 are similar to naïve models because they do not have the necessary delay information.
Rainfall inputs were not fundamental to making predictions for both the NN and ANFIS models. This may be due to primary by the inadequate spatial distribution of the precipitation stations, the buffer effect of the large reservoir, soil properties, among other factors. For future studies, we recommend testing new models that incorporate inflow and precipitation data. We also recommend forecasting water levels by applying more sophisticated models such as extreme learning machines or genetic programming.
In both models, good results were obtained for the dry season, with slightly worse results in the forecasts for the rainy season, with RMSE > 0.13 for some models. This occurred because the monthly rainfall during this period has been the highest it has ever been since 2012, so there was no data in the training period for such climatic events.
Likewise, confidence intervals using the percentile-t method were generated to have forecasts with an uncertainty reduction that DL models may have with a maximum of 0.18 m with a confidence of 95%. There was a low amplitude that was mainly produced by the high prediction performance of the models with real observations of the water level of the dam. Thus, it can be concluded that ANFIS models are superior to neural network models

Conclusions
Prediction models for the water levels of the Salve Faccha dam were generated up to six days in advance using neural network models and ANFIS models. The neural network models required up to 13 days of delay and architectures of less than 30 nodes with satisfactory results. On the contrary, the ANFIS models were able to obtain similar results using up to four days of previous information. However, t + 1 and t + 2 are similar to naïve models because they do not have the necessary delay information.
Rainfall inputs were not fundamental to making predictions for both the NN and ANFIS models. This may be due to primary by the inadequate spatial distribution of the precipitation stations, the buffer effect of the large reservoir, soil properties, among other factors. For future studies, we recommend testing new models that incorporate inflow and precipitation data. We also recommend forecasting water levels by applying more sophisticated models such as extreme learning machines or genetic programming.
In both models, good results were obtained for the dry season, with slightly worse results in the forecasts for the rainy season, with RMSE > 0.13 for some models. This occurred because the monthly rainfall during this period has been the highest it has ever been since 2012, so there was no data in the training period for such climatic events.
Likewise, confidence intervals using the percentile-t method were generated to have forecasts with an uncertainty reduction that DL models may have with a maximum of 0.18 m with a confidence of 95%. There was a low amplitude that was mainly produced by the high prediction performance of the models with real observations of the water level of the dam. Thus, it can be concluded that ANFIS models are superior to neural network models because they require less prior information to conduct projections of the future.
Author Contributions: Conceptualization, L.C.P.; investigation, P.P.L.; methodology, P.P.L., X.Z.R. and L.C.P.; resources, X.Z.R.; data cleaning and modelling, P.P.L.; supervision, X.Z.R. and L.C.P.; writing-original draft, P.P.L.; review, and editing, X.Z.R. and L.C.P. All authors have read and agreed to the published version of the manuscript. Data Availability Statement: The data are not publicly available due to the data confidentiality of EPMAPS and FONAG.