Prediction of Rainfall and Water Discharge in The Jagir River Surabaya with Long-Short-Term Memory (LSTM)


  • Retzi Yosia Lewu Universitas Amikom Yogyakarta
  • Slamet Slamet Universitas Amikom Yogyakarta
  • Sri Wulandari Universitas Amikom Yogyakarta
  • Widdi Djatmiko Universitas Amikom Yogyakarta
  • Kusrini Kusrini Universitas Amikom Yogyakarta
  • Mulia Sulistiyono Universitas Amikom Yogyakarta
(*) Corresponding Author



Long Short Term Memory (LSTM), Prediction; Flood, Rainfall, Water Discharge


Floods can occur at any time if the amount of river water discharge and rainfall intensity tends to be high, so preparations and ways of handling are needed to anticipate flooding quickly, precisely, and accurately for the Surabaya City Public Works Service. One of the steps to predict and analyze the status of the flood disaster alert level is to calculate predictions based on rainfall and the amount of river water discharge. This study uses the Long-Short Term Memory (LSTM) algorithm to predict using a time series dataset of rainfall and river water discharge in the Jagir River, Surabaya. This data is used to make predictions with the proportion of 70% training data and 30% testing data. Data normalization is performed in intervals of 0 and 1 using a min-max scaler and activated using ReLU (Rectified Linear Unit) and Adam Optimizer. The process continues by repeating the process to enter iterations, or epochs until it reaches the specified epoch (n). The data is then normalized to their original values and visualized. The model was evaluated and produced acceptable performance evaluation results for the rainfall variable, namely at epoch (n) = 75 for training data, namely a score of 0.054 for MAE and 0.099 for RMSE. In contrast, data testing was given a score of 0.041 for MAE and 0.091 for RMSE. As for the water discharge variable, the performance evaluation shows the difference between the training and testing data. Results of training data MAE = 11.10 and RMSE=18RMSE =18.61.61 at epoch (n) = 150. Results of data testing MAE = 11.37 and RMSE = 21.08 at epoch (n) = 100. These results indicate an anomaly that needs to be discussed in further research.


Download data is not yet available.

Author Biographies

Retzi Yosia Lewu, Universitas Amikom Yogyakarta

Magister of Informatics Engineering

Slamet Slamet, Universitas Amikom Yogyakarta

Magister of Informatics Engineering

Sri Wulandari, Universitas Amikom Yogyakarta

Magister of Informatics Engineering

Widdi Djatmiko, Universitas Amikom Yogyakarta

Magister of Informatics Engineering

Kusrini Kusrini, Universitas Amikom Yogyakarta

Magister of Informatics Engineering

Mulia Sulistiyono, Universitas Amikom Yogyakarta

Magister of Informatics Engineering


Asdak, C. (2023). Hidrologi dan Pengelolaan Daerah Aliran Sungai. Yogjakarta: UGM PRESS.

Bouktif, S., Fiaz, A., Ouni, A., & Serhani, M. A. (2018). Optimal deep learning LSTM model for electric load forecasting using feature selection and genetic algorithm: Comparison with machine learning approaches. Energies, 11(7).

Devi, N. M. M. C., Bayupati, I. P. A., & Wirdiani, N. K. A. (2022). Prediksi Curah Hujan Dasarian dengan Metode Vanilla RNN dan LSTM untuk Menentukan Awal Musim Hujan dan Kemarau. JEPIN, 8(3), 405–411. Retrieved from

Elizabeth Michael, N., Mishra, M., Hasan, S., & Al-Durra, A. (2022). Short-Term Solar Power Predicting Model Based on Multi-Step CNN Stacked LSTM Technique. Energies, 15(6).

Hochreiter, S., & Schmidhuber, J. (1997). Long Short-Term Memory. Neural Computation, 9(8), 1735–1780.

Kardhana, H., Valerian, J. R., Rohmat, F. I. W., & Kusuma, M. S. B. (2022). Improving Jakarta’s Katulampa Barrage Extreme Water Level Prediction Using Satellite-Based Long Short-Term Memory (LSTM) Neural Networks. Water, 14(9), 1–17.

Kouadri, S., Pande, C. B., Panneerselvam, B., Moharir, K. N., & Elbeltagi., A. (2022). Prediction of irrigation groundwater quality parameters using ANN, LSTM, and MLR models. Environmental Science and Pollution Research, 29, 21067–21091.

Larose, D. T. (2005). Discovering Knowledge in Data: An Introduction to Data Mining. Discovering Knowledge in Data: An Introduction to Data Mining, 2nd ed., pp. 1–222. New Jersey: John Willey & Sons Inc.

Navlan, A., Fandango, A., & Idris, I. (2021). Python Data Analysis: Perform data collection, data processing, wrangling, visualization, and model building using Python. Birmingham, United Kingdom: Packt Publishing Ltd.

Noymanee, J., & Theeramunkong, T. (2019). Flood Forecasting with Machine Learning Technique on Hydrological Modeling. Procedia Computer Science, 156, 377–386.

Rizki, M., Basuki, S., & Azhar, Y. (2020). Implementasi Deep Learning Menggunakan Arsitektur Long Short Term Memory(LSTM) Untuk Prediksi Curah Hujan Kota Malang. Jurnal Repositor, 2(3), 331–338.

Sampurno, J., Vallaeys, V., Ardianto, R., & Hanert, E. (2022). Integrated hydrodynamic and machine learning models for compound flooding prediction in a data-scarce estuarine delta. Nonlinear Processes in Geophysics, 29(3), 301–315.

Shetty, S. A., Padmashree, T., Sagar, B. M., & Cauvery, N. K. (2021). Performance Analysis on Machine Learning Algorithms with Deep Learning Model for Crop Yield Prediction. Data Intelligence and Cognitive Informatics, 739–750. Springer, Singapore.

Sudriani, Y., Ridwansyah, I., & A Rustini, H. (2019). Long short term memory (LSTM) recurrent neural network (RNN) for discharge level prediction and forecast in Cimandiri river, Indonesia. IOP Conference Series: Earth and Environmental Science, 299(1).

Supatmi, S., Hou, R., & Sumitra, I. D. (2019). Study of Hybrid Neurofuzzy Inference System for Forecasting Flood Event Vulnerability in Indonesia. Computational Intelligence and Neuroscience, 2019, 1–12.

Szandała, T. (2020). Review and Comparison of Commonly Used Activation Functions for Deep Neural Networks. In Bio-inspired Neurocomputing (pp. 203–224). Springer, Singapore.

Wang, W., & Lu, Y. (2018). Analysis of the Mean Absolute Error (MAE) and the Root Mean Square Error (RMSE) in Assessing Rounding Model. IOP Conference Series: Materials Science and Engineering, 324(1).




How to Cite

Lewu, R. Y., Slamet, S., Wulandari, S., Djatmiko, W., Kusrini, K., & Sulistiyono, M. (2023). Prediction of Rainfall and Water Discharge in The Jagir River Surabaya with Long-Short-Term Memory (LSTM) . Jurnal Riset Informatika, 5(3), 439–446.