Monthly Precipitation Forecasts Using Wavelet Neural Networks Models in a Semiarid Environment

: Accurate forecast of hydrological data such as precipitation is critical in order to provide useful information for water resources management, playing a key role in di ﬀ erent sectors. Traditional forecasting methods present many limitations due to the high-stochastic property of precipitation and its strong variability in time and space: not identifying non-linear dynamics or not solving the instability of local weather situations. In this work, several alternative models based on the combination of wavelet analysis (multiscalar decomposition) with artiﬁcial neural networks have been developed and evaluated at sixteen locations in Southern Spain (semiarid region of Andalusia), representative of di ﬀ erent climatic and geographical conditions. Based on the capability of wavelets to describe non-linear signals, ten wavelet neural network models (WNN) have been applied to predict monthly precipitation by using short-term thermo-pluviometric time series. Overall, the forecasting results show di ﬀ erences between the ten models, although an e ﬀ ective performance (i.e., correlation coe ﬃ cients ranged from 0.76 to 0.90 and Root Mean Square Error values ranged from 6.79 to 29.82 mm) was obtained at each of the locations assessed. The most appropriate input variables to obtain the best forecasts are analyzed, according to the geo-climatic characteristics of the sixteen sites studied.


Introduction
Precipitation, besides being one of the most important variables in hydrological models (infiltration, soil loss, droughts, overland flow production, floods, etc.), is crucial in sectors such as agriculture, tourism or even in the energy sector [1], where the absence of water can lead to the closure of nuclear plants, such as the recent case in July 2019 in France. Therefore, the improvement of precipitation predictions is one of the greatest current challenges of the scientific community. Likewise, accurate precipitation forecasting is a very difficult and relevant mechanism of the hydrologic cycle due to its high spatial-temporal variability. Because of the large number of interconnected variables that are involved in the physical modelling of precipitation, forecasting rainfall is exceptionally complicated [2]. Due to the nonlinear and dynamic characteristics of precipitation, methods like numerical weather prediction (NWP) models or even statistical models still have difficulties to provide satisfactory precipitation forecasts [3]. This is mainly due to the fact that they are subject to many uncertainties [4][5][6][7][8][9] such as not solving the local weather situations or not identifying non-linear dynamics in time-series, among others [10][11][12].
In this sense, the mathematical models called Artificial Neural Networks (ANN), which are inspired by how the human nervous system works, have many strengths. One of them, which is highly important, is their ability to learn from experience. ANN models are based on a set of processing elements called neurons and they can accumulate a large amount of behaviors, allowing users to forecast previously nonexistent patterns. Another advantage is that neurons in ANNs work in a parallel processing mechanism, being able to process-as singular or multi-layered information-big data efficiently. Lastly, they can extract complex nonlinear relationships between variables, which can be very useful for precipitation modeling. The concept of artificial neurons was introduced by the authors in [13] but the ANN applications have increased since the back-propagation learning method was developed [14]. Since then, the use of ANN in the field of research has turned into a multitude of satisfactory solutions to problems that are not easily solved with traditional techniques, especially when the quality is doubtful and the quantity is scarce [15]. One of the most used ANN architectures is the so-called feed-forward multilayer perceptron (FFMLP), where all the information propagates in one direction toward the output layer with no feedback. This architecture is explained in detail in Section 2.2. In addition, their use is very advantageous, of great versatility and easy handling because these models do not need to formulate the mathematical description of the complex mechanisms involved in the process.
In hydrological modeling, the Artificial Neural Network techniques were applied for the first time by [16]. Since then, numerous works successfully address improvements in models of rainfall-runoff [17][18][19], stream-flow [20][21][22], water quality [15,23,24], ground water [25,26] and even for data validation as a quality assurance procedure [27,28]. In 2000, the American Society of Civil Engineering published two technical works related to Hydrology and ANNs [29,30] whose results have been discussed in depth and compared to other modelling techniques. Recently, a work summarizing a review of neural networks techniques applied to hydrological systems has been reported [31].
In relation to works that exclusively deal with the forecast of precipitation time series using ANN, several studies can be found in the scientific literature. An ANN model for precipitation forecasting in Thailand was developed by [32] using various meteorological parameters measured at surrounding stations. In some regions of Greece, researchers [33] obtained precipitation predictions using ANNs and 115-years datasets. Others works such as [34] and [35], used various climate indices (North Atlantic Oscillation -NAO-, Southern Oscillation -SOI-, etc.) as input variables in Korea and Australia, respectively. In China, several works based on ANNs have been developed using long-term historical datasets [3,36,37]. Moreover, similar models have been applied in different Indian regions [38][39][40][41]. Some of the main problems of this kind of models are the non-availability of historical records at many locations, the non-existence of neighboring stations and the impossibility of arranging the previously mentioned climate indices (NAO, SOI, etc.) in near-real time in order to forecast one-step ahead.

