A Visual Support of Standard Procedures for Solar Radiation Quality Control

Solar irradiance data from high-quality ground-based measurements are primordial for different solar energy applications. In order to achieve the required accuracy, quality control procedures are of great benefit. A variety of approaches have been proposed. In this sense, some approaches propose a visual representation of the routine, while others only provide a time series of binary flag values, and do not propose any specific visualization of the flagged data as opposed to non-flagged ones. In this regard, the present paper puts forward a complete routine including several quality control procedures for solar irradiance measurements by providing visual support for these different approaches. The visual tool in question was validated using five years research data with 10 minutes resolution of the global, diffuse and direct components of solar irradiation collected from three ground-based weather stations in Morocco. This visual tool puts forth a more precise idea of the measurement quality by detecting various errors, such as time shifts, outliers identification; either with one or two components, or consistency tests between the three components of solar radiation when available. The proposed tool can be regarded as a means of improving the detection rate of abnormal data as a first step in diagnosing the prominent causes of error.


Introduction
Having a profound knowledge of solar radiation in a given location is of great importance for several scientific fields, such as biology, agriculture, hydrology, architecture, climatology, meteorology, and renewable energies (Antonanzas-Torres et al., 2013;Kalogirou, 2001;Pashiardis and Kalogirou, 2016;Sohani et al., 2020). Solar radiation data from ground pyranometric measurements are particularly relevant for the solar energy y sector, where they are used for the feasibility and site selection study (Antonanzas-Torres et al., 2019), the study of solar resource variability (Reviewed and Merced, 2012), or the validation and calibration of satellites and numerical weather models (Eissa et al., 2015;Ineichen, 2006;Polo et al., 2020Polo et al., , 2016Qu et al., 2014). For these applications, it is essential to ensure that the data are of good quality and selectivity, stability, non-linearity, shade-ring misalignment).
• Operation related problems and errors (Complete or partial shade-ring misalignment, Dust, snow, dew, water droplets, bird droppings, etc.) • Incorrect sensor leveling, shading caused by building structures, electric fields in the vicinity of cables, mechanical loading of cables, orientation and/or improper screening of the vertical sensors from ground-reflected radiation, station shut-down, etc. Data quality analysis has been a rich research topic for the majority of radiometric organizations. In fact, several studies were conducted and various methods of data quality control were suggested.
The World Meteorological Organization (WMO) (WMO, 1987) published guidelines on the quality control (QC) of data from the "World Radiometric Network". The control is based on the comparison between radiation values and meteorological conditions. The test also considers the spatial variability by comparing observed irradiance values with those measured at neighbouring stations, and for temporal variability, time series data are analyzed on hourly, daily, monthly and annual basis.
The National Renewable Energy Laboratory (NREL) developed software under the name "SERI QC" when the name of the laboratory was the Solar Energy Research Institute (SERI). This software assesses the quality of solar radiation data based on direct, diffuse transmittances and the clearness index (Habte and Sengupta, 2019;Maxwell et al., 1993) Baseline Surface Radiation Network (BSRN) (García et al., 2019;Ohmura et al., 1998) proposed an automatic QC procedure for intra-hourly measurements based on several subtests: the physically possible limits test, the extremely rare observations limits test and consistency tests between components (two-and three-component tests). The methodology was proposed by Long and Dutton (Long and Dutton, 2010a), it has become one of the best known and most used methodologies in the literature (Ameen et al., 2018;Long and Shi, 2008;Moreno et al., 2015;Ntsangwane et al., 2018;Roesch et al., 2011;Zo et al., 2017).
Other tests were widely applied in the literature. For instance, (Geiger et al., 2002) established their own procedures for controlling time series measurements, on a daily basis. They compare observations with extraterrestrial irradiation and a simulated irradiation under clear sky conditions. The QC procedure is part of an ongoing effort by the "Remote Sensing and Modeling" Group of the "Ecole des Mines de Paris/Armines" to provide tools and information on solar radiation through the Worldwide Web. In this context, an online service designed particularly to provide such QC of time series of global horizontal daily irradiation, is freely available at:http://www.soda-pro.com/web-services/validation/checkirradiation Based on the work undertaken for the production of the European Solar Radiation Atlas (ESRA) (Scharmer et al., 2000) tools and Charted Institution of Building Services Engineers (CIBSE) Guide to Meteorological and Solar Data. Page (Page, 1997) proposed a QC procedure consisting of three testing levels that focus on global and diffuse radiation and verify that solar radiation values must lie in the extreme value range against the clear sky and overcast sky for diffuse irradiance, and only clear sky for the global irradiance. The test also considers spatial variability by referring to measurements from adjacent stations for the QC of solar radiation measurements. The procedure is based on geometric relationships and model predictions: it consists of three tests: the first test verifies the consistency between the three components of global, diffuse and direct irradiance, the second test compares the measurements with model forecasts, while, the last one is based on the value of the precipitable water content, and dew point temperature. The program aims at increasing the accuracy of the tests by setting test validation limits. After reading an ASCII input file, it returns an output file of the same format with a QC flag.
The Commission Internationale de l'éclairage (CIE) suggests (Tregenza et al., 1994) a quality control procedure for detecting major sensor problems, such as sensor misalignment, soiling, major calibration errors or other failures. They require that tests should be performed only if the sun's elevation exceeds 4°, and the global horizontal irradiance is over 20 W/m2. The procedure consists of five major tests: the first of which is put in place to verify the upper and lower boundaries for global, direct and diffuse irradiances and the corresponding luminance. The second test uses the redundancy between the measurements to verify their consistency. The third test is based on the North, East, South and West global irradiances and illuminances, the forth test category entails the comparison between irradiance and illumination, and finally for the fifth testing procedure, two ways are possible, zenithal luminance is compared with diffuse illuminance or diffuse irradiance. Muneer and Fairooz (Muneer and Fairooz, 2002) proposed a QC procedure which is based on the CIE tests and the irradiance model of Page (Page, 1997). The procedure is divided into three tests: the first one replicates the first test proposed by the CIE. The second test verifies the consistency between global, diffuse and top atmospheric irradiance. The third test consists of two parts; the first part verifies that diffuse radiation is in accordance with the limits established by the standard envelope according to clearness index and diffuse fraction. The second part is an additional QC of diffuse irradiance; it aims at comparing the value of diffuse irradiance under two extreme conditions, namely a "very" clear sky and a "very" cloudy sky using the Page (Page, 1997) model. The final test is control of the global and diffuse irradiation data turbidity, calculated for the time series. A value of Linke turbidity lower than 2.5 (under clear sky conditions) or higher than 12 (under dusty conditions) requires a careful inspection of data.
Younes et al. (Younes et al., 2005) created a semiautomated system to process the quality of solar irradiance measurements. They suggested a set of physical and statistical metrics based on the creation of an envelope in the domain of the clearness index and diffuse ration. The procedure also uses the geographical information for the study site.
Journée and Bertrand (Journée and Bertrand, 2011) developed a QC procedure that can be applied to 10 and 30 minutes resolved data of solar radiation. The procedure comprises several tests: The physical limits, which checks the upper limits of radiation against extra-terrestrial radiation and the clear sky of the ESRA model. The step tests illustrates that the variation of solar radiation measurements between two successive timestamps cannot exceed certain limits, and solar components must vary compatibly with each other. Besides, the persistence test is put forth to scrutinize the variability of the measurements. The quality envelope tests, which are on the graphic representation based on the direct, diffuse transmittances and the clearness index. The spatial coherence test is predicated on the data analysis by comparing neighbouring stations with each other; and finally a sunshine duration test was performed.
In addition to the automated error detection, Ineichen (Ineichen, 2013) proposed the verification of three elements. Firstly, the time stamping of the measurement which allows the detection of time shifts and verifies the symmetry, for clear-sky days, of the data with regard to solar noon, by plotting the global and direct components against the sine of the solar elevation during clear days.
The time stamp is correct if the morning curve is situated below that of the afternoon. Afterwards, they evaluated the sensors calibration coefficient used to convert the measured data into physical values, by including the corrected clearness index KT defined by Perez et al. (Perez et al., 1990). This clearness index is divided by a standardized global clear sky irradiance model based on the formula provided by Kasten (Kasten, 1980), with a Linke turbidity set to 1.4. Finally, the consistency test between solar components is executed by plotting the diffuse and direct transmittance against the clearness index. On the same graph, the clear-sky index predictions of the Solis radiative model (Perez et al., 1990) are depicted for three a priori different Aerosol Optical Depth (AOD) values. Any significant difference between the predicted and the measured clear-sky index values implies calibration uncertainties, the misalignment of the pyrheliometer, soiling or shadowing, or a wrong classification of clear-sky conditions. Norbert Geuder et al. (Geuder et al., 2015) propose a combination of automatic data screening and manual flagging maintained by an expert in a daily frequency in close collaboration with a local station operator. The data screening consists of proving that the data do not exceed lower and upper irradiance limits for the global horizontal, diffuse horizontal and direct normal irradiance. Furthermore, the BSRN tests are applied to the data sets and a screening for dew on the irradiance sensors is implemented as well. In addition to irradiance data quality tests, further screening of ambient temperature, wind and precipitation is recommended. Manual entries or the supervisor's comments and corresponding flags need to be introduced in the database together with the data sets. Recently, Urraca et al. (Urraca et al., 2017) proposed a semi-automated QC procedure to detect errors in the measured irradiation based on the statistical analysis of daily deviations between a set of ground observations and satellite irradiation estimates. This method was validated in a dataset of 313 ground stations.
After this review, we can state that, in the literature and on web-based platforms, there is a wide range of quality tests to evaluate solar irradiation time series. They usually provide a Boolean result type for each measurement, which means that the value is either accepted or rejected. This is a fast way to delete data, but it does not supply any insights into the source of rejection and does not give any hint on how to solve the source of the potential problem.
The present paper dispense a thorough overview of the different quality control (QC) approaches to solar measurements by providing a visual support of these different quality controls. This visual tool offers a more precise idea of the measurement quality, and can be viewed as a means to improve the detection rate of abnormal data as a first step in the diagnosis that examines the causes of error. The usefulness of this visual tool for identifying the most common errors, found in quality control of solar irradiance data, is illustrated by using 10-minutes average data of the three solar irradiance components collected from three stations in Morocco.
Thus far, a significant amount of data has been generated without an easy-to-handle tool to be fully exploited. The solar data community is now able to manipulate large time series thanks to the recent development of data mining tools. Our contribution in this regard is to provide the source code used in this paper to visualize and check the quality of solar irradiance data with a detailed example of each test, so that each user will be able to reproduce the whole procedure and adapt it to his or her own data. The source code is accessible via https://github.com/YvesMSaintDrenan/IEA_PVPS_T16_Q C_pynb/blob/master/03_SolarDataQC.ipynb The remaining part of this document is organized as follows: Section 2 describes the ground data used and the study sites. The set of tests applied in this study is described in section 3. The subsection 3.2 is devoted to the one-component tests, the two component BSRN tests and the two K tests of NREL are elaborated in section 3.3, the three-component tests of BSRN are presented in section 3.4. A summary and conclusion follow at the end.

