wavespectra.partition.partition.np_ptm3#
- wavespectra.partition.partition.np_ptm3(spectrum, spectrum_smooth, freq, dir, parts=3, ihmax=100)[source]#
PTM3 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).
parts (int): Number of partitions to compute, all detected by default.
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.