pvanalytics.quality.irradiance.calculate_component_sum_series#

pvanalytics.quality.irradiance.calculate_component_sum_series(solar_zenith, ghi=None, dhi=None, dni=None, dni_clear=None, zenith_limit=90, fill_night_value=None)#

Use the component sum equations to calculate the missing series, using the other available time series. One of the three parameters (ghi, dhi, dni) is passed as None, and the two series are used to calculate the missing series. After calculation, the series is run through a nighttime routine, where nighttime values are set based on the fill_night_value parameter.

The “component sum” or “closure” equation relates the three primary irradiance components as follows:

\[GHI = DHI + DNI * \cos(\theta_z)\]
Parameters
  • solar_zenith (Series) – Zenith angles in decimal degrees, with datetime index. Angles must be >=0 and <=180. Must have the same datetime index as dni, dhi, and dni, when available.

  • ghi (Series, optional) – Pandas series of GHI data, with datetime index. Must have the same datetime index as dni, dhi, and solar_zenith, when available.

  • dhi (Series, optional) – Pandas series of DNI data, with datetime index. Must have the same datetime index as ghi, dni, and zenith series, when available.

  • dni (Series, optional) – Pandas series of dni data, with datetime index. Must have the same datetime index as ghi, dhi, and solar_zenith, when available.

  • dni_clear (Series, optional) – Pandas series of clearsky dni data. Must have the same datetime index as ghi, dhi, dni, and solar_zenith, when available. See pvlib-python’s pvlib.irradiance.dni() for details.

  • zenith_limit (Float) – Solar zenith boundary between night and day, in degrees. For calculation of the component sum, solar_zenith is set to 90 where solar_zenith > zenith_limit.

  • fill_night_value (String or float or int, default None) – Options include ‘equation’, float or int values (np.nan, 0, etc.), or None. This is the fill value for nighttime periods. If a float or int value is passed (np.nan, 0 , -.5, etc.), then nighttime values are filled using the fill_night_value parameter. If ‘equation’ is used, nighttime periods are filled using the component sum equation with DNI=0: GHI = 0 + DHI If None, then the nighttime values are based on the component sum equation.

Returns

Pandas series of the calculated values, based on the component sum equation and corrected for nighttime periods.

Return type

Series

Examples using pvanalytics.quality.irradiance.calculate_component_sum_series#

Component Sum Equations for Irradiance Data

Component Sum Equations for Irradiance Data