## 2 Theoretical Framework
### Radiance Field below an Inhomogeneous Cloud Field  
Modeling the light output from a heterogeneous system of broken cloud arrays is a nontrivial problem because the clouds can differ in size, shape and also spatial distribution. We treat the problem within the framework of the successive orders of scattering (SOS) which is the method to calculate the total sky radiance as an infinite series of higher-order scattering components. However, it has been shown that the contribution to the radiance from the clouds and cloudless atmosphere can be separated [21], thus taking advantage of low eigenvalues for an optically thin atmosphere [22]. Due to fast convergence, the model can be limited to the first two scattering modes, so the truncated series for total sky radiance reads  
\[L_{e,\lambda}^{+}=\sum_{i=1}^{\infty}L_{e,\lambda}^{+}\cong L_{e,1,\lambda}^{ S+}+L_{e,2,\lambda}^{S+}+L_{e,1,\lambda}^{R+}+L_{e,2,\lambda}^{R+}+L_{e,1, \lambda}^{T+}, \tag{1}\]  
where the symbol (+) indicates the downward radiance, while the superscripts \(S\), \(R\), and \(T\) are for the scattered, reflected and transmitted components of the ground-reaching radiance. The \(R\) and \(T\) components characterize the radiance of a cloud, \(L_{e,1,\lambda}^{S+}\) is for the first-scattering radiance of a cloud-free atmospheric window, and \(L_{e,2,\lambda}^{S+}\) is the second-scattering radiance obtained as a non-trivial integral product of all first-scattering radiances (i.e., all combinations of upward and downward \(S\), \(R\), and \(T\) radiance components). Each of the \(L\)--components is formulated as a function of observational zenith and azimuth angles accepting the momentary sun position and altitude of a hypothetical observer [21]. In this way Equation (1) can provide sky radiance patterns under any cloudiness and turbidity conditions in lowland or mountain sites. One of the key elements in the theory is to characterize the stochastic cloud fields through a cloud-masking algorithm that is aimed to predict the presence of clouds along the line of sight. The UniSky Simulator provides a general solution for arbitrary cloud distributions, but a significant reduction of the CPU and MEM consumptions can be achieved by introducing azimuthal averaging over the cloud arrays. For instance, [PERSON] and [PERSON] [23] have approximated the probability function for cloud visibility as follows:  
\[\delta_{0,z}=1-(1-C_{F})e^{C_{F}\beta(\sec z-1)}, \tag{2}\]  
where \(C_{F}\) is the so-called nadir-view cloud fraction [24] and \(\beta\) is the ratio of the horizontal to vertical cloud dimensions. The cloud field significantly influences the diffuse component of the ground-reaching radiation, but tools that simulate the ground irradiance accurately are rare. We have developed a CPU-non-intensive method to compute the angular distribution of the scattered radiation under broken cloud arrays taking advantage of the concept of the successive orders of scattering that allows for separation of higher-scattering radiances from the broken clouds and cloud-free atmosphere. Reference [21] has shown that the numerical computations can be accomplished rapidly using an inexpensive Intel Pentium processor. Such a rapid algorithm is ideally suited for solving complex problems of daylight propagation into interior spaces through a light-pipe system. Most typically, the horizontal irradiance/illuminance is used as an input to many tools modeling the optical efficiency of straight light pipes. The optical efficiency is defined as the ratio of the luminous flux at the light-tube exit relative to that at the light-tube entrance. Based on the above theoretical model the diffuse horizontal component of the solar radiation is obtained as the cosine-projected spectral radiance integrated over the upper hemisphere, i.e.,  
\[D_{H}=\int\limits_{z=0}^{\pi/2}\sin z\cos z\Bigg{\{}\int\limits_{\Lambda=0}^{2 \pi}L_{e,\lambda}^{+}\{z,A\}dA\Bigg{\}}dz. \tag{3}\]  
where \(A\) and \(Z\) are the azimuth and zenith angle of a sky element, respectively.