Data and study sites
The irradiance data used in our study were collected from three ground-based measurement stations installed as part of the enerMENA project (Schüler et al., 2016). The three stations are Erfoud, Missour, and Zagoura. The stations are located from Northern to Southern Morocco with Missour, Erfoud and Zagoura located in the northeastern region. According to Köppen's climate classification (Ascencio-Vásquez et al., 2019), the climate in these regions can be a hot desert climate (BWh) or cold desert climate (BWk), as described in Table 1. Erfoud, and Zagoura are of climate BWh, and Missour of climate BWk. The study locations are offshore regions with elevations ranging from 783 m to 1107 m. Table 1 shows the names of the stations, their latitude, longitude, altitude, dominant climate type, study period, annual global horizontal irradiation (kWh/m 2 ) estimated from a satellite database Helioclim3 (Espinar et al., 2012), and the number of hourly values of available data.
All stations were installed in 2013, and measurements are available since mid-2013. All data sets have a temporal resolution of 10 minutes. The measurements were collected by IRESEN, the "National Research Institute for Solar Energy and New Energies" in Morocco and DLR (Deutsches Zentrum für Luft-und Raumfahrt). This study used the data collected from June 2013 to July 2017 at 10-minutes temporal resolution (Table 1). The type of pyranometers used to obtain ground measurements differs between stations: thermopile or RSI (Rotating Shadowband Irradiometer). The Missour station is equipped with two high performance thermopile pyranometers from Kipp & Zonen CMP21 (ISO classification: secondary standard) which are classified in the highest possible ISO pyranometer performance category for the measurement of global and diffuse horizontal irradiances (GHI and DHI). The pyranometers have a full-opening view angle of 180°, the spectral range extends from 310 nm to 2800 nm with a response time < 1 s (95%). It's also equipped with a thermopile pyrheliometer Kipp & Zonen CHP1 (ISO classification: first-class), this instrument has a full-opening view angle of 5° ± 0.2°, the spectral range from 200 nm to 4000 nm with a response time of 1 s (95%), which measures the direct normal irradiance (DNI) received on a plane normal to the direction of the Sun. The Erfoud and Zagoura sites are equipped with two RSI pyranometers for the GHI and DHI measurements with an accuracy of ±4.7% and ±6.5%, respectively; the DNI is calculated using GHI and DHI measurements. All sensors were maintained by CSP Services (Concentrating Solar Power Services), IRESEN (Research Institute for Solar Energy and New Energies) and DLR. The calibration was performed by DLR and Kipp&Zonen. As an example, the images of the Missour and Erfoud stations are shown in Fig. 1. The percentages of missing values at each station throughout the studied timespan are summarized in table 2. A high rate of missing 10-minutes values (33% and 20%) was registered by the Erfoud and Missour stations respectively, a rate of 20% by the Missour station and the lowest rate by the one located in Zagoura (9%). The missing values are retained in the dataset and no gap-filling method was applied. Despite the fact that a substantial percentage of data is missing, there is still enough data to obtain a reasonable view of all the seasons. The majority of these missing data correspond to a continuous period ranging from a few days to a few months (Fig. 2). The main causes of data gaps are generally as follows: • Power outages, • communication problems which last too long so that the internal data storage is exceeded, • for the Missour station, the majority of the deficiencies are due to tracing problems where the tracker stopped and had to be rebooted and repaired.

