Computer Programming to Estimate the Global Daily and Hourly solar Radiation of any location around the Globe

ABSTRACT


Introduction
Solar energy is the mother of almost all energy available in the world. In addition, it is the most abundant and evenly distributed form of energy. The amount of solar energy captured by our planet during one hour may be adequate to cover the world's energy demand for one year [1]. Solar energy is the most common type of renewable energy and has a great role in creating a green energy environment. Despite its crucially, measuring solar radiations is tidies and costly especially for developing countries like sub-Saharan Africa. As it is one of the climatic variable data, numerous researches have been conducted to develop models that relate ground level solar radiation data with the extraterrestrial one. As such, different models have been developed, evaluated, and calibrated across the globe to relate ground-level global radiation with sunshine hour, temperature, and humidity of the thematic climatic region [2].
The estimated solar radiation model developed in one region of the globe gives a less reasonable result in another climatic region. Disregarding such regional differences results in surface ground radiation error as large as 35% [3]. This study focuses on using computer programing that solar energy-related researchers or any user can evaluate the output of the estimated solar radiation in their climatic regions using a minimum effort in finding the results.

Model Used in the Study
An easy way to comply with the conference paper formatting requirements is to use this document as a camera-ready template. Solar data collection and radiation analysis are basic to study several solar energy-related types of research. But, most researchers get difficulty while collecting such valuable data. In most developing countries and rural areas of the world, it is a bottleneck situation to get the ground-level solar radiation data. The intended purpose of this research is to develop a code that can estimate the daily and hourly variation of global solar radiation for any location around the globe. A python script is developed to make users flexible to use for any climatic region of the world. As an illustration, the developed code is implemented for three regions namely, Algeria, Pakistan, and Nigeria that researchers developed a correlation for each climatic region. The output shows that it is possible to use a computer program for any climatic region that researchers or any users want to find the estimated global daily and hourly solar radiation data.

Estimation of daily and hourly ground level global solar radiation
Angstrom [4], who relates it with the sunshine hour duration of the day, gave the easiest model used for the estimation of daily Surface solar radiation on a ground level, as given in Eq. (1). Most researchers around the globe recodify this basic equation to get the most accurate result in their climatic region.
Where, HG is global daily solar radiation on a horizontal surface, Ho is the daily extraterrestrial solar radiation on a horizontal surface given by Govindasamy and Chetty [5] as given in Eq. (2). S is the actual bright sunshine hour of the day, SO is the possible maximum bright sunshine hour of the day, and a and b are regression constant. The different regression model has been founded by deferent researchers as per their climatic region. In this study, the user is flexible to use any of those models that researchers predict the ground-level solar radiation in his or her location.
Where, Io is the hourly extra-terrestrial radiation on a horizontal surface as given by Tiwari et al., [6] as shown in Eq. (3).
And, φ, δ and ω in Eq. (2) are latitude (the angular location north or south of the equator), declination angle in degree [5 ] as shown in Eq. (4), and the sunset hour angle in degree [5 ] as given in Eq. (5), respectively.
(567) = 896 -1(-tan (:) tan (;)) In Equation (3) Isc = 1367 W/m2 is the solar constant, n is the day of the year 1 for January 1st, θis the zenith angle (the angle between the vertical and the line to the sun or the angle of incidence of beam radiation on a horizontal surface) as given in Eq. (6).
Where, ω is the hour angle (the angular displacement of the sun east or west of the local meridian due to the rotation of the earth on its axis at 150 per hour) [6] as given in Eq. (7). 5 = 15(69=>7 ?@AB -12) Estimation of hourly surface solar radiation on a ground level is calculated from the knowledge of the monthly average daily global and diffuses radiation on a ground level [8], which is calculated from the following equation.

Selected research works used in the code
In this study, three researchers from Nigeria, Algeria, and Pakistan are selected to implement their work in the code. Nia et al. [9] predict the mean monthly global solar radiation in Algeria at four different Algerian locations (Algiers, Oran, Bechar, and Tamanrasset). Using available climatological measured data they try to optimize the production efficiency of photovoltaic energy by estimating the solar radiation in their region. In their study, they developed up to 8 models to get good results considering statistical parameters like mean bias error (MBE), mean absolute error (MAE), and root mean square error (RMSE). From the result obtained they concluded that model 3 in Eq. (10) and model 8 in Eq. (11) give a great comparable result with the experimental data for Oran and Tamanrasset, and Algiers and Bechar, respectively.
Model 3 by Nia et al. [9], third-order correlation with sunshine duration given by, Model 8 by Nia et al. [9], Correlation with sunshine duration, temperature, and humidity has given by, Where T is the daily average temperature and Tmax is the daily average maximum temperature of the year. A,b,c and d are regression constants given as in the appendix. The monthly averages of experimental solar radiation data, bright sunshine hour, temperature, and relative humidity for the four stations processed for the correlations as per Nia et al. [9] are shown in the appendix.
The second selected study is by Ahmad et al, [10] that developed Correlation equations as in eq. (12) and eq. (13) to obtain the monthly average daily global, beam, and diffuse solar radiation at Karachi, Pakistan.
The last selected study is by Gana and Akpootu [12] analyzed four different models for the region around North-Western Nigeria, Kebbi. In addition, they founded that model 2 in eq (13) give excellent fit for the experimental result obtained in term of both coefficient of regression (R²) and correlation coefficient.

Code Implementation
A Python code is developed with a sys. version 3.8.5 to determine the ground daily and hourly global radiation for the selected climatic region. In this program, a user has requested to input the latitude of his or her climatic region as shown below.

Lat = float(input('enter the latitude of your location '))
The user was also asked to input the correlation found by researchers that relate the ground solar radiation of the climatic region with the sunshine hour, temperature (if it is related), and humidity (if it is related). Lastly, the user is asked to input the correlation found by the researchers in his or her climatic region as a function of those variables as. Here the user induces the function that relates the solar radiation with those variables that correlated by the researchers.
The general flow chart of the python script developed is shown in Fig. (1) Below:

Results and Discussion
The solar irradiance estimation for the three selected research areas is feed to the program and has the following output that has the same result as each of the researcher outputs. Figure 2 shows the estimated daily and hourly global solar radiation for the four Algerian climatic regions namely Oran, Tamanrasset, Algiers, and Bechar.

Conclusion
It is concluded that the program developed for the estimation of ground-level solar radiation can be applicable for any climatic region of the world. From the result, it can be dictated that the user needs only be asked to impose his or her climatic region bright sunshine hour, Temperature (if it is a parameter of the correlation developed), Humidity (if it is a parameter of the correlation developed), and a correlational function developed by the researchers. So that, the developed code will evaluate the estimated surface global solar radiation in the climatic region of his location using those parameters as input.