wavespectra.partition.partition.Partition.hp01#

Partition.hp01(wspd=None, wdir=None, dpt=None, agefac=1.7, wscut=0.3333, swells=3, smooth=False, freq_window=3, dir_window=3, k=0.5, angle_max=30, hs_min=0.2, ihmax=100, combine_extra_swells=True, wstype=0)[source]#

Hanson and Phillips 2001 spectra partitioning and swell merging.

HP01 partitions the spectra and merges wind-sea components as in the PTM1 method, then it merges adjacent swells following the criteria outlined in Hanson and Phillips (2001) and Hanson et al. (2009). This method can be useful when partitioning measured wave spectra which are typically noisy and may contain small, non-physical partitions. Please notice this method is still under development and may not work as expected.

Args:
  • wspd (xr.DataArray): Wind speed DataArray.

  • wdir (xr.DataArray): Wind direction DataArray.

  • dpt (xr.DataArray): Depth DataArray.

  • swells (int): Number of swell partitions to compute.

  • agefac (float): Age factor.

  • wscut (float): Wind sea fraction cutoff.

  • smooth (bool): Compute watershed boundaries from smoothed spectra as described in Portilla et al., 2009.

  • freq_window (int): Size of running window along freq for smoothing spectra.

  • dir_window (int): Size of running window along dir for smoothing spectra.

  • k (float): Spread factor in Hanson and Phillips (2001)’s eq 9.

  • angle_max (float): Maximum relative angle for combining partitions.

  • hs_min (float): Minimum Hs of swell partitions, smaller ones are always combined with closest ones regardless of other criteria being satisfied.

  • ihmax (int): Number of discrete spectral levels in WW3 Watershed code.

  • combine_extra_swells (bool): If True and the number of swells partitions from the Hanson and Phillips 2001 algorithm is greater than the requested number given in the swells argument, merge each extra swell with its closest neighbour until the requested number is achieved. If False, extra swells are ignored from the output.

  • wstype (int):
    • 0: Wind partition defined by all full partitions whose wind sea fraction exceed wscut.

    • 1: Wind partition defined only by spectral bins falling within the wave age parabola, from all partitions available.

    • 2: Combination of [0] and [1], wind partition defined by all full partitions whose wind sea fraction exceed wscut plus bins from all other swell partitions falling witing wave age parabola.

Returns:
  • dspart (xr.Dataset): Partitioned spectra with extra part dimension where the 0th index are the wind sea and remaining indices are the swells sorted by descending order of Hs.

Note:
  • If wspd, wdir or dpt are not provided no wind sea classification is done.

References:
  • Hanson and Phillips (2001).

  • Hanson et al. (2009).

  • Portilla et al. (2009).

  • Tracy et al. (2007).

  • Vincent et al. (1991).

  • WW3 documentation (NOAA-EMC/WW3).