# Radiation display model

The overlay is an illustrative irradiance estimate in W/m². It is not a validated radiative-transfer solver or a measurement of Singapore weather. Its cloud volumes are the same relocated LES fields used in the visible clouds and sky cameras.

## Shared cloud field and time

Two adjacent source fields have separate deterministic sunlight atlases. Each atlas integrates decoded extinction along the shared solar ray with 64 midpoint samples. Timeline interpolation mixes **optical depth** before applying `T = exp(-tau)`. It does not interpolate final colours or switch abruptly between fields. The wind offset uses the same north-up coordinates and periodic 8 km source field as the clouds. Atlas sampling wraps throughout the country; it does not stop at the central city boundary.

Surface positions below cloud base are projected along the solar ray to that base before atlas sampling. Roof altitude therefore shifts the cloud-shadow lookup. The atlas grid is coarser than the source cloud data: 200 m with the standard 80-cell/16 km atlas, or about 333 m at 48 cells. Sixteen lighting-height samples include the exact cloud base and top; bilinear horizontal sampling and height interpolation produce a continuous field. This reduces lighting work without altering the 20 m native vertical cloud-density grid. The base sample integrates the complete cloud path instead of omitting half a density cell. Half-float atlas storage is used when supported to avoid 8-bit optical-depth banding; other devices use an 8-bit fallback. Ordinary city cloud shadows now project their receiver heights into these same integrated atlases instead of repeating the volume ray march for every receiver texel. Four small solar-disc projection offsets soften that lookup; the in-cloud integration uses the central solar direction. Thus the receiver shadow image inherits the atlas spatial resolution even when its output texture is larger. Its receiver-height map remains a coarse visual approximation, while the radiation overlay projects the actual rendered surface position. The optional CPU probe integrates the native volumes directly rather than claiming to be an exact GPU-pixel readback.

## Flux calculation

For positive solar elevation, with `mu = sin(elevation)`, the Haurwitz clear-sky baseline is `GHIclear = 1098 mu exp(-0.059/mu)`. Nighttime irradiance is zero. Haurwitz supplies global horizontal irradiance only; this implementation's separate direct/diffuse partition is an additional assumption. [pvlib model documentation and implementation](https://pvlib-python.readthedocs.io/en/stable/reference/generated/pvlib.clearsky.haurwitz.html).

The illustrative clear-sky diffuse fraction is fixed at 12%: `DHIclear = 0.12 GHIclear` and `DNIclear = (GHIclear - DHIclear)/mu`. Cloud attenuation gives `DNI = DNIclear T`. A deliberately bounded cloud diffuse estimate redistributes 28% of the removed direct horizontal flux, reduced for thick clouds: `DHI = DHIclear + 0.28 DNIclear mu (1-T)/(1+0.12 tau)`. The 12%, 28%, and thick-cloud coefficient are display assumptions, not coefficients supplied by Haurwitz or fitted Singapore observations.

Direct surface irradiance is `DNI max(0, n·sun)`. Diffuse surface irradiance uses the isotropic sky factor `DHI (1+n.y)/2`. This factor accounts for surface orientation but assumes an unobstructed isotropic sky. [pvlib isotropic sky documentation](https://pvlib-python.readthedocs.io/en/stable/reference/generated/pvlib.irradiance.isotropic.html).

The layers are:

- **Surface irradiance:** direct plus diffuse incident on the actual rendered surface orientation.
- **Direct on surface / Diffuse on surface:** the respective components above.
- **Global horizontal irradiance:** `DNI mu + DHI`, independent of façade orientation.
- **Direct cloud transmission:** `100 T`, in percent.

The colour range stays fixed at 0–1200 W/m² (0–100% for transmission) so different times and weather remain comparable. The overlay changes existing material colours and adds no coplanar heatmap meshes.

## Limits

No building-to-building occlusion, terrain horizon, ground reflections, multiple scattering, measured aerosol/water vapour or cloud-edge irradiance enhancement is calculated. Visual shadow maps still illuminate the ordinary city rendering, but they are not presented as complete irradiance occlusion. Source heights, illustrative architecture and coarse country terrain retain their existing uncertainties. These maps should not be used for engineering or energy-yield estimates without a validated model and suitable meteorological and geometric inputs.
