farms.utilities.cloud_variability

farms.utilities.cloud_variability(irrad, cs_irrad, cloud_type, var_frac=0.05, distribution='uniform', option='tri', tri_center=0.9, random_seed=123)[source]

Add syntehtic variability to irradiance when it’s cloudy.

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

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

  • cloud_type (np.ndarray) – Array of numerical cloud types.

  • var_frac (float) – Maximum variability fraction (0.05 is 5% variability) or if distribution is “normal” this is the maximum relative standard deviation of the Variability.

  • distribution (str) – Distribution shape of the Variability. Can be uniform or normal.

  • option (str) – Variability function option (‘tri’ or ‘linear’).

  • random_seed (int | NoneType) – Number to seed the numpy random number generator. Used to generate reproducable psuedo-random cloud variability. Numpy random will be seeded with the system time if this is None.

Returns:

irrad (np.ndarray) – Full FARMS + REST2 merged irradiance 2D array with variability added to cloudy timesteps.