Wavelet Multiscale Analysis
The multiscalar characterization of precipitation has been studied for several years in different regions of the world using various approaches and for different purposes [42][43][44][45][46][47]. Especially in the current context of climate variability and change, all the techniques that are capable of deepening the stochastic behavior of precipitation time series are of great interest for use in many applications [48]. One of the most effective is the wavelet analysis [49], because it can provide an exact location of any changes in the dynamic patterns of the time series, being widely applied in hydrological topics such as forecasting [50][51][52], rainfall trends [53] or water quality modelling [54], among others. Wavelets are a class of functions that cut up data into different frequency components and they are used to localize a given function in both position and scaling. A wavelet transformation is a powerful mathematical signal processing tool, able to produce both time and frequency information and providing multiresolution analysis. There are two main types of wavelet transforms: continuous and discrete, being the most extensively used. The main advantage of wavelets versus Fourier analysis is its power to process non-stationarity signals, determining the temporal variation of the frequency content and allowing users to track the evolution of processes at different timescales in data sequences. Different wavelet families have been studied for different purposes depending on the time series to be analyzed: Coiflets, Symlets, Daubechies, Feyer-Korovkin, BiorSplines, among others. In hydrologic modelling, Daubechies wavelet [55] is one of the most employed due to its orthonormality properties and its good trade-off between parsimony and information plenitude [56][57][58]. This kind of wavelet has associated subclasses (db1 or haar, db2, db3, . . . dbN) depending on the number of vanishing moments and there is a scaling function generating an orthogonal multi-resolution analysis. This multiple-level decomposition process estimates the discrete wavelet transform coefficients, breaking down the original time-series into several lower-resolution components as a set of sub-signals: approximation (cAN) and details (cDN). For example, for level of decomposition = 2 this iterative process will lead to cA2, cD1, cD2 sub-series. The approximation coefficients were produced by low-pass filter and details coefficients by high-pass filter, representing the low and high frequency components, respectively. Figure 1 shows the multiresolution analysis based on this wavelet decomposition. Thus, these meteorological sub-series generated by wavelet transformation can be used as input variables in ANN approaches, giving rise to a type of so-called hybrid models: Wavelet Neural Networks (WNN).
Water 2020, 12, x FOR PEER REVIEW 3 of 21 Different wavelet families have been studied for different purposes depending on the time series to be analyzed: Coiflets, Symlets, Daubechies, Feyer-Korovkin, BiorSplines, among others. In hydrologic modelling, Daubechies wavelet [55] is one of the most employed due to its orthonormality properties and its good trade-off between parsimony and information plenitude [56][57][58]. This kind of wavelet has associated subclasses (db1 or haar, db2, db3, …dbN) depending on the number of vanishing moments and there is a scaling function generating an orthogonal multi-resolution analysis. This multiple-level decomposition process estimates the discrete wavelet transform coefficients, breaking down the original time-series into several lower-resolution components as a set of sub-signals: approximation (cAN) and details (cDN). For example, for level of decomposition=2 this iterative process will lead to cA2, cD1, cD2 sub-series. The approximation coefficients were produced by low-pass filter and details coefficients by high-pass filter, representing the low and high frequency components, respectively. Figure 1 shows the multiresolution analysis based on this wavelet decomposition. Thus, these meteorological sub-series generated by wavelet transformation can be used as input variables in ANN approaches, giving rise to a type of so-called hybrid models: Wavelet Neural Networks (WNN).

Availability of Short-Term Meteorological Series
Precipitation, and also temperature, are meteorological variables widely measured worldwide in comparison to solar radiation, humidity or wind speed, among others [59][60][61][62]. Besides, their behavior within the climate system is being studied all over the world [63], as both variables represent the key controlling factors in the spatial variation of terrestrial ecosystem carbon exchange [64]. However, long-term series are not easily available and often contain many gaps and have undergone homogenization or filling-gap processes usually due to changes in location, sensor replacement, variations in the mechanisms of data collection and measurements, etc.

