Development of New Models for the Estimation of Hourly Components of Solar Radiation: Tests, Comparisons, and Application for the Generation of a Solar Database in Morocco

All studies of solar systems need the hourly values of solar fluxes related to the different components of solar radiation. However, for most sites, measurements are not available. The goal of this paper is to establish an hourly solar radiation data bank for the entirety of Morocco. This data bank will contain the energetic components (global, diffuse, direct, and inclined solar radiation) and the spectral components (ultraviolet IUV, infrared IIR , and photosynthetically active radiation IPAR). To create this database, in the beginning, we build up models for predicting the various components of the hourly solar radiation, from measurements provided by the different stations owned by the Laboratory of Solar Energy and Environment (LESE). Then, these equations will be verified by using statistical tests. Moreover, we compared our results with those obtained by similar studies. Finally, based on the daily database of global radiation provided by the Laboratory of Solar Energy and Environment, we created an hourly database that unites the various components of solar radiation over 10 years for the entirety of Morocco. Regarding the validity study, the statistical indicators showed that the used models have minimal errors that do not exceed, for the global radiation, -2.93% in Rabat, -3.9% in Tangier,-3.28% in Marrakech, and -0.85% in Fez, and for diffuse radiation, -1.09% in Rabat, -0.68% in Fez,-3.08% in Tangier, and -2.49% in Marrakech. These results show the good quality of the used estimation models. Thus, the data bank that we have realized will fill the gap of the hourly solar data and will meet the needs of engineers, installers of solar systems, and researchers who often need an extensive database.


Introduction
For most practical applications of solar energy (habitat, thermal conversion systems, photovoltaic conversion systems), the values of daily irradiation are insufficient, because the variations of solar irradiation during the day affect the functioning of the solar systems. Consequently, in the performance analysis, we need to know hourly data in the way to test the impact of the solar radiation variation on such systems. However, in most stations, there are no hourly values; for this reason, we need methods to estimate the various components of hourly solar radiation.
To fill the lack of hourly solar radiation data, several models have been made. We can mention among them, the ASHRAE model [1] for predicting the hourly global radiation, hourly diffuse radiation, and hourly beam radiation, in terms of zenith angle, latitude, hour angle, and solar declination. This model was revised by Nijegorodov [2] for Botswana, Machler and Iqbal [3] for Canada, and Parishwad et al. [4] for India.
Other models were generated to predict direct normal terrestrial solar radiation through the normal extraterrestrial solar radiation and Linke turbidity factor such as the Perez et al. model [5], or in terms of the air mass, integrated Rayleigh scattering optical thickness of the atmosphere, and Linke turbidity factor such as the Kasten and Young model [6], or in terms of zenith angle, altitude, and atmospheric transmittance such as the Hottel model [7].
Furthermore, many models were mad to predict diffuse radiation such as the Liu and Jordan model [8] based on data from 98 localities in the USA and Canada with latitudes between 19 and 55°N; the Orgill and Hollands model [9] based on data from Toronto, Canada; the Erbs et al. model [10] developed with measurements from five stations in the USA with latitudes between 31 and 42°N, the Spencer model [11] based on data from five stations in Australia with latitudes between 20 and 45°S; the Reindl et al. model [12] based on data from five locations in the USA and Europe with latitudes between 28 and 60°N in terms of the clearness index and the solar elevation; the Lam and Li model [13] based on data from Hong Kong with latitude equal to 22.31°N; the Hawlader model [14] using data from a tropical site in Singapore; the De Miguel et al. model [15] based on data set from several countries in the North Mediterranean Belt area; the Chandrasekaran and Kumar model [16] based on data from a tropical environment in Madras, India; and the Oliveira et al. model [17] based on data from a tropical Sao Paolo site, Brazil.
Moreover, various models were developed to estimate the hourly global radiation like the Whillier/Liu and Jordan model [18], the Collares-Pereira and Rabl model [19], the Jain model [20] based on the normal distribution equation, and the Garg and Garg model [21] based on data from various Indian sites.
In addition, we can find different models to approximate the spectral components of solar radiation. We can cite among them, the Canãda et al. model [22] used to predict the I uv through the total clearness index K t ; the Escobedo model [23] used to predict I UV , I PAR , and I IR through the global solar radiation under various sky conditions at Botucatu, Brazil; and the Jacovides et al. model [24] which gives the relationship between global photosynthetically active radiation (PAR) and global solar radiation at Athalassa, Cyprus.
At last, there are new methods to predict the hourly solar radiation based on artificial intelligence, for example, the neural-network methods [25], the neuro-fuzzy methods, and the methods based on the satellite image data [26].
All these models and many others can be grouped into four main categories according to the type and the way of processing the used data. Therefore, we find physical models [27,28], empirical models [29][30][31], models based on artificial intelligence [32][33][34][35], and hybrid models [36,37]. All these methods represent more than 294 models around the world [38]. Recently, to find the valid estimation model for a site, several comparison works have been carried out, such as Betti et al.'s work in Croatia [39], Wang et al.'s work [40] in China, and Chukwujindu's work in Africa [32].
The paper's goal is to establish an hourly solar radiation data bank for the entirety of Morocco. This data bank will contain the energetic components (global, diffuse, direct, and inclined solar radiation) and the spectral components (ultraviolet I UV , infrared I IR , and photosynthetically active radiation I PAR ).
To develop this work, we will go through the following steps: Finally, based on the database of daily global radiation owned by LESE, we generated at first the hourly global radiation and after the other components of solar radiation for the entirety of Morocco over 10 years. According to the above goals, the remainder of the paper is structured as follows. In Section 2, the description and analysis of data are introduced. In Section 3, the methods of developing the database are presented. In Section 4, some existing models and correlations are cited. Section 5 provides the method of reconstituting the hourly values. Section 6 shows the used statistical indicator. Results and discussions are presented in Section 7. Finally, the conclusion is given in Section 8.

