Prediction and Evaluation of the Efficiency of MLP and ANFIS Artificial Neural Networks for Estimating Annual and Monthly Precipitation and Temperature in the Western Iran

Precipitation and temperature are among the basic climate variables affecting all areas, especially in agriculture and water resources management. Quantitative changes of these variables at any time scale and outside the estimated normal range can affect the two mentioned general areas in terms of water resource allocation planning. In this study, the effectiveness of Multilayer Perceptron Artificial Neural Network (MLP-ANN) with Levenberg-Marquardt training algorithm and Adaptive Neuro-Fuzzy Inference System (ANFIS) with Gaussian membership function were used in modeling and forecasting of annual and monthly precipitation and temperature in western Iran and in the geographical range of Kermanshah, Ilam, Lorestan, Kurdistan, and Hamadan provinces under different scenarios was studied. For this purpose,The precipitation and temperature data of 16 synoptic meteorological stations with statistical period of at least thirty years were used. After creating a database tailored to the project goals, the quality and accuracy of the statistical data of the stations, and the existence of outliers were evaluated. Findings were obtained based on statistical preference indices such as MSE, MAE, and NS (NashSutcliffe); and the projected outputs of the next 5 years were compared with the mean change of the data. The results indicated that Multilayer perceptron with different scenarios of the number of input layer neurons, hidden layer neurons, and the related neurons compared to ANFIS with its own scenarios consisting of the number of input layer neurons and clusters or membership functions, in spite of the inherent differences in precipitation and temperature variables and in terms of the studied time scale, is more capable of adapting to the data and providing estimation models; That is, more than 95% of the quadratic variables of all stations were modeled using a different range of criteria (NS = 0.2626 0.9884). However, in ANFIS method, about 63% of variables with statistical index range (NS = 0.3241 0.9841) were able to give a positive response to the modeling. In addition, the results of both methods showed that the preference index value for temperature parameters was more than the precipitation parameters and annual precipitation index was better than monthly precipitation index and the preference index value for monthly temperature was better than the annual temperature. The important point in evaluating the results of each method is that a mere cite to the values of the preference statistical index, especially for data with seasonal fluctuations, without considering the predicted data and comparing them with the general time series variations, may lead to serious errors in conclusions and disruption of a proper model presentation. 1. The General Sections 1.

