Quality Control#

Wrappers#

bsrn.qc.wrapper.run_qc(df[, station_code, ...])

Run a suite of QC tests on a BSRN DataFrame with optimized geometry calculations [1]_ [2]_.

bsrn.qc.wrapper.mask_failed_irradiance(df, *)

Set shortwave / longwave irradiance columns to NaN where QC flags fail.

bsrn.qc.wrapper.test_physically_possible(df)

Run all Phase 1 (Physically Possible) checks on a DataFrame.

bsrn.qc.wrapper.test_extremely_rare(df[, ...])

Run all Phase 2 (Extremely Rare) checks on a DataFrame.

bsrn.qc.wrapper.test_closure(df[, ...])

Run all Phase 3 (Closure) consistency checks on a DataFrame.

bsrn.qc.wrapper.test_diff_ratio(df[, ...])

Run all Phase 3 Diffuse Ratio (k) consistency checks on a DataFrame.

bsrn.qc.wrapper.test_k_index(df[, ...])

Run all Phase 3 Radiometric Index (k-index) checks on a DataFrame.

bsrn.qc.wrapper.test_tracker_off(df[, ...])

Run Tracker-off detection on a DataFrame.

Level 1: Physically Possible Limits#

bsrn.qc.ppl.ghi_ppl_test(ghi, zenith, bni_extra)

Check global horizontal irradiance (GHI, $G_h$) against physically possible limits [1]_.

bsrn.qc.ppl.bni_ppl_test(bni, bni_extra)

Check beam normal irradiance (BNI, $B_n$) against physically possible limits [1]_.

bsrn.qc.ppl.dhi_ppl_test(dhi, zenith, bni_extra)

Check diffuse horizontal irradiance (DHI, $D_h$) against physically possible limits [1]_.

bsrn.qc.ppl.lwd_ppl_test(lwd)

Check downward longwave radiation (LWD, $L_d$) against physically possible limits [1]_.

Level 2: Extremely Rare Limits#

bsrn.qc.erl.ghi_erl_test(ghi, zenith, bni_extra)

Check global horizontal irradiance (GHI, $G_h$) against extremely rare limits [1]_.

bsrn.qc.erl.bni_erl_test(bni, zenith, bni_extra)

Check beam normal irradiance (BNI, $B_n$) against extremely rare limits [1]_.

bsrn.qc.erl.dhi_erl_test(dhi, zenith, bni_extra)

Check diffuse horizontal irradiance (DHI, $D_h$) against extremely rare limits [1]_.

bsrn.qc.erl.lwd_erl_test(lwd)

Check downward longwave radiation (LWD, $L_d$) against extremely rare limits [1]_.

Level 3: Component Comparison (Closure)#

bsrn.qc.closure.closure_low_sza_test(ghi, ...)

Check consistency between GHI, BNI, and DHI for low solar zenith angles ($Z le 75^circ$) [1]_.

bsrn.qc.closure.closure_high_sza_test(ghi, ...)

Check consistency between GHI, BNI, and DHI for high solar zenith angles ($Z > 75^circ$) [1]_.

Level 4: Diffuse Ratio#

bsrn.qc.diff_ratio.k_kt_combined_test(ghi, ...)

Combined check of diffuse fraction ($k$) and clearness index ($k_t$) [1]_.

bsrn.qc.diff_ratio.k_low_sza_test(ghi, dhi, ...)

Check diffuse fraction ($k$) for low solar zenith angles ($Z < 75^circ$) [1]_ [2]_.

bsrn.qc.diff_ratio.k_high_sza_test(ghi, dhi, ...)

Check diffuse fraction ($k$) for high solar zenith angles ($Z ge 75^circ$) [1]_ [2]_.

Level 5: K-Indices#

bsrn.qc.k_index.kb_kt_test(ghi, bni, ...)

Check if beam transmittance ($k_b$) is less than clearness index ($k_t$) [1]_.

bsrn.qc.k_index.kb_limit_test(bni, ...)

Check if beam transmittance ($k_b$) stays within absolute physical limits based on elevation [1]_.

bsrn.qc.k_index.kt_limit_test(ghi, ...)

Check if clearness index ($k_t$) is within physically possible limits [1]_.

Level 6: Tracker-Off#

bsrn.qc.tracker.tracker_off_test(ghi, bni, ...)

Check if the solar tracker is off by comparing measured and clear-sky irradiances [1]_.