wavespectra.read_funwave_new#
- wavespectra.read_funwave_new(filename_or_obj)[source]#
Read Spectra in Funwave WK_NEW_DATA2D wavemaker format.
- Args:
filename_or_obj (str, filelike): Funwave WaveCompFile to read.
- Returns:
dset (SpecDataset): spectra dataset object read from funwave file.
- Note:
Format description: https://fengyanshi.github.io/build/html/wavemaker_coherence.html.
The file describes individual wave components, the gridded spectrum is reconstructed by summing component energies \(a^2/2\) falling in each frequency-direction bin defined by the unique frequencies and directions.
Directions converted from Cartesian (0E, CCW, to) to wavespectra (0N, CW, from).
A 1D \(E(f)\) spectrum is returned if all directions are equal.
Phases are ignored if present.