windkit.weibull.fit_weibull_wasp_m1_m3#

windkit.weibull.fit_weibull_wasp_m1_m3(m1, m3, atol=1e-08)[source]#

Fit weibull parameters from the first and third moments

Parameters:
  • m1 (xarray.DataArray, array-like, or scalar) – First moment / mean

  • m3 (xarray.DataArray, array-like, or scalar) – Third moment / skewness

  • atol (float) – Absolute tolerance for root finding algorithm

Returns:

  • A (xarray.DataArray, numpy.ndarray, or numpy scalar) – Weibull scale parameter, mirroring the input type

  • k (xarray.DataArray, numpy.ndarray, or numpy scalar) – Weibull shape parameter, mirroring the input type

Notes

This function has the optional dependency ‘numba’. If numba is installed, the function will use a numba-compiled version of the algorithm which is much faster. If numba is not installed, the function will use a scipy-based root-finding algorithm and vectorization through np.vectorize which is much slower.