> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dalyenergy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shading Models

> Far shading, near shading, and electrical shading effects in Daly

# Shading Models

Daly applies shading in two stages: horizon-scale far shading and row/scene-scale near shading.

## Far Shading

Far shading uses a horizon profile (`farShadingElevationAngles`) to attenuate:

* Sky diffuse components
* Ground-reflected components
* Direct and circumsolar components

The model interpolates horizon elevation by sun azimuth, then derives direct covered fraction and diffuse visibility factors.

## Near Shading Modes

`shading.nearShading` supports two modes.

### 1. `unlimited`

A 2D inter-row geometry model estimates:

* `DirectShadingFactor`
* `ShadowHeight`
* `ShadedDiodeFraction`

Diffuse sky/ground are reduced with simplified factors based on `gcr` and row-count assumptions.

### 2. `octavia`

Near-shading factors are interpolated from precomputed 3D scene results:

* scene-based direct shading percentage
* affected diode fraction by sun azimuth/elevation

This mode is used when shading scenes are generated and linked through shading-model inputs.

## Electrical Shading Impact

If `electricalImpact=true`, Daly applies additional electrical mismatch losses on top of irradiance shading.

* `unlimited` mode uses diode-aware approximation from `transverseDiodes` and direct-beam fraction.
* `octavia` mode uses a calibrated polynomial surface (`dirshade`, `fbm`) to estimate electrical loss fraction.

## Key Inputs

* `shading.farShading`
* `shading.nearShading`
* `shading.shadingSceneId` (required for Octavia mode)
* `shading.electricalImpact`
* `shading.transverseDiodes` (required in unlimited mode when electrical impact is enabled)
* location far-shading profile data

<Info>
  Shading impacts are represented both in time-series outputs and aggregate irradiance/DC loss summaries.
</Info>
