solarspatialtools.synthirrad.copula.downscale
- solarspatialtools.synthirrad.copula.downscale(times, e_pos, n_pos, cloud_spd, cloud_dir, mean_csi, params, seed=None, scale=True, noneg=True)
Downscale the synthetic CSI for a position field using a copula. This function produces a synthetic time series for stationary data, e.g. a single hour or related time period. Method is based on approaches developed by Widen and Munkhammar [1].
Parameters
- timespd.DatetimeIndex
A DatetimeIndex of shape (n_times,) representing the time points for which to compute distances.
- e_posnp.array
The eastward positions of the sites, shape (n_sites,)
- n_posnp.array
The northward positions of the sites, shape (n_sites,)
- cloud_spdfloat
The cloud speed in the same units as Epos and Npos per unit time. This is used to compute the spacetime distances.
- cloud_dirfloat
The cloud direction in radians, where 0 is eastward and pi/2 is northward. This is used to compute the spacetime distances.
- mean_csifloat
The mean CSI for the hour, used to compute the parameters of the GMM.
- paramsdict
The parameters of the model, containing at least: - ‘comp’: [a, c] parameters for the sigmoid function that determines the cloudy component weight based on meanCSI. - ‘mean’: [m_cloud, m_clear, c] parameters for computing the means of the cloud and clear components based on meanCSI and the cloudy component weight. - ‘sdevClear’: [sdev_clear_max, a, c] parameters for computing the standard deviation of the clear component based on meanCSI. - ‘sdevCloud’: [sdev_cloud_max, a, c] parameters for computing the standard deviation of the cloud component based on meanCSI.
- seedint or None
Seed for the random number generator.
- scalebool
Should the output be scaled to match mean_csi?
- nonegbool
Should negative values be set to zero?
Returns
- np.array
The synthetic CSI values generated by the copula, shape (n_times, n_sites).
References
[1] Widen, J. and Munkhammar, J., “Spatio-Temporal Downscaling of Hourly Solar irradiance Data Using Gaussian Copulas,” 2019 IEEE 46th Photovoltaic Specialists Conference (PVSC), Chicago, IL, USA, 2019, pp. 3172-3178, doi: https://dx.doi.org/10.1109/PVSC40753.2019.8980922.