Description and Analysis of Data
The Laboratory of Solar Energy and Environment has two types of data: (i) The hourly data obtained directly from ten years of measurements of solar radiation components (2009)(2010)(2011)(2012)(2013)(2014)(2015)(2016)(2017)(2018), taken by four stations spread over the Moroccan territory. These data have been subdivided into three intervals: (i) An eight-year interval (2009-2016) for the development of the different models and correlations.
(ii) A second interval consisting of data for the year 2017 for the comparison and selection of the models.
(iii) A third interval relating to the data for the year 2018 reserved for the validation of the models.
(ii) The daily data obtained by extrapolation over the entire Moroccan territory over a period of ten years [41].  Table 2 brings together these different components and the corresponding measuring instruments [42][43][44].
Using an acquisition system, the measurements are collected every 5 seconds, then accumulated, integrated, and stored at an hourly step. Using these hourly measurements obtained by the four stations, we were able to generate models for estimating hourly solar irradiations for all Moroccan regions.
2.1.3. Data Processing. The hourly database was processed using data processing software. Then, we deleted the erroneous values and replaced some missing values by extrapola-tion. The erroneous values generally come from a short circuit on the terminals of the instruments, mainly observed on rainy days, while the missing values occur by long-term power failure. It should be noted that all the cases of erroneous or missing values represent only 0.006% of the values in the database.

Data Generated by Extrapolation.
In addition to the collected data, the Laboratory of Solar Energy and Environment has a database of daily global solar irradiation obtained by extrapolation [41]. This database includes data for the sites listed in Table 3. Moreover, Figure 1 gives a geographic representation of these sites.

The Methods of Developing the Database
To carry out this work, we will follow the following steps.
At the beginning, using the first interval of the measurement database (2009-2016), we developed new models to estimate hourly global solar irradiation, diffuse solar irradiation, and spectral irradiations of solar radiation.
Secondly, using the second interval constituted by the data for the year 2017, we compared the obtained equations and the existing models with the measurements. The statistical indicators of comparison led us to choose the appropriate models to predict solar irradiations.
Then, we validated the selected models using the third interval consisting of the data for the year 2018.
On the other hand, using the extrapolated database of daily global solar radiation, we generated at first the global hourly radiation and after the other components of solar radiation for the whole of Morocco over 10 years.

Existing Models and Correlations
Daily values of global irradiation are generally available at classical meteorological stations. However, in many solar applications, we need hourly values of solar radiation. Thus, it is necessary to look for methods to estimate the hourly values of the different components of solar radiation. Among these methods, we can cite the following ones.

Liu and Jordan's Method for Estimating Direct Radiation.
The first work for estimating direct radiation was carried out by Whillier [18] and after taken over by Liu and Jordan [8], who established a relationship that gave the ratio of the monthly average of the hourly values and the monthly average of the daily values of the direct radiation: τ b ðωÞ is the monthly mean of the atmospheric transmittance for direct radiation. Assuming that the coefficient τ b ðωÞ is constant during the day, they identified the ratios I b /H b and I oh /H oh : However, several studies have shown that the transmission coefficient is not constant during the day, especially for partially covered days [45,46].Therefore, this estimation model is no longer valid.

The
Method of Collares-Pereira and Rabl for the Estimation of Global Radiation. Since daily values of solar radiation are often available at the meteorological stations, Collares-Pereira and Rabl [19] have taken a purely empirical approach to highlight a relationship between ðI h /H h Þ /ðI oh /H oh Þ ratio and the next variables: (i) The hour angle ω i , calculated in the middle of the considered hour, characterizing the hour (ii) The hour angle of sunset ω c characterizing the month: with a = 0:49 + 0:5016 sin ω c − 60°ð Þ , The coefficients a and b have been calculated by the leastsquares method.

The Hay's Method.
In this method, Hay [47] considered the values of solar irradiation arriving on the ground, before and after the multiple reflections between the ground, clouds, and other constituents of the atmosphere. The equations thus established are where ρ is soil albedo, ρ a is albedo of a sky without clouds, ρ c is cloud albedo, N j is the maximum duration of corrected insolation, and I ′ and I d ′ are the global and diffuse hourly irradiations before the multiple reflections between the ground and the sky.
Then, the obtained correlation between the components I ′ and I d ′ is The Hay method requires knowledge of the monthly average of the hourly global irradiation that is not available in general, as well as the albedo of the clouds that varies with the type, the thickness, and the number of cloud layers and finally the albedo of a cloudless sky that depends considerably on the atmospheric aerosols.

Orgill and Hollands
Correlation for the Estimation of the Diffuse Radiation. This method represents the first correlation of this type. It was established over four years of measurement in Canada (43-48 N) and by following the state of the sky characterized by its clarity index. This method International Journal of Photoenergy includes three equations depending on the K t intervals, and it is given by the following equations (9): The duration of the database used to carry out this correlation varies from 1 to 4 years, and the obtained equations are written in the following form:    (3) from measurement that led us to find a new relation between the ratio I h / H h over I oh / H oh , ω i and ω c . Therefore, we proceeded to adapt the coefficients for Morocco, as follows.
In the first step, we determined the monthly averages of daily global solar irradiation and the monthly averages of hourly solar irradiation using the measured data. Then, for each month, we calculated the values of a and b by the least-squares method. That gave us, for each station, and each coefficient, 12 values projected in Table 4.
Then, for every station, we plotted sparely the monthly values of a and b as a function of sin ðω c − 70°Þ, which gave us presentations as Figure 2.
As a result, we obtained equations in the following form: 70°represents the minimum value of the hour angle of the sunset The coefficients a ′ , a ″ , b ′ , and b ″ are calculated from values in Table 4 by using the least-squares method. The obtained values are presented in Table 5.
In order to have one equation valid for all of Morocco, we averaged the coefficients mentioned in Table 5, which gave us the following equations: Finally, by using the equation below, we will be able to estimate the monthly average of hourly global solar radiation for all Moroccan regions: It remains to validate this adaptation by a comparison with the measurements. This will be the subject of Table 6.

Estimation of I d and I b .
The hourly evolution of the diffuse component of solar radiation is an important data for researchers and engineers when they study the behavior of solar thermal conversion systems or photovoltaic systems. Therefore, several models have been made for estimating this component such as the Orgill and Hollands model [9], the Erbs et al. model [10], and the model of De Miguel et al. [15].
In the same way, we tried to find our own model to estimate I d . For this reason, we plotted K d ðI d/ I h Þ as a function of K t ðI h /I oh Þ as shown in Figure 3.
From Figure 3, we notice that the cloud of dots has the shape of a waterfall, which is characterized by two almost horizontal parts at the beginning and at the end and another inclined part in the middle. In order to find a correlation that represents all the points with a good fit, we divided the K t values into three intervals, and by the least-squares method, we established separately the correlation equations that represent them.
In addition, we find that the cloud of dots show a remarkable dispersion especially in the K t range between 0.3 and      7 International Journal of Photoenergy 0.55. This is mainly due to two causes, firstly to the large volume of used data, which is well above 12,000 values from different sites, and secondly to the fluctuation of the diffuse fraction which depends on the type and distribution of particles and clouds that are in the sky.
For each interval, the calculated correlations equations are in the following form: Moreover, with the predicted values of hourly diffuse and global solar radiation, we can calculate easily the hourly values of direct solar radiation by using the equation below: 5.3. Estimation of I s . The hourly inclined solar radiation I s is calculated by using the diffuse isotropic approximation cited by [48]: where S is the tilt angle; i and θ are, respectively, the angles of incidence of the sun's rays on the inclined plane and on the horizontal plane; and cos ðiÞ/cos ðθÞ is the transposition factor of the direct solar component calculated by the division of the incidence angles of the solar rays on the inclined plane and incidence angles of the solar rays on the horizontal plane, in the middle of the considered hour. As it is interesting to know the evolution of global hourly irradiation for different inclinations, we chose to calculate it for S = ϕ, ϕ + 20, and ϕ − 20, 90.

Predicting the Values of Solar Spectral Radiation.
Hourly data of global, direct, and diffuse solar radiation are insufficient to study all solar systems because other applications require the knowledge of the hourly values of spectral components.
For example, the ultraviolet component is used in atmospheric studies, the photosynthetically active radiation is necessary for the plant development process, and the infrared solar radiation is used in meteorological studies.
Knowing that the I PAR , I UV , and I IR measurements are not often available in the meteorological stations, for this reason, we established simple formulas for estimating these radiations from the measurement of global solar radiation.
Thus, in order to establish the estimation equations of spectral component, we used measurements collected by the LESE station network, and through the least-squares method, we established relations between the global irradiation and the spectral solar components. For more precision,    Table 7. From Table 7, we notice that the hourly fractions of I UV and I PAR , namely, I UV /I h and I PAR /I h , increase when sky conditions change from clear to overcast; on the other hand, the fraction I IR /I h decreases when the sky conditions change from clear to overcast. This variation is due to the absorption of infrared by cloud water vapor, contrary to I UV and I PAR , which are not affected by this attenuation. In addition, the values of the correlation coefficients (R) reflect the good quality of the carried out correlations.
Finally, it should be noted that all these results are in agreement with other work carried out either in Morocco [49] or across the world [23].

