ISSN 2410-5708 / e-ISSN 2313-7215

Year 8 | No. 22 | p. 116 - p. 125 | June - September 2019


Precipitation forecast model for the city of Managua using artificial neuronal networks in the context of environmental management


Submitted on October 31st, 2019 / Accepted on November 13th, 2019

M.Sc. Alina María Ortíz

Researcher professor

Universidad Nacional Autónoma de Nicaragua, Managua, Faculty of Sciences and Engineering


Keywords: forecast model, teleconnections, artificial neural networks, climatic variables


This paper proposes a numerical model of precipitation forecast for the city of Managua, based on data obtained by the weather stations: Managua, La Primavera and Casa Colorada (El Crucero), information provided by the Instituto Nacional de Estudios Territoriales (INETER) from the period corresponding to 1950-2014 and other climatic variables such as the Arctic Oscillation (AO), North Atlantic Oscillation (NAO), South Oscillation Index (SOI), Anomaly Index of the Monthly Average of the Temperature of the Surface of the Sea (SST) in the Tropical North Atlantic, region 5.5º N - 23.5º N and 57.5º W - 15º W (TNA) and the Oceanic Index of the Niño (ONI), through teleconnections. For the elaboration of the model, the selection and correlation of variables were carried out through statistical methods and to find the relationship between these variables a multilayer perceptron was selected. This is an Artificial Neural Network in which architecture, in this case, is composed of; an input layer, a hidden layer, and an output layer. This network has been trained through supervised learning through the backpropagation algorithm.

This network will be used to predict future weather conditions in the city, which will help to make decisions about the management and planning of climate-sensitive activities to deal with possible natural disasters.


Some of the countries of the Central American region, such as Honduras and Nicaragua, are among the main countries with high climate risk due to the occurrence of extreme weather events, ranking third and fourth in the Global Climate Risk Index (IRC) (Harmeling, 2010) for the period 1990-2009.

In many places according to physical geographical conditions and climate change, the occurrence of rains is accompanied by catastrophic floods and human, economic and material losses of all kinds, as well as large and incalculable damage to agricultural production, (Chourio, 2009). Managua has a geographical position that places it in a depression with 20 kilometers of the coastal zone with Lake Xolotlán which makes it the most vulnerable area to floods throughout the country, (G. Flores 2019). Due to the mountainous orography that the city presents with significant levels of deforestation and persistent rains easily cause landslides and landslides on hillsides, water pollution and the consequent sedimentation and degradation of agricultural soils; and therefore socio-natural disasters of great impact, (SINAPRED 2010-2015).

Managua is the most populous city in Nicaragua, with more than one million inhabitants, in the urban area is the majority of the population which represents 90 percent and in the rural area where the least part of the population is, 10 percent, (www.inec.gob.ni/2003).

 Each year during the rainy season it presents severe effects due to flooding in the urban area, having as its main causes: (Municipal File, INIFOM. 2012),

Accelerated urban growth without planning criteria.

Bodies of water and contaminated areas.

Lack of responsibility and environmental and urban culture in the population.

Old and poor storm drainage system.

Use of channels as garbage dumps.

In addition to all this, it can be added that Managua receives the water that descends from the upper parts of the basin that drain inland through the system of drainage channels that cross the city towards its mouth in the lake.

In Nicaragua, several climate prediction models are used on a global scale, (INETER 2016), this is why a predictive model is proposed that allows local monitoring of precipitation which generates accurate forecasts, allowing an agile response that minimizes the level of threat to the department which vulnerability is great.


Correlate climatological variables for the generation of a precipitation forecast model using RNAs, for the department of Managua in the context of environmental management.


In carrying out this study three weather stations were used:

Main Managua Meteorological Station (HMP): It is located in the Department of Managua in the municipality of Managua (next to this Managua International Airport). It is located in the quadrant of Nindirí C2952 II. Code 069027, Latitude North 12°08’36”, West Longitude 86°09’49”, elevation 56 meters above sea level.

La Primavera (PV) weather station: It is located in the department of Managua, in the municipality of Managua. Code 069046, Latitude North 12°01’08’’, West Longitude 86°14’55’’, elevation 600 meters above sea level.

Weather station Casa Colorada PV (El Crucero): It is located in the municipality of El Crucero. Code 069047, Latitude North 11°58’54”, West Longitude 86°18’36”, elevation 910 meters above sea level.

All representative of the study area with the monthly information of the different parameters for a period of 64 years (1950-2014).

