solarpy.quality.diffuse_fraction_flag#
- solarpy.quality.diffuse_fraction_flag(ghi, dhi, solar_zenith, *, check='both', outside_domain_flag=False, nan_flag=False)#
Flag measurements where the diffuse fraction exceeds physically plausible limits.
The diffuse fraction K = DHI / GHI is tested against solar-zenith-dependent upper limits when GHI exceeds 50 W/m². The limits are:
K must be < 1.05 for solar zenith < 75°
K must be < 1.10 for 75° ≤ solar zenith < 93°
not tested for GHI ≤ 50 W/m² or solar zenith ≥ 93°
The comparison test is part of the BSRN QC tests [1], [2].
- Parameters:
ghi (array-like of float) – Global horizontal irradiance [W/m²].
dhi (array-like of float) – Diffuse horizontal irradiance [W/m²].
solar_zenith (array-like of float) – Solar zenith angle [degrees].
check ({'high-zenith', 'low-zenith', 'both'}, optional) – Which solar zenith angle domain to check. Default is
'both'.outside_domain_flag (bool, optional) – Value to assign to the flag when conditions are outside the valid test boundary. Can be either
TrueorFalse. Default isFalse, which does not flag untested values as suspicious.nan_flag (bool, optional) – If
True, flag values where ghi or dhi is NaN. Default isFalse, which does not flag NaN values as suspicious.
- Returns:
flag – Boolean array.
Trueindicates the value failed the test,Falseindicates it passed or was outside the test domain.- Return type:
same type as ghi
See also
References