complementary programs would immunize the society against the adverse effects of extreme and abnormal conditions. Access to conditions or facilities that could reliably predict how the variables of precipitation and temperature environmentally behave, is one of the issues that humans have been explored so far. Therefore, different prediction methods ranging from physical modeling to software simulation and statistical, mathematical, and regression equations as well as time series, have been tested. Despite the huge efforts that have been made so far and the modest degree of success achieved, some of the issues related to the long-term prediction could not be offered with certainty due to the complexities of meteorological conditions and momentary behavior of related elements. The use of the relationships or models of artificial neural network that could train the laws governing data with specific techniques and then could predict based on their behavioral pattern is considered one of the most recent and successful achievements compared to other methods. Thus, this study aims to select the most proper structure of each model in terms of statistical indices of preference and to compare the efficiency of these two models in the prediction of precipitation and temperature in the south part of the country while applying the multilayer perceptron artificial neural network model and ANFIS neuro-fuzzy model. That is, applying each one of the two above models with its own structure, architecture, and topology could fill the need for foreseeing precipitation and temperature in the western stations of Iran with more accuracy in terms of statistics and produced outputs.
2. The analysis of resources and introducing the studied region 2.1.1. Analyzing resources In relation to the artificial neural networks and ANFIS neuro-fuzzy networks, extensive researches have been conducted on the subject of climatic issues. Here, first, we refer to the relevant studies carried out abroad and then to the studies done at home related to the research topic in the order of the year of implementation. Zhang (1993) introduced the principles and procedures of the adaptive neuro-fuzzy inference system or ANFIS. Explaining the structure of this model, he maintained that using hybrid method in teaching, ANFIS can map inputoutput based on human knowledge and paired input-output data conditions. Tucker and Johnson (1999) predicted precipitation using neural network. The results of this study indicated that the rainfall-runoff model of artificial neural networks was more accurate than other statistical methods and less time was spent to fit the model. Ahmad and Simonick (2000) adopted the three-layer back-propagation neural networks and monthly rainfall data to predict monthly precipitation in Hungary and Ukraine. The results of this study suggested that the educational and experimental data perfectly match and are adapted well to the real data and this method has the highest ability in predicting rainfall. Bowdri and Syrmak (2000) used artificial neural networks for predicting the extreme rainfall amounts that led to flood events in the Marawi region in the eastern Czech Republic in the summer. They trained the network using back propagation and the monthly data of 38 years related to the two stations of the region, and predicted the precipitation of the following month and the next summer's rainfall. They found that artificial neural networks correctly predict the extreme rainfall amounts because there is a slight difference between real precipitation amounts and the predicted amounts. Mida et al. (2001) predicted the Japan precipitation and compared the results with the hourly predictions of the Japan Meteorology Agency. The results of this study indicated that artificial neural networks are invaluable tools for predicting rainfall and reducing the damages resulted from that. Trafalis et al. (2002) predicted the rainfall amount using artificial neural network with different architectures. They used radar rainfall data as the input data for the network and compared the results gained from fitting artificial neural networks with some other methods such as linear and polynomial regression and found that neural networks are more accurate compared to other methods. Ramirez et al. (2005) studied the application of artificial neural network in predicting rainfall for Sao Paulo. The results of this study highlighted that the predictions of this method are more accurate than other methods. Hang et al. (2008) used the artificial neural networks for predicting Bangkok rainfall. The results of this study indicated that the developed model of artificial neural networks is excellent for predicting the real time of precipitation and for the management of flooding in Bangkok. Banick et al. (2009) predicted the precipitation of Monsoon rainfall in Bangladesh using neural network and genetic algorithm method. The findings of this study supported that artificial intelligence models like neural network, ANFIS, and genetic algorithm were more successful in estimating the Monsoon rainfall compared to linear regression models. Vamsidhar et al. (2010) predicted the precipitation in India using back-propagation neural network model. Having devoted two third of the data to the training phase and the remaining one-third to the test phase and obtaining 99.97% accuracy for training and 94.28% accuracy for data test, they found that neural network model can be used to predict rainfall based on appropriate amount of performance indicators. Karen (2010) compared the spline multivariate regression methods and back-propagation artificial neural networks for predicting the precipitation and temperature of the Mantaro river channel. Wang and Xing (2010) predicted the rainfall in Zhengzhou, China using general regression of neural networks. The findings of this study suggested that the general regression of neural networks have less prediction error values compared to back-propagation artificial networks. Al-Shafi et al. (2011) used artificial neural networks for predicting the rainfall in Alexandria, Egypt. They compared artificial neural network model and multivariate regression model and found that the artificial neural network model is more suitable and accurate. Mostris et al. (2011) estimated the average, maximum, minimum, and cumulative amount of monthly precipitation for the next four months in 4 stations of Athens city using artificial neural network method. The results of this study reflected that on the basis of RMSE and R 2 preference indicators, the above method is more accurate than classic methods and this is manifested specifically in the average monthly rainfall and its cumulative amount. Kaur a Sing (2011) used multi-layer perceptron model (MLP) along with back-propagation (BP) training algorithm to predict the minimum temperature using supplementary information including pressure, temperature, velocity and direction of wind, humidity and precipitation in Chandigarh, India. They used the data of previous ten years to test the model and found that the minimum temperature could be precisely estimated by artificial neural networks. Richard and Rao (2012) examined the spatial and temporal changes and also predicted the rainfall in Indian Peninsula. Having analyzed the precipitation, they found that using neural network model is useful to predict the rainfall distribution in Peninsula territory by means of physical and meteorological parameters. Zhiong et al. (2012) predicted the monthly rainfall using neuro-fuzzy model. First, they chose 3 parameters out of 30 parameters using the error analysis of training and experimental data and then used them to predict the precipitation of the next five years. Nastos et al. (2013) developed a prediction model of the rainfall intensity in Athens using artificial neural networks. They predicted the rainfall intensity of the next four months using the sum of monthly rainfall over a period of 111 years (from 1899 to 2009) and the neural network model. The results gained through statistical indicators and at the significance level of 1%, indicated that the prediction by neural network model is more acceptable compare to observations of neighboring regions. Casey et al. (2013) estimated daily temperature and dewpoint temperature using neural network and neuro-fuzzy techniques with three methods including generalized regression neural network model (GRNNM), Kohonen selforganizing map, and ANFIS method. The results of this study indicated that the neural network methods as well as ANFIS have performed with equal and more accuracy compared to the Kohonen model in the estimations. Al-Salihi et al. (2013) predicted the monthly rainfall in the four cities of Mosul, Baghdad, Rutba, and Basrah using neural network method and back propagation algorithm during the years 1970 to 2000 as the model training period and used the statistics related to the years 2000 to 2010 to test the neural network model. They used the four statistical indicators of MBE, MAE, RMSE, and R for evaluating the model efficiency. The results of this study indicated that the neural network model is quite capable of predicting the monthly precipitation. Patel and Parch (2014) predicted the monthly Monsoon rainfall of Gandhinagar, India using the adaptive neurofuzzy inference system or ANFIS. They developed eight models with membership functions and different climatic parameters as input and used bell shaped function in both back propagation and hybrid methods. On the basis of statistical indicators, their findings suggested that the hybrid model with 7 membership functions and 3 inputs of temperature, relative humidity and wind speed produces the best results to predict the precipitation of this region. Ovan and Bi (2014) improved the ANFIS model for the long-term estimation of inflow to six Korean dams using monthly rainfall forecasts. They used monthly rainfall, relative humidity, temperature, dam inflow discharge and class monthly rainfall forecast. The findings of this study indicated that the ANFIS model has corrected the significance of the results using class data of rainfall prediction. Shuba and Shubha (2014) evaluated the data analysis techniques in the prediction of rainfall in India. Using machine learning algorithms and empirical methods like RBF, MLP, GRNN, and ARIMA, they also found that it is difficult and also impractical to identify a suitable algorithm for predicting precipitation, although combining some of the algorithms has had a better influence on the results. Edacheri and Mohandes (2014) modeled the rainfall-runoff using ANN AND ANFIS models in the Vamanapuram river channel, India. The findings of this study indicated that the neural network model based on RMS and R2 statistical criteria is more effective than the ANFIS model in hydrological modeling. Rouygar and Golian (2015) predicted the precipitation dam basin in Golestan city, Iran using climatic signals and through the artificial neural network. The results of this study suggested that the neural network method has an acceptable preference in predicting maximum daily rainfall on a monthly basis using elements such as sea surface temperature and sea surface pressure. Mishra et al. (2015) statistically analyzed precipitation at various time periods with different return periods in the Mumbai region, India. They performed the results gained from gamble method with a precision of MAE = 0.4 using maximum daily precipitation in the year with different return periods in the timespan of 1994 to 2013 and using neural network model with the topology of 1-2-4. Sojitra et al. (2015) predicted the precipitation of Udaipur, India using the ANFIS neuro-fuzzy network. They applied two 35-year time series from the wet temperature, average temperature, relative humidity, and evaporation of the previous day and the moving average of the previous week with Gaussian membership function and bellshaped function. Statistical and hydrological preference indicators have supported the Gaussian model and the sensitivity analysis introduced wet temperature as more sensitive than other parameters. Kiada and Pravendra (2015) predicted the daily Monsoon precipitation of Junagadh a city in the western Indian state of Gujarat. They predicted the precipitation of the months June to October using data from the years 1979 to 2011. On the basis of statistical indicators of NMSE, MSE, CC, and AIC, their findings indicated that the Gaussian model has more accuracy than other models. Dubey (2015) used neural network model with three training algorithms including back propagation feedback algorithm, back propagation multi-layer algorithm, and feedback algorithm with distributed latency as well as five meteorological parameters including minimum temperature, maximum temperature, water vapor pressure, potential evapotranspiration and crop evapotranspiration to predict precipitation in Pondicherry which is a coastal area in India. The results of this study suggested that during the period of 1901 to 2000, the feedback algorithm with distributed latency is the most proper algorithm with the index value of MSE = 0.83. Mechanic et al. (2016) predicted the seasonal precipitation using ANFIS adaptive neuro-fuzzy inference system and also by means of climatic large-scale signals in the south eastern Australia. They used the climatic indicators like ENSO, IDO, IPO, and statistical indicators such as RMSE, MAE, and R 2 to judge the final model. Their findings indicated that based on the statistical indicators, ANFIS and IDO indicators have more preference compared to ENSO and the results suggest that the neuro-fuzzy model is more capable of the seasonal prediction of precipitation compared to ANN neural networks. Euna et al. (2016) predicted precipitation using the statistics of 30 years related to 23 meteorological stations in Nigeria assisted by artificial neural network. They used the first 25 years of the timespan for training network and the remaining 5 years for model validation. The results of this study indicated that the network is not capable of predicting the amount of extreme precipitation in the months of August and September and the estimated values of the model as well as real values are poorly fitted between the months of June and October. They mentioned that the reason for this condition is the high cloudiness in this region. Watriol and Elangon (2017) used a combination of artificial neural network model (ANN), ANFIS model, and the continuous wavelet transform based on the fast Fourier transform (CWTFT) to study the monthly fluctuation of the groundwater level downstream of the Bhavani river basin in India. They found that the combination of CWTFT and ANN models has a higher preference compared to the model combining CWTFT and ANFIS in the prediction of groundwater level. Arabyat (2018) made the long-term prediction of meteorological elements using the ANFIS model and geographical information system techniques in Jordan. He predicted the variables of minimum and maximum temperature and precipitation for the next ten years using 30-year time series (from 1985 to 2015). He found that hybrid neuro-fuzzy model is suitable for estimating rainfall. Hayati and Mohebbi (2007) predicted the following day's temperature using multi-layer perceptron (MLP) neural network and the data related to the Kermanshah station in western Iran during years 1996 to 2006. They, first, separated seasons and then applied the perceptron model for each season and found that applying this model had less error for prediction. Shakibayi and Kouchekzadeh (2009) modeled and predicted energy consumption in the Iran Agriculture Sector during the years 2008 to 2011. They compared the results using time series models of ARIMA and artificial neural network and found that the artificial neural network is more capable of predicting precipitation compared to ARIMA model. Dastourani et al. (2010) used an artificial neural network and ANFIS model with three-year moving average entries such as maximum temperature, average temperature, relative humidity, average wind speed, and evaporation to predict the precipitation of Yazd city in Iran. The results of this study indicated that back current neural network and ANFIS model despite having differences, have the same capabilities and could estimate the precipitation of the next 12 months. Afzali et al. (2011) predicted the temperature of Kerman city in Iran using the three variables of minimum input, maximum input, and average temperature during the years 1961 to 2004 with the help of feedforward neural network and Eleman network. The values of statistical indicators suggested that despite encouraging results of neural network in predicting the air temperature, Eleman network has more accuracy.
Azadi and Sepaskhah (2012) predicted the annual precipitation in the western, south western, and southern provinces of Iran using artificial neural networks. They used the two models of back propagation feedforward and multiple regression. The findings of their study revealed that the neural networks did not significantly improve accuracy in predicting precipitation in the studied region compared with multiple regression, however, it would be better to adopt neural network with the structure and architecture of 2-6-6-10-1, Levenberg-Marquardt learning algorithm, and logistic sigmoid activation function. Rezaiyanzadeh et al. (2012) estimated the hourly temperature of three stations in the arid and semi-arid regions of the Fars Province, Iran using the two models of multi-layer perceptron neural network and radial basis function (RBS). The input data included maximum and minimum daily temperature and the previous day. The results of this study indicated that multi-layer perceptron method has more accuracy in estimating hourly temperature based on the RMSE index. Valipour et al. (2013) estimated inflow for the Dez dam in Khouzestan, Iran during years 1960 to 2007 using ARMA and ARIMA models and compared their results with artificial neural network. They used 42 years for training model and the remaining 5 years for prediction. Inflow to the dam reservoir in the last 12 months showed that the ARIMA model based on the statistical indicators of MBE and RMSE performed better than the ARMA model and has less errors. Also, preferring to the ARIMA model, the neural network model with 17 neurons in the hidden layer was able to predict the inflow to the dam for 60 months. Emamgolizadeh et al. (2014) studied the fluctuations of groundwater level in the Bastan Desert in Semnan, Iran using nine-year statistics related to the parameters of rainfall, irrigation return flow, and water pumping rate as the input and using artificial neural network methods and ANFIS. The findings of this study indicated that based on the RMSE and R 2 indicators, both methods have the potential capability but the ANFIS method has higher preference and accuracy based on the above indicators. Niksaz and Latif (2014) evaluated precipitation events in north-eastern Iran and in the Mashhad, station using ANFIS model during the years 2007 to 2012 with four inputs of temperature, relative humidity, cloudiness, and dewpoint temperature. The results of this study revealed the ANFIS model was capable of predicting precipitation with high confidence. In their study, Alipour et al. (2014) compared the three methods of neural network, ANFIS model, and time series to predict groundwater level in the northern Mahyar Desert in Isfahan, Iran. The findings of this study indicated that the ANFIS model enjoys higher accuracy compared to other methods. Fallahgalheri and Shakeri (2015) predicted the precipitation of winter during years 1970 -1997 in the Razavi Khorasan Province, Iran for a ten-year period (from 1998 to 2007) using ANFIS adaptive neuro-fuzzy inference system. The results of this study demonstrated that ANFIS model is capable of estimating precipitation with acceptable precision. Jalalkamali et al. (2015) compared the applications of the neural network and ARIMA models in predicting drought in Yazd city during years 1961 to 2012 using standardized precipitation index (SPI) for three, six, nine, twelve, eighteen, and twenty-four months period. Their findings indicated that only in the nine-month period, the ARIMA model has a more accurate prediction of drought than MLP, SVM, and ANFIS models. Masgari et al. (2015) modeled and predicted precipitation in north eastern Iran in Zab drainage basin in the Western Azerbayjan Province and in the Piranshahr station using multi-layer perceptron neural network. They predicted precipitation using parameters such as minimum and maximum monthly relative humidity, minimum temperature and in a twenty-seven period from 1986 to 2013 and after evaluating results using statistical criteria, found the model to be proper and acceptable. Tabari et al. (2015) made the short-term one-day prediction of soil temperature in the depth of 5, 10, 20, 30, and 50 cm using neural network model. They used the data related to the prior soil and air temperature from two stations in the humid and arid regions of Iran during the years 2004 to 2005. The results of their study suggested that the prediction made was acceptable based on the Nash-Sutcliffe efficiency index value of greater than 0.94 and the correlation coefficient of greater than 0.96 and the neural network model is suitable in this respect. Shakib et al. (2016) predicted run-off caused by precipitation in the Chehel Chay drainage basin in Iran using the ANFIS model. Based on the precipitation data of the same day and one or two days ago, the results of their study suggested that the triangular membership function with the rainfall of two days ago is the best combination in predicting run-off.

