bsrn.utils.clear_sky_detection.ineichen_csd#

bsrn.utils.clear_sky_detection.ineichen_csd(ghi, ghi_extra, zenith, times=None, return_diagnostics=False)[source]#

Ineichen2009 clear-sky detection [1].

MATLAB mapping: Ineichen2009CSD(ghi, exth, zen, plot_figure) with exth -> ghi_extra, zen -> zenith. Convention: MATLAB csd(kt_prime<0.65)=1 marks low clearness (cloudy); here cloud_flag 0=clear, 1=cloudy, so cloud_flag=1 where kt_prime<0.65.

Parameters:
  • ghi (array-like) – Global horizontal irradiance (ghi). [W/m^2]

  • ghi_extra (array-like) – Horizontal extraterrestrial irradiance (exth -> ghi_extra). [W/m^2]

  • zenith (array-like) – Solar zenith angle (zen -> zenith). [degrees]

  • times (array-like or pd.DatetimeIndex, optional) – Time index for outputs.

  • return_diagnostics (bool, default False) – If True, include method diagnostics.

Returns:

out – Standardized output with is_clearsky, cloud_flag, and optional diagnostics.

Return type:

pd.DataFrame

Raises:

ValueError – When input lengths do not match.

References