Calibration of an all-sky camera for obtaining sky radiance at three wavelengths

Introduction Conclusions References


Introduction
Knowledge and measurements of the angular distribution of sky radiance (skylight at solar wavelengths, i.e. scattered sunlight) are important since the shape of human beings, animals, plants, etc. is not regular or oriented to the Sun.Therefore, the sky radiance distribution has an outstanding role in the evaluation of radiation reaching complex targets like the human body or studies directed towards the development of solar energy systems.
The sky radiance depends on aerosol optical properties, and thus these properties can be derived from sky radiance measurements.In this sense, different authors (e.g.Nakajima et al., 1996;Dubovik and King, 2000) proposed inversion algorithms for the retrieval of aerosol optical properties using measurements of sky radiance.Dubovik et al. (2006) and Olmo et al. (2008b) include non-spherical particles approximation in the inversion codes of Duvobik and King (2000) and Nakajima et al. (1996), respectively, to obtain the columnar aerosol size distribution, the single scattering albedo (SSA), the phase function (PF) and the asymmetry parameter from radiance measurements.To this end, Olmo et al. (2008b) used the sky radiance in the principal plane (the R. Román et al.: Calibration of an all-sky camera plane perpendicular to the horizon that crosses the solar zenith angle, SZA, and zenith).Therefore, measurements of sky radiance are also useful to retrieve the aerosol optical properties.
Clouds produce the strongest changes in solar radiation with a substantial decrease of the direct component and an increase of the diffuse radiation, which lead to a decrease in global radiation (Alados et al., 2000;Alados-Arboledas et al., 2003;de Miguel et al., 2011b).The influence of the cloudiness on solar radiation has a significant spectral dependence, being weaker when the wavelength is shorter (Foyo-Moreno et al., 2001;Bilbao et al., 2011;de Miguel et al., 2011a).On the other hand, the clouds can also produce the enhancement of the solar radiation at surface, reaching levels even higher than its value at the top of atmosphere (Piacentini et al., 2010;Antón et al., 2011a).Therefore, studies about the behaviour of sky radiance and clouds are important for a better understanding of cloud-radiation interaction.
Several authors have analyzed the sky radiance under different sky conditions using several types of instruments.For instance, Grant and Heisler (1997), Grant et al. (1997a) and Grant et al. (1997b) used silicon photodiodes with filters, mounted on a platform that provided for rotational and inclinational motion, to take broadband radiance measurements in the ultraviolet range under obscured overcast, translucent overcast, and clear skies.Their system took a complete measurement of sky distribution (a grid of 10 • zenith and 3 • in azimuth) in 30 min.Vida et al. (1999) tested a cloudless radiance model using radiance measurements taken by a pyroelectric radiometer (modified to present a 5-degree effective half angle field of view), and they found the highest differences between modelled and experimental radiances close to the Sun.Weihs et al. (2000) took spectral radiance measurements under different sky conditions using a spectroradiometer connected to a tube of fore-optics (1 • field of view) mounted in a tracker programmed to cover a full sky radiance distribution (a grid of 10 • in zenith and azimuth) in 15 min.Wuttke and Seckmeyer (2006) recorded measurements of sky luminance and spectral radiance using a sky scanner that took 150 points, in 40 s, evenly distributed across the sky.Both works (Weihs et al., 2000;Wuttke and Seckmeyer, 2006) compared radiance measurements with radiative transfer models based on the discrete ordinate radiative transfer algorithm, DISORT (Stamnes et al., 2000), and the results indicated that circumsolar region shows the highest errors, and the input parameters would have to be known with greater accuracy (e.g. they do not use PF as input).
Sky cameras, or sky imagers, are devices that combine a digital camera with a fisheye lens, or a hemispherical mirror in some cases, that takes pictures of the full hemispherical sky.These instruments present two main features: firstly, they have a very high angular resolution taking measurements with a full hemispherical field of view, and secondly, these measurements are acquired simultaneously which im-plies no problems with changes in atmosphere between two consecutive measurements at different viewing angles.
Sky imagers have been used for different purposes in research.Thus, these instruments were usually utilized to obtain cloud cover using threshold values for the ratio between different wavelength channels (Long et al., 2006).Heinle et al. (2010) developed an algorithm to discern the kind of cloud, and Mannstein et al. (2010) used a sky imager to detect and study contrails and additional cirrus clouds caused by air traffic.Aerosol optical depth (AOD) and cloud cover were retrieved using the All-Sky Imager and neural networks by Cazorla et al. (2008a) and Cazorla et al. (2008b), respectively.López-Alvarez et al. (2008) derived sky radiance spectra from sky images using a linear pseudo-inverse method, and Olmo et al. (2008a) used these spectra, and an iterative method based on radiative transfer, to obtain AOD at 550 nm.Other authors used a sky imager with filters to measure the relative sky radiance polarization (Horváth et al., 2002;Kreuter et al., 2009).Some works were performed using sky imagers carefully calibrated in the laboratory to obtain spectral radiance values (Voss and Zibordi, 1989;Zibordi and Voss, 1989;Voss and Liu, 1997;Cazorla et al., 2009).
The main aim of this paper is the calibration of a sky imager to obtain sky radiance measurements at three different wavelengths at Granada (Spain) using a radiative transfer model.The great advantage of the sky camera with respect to other instruments is its high time and spatial resolution.Additionally, the calibration method proposed in this work is simpler and cheaper than the methodologies found in literature which need laboratory calibration.
This paper is structured as follows: Sect. 2 shows the location, instrumentation and the data used in the work.Section 3 describes the methodology used to obtain cloudless sky radiance values, and these estimated values are validated using radiance measurements.The full method for obtaining sky radiance from sky images is presented in Sect. 4. Results and conclusions are in Sect.5, where the obtained calibration matrices are tested with measurements and a qualitative analysis of three sky images is presented.Finally, the conclusions are summarized in Sect.6.

Site
The measurements used in this paper were taken by the Atmospheric Physics Group (GFAT, http://atmosfera.ugr.es) of the University of Granada on the rooftop of the Andalusian Center for Environmental Studies (CEAMA, 37.17 • N, 3.61 • W, 680 m a.s.l).Experimental site and its local conditions were described in detail by Lyamani et al. (2010Lyamani et al. ( , 2011)).

The All-Sky Imager
The All-Sky Imager designed and deployed by the GFAT has been operating at our experimental site since 2005 and basically consists of a digital colour CCD camera with a fisheye lens encapsulated in an environmental housing that is temperature regulated with a peltier cell.The system is installed in a Sun tracker (2AP model from Kipp & Zonen) to block the direct solar radiation using a shadow ball.A transparent acrylic dome protects the sky imager from the weather conditions like rain or snow.This dome was changed by a glass dome (non-acrylic) in December 2010 due to degradation problems, being the new dome more stable.The camera body is a RETIGA 1300C (QImaging) and has a CCD sensor with three channels: red, green and blue.The CCD sensor is the model ICX085AK from Sony working with a filter that blocks the wavelengths in the infrared region (standard configuration of the camera).The spectral responses of the camera channels are shown in Fig. 1, being centred around 450 nm, 550 nm and 650 nm with a bandwidth about 100 nm for the blue, green, and red channel, respectively.Spectral responses show a symmetrical shape except for the red channel, because it is influenced by the infrared filter.The lens is a Fujinon FE185C057HA fisheye lens, its field of view being 185 • , which guarantees 180 • field of view projected into CCD.The lens manufacturer indicates that there is no longitudinal or lateral chromatic aberration and the angular distortion is less than 0.8 %.The lens effect in the image was obtained using a ruler in a dome, observing that the variation of zenith angle is linear with the pixel distance (equidistant projection in the CCD), and the solid angle viewed by each pixel was calculated using this information (Cazorla, 2010).The final result of the camera is an image (900 × 900 pixels) with 12-bits digitalization per channel.As an example, three recorded images can be seen in Fig. 2 for three different sky conditions: cloudless, obscured overcast and partially cloudy.There are notable differences between the three images, showing the higher response in the blue channel when the sky is cloud-free, and brighter clouds when the sky is not overcast.The Sun tracker, blocking the direct radiation, and other obstacles surrounding the camera can be appreciated in the images.
The camera was programmed to take images every 5 min between sunrise and sunset with an exposure time of 12 ms.All information about the GFAT All-Sky Imager can be found in Cazorla (2010).

Sunphotometer CE-318
A sunphotometer CE-318 (CIMEL Electronic, France), which is the standard Sun/sky photometer used in the AERONET network (Holben et al., 1998), was installed next to the sky imager in the same rooftop.This instrument (in- cluded in the AERONET network) takes extinction measurements at 340,380,440,500,675,870,940 and 1020 nm using filters, and they are used to retrieve aerosol properties such as AOD and Angström coefficients at different wavelengths, except at 940 nm which is used to retrieve total column water vapour column.
In addition, measurements of sky radiance at 440, 500, 675, 870 and 1020 nm are registered by the sunphotometer using a sky collimator at high gain at different angles in the principal plane and the almucantar (the circle parallel to the horizon with the zenith angle equal to the solar zenith angle, SZA) configurations.These measurements are useful to retrieval aerosol optical and microphysics properties like columnar aerosol size distribution, complex refractive index, PF and SSA at different wavelengths following the AERONET procedures (Holben et al., 1998;Dubovik and King, 2000).
Calibration of this instrument was performed annually by AERONET-RIMA network.More details about CIMEL CE-318-4 can be found in Holben et al. (1998).

Data set
Different measurements were used in this work.From the measurements recorded by the All-Sky Imager, we only work with those recorded during the year 2011 in order to guarantee images with the glass dome.
On the other hand, the aerosol information was obtained from the CIMEL sunphotometer.Thus, the Angström α parameter was calculated using AOD at 440 and 675 nm, and the Angström β parameter was obtained taking into account α and AOD at 500 nm: (1) (2) In addition, the sunphotometer sky radiances measured with the 440 nm and 675 nm filters were provided by AERONET, but the products of the network are the radiances at the nominal wavelengths of 441 nm and 677 nm due to the filter bandwidth.Radiance measurements using the 500 nm filter (nominal wavelength of 501 nm) are only available along two months in 2011, but they were used to test the calibration method in Sect.5.1.Additionally, SSA values were also used in the work and, how they are retrieved using sky radiances, AERONET provides these values at the nominal wavelengths of 441 and 677 nm.The SSA values are only available at 441 and 677 nm, but we used the SSA at 550 nm, which was estimated as the mean between SSA 441 and SSA 677 .Similar method was followed for the PF values, which are only available at 441 and 677 nm (nominal wavelengths) in AERONET, and thus PF 550 was estimated as the mean between PF 441 and PF 677 for each scattering angle.Finally, water vapour column values, provided by AERONET, were estimated using Sun direct measurements.All mentioned data provided by AERONET can be downloaded visiting the website http://aeronet.gsfc.nasa.gov.The daily total ozone column, TOC, used in this work was measured by several satellite-based remote sensing instruments: OMI collected in the Aura satellite (downloaded from http://disc.sci.gsfc.nasa.gov/giovanni)and GOME and GOME-2 data (supplied by the staff of the Remote Sensing Technology Institute, IMF, of the German Aerospace Centre, DLR).These satellite data show, in general, an excellent agreement with reference ground-based measurements (Antón et al., 2009a, b).

Modelling cloudless sky radiance
The methodology used in this work for the absolute calibration in radiance of the All-Sky Imager is based on the comparison of its output measurements with the sky radiance values estimated by the UVSPEC radiative transfer model under cloud-free conditions.This section presents the description of the inputs used in the code and the validation of the modelled radiance values against experimental data measured by the CIMEL sunphotometer.

UVSPEC model
The reference values of sky radiance were estimated by the LibRadtran software package (the 1.6 beta version was used in this paper), which main tool is the UVSPEC model, developed by Mayer and Kylling (2005).The various radiative transfer equation solvers included in the UVSPEC have different capabilities to calculate the radiative quantities in the Earth's atmosphere.The radiative solver chosen to obtain sky radiance, on the Earth's surface, was an improved version of the DISORT algorithm in C language (CDISORT) running in 18 stream mode.This solver was developed by Buras et al. (2011), and it uses the correction developed by Nakajima and Tanaka (1988) applying the directional distribution after secondary scattering of light in an atmosphere.
We run the UVSPEC model using the standard profiles and inputs indicated by Antón et al. (2011b) for the GFAT station at Granada.The standard atmosphere was mid-latitudes summer (from May to October) and winter (the rest of months).The extraterrestrial spectrum used was the proposed by Gueymard (2005).Surface albedo was considered as a fixed value of 0.2 for all wavelengths.Daily TOC was included in the inputs, and all simulations were run under cloud-free conditions.
For aerosols, the appropriated spring-summer and fallwinter profiles given by Shettle (1989) were used.We chose an urban aerosol profile in the lower 2 km of the atmosphere and a background profile above 2 km, and the impact of the aerosol loading in the boundary was expressed by columnar α and β Angström coefficients (see Sect. 2.3) which are scaled in the chosen profiles.Legendre moments were used as phase function information input, and these moments were calculated using the PMOM tool, included in LibRadtran package, which calculates the Legendre moments of a given phase function.The PMOM tool was run to obtain 200 moments with a scattering angle grid resolution for moderate forward peaks.The SSA and PF as inputs depended on the wavelength of the estimated radiance.
Finally, the UVSPEC outputs for each simulation were the radiances, in m W m −2 nm −1 sr −1 , at a selected wavelength each 5 • and 1 • in azimuth and zenith angles, respectively.

Modelled vs. experimental radiance
Sky radiances measured by the CIMEL sunphotometer were used to study the reliability of the UVSPEC modelled radiances.For this goal, 50 almucantar cloudless measurements of radiance at 441 and 677 nm were chosen randomly.The cloudless radiances were calculated using UVSPEC and the inputs explained above, but changing the output angles for the almucantar angles and selecting the wavelengths of the sunphotometer.In addition, SSA 441 and PF 441 were used as input for the calculations of radiance at 441 nm and SSA 677 and PF 677 for the radiance at 677 nm.
The absolute value of the relative error, ARE, between modelled and experimental values was calculated, for each scattering angle, by the next equation: where χ is the ARE, and R MOD and R MEAS are the modelled (UVSPEC) and measured (CIMEL) sky radiances, respectively.ARE values were calculated for each scattering angle, which depends on the azimuth angle relative to the Sun's azimuth and the SZA (Nakajima et al., 2006).Intervals of the scattering angle with a width of 5 • were taken using the 50 random values (random solar zenith angles), and Fig. 3 shows the mean (panel a) and the median (panel b) of these intervals for the two wavelengths.The figure includes the standard deviation (error bars), which is only half represented (up or down) for 677 nm due to the high value.The mean value of ARE for the sky radiance at 677 nm is about 60 % when the scattering angle is around 0 • .In contrast, the behaviour is remarkably good for angles far from the Sun.Thus, the mean parameter varies between 4 % and 10 % for scattering angles larger than 10 • and the standard deviation is quite lower than near the Sun. Figure 3b shows that the median values of ARE at 677 nm are smaller than 10 % for all scattering angles.This high difference between the median and mean of ARE at 677 nm for cases close to the Sun indicates that only a few modelled cases significantly differ with respect to the experimental data when the scattering angle is around 0 • .On the other hand, the mean and median values of ARE at 441 nm range are smaller for low scattering angles, and these values are lower than 20 % for all scattering angles.In addition, the mean and median of the bias (relative difference taking into account the sign) are shown in panels c and d.These values suggest systematic differences between the modelled values and the measurements with an underestimation of the model for 677 nm and an overestimation for 441 nm.Therefore, the sky radiance estimated with the UVSPEC model, and used in this work as reference for the calibration of the All-Sky Imager, presents differences with respect to the experimental ones smaller than 20 % and 10 % for 441 nm and 677 nm, respectively.Nevertheless, we have decided to avoid the use of the UVSPEC simulations for those cases near to the Sun (azimuth angle relative to Sun smaller than 10 • ).

Calibration method
This section describes the method followed to obtain the calibration matrix of the All-Sky Imager and, thus, to convert the output signal of each pixel and channel in the sky radiance that reaches every pixel under cloud-free conditions.Both modelled and experimental sky radiances could be used as reference in the calibration method.In this work, we have employed modelled values derived from a radiative transfer model instead of experimental measurements due to two reasons: the effective wavelength and the field of view.Thus, while the effective wavelengths of the camera channels differ from the sunphotometer ones, the use of a radiative transfer code allows to simulate sky radiances at the same effective wavelengths of the camera channels.In addition, the use of experimental sky radiances is only useful for one pixel calibration but using a radiative transfer model all pixels can be calibrated.

Effective wavelength
In order to obtain the radiance reaching the All-Sky Imager at every pixel, it is necessary to simulate spectral radiance between 400 and 700 nm and weight them using the spectral response shown in Fig. 1 for each channel.This process expends a lot of computation time; moreover, we are interested in obtaining spectral radiance instead of broadband.This issue is solved using the concept of effective wavelength (Kholopov, 1975).The ratio of two broadband measurements, taken with the same instrument, with its self spectral response, under different conditions, is also equal to the ratio of the same measurements but measured with an instrument that only is sensitive at the effective wavelength, λ e .Therefore, the effective wavelength for each channel is calculated using the following expression: where λ is the wavelength, I is the irradiance reaching the instrument, and S is the spectral response of the channel (Fig. 1).In order to calculate λ e , a different set of irradiances reaching the camera is simulated using the UVSPEC model.A total of 200 simulations of spectral diffuse irradiance (direct irradiance does not reach the camera) were simulated per channel.The phase function used in these simulations is the Henyey-Greenstein function.In addition, the values of the asymmetry parameter and SSA are 0.7 and 0.9, respectively, and a fixed TOC value of 300 DU is utilized for all wavelengths under a mid-latitudes summer atmosphere.The 200 simulations for each channel (600 in total) were run changing SZA (from 10 • to 80 • in 10 • steps), α parameter (from 0.2 to 1.8 in 0.4 steps) and β parameter (from 0.01 to 0.21 in 0.05 steps).Thus, 200 effective wavelengths per channel were calculated by Eq. ( 4) using the simulated spectral diffuse irradiances.The mean values were 464 nm (blue), 534 nm (green) and 626 nm (red), with a standard deviation of 2 nm for the three channels.Therefore, the spectral radiance reaching the camera is simulated at these three effective wavelengths as is described in Sect.3.1, taking into account that the SSA and PF values used as inputs are SSA 441 and PF 441 to estimate the radiance at 464 nm, SSA 550 and PF 550 for 534 nm, and SSA 677 and PF 677 for 626 nm.

Calibration matrix
First, a cloudless image is selected, being separated in the red, green and blue images.We mask the zenith angles higher than 80 • , the pixels near to the Sun, and the different obstacles around the whole sky like the shadow system and the two pyranometers installed on the tracking system near the camera (see Fig. 2).In the next step, the pixel counts were normalized to unity using the ratio between the raw value and the highest recorded value (2 16 ).Finally, the dark noise signal was removed taking into account that, in all rows and columns of an image, a dark zone appears whose signal must be null (as a first approximation).Therefore, the minimum values for each column and each row were averaged and considered as the dark signal, which was subtracted to the normalized signal.Some authors (e.g.Voss and Zibordi, 1989;Voss and Liu, 1997) found problems related to the lens since its transmittance varies with the field of view.However, in this work, this issue was not considered because the calibrated system consists of the CCD with the lens together, and the field of view of the lens presents no significant changes in the pixels between different images due to the angular symmetry.
The corrected image is a 900×900 matrix, P, which P ij element is the corrected raw signal for the ij -pixel.This signal should be proportional to the incident radiation: radiance that reaches the ij -pixel multiplied by the solid angle of that view, ij .Therefore, a 900×900 matrix, R, was constructed using the simulated radiance values (Sects.3.1 and 4.1) and interpolating for each pixel.Therefore, the matrix calibration, K, can be expressed as This relationship is only valid if the response of the CCD sensor is lineal.The raw signal of the CCD, without removing the dark noise, was represented as a function of the simulated sky radiance for different cloudless images (not shown).The results indicate that the CCD response is linear for normalized raw values smaller than 0.8, being the pixel saturated for a signal higher than 0.8.Therefore, the pixels with normalized signal higher than 0.8 (before the subtraction of the dark noise) were removed along with their eight neighbours due to blooming effect (Voss and Liu, 1997).
From the method described here, given a cloudless image, three calibration matrices (K-RED, K-GREEN and K-BLUE) are calculated using Eq. ( 5).These matrices can be used to calculate the radiance at 464, 534 and 626 nm multiplying the specific K matrix by the specific channel of the image and dividing this value by the solid angle viewed for each pixel.

Matrix calibration variability
A set of cloudless images were selected to study the variability of the matrix elements (K ij ).The dates of the eight chosen days along with the initial and final time of their image set (every 5 min) are presented in Table 1.These days were selected to study the variability between consecutive days (day 1 to 4), and the variability in a long period (5 months) from winter days (day 1 to 6) to summer ones (day 7 and 8).Moreover, the eight selected days were completely cloudfree in order to see the intra-daily variation of the calibration matrix.Therefore, a K matrix can be obtained for each image recorded during the eight days shown in Table 1.
In order to analyze the influence of SZA on the K ij elements, we evaluated the variability for each ij -pixel over a whole day.Thus, the intra-daily coefficient of variation, , was calculated for each ij -pixel: where σ (K ij,T ) and M(K ij,T ) are the standard deviation and the mean of the several values of K ij throughout the day.Thus, is a matrix whose elements indicate the daily variation of each K ij .
Table 2 shows the percentage of K ij elements with lower than 10 % and the mean value of for each day.It can be seen that the intra-daily variation of the coefficients of the matrix calibration is small, with a mean value between 3.1 % and 5.4 % for all days and channels.In addition, the percentage of coefficients with variations lower than 10 % is near to 100 % for all days.These results justify that we assume that K-RED, K-GREEN and K-BLUE do not depend on SZA, and that daily mean K matrix, K d , obtained as the average of all calculated K matrices in a day can be considered representative for that day.Thus, K d is calculated for the eight selected days, and the resulting matrices are compared to each other The matrix with the absolute difference between the K d of the m-day (K d,m ) and the n-day (K d,n ) is obtained as Table 3 reports about the inter-comparison between the eight days, showing the percentage of pixels with a difference lower than 10 % ( K d,m,n < 10 %) and the mean of these differences in parentheses.The mean difference between the days 1, 2 and 3 is smaller than 2 % with 99.9 % of pixels with a difference lower than 10 %.This result indicates low variation in K between consecutive days.The highest mean difference between two winter days is 2.9 %, 4.0 % and 4.5 % for the red, green and blue channels, respectively.Moreover, the percentage of pixel with a difference lower than 10 % is always higher than 99 % when the winter days are compared for all channels.Table 3 also shows that the differences increase when day 7 is compared with the other days, being stronger in the green channel.This fact could be explained by some problematic images in day 7, because this day also shows the worst behaviour in Table 2. Nevertheless, the differences between day 7 and the others are smaller than 6.1 %, being within the margin of error given by the cloudless modelling.The highest value of K d,m,n (not shown in Table 3) ranges from 14.8 % to 57.6 %, from 19.3 % to 152.5 %, and 99.8 (4.9) 99.9 (3.9) 99.9 (3.5) 5 100 (4.8) 100 (4.1) 100 (4.5) 6 99.0 (5.3) 100 (4.2) 99.9 (3.9) 7 98.0 (5.3) 99.2 (4.9) 96.0 (5.2) 8 99.6 (4.0) 100 (3.4) 100 (3.5) from 16.8 % to 146.8 % for red, green and blue channels, respectively.
Once we have observed that the variability of K ij elements is not significant, a unique calibration matrix for each channel can be derived from all images recorded during the eight selected days (a total of 705 images per channel).Figure 4 shows three images with the calibration matrices and their standard deviation, both in m W m −2 nm −1 raw −1 .The matrices' coefficients show uniformity for all angles in the three channels.The coefficient of variation is below 10 % in 99 % of the pixels, and its mean is lower than 6 % for all channels.However, a few pixels (less than 1 %) show large variability (white pixels for the standard deviation images in Fig. 4).This high deviation could be related to occasional little spots.
Therefore, the three calibration matrices shown in Fig. 4 can be applied to the raw data measured by the All-Sky Imager and, thus, the sky radiance can be estimated at 464, 534 and 626 nm for all sky conditions.
Figure 5 shows the cloudless sky radiance measured by the sunphotometer and the estimations given by camera for the almucantar (left) and principal plane (right).Each panel corresponds to a particular case which was randomly selected with the unique condition that the time difference between the CIMEL and the camera measurements must be smaller than 10 min.It can be seen that CIMEL and camera radiances show a similar behaviour and sensitivity to scattering angle.
To evaluate the camera-CIMEL differences, the ARE mean values are calculated using 40 random cloudless im-ages for 677 nm and 441 nm and 11 images for 501 nm. Figure 6 shows the variability of this parameter and its standard deviation (error bars) for the almucantar (panel a) and principal plane (panel b).For the almucantar configuration, the ARE mean was calculated for 5 • intervals of scattering angles.However, for the principal plane, the ARE averages were done for each zenith angle measured by CIMEL because zenith and scattering angle are the same in that geometry.It can be observed that the errors in almucantar configuration are lower than 15 % for all scattering angles except near to the Sun (and far to the Sun at 501 nm) when the disagreement experiences a notable increase.For the three wavelengths, the errors in the principal plane are also smaller than 15 % except for the lowest and highest scattering angles.The bias (panels c and d) indicates that these differences are systematic, and that the camera overestimates the measurements at 441 nm (almucantar and principal plane) and at 677 nm (principal plane) except for angles near to the Sun, and it underestimates the radiance measurements at 501 nm (almucantar and principal plane) and at 677 nm (almucantar).These errors are similar to those obtained between the UVSPEC simulations and CIMEL (Fig. 3).Therefore, the proposed method and the obtained K matrices can be considered valid to estimate sky radiances.The obtained errors in the camera radiances are higher than the sky radiances measured by CIMEL and used in inversion algorithms for aerosol properties.Therefore, the proposed method to obtain spectral radiance from a sky camera cannot be considered useful to estimate aerosol properties with inversion codes, but it can be useful for other applications related to cloud properties or aerosol optical properties such as AOD, α and β.

Application of the calibration matrices
Spectral sky radiances were calculated for three cases shown in Fig. 2, which correspond to three different sky conditions.
Figure 7 (up) shows the sky radiance at 626, 534 and 464 nm (from left to right) under cloud-free conditions.It can be seen that the sky radiance decreases with wavelength increasing due to the strong spectral dependence of the molecular scattering.In addition, high radiance values are observed in the aureole along with a horizon brightening in the three wavelengths, in accordance with Wuttke and Seckmeyer (2006) who concluded that the reason for the horizon brightening can be explained by scattering processes in the atmosphere.The means (±standard deviation) of all pixel values are 29 (±10), 53 (±17) and 88 (±24) m W m −2 nm −1 sr −1 for the 626, 534 and 464 nm wavelengths, respectively.The variation coefficient increases with the wavelength.The radiance under obscured overcast conditions shows an opposite behaviour compared to under cloudless conditions.Thus, Fig. 7 (middle) shows that the radiances decrease when the zenith angle increases, which was related by Grant and Heisler (1997) in the visible and ultraviolet range.The highest radiances appear at 464 nm, and the radiance distribution looks more homogenous at 626 nm.In this case, the means (±standard deviation) are 71 (±14), 80 (±16) and 92 (±18) m W m −2 nm −1 sr −1 for the 626, 534 and 464 nm wavelengths, respectively.The standard deviation is lower than in the cloudless sky, which is in accordance with the higher homogeneity of radiance distribution under overcast.For these images, the variation coefficients are similar for the three wavelengths, around 20 %.Moreover, a high increase of radiance at 626 and 534 nm appears from cloudless to overcast conditions.
Figure 7 (bottom) presents the radiances under partially cloudy conditions.The black pixels correspond to saturated pixels due to a high radiance reaching the sensor.The cloudless regions are similar to the cloudless sky, showing the highest values in the shortest wavelength.The radiance is higher in the cloud regions than in the cloudless ones, which was also observed by Rossini and Krenzinger (2007).In fact, individual clouds increase the radiance up to saturate the pixels.Therefore, individual clouds increase the diffuse radiation reaching the Earth's surface.The coefficients of variation are higher under this condition than in the two before and it increases with the wavelength, being the mean of the radiance (±standard deviation) using all pixels: 50 (±30), 60 (±30) and 90 (±40) m W m −2 nm −1 sr −1 for the red, green and blue channel, respectively.The highest deviation is caused by the differences between cloudless and cloud cover pixels.The blue channel shows a similar mean value in the cloudless and overcast conditions, which, due to its wavelength, is more affected by molecular scattering and, therefore, diffuse radiation is high also under cloudless conditions.However, clouds strongly increase the higher wavelengths.
Finally, 120 images (40 for each condition) were selected and analyzed for each sky condition.The mean radiance per solid angle and its standard deviation were calculated for each image.The average of the mean radiance and its standard deviation for the 40 cloudless images were 34 (±24), 55 (±29) and 89 (±40) m W m −2 nm −1 sr −1 for the 626, 534 and 464 nm wavelengths, respectively, showing similar results as in the cloudless images of Fig. 7.In the case of overcast skies, the average radiances were 63 (±14), 70 (±16) and 80 (±18) m W m −2 nm −1 sr −1 for the red, green and blue channel, respectively.Additionally, 73 (±35), 81 (±29) and 119 (±40) m W m −2 nm −1 sr −1 were the average values of the radiance mean and standard deviation of the 40 partially cloudless images for the 626, 534 and 464 nm wavelengths.These results  are in agreement with all conclusions obtained from Fig. 7, where the coefficient of variation increases with the wavelength except for overcast skies when the coefficient of variation is constant and close to 20 %.

Conclusions
Some important conclusions may be drawn from this work.The radiative transfer model UVSPEC estimates radiance values, under cloudless sky, similar to those recorded with a sunphotometer, obtaining the worst agreement between modelled and measured radiances near to the Sun.The mean differences between the modelled and measured sky radiances are lower than 20 % for all scattering angles when the median is considered.Thus, UVSPEC model can be used to estimate cloudless sky radiances if some inputs, such as aerosol scattering phase function, are taken into account.
The obtained calibration matrices, which convert raw signal in physical radiance, do not show significant dependence on SZA, and the variability of their coefficients along 5 months is low, being the coefficient of variation lower than 10 % for the 99 % of the pixels.The mean differences between the radiance estimated with the camera and that measured with the CIMEL are lower than 15 % except for high scattering angles and close to the Sun, showing the radiance at 464 nm the lowest differences in these angles.
The radiance under overcast conditions presents the highest homogeneity, while the largest variability in the radiance values corresponds to the partially cloudy conditions.Individual clouds increase the sky radiance at the higher wavelengths, and the horizon brightening under cloudless conditions changes to horizon dimming when the sky is obscured overcast.
Finally, in future works, other analyses of sky radiances might be developed, e.g. the use of radiances for the retrieval of cloud properties, and a global study of sky radiances under different sky conditions.The retrieval of aerosol properties using camera radiance information could be an option, but the radiance error given by the camera is too high for this purpose, and the camera wavelengths are not appropriated to obtain aerosol properties in the course mode.On the other hand, some aerosol optical properties such as AOD, α and β could be calculated from sky camera radiances.The authors encourage researchers and groups with available camera system to apply and use the proposed method to obtain sky radiance from sky images, because only radiative transfer modelling is needed to derive the calibration matrices.

Fig. 1 .
Fig. 1.Relative spectral response of the ICX085AK CCD sensor for the red (R), green (G) and blue (B) channels, taking into account the infrared filter included in the RETIGA 1300C camera.

Fig. 2 .
Fig. 2. Sky images taken by the All-Sky Imager of GFAT for three different conditions: a cloudless sky (8 July 2011, 13:15 UTC) on the left, an obscured overcast sky (23 January 2011, 10:35 UTC) in the middle, and a partially cloudy sky (7 March 2011, 16:15 UTC) on the right.

Fig. 3 .
Fig. 3. Mean (left panels) and median (right panels) of the absolute relative error (ARE; upper panels) and bias (down panels) between sky radiance calculated by UVSPEC and measured by CIMEL for 441 and 677 nm as a function of the scattering angle in the almucantar.The error bars represent the standard deviation, of which only half (up or down) is included for 677 nm due to the high values near to the Sun.

Fig. 5 .
Fig. 5.The CIMEL and camera sky radiances together for two different dates at 677 nm (a, b), 501 nm (c, d) and 441 nm (e, f).Left panels represent almucantar, and right panels are principal planes.

Fig. 6 .
Fig. 6.Mean of the absolute relative error (ARE; a, b) and bias (c, d) between sky radiance retrieved by camera and measured by CIMEL for 677 nm, 501 nm, and 441 nm as a function of the scattering angle.Left panels represent almucantar, and right panels are principal planes.The error bars represent the standard deviation, of which only half (up or down) is included for 677 nm (almucantar) due to the high values near to the Sun.

Table 1 .
Image set, showing day, month, and time interval (images are every 5 min).

Table 2 .
Percentage of elements of lower than 10 %, for each day and channel.The mean value of is given in parentheses.

Table 3 .
Contingency table showing the percentage of elements of K d,m,n smaller than 10 % as a function of days and channels.The mean K d,m,n is given in the parentheses.