windkit.weibull.fit_weibull_k_sumlogm

windkit.weibull.fit_weibull_k_sumlogm(sumlogm, order_m_first=1, order_m_higher=3, atol=1e-08)[source]

Fit weibull shape parameter from the sum of log of moments

Parameters:
  • sumlogm (xr.DataArray) – xr.DataArray with sum of the log of moments

  • order_m_first (int) – First moment that is conserved when solving k

  • order_m_higher (int) – Higher moment that is conserved when solving k

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

Returns:

Weibull shape parameter (k)

Return type:

xr.DataArray

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.