farms.utilities.tri_variability
- farms.utilities.tri_variability(csr, var_frac, tri_center=0.9)[source]
Return an array with a triangular distribution between clearsky ratio and maximum variability fraction. Each value in the array is the maximum variability fraction for the corresponding clearsky ratio.
The max variability occurs when csr==tri_center, and zero variability when csr==0 or csr==1
- Parameters:
csr (np.ndarray) – REST2 clearsky irradiance without bad or missing data. This is a 2D array with (time, sites).
var_frac (float) – Maximum variability fraction (0.05 is 5% variability).
tri_center (float) – Value of the clearsky ratio at which there is maximum variability.
- Returns:
tri (np.ndarray) – Array with shape matching csr with maximum variability (var_frac) when the csr==tri_center. Each value in the array is the maximum variability fraction for the corresponding clearsky ratio.