ELIFAN, an algorithm for the estimation of cloud cover from sky imagers

In the context of an atmospheric network of multi-instrumented sites equipped with sky camera for cloud monitoring, we present an algorithm named ELIFAN which aims at estimating the cloud cover amount from full sky visible daytime images with a common principle and procedure. ELIFAN was initially developped for a self-made full sky image system presented in this article, and adapted to a set of other systems in the network. It is based on red over blue ratio thresholding for the 5 distinction of cloudy and clear sky pixels of the image, and on the use of a blue sky library. Both an absolute (without use of reference image) and a differential (based on a blue sky reference image) red/blue ratio thresholding are used. An evaluation of the algorithm based on a one-year long series of images shows that the proposed algorithm is very convincing for most of the images, with more than 95% of relevance in the process, outside the sunrise and sunset transitions. During those latter periods though, ELIFAN has large difficulties to appropriately process the image, due to a drastic difference of 10 color composition and a potential confusion between clear and cloudy sky at that time. The two thresholding methodologies, the absolute and the differential red/blue ratio thresholding processes, agree very well with departure usually below 8%, except in sunrise/sunset periods and in some specific conditions. The use of the clear sky library gives generally better results than the absolute process. Especially, it better detects the thin cirrus clouds. But the absolute thresholding process turns out to be sometimes better, for example in fully cloudy skies. 15 The combination of pyranometer, ceilometer and sky camera illustrates the performance of ELIFAN, and reveals the complementarity of the three instruments. We especially show that a similar cloud cover amount is deduced from both the sky imager and the ceilometer when the clouds are low (below 3 km). But they can lead to significantly different cloud cover estimates 1 Atmos. Meas. Tech. Discuss., https://doi.org/10.5194/amt-2018-452 Manuscript under review for journal Atmos. Meas. Tech. Discussion started: 4 February 2019 c © Author(s) 2019. CC BY 4.0 License.


