Performance of Solar Power Plant Based on ERA5 Data
This simulation is modeling the potential energy output of a solar power plant in Okres Louny, Czech Republic. Simulation is based on historical meteorological data from the ERA5 reanalysis dataset to determine energy production estimates. This kind of simulation can help potential solar power plant investors (households and commercial entities) calculate the feasibility of installing the solar power plant based on potential energy production and electrical power consumption.
Contents
Methods
Simulation is created using the Monte Carlo method.
Technologies used were Python 3.12 for downloading and processing ERA5 GRIB data and Microsoft Excel for running the Monte Carlo simulation.
Workflow
Please note that the Czech version of Excel was used, and thus, function names and all other language-specific settings are aligned to this environment.
Data downloading and processing
ERA5 is the fifth generation ECMWF reanalysis for the global climate and weather for the past 8 decades. Data is available from 1940 onwards. It provides hourly estimates for many atmospheric, ocean-wave, and land-surface quantities, one of which is surface solar radiation downwards. Data were thus downloaded from the ECMWF's public archive of ERA5 using ECMWF CDS API and Python in GRIB data format.
The data requested were from the dataset reanalysis-era5-single-levels from January 2015 to November 2024 since this simulation took place in December 2024. Only variable surface_solar_radiation_downwards has been requested since this parameter is the amount of solar radiation that reaches a horizontal plane at the surface of the Earth and thus is perfect for this simulation. Because this simulation is aimed to estimate the power outputs of a solar power plant located in Okres Louny, Czech Republic (Roughly N 50°21′00″; E 013°47′00″), the requested area was specified by bbox [[13.75, 50.5],[14.00, 50.5],[14.00, 50.25],[13.75, 50.25],[13.75, 50.5]] (in CDS API call the array [50.50, 13.75, 50.25, 14.00] has been used) - that is because ERA5 resolution is approximately 31 km - 0.25° grid.
This data was then processed using Python's xarray and pandas libraries into CSV file containing columns valid_time,latitude,longitude,ssrd_j,ssrd_wh where valid_time is date and time of row entry, latitude and longitude is geographical location to which this data corresponds, ssrd_j is value of surface solar radiation downwards in J/m² and ssrd_wh is value of surface solar radiation downwards in Wh/m². ssrd_wh was computed from ssrd_j by multiplying this value by 0.000277777778 (1 J = 0.000277777778 Wh). Also, only the data for the position closest to the Louny was extracted (N50.25; E013.75 - Solopysky, around 12 km straight line from Louny)
The format of the final CSV file is as follows:
valid_time,latitude,longitude,ssrd_j,ssrd_wh 2022-01-01 00:00:00,50.25,13.75,0.0,0.0 2022-01-01 01:00:00,50.25,13.75,0.0,0.0 2022-01-01 02:00:00,50.25,13.75,0.0,0.0 2022-01-01 03:00:00,50.25,13.75,0.0,0.0 2022-01-01 04:00:00,50.25,13.75,0.0,0.0 2022-01-01 05:00:00,50.25,13.75,0.0,0.0 2022-01-01 06:00:00,50.25,13.75,0.0,0.0 2022-01-01 07:00:00,50.25,13.75,0.0,0.0 2022-01-01 08:00:00,50.25,13.75,23808.0,6.6133337 2022-01-01 09:00:00,50.25,13.75,87360.0,24.266666 2022-01-01 10:00:00,50.25,13.75,211136.0,58.64889 2022-01-01 11:00:00,50.25,13.75,381056.0,105.84889 2022-01-01 12:00:00,50.25,13.75,522752.0,145.2089 2022-01-01 13:00:00,50.25,13.75,562112.0,156.14223 ... ... ... 2024-11-30 11:00:00,50.25,13.75,642816.0,178.56 2024-11-30 12:00:00,50.25,13.75,617088.0,171.41333 2024-11-30 13:00:00,50.25,13.75,481024.0,133.61778 2024-11-30 14:00:00,50.25,13.75,294528.0,81.81333 2024-11-30 15:00:00,50.25,13.75,73792.0,20.497778 2024-11-30 16:00:00,50.25,13.75,0.0,0.0 2024-11-30 17:00:00,50.25,13.75,0.0,0.0 2024-11-30 18:00:00,50.25,13.75,0.0,0.0 2024-11-30 19:00:00,50.25,13.75,0.0,0.0 2024-11-30 20:00:00,50.25,13.75,0.0,0.0 2024-11-30 21:00:00,50.25,13.75,0.0,0.0 2024-11-30 22:00:00,50.25,13.75,0.0,0.0 2024-11-30 23:00:00,50.25,13.75,0.0,0.0
Excel data import and preparation.
The previously generated CSV file was imported into Excel using the data import tool - Data tab, Load and Transform data - From text/CSV into sheet solar_radiance_data. This newly imported table/data range has been assigned a name in Excel Name Manager and will be referenced as solar_radiance_data.
Into solar_radiance_data two columns were added:
yearmonthday
yearmonthday: =CONCAT(HODNOTA.NA.TEXT(ROK([@[valid_time]]);"00");HODNOTA.NA.TEXT(MĚSÍC([@[valid_time]]);"00");HODNOTA.NA.TEXT(DEN([@[valid_time]]);"00"))
monthday
monthday: =ZPRAVA([@yearmonthday];4)
These will be useful in the future to filter out and calculate the average solar radiance of one user-specified day throughout the historical data.
For the same purpose, column unique_days (with the same name in Excel Name Manager) has been created in a separate sheet unique_days
unique_days: =ZPRAVA(UNIQUE(solar_radiance_data[yearmonthday]);4)
Monte Carlo Simulation Inputs and Outputs
First of all, a new sheet monte_carlo has been created. In this sheet, the table for User input was created as follows:
PP_PANEL_AREA [m^2] | 1,75 |
PP_PANEL_NUM | 16 |
PP_PANEL_EFFICIENCY | 0,206 |
PP_PERFORMANCE_RATIO | 0,75 |
MC_PANEL_EFFICIENCY_SD | 0,05 |
MC_DAILY_SOLAR_VARIANCE | 0,2 |
MC_SIMULATION_DATE | 25.07.2025 |
In this example, the modeled power plant consists of 16 Panasonic EverVolt solar panels of an area of 1,75 m². Panel efficiency is sourced from the manufacturer specs sheet and is 20,6 %. The performance ratio of the power plant itself (like power inverter, etc.) is expected to be 75 %. The standard deviation of panel efficiency is expected to be 5 %, and the daily solar variance is 20 % for the Czech Republic. The example date is 25th June 2025.
The second table is an output of Monte Carlo Simulation and some other helpful information:
PP_POWER_PLANT_AREA | 28 |
MC_SIMULATION_DAYMONTH | 0725 |
AVERAGE_DAY_RADIATION [Wh/m^2] | 5775,94 |
MEAN_PRODUCTION [Wh] | 24973,25 |
STANDART_DEVIATION [Wh] | 7929,37 |
The first variable is self-explanatory and is only a simple multiplication of
PP_POWER_PLANT_AREA: =PP_PANEL_AREA*PP_PANEL_NUM
Variable MC_SIMULATION_DAYMONTH is used to filter days from solar_radiance_data and calculate AVERAGE_DAY_RADIATION as follows:
AVERAGE_DAY_RADIATION: =SUMIFS(solar_radiance_data[ssrd_wh];solar_radiance_data[monthday];MC_SIMULATION_MONTHDAY)/COUNTIF(unique_days;MC_SIMULATION_MONTHDAY)
The name AVERAGE_DAY_RADIATION is once again self-explanatory - it is an average solar radiance amount for a selected day based on historical data (in Wh/m²)
Finally, variables MEAN_PRODUCTION and STANDART_DEVIATION are output variables of Monte Carlo simulation, and as their names suggest, they represent values of normal distribution of a power plant's power output. More explanation of this simulation is below.
Monte Carlo Simulation
The Monte Carlo simulation itself is computed in monte_carlo_computations sheet. Our target variable is the ENERGY_OUTPUT of the solar power plant. Using formula
E = A * P_v * R_v * PR where E = Energy A = Total solar panel Area (''PP_TOTAL_AREA'') P_v = solar panel efficiency variations (variable ''PP_EFFICIENCY_VARIATIONS'') R_v = solar radiation variations (variable ''SR_VARIATIONS'') PR = performance ratio of power plant (variable ''PP_PERFORMANCE_RATIO'')
PP_EFFICIENCY_VARIATIONS
PP_EFFICIENCY_VARIATIONS is the value of efficiency used in one computation. It is based upon normal distribution and is calculated as follows:
PP_EFFICIENCY_VARIATIONS: =NORM.INV(NÁHČÍSLO();PP_PANEL_EFFICIENCY;MC_PANEL_EFFICIENCY_SD)
SR_VARIATIONS
SR_VARIATIONS is value of daily solar radiance based on AVERAGE_DAY_RADIATION and MC_SOLAR_VARIANCE calculated as follows:
SR_VARIATIONS: =AVERAGE_DAY_RADIATION*NORM.INV(NÁHČÍSLO();1;MC_DAILY_SOLAR_VARIANCE)
ENERGY_OUTPUT
Finally, ENERGY_OUTPUT is calculated using the formula mentioned above:
ENERGY_OUTPUT: =PP_TOTAL_AREA*PP_EFFICIENCY_VARIATIONS*SR_VARIATIONS*PP_PERFORMANCE_RATIO
After this calculation, the What-if Analysis was executed on the same sheet in the range of F3:Z2000 - that is 41958 simulations in total. This cell range is named MC_WHATIF and is further used back on monte_carlo sheet in cells MEAN_PRODUCTION and STANDART_DEVIATION.
MEAN_PRODUCTION
Variable MEAN_PRODUCTION is one of the two output variables of this Monte Carlo simulation. It represents the average energy output of a modeled solar power plant and thus is computed as:
MEAN_PRODUCTION: =PRŮMĚR(MC_WHATIF)
STANDART_DEVIATION
STANDART_DEVIATION is, as the name suggests, the standard deviation of the cell range MC_WHATIF and thus is computed using a function:
STANDART_DEVIATION: =SMODCH.P(MC_WHATIF)
Files
File:Matj27 power plant monte carlo.zip
Conclusion
The simulation successfully demonstrated the computation of the potential energy output of a solar power plant in the Okres Louny using historical meteorological data from the ERA5-Reanalysis dataset and the Monte Carlo method. By combining historical solar radiation data with Monte Carlo simulation, it was possible to estimate expected energy production and its variability precisely. These results can be a valuable tool for potential investors such as households and commercial entrepreneurs, enabling them to assess the feasibility of solar power plant installations based on realistic energy production forecasts. Thanks to the Monte Carlo simulation, it was possible to account for uncertainties in renewable energy projects, such as panel efficiency and daily solar variability. This ensures that stakeholders can make informed decisions and anticipate risks more effectively.
Future work could expand on this approach by incorporating additional factors, such as seasonal maintenance, shading effects, and long-term climate trends, to further refine the accuracy of energy output predictions. For the best user experience, further work can incorporate monthly outputs, provide users with detailed graphs or histograms, or incorporate a decision support system.
Note
Please note that after the new opening of this Excel spreadsheet, recalculating the values by pressing F9 does not work. The author does not know why this happens, but it seems like some kind of limitation of Excel itself - it is possible to be some kind of security protection since there is imported data from an external source - CSV fíle. To recalculate output values, it is necessary to go into the function input bar at the top of any input field (for example, MEAN_PRODUCTION variable) and press Enter there. After that, the values of MEAN_PRODUCTION as well as STANDART_DEVIATION are recalculated, and pressing F9 to recalculate the entire spreadsheet works as well.
References
Czech Educational and Scientific Network (CESNET). (n.d.). ERA5. Metacentrum Documentation. Accessed on: 1st December 2024. Accessible at: https://docs.metacentrum.cz/related/collgs/era5/
Copernicus Climate Change Service, Climate Data Store, (2023). ERA5 hourly data on single levels from 1940 to present. Copernicus Climate Change Service (C3S) Climate Data Store (CDS). DOI: 10.24381/cds.adbb2d47. Accessed on: 1st December 2024. Accessible at: https://cds.climate.copernicus.eu/datasets/reanalysis-era5-single-levels
Hersbach, H., Bell, B., Berrisford, P., Biavati, G., Horányi, A., Muñoz Sabater, J., Nicolas, J., Peubey, C., Radu, R., Rozum, I., Schepers, D., Simmons, A., Soci, C., Dee, D., Thépaut, J-N. (2023). ERA5 hourly data on single levels from 1940 to present. Copernicus Climate Change Service (C3S) Climate Data Store (CDS). DOI: 10.24381/cds.adbb2d47. Accessed on: 1st December 2024. Accessible at: https://cds.climate.copernicus.eu/datasets/reanalysis-era5-single-levels
Panasonic. (2022). Evervolt(R) 360K Specification Sheet. EVERVOLT(R) SOLAR MODULE BLACK SERIES. Accessed on: 1st December 2024. Accessible at: https://ftp.panasonic.com/solar/evervolt/evervolt_black_series_datasheet.pdf
Photovoltaic-software.com. (2024). How to calculate the annual solar energy output of a photovoltaic system?. In Photovoltaic-software.com. Acessed on: 1st December 2024. Accessible at: https://photovoltaic-software.com/principle-ressources/how-calculate-solar-energy-power-pv-systems
Šalamon, T. & Svatoš, O. (2024). Lectures for 4IT496 Simulations of Systems. Faculty of Informatics and Statistics University of Economics and Business Prague. Accessed on: 1st December 2024. Accessible via document server in InSIS (https://insis.vse.cz)
Wikipedia contributors. (2024). Monte Carlo method. Wikipedia, The Free Encyclopedia. Accessed on: 1st December 2024. Accessible at: https://en.wikipedia.org/w/index.php?title=Monte_Carlo_method&oldid=1262423747