wavespectra.partition.partition.Partition.ptm1#

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

PTM1 watershed partitioning.

In PTM1, topographic partitions for which the percentage of wind-sea energy exceeds a defined fraction are aggregated and assigned to the wind-sea component (e.g., the first partition). The remaining partitions are assigned as swell components in order of decreasing wave height.

Parameters:
  • wspd (-) – Wind speed DataArray, taken from the wspd variable in the underlying dataset if not provided.

  • wdir (-) – Wind direction DataArray, taken from the wdir variable in the underlying dataset if not provided.

  • dpt (-) – Depth DataArray, taken from the dpt variable in the underlying dataset if not provided.

  • swells (-) – Number of swell partitions to compute. If None, the number required to hold all swells detected from all spectra is used, which doubles the compute time and triggers an eager computation on dask datasets.

  • agefac (-) – Age factor.

  • wscut (-) – Wind sea fraction cutoff.

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

  • freq_window (-) – Size of running window for smoothing spectra.

  • dir_window (-) – Size of running window for smoothing spectra.

  • ihmax (-) – Number of discrete spectral levels in WW3 Watershed code.

Returns:

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.

Return type:

  • dspart (xr.DataArray, xr.Dataset)

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