Precipitation was defined as the local climatic variable of the time to be used and on a global scale, temperature, atmospheric pressure, humidity, cloudiness, wind, contemplated in oceanic indices through correlation, positive or negative between several indices atmospheric data that provide data on: the Arctic Oscillation (AO), North Atlantic Oscillation (NAO), Southern Oscillation Index (SOI), Anomaly Index of the monthly mean sea surface temperature (SST) in the Tropical North Atlantic, region 5.5º N - 23.5º N and 57.5º W - 15º W (TNA) and the Oceanic Index of the NIÑO (ONI), Southern Oscillation (ENSO), which allows linking the changes of time that occur in regions separated by large distances from the globe with rain in the study area using as a correlation framework the precipitation data applied to the variability in time scales.

Then, we proceeded to verify if the atmospheric index and precipitation data are adjustable through the analysis of probability functions until the best fit is obtained.

The correlation of the variables was carried out as a series of time which tendency given by the general long-term movement of the information presents a non-linear trend selecting the exponential one from the non-linear trends since it is the one that best fits the distribution of points and the one with the highest correlation coefficients. Once the correlation between the variables was determined using the recorded data of the mentioned weather stations, forward feeding with artificial neural networks was used for supervised learning.

The operation of the network consists of learning a predefined set of input-output pairs using a two-phase propagation-adaptation cycle:

1.An input pattern is applied as a stimulus for the first layer of the neurons of the network, then it is propagated through all the upper layers until an output is generated and the result obtained in the output neurons is compared with the output that it is desired to obtain and an error value is calculated for each output neuron.

2.These errors are transmitted backward, starting from the output layer, to all the neurons of the intermediate layer that contribute directly to the output in that way receiving the percentage of error approximated to the participation of the intermediate neuron in the original output. This process is repeated, layer by layer, until all the neurons in the network have received an error that describes their contribution relative to the total error based on the value of the error received, the connection weights of each neuron are readjusted so that the next time the same pattern is presented, the output is closer to the desired one (decrease the error). The steps are repeated until a minimum of the training error is reached for which m learning cycles are performed.

Once the network has been trained, the same relationship (after training) can be applied to new input vectors giving an active output if the new entry is similar to those presented during learning. The neural network to be trained will be used to predict weather conditions in Managua.

Finally, mitigation measures are proposed that allow integrated management of the City.


The correlation of each of the atmospheric indices AO, TNA, NAO, ONI and SOI with the monthly average of precipitation in each one of the stations throughout the 64 years of which data are available is presented below.


Figure 1. AO Oscillation versus Airport, Primavera and Casa Colorado stations


Figure 2. TNA Oscillation Graph versus Airport, Primavera and Casa Colorado stations


Figure 3. NAO Oscillation Chart versus Airport, Primavera and Casa Colorado stations


Figure 4. SOI Oscillation Chart versus Airport, Primavera and Casa Colorado stations


Figure 5. ONI Oscillation Chart versus Airport, Primavera and Casa Colorado stations

In the figures shown it is possible to observe that the time series presents a non-linear trend, this curvilinear behavior, however, shows that the smaller the value of the atmospheric index, the lower the rainfall and that as the value of this increases it also increases precipitation. In figure 4 the distribution of points is random, so it is not possible to adjust the distribution.

The correlation of the variables was performed as a time series since there are periodically recorded data on which trend is nonlinear. Among the non-linear trends that can occur in a series of data are the polynomial, logarithmic, exponential and potential, among others, of these the one that best fits the distribution of points is the exponential trend and the one with the highest coefficients correlation presented which allowed to find the best-unbiased estimators.

The proposed forecast model based on specific characteristics for precipitation behavior in the department of Managua considers the selection of the weather variables to be used; in this case the precipitation data of three weather stations and the weather indices over a period of 64 years, the correlation of the variables involved through time series and the normalization of the maximum, average and minimum values of precipitation and of the climatological indices, which become the output and input values respectively for the defined neural network.

A multilayer perceptron neuronal network is proposed that optimizes both the matrix of weights and the number of hidden neurons. Its architecture is composed of an input layer, a hidden layer, and an output layer. The model starts from a neural network (2, 2, and 1) that is identified with two neurons in the input layer, two in the hidden layer and one in the output layer to optimize the weight matrix by the backpropagation algorithm and three variables that identify the model. Weights are the coefficients that store the knowledge necessary to solve specific problems, in this case, the predictions.

The city of Managua and the country, in general, can manage disaster risks more effectively if aspects related to those risks are included in development plans at both the sector and national levels and if climate change adaptation strategies are adopted by translating those plans and strategies in measures aimed at vulnerable areas and groups. Among those that can be mentioned:

Risk assessment, location of the potential threat and its degree of severity.

Early warning systems.

Communication between decision-makers and local citizens regarding risks.

Integrate water resources management and system planning and design into land-use policies.

The management and restoration of ecosystems.

Improvements in public health surveillance, water supply, and sanitation, irrigation, and drainage systems.

Development and application of construction standards.

Increased education and awareness regarding these issues.

Watershed management, promoting, for example, good sustainable agroforestry practices, soil conservation, and fire control measures.