Studied region
This project is geographically located in the western part of Iran and in Kermanshah, Ilam, Lorestan, Kurdistan, and Hamadan and using the precipitation data of 16 meteorological stations in accordance with Figure 1, the methodological steps were followed.

Data and methodology 3.1. Data
Based on previous knowledge about the meteorological stations of the western part of the country, this project generally uses mean annual and monthly temperature as well as the sum of annual and monthly precipitation of 16 main and complementary synoptic meteorological stations that were in good quality in terms of survey quality to perform methodological calculations. The specifications of the mentioned stations are presented in Table 1.

Methodology
Methodology is composed of three processes including the preparation and analysis of data quality, multi-layer perceptron artificial neural network, and adaptive neuro-fuzzy inference system or ANFIS model that are discussed below.

Data preparing
To this end and after providing the precipitation and temperature data of the studied meteorological stations, a particular file consisting of 4 worksheets of monthly and annual temperature and precipitation was created in the Excel software environment for each station. Then, the data were examined in terms of accuracy, precision, and the presence of outliers and the data normalization was also carried out. In fact, data removal and choosing proper time series for each station to enter the subsequent computational steps were conducted.

The overview of artificial neural networks
Generally speaking, artificial neural networks with all of its components and processes of performing its computations, is considered to be a kind of the simulation of human brain activities on different subjects especially learning, classification, and patterns identification. In fact, artificial neural network, firstly, attempts to mathematically discover internal relationships between data by identifying the ability of learning and training and then learn its principles. Secondly, it tries to predict the data behavior by training its elements on the basis of certain criteria. In the artificial neural network, neurons are the constituent modules and the main processors of operations. The main elements of artificial neural network include input data, neurons, and layers carrying neurons, weights and biases (that have constant value), activation and output functions. Artificial neural network includes two layers called intermediate or hidden layers where the input data are processed after bearing weight, and output layers that form the output after the operation of transmitter or activator function. Figure 2. Displays a simple artificial neuron with input vectors, a hidden layer, and output layer.

