pywasp.wwc_rotate#

pywasp.wwc_rotate(wwc, rotation_angle_deg, conf=None)[source]#

Rotate Weibull sectors by an angle while conserving moments.

This is a wrapper around the Fortran implementation.

Parameters:
  • wwc (xarray.Dataset) – Dataset containing Weibull parameters (‘A’, ‘k’) and frequencies (‘wdfreq’) with a ‘sector’ dimension. Can have any pywasp spatial structure.

  • rotation_angle_deg (float or DataArray) – Angle to rotate in degrees (clockwise positive). If provided as a DataArray, it must have the same spatial structure as wwc.

  • conf (pywasp.wasp.Config, optional) – Configuration object. If None, a default Config() is used.

Returns:

xarray.Dataset – Dataset with rotated ‘A’, ‘k’, and ‘wdfreq’ arrays aligned to the original sector indices, while preserving any extra variables.

Raises:

ValueError – If rotation_angle_deg is provided as an xr.DataArray and does not have the same spatial structure as wwc.