Introduction
Due to their crucial role in weather and climate, clouds are the focus of many observation systems all over the world. Sky imagers are naturally used as simple devices for visible sky monitoring: They give a very useful qualitative information of the state of the sky and of the type of clouds. But they can also fulfill quantitative parameters, after a process of the image that is either based on the texture of the image, or on the {Red, Green, Blue} color composition of the image. Several algorithms 5 have now been proposed, which enable to retrieve an estimation of cloud cover (e. g. Long et al. (2006), Li et al. (2011), Ghonima et al. (2012), Martinis et al. (2013), Silva and Echer (2013), Cazorla et al. (2015), Kim et al. (2016), Krinitskiy and Sinitsyn (2016)) or solar irradiance (Pfister et al. (2003), Chu et al. (2014), Chauvin et al. (2015), Kurtz and Kleissl (2017)), to classify the type of observed clouds (e. g. Heinle et al. (2010), Kazantzidis et al. (2012), Xia et al. (2015), Gan et al. (2017)), or to track them (Peng et al. (2015), Cheng (2017), Richardson et al. (2017)). Sky imagers have also been specifically used 10 for the detection of cirrus  or thin clouds (Li et al., 2012), and contrail studies (Schumann et al., 2013).
Those systems are now commonly deployed in the vicinity of solar farms for the intra-hour or now-casting of solar irradiance, and during atmospheric field experiments or on permanent observatories, for the cloud cover and cloud type monitoring. 15 Within the ACTRIS-FR 1 French research infrastructure, a network of instrumented permanent sites has coordinated their actions for the observation of the atmosphere, and attempts to homogenize their instrumental, data process, and data dissemination practises, for a larger and more consistent multi-parameter data use of the international research community. In this context, a common sky imager algorithm has been developped, called ELIFAN, in order to retrieve in a similar way the cloud fraction from all the sky cameras of the network. It is now used on three ACTRIS-FR sites, and in progress on three other sites. 20 ELIFAN is based on red over blue ratio (here after RBR) thresholding for the distinction of cloudy and clear sky pixels of the image, and on the use of a blue sky library. This article aims at presenting ELIFAN algorithm principle, strength, weaknesses and perspectives.
In section 2, we present the sky cameras used in the ACTRIS-FR infrastructure, with more details on a self-made sky imager developed at one of the instrumented sites, and on which ELIFAN was originally based. In section 3, ELIFAN algorithm is 25 explained in details, with highlights on its main strengths and on its weaknesses. In section 4, we illustrate it with the analysis of two days, where the cloud cover estimated by ELIFAN is compared with ceilometer and pyranometer measurements. We make concluding remarks in the last section, with perspectives of evolution of the algorithm and further discussion. -OPAR ('Observatoire de Physique de l'Atmosphère de la Réunion' 5 ) at the Reunion Island (21.08 • N, 55.38 • E).
All have a sky camera for the cloud monitoring, but different systems have been historically used: TSI (Total Sky Imager) 15 (used at SIRTA, from 23/10/2008 to 24/06/2015), ASI (All Sky Imager) from EKO (used at SIRTA, CO-PDD and P2OA mountain site), Alcor System (used at OPAR), and self-made instruments (RAPACE, used at P2OA plain site, and another one at OHP). Table 1 summarizes the systems used at 3 observatories, for which the sky images are currently processed for the cloud cover retrieval. Initially, the image processing algorithm was developped and profoundly evalutated on RAPACE system images. But it was subsequently adapted for the other commercial systems of the network, in order to realize a common data process within ACTRIS-FR sky imager network. The network also currently tends to homogenize the sky imager systems.
In the following subsection, we describe in more details the RAPACE self-made system that is at the origin of the ELIFAN algorithm developement, and which will be considered for the illustrations of further sections.

RAPACE system
There are several self-made systems presented in the litterature that show that this is often a quite satisfactory option when trying to acquire good quality images at significantly lower cost than commercial systems. The developers then also design their own specific data process, depending on their objectives. Kazantzidis et al. (2012) have made a whole sky imaging system based on a commercial digital camera with a fish-eye lens and a hemispheric dome, for the automatic estimation of total cloud 10 coverage and classification. Cazorla et al. (2008) have used a CCD camera for the purpose of cloud cover estimation and characterisation. The system captures multispectral image every 5 min. Chu et al. (2014) has proposed an automatic smart adaptative cloud identification (SACI) system for sky imagery and solar irradiance forecast, which uses an off-the-shelf fisheye. Jayadevan et al. (2015) also uses a fishe-eye, for their sun-tracking camera. Urquhart et al. (2015)  Assuming that the main fragility would lie in the mechanical constraint endured during (i) the successive opening and closing of the digital camera objective, and (ii) focusing, we have blocked the objective in opened position, and also fixed the focus 5 after focusing to infinity. This seemed to help a lot in the system endurance, as RAPACE has run for 12.5 years now with the same original digital camera and fish-eye. Only the Plexiglas dome has been replaced a couple of times due to hail damage, and the USB extension wires have been improved along the time.  In the purpose of using a common and centralised data process to retrieve the cloud cover from the images of all the sky cameras available at the instrumented sites of the ACTRIS-FR network, an algorithm has been developed. It is now operationnally running at AERIS (Data and Services for the atmosphere) -ICARE (Data and Services Center) data center for the images of all the EKO systems listed in Tab. 1, and of RAPACE. This algorithm is presented in details in the next section. 3.1 Background on the retrieval of cloud cover from a sky camera

ELIFAN algorithm
They are several ways to detect clouds and estimate the cloud cover percentage from a visible full sky image. Table 2 summaries the different methodologies found in the litterature. Most of the algorithms lean on the colour information of the image pixels, but there are also techniques based on the texture of the image. Combining both increase the retrieval capacity, and especially gives more possibility for cloud types identification.

10
Within the first category, one simple and though quite efficient way to proceed is based on the use of thresholds on the RBR (Long et al., 2006). This methodology is based on the fact that a blue sky is characterised by pixels with larger contribution of blue relative to the two other colours, while clouds have more homogeneous relative contributions (closer to white or gray).
The methodology can be sophisticated with combination of RBR and GBR (Green over Blue ratio) (Kim et al., 2016), or the use of saturation (Souza-Echer et al., 2006). One of the main difficulties lies in the variability of the colour of the clear sky, 15 from one day to another (for example due to variable aerosol loading and hydratation), and from one time to the other (due to variable sun elevation). The use of adaptative thresholding (Li et al. (2011), Jayadevan et al. (2015) helps improving the results on this aspect. Another permanent challenge is due to the variability of the colour of clear sky from one part of the image to the other. There is indeed heterogeneity within a totally clear sky image, due to forward scattering and Mie scattering of aerosols.
Depending on the position of the pixel relatively to the sun position, the blue sky appears differently. It especially makes the 20 circumsolar area very difficult to deal with (there is an increase whitening around the sun). To solve this issue, Ghonima et al.  Finally, there is of course a gain in combining instruments. Ceilometers and sky imagers are very complementary in this prospect, as the ceilometer adds the cloud base height information above the sky camera system (Chu et al. (2014), Roman et al. (2017)), which can allow to access to cloud speed motion (Wang et al., 2016). Pyranometers are also naturally considered in such instrumental synergy (Peng et al., 2015).

Principle and methodology of ELIFAN algorithm 5
Initially developed in 2013, ELIFAN algorithm aims at estimating the cloud cover percentage during daytime, based on a visible image. At that time, only RAPACE system at P2OA site and the TSI-440 system of SIRTA site were used within the French network of instrumented sites. An algorithm that could be used for both cameras, despithe their differences, needed to be developed. ELIFAN is basically inspired by Ghonima et al. (2012), with the use of the RBR as the driving diagnostic to depart cloudy and clear air pixels by thresholding, and of a reference blue sky library. Both an absolute and a differential 10 thresholding processes are applied.

The different steps along the process
For a given image to be processed, the different steps are the followings: -Step1: The image is cropped in order to remove the obstacles at horizon and the circumferential part of the image that is too distorted. Figure 3 shows an example of a raw RAPACE image ( corresponding cropped selection (step 1). Only the pixels located into the cropped image (i. e. inside the black circle in figure 3a) are processed. - Step 2: A Solar mask is applied, and other masks if needed (e. g. for TSI camera, which has a sun mask arm). The solar maks is positioned with a corrected function of elevation and azimuth angles, which are deduced from the localisation of the site, date and time.

-
Step 3 (see section 3.2.2): With a combination of criteria applied on the global probability density function (pdf) of the image RBR, a primary phase evaluates whether the image is totally cloudy, totally clear or partly cloudy: -A totally cloudy image is associated with 100% cloud cover; -A totally clear image is sent to the clear sky library, and associated with a 0% cloud cover; -A partly cloudy image continues the process with the following step.

10
- Step 4 (see section 3.2.3): As a secondary phase, all images considered as partly cloudy image during the previous step 3 are processed, with a pixel by pixel point of view. For this, the algorithm searches for a reference blue sky image within a library, with the sun at same azimut and same elevation, ±1 • , as the considered image.
-If there is no reference image, the image is processed with absolute RBR threshold process -If there is a reference image, the image is processed with both the absolute RBR threshold process and the differen-15 tial RBR threshold process. If there are several reference images available, the sky with the least turbidity is chosen as a reference, based on the RBR pdf.
Cloud cover estimate is given by the percentage of cloudy pixels / uncertain pixels / blue sky pixels.
(a) (b)  A scheme of the pathway followed by the image and summarizing those steps is drawn in Fig. 4, and steps 3 and 4 mentioned above are explained and illustrated in more details in the following subsections. Figure 4. Organigram of the various steps followed along the image processing. CF abs is the cloud fraction deduced from the absolute thresholding process, and CF dif f the cloud fraction deduced from the differential thresholding process.

3.2.2
Step 3: Detection of clear sky and fully cloudy sky images In step 3, the principle is to consider the cropped image as a whole, and detect whether it is a fully cloudy sky image, a full clear sky image, or neither of those two (i. e. a partly cloudy image). This step is based on the RBR distribution of the entire ensemble of pixels. Figure 5 shows three examples: an image with clear sky (Fig. 5a), a second with fully cloudy sky (Fig. 5b) and a third with 5 partly cloudy sky (Fig. 5c, which is the same as in Fig. 3). In the first image (clear sky, Fig. 5a), all the pixels have RBR < 0.75.
The spread from 0.3 to 0.8 is due to the variability of the RBR with the scattering angle from zenith. Ghonima et al. (2012) have shown how the RBR in a given circular band of a clear sky image also depends on the aerosol optical depth (AOD), varying almost linearily with AOD from 0.3 to 0.7 in their analysis for AOD within [0, 0.3], for scattering (zenith) angle within In the second image (fully cloudy, Fig. 5b), most of the pixels have RBR > 0.75. Thicker clouds have RBR closer to 1 (Ghonima et al., 2012).
In the third image (partly cloudy, Fig. 5c) the probability density function (pdf) of the RBR shows a bimodal distribution, corresponding to the two sets of clear sky pixels in one hand (left side mode) and cloudy sky pixels in the other hand (right side mode). The main goal of step 3 is to detect whether the image is a clear sky image, to be transfered to the library. It also detects whether the image is a fully cloudy image (CF=100%).
If the maximum of RBR over the entire image is smaller than 0.6 or if more than 98% of the pixels have RBR > 0.75 (like in Fig. 5b), then this image is defined as a fully cloudy image.
Otherwise, we check whether the image has less than 2.5% of the pixels with RBR > 0.75, but still a few pixels with RBR 5 > 0.85. A clear sky image meets this criterium, because it has most of its pixels with RBR < 0.75 (see Fig. 5a), but due to a few white pixels in the circumsolar region (around the sun mask here), there will be (only) a few pixels with very high RBR (> 0.85).
So we then verify whether the image has some cloudy pixels, or is really clear sky. If it meets at least 2 criteria among the following three criteria, it means that there are clouds in the image:
Any image detected as full clear sky image after this test (that is no cloud has been detected with the previous test) is sent to the clear sky library, and associated with the azimuth and solar zenith angle corresponding of the site and time of the image. 15 That is how the reference library is progressively built.
At this point, any image which was not detected as clear sky image, or as a fully cloudy sky image, will be going through the process of step 4, for the estimate of the cloud fraction.
Note that the combination of the criteria explained above varies according to the sky camera. But they are all based on the RBR distribution over the entire set of pixels, and on the same main principle.

3.2.3
Step 4: Distinction of cloudy and clear sky pixels in a partly cloudy image In step 4, the considered image, which is partly cloudy by construction, is now considered at the pixel point of view, -i. e.
processed pixel by pixel-, contrarily to step 3. It is independently submitted to both an absolute thresholding process and a differential thresholding process when a reference clear sky image exists: -The absolute thresholding process compares the RBR of each pixel to 2 thresholds T clear and T cloud : -The differential tresholding process compares the RBR difference between the considered pixel and the corresponding pixel of a reference image, to 2 thresholds T dif f clear and T dif f cloud : For RAPACE imager, T dif f clear = 0.2 and T dif f cloud = 0.3. Figure 6 gives an example of an image processed with both the absolute (Fig. 6 c, e, g) and the differential (Fig. 6 d, f, h) processes. The results for this example are 78% (84%) of cloudy pixels, 15% (10%) of clear sky pixels, 7% (6%) of uncertain pixels for the absolute (resp. differential) process. The uncertain 'pixels' correspond to pixels that are difficult to define as clear sky or cloud. They usually correspond to thin cirrus, or to the border of a cloud. In this example, a stratocumulus cloud 10 occupies most part of the image, but a thinner cirrus cloud above it can be seen in the lower part of the image. This thin cirrus is not defined as cloud by the absolute thresholding, but is partly identified through the uncertain pixels. However, it is entirely classified as a cloud by the differential process. Depending on the aim of an analysis, one may use one or the other result, or even utilise the difference for complementary information and detection of thin clouds.

Adaptation to other cameras
This algorithm has been first developped for the RAPACE imager, which had no integrated process algorithm, and then adapted to other cameras of the ACTRIS-FR network of instrumented sites for homogeneity of the data process within the network.
According to the systems, the image may differ in terms of geometry, color, obstructing objects,... Here are the cameradependent aspects that need to be adjusted or defined in ELIFAN for it to run on a new full sky camera:

5
-The geographical coordinates and type of system (fish-eye and camera): they determine the solar mask position and course along time; -Specific additional masks, needed for certain cameras; -The image center and radius, and the radius of the cropped image; the RBR pdf criteria which determine whether an image is fully clear, fully cloudy or partly cloudy (see step 3 above);

10
-RBR absolute and differential thresholding ratios, which vary from one camera to the other, and need to be optimized (see step 4 above).
The adaptation has been done for the EKO cameras listed in Tab. 1, and for the former TSI systems of SIRTA. The optimized thresholds used are indicated in Tab. 3. Those thresholds and those used in step 3 were optimized at ± 0.05 through a sensitivity study based on one or two months of data for each camera. The raw images are automatically sent to the AERIS Icare Data

Evaluation of the Algorithm, strengths and weaknesses
An entire year of RAPACE data (2014) has been used for ELIFAN direct evaluation, before its adaptation to other systems.
Instead of considering all 15-min interval images, we considered only 1 image over 4 over the seasonal cycle, which resulted in a set of 4920 processed hourly images, which are thoroughly evaluated. The tricolour resulting images of the cloudy/blue sky/uncertain spatial distribution of pixels were compared one by one to the initial images, and evaluated with human eye by 5 a single operator. Several aspects were systematically considered for this evaluation, focused on specific previously identified potentiel failures : in detecting clear sky parts of the sky in detecting cloudy parts of the sky in detecting fully clear images (that is feeding the library)

10
linked with thin cirrus clouds in the sunrise/sunset transition periods (± 1 hour around sunrise or sunset time) due to the reflection and refraction of the sun due to rain drops on the Plexiglas dome The main results of this evaluation are given in a synthetic way for the entire year in Tab. 4, through a percentage of 15 successfull processed images over the relevant ensemble of images. The absolute thresholding process is considered first for several specific aspects. The differential thresholding process is evaluated with the relevance of all images classified as clear sky images and by checking that using the library improves the image analysis (and so the resulting cloud cover estimate). From this human-eye evaluation, we deduced that out off dawn and twilight times, cloudy and clear parts of the sky are well identified by the absolute process, with respectively 95 and 99 % of success in the analysis (see Table 4). Condensation and rain drops have generally no significant impact on the cloud cover estimate, and the number of images that are significantly impacted is lower than 10 over the 4920 processed images. So ELIFAN works generally very well.
However, there are clearly identified weaknesses: Dawn and twilight periods (corresponding to 15% of the images) are 5 critical times, with obvious failure of the algorithm, because "clear sky" is not "blue" then, and clouds are not "white or grey" (87% of failure, see Table 4). This is the main weakness of the algorithm, and main prospective of progress to put the efforts on. As a consequence, the blue sky reference library can also be improved: up to 23% of the images in the library are found inappropriate (see Table 4), a small half of them belonging to the critical dawn/twilight period (not shown).
We also find that 54% of the time, the differential process is judged better than the absolute process (see Table 4). From this 10 results, one may conclude that there is no obvious advantage of the differential process relative to the absolute process. But it definitely gives better results in detecting clear sky areas in the circumsolar region and in detecting thin cirrus clouds (which will be illustrated later). Furthermore, the use of the combination of both absolute and differential processes may interestingly be used for the estimate of thin cirrus clouds.
In addition to the previous systematic evaluation, a general statistical analysis over one year of data without decimating (more 15 than 13000 images) was made on the departure between the cloud fraction deduced from the absolute thresholding process (CF abs ) and the cloud fraction deduced from the differential thresholding process (CF dif f ). The median of the difference in percentage of cloud is 2%. The 10% and 90% quantiles of the departure are respectively at -7% and 9%. 8% of the values of |CF dif f − CF abs | are larger than 10%. And this latter number drops to 3% of the images only when we consider only the period of the day between 0900 UTC and 1500 UTC, that is when avoiding the tricky period of sunrise and sunset. Thus, large 20 values of the departure |CF dif f − CF abs | are associated to this transition period issue, to thin cirrus occurrence, and to other specific situations that would lead to outliers. Figure 7 shows the correlation between CF dif f and CF abs for this same large set of images. Considering only the midday period (and so avoiding the dawn/twilight period, see blue color in Fig. 7) improves the correlation and 1-to-1 correspondence, and especially reduces the under-estimations by CF dif f relatively to CF abs .   Here we illustrate the gain obtained by the observation of a sky imager at an observatory, complementarily to ceilometer and pyranometer typical measurements, as well as the performances of ELIFAN.
Two days are considered here, the 5 June 2016 (in Fig. 8) and the 9 June 2016 (in Fig. 9), where we compare the cloud cover estimates from ELIFAN, and the cloud cover estimates from a CT-25K ceilometer, at P2OA site. The latter have been 5 calculated over 15, 30 and 60 min intervals, based on the occurrence of detection of a cloud base by the ceilometer during this time interval. Complementarily, we also use CNR-4 Kipp&Zonen pyranometer measurements, in order to get some information on the downward shortwave radiation. In Figs. 8 and 9 we show, for three raw RAPACE images at chosen times (panels (a), (b) and (c)), the ceilometer cloud base height detection (panel (d)), the cloud cover estimates (panel (e)), and the shortwave downward radiation (panel (f)). Note that we do not expect the cloud cover estimates deduced from the two instruments to 10 entirely agree, since they are based on very different concept. As overlined by Wagner and Kleissl (2016) before, the ceilometer sees a limited area of the sky above, relatively to the sky camera which integrates a larger 2D area of sky above, and a limited range of measurement along the vertical (maximum 7-8 km a. g. l.) depending on solar/aerosol conditions. We nevertheless expect them to compare consistently together. Complementarily, the ceilometer brings additional information on the cloud base height, and the pyanometer gives information on the radiative impact of the clouds at surface. 15 On 5 June 2016, the day started with a full deck of low stratus clouds, which progressively broke and lifted during the morning convection, until dissipating totally later in the afternoon (see Figs. 8, all panels). This is a typical situation when the algorithm works very well, and also when we find a large consistency between the ceilometer-based cloud fraction and the sky imager-based cloud fraction, as seen in Figs. 8(e). Looking at carefully some chosen times of the day, one can tell more about each phase.
This could seem paradoxical, but is due to the large luminosity to the east (right in the image Figs. 8(a)), that is close to the white color found in circumsolar area of the reference clear sky image (even out off the already important solar mask). So the 100% cloud cover are indeed better caught by the absolute thresholding method. (That is, the expected improvement around 25 the sun is actually obtained in case of clear sky, but not in case of cloudy sky like here.) Starting 15:45, the sky is almost clear (only small cumulus in Figs. 8(c)), the cloud cover should be very close to 0%. The ceilometer-based fraction and the differential ELIFAN thresholding cloud fraction agree on this fully clear sky. The absolute thresholding cloud fraction leads to a non-zero amount during this period, below 5%. This is due to both the small clouds north to the instruments and not caught by the ceilometer that indeed make the cloud fraction non-zero, but in a larger extent to the 30 circumsolar area, around the solar mask, that appears as a cloud.
After 18:00 UTC, a large discrepancy is found between the ceilometer and the sky imager estimates. This is due to the transition period issue mentioned in section 3. The absolute thresholding technique especially fails in seeing the clear sky. The differential thresholding is doing a little better. The ceilometer, which is a priori not affected by sunset or sunrise, does not see clouds to the north (close to the mountain ridge). But ELIFAN differential estimates still probably over-estimate the cover.
One can see here that whatever the instrument (and even with eye), this transition period remains delicate to analyse, and may remain quite uncertain.
The example shown at 11:45 UTC (Figs. 8(b)) is the typical situation of very good and consistent results of both the 5 absolute and the ELIFAN differential thresholding techniques. The sensitivity study on the time intervals used to calculate the ceilometer-based cloud fraction estimates show that the 30 min interval seems appropriate and consistent with the sky imager for that case. Between 8:00 and 11:00, the cloud field is similar to Figs. 8(b) (low cumulus clouds), but with sometimes some spatial heterogeneity (not shown). The estimates from the ceilometer can vary a lot, and can also differ significantly from the ELIFAN estimate. This is due to this spatial heterogeneity, that the ELIFAN estimates will integrate in its 2D approach 10 while the ceilometer is restricted to a 1D approach along wind. Those results are fully consistent with Wagner and Kleissl (2016), who have evaluated the ceilometer cloud cover retrievals by comparison with sky imager retrievals, and pointed out the heterogeneity of the cloud field as one of the sources of errors in ceilometer-based estimates.
The second example shows more obviously the different information that each instrument brings, and how complementary they are.  9 June 2016 has a complex sky, with a mix of mid-level clouds, and -thinner or deeper-cirrus clouds ( Fig. 9(a), (b), (c), (d)).
This is a typical case of potential difficulties in cloud cover estimates, and even potentially on cloud cover amount definition.
The sky imager and ceilometer cloud fraction estimates differ a lot during that day ( Fig. 9(e)).
Around 07:00 UTC, the thin cirrus clouds shown by RAPACE sky camera are not detected at all by the ceilometer, while they are visible in several areas ( Fig. 9(a)) and have a significative impact on the shortwave downward radiation ( Fig. 9(f)). It 5 could be explained by the fact that the cirrus clouds are too high (above 7 km) for the ceilometer sensitivity. The cloud cover amount found by ELIFAN from the sky camera images (around 40%) makes sense, and is more appropriate than the ceilometer 0% cloud cover estimate. This is also fully consistent with the work done by Wagner and Kleissl (2016) who identified the limitation of the vertical range as the largest source of error on the ceilometer-based estimates (more significant than the error linked with the heterogeneity in the cloud field, mentioned in the previous example). 10 During this morning period of 9 June 2016, the differential and the absolute thresholding estimates are sometimes significantly different: this is due to the presence of very thin cirrus clouds, that are not caught by the absolute thresholding. Thus, the difference between both estimates gives an indirect estimate of the amount of very thin cirrus clouds (it is also the case at 16:30 UTC for example). The impact of very thin cirrus clouds on the downward shortwave radiation is not negligible, about 100 Wm −2 ( Fig. 9(f)), which means that the differential thresholding is more relevant than the absolute thresholding in case of 15 thin cirrus.
At 11:00 UTC, the cirrus got larger and also slightly deeper, and some mid-clouds start to appear as well, all this leading to a full covering of the sky. This explains why both the ELIFAN differential and the absolute thresholding techniques agree with a large cloud cover (close to 100%). The impact of those clouds on the downward shortwave radiation is more significant than at 07:00, with about 40% reduction of solar energy ( Fig. 9(f)). The ceilometer detects the cirrus more than before as well as 20 the mid-level clouds. But the ceilometer cloud fraction estimates is 20 %, which still seems underestimated.
At 15:00 UTC, the mid-level clouds cover more largely the sky, screening the detection of the cirrus clouds by the ceilometer.
The ceilometer-based cloud fraction is consequently increased, larger than 60%, but still lower than the sky imager estimates.
The impact of the cloud cover is significant on the downward shortwave radiation.
The dawn and twilight transitions are again problematic here for ELIFAN : starting at 19:00 UTC, the thickness of the cirrus 25 clouds gets still larger then before, without mid-level clouds below. The ceilometer-based estimates increase, but ELIFAN interpretes the images as clear sky. Around 05:00 UTC, the sky is clear (see Fig. 9(f)), the ceilometer and the ELIFAN differential thresholding lead to 0% cloud cover, but the absolute thresholding techniques fails and finds non-zero cloud cover (up to 20%).

Concluding remarks
From the evaluation of ELIFAN on a one-year long data evaluation, we deduced that outside the morning sunrise and sunset 30 transitions, ELIFAN is a robust and efficient algorithm to evaluate the cloud cover amount from a full sky camera. 95% of the daytime cloudy images and 99% of clear sky images are analysed appropriately. So ELIFAN works generally very well. It is also relatively easy to adapt to a new camera, as soon as the quality of the image is high enough. However, the sunrise/sunset transition is the main weakness of the algorithm. This is where efforts should be done in the future, for improvement of ELIFAN. Specific criteria and thresholding could be applied in this time window.
The effort of developping a common sky-image data process for a network of sky imager has been very fruitful, as now 5 cameras of the ACTRIS-FR French multi-instrumented sites network have their images processed and gathered together at the same nation Data Center of AERIS-Icare (at https://actris.aeris-data.fr/data/). Three more cameras (on three other sites) should 5 join soon. It is planned to unvalidate the sunrise/sunset period and the erroneous images of the library, before opening free access to consolidated data, and until improvement of the algorithm during this specific transition period.
The use of the clear sky library in the differential thresholding process generally improves the image process relatively to the absolute process, since it better detects thin cirrus clouds. But the absolute thresholding process turns out to be sometimes better, for example in fully cloudy skies. It is also definitely useful for days with no reference image, or in case of casual field 10 experiments where there is no clear sky library available. Moreover, the combination of both estimates may be an interesting way to access to the estimate of the thin cirrus clouds. But this remains to be further evaluated.
The combination of ceilometer and sky camera has revealed the complementarity of both instruments. We showed that a similar cloud cover amount is deduced from both instruments when the clouds are low. But they lead to very different cloud cover estimates when the clouds are too high for the ceilometer vertical detectability range, or when the field of cloud is 15 heterogeneous. Those results are in full agreement with the recent work made by Wagner and Kleissl (2016).
Indeed, the two instruments have fundamentally different points of view, as the ceilometer points vertically and the integration time considered for the cloud cover estimate only samples a small part of the sky above. While the sky camera has a full 2D view. Thus, the sky imager catches more appropriately the spatial variability, and the cloud cover estimates from its images are more representative of the real sky. Also, the sky camera can localize the clouds in the sky, which can be very useful in 20 solar energy nowcasting.
The clear advantage of the ceilometer though, lies in its capability of quantifying precisely the cloud base height(s). So that the two instruments are very complementary. The information brought by the ensemble of a ceilometer, radiometers and a full sky camera together is shown to be a very relevant synergy of instruments.
Acknowledgements. The data of RAPACE sky imager, the ceilometer and the pyranometer used here were collected at the Pyrenean Plat-

25
form for the Observation of the Atmosphere P2OA (http://p2oa.aero.obs-mip.fr). P2OA facilities and staff are funded and supported by the University Paul Sabatier, Toulouse, France, and CNRS (Centre National de la Recherche Scientifique). We thank Météo-France for the ceilometer installation at P2OA and for the data availability. We thank AERIS data infrastructure for development support and data process-