wavespectra.partition.partition.Partition.ptm2#

Partition.ptm2(wspd, wdir, dpt, agefac=1.7, wscut=0.3333, swells=3, smooth=False, freq_window=3, dir_window=3, ihmax=100)[source]#

PTM2 watershed partitioning with secondary wind-sea.

PTM2 works in a similar way to PTM1 by identifying a primary wind sea (assigned to partition 0) and one or more swell components. In this method however all the swell partitions are checked for the influence of wind-sea with energy within spectral bins within the wind-sea range (as defined by a wave age criterion) removed and combined into a secondary wind-sea partition (assigned to partition 1). The remaining swell partitions are then assigned in order of decreasing wave height from partition 2 onwards. This implies PTM2 has an extra partition compared to PTM1.

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.

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

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

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).