Availability of Short-Term Meteorological Series
Precipitation, and also temperature, are meteorological variables widely measured worldwide in comparison to solar radiation, humidity or wind speed, among others [59][60][61][62]. Besides, their behavior within the climate system is being studied all over the world [63], as both variables represent the key controlling factors in the spatial variation of terrestrial ecosystem carbon exchange [64]. However, long-term series are not easily available and often contain many gaps and have undergone homogenization or filling-gap processes usually due to changes in location, sensor replacement, variations in the mechanisms of data collection and measurements, etc.
In order to improve the weather monitoring systems among other aims, the installation of automated weather stations networks able to collect at least temperature and precipitation data has been increasing since the ending of past century practically worldwide [65] and more recently with the combination of low-cost sensors and Internet of Things devices [66]. Therefore, there is currently a large availability of thermo-precipitation records from numerous spatially distributed locations with almost entirely no gaps and with more than a decade in length. Thus, and due to many recent works reporting the improvement of ANN-based hydrological models combining them with wavelet analysis [3,[67][68][69][70], the main goal of this work is the development and assessment of different hybrid WNN models to accurately forecast monthly precipitation in the semiarid and heterogeneous region of Andalusia (Southern Spain) using only short-term thermo-precipitation validated datasets. Due to the importance of precipitation forecast and since the availability of these data will increase in the coming years, the present work may be extensible to many other climatic areas of the world where these records are collected. Moreover, this work evaluates the use of new input thermal variables, in addition to precipitation, to deepen the knowledge and analyze the effectiveness of these hybrid models to forecast monthly precipitation in a geo-climatic variety of locations that have very different precipitation patterns.
For these purposes, different stations in the semiarid region of Andalusia (Southern Spain) were selected. Wavelet decompositions were applied to initial datasets in order to generate the input variables of the neural network models. The performance of all the WNN approaches has been evaluated using different statistics at each location.

Source of Data
Datasets used in this work were obtained from the Agroclimatic Information Network of Andalusia and they are easily downloadable on a daily basis from http://www.juntadeandalucia.es/ agriculturaypesca/ifapa/ria/ (access on 2 August 2019), where there are some automated weather stations recently installed and others not operational. Andalusia is a semiarid region located in the South of the Iberian Peninsula (South-western Europe) covering almost 88,000 km 2 and is divided into eight provinces: Almería, Cádiz, Córdoba, Granada, Huelva, Jaén, Málaga and Sevilla. According to its relief it is a very heterogeneous region: from the extensive coastal plains of the Guadalquivir River (at sea level) to the highest areas of the Iberian Peninsula ('Sierra Nevada' in the province of Granada). In terms of dryness, high contrasts are found from the Tabernas desert (province of Almería) to the rainiest areas of Spain in the 'Sierra de Grazalema' Natural Park (province of Cádiz). Another singularity is that it is surrounded by the Mediterranean Sea and the Atlantic Ocean at its Southeast and Southwest sides, respectively. The geographical distribution of the stations used in this work is shown in Figure 2 and Table 1 reports some of their characteristics, with latitudes ranging from 36.3372 • to 38.0806 • N, longitudes from 1.8831 • to 7.2469 • W and site elevations from 26 to 822 m above mean sea level. In general, the aridity increases from East (Huelva province) to West (Almería province) across Andalusia region [71]. These sites were selected in order to represent this climatic variability of the region, including coastal ('Málaga' and 'Conil de la Frontera' stations) and inland locations, and ensuring that the available time series are complete and gap-free. Time-periods of monthly precipitation, maximum and minimum temperature datasets from each station are summarized in Table 1. All of them end in July 2019 and start in 2000/2001, ranging from 213 months at 'IFAPA las Torres-Tomejil' station to 234 months at 'Huércal-Overa' station. In order to assess model performances and following the method previously described [54], the first 85% of datasets was used to calibrate the models and the remaining 15% of the records was used for validation (at least two and a half years at all locations). Table 2 shows the statistical values of these datasets for monthly precipitation, maximum and minimum temperature for each location.  Time-periods of monthly precipitation, maximum and minimum temperature datasets from each station are summarized in Table 1. All of them end in July 2019 and start in 2000/2001, ranging from 213 months at 'IFAPA las Torres-Tomejil' station to 234 months at 'Huércal-Overa' station. In order to assess model performances and following the method previously described [54], the first 85% of datasets was used to calibrate the models and the remaining 15% of the records was used for validation (at least two and a half years at all locations). Table 2 shows the statistical values of these datasets for monthly precipitation, maximum and minimum temperature for each location.
In order to ensure reliability of datasets, a set of checking quality procedures has been applied to precipitation and temperature daily data following the guidelines proposed by [72]. In addition, a specific algorithm for detecting spurious precipitation signals [73] and the spatial regression test [74] were also carried out. The application of these quality assurance techniques to hydro-meteorological data have been successfully carried out under different climatic conditions worldwide as a pre-requisite before their use [75][76][77][78].

Development of Wavelet Neural Network (WNN) Models
Several hybrid models (WNN) were developed based on the use of the sub-series resulting from the wavelet decomposition of the original series, as input variables of a feed-forward multilayer perceptron neural network (FFMLP). This architecture (Figure 3) is the most widely-used in water resources modelling [79] and consists of an input layer, one or more hidden layers containing network computation nodes (neurons), and the output layer that contains the target variable (predicted precipitation). The number of input nodes is equal to the number of input variables (details and approximations of sub-time series and month of year) and the number of hidden nodes is determined by trial and error procedure. One of the main keys for the good behavior of these approaches is the ability to learn from experience using the well-known backpropagation method in the training process and optimized by applying the Levenberg-Marquardt algorithm. Eventually, logarithmic sigmoidal and pure linear transfer activation functions were used for the hidden and output layers, respectively, converting input signals into output signals. Thus, the process that takes place in the neurons is the following. Firstly, the inputs are multiplied by their corresponding initial weights; these products with a bias term are summed. Afterwards, this result passes as the input of an activation function which determines whether the neuron is activated or not. Then, the result advances to the next neurons and the process is repeated until the output is obtained (it is mathematically expressed as Equation (1)). Finally, the backpropagation training method consists of modifying the weights of the nodes based on the minimization of the bias errors (difference between target and output value) and all the process is repeated from the beginning.
where O = output value of the hidden/output node, I = input or hidden node value, ∅ = the transfer function, W = weights connecting nodes and θ = bias for each node.

Development of Wavelet Neural Network (WNN) Models
Several hybrid models (WNN) were developed based on the use of the sub-series resulting from the wavelet decomposition of the original series, as input variables of a feed-forward multilayer perceptron neural network (FFMLP). This architecture (Figure 3) is the most widely-used in water resources modelling [79] and consists of an input layer, one or more hidden layers containing network computation nodes (neurons), and the output layer that contains the target variable (predicted precipitation). The number of input nodes is equal to the number of input variables (details and approximations of sub-time series and month of year) and the number of hidden nodes is determined by trial and error procedure. One of the main keys for the good behavior of these approaches is the ability to learn from experience using the well-known backpropagation method in the training process and optimized by applying the Levenberg-Marquardt algorithm. Eventually, logarithmic sigmoidal and pure linear transfer activation functions were used for the hidden and output layers, respectively, converting input signals into output signals. Thus, the process that takes place in the neurons is the following. Firstly, the inputs are multiplied by their corresponding initial weights; these products with a bias term are summed. Afterwards, this result passes as the input of an activation function which determines whether the neuron is activated or not. Then, the result advances to the next neurons and the process is repeated until the output is obtained (it is mathematically expressed as Equation (1)). Finally, the backpropagation training method consists of modifying the weights of the nodes based on the minimization of the bias errors (difference between target and output value) and all the process is repeated from the beginning.

∅
(1) where O = output value of the hidden/output node, I = input or hidden node value, ∅ = the transfer function, W = weights connecting nodes and = bias for each node. The selection of the Daubechies wavelet of order 5 (db5) was performed after a trial and error procedure checking Daubechies wavelet from order 1 to 10 [68,80,81], although similar results were found with db9. The wavelet decomposition process was carried out according to the procedure in [82] at level 3, based on the size of validation datasets for testing the model performances [69]. Finally, the optimal number of neurons in the hidden layer [2,68,83] was set to eight, after testing from two to ten in steps of one and checking the FFMLP performance.
Thus, each dataset was decomposed by wavelet transformation into sub-series containing approximation coefficients (cA3) and details coefficients (cD1, cD2 and cD3). They were used as input The selection of the Daubechies wavelet of order 5 (db5) was performed after a trial and error procedure checking Daubechies wavelet from order 1 to 10 [68,80,81], although similar results were found with db9. The wavelet decomposition process was carried out according to the procedure in [82] at level 3, based on the size of validation datasets for testing the model performances [69]. Finally, the optimal number of neurons in the hidden layer [2,68,83] was set to eight, after testing from two to ten in steps of one and checking the FFMLP performance.
Thus, each dataset was decomposed by wavelet transformation into sub-series containing approximation coefficients (cA3) and details coefficients (cD1, cD2 and cD3). They were used as input variables for the WNN models as well as the month of year (MOY: 1 = January, 2 = February . . . 12 = December), and monthly precipitation original series was used as the target output values. An example of the sub-series of precipitation (details and approximations) after the wavelet decomposition as well as the original signal is represented in Figure 4 for Málaga station.
variables for the WNN models as well as the month of year (MOY: 1=January, 2=February…12=December), and monthly precipitation original series was used as the target output values. An example of the sub-series of precipitation (details and approximations) after the wavelet decomposition as well as the original signal is represented in Figure 4 for Málaga station. The input variables used in each model are summarized in Table 3. All the models used Month of year (MOY) and precipitation signal decomposed by wavelets transformation. The proposed models used different combination of variables. For instance, the input variables of the Model I were MOY and monthly precipitation signal (decomposed into D1, D2, D3 and A3 coefficients). In contrast, the Model IX used MOY, precipitation signal (decomposed into D1, D2, D3 and A3 coefficients) and monthly minimum temperature signal (decomposed into D1, D2, D3 and A3 coefficients). Table 3. Inputs and number of variables of each of the wavelet neural network models (WNN) models evaluated in this work (m = month; MOY = month of year; P = precipitation; DTRm = mean diurnal temperature range; DTRx = maximum diurnal temperature range; DTRn = minimum diurnal temperature range; MTR=monthly temperature range; Tx=maximum temperature; Tn = minimum temperature).  The input variables used in each model are summarized in Table 3. All the models used Month of year (MOY) and precipitation signal decomposed by wavelets transformation. The proposed models used different combination of variables. For instance, the input variables of the Model I were MOY and monthly precipitation signal (decomposed into D1, D2, D3 and A3 coefficients). In contrast, the Model IX used MOY, precipitation signal (decomposed into D1, D2, D3 and A3 coefficients) and monthly minimum temperature signal (decomposed into D1, D2, D3 and A3 coefficients). Table 3. Inputs and number of variables of each of the wavelet neural network models (WNN) models evaluated in this work (m = month; MOY = month of year; P = precipitation; DTR m = mean diurnal temperature range; DTR x = maximum diurnal temperature range; DTR n = minimum diurnal temperature range; MTR=monthly temperature range; T x =maximum temperature; T n = minimum temperature).

Statistical Analysis and Performance Criteria
In order to evaluate the performance of different models developed in this work, forecasted and measured precipitation values were compared by using simple error analysis. Thus, common statistical indices widely used to assess hydro-meteorological prediction models [26,61,68] were estimated: RMSE (root mean square error), R (Correlation Coefficient), MAPE (mean absolute percentage error) and NSE (Nash-Sutcliffe model efficiency coefficient, also known as coefficient of efficiency). These statistics are summarized from Equations (2) to (5): where the N is the number of months and P m t , P f t , P m and P f are precipitation measured at month t, precipitation forecasted at month t, the mean of measured monthly precipitation and the mean of forecasted monthly precipitation, respectively.
In addition, two performance measures were also carried out: Akaike Information Criteria (AIC) and Bayesian Information Criteria (BIC). These indices have the singularity of considering the number of trained parameters and they are based on the parsimony. AIC and BIC were initially reported by [84] and [85], respectively, and they have been frequently used for assessing hydrological models [86][87][88]. Both expressions are described in Equations (6) and (7): where p is the number of free parameters in each model (the total amount of weights and biases), being the best model performance the one with lowest AIC and BIC values. These indices deal with the trade-off between the prediction error (RMSE) and the complexity of the model, combining a term reflecting how well the forecasts fit the data with a term penalizing the model in proportion to its number of estimated parameters [89].

Pre-Processing Input Datasets
Validated daily records (precipitation, maximum and minimum temperature) obtained after the application of quality control procedures were used to create different monthly datasets. Monthly precipitation (P) values were used as an input in all the models assessed. Apart from max/min monthly temperature records (T x and T n , respectively), various temperature-based monthly time series were also created from daily values: mean daily temperature range (DTR m ), maximum daily temperature range (DTR x ), minimum daily temperature range (DTR n ) and monthly temperature range (MTR). Daily temperature range (DTR) is the difference between daily maximum temperature and daily minimum temperature, with DTR m , DTR x , DTR n , being the mean, maximum and minimum DTR measured in a month, respectively. MTR is obtained as the difference between the maximum and minimum temperature measured in a monthly basis.

Performance of the Models
In general, regarding forecasted validation datasets and the common statistics, Model X was one of the best performers in most of the locations studied, although Model I showed the best results, on average, of BIC and AIC indices ( Figure 5), followed by Models II, IX, VIII, V, IV, III, VII, X and VI. The minimum values obtained for both indices by using Models I, II, IX and X were registered in the driest location (Tabernas station), in Conil de la Frontera by using Model III and Model VII, in Mancha Real by using Model IV, in IFAPA-Las Torres station by using Model VI and in Huércal-Overa station by using Model V and Model VIII. As in the results reported by [87], both indices produced the same model selection, with the exception of Model VII that showed the best AIC and BIC performances in Sabiote and Conil de la Frontera stations, respectively. Overall, the results from BIC and AIC values indicated a worse performance of the approaches that use more variables (Model VI and Model X) than the rest, with Model I being the one with the lowest indices. Thus, the number of estimated parameters (weights and biases) in each of the models played a determining role in these indices.
Water 2020, 12, x FOR PEER REVIEW 12 of 21 In general, regarding forecasted validation datasets and the common statistics, Model X was one of the best performers in most of the locations studied, although Model I showed the best results, on average, of BIC and AIC indices ( Figure 5), followed by Models II, IX, VIII, V, IV, III, VII, X and VI. The minimum values obtained for both indices by using Models I, II, IX and X were registered in the driest location (Tabernas station), in Conil de la Frontera by using Model III and Model VII, in Mancha Real by using Model IV, in IFAPA-Las Torres station by using Model VI and in Huércal-Overa station by using Model V and Model VIII. As in the results reported by [87], both indices produced the same model selection, with the exception of Model VII that showed the best AIC and BIC performances in Sabiote and Conil de la Frontera stations, respectively. Overall, the results from BIC and AIC values indicated a worse performance of the approaches that use more variables (Model VI and Model X) than the rest, with Model I being the one with the lowest indices. Thus, the number of estimated parameters (weights and biases) in each of the models played a determining role in these indices. In terms of the statistics R, RMSE, MAPE and NSE, the mean, maximum and minimum values obtained in the sixteen locations are summarized in Table 4 for each model and dataset studied. Regarding validation forecasts, Model I obtained the best R (0.78) and NSE (0.62) values in Cártama station, and the lowest RMSE and MAPE values in Tabernas (9.39 mm) and El Campillo (9.82%) stations, respectively. On average, Model I had a generally better performance than other related models carried out in Greece [33] or in Jordan [83], but with R and NSE values lower than those reported by [68] in one station in India. However, Model II was the one that showed the worst results in almost all sites and for all the statistics studied, although with some exceptions. These results indicated that for the goal of this work, the information contained in the 'two months before' precipitation signal is not as relevant as the one contained in the 'one month before' signal. Model III had, on average, a slightly better performance, registering the lowest MAPE and RMSE values in Tabernas station (11.39% and 13.75 mm, respectively) and the best R (0.84) and NSE (0.73) values in El Carpio station. However, Model IV obtained good statistical indices in Cádiar, Mancha Real and Almería stations, while Model V gave the lowest RMSE (10.20 mm) in Huércal-Overa station. In general, the mean results obtained by using the variables DTRm (Model III), DTRx (Model IV) and DTRn (Model V) were similar and better than those reported by [33] and [83], although in terms of MAPE, Model IV gave the best values in the most arid sites (Tabernas and Huércal-Overa stations). The next model assessed (VI) had a good performance in the two coastal locations: Conil de la Frontera station (highest R = 0.89 and NSE = 0.82 values) and Málaga station (best MAPE value = In terms of the statistics R, RMSE, MAPE and NSE, the mean, maximum and minimum values obtained in the sixteen locations are summarized in Table 4 for each model and dataset studied. Regarding validation forecasts, Model I obtained the best R (0.78) and NSE (0.62) values in Cártama station, and the lowest RMSE and MAPE values in Tabernas (9.39 mm) and El Campillo (9.82%) stations, respectively. On average, Model I had a generally better performance than other related models carried out in Greece [33] or in Jordan [83], but with R and NSE values lower than those reported by [68] in one station in India. However, Model II was the one that showed the worst results in almost all sites and for all the statistics studied, although with some exceptions. These results indicated that for the goal of this work, the information contained in the 'two months before' precipitation signal is not as relevant as the one contained in the 'one month before' signal. Model III had, on average, a slightly better performance, registering the lowest MAPE and RMSE values in Tabernas station (11.39% and 13.75 mm, respectively) and the best R (0.84) and NSE (0.73) values in El Carpio station. However, Model IV obtained good statistical indices in Cádiar, Mancha Real and Almería stations, while Model V gave the lowest RMSE (10.20 mm) in Huércal-Overa station. In general, the mean results obtained by using the variables DTR m (Model III), DTR x (Model IV) and DTR n (Model V) were similar and better than those reported by [33] and [83], although in terms of MAPE, Model IV gave the best values in the most arid sites (Tabernas and Huércal-Overa stations). The next model assessed (VI) had a good performance in the two coastal locations: Conil de la Frontera station (highest R = 0.89 and NSE = 0.82 values) and Málaga station (best MAPE value = 9.80%), which may indicate that the joint use of DTR x and DTR n variables in areas near the sea could be recommended. Model VII gave the best MAPE values of all the models and sites in Cártama (0.40%) and IFAPA-Las Torres Tomejil (9.44%) stations and the best R (0.90), RMSE (16.95 mm) and NSE (0.84) values in Sabiote station, indicating that the new input variable MTR can be very useful in some locations. Finally, Model VIII (using T x ) obtained the lowest RMSE value in Huércal-Overa (11.16 mm), the best MAPE value in Sabiote (4.96%) and the highest R (0.88) and NSE (0.79) values in El Campillo station, where Model IX (using T n ) also obtained the lowest MAPE value (3.45%). In addition, this model (IX) had a very good behavior also in Sabiote (MAPE = 3.51%), Conil de la Frontera (R = 0.90 and NSE = 0.84), El Carpio (R = 0.85 and NSE = 0.75) and Tabernas (RMSE = 6.79 mm) stations. Regarding these last two models, no clear improvement was observed to recommend Model VII or Model IX based on the geo-climatic conditions. On average, the highest values of R (0.82) and NSE (0.69) were obtained by Model X (using T x and T n ) for validation dataset and for all the sites, ranging from R = 0.90 and NSE = 0.83 (Conil de la Frontera station) to R = 0.64 and NSE = 0.44 (Húercal Overa station). In general, using Model II the lowest average values of R (0.69) and NSE (0.50) were given, and also the minimum values obtained for all the sites (R = 0.55 and NSE = 0.32 in Tabernas station). Regarding RMSE average values, they ranged from 21.49 (Model X) to 31.55 mm (Model II), while the highest value (44.03 mm) was registered in Jimena de la Frontera station by using also Model II, with this station being the one with the rainiest month (371.40 mm). Attending to MAPE average values, Model X was able to forecast with the lowest error (23.61%) followed by Model VII (28.02 %), ranging from 4.57% (Mancha Real station) to 40.04% (Écija station) and from 0.40% (Cártama station) to 47.94% (Santaella station), respectively. Instead, Model II gave the highest MAPE average value (39.93%) as well as the greatest percentage registered from all the stations (62.02%) in Cádiar (the highest location). As in other related works [3,32,34,68], a better general performance in calibration datasets can be observed. In order to evaluate the results obtained by using the ten models at each location, the statistical indices R, NSE, RMSE and MAPE are shown in Figure 6 (a, b, c and d, respectively) for validation datasets. In Figure 6a, it can be observed that in the most humid site (Puebla-Guzmán station = HUE07), located in the western region of Andalusia, the highest R (0.88) and NSE (0.79) values were obtained by Model VIII, followed by IX, X and VII. The other station situated in Huelva province (El Campillo station = HUE08) registered very homogeneous values of R and NSE by using all the models, with Model VI being the best one with values of 0.79 and 0.64, respectively. One of the best correlation coefficients and NSE values were obtained in Conil de la  Finally, measured and forecasted values of monthly precipitation at four stations (Conil de la Frontera, Tabernas, Loja and Sabiote) during calibration and validation periods are represented in Figure 7. When attending to the validation datasets, a very good performance of Model VI can be observed in a coastal location such as Conil de la Frontera (CAD05), using MOY, precipitation, DTR x and DTR n as input variables and obtaining R = 0.89 and MAPE = 11.29%. In addition, this model also gave the lowest percentages of error at Málaga (MAG01) coastal station (MAPE = 9.80%). Thus, the input variables used in this model were more efficient at coastal locations than other variable combinations in terms of predictability performance. Slightly worse was the behavior of Model III (MOY, precipitation and DTR m as input variables) in Tabernas (the driest station), with R=0.81, and MAPE = 11.39%, but being able to properly forecast the peak of 141.40 mm. Likewise, the validation period results obtained in Loja station (GRA03) by applying Model X indicated, in general, a satisfactory performance in terms of R (0.86), RMSE (17.81 mm) and NSE (0.72), although the peak of 225.40 mm was not predicted so accurately. Finally, the modelled datasets using Model VII in Sabiote station (JAE04) are represented. Regarding the validation period, the values of NSE, R and RMSE obtained with this model showed the best model performance in this site (0.84, 0.90 and 16.95 mm, respectively) and also giving an acceptable MAPE of 11.18%. Furthermore, this model that used MOY, precipitation and MTR as input variables, forecasted with lowest MAPE values in another two interior stations: Cártama (MAG09) and IFAPA-Las Torres Tomejil (SEV101), although its performance was not so good in other inland locations.

Conclusions
Different configurations of hybrid model combining wavelet analysis and artificial neural network for time series forecasting of monthly precipitation have been developed and assessed at sixteen locations in Southern Spain (semiarid region). The main novelty of this work is the use of thermal variables, besides precipitation, never used before, such as the daily and monthly thermal range, as well as the month of year, the use of short-term time series and the application to datasets from sixteen sites having very different climatic and geographical conditions. Firstly, a set of subsignals were obtained from original validated datasets carrying out a multilevel decomposition process by wavelet transformation. Then, these new time-series and months of year were used as input variables of the ten models evaluated, with original monthly precipitation being the output variable. The models were calibrated using the first 85% of datasets and the rest of the data were used for model validation (at least two and a half years at all locations). The results indicated that nonlinear dynamics of the different thermal variables used and also precipitation were properly characterized by wavelet decomposition in order to satisfactorily forecast precipitation one month ahead, although From these results, it has been verified that the introduction of easily estimated input variables such as DTR x , DTR n , DTR m , MTR or MOY into WNN models is very useful for improving precipitation predictions one month ahead, especially when there is no availability of long-term datasets. In general, the results obtained by applying the proposed models in all stations in Southern Spain provided better RMSE values than the best of several WNN monthly precipitation models assessed by [68] at one station located in the east of India and also better than those reported by [3] at 24 locations in China, with both works needing the use of long-term historical series. Moreover, RMSE values were also lower in this work than the reported by [2] in ten stations in Guilin (China) using evolutionary models. In terms of efficiency, mean NSE values indicated a good degree of efficiency for all the models, being much higher than the values reported by [90] in Iran using ANN to predict monthly precipitation using 30-year series. RMSE values obtained with ANN models by [90] were worse than those given with the ten approaches assessed in this work. In addition, the correlation coefficients obtained in this work in all locations except at Huércal-Overa and Santaella sites were better than those reported by [33] in four stations in Greece for cumulative four-month precipitation predictions using ANN models. Regarding this statistic, the best result reported by [83] for the monthly precipitation in one of the three stations studied in Jordan was similar to the best values obtained in Santaella and Huércal-Overa stations but lower than those given in the rest of the locations. However, the correlation coefficient obtained by [90] with ANN and singular spectrum analysis model was better than the average performance of all the models, although models from V to X gave higher R values at least in one location of the sixteen sites evaluated.

Conclusions
Different configurations of hybrid model combining wavelet analysis and artificial neural network for time series forecasting of monthly precipitation have been developed and assessed at sixteen locations in Southern Spain (semiarid region). The main novelty of this work is the use of thermal variables, besides precipitation, never used before, such as the daily and monthly thermal range, as well as the month of year, the use of short-term time series and the application to datasets from sixteen sites having very different climatic and geographical conditions. Firstly, a set of sub-signals were obtained from original validated datasets carrying out a multilevel decomposition process by wavelet transformation. Then, these new time-series and months of year were used as input variables of the ten models evaluated, with original monthly precipitation being the output variable. The models were calibrated using the first 85% of datasets and the rest of the data were used for model validation (at least two and a half years at all locations). The results indicated that nonlinear dynamics of the different thermal variables used and also precipitation were properly characterized by wavelet decomposition in order to satisfactorily forecast precipitation one month ahead, although the performance of the models was not the same for the different locations evaluated. For each location, it was found that there was at least one or more models with acceptable statistical performance (R > 0.76; NSE > 0.60; RMSE < 29.82 mm and MAPE < 27.62%).
In general, the model that used precipitation, maximum and minimum temperature (X) had the best statistical performance in most of the locations studied. However, the model using precipitation and the mean diurnal temperature range (III) gave the best results at the most arid sites. Regarding coastal locations, the lowest mean absolute percentage of errors were obtained by the model using precipitation, maximum and minimum diurnal temperature range (VI). By contrast, the model using only precipitation signal (I) obtained the best BIC at all locations and the lowest AIC values at twelve sites due to the reduced number of input variables but did not get the best results in any other statistical indices except in El Campillo station, the second rainiest site of this study. Although no relationship between model performance and site elevation was found, the worst mean absolute percentage error was obtained in the highest site studied (Cádiar station). Finally, the model using precipitation and monthly temperature range (VII) gave satisfactory results in terms of predictability error in three interior locations. Therefore, overall analysis of the general results obtained in this work indicates the suitability of the type of input variables used in WNN models that accurately describe precipitation processes according to geo-climatic characteristics.
Since most of the thermo-pluviometric sensors installed on automatic weather stations networks worldwide do not have long-term time series and considering that precipitation is a meteorological variable with high spatial variability, these types of models are of great interest to the monthly precipitation forecast in locations where only short length records are available. Further works using different artificial intelligence approaches such as support vector machine or extreme learning machine may be carried out to compare the performance of these kind of models once they are joined to wavelet analysis.