solarpy.quality.t16_quality_flags

solarpy.quality.t16_quality_flags#

solarpy.quality.t16_quality_flags(data, altitude=0, horizon=None)#

Calculate the IEA PVPS Task 16 quality control flags for irradiance data.

Apply a series of quality control tests on a time series of GHI, DHI, and DNI measurements, combining the BSRN limit tests (bsrn_limits_flag()), the BSRN comparison tests (closure_flag() and diffuse_fraction_flag()), several clearness-index based tests, and an optional horizon-shading test.

Parameters:
  • data (pandas.DataFrame) –

    Time series of irradiance and auxiliary data. Must contain the following columns:

    • "ghi", "dhi", "dni" : measured irradiance components [W/m²]

    • "dni_extra" : extraterrestrial irradiance normal to the sun [W/m²]

    • "solar_zenith", "solar_azimuth": solar position angles [degrees]

  • altitude (float, optional) – Site altitude above sea level [m], used in the "flagKn" test. Default is 0.

  • horizon (pandas.Series, optional) – Horizon elevation profile. The index must contain azimuth angles in degrees and the values the corresponding horizon elevation angles in degrees, matching the output of solarpy.horizon.get_horizon_mines(). If None (default), the "flagHorizon" column is set to NaN for all rows.

Returns:

flags – Boolean flags with the same index as data. True indicates the observation failed the corresponding test. The columns are:

  • "flagPPLGHI", "flagPPLDIF", "flagPPLDNI" : BSRN physically possible limit (PPL) test

  • "flagERLGHI", "flagERLDIF", "flagERLDNI" : BSRN extremely rare limit (ERL) test

  • "flag3lowSZA", "flag3highSZA" : BSRN three-component closure test, for solar zenith angle below/above 75°

  • "flagKlowSZA", "flagKhighSZA" : diffuse fraction test, for solar zenith angle below/above 75°

  • "flagKnKt" : flagged when the beam clearness index Kn exceeds the global clearness index Kt

  • "flagKn" : flagged when Kn exceeds an altitude-dependent upper bound

  • "flagKt" : flagged when the global clearness index Kt is greater than or equal to 1.35

  • "flagKKt" : flagged when the diffuse clearness index K is greater than or equal to 0.96 under high-sun, clear-sky conditions

  • "flagTracker" : flagged when GHI and DNI jointly indicate that a sun tracker is not tracking correctly

  • "flagHorizon" : flagged when the sun is below the horizon profile given by horizon, i.e. far-field shading. NaN for all rows if horizon is None.

Return type:

pandas.DataFrame