Detection of clear sky instants from high frequencies pyranometric measurements of global horizontal irradiance

. Solar resource assessment by clear sky models is of great importance in the solar energy field: verifying the performance of photovoltaic systems during stable conditions, clouds effects evaluation, the determination of geographical areas where irradiation is more uncertain and the preparation of forecasts with sky cameras. But before using these models they must be validated against high performances soil measurements. Since there is no radiometric sensor that measures clear-sky radiation, then historical clear-sky time periods must be identified only from long-term all-sky irradiation records. The contribution of this study is to exploit the ground measurements, analyze them and retrieve the information they contain concerning the clear sky instants. The study will be performed by comparing the clear sky instants identified by an algorithm proposed by Reno and Hansen with a physical clear sky model. This comparison is made using high frequency global horizontal irradiation (GHI) data from high performances meteorological station installed at Benguerir in Morocco.


Introduction
The knowledge of the solar irradiation available on the ground is of great importance for different applications of solar energy. However, solar irradiation is often influenced by clouds, which makes it difficult to accurately estimate the solar resource. However, it is possible to estimate approximately the irradiation under clear sky conditions, given its importance in solar resource studies, to estimate the potential of solar energy for the concentration of solar energy and the concentration of photovoltaic technologies that cannot produce under cloudy conditions, to define the geographical areas where irradiation is more uncertain. Clear sky irradiance can also be used for data quality control and solar panel production calculation or forecasting.
In several studies, solar analysts are required to estimate clear sky irradiance using clear sky models. Even in the absence of clouds, solar radiation is impacted by various atmospheric variables such as ozone, water vapor, aerosols and other atmospheric absorption and scattering elements. These clear sky models need to be validated against similar time series, obtained from ground-based radiometric observations at sites.
The difficulty of this validation lies in the fact that cloud observations are normally not available from radiometric stations, clear sky irradiance is not measured directly, but rather by extracting clear sky values from total sky data sets. So it is necessary to identify clear sky times from all-sky pyranometric measurements to obtain data corresponding to the clear sky model data, because when validating these models an accidental presence of clouds during an assumed cloudless period could have adverse consequences leading to erroneous results. Many studies have been made in this context, but until now the scientific community has not yet established a universal method suitable for the detection of clear sky instants.
Long and Ackerman [1] provided a method to detect clear sky instants from high frequency pyranometric measurements, using GHI (Global Horizontal Irradiance), DHI (Diffuse Horizontal Irradiance) and zenith angle as inputs, their method is based on 4 tests: 1) normalized total shortwave magnitude test, 2) maximum diffuse shortwave test, 3) change in magnitude with time test, and 4) normalized diffuse ratio variability test. The method has been largely used in atmospheric studies and solar literature and has become a de facto standard in the solar measurement community [2].
Irradiation analysis under clear sky conditions is of great relevance, especially for Morocco, where solar energy is one of the most important energy resources. The country has a high insolation rate: around 3000 hours of sunshine per year, and the sky is mostly clear, especially in summer, with relatively low cloud cover.
In this work, we will use the algorithm proposed by Reno and Hansen [5] to identify clear sky moments from the pyranometric measurements of GHI only because, it's the most important for photovoltaic applications. This algorithm requires the use of a clear sky model, and the model chosen is that of Ineichen [17]. The strength of this model is that in addition to the use of normal extraterrestrial irradiance, solar zenith, air mass as input, it also takes Linke Turbidity factor, which is a factor representing the effects of absorption and diffusion by aerosols, and absorption by water vapor.
The validation will be conducted in two steps. Firstly, a visual inspection of the algorithm output will be conducted to have a qualitative insight on the performance and robustness of the considered method. The output of this first validation step will be described using representative case studies. The second validation step will consist of feeding the clear-sky detection model with output of a clear-sky model to test the behavior of the different algorithm in this situation.

Data sources 2.1 Ground-measured GHI data
For our study the clear sky instants will be detected from high frequency GHI observations. The 1-minute ground observations of GHI have been collected at the Benguerir site (latitude= 32.12, longitude=-7.94, altitude=480). The GHI was measured with a high performance Kipp & Zonen CMP21 pyranometer ( Fig. 1 (a)), which fully complies with all the performance criteria of the ISO 9060 spectrally flat class A instrument which is the highest possible ISO performance category [18,19]. An example of 1 min measured GHI at the Benguerir station is illustrated in Fig. 1 (b).