Overview of the QC routine
The goal of this paper is to describe a complete quality check procedure. For this purpose, different routines are used and a new test is proposed. These latter are summarized in Table 3. The rows and columns correspond both to the component of the solar radiation involved in the quality control. In the diagonal (blue cells), different tests, applied to a single component, are listed: the visual inspection of the time series, an analysis of the time reference, the detection of eventual shadows and the ERL (Extremely Rare Limits) and PPL (Physically Possible Limits) test of the BSRN quality control (Long and Shi, 2006;Roesch et al., 2011). These different tests are described in details in section 3.2. In the lower part of the

Time series visualization
Before proceeding with the quality control routine, a visualization of the time series is required. The graphical presentation of the data doesn't allow us to control the quality of the data, but rather to examine the type of data we are dealing with, to identify their trends and to easily examine them in order to check if there are any missing values, lags, etc. GHI, DHI and DNI 10 minute time series for the period from 01/01/2013 to 01/01/2017 are plotted as a function of time in Figure 2. By analyzing these plots, we can easily notice the existence of some missing data and slightly high DHI values for the Missour station. Nevertheless, it is not possible to judge their plausibility at this stage based only on the visualization of the time series.
In order to deepen the visual analysis of the data presented in the previous section, we display the measurement in a two-dimensional representation, where the x-axis represents the day, the y-axis the time of day in UTC (Universal Time Coordinated), and the dots' color the value of the data considered: the GHI, DNI or DHI. This analysis allows visual identification of errors over time, to visualize missing values, issues in time reference, and abnormal values. The plots of the three measured components are shown in Fig. 3.
In the different cells of Fig. 3, the two red dotted lines represent the theoretical sunrises and sunsets. They were calculated using the sunset equation as a function of the geographical latitude of the sites considered, using the SG2 algorithm . This information allows detecting problems with the time referencing of the data, which is not the case for the dataset considered here. On the other hand, if we take a look at the color bar of DHI plots we can see that the DHI of Missour can reach up to 1000 W/m 2 compared to Erfoud and Zagoura where the maximum values are 600 W/m 2 what is standard for DHI. Diffuse irradiance measurements seem to be plausible. This graphical representation will not allow to determine the cause of the DHI issue but just give a preliminary insight. The plausibility analysis of the DHI measurements will be carried out later as part of the QC of the measurements.

