wavespectra.partition.partition.np_ptm1#

wavespectra.partition.partition.np_ptm1(spectrum, spectrum_smooth, freq, dir, wspd, wdir, dpt, agefac=1.7, wscut=0.3333, swells=3, ihmax=100)[source]#

PTM1 spectra partitioning on numpy arrays.

Args:
  • spectrum (2darray): Wave spectrum array with shape (nf, nd).

  • spectrum_smooth (2darray): Smoothed wave spectrum array with shape (nf, nd).

  • freq (1darray): Wave frequency array with shape (nf).

  • dir (1darray): Wave direction array with shape (nd).

  • wspd (float): Wind speed.

  • wdir (float): Wind direction.

  • dpt (float): Water depth.

  • agefac (float): Age factor.

  • wscut (float): Wind sea fraction cutoff.

  • swells (int): Number of swell partitions to compute, all detected if None.

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

Returns:
  • specpart (3darray): Wave spectrum partitions sorted in decreasing order of Hs with shape (np, nf, nd).

Note:
  • The smooth spectrum spectrum_smooth is used to define the watershed boundaries which are applied to the original spectrum.