Clear sky model
Clear sky irradiation is defined as an estimate of the radiation incident on the Earth's surface in the absence of clouds over the entire sky dome. Even if in the absence of clouds, solar radiation is influenced by the parameters of the clear atmosphere, such as aerosols, water vapor, ozone, etc. Clear sky solar irradiation models aim to simplify atmospheric attenuation with relatively simple parameterizations in order to estimate solar irradiation under clear sky conditions [20]. Clear sky models used in solar energy applications are of the broadband nature, normally based on transport equations or empirical relationships [21].
For the method proposed by Reno and Hansen [5] we will keep the same model used by them, which 'is the one proposed by Ineichen [17], based on the [22] model. In the view of the authors, this clear sky model proved to be generally accurate and fairly easy to implement. This model uses as inputs the extraterrestrial irradiance at normal incidence I 0 , solar zenith angle Z (radians), air mass AM (without unit), Linke the turbidity factor TL (without unit), and the elevation h (m): The monthly link turbidity (TL) factor is downloaded from the HelioClim website (http://www.soda-pro.com). The validation will be conducted in two steps. Firstly, a visual inspection of the algorithm output will be conducted to have a qualitative insight on the performance and robustness of the considered method. The output of this first validation step will be described using representative case studies. The second validation step will consist of feeding the clear-sky detection model with output of a clear-sky model to test the behavior of the different algorithm in this situation.
For this last step, we chose the McClear model [14], that is a clear-sky model based on the libRadtran radiative transfer model and that exploits aerosol properties (total and partial optical depths of aerosols at different wavelengths), total water vapor and ozone content supplied by the Copernicus Air Monitoring Service (CAMS) and provides time series of irradiation for any location in the world at any time from 2004 to the current day 2.
It should be noted that the McClear error was not considered during the whole study and we assume that McClear estimates perfectly radiation under clear skies, considering the satisfactory results obtained when validating the model against ground measurements of the same Benguerir station [24]. Fig. 2 displays an example of the daily profile of the measured GHI compared to the modeled GHI cs under clear sky from McClear for a clear and an overcast day respectively. We can observe that on a clear day the error between GHI and GHI cs is nearly negligible. Contrary to a cloudy day where the difference between the GHI and GHI cs is very large.

Clear sky detection
We will apply the Reno and Hanssen algorithm to detect clear sky moments from our all-sky time series. The algorithm uses five statistics computed from the GHI data and the results of the clear sky model to identify clear sky periods: 1) The mean value of GHI for the entire period: checks the mean value of GHI, which is notably lower under overcast conditions than clear sky conditions. 2) The maximum value of GHI: it is possible that clouds cause GHI higher than clear sky GHI during events such as cloud edge improvement, which can result in a GHI average close to the GHI cs average. The calculation of the maximum GHI value is the easiest way to identify such events. 3) The line length: Any measured variability of the GHI will increase the length of the GHI line compared to the clear sky model GHI cs . 4) The standard deviation of the rate of change in irradiance. And 4) the maximum difference between changes in GHI and GHI cs time series: during a clear sky period, the change between successive measurements must be similar to the change in irradiance expected by the clear sky model.
We will validate the algorithm by a visual inspection of the GHI measured at Benguerir for different days. The figures present the results of the detection by the Reno and Hansen algorithm applied to the 1 min data from Benguerir ground station. The blue line shows the measured GHI and the orange dotted line represents the clear sky moments detected by the algorithm. The visual verification was done for three types of periods: clear, cloudy and mixed.
For clear sky conditions Fig.3 where the sun is not blocked by clouds, we obtain a smooth curve. We can see in the figure that all moments are clear and well detected by the algorithm. For highly overcast days as shown in Fig. 4, there may be brief periods when the sun is not obscured by the clouds from which clear periods are observed. And vice versa on generally clear days where the passage of certain clouds results in the appearance of brief cloudy periods. And as can be seen in the figure, the algorithm used detects the few clear sky moments that appear during cloudy days.   5 shows an example of mixed days, for example we observe in the figure that of the 26 th , August in the morning and mid-afternoon the sky is perfectly clear excluding a brief period where there is some cloud cover and towards the end of the afternoon a decrease of the measured irradiance and high variability are observed, where we can conclude that there is a presence of clouds that block the sun for a long time.
The same remark for August 27 th , where in the morning there is a high variability of the measured GHI as opposed to mid-morning and afternoon when the sky is clear. According to our visual inspection, we can conclude that the algorithm is capable of well detecting clear sky moments when they are present.

Clear sky model validation
One of the purposes of using clear sky detection algorithms is the validation of clear sky models, in this study we will present an example of McClear validation using the clear sky moments detected by the Reno algorithm. Our objective is not to validate McClear but rather provide a practical example of the utility of clear period identification algorithms. The Fig.6 shows an example of clear sky GHI from McClear validation against measured GHI.
It can be clearly seen on the figure when performing the validation without detecting the clear sky moments, automatically the error will be high and the points are more dispersed. When validating after clear sky moments detection, we observe that the dots are more highly

Conclusion
Clear sky solar radiation is of high importance for many solar energy studies. Different models of clear sky radiation are available, however, before using these models it is necessary to validate them through high performances ground data. Since there are no sensors to measure clear sky radiation, it is necessary to detect clear sky instants from all-sky time series before proceeding with the validation. A number of studies have provided different algorithms to detect clear sky times from GHI measurements, but so far no method has been recommended. The objective of our study was to validate a clear sky detection method from GHI using high quality ground-based measurements of GHI. For this purpose we have chosen, the Reno and Hansen algorithm and the validation was done based on a visual inspection allowing to have a qualitative overview of the performance and robustness of the considered method. Then a practical example of a clear sky model McClear validation against the measured GHI using the outputs of this model was given.