Artificial neural networks -multi-layer perceptron (MLP)
After linear networks, uni-layer perceptron is the simplest neural network type that is capable of the linear separation of data or so called 'linear mapping'. In fact, perceptron is the simplest activator function in the neural network that is capable of converting a sample to 0 or 1 output that could be separated with one line. However, since all of the problems are not linear and cannot be solved using linear mapping, multi-layer perceptron was proposed by adding one or more hidden layers which is one of the most widely used and prevalent feedforward models in predicting and solving non-linear problems through which more complex patterns could be learned. The training of these networks is carried out using back propagation algorithm. This algorithm consists of two main paths: a) forward direction or feedforward where the input vector is given to the perceptron network and considering it effects, it is transmitted by the hidden layer to the output; b) backward direction or feedback where the error value is returned to the previous layers using slope reduction method and with the purpose of adjusting network weights after calculating target function and identifying the level of output error. This process continues until the error reaches an acceptable limit and in fact, the training and learning step of the network comes to an end. If the network encounters a new input which it had not seen before, it will be able to map or create peer-topeer output. The number of these repetitions is called 'epoch' and the method of distributing errors on the weights is called delta load delta. Learning rate is a parameter that controls algorithm rate and is calculated according to these formulae: ƞ = x = input vectors of data, N = the total number of data, n = the number of the members of each vector 3.2.4. Neural network architecture The arrangement of structure or identifying topology of neural network is based on 2 elements of hidden layer and neurons. Therefore, the aim of neural network architecture is forming a structure with a number of hidden layers and neurons that has optimal target function and less output errors. If the number of hidden layers and neurons increases, the network performance will increase in the training period, however, it will lead to reduced performance in the testing step. This is because extreme learning of data behavior related to training brings about overfitting and the network will lose its ability to adjust and find new relationships compared with new data in the testing step. Thus, it is essential to choose the optimal number of hidden layers and neurons based on trial and error and while comparing the results, to make the best choice.

