# Stochastic Process

Once the monthly averages are established for a given location, Meteonorm generates a full
meteorological year with hourly or minute resolution.
This process is sequential and iterative, starting with the primary parameter _global horizontal irradiance_,
and then deriving other parameters (see [Figure 1](#algorithms-monthly-to-higher-fig1)).

![algorithms-monthly-to-higher-fig1](./algorithms-monthly-to-higher-fig1.png)
**Figure 1:** _Schematic representation of the stochastic process._

## Global Horizontal Irradiance (GHI)

The generation of GHI in daily, hourly, and minute resolutions works as follows:

* **Daily:** A **Markov model** (Aguiar & Collares-Pereira, 1988) is used to generate
  a synthetic sequence of daily radiation values. The model uses transition probabilities,
  derived from monthly statistics, to create a realistic succession of weather conditions (e.g. sunny, overcast, intermediate days).

  A key enhancement to this model was implemented in 2002 (as part of the EU FP5 SoDa project). The model was updated to be based on clear sky radiation rather than the simpler clearness index. This updated approach is a significant improvement as it allows the generation process to more accurately account for local atmospheric conditions, specifically the effects of turbidity (haziness) and location altitude.
* **Hourly**: A modification of the **Time-dependent Autoregressive Gaussian (TAG) model**
  (Aguiar & Collares-Pereira, 1992) is used to break down each daily GHI value into a
  plausible hourly profile. It combines a deterministic daily profile shape with a
  stochastic autoregressive process (AR1) to simulate realistic hour-to-hour variability.
* **Minute**: To generate one-minute GHI values, Meteonorm uses the **Remund model**
  (Remund, 2017). This model stochastically selects a one-minute time series from a large
  pre-calculated look-up table of measured data. The look-up table is classified by clear-sky index,
  sun elevation, and wind speed to ensure the chosen minute profile realistically reflects
  the prevailing hourly conditions.

## Irradiance Components and Irradiance on Tilted Surfaces

Most solar energy applications require knowledge of the different irradiance components,
as well as the irradiance on a tilted surface.

This is a two-step calculation:

1. **Splitting GHI**: The generated hourly GHI is split into its direct and diffuse
components using the **Perez model** (Perez et al., 1991).

   $$GHI=DHI+DIR$$

   $$GHI=DHI+DNI \cdot \sin(h_s)$$

   Where $$DHI$$ is the diffuse horizontal irradiance, $$DIR$$ is the direct horizontal
   irradiance, $$DNI$$ is the direct normal irradiance, and $$h_s$$ is the solar elevation angle.

2. **Calculating tilted irradiance**: A second **Perez model** (Perez et al., 1986) is
then used to calculate the global tilted irradiance (GTI) on any arbitrarily oriented
surface. This model accounts for the direct beam, circumsolar diffuse, horizon brightness,
isotropic diffuse, and ground-reflected radiation. The model is fully integrated with the
location's horizon line, setting the direct and circumsolar components to zero when the sun
is covered by the topography.

## Air Temperature

Hourly air temperature is modelled stochastically based on the monthly temperature
averages and the generated hourly GHI profile.

* **Daily temperature**: An autoregressive model ($$AR(1)$$) generates a sequence of daily
average temperatures, which is then mapped to the location's known statistical distribution
of temperature (e.g. mean daily minimums, mean 4-day minimums). This ensures that key
metrics for applications like heating load simulation are realistic.
* **Hourly temperature**: A stochastic model (Dumortier, 2002) generates an hourly
temperature profile that is physically consistent with the hourly GHI profile
(i.e., temperatures rise after sunrise and fall after sunset).

## Additional Meteorological Parameters

Meteonorm also generates a wide range of supplementary parameters required by common
simulation software in photovoltaics, solar thermal, and building design.
These parameters are derived from the primary generated data (GHI, temperature)
using established physical or empirical models designed to provide plausible estimates.

Other modelled parameters include humidity, wind direction, precipitation, atmospheric
pressure, cloud cover, longwave radiation, and more. For detailed theoretical background
on these models, please refer to the
[Meteonorm Version 8 Theory Handbook](https://mn8.meteonorm.com/assets/downloads/mn82_theory.pdf) and its cited papers.