Create an appropriate institutional framework, as well as the mechanisms to implement vulnerability reduction measures.

Adapt agriculture to protect against local climatic changes.

Strengthen food security.

Balance energy demands.

Strengthen the gear between all the structures of the National System for Disaster Prevention, Mitigation, and Attention and at all levels of the national territory.

It is necessary to mention that this is a first approach to the prediction model proposal; other tests should be carried out to verify the certainty and accuracy of the predictions obtained or make modifications if necessary.


The author thanks the Postgraduate Department of the Universidad Nacional Autónoma de Nicaragua (UNAN-Managua), through the Research Projects Fund (FPI) for the financing of this research.

Works Cited

CEPAL, (Comisión Económica para América Latina y el Caribe). 2010. Nicaragua efectos del cambio climático sobre la agricultura. p. 72 p. Retrieved from https://repositorio.cepal.org/bitstream/handle/11362/25925/1/lcmexl964.pdf

Naciones Unidas. Efectos del cambio climático en la costa de América Latina y el Caribe. Dinámicas, tendencias y variabilidad climática., diciembre de 2011. Retrieved from https://www.cepal.org/es/publicaciones/3953-efectos-cambio-climatico-la-costa-america-latina-caribe-guia-metodologica

Chávez Espíritu, Tulio W. 2012. Análisis hidrológico ante impactos del cambio climático y cambios de uso del suelo en la cuenca del río Compasagua, Nicaragua. Tesis MSc. Turrialba, CR, CATIE. Retrieved from http://repositorio.bibliotecaorton.catie.ac.cr/handle/11554/4471

Obregón, N.*, Fragala, F.* y Prada, L. F.** Seminario Internacional La Hidroinformática en la gestión integrada de los recursos hídricos. REDES NEURONALES ARTIFICIALES EN HIDROINFORMÁTICA. Pontificia Universidad Javeriana. Bogotá, Colombia. Universidad de los Andes. Bogotá, Colombia. Retrieved from http://cinara.univalle.edu.co/archivos/pdf/61.pdf

Instituto Nicaragüense de Estudios Territoriales (INETER). Dirección general de Meteorología. Caracterización climática del Departamento de Managua. Dirección de aplicaciones de la meteorología Managua, 11 de diciembre 2008.Año: 2004 Editorial: Monografías del Instituto Nacional de Meteorología Páginas: 279 Ciudad: Madrid. Retrieved from https://servmet.ineter.gob.ni//Meteorologia/climadenicaragua.php

Hilera, J.R., y V.J. Martínez. 2000. Redes neuronales artificiales. Fundamentos, modelos y aplicaciones. 390 p. Editorial Alfaomega Ra-Ma, Madrid, España. Retrieved from https://www.academia.edu/39737539/REDES_NEURONALES_ARTIFICIALES_FUNDAMENTOS_MODELOS_Y_APLICACIONES

Ovando, Gustavo, Bocco, Mónica, & Sayago, Silvina. 2005. REDES NEURONALES PARA MODELAR PREDICCIÓN DE HELADAS. Agricultura Técnica, 65(1), 65-73.

Retrieved from http://www.scielo.cl/scielo.php?script=sci_arttext&pid=S0365-28072005000100007&lng=es&tlng=es. 10.4067/S0365-28072005000100007.

Ribalaygua, J., De Loma-Ossorio, E., Córdoba, M., Torres, L., Lahoz, C., Arias, A. y Caicedo, A. MOPT. 1992. Guías para la elaboración de estudios del medio físico (contenido y metodología). Ministerio de obras públicas, transporte y medio ambiente. España (2011).

Milán, J. 2011. Apuntes sobre el cambio climático en Nicaragua. Managua, Nicaragua. Retrieved from http://www.cambioclimatico.ineter.gob.ni/bibliografia/Educacion%20y%20Cambio%20Clim%C3%A1tico/Apuntes%20sobre%20Cambio%20Climatico%20en%20Nicaragua1.pdf

IPCC (Intergovernmental Panel on Climate Change). 2007. Cambio climático 2007: informe de síntesis. Contribución de los grupos de trabajo I, II y III al cuarto informe de evaluación del Grupo Intergubernamental de Expertos sobre el Cambio Climático, Ginebra, pág. 104. Retrieved from https://www.ipcc.ch/site/assets/uploads/2018/02/ar4_syr_sp.pdf

INETER (Instituto Nacional de Estudios Territoriales). 2005. Normas históricas. “Comportamiento de las temperaturas medias anual en periodo 1971 al 2000”. Managua, Nicaragua. Retrieved from https://servmet.ineter.gob.ni//Meteorologia/climadenicaragua.php

Freeman, J.A., and D.M. Sapera. 1991. Neural networks: algorithms, applications, and programming techniques (Computation and Neural Systems Series) 401 p. Addison-Wesley Pub. Co., Reading, Massachusetts, USA.