The design of neural network structure
In this project, we used perceptron neural network with one input layer related to precipitation and temperature data of the previous times, one hidden layer with different number of neurons, and one output layer that predicts precipitation and temperature values. To this end, three main scenario were considered for the number of hidden layers and their neurons in a way that primarily, based on autocorrelation results of precipitation and temperature data separately and for the estimation of the rainfall and temperature of the stations, three kinds of time steps, namely 3, 5, and 7-time steps, were used to predict the data of the fourth, sixth, and eighth month respectively until the end of time series. To compare the calculation results of perceptron neural network, three scenarios for structure design were defined as follows: First scenario: the vector of input data consisting of 3 neurons, 1 hidden layer with 10 neurons. Second scenario: the vector of input data consisting of 5 neurons, 1 hidden layer with 15 neurons. Third scenario: the vector of input data consisting of 7 neurons, 1 hidden layer with 20 neurons. where totally 9 computational scenarios were developed. In all of these scenarios, the back-propagation learning principle with Levenberg-Marquardt algorithm, sigmoid activation function in the hidden layer, and the linear function in the output layer were used. In fact, the aim of defining these scenarios is to detect the number of optimal data used in the prediction and also the appropriate number of hidden layer neurons. Their results have been presented in the results section separated by the variables of precipitation and temperature and also the stations.

Preference indices
After developing the neural network model and its structure, the results gained from implementing neural network should be evaluated with some criteria so that different situations or scenarios will be compared and the most optimal situations will be selected. To this effect, indices such as mean square error (MSE), mean absolute error (MAE), and Nash-Sutcliffe (NS) were used but for the final selection of the model, the Nash-Sutcliffe index was used as a basis. In these relations, y i and y i obs are observational values, ӯ and y i mean are the mean observational values, ŷi and y i sim are the prediction values, and N is the total number data in each step of the training and testing exams. The more MSE and MAE are closer to 0 and NS to 1, the more accurate the results and the closer together the observed and predicted values.

Adaptive neuro-fuzzy inference system (ANFIS model)
Adaptive neuro-fuzzy inference system is used to refer to a mixture of neural network as a system that is trained and determines the data belonging to the sets on the basis of membership functions. This model was developed by Roger Zhang in 1993 which is a combination of artificial neural network, fuzzy inference system, and a hybrid algorithm consisting of minimum squares method for estimating linear parameter and back propagation method for estimating non-linear parameter. In the ANFIS model, like the fuzzy inference system, three methods of network separation, differential clustering, and fuzzy clustering are used for partitioning or separating the input space (clustering) and consists of two parts: introduction and consequent. In this study, the methodological steps were followed using the Sogno ANFIS model and also using MATLAB software.