Statistical Indicators
To validate the various models mentioned before, we compared the estimated values provided by models with measurements. This study was done by using the following indicators [45]: The mean difference The mean difference is an indication of the average difference between the calculated and measured values.
The relative error The RMBE tells us the percentage of deviation; when it is positive, it tells us the overestimation percentage of the model, while when it is negative, it tells us the underestimation percentage of the model.
The mean absolute error The percentage of mean absolute error measures the mean size of the errors; it is always positive and less than or equal to the root mean square error.
The mean squared error The RMSE gives us information on the amplitude of the deviations and the dispersion of the points around the first  Table 8, we note that the relative error calculated from data generated by our I h model does not exceed -1.58% which is much lower than the error obtained using the Collares-Pereira and Rabl model. This result is approved by the graphs of Figure 4 where we notice in Figure 4(a) a concentration of points in a straight line called trend curve; this curve is totally confused with the first bisector, contrary to Figure 4(b) where there is a dispersion of the points along the curve with a deviation of the trend curve compared to the first bisector.
From this, we noticed that our I h model is the most adapted model to predict monthly averages of global hourly irradiation.   (13), we generated hourly values of global irradiation. Then, we verified the quality of these estimated data through the relative error. The result is presented in Table 6.
The comparison between measured values and values estimated by Our I h model showed that the relative error does not exceed -1.9% (Table 6), which is relatively low; this result is approved by the weak dispersion of the points in Figure 5 and the confusion of the trend curve with the first bisector.
These results show the good quality of estimating global radiation by our I h model. From that, we conclude that the adaptation used to have Equation (13) works to estimate hourly global radiation. Table 9, we notice that the relative error calculated from data generated by De Miguel et al. model does not exceed -2.83%, which is the lowest error compared to the other models. In addition, the graphical representation of data generated by the different models as function of the measured data shows that the cloud of dots in Figure 6(a) (De Miguel et al. model) is concentrated in the middle of the graph and its trend curve is almost confused with the first bisector with a small spacing for large values of I d : On the other hand, for the other models, the spacing is highly remarkable along the curves with a considerable dispersion of the points.

Diffuse Solar Radiation. From
Also, from Table 9 and Figure 6, we found that the model of De Miguel et al. is the most adapted for the estimation of diffuse radiation because it presents the lowest relative error.
Consequently, to generate the hourly database, we selected our I h model to estimate the hourly global solar radiation and the model of De Miguel et al. to estimate the hourly diffuse radiation.

Validation of the Selected Models.
To examine the accuracy of the selected correlations, we compared the estimated values with measurements by using the statistical indicators.
To verify the coordination of the estimations against reality, we traced the estimated values as a function of the measured values for all the considered sites.   Table 10 and we showed graphical representation of the estimated values according to the measured values in Figure 7.
Based on the obtained results, we can deduce that the used correlations have a very good quality, in view of the following: In addition, from Figure 7, we noticed that the first bisector and the trend curve are almost the same for all stations.  Based on the mentioned results, we deduced that the model of De Miguel et al. to estimate the diffuse radiation give a remarkable coordinance with the measurements col-lected at different sites, whereas this model was made for four countries located in the north of the Mediterranean Sea with different latitudes than Morocco. All of these observations lead us to conclude that this model has a regional aspect and can be used even for other countries with a similar climate such as Algeria, Tunisia, and Italy. It remains to prove its validity for all the Mediterranean area.  (g) Figure 10: Annual variation of hourly radiation: (a) global solar radiation, (b) diffuse solar radiation, (c) direct solar radiation, (d) inclined solar radiation, (e) infrared I IR solar radiation, (f) photosynthetically active radiation I PAR , and (g) ultraviolet I UV solar radiation. 13 International Journal of Photoenergy

Validation of Spectral Components.
To examine the quality of the used correlations for predicting the spectral components, we compared the estimated values provided by equations in Table 7 with measurements, which gave us the relative errors in Table 12.
The obtained results (Table 12) reveal that the proposed model estimates the spectral components with remarkable precision since the maximum of relative errors does not exceed 5.4% for I UV , 3.3% for the I PAR , and 3.2% for the I IR .

