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()anddiffuse_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 is0.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(). IfNone(default), the"flagHorizon"column is set toNaNfor all rows.
- Returns:
flags – Boolean flags with the same index as data.
Trueindicates 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 indexKnexceeds the global clearness indexKt"flagKn": flagged whenKnexceeds an altitude-dependent upper bound"flagKt": flagged when the global clearness indexKtis greater than or equal to1.35"flagKKt": flagged when the diffuse clearness indexKis greater than or equal to0.96under 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.NaNfor all rows if horizon isNone.
- Return type: