# Advances in Simulating Radiative Transfer in Complex Environments
## 2 Model Description
### The Indexed View Sphere (IVS) Algorithm  
To overcome this simplification, the indexed view sphere (IVS) algorithm was developed and implemented into ENVI-met. The main idea behind IVS is to save the results (i.e., the objects seen by a cell in a certain view angle) of the initial geometrical analysis so that it is possible to relate the calculated view factors back to the contributing elements of the urban scene. Its fundamentals are comparable to sky view factor calculationsbased on fish-eye imagery where the amount of sky pixels per annulus ring is analyzed (Figure 1a) [45; 46; 47; 48]. To reduce the memory needed, the new IVS does not calculate the same amount of view facets in all height angles of the view sphere (Figure 1b). Since the resulting surface area for a given azimuthal angle decreases with increased height angles, the size of the azimuthal angle and, thus, of the view facets can be set larger with little to no information loss. The size of the azimuthal angles and, thus, the view facets is calculated by a function of the height angle. The user only defines the resolution of the height angles and the azimuthal angles at the equator of the cell. The number of azimuthal angles, i.e., the number of distinct view facets for a given height angle is then calculated by:  
\[\lambda(h)=\frac{360}{az_{eq}}\cdot\cos(h) \tag{3}\]  
with \(az_{eq}\) as the user defined size of azimuthal angle at the sphere's equator and the height angle \(h\). To ensure all cardinal directions are represented, a minimum of four azimuthal angles is set for height angles less than \(190^{\circ}\). For height angles of \(\pm 90^{\circ}\) only one view facet is obtained, since azimuthal angles would be indifferent for these height angles. By reducing the number of view facets per cell, an immense amount of memory can be saved without losing too much information about objects seen by a grid cell. Where a \(10^{\circ}\) height and azimuthal angle would previously result in 648 view facets, the same height and azimuthal resolution at the equator now results in 414 view facets. In combination with more efficient data structures, this decreases memory demand by around 40% and enables the possibility to store pointers to the objects seen by cells in a particular direction. By storing a direct link to objects seen by a cell, the actual radiation reflected/emitted by these objects can now be used to calculate a cell's received reflected shortwave and longwave radiation instead of using averaged values. Taking into account this radiation received, the cell alters its own reflection of shortwave and emission of longwave radiation and in turn contributes to the radiation received of other cells. Figure 1: View sphere for an exemplary grid cell to be analyzed depicting azimuthal angle az and height angle h definition (**a**) and individual view facet distribution per height angle (**b**) showing that view facet count decreases with increased height angles. To calculate the received reflected shortwave and emission of longwave radiation coming from buildings or ground surfaces, the individual contribution of the objects is weighted by the view angle of the facet and simply added up:  
\[Q_{Build,Grmd,in}(i,j,k)=\sum_{a=1}^{F}\omega(a)\cdot\tau_{Veg}(a)\cdot Q_{ Build,Grmd,out} \tag{4}\]  
with \(F\) being the total number of facets of the view sphere, \(\omega(a)\) as the weight of the view facet \(a\), \(\tau_{Veg}(a)\) as the transmission factor accounting for reduction of the visibility due to vegetation between the cell \(i,j,k\) and the objects seen, and \(Q_{Build,Grmd,out}\) as the outgoing reflected shortwave or emitted longwave radiation by the seen objects. Secondary radiation emitted by vegetation is accounted for by inverting the transmission factor:  
\[Q_{Veg,in}(i,j,k)=\sum_{a=1}^{F}\omega(a)\cdot\big{(}1-\tau_{Veg}(a)\big{)} \cdot Q_{Veg,out} \tag{5}\]  
with \(Q_{Veg,out}\) as the outgoing reflected shortwave or emitted longwave radiation by the seen plants.