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

# Extraterrestrial Irradiance

export const Decomposition = () => <Tooltip tip="Separating GHI into direct (DNI) and diffuse (DHI) components using empirical models.">
    decomposition
  </Tooltip>;

export const DirectNormalIrradiance = () => <Tooltip tip="Solar radiation received perpendicular to the sun's rays (direct beam only).">
    direct normal irradiance
  </Tooltip>;

export const Transposition = () => <Tooltip tip="Converting horizontal irradiance components to plane-of-array (tilted surface) irradiance.">
    transposition
  </Tooltip>;

export const AirMass = () => <Tooltip tip="Ratio of atmospheric path length to path length at zenith; equals 1 when sun is overhead.">
    air mass
  </Tooltip>;

export const ClearnessIndex = () => <Tooltip tip="Ratio of measured GHI to extraterrestrial irradiance; quantifies atmospheric transmittance.">
    clearness index
  </Tooltip>;

## Summary

The Extraterrestrial Irradiance model calculates the solar irradiance incident at the top of earth's atmosphere on a surface perpendicular to the sun's rays. PlantPredict uses a second-order Fourier series expansion based on earth's orbital mechanics to compute the extraterrestrial <DirectNormalIrradiance /> as a function of day of year. This value is essential for <ClearnessIndex /> calculations, <Transposition /> models, and <AirMass /> corrections throughout the prediction engine.

## Inputs

| Name              | Symbol | Units    | Description                |
| ----------------- | ------ | -------- | -------------------------- |
| **UTC Date-Time** | —      | datetime | Universal Coordinated Time |

***

## Outputs

| Name                                          | Symbol        | Units | Description                                                       |
| --------------------------------------------- | ------------- | ----- | ----------------------------------------------------------------- |
| **Extraterrestrial Direct Normal Irradiance** | $DNI_{extra}$ | W/m²  | Solar irradiance at top of atmosphere perpendicular to sun's rays |

***

## Detailed Description

The extraterrestrial irradiance varies throughout the year due to earth's elliptical orbit around the sun. The earth-sun distance changes by approximately ±1.7% from its mean value, causing the solar irradiance to vary by approximately ±3.4% (since irradiance varies as the inverse square of distance).

### Calculation Method

PlantPredict implements a Fourier series approximation of the extraterrestrial irradiance based on Spencer's equation.

### Step 1: Calculate Day Angle

Compute the fractional day $n_f$ (days) from the UTC date-time:

$$
n_f = \text{UTCDate} - \text{January 1 of current year}
$$

where $n_f = 0$ for January 1 at 00:00 UTC and $n_f = 365$ (or $366$ for leap years) for December 31 at 24:00 UTC. The value includes the fractional time of day.

The day angle $\zeta$ (in radians) represents the fractional progress through the year:

$$
\zeta = \frac{2\pi \, n_f}{365.25}
$$

The constant 365.25 accounts for the average year length including leap years.

### Step 2: Calculate Extraterrestrial Irradiance

The extraterrestrial direct normal irradiance is computed using a second-order Fourier series expansion:

$$
\begin{aligned}
DNI_{extra} = G_0 \times \Big(&1.00011 + 0.034221 \cos(\zeta) + 0.00128 \sin(\zeta) \\
&+ 0.000719 \cos(2\zeta) + 0.000077 \sin(2\zeta) \Big)
\end{aligned}
$$

where:

* $G_0 = 1367$ W/m² is the solar constant (mean extraterrestrial irradiance at 1 astronomical unit = 149,597,870.7 km), per the World Meteorological Organization (WMO) standard
* $\zeta$ is the day angle in radians
* The Fourier coefficients are derived from the Spencer (1971) equation as presented in Duffie & Beckman, *Solar Engineering of Thermal Processes*

### Physical Interpretation

The terms in the Fourier series represent:

1. **Constant term (1.00011)**: Slight adjustment to solar constant
2. **Annual variation** $(\cos(\zeta), \sin(\zeta))$: Primary effect of earth's elliptical orbit
3. **Semi-annual variation** $(\cos(2\zeta), \sin(2\zeta))$: Higher-order orbital effects

The dominant variation is the annual term with amplitude ±3.4%, corresponding to earth's perihelion (closest approach, \~January 3) and aphelion (farthest point, \~July 4).

### Typical Values Throughout the Year

| Date                   | Approximate Day | $DNI_{extra}$ (W/m²) | % Deviation |
| ---------------------- | --------------- | -------------------- | ----------- |
| January 3 (perihelion) | 3               | \~1412               | +3.3%       |
| April 3                | 93              | \~1362               | -0.4%       |
| July 4 (aphelion)      | 185             | \~1322               | -3.3%       |
| October 4              | 277             | \~1368               | +0.1%       |

### Downstream Models

The extraterrestrial irradiance $DNI_{extra}$ is used by:

* **Clearness Index** — atmospheric transmittance calculation
* **Transposition Models** (Perez, Hay-Davies) — anisotropy index
* **<Decomposition /> Models** (DISC, DIRINT) — DNI/DHI estimation from GHI
* **Spectral Models** — atmospheric optical depth

## References

* Spencer, J. W. (1971). Fourier series representation of the position of the sun. *Search*, 2(5), 172–176.
* Iqbal, M. (1983). *An Introduction to Solar Radiation*. Academic Press. ISBN: 0-12-373750-8.
* Duffie, J. A., & Beckman, W. A. (2013). *Solar Engineering of Thermal Processes* (4th ed.). John Wiley & Sons. ISBN: 978-0-470-87366-3. DOI: [10.1002/9781118671603](https://doi.org/10.1002/9781118671603)