ANFIS model architecture
The five steps of the computational process that is also known as ANFIS conventional architecture is similar to fuzzy inference system and includes 5 layers according to Figure 3 and is as follows: 1 input layer, 3 hidden layer that explains membership functions and fuzzy principles, and 1 output layer. It must be noted that ANFIS used Sogno fuzzy inference model for learning algorithm. In ANFIS, the linear combination of input variables as well as a constant expression, constitutes the output of each principle. The average output weight of each principle involves the final output. In the fuzzyzation stage, all variables are linked to the membership function to convert the subsets from numerical to qualitative or linguistic terms such as small, large, poor, and excellent and so forth. The first layer: (input nodes ) : in this layer (fuzzy layer), the membership degree of input nodes is specified using membership function. O 1 Ai= µ Ai (x) i=1,2 O 1 Bi= µ Bi (y) i=3,4 μA and μB = membership functions (bell-shaped, Gaussian, triangular, trapezoidal) x = input value the x input is converted to A1 and A2 and the y input is converted to B1 and B2 respectively where A1, A2, B1, and B2 are linguistic terms used for identifying membership functions. In fact, input numerical variables are converted to qualitative and linguistic variables. It is necessary to identify the type and number of membership functions and to achieve this, three methods of network separation, differential clustering, and fuzzy clustering (c-means) are used. The parameters of each node determine the shape of the membership function of the fuzzy set of that node. Fuzzy set membership function is typically of the type of bell-shaped function and is as follows: µAi= ^ x = the input value to the node and the set of S1 = {ai, bi, ci} is called the adaptive or initial parameters. Second layer: each node in this layer is specified with the symbol II and represents the power of value assignment to the membership functions and is calculated by the AND fuzzy relations. In other words, each node in this layer calculates the activity degree of a principle or membership degree and its output is as follows: O i 2 =W i = µ Ai (x) * µ Bi (y) i=1,2 µ Ai (x) = the membership degree of x in the A i set W i = the weight functions of the next layer µ Bi (y) = the membership degree of y in the B i set Third layer: middle nodes that are specified with N symbol, are also called normalization layer and are used for normalizing W i weight as follows. In this layer, it normalizes the activity degree ratio of i th law to the sum of the activity degree of the whole laws.
Wi = the normalized activity degree of i th law Fourth law: (result nodes), the output of each node in this layer is calculated by this relation and indicates the effect of the involvement of principles in the final output. In this layer also known as non-fuzzy layer, output principles are calculated. O i 4 = W i .f i = W(p i x 1 + q i x 2 + r i ) r i , q i , p i = the linear parameters of the result or consequent section Fifth layer: (output nodes), in this layer, each layer has an output as follows that is considered to be the sum of all of the inputs of the fourth layer (Chang, 1990) O i 5 = ∑ In the ANFIS model, simulation procedure is well performed when the sum of initial or adaptive parameters (S1) and the sum of the parameters of result or consequent section (S2) are estimated in such a way that the value of model error function in the training and testing step would be reduced to a minimum. In this method as well, after the initial data preparing and assigning 30 and 70 percent of them to the training and testing steps, the data enter the computational cycle with the scenarios of 3, 4, and 5 clusters and 3, 5, and 7 time steps were predicted for each of the scenarios (totally, 9 computational scenarios).

Results
According to the definition of separated 9 computational scenarios for MLP and ANFIS models, the selected model was chosen as the best option among scenarios based on preference indices and comparing predicted output with average changes of time series. In the following and as an example, the graphical results of annual and monthly precipitation and temperature of Kermanshah stations using the both methods are presented and the details of the results of the selected model of all stations are presented in Table 2.

Kermanshah station (annual and monthly precipitation -annual and monthly temperature)
The statistical period of precipitation in this station is 66 years and in the case of monthly statistics, the data of different months are sequentially used in a single column and contains 804 data. As was discussed earlier, these data became input data matrix considering the prediction time steps of 3, 5, and 7. For example, for the threemonth time step, a matrix with the dimensions of [801*4] was set as input and a matrix with the dimensions of [801*1] was set as target and output and were used in MATLAB programming software. After the implementation of program codes for nearly one hundred times, the results related to annual rainfall with different scenarios reflected that the multi-layer perceptron model, although not desirable, is regarded as the best model for annual precipitation of Kermanshah with 6-1-20-1 structure (1 output, 1 hidden layer with 20 neurons, and 6 input neurons) based on the preference indices, especially the Nash-Sutcliffe index that has been used as base in this study. The values of indices in the training and testing situation are presented in Table 2. The actual output charts as well as model output in the testing step are randomly presented in Figure 4. Based on 30 percent of data, and the prediction status of the next five years is also shown in Figure 5. Temperature data have more internal relevance and correlation compared to precipitation data because of their consistency over time and also because of their nature. Therefore, the results suggest that the multi-layer perceptron model has been able to accurately model the monthly temperature data. Kermanshah station includes 57 years of annual average temperature statistics that we discuss the results of the processes of implementing its modeling as follows. Among the mentioned scenarios and on the basis of the value of Nash-Sutcliffe statistical index and after implementing program codes for about one hundred times, the structure of the selected model with the architecture of 4-1-10-1, was considered to be the most proper topology. The vector of monthly data of Kermanshah station is composed of a column with 684 rows in which 70% of it is randomly assigned to training step and the remaining 30% is also assigned to the testing step. Among the abovementioned scenarios and based on statistical indices, the 4-1-10-1 structure is more suitable than others and was chosen for implementation and prediction steps. The results of the testing and prediction steps for the next 60 years has been presented in Figures 10 and 11, respectively.

