solarpy.quality.closure_flag#
- solarpy.quality.closure_flag(ghi, dni, dhi, solar_zenith, *, check='both', outside_domain_flag=False, nan_flag=False)#
Flag measurements where the three-component closure ratio exceeds plausible limits.
The closure ratio R = GHI / (DHI + DNI · cos(SZA)) is compared against solar-zenith-dependent limits when the component sum exceeds 50 W/m².
The limits are:
R must be within ±8% of 1.0 for solar zenith < 75°
R must be within ±15% of 1.0 for 75° ≤ solar zenith < 93°
not tested for component sum ≤ 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²].
dni (array-like of float) – Direct normal 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, dhi, or dni 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