wavespectra.SpecArray.interp#
- SpecArray.interp(freq=None, dir=None, maintain_m0=True)[source]#
Interpolate onto new spectral basis.
- Args:
freq (DataArray, 1darray): Frequencies of interpolated spectra (Hz).
dir (DataArray, 1darray): Directions of interpolated spectra (deg).
maintain_m0 (bool): Ensure variance is conserved in interpolated spectra.
- Returns:
dsi (DataArray): Regridded spectra.
- Note:
All freq below lowest freq are interpolated assuming \(E_d(f=0)=0\).
\(Ed(f)\) is set to zero for new freq above the highest freq in dset.
Only the ‘linear’ method is currently supported.