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, kappa=0.4, zeta=0.65, angle_max=30, hs_min=0.2, noise_a=None, noise_b=0.0, ihmax=100, combine_extra_swells=True)[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 combines 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.
- 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 combined swells from all spectra is detected in a first pass, 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 along freq for smoothing spectra.
dir_window (-) – Size of running window along dir for smoothing spectra.
kappa (-) – Spread factor in the peak separation criterion of Hanson and Phillips (2001)’s eq 9, larger values combine more partitions.
zeta (-) – Peak minimum factor, the fraction of the smaller peak density that the saddle point between two partitions must exceed for the partitions to be combined, smaller values combine more partitions.
angle_max (-) – Optional maximum angle (deg) between partition mean directions for combining partitions, disabled if None.
hs_min (-) – Minimum Hs of swell partitions, smaller ones are always combined with their most connected neighbours regardless of other criteria being satisfied. The default of 0.2 m follows Hanson et al. (2009) and is appropriate for open-ocean data, consider reducing it in low-energy environments such as sheltered sites so genuine small wave systems are not combined.
noise_a (-) – Factor A in Hanson and Phillips (2001)’s noise threshold eq 10, e <= A / (fp^4 + B), partitions with total energy below this threshold are treated as noise and merged onto their most connected neighbours. Disabled if None.
noise_b (-) – Factor B in Hanson and Phillips (2001)’s eq 10.
ihmax (-) – Number of discrete spectral levels in WW3 Watershed code.
combine_extra_swells (-) – If True and more swell partitions remain after combining than the number requested in the swells argument, merge each extra swell with its closest neighbour until the requested number is achieved. If False, the smallest extra swells are excluded from the output.
- 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)
Note
If wspd, wdir or dpt are not provided no wind sea classification is done and partition 0 is null.
Spectral variance is conserved unless combine_extra_swells is False and there are more combined swells than requested.
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).