rex.bias_correction.lin_irrad

lin_irrad(ghi, dni, dhi, scalar=1, adder=0)[source]

Correct GHI and DNI using linear correction factors. Both irradiance variables are corrected as irradiance * scalar + adder. DHI is preserved based on the relationship dhi = ghi - (dni * cos(sza)). Times when GHI and DNI are zero are preserved and negative values are protected against.

Parameters:
  • ghi (np.ndarray) – 2D array of global horizontal irradiance values in shape (time, space)

  • dni (np.ndarray) – 2D array of direct normal irradiance values in shape (time, space)

  • dhi (np.ndarray) – 2D array of diffuse horizontal irradiance values in shape (time, space)

  • scalar (np.ndarray) – 1D array of linear scalar values in the shape (space,)

  • adder (np.ndarray) – 1D array of linear adder values in the shape (space,)

Returns:

  • ghi (np.ndarray) – 2D array of global horizontal irradiance values in shape (time, space)

  • dni (np.ndarray) – 2D array of direct normal irradiance values in shape (time, space)

  • dhi (np.ndarray) – 2D array of diffuse horizontal irradiance values in shape (time, space)