The results of adaptive neuro-fuzzy inference system (ANFIS)
As discussed before, this model is a combination of neural network and fuzzy system that has its own structure and computational parameters. In the following, we refer to the results obtained from the sample Kermanshah station under different scenarios including the number of fuzzy principles, clusters, and inputs or time steps.

Kermanshah station (annual and monthly precipitation -annual and monthly temperature)
After the initial data preparing and assigning 70% and 30% of them to the training and testing steps, relevant calculations were predicted with the scenarios of 3, 4, and 5 clusters and 3, 5, and 7 time steps for each cluster. The selected model was specified based on statistical indices in Table 2 and the model structure in five layers is also according to Figure 12. and with the combination of 3-4 (time steps -the number of clusters) and includes 3 membership functions equaling to the number of clusters and fuzzy principles according to Figures 13 and 14. The comparison of the output of testing step and the prediction of the annual precipitation of the next 5 years is also reflected in Figures 15 and 16. Monthly precipitation data with 804 values that are more suitable compared to annual data in terms of statistical length, did not produce encouraging results in terms of statistical indices and of matching forecast data with seasonal data changes after initial data preparing and despite running the program for more than one hundred times. This shows that the correlation of input data is more weighted than the length of statistical period in obtaining beneficial results. The annual temperature data with 57 values has a structure consisting of 5 clusters equaling to membership functions and 8 delayed time steps (5 -8) according to Figure 17 after running program and based on above-mentioned statistical criteria the results of which are presented in Table 2 and also based on forecast data compatibility. An example of a membership function has also been reflected in Figure 18. The model outputs compared with actual data values in the testing step are displayed in Figure 19, and the prediction of the annual temperature of the next 5 years is also presented in Figure 20. The data composed of 684 numbers related to monthly temperature was calculated using the ANFIS model and different scenarios. Despite the high value of preference statistical indices that are presented in Table 2, the results of model output in predicting the next 60 months were moderately evaluated compared to its changes in the statistical period. Figure 21 shows the architectural structure of the chosen model with 4 time steps and 4 clusters (4 -4).  The obtained results have been presented in Table 2 as separated by multi-layer perceptron methods and ANFIS model for all of the used stations.  Table 3 as separated by the four meteorological parameters similar to the above table. As is seen, the conditions of temperature parameters are far better than precipitation parameters in terms of statistical indices.

