nsrdb.gap_fill.irradiance_fill.enforce_clearsky

enforce_clearsky(dni, ghi, cs_dni, cs_ghi, sza, fill_flag, sza_lim=89.0)[source]

Enforce a maximum irradiance equal to the clearsky irradiance.

Parameters:
  • dni (np.ndarray) – All-sky (cloudy + clear) DNI.

  • ghi (np.ndarray) – All-sky (cloudy + clear) GHI.

  • cs_dni (np.ndarray) – Clearsky (REST) DNI.

  • cs_ghi (np.ndarray) – Clearsky (REST) GHI.

  • sza (np.ndarray) – Solar zenith angle in degrees.

  • fill_flag (None) – Integer array of flags showing what data was previously filled and why.

  • sza_lim (int | float) – Upper limit of SZA in degrees.

Returns:

  • dni (np.ndarray) – All-sky (cloudy + clear) DNI with max of clearsky values.

  • ghi (np.ndarray) – All-sky (cloudy + clear) GHI with max of clearsky values.

  • fill_flag (np.ndarray) – Array of integers signifying whether to fill the irradiance data and the reason why.