nsrdb.gap_fill.irradiance_fill.gap_fill_irrad

gap_fill_irrad(irrad, cs_irrad, fill_flag, return_csr=False, flags_to_fill=None)[source]

Fill bad irradiance data using clearsky and nearest good cloudy data.

Parameters:
  • irrad (np.ndarray) – Full FARMS + REST2 merged irradiance 2D array.

  • cs_irrad (np.ndarray) – REST2 clearsky irradiance without bad or missing data.

  • fill_flag (np.ndarray) – 2D array with nonzero values where bad data must be filled.

  • return_csr (bool) – If set to true, this function will return the clearsky ratio array.

  • flags_to_fill (None | list) – List of fill_flag values to fill. None defaults to all nonzero flags.

Returns:

  • irrad (np.ndarray) – Updated and patched irradiance numpy array.

  • csr (np.ndarray) – Irradiance cloudy/clearsky ratio numpy array.