wavespectra.core.utils.smooth_spec#

wavespectra.core.utils.smooth_spec(dset, freq_window=3, dir_window=3)[source]#

Smooth spectra with a running average.

Args:
  • dset (Dataset, DataArray): Spectra to smooth.

  • freq_window (int): Rolling window size along freq dim.

  • dir_window (int): Rolling window size along dir dim.

Returns:
  • efth (DataArray): Smoothed spectra.

Note:
  • The window size should be an odd value to ensure symmetry.