BSRN PPL and ERL tests
The BSRN QC procedure is based on three tests: the Physically Possible Limits test (PPL), the Extremely Rare Limits test (ERL), and consistency tests between components. •

Physically Possible limits:
The PPL test checks the maximum and minimum limits that can be physically reached by irradiance, and aims at identifying extremely large errors in the radiation data. The upper limits depend on the solar zenith angle, the minimal value of solar irradiance must be 0 W/m², yet, because of the radiative cooling at night, the limit is set at -4 W/m 2 , the test applies independently to each of the three components as follows (Long and Dutton, 2010) , , . where I0 (W/m 2 ) is the normal radiation at the top of the atmosphere and SZA (°) is the solar zenith angle computed by SG2 . Any measurements outside these validity intervals are not plausible and are aged accordingly.
• Extremely Rare Limits: The limits of the ERL procedure are even stricter than those of the PPL test. ERL differs from the PPL test in that the measurements rarely reach these limits, and even if the case is only for short periods of a few seconds to one or two minutes, and the measurements violating these limits are not necessarily incorrect, but their plausibility should be checked more specifically. The ERL limits are defined as follows (Long and Dutton, 2010) : . (6) A graphical representation of these two tests is possible by representing the 10-minutes averages of GHI, DHI or DNI as a function of the irradiance received at the top of the atmosphere (TOA). This representation is shown in Fig. 4 where the green and red line represent the onecomponent PPL and ERL tests respectively.
In view of the QC equations, it might be simpler to use the cosine of the SZA for the graphical representation of the QC. However, we opted for the irradiance at the top of the atmosphere because we considered this quantity as intuitive.
The different subplots of Fig. 4 show that a very large majority of the values pass the tests and do not raise any flags. Notwithstanding, one can distinguish some group of measurements (corresponding to days) where the value of the measurements is implausible, notably for the GHI in Zagoura, and Missour as well as for the DNI in Zagoura. But generally, most of the data fall below the rare observations threshold (green), with only a small number of data above the physically possible threshold (red) mainly for the GHI and the DNI. Finally, as already identified in Fig. 3, the Missour DHI values are suspect for the entire period of measurement. Fig. 6 displays the flagged data corresponding to one component BSRN test for the GHI, DHI and DNI for the Missour station as an example.

.1. Two-components BSRN plausibility analysis
Another recommended test is the two-component test that involves the examination of the consistency of independent measurements. Where GHI and DHI are available, a comparison of these two measures can be checked for consistency by applying, for GHI> 50 W/m 2 , the following two-component tests (Long and Dutton, 2010): , .
Due to low SNR (signal to noise ratio), the test is not possible for GHI values below 50 W/m 2 . It is customary to regard both measurements as doubtful if the test condition is not met. For this particular reason, the test cannot be applicable when the value is inferior to GHI< 50 W/m2. We will limit ourselves here to a visual inspection of the data corresponding to this two-component test. For this end, we plotted the ratio DHI/GHI as a function of the solar zenith angle (Fig. 5).
On the three plots in Fig. 5, all values corresponding to GHI< 50 W/m 2 are represented by green dots and the values for GHI> 50 W/m 2 are represented by blue dots. The red lines represent the limits defined by the abovementioned equations It in Fig. 5, it is evident that all measurements meet the conditions of the two components test, and that no suspicious behavior is observed except for a minor number of points that exceed the limits for the Missour station. This result may seem a priori to contradict the abnormal DHI values observed previously. Nonetheless, a more attentive reading of the plots in Fig. 5 shows that the number of data with a DHI/GHI ratio close to unity is significantly higher for the Missour station than for the two other stations. The previously observed suspect DHI values would therefore correspond to DHI values very close to GHI. With that being said, it is therefore normal that these are not detected by the quality control.

NREL-SERIS K tests
Another two-component test set often used is the "K value" test proposed by NREL (Maxwell et al., 1993) which operates in a dimensionless space, with solar irradiance normalized to extraterrestrial values. The exact upper limits for GHI and DHI are difficult to define for a given site, especially under unstable conditions with clouds, smokes or aerosols where diffuse radiation may exceed the maximum limits, leading to an increase in GHI that may in these cases exceed top atmospheric radiation or where clouds are at an elevation that allows direct radiation to rise for a brief time period, for this purpose another set of tests based on transmittances calculations is often also used, the test includes a check of diffuse horizontal transmittance and the beam transmittance as a function of the global horizontal transmittance or clearness index. These different indices are at the origin of the test's name. The transmittances are calculated from the following formulas: • Kn, the direct beam transmittance: , • Kd, the diffuse transmittance: , • KT, the clearness index or the global horizontal transmittance: .
In our study, we used the limits proposed by (Geuder et al., 2015). There are two tests to qualify "K-values": a first plausibility check in the KT-Kn space and a second in the KT-Kd space. The tests performed in the KT-Kn space are: • , • , • .
For the qualification of measurements in the KT-Kd space, the following checks are performed: • , • , • .
With a view to visualizing these tests, the measurements are shown in the KT-Kn and KT-Kd spaces for the three stations in Fig. 7. In this context, the dotted red lines represent the different tests that are conducted.
As shown by the various plots in the left column of Fig.6, in the KT-Kn space, the conditions of the first test are diligently examined by means of distinct measurements and no suspicious behavior is observed.
For the first KT_Kd test, all the measurements satisfy the test conditions except a few points that exceed the limits for the Missour station. We can observe that there is a high number of Kd values equal to unity, especially for clearness index KT values greater than 0.6. These latter are therefore to be excluded, which complies with the previously made observations.
One can also note the difference in the point clouds for Kd~1 and KT<0.4 between the stations of Missour, on the one hand, and Erfoud and Zagoura, on the other hand. More importantly, it may be argued that some suspicious DHI measurements can still pass this quality control.

BSRN three component test
The three-component test is intended to compare the GHI measured by the pyranometer and calculated from the measured DHI and DNI: • This test is also applied to GHI > 50 W/m 2 . In fact, the test in question is manifestly pointless for stations lacking independent sensors for each of the three components. Therefore, this test is not of any use the RSI stations (Erfoud, Zagoura).
Here again, we propose a data visualization corresponding to this test. That being the case, It is worth noting that the three-components test consists of comparing the measured GHI by means of employing the pyranometer with an estimate of the GHI obtained using the equation linking the GHI and the two other components and the SZA.
Ideally, the ratio of measured and estimated GHI should be 1.0, but due to the instruments' inaccuracy, values, far from unity, are often obtained. It is customary to consider all three measures as doubtable when this test is not fulfilled. With that in mind, this test can therefore be quite vulnerable because if a measurement error occurs on one instrument, it can substantially falsify the measurements of the other two neighboring instruments.
The first visual representation consists of a plot of the GHI measurements according to the corresponding estimates from the concomitant DHI, the DNI and the cosine of SZA. This is shown in the last plot of Fig. 8 along with the two limits of the three-components BSRN test. It can be observed that the measurements of the different instruments are, with the exception of few moments, consistent with each other for all stations.
The ratio of the two values is then represented as a function of the solar zenith angle, which makes it possible to simply represent the two limits described below. This second representation shows that all measurements are consistent with solar zenith angles less than 75°. This is not the case for higher angles, where the dispersion of the points is significantly higher. The reasons for this difference in low solar elevation may be explained in the following terms.  Ideally, a pyranometer has a directional response which is exactly the same as the cosine law. However, in a pyranometer, the directional response is influenced by the detector, the quality, the dimensions and the construction process of domes. The maximum deviation from the ideal cosine response of the pyranometer attains 80° angle of incidence with respect to 1000 W/m² irradiance at normal incidence (0° zenith angle). The CMP21 has a directional response < 10 W/m² up to 80 ° zenith angle according to the manual of Kipp & Zonen (CMP21-Kipp & Zonen). In very low irradiance conditions, the relative uncertainties will go up due to the sensitivity of the sensor.
The temporal evolution of the ratio of the two GHI values is represented for each of the stations at the bottom of Fig. 7, the blue dots represent ratio values corresponding to GHI>50 W/m 2, and the green dots represent ratio values corresponding to GHI< 50 W/m 2 . The consistency of the provided data can still be observed for solar zenith angles bellow 75°, which is not the case for those angles that operate above75°. It can be noted that the characteristics of the point dispersion change over time, which is probably the result of a manipulation occurring in the measuring instrument, and the effect of imperfect cosine response of the pyranometers.
The data flagged by this test are represented on the first graph of the figure by a red dot. In this sense, we can affirm that in the morning, at Missour station, there are either problems with the dew on the sensor, or that the sensors have been soiled.
To explain the DHI errors detected earlier in Missour, We checked the three components of irradiance, we realized that when suspicious DHI measurements come about, the DNI measurements are not available. An example of a period with suspect DHI values where DNI values are not available is given in Fig. 8. It can be seen in the same figure that the DHI and GHI are almost equal when the DNI is equal to zero. Since the Missour station is a solar tracker station GHI, DHI and DNI are measured separately with two pyranometers and one pyrheliometer respectively. The equal values of GHI and DHI can be attributable to the fact that the tracker is not trailing the sun; the shadowball is not blocking the sun for the DHI pyranometer and hence the DNI pyranometer is measuring GHI instead.

Conclusion
The quality control procedure is applied to EnerMENA station data where they will be exploited for research activities. The quality of the measurements, especially for Erfoud and Zagoura stations, is good and was maintained throughout the study period. For the Missour station, a problem affecting the DHI measurements was detected. In the meantime, the DHI is close to the GHI, and DNI measurements are not available. The origins of this problem can be explained as follows: if GHI and DHI are identical and DNI is equal to zero, which denotes that for the RSI stations (Erfoud and Zagoura), the shadowband is not rotating, and for the solar tracking station (Missour), it is not trailing the sun. At RSI stations, the DNI is calculated using the measured GHI and the measured DHI, while the shadowband is rotating and blocking the sun. At the solar tracker station GHI, DHI and DNI are measured separately with two pyranometers and one pyrheliometer respectively. If the solar tracker is not tracking the sun, the shadowball is not blocking the sun for the DHI pyranometer and hence the DNI pyranometer is measuring GHI instead. Another source of uncertainty also deserves to be explored: The directional response of the pyranometer towards low values of solar elevations, which is exactly the same response as that of the co law. However, in a pyranometer the directional response is influenced by the detector and by the quality, dimensions, and the construction of domes. This might be the reason for the high data dispersion for low solar elevation. It is important to note that the impact of the two sources of uncertainty on irradiance measurements is very limited.
The periods with problems on the DHI measurements are very short and the differences between the measuring instruments are observable only at low elevation angles and remain marginal.
In this paper, we presented a complete QC routine involving several standard procedures (NREL-SERIS and BSRN QC). The innovation of our work is the visual support added to the different quality controls that help better filtering the data and understanding the issues at play. As such, this work is a visual and therefore qualitative data mining exercise. The paper provides an important tool for solar data users by allowing a visual inspection of their data. This tool permits to detect and identify various errors, such as the time shift, identifying values that exceed the limits proposed by BSRN or NREL, either with one or two components, or consistency tests between the three components when available.
Additionally, our underlying idea behind this paper is that it is essential to perform a visual inspection of the data whenever that is possible. Indeed, there are situations where it is not possible to invest a lot of time in this step and where a black-box approach is preferable. Nevertheless, we believe that a quality guarantee and the knowledge of the uncertainties of these measurements are crucial for a correct exploitation of data in the various scientific fields. For users who are interested in the quality of their data, to ensure that they are relevant to their scientific purposes, we provide a source code allowing the reproduction of all the tests described in this document, which can be accessed via the following link https://github.com/YvesMSaintDrenan/IEA_PVPS_T16_Q C_pynb/blob/master/03_SolarDataQC.ipynb.