The Main
Steps Followed for the Creation of the Hourly Solar Database. Utilizing the database of daily values of global solar radiation and through to the selected correlation equations, we were able to make a database of all solar radiation components on the hourly scale. Figure 9 is a flowchart summarizing the various steps to generate this database.

Samples of the Obtained Results.
After having carried out, tested, and compared the solar irradiation estimation models, we chose to use the models that represent the minimum error. Thus, we used our I h model to predict global irradiation, De Miguel et al.'s model to predict diffuse irradiation, the isotropic model to predict tilted irradiation, and our models in Table 7 to predict spectral components.
The use of these models has allowed us to obtain a data bank that gathers the different components of solar radiation, either energetic (global irradiation, diffuse irradiation, direct irradiation, tilted irradiation) or spectral (ultraviolet I UV , infrared I IR , and photosynthetically active radiation I PAR ) on an hourly scale. This bank includes data for 10 years (2009-2018) for 29 sites, which represents the entire Moroccan territory.
Given the large number of results, we have chosen to exhibit the obtained data in 3D graphics representing the hourly evolution of solar irradiation throughout the months of the year. Figure 10 is an example of results generated by different models to estimate solar components for one site (Rabat): (a) global solar radiation, (b) diffuse solar radiation, (c) direct solar radiation, (d) inclined solar radiation, (e) infrared I IR solar radiation, (f) photosynthetically active radiation I PAR , and (g) ultraviolet I UV solar radiation.
From Figure 10, we note that all components of solar irradiation are maximum in July around midday. Their values exceed 862 Wh/m 2 for global radiation, 641 Wh/m 2 for direct radiation, 830 Wh/m 2 for inclined radiation, 280 Wh/m 2 for diffuse radiation, 412 Wh/m 2 for infrared radiation, 413 Wh/m 2 for photosynthetically active radiation, and 36 Wh/m 2 for ultraviolet radiation. We also note that the solar radiations are symmetrical relatively to the peaks of irradiations.
In addition, we noticed that all solar irradiations are always present during the year with significant quantities; it results that the annual duration of insolation in Morocco varies from 2700 hours in the north of the country to more than 3500 hours in the south. The annual solar energy received by a horizontal plane varies from 1.7 to more than 2.2 MWh/m 2 /year. All of these observations are caused by the clarity of the sky, the height of the sun, and the geographical position of Morocco.

Conclusion
Through this work, we created a ten-year database for the hourly values that regroup all solar radiation components. This database consists of more than eleven million hourly values, spread over 29 sites, covering all regions of Morocco for the period between 2009 and 2018.
The validity study has shown that the estimation models used have minimal errors: On the other hand, the point clouds generated by the representation of estimated values as a function of the measured values show a remarkable reconciliation between the first bisector and the trend curve, which proves the high quality of the used estimations.
Regarding the spectral components, the calculated relative errors are equal to 5.4% for I UV , 3.3% for the I PAR , and 3.2% for the I IR , which proves that our models estimate the spectral components with remarkable precision.
Considering the high quality of the results obtained from the estimation of the diffuse radiation by the De Miguel et al. model, we deduced that this model has a regional aspect and can be used even for other neighboring countries with a similar climate such as Algeria, Tunisia, and Italy. It remains to prove its validity for all the Mediterranean area.
In addition, we noticed that the direct radiation is maximum during the most part of the year and it exceeds 641 Wh/m 2 . This result will encourage engineers and installers to move towards the technologies that use this type of radiation as solar concentrators often used for the production of thermodynamic electricity.
This work gives us the possibility of evaluating the Moroccan potential of solar radiation over a large period and studying qualitatively the different energetic and spectral characteristics of solar radiation. In addition, we were able to know the various physical variables that have an effect on the solar irradiation such as the lightness factor that enters in the diffuse radiation estimation, or the angle of sunset, which is directly related to the global radiation.
Thus, this work allowed us to offer a wide presentation of the hourly solar data over a period of 10 years, to fill the gap