Discussion and conclusion
Precipitation and temperature are the two key variables in climatic and hydrological topics. Otherwise stated, these elements have more weight compared to other effective independent variables and some of the meteorological elements, affected by them, are also considered to be their subcategory and play a major role because of their close solidarity. Temperature and precipitation play a primary role in the climatic classification of regions, the analysis of drought and moisture, agriculture (farming and gardening), floods, aquatic structures, drainage, architecture, and environment. Precipitation has uncertainties due to the mechanism of its formation and dissociation in its occurrence in relation to temperature that has aroused general concern over its tough situations and led to preventive measures. Meanwhile, the methods of estimating the values of precipitation and temperature have been variously discussed and evaluated and are being refined and developed. Using the method of neural and neuro-fuzzy networks has marked preference due to the computational structure based on training and learning. In this study, the multi-layer perceptron neural network and adaptive neuro-fuzzy inference system also known as ANFIS were employed to estimate and compare the level of efficiency of these two methods in predicting annual and monthly precipitation and temperature of the synoptic meteorological stations in western Iran. The summary of obtained results is discussed as following for each station as separated by the four meteorological parameters. In Kermanshah station, the multi-layer perceptron method could model each of the four meteorological parameters and lead to the results. Precipitation parameters have different architecture and their statistical preference index is evaluated as moderate, but temperature parameters have the same structure and in the general the statistical indices of temperature are much better than precipitation and annual precipitation variable is better than monthly precipitation variable but monthly temperature parameters have a higher index than annual temperature parameter.
In Khorramabad station, the data following the mentioned pattern, annual precipitation by MLP method, and annual and monthly precipitation in the ANFIS model, did not yield favorable results and lack a model suitable for any kind of architecture. The cause of this problem is probably due to the role of precipitation systems in the area and the mechanism of its occurrence that needs to be investigated. In Ilam station, each of the temperature and precipitation parameters is modelled using multi-layer perceptron method. However, in the ANFIS model, they lack a desirable model with respect to statistical indices and also the degree of compliance of predicted data with the trend of data changes. Also, monthly precipitation and temperature have also the same architectural structure. In Sanandaj station, the four parameters have been modeled with different structures using MLP method and there are also the features of the mentioned pattern. Nevertheless, in ANFIS model, monthly precipitation and annual temperature lack proper model that needs further analysis for identifying reasons. Hamadan station, located almost east of the Zagros Mountains and is different from other stations in province centers in terms of precipitation level, its precipitation and temperature parameters were modeled with the different structure using MLP method. However, using ANFIS model, annual and monthly precipitation that can be modeled based on the two criteria of the statistical index and the compliance of predicted data, was not identified. It should be noted that annual precipitation and temperature are similar in the perceptron method. In other stations of province centers, Kangavar station in Kermanshah province produced results in each of the four meteorological parameters using multi-layer perceptron method, but in the ANFIS model, monthly precipitation did not reach an acceptable limit. In Sahneh and Harsin stations that only have precipitation data, a proper model was not offered for annual precipitation data using MLP method, and in Sonqor station that also includes precipitation data, modelling provided results and follows the afore-mentioned pattern. But in ANFIS model, Sahneh, Harsin, and Sonqor were found to lack proper and acceptable model. In Ravansar station, MLP model delivered results for each of the four parameters, with monthly precipitation and annual temperature having the same architectural structure. In ANFIS model, modeling was carried out with an acceptable statistical index and its annual precipitation and monthly temperature have a structural pattern (the number of clusters, membership functions, and input neurons) with 4-3 shape. In Islamabad-e-Gharb station, modelling using both methods and for each one of the four parameters had good results. In Sarpol Zahab station, modelling using MLP method in a way that annual precipitation and monthly temperature have a specific structure and monthly precipitation and annual temperature also follow the same structure. In ANFIS model, the results have different structures and monthly precipitation also lacks desirable model. In Ilam province and Dehloran stations, modeling by multi-layer perceptron method produced positive results but with different structure. However, in the ANFIS model, annual and monthly precipitation lacks a proper model. In Lorestan province and Aligodarz station, precipitation and temperature parameters using MLP method provided satisfactory and acceptable results, with precipitation parameters having the same structure and temperature parameters also having the same architectural structure. Yet in the ANFIS model, monthly precipitation did not have favourable results and annual precipitation and temperature have the same structure. In Saghez station in Kurdistan province, modelling by MLP method provided good results but monthly precipitation was found to lack a desirable model by ANFIS method. In addition, annual and monthly temperatures are also similar in structure. In Kabodarahang station of Hamadan province, the modelling of each four meteorological parameters was conducted using multi-layer perceptron method and annual and monthly temperature also have a similar structure. In the ANFIS model, monthly precipitation lacks proper model and other parameters have also been modelled with a different structure. The results gained from more than 36000 calculation repetitions to find suitable outputs of the multi-layer and ANFIS methods, revealed that more than 95% of situations related to precipitation parameters and annual and monthly temperature by perceptron method has led to modelling and the range of their Nash-Sutcliffe statistical index varies between 0.2645 related to the monthly precipitation of Kabodarahang station to 0.9884 related to the monthly precipitation of Dehloran station. The lowest value of the above index between temperature and precipitation is related to precipitation and monthly precipitation represents the least amount of values in this respect and covers a range between 0.2645 and 0.5768. In other words, the selected models of this parameter enjoy the lowest compliance of predicted data with the trend of mean data changes. This may be due to the inadequate correlation of data, the temporal inconsistency of precipitation values in general and the seasonal precipitation regime affected by different rainfall systems requiring further research. The range of statistical index changes for annual precipitation varies from 0.4111 related to Kabodarahang station to 0.9269 related to Aligodarz station. Reduced seasonal effects are one of the main reasons for the increase in this index. Regarding annual temperature parameter, there is weaker situation compared to annual precipitation in terms of the statistical index and the compliance of predicted with Nash-Sutcliffe index changes for the annual temperature of stations ranging from 0.5455 in Sanadaj station to 0.8685 in Khorramabad station. However, the monthly temperature has a better situation compared to other parameters due to temporal consistency and the larger number of its data and despite having seasonal regime. This is because the index of all stations is higher than 0.95 and its changes lie within a range of between 0.9650 related to Saghez station in Kurdistan province and 0.9884 related to Dehloran station in Ilam province. Also, the consistency of predicted data with the overall trend of mean data variations is considered acceptable despite contradictions. Among all of the calculations made related to the parameters, only the results gained from the annual precipitation of three stations of Khorramabad, Sahneh, and Harsin in Kermanshah province did not lead to modelling. It is appropriate to conduct further research to clarify reasons and test more different conditions. The results of adopting the ANFIS model with defined scenarios created different conditions that will be treated in detail in the following. Generally speaking, the modelling of annual and monthly precipitation in this method resulted in failures in a way that in only two stations of Ravansar and Islamabad-e-Gharb in Kermanshah province, both of their mentioned parameters could lead to modelling (albeit with poor statistical index). Notwithstanding, in other studied station, at least one of the above two parameters was found to lack a proper model. The annual and monthly precipitation of Khorramabad, Hamadan, Sahneh, Sonqor, and Harsin stations have been totally subject to inadequate modelling output and the monthly precipitation parameter of other stations (apart from Islamabad-e-Gharb and Ravansar) with the mentioned scenarios did not lead to a suitable model. The changes in Nash-Sutcliffe statistical index of the precipitation of remaining 11 stations, ranged from 0.3261 related to Ravansar station to 0.87 related to Kabodarahang station and the predicted data were difficult to match. Regarding temperature parameter, Sahneh, Sonqor, and Harsin stations totally lacked temperature data and out of the remaining 13 stations, the annual temperature of Sanandaj station lacked a proper model. Therefore, the changes of annual temperature statistical index ranges from 0.4501 in Saghez station to 0.8535 in Khorramabad station. Monthly temperature has better situation in terms of statistical index and its value ranges from 0.9578 in Saghez station to 0.9841 in Kabodarahang station. It should be noted, however, that high statistical index in each method and when performing each scenario, is not regarded as output model and a good estimator because during estimations, there were several scenarios in both multi-layer perceptron and ANFIS methods that had little success in modelling, forecasting, and prediction and were sidelined despite a very good statistical index. Thus, relying solely on statistical index and choosing selected or final model, could lead to serious error in research results. References: