netsse.analys.spec.spec1d_to_params#
- netsse.analys.spec.spec1d_to_params(S, freq, unit_freq='rad/s', smooth_Tp=False)#
Computes the main sea state parameters from a given 1-D wave spectrum.
- Parameters:
S (array_like) – 1-D wave spectrum. If
S
has more than one dimension, then one axis must have a length Nfreq.freq (array_like of shape (Nfreq,)) – Set of discretized frequencies.
unit_freq ({'rad/s','Hz'}, optional) –
Unit of the frequencies:
- ’rad/s’ :
The variable
freq
denotes the circular frequencies in radians per second.
- ’Hz’ :
The 1-D wave spectrum is expressed as a function of frequency in Hertz.
smooth_Tp (bool, default False) – Specify whether the output
Tp
value should be smoothened by fitting a polynomial of order 3 in the vicinity of the spectral peak and estimating the peak period through the fitted polynomial.
- Returns:
m (array_like of shape (6,…,)) – Spectral moments \([m_{-1},m_0,m_1,m_2,m_3,m_4]\).
Hm0 (float, or array_like) – Spectral significant wave height [m].
Tp (float, or array_like) – Peak wave period [s].
Tm01 (float, or array_like) – Mean wave period [s].
Tm02 (float, or array_like) – Zero up-crossing period [s].
Tm24 (float, or array_like) – Mean crest period [s].
TE (float, or array_like) – Mean energy period [s].
Sm02 (float, or array_like) – Significant wave steepness [-].
epsilon (float, or array_like) – Spectral bandwidth [-].
Qp (float, or array_like) – Goda’s peakedness parameter [-].
See also
spec2d_to_params
Computes a set of overall parameters characterizing the sea state from the 2-D wave spectrum.
Example
>>> m, Hm0, Tp, Tm01, Tm02, Tm24, TE, Sm02, epsilon, Qp = ... spec1d_to_params(S,freq,unit_freq='rad/s',smooth_Tp=False)