wavespectra.SpecArray.partition#
- SpecArray.partition(wsp_darr, wdir_darr, dep_darr, swells=3, agefac=1.7, wscut=0.3333)[source]#
Partition wave spectra using Hanson’s watershed algorithm.
This method is not lazy, make sure array will fit into memory.
- Args:
wsp_darr (DataArray): wind speed (m/s).
wdir_darr (DataArray): Wind direction (degree).
dep_darr (DataArray): Water depth (m).
swells (int): Number of swell partitions to compute.
agefac (float): Age factor.
wscut (float): Wind speed cutoff.
- Returns:
part_spec (SpecArray): partitioned spectra with one extra dimension representig partition number.
- Note:
Input DataArrays must have same non-spectral dims as SpecArray.
- References:
Hanson, Jeffrey L., et al. “Pacific hindcast performance of three numerical wave models.” JTECH 26.8 (2009): 1614-1633.