Available online at http://icsejournal. com/index. php/JCSE Journal of Computer Science and Engineering (JCSE) e-ISSN 2721-0251 Vol. No. August 2025, pp. Monte Carlo Simulation Application for Meteorological Parameter Prediction Muhammad Nur Rizqi1*. Cahya Sugiarto2. Ghaitsa Afifah3 1, 2, 3State College of Meteorology Climatology and Geophysics. Tangerang. Indonesia 1 muhammadnurrizqi2004@gmail. 2 cahyasugiarto11@gmail. 3 ghaitsaafifah@gmail. * corresponding author ABSTRACT ARTICLE INFO Article History: Received January 20, 2025 Revised August 13, 2025 Accepted August 15, 2025 Keywords: Monte Carlo Simulation. Meteorological Prediction. Rainfall Forecasting. Weather Modeling. MAPE Evaluation Correspondence: E-mail: muhammadnurrizqi2004@gmail. Rainfall in Indonesia, particularly in southern coastal regions such as Cilacap Regency, is strongly influenced by the interaction of multiple meteorological This study aims to predict monthly meteorological parameters consisting of rainfall, air temperature, wind speed, humidity, and solar radiation intensity using the Monte Carlo simulation method based on historical data from 2022 to 2024 obtained from the Tunggul Wulung Cilacap Class i Meteorological Station. The simulation process involved probability distribution fitting and random number generation for 10,000 iterations for each parameter. Model performance was evaluated using the Mean Absolute Percentage Error (MAPE). The results show that air temperature and humidity achieved the highest predictive accuracy, with MAPE values of 4. 04 percent and 3. 18 percent. These values indicate high model Solar radiation intensity and wind speed produced moderate accuracy with MAPE values of 38. 83 percent and 44. 44 percent. In contrast, rainfall exhibited low predictive performance with a MAPE of 53. 13 percent. This low performance is primarily caused by high temporal variability and limited data The findings demonstrate that Monte Carlo simulation is effective for predicting meteorological variables with stable patterns but less suitable for parameters with extreme fluctuations such as rainfall. Introduction Weather conditions significantly influence daily human activities, especially in tropical countries such as Indonesia where climatic variability occurs throughout the year . Meteorological parameters that include rainfall, air temperature, wind speed, humidity, and solar radiation interact with each other and determine local and regional weather patterns. Rainfall is one of the most difficult variables to predict because of its irregular and highly fluctuating nature. This challenge is even more serious in Cilacap Regency, which is a coastal region that is vulnerable to hydrometeorological disasters such as floods caused by high rainfall intensity . Accurate meteorological prediction is essential to support climate-sensitive sectors, disaster mitigation programs, and the development of early warning systems. Various statistical and computational methods have been used to improve prediction accuracy and reduce uncertainty caused by natural variability in weather data . One of the probabilistic methods that is widely used is the Monte Carlo simulation. This method allows researchers to generate multiple possible scenarios by using probability distributions extracted from historical observations. The accuracy of the estimated output increases as the number of simulations becomes larger . , . Several previous studies have shown the effectiveness of Monte Carlo simulation in analyzing meteorological behavior. Andriani et al. successfully applied the Monte Carlo approach to predict daily rainfall by using 40 years of historical data. The study demonstrated that the method is capable of modeling tropical weather conditions that contain considerable uncertainty . Arini and Cipta Journal of Computer Science and Engineering (JCSE) Vol. No. August 2025, pp. e-ISSN 2721-0251 also used Monte Carlo simulation to model monthly rainfall patterns based on multiple meteorological inputs in Medan City. Their study achieved a MAPE value of 12. 28 percent, which indicates that Monte Carlo simulation can perform well for parameters with stable characteristics . Despite these advances, research that applies Monte Carlo simulation to predict multiple meteorological parameters at the same time in coastal regions with high rainfall variability is still Based on this gap, the present study focuses on two main research questions. The first question is how effective the Monte Carlo simulation method is for predicting monthly meteorological parameters in Cilacap Regency. The second question is which parameters can be predicted accurately and which ones contain high uncertainty. The contributions of this study can be summarized as follows. The first contribution is the implementation of a multi-parameter Monte Carlo simulation model using monthly meteorological data from 2022 to 2024. The second contribution is the parameter-specific accuracy evaluation using MAPE to measure predictive stability. The third contribution is the analysis of parameter uncertainty which can be used to support climate-based decision-making and the development of early warning The objective of this study is to evaluate the capability of the Monte Carlo simulation method in generating accurate predictions for rainfall, air temperature, wind speed, humidity, and solar radiation intensity. By analyzing historical data patterns and variability, the findings are expected to support probabilistic weather forecasting in coastal regions. Method This study was conducted in Cilacap Regency. Central Java, located on the southern coast of Java Island. Geographically, the area lies between coordinates 7A30' S - 7A45' S and 108A45' E - 109A30' E, covering a total area of 2,252. 5 kmA. This research employs the Monte Carlo Simulation approach to analyze and predict monthly meteorological parameters in Cilacap Regency. The primary data source comes from the Tunggul Wulung Cilacap Class i Meteorological Station for the period from 2022 to 2024. The research workflow can be seen in Figure 1. Figure 1. Research stages 1 Data pre-processing Data Collection and Processing Process The data used in this study were obtained from the BMKG online database through the website https://dataonline. Data collection was conducted at the Tunggul Wulung Class i Meteorological Station in Cilacap, covering the period from January 2022 to December 2024. This Journal of Computer Science and Engineering (JCSE) Vol. No. August 2025, pp. e-ISSN 2721-0251 data includes five main parameters: rainfall, temperature, humidity, solar radiation intensity, and wind speed. Since the BMKG database only provides daily actual data in a one-month range per download, a total of 36 files needed to be manually downloaded to cover the full three-year period, with each file representing data for one month. Table 1. Results of the data processing of the five monthly parameters at the Tunggul Wulung Cilacap Class i Meteorological Station for the period 2022Ae2024 Year Month January February March April May June July August September October November December January February March April May June July August September October November December January February March April May June July August September October November December Rainfall . Temperature (AC) Wind speed . Humidity (%) Solar Radiation Intensity . The data processing sequence is as follows. The data from each monthly file were merged into a single Excel file to simplify the analysis. In the combined file, the data columns were organized into a standard format with headers: Year. Month. Rainfall. Temperature. Wind Speed. Humidity. Solar Radiation Intensity. Daily data for the rainfall parameter were summed up for each month using a summation method to reflect the total monthly rainfall. For other parameters . emperature, humidity, solar radiation intensity, and wind spee. , the monthly averages were calculated. This averaging was aimed at obtaining a representative value for the daily conditions over the month. Journal of Computer Science and Engineering (JCSE) Vol. No. August 2025, pp. e-ISSN 2721-0251 After the data were accumulated, the final result was a table consisting of 36 rows, with each row representing monthly data from January 2022 to December 2024. The results of this monthly data processing are presented in Table 2. Google Colaboratory was used to run the Monte Carlo model by executing Python scripts directly in the cloud, without the need for local installation. Next, relevant Python libraries such as numpy and pandas were imported for data manipulation and numerical analysis. The meteorological data, now combined in Excel, were imported into the analysis script. This data includes monthly information from January 2022 to December 2024. After the data from the Excel file are imported into the script, the next step is to calculate the probability distribution and cumulative distribution for each parameter. This stage serves as the foundation for building the Monte Carlo-based prediction model, which will be explained as follows. Probability Distribution The probability distribution is calculated by dividing the frequency of occurrence of each variable by the total frequency . This step aims to understand the distribution pattern of historical data. The probability distribution is calculated using the following equation: ycEycn = ycu Where: = Probability distribution = Frekuency = Total frequency Cumulative distribution The cumulative distribution is calculated by summing the probability of the current event with the cumulative result of previous events . , . This can be expressed using the following . ycEya = yaycEya ycE Where: HPK = Cumulative distribution = Previous cumulation results = Next probability distribution 2 Data analysis techniques Monte Carlo Simulation Determination of random number intervals Each value in the probability distribution is assigned a random number interval, starting from the initial limit of zero for the first variable up to the final limit based on the cumulative distribution results . , . Generation of random numbers Random numbers are generated using the linear congruence method with specific parameters, namely the multiplier constant, the shift constant, the modulus, and the initial value . , . This can be expressed using the following equation: ycsycn = . ycsycn Oe 1 y. Mod m Journal of Computer Science and Engineering (JCSE) Vol. No. August 2025, pp. Where: Zi-1 e-ISSN 2721-0251 = The value of the i-th number = Initial number . nteger >= 0. Z0 < . = Multiplier constant . < . = Shift constant (C < . = Modulus constant . > . Evaluation of prediction results Mean Absolute Percentage Error (MAPE) is one of the most commonly used metrics to measure the accuracy level in predictive models . , . MAPE calculates the average percentage error between the actual values and the predicted values in the dataset. This metric provides an indication of how large the prediction errors are relative to the actual values, expressed as a percentage. ycAyaycEya = Ocycu yayc Oe yayc ycu Where: = Actual data in period t = Predicted value in period t = Total period The interpretation of MAPE results is as follows: Table 2. Interpretation of MAPE MAPE (%) Interpretation <10 10 - 20 20 - 50 > 50 Excellent prediction accuracy Good prediction accuracy Acceptable prediction accuracy Poor prediction accuracy Results and Discussion This section presents the prediction results for five meteorological parameters in 2025 generated using the Monte Carlo simulation method. The parameters include rainfall, air temperature, wind speed, humidity, and solar radiation intensity. The results are analyzed with respect to seasonal patterns, parameter stability, and prediction accuracy evaluated using the Mean Absolute Percentage Error (MAPE). Comparisons with previous studies are also provided to strengthen the interpretation of model performance. General Analysis of Prediction Results Table 3 presents the prediction results generated by the Monte Carlo simulation for each meteorological parameter in 2025. Rainfall predictions show substantial variability from month to The lowest predicted rainfall amount is 90 mm, which occurs in June and November. The highest predicted rainfall appears in February with a value of 790 mm. The high rainfall prediction for February is consistent with IndonesiaAos rainy season, while the very low rainfall prediction for November does not match the expected seasonal pattern. This inconsistency suggests that the rainfall parameter contains high levels of uncertainty. Predictions for temperature remain within a narrow range of 24 to 29 degrees Celsius, which reflects stable seasonal transitions. Predictions for wind speed and humidity also show small variations, with values between 1 and 3 m/s and 78 to 83 percent. Solar radiation intensity is predicted to range from 4 to 8 hours per day, with the highest value occurring in August during the dry season. Journal of Computer Science and Engineering (JCSE) Vol. No. August 2025, pp. e-ISSN 2721-0251 Table 3. Prediction results Year Month January February March April May June July August September October November December Rainfall . Temperature (AC) Wind speed . Humidity (%) Solar Radiation Intensity . Parameter Analysis Based on Seasonal Patterns Air Temperature Predicted air temperature ranges from 24 to 29 degrees Celsius, which corresponds closely to the thermal conditions of the Cilacap region. The narrow temperature range indicates that the probabilistic distribution based on historical data effectively captures the thermal stability of the area. Humidity Humidity values range between 78 percent and 83 percent, with the highest levels appearing during the rainy season from January to March. The decline in humidity during July and August corresponds to the dry season. These patterns demonstrate a direct relationship between rainfall intensity and atmospheric moisture content. Wind Speed The predicted wind speed varies between 1 and 3 m/s. The highest values occur during the dry season, when pressure gradients are typically stronger. This seasonal variation is consistent with regional wind patterns influenced by monsoonal flow. Solar Radiation Intensity Solar radiation intensity ranges from 4 to 8 hours per day. August shows the highest radiation duration, which aligns with the driest period of the year. October records the lowest radiation due to increased cloud cover during the transition period between monsoon phases Evaluation of Prediction Accuracy Using MAPE The accuracy of the prediction results is shown in Table 4. Air temperature and humidity demonstrate the highest accuracy, with MAPE values of 4. 04 percent and 3. 18 percent. These values indicate that Monte Carlo simulation performs well for parameters that have stable patterns and low variability. Solar radiation intensity and wind speed show moderate accuracy, with MAPE values of 38. percent and 44. 44 percent. Although these values are still within an acceptable range, the relatively high error indicates the presence of moderate uncertainty in these parameters. Table 4. Evaluation of Prediction Results Meteorological parameter Rainfall Temperature Wind speed MAPE (%) Journal of Computer Science and Engineering (JCSE) Vol. No. August 2025, pp. Meteorological parameter Humidity Solar Radiation Intensity e-ISSN 2721-0251 MAPE (%) Rainfall achieves the lowest prediction accuracy, with a MAPE value of 53. 13 percent. This value is included in the inaccurate category. Several factors contribute to this low accuracy, including the highly skewed distribution of rainfall, the presence of extreme values, near-zero rainfall occurrences, and the short data period that spans only from 2022 to 2024. Rainfall data generally follow Gamma or Exponential distributions rather than normal-like distributions. Because of this characteristic. Monte Carlo simulation that uses general probability distributions becomes less effective for predicting rainfall. In general. Monte Carlo simulation is effective for predicting meteorological parameters that show stable patterns such as air temperature and humidity. However, its predictive capability decreases for parameters that contain high irregularity and large fluctuations such as rainfall. This finding aligns with previous research results which emphasize that Monte Carlo simulation produces better accuracy when used for variables that do not exhibit extreme variability. To improve the prediction performance for rainfall, future studies may apply longer historical datasets, seasonal decomposition, or specialized probability models such as the Gamma distribution. Comparison with Previous Studies The findings of this study are consistent with research conducted by Arini and Cipta . , which found that Monte Carlo simulation provides high accuracy for stable meteorological parameters but lower accuracy for highly variable parameters such as rainfall. This is also in line with the study by Andriani et al. , which emphasized that long-term historical data are necessary to accurately estimate rainfall distributions. The comparison indicates that Monte Carlo simulation remains a reliable method for parameters with low seasonal variability. However, for parameters influenced by extreme fluctuations, such as rainfall, the simulation results depend heavily on the length and quality of the historical dataset. Conclusion This study concludes that the Monte Carlo simulation method is effective for predicting meteorological parameters with stable monthly patterns, particularly air temperature and humidity, which achieved low MAPE values of 4. 04 percent and 3. 18 percent. These results indicate that the probabilistic distribution derived from historical data can accurately represent parameters with low Wind speed and solar radiation intensity show moderate accuracy with MAPE values of 44 percent and 38. 83 percent, reflecting the influence of short-term atmospheric fluctuations that reduce prediction stability. Rainfall demonstrates the lowest accuracy with a MAPE value of 53. percent, mainly due to its highly irregular nature and significant deviations from typical seasonal patterns in Indonesia. The findings highlight that the Monte Carlo method is suitable for modeling stable meteorological variables but less effective for parameters dominated by extreme variability. Improving prediction performance requires longer historical datasets, more representative probability distributions, and the refinement of the simulation model. Future studies may integrate additional data sources, such as satellite observations and climate indices, to enhance rainfall predictability and support early warning Journal of Computer Science and Engineering (JCSE) Vol. No. August 2025, pp. e-ISSN 2721-0251 Acknowledgment The author would like to express their deepest gratitude to the Meteorology Study Program. State College of Meteorology. Climatology, and Geophysics, for the guidance, provision of facilities, and access to various resources needed during the research process, enabling the successful completion of this study. It is hoped that this research will contribute to the college's role in the development of science and technology in the field of meteorology. References