Last updated on Sep 04, 2024.

netsse.analys.spec.spec2d_to_params#

netsse.analys.spec.spec2d_to_params(S2D, freq, theta, unit_theta='deg', smooth_peak=False)#

Computes a set of overall parameters characterizing the sea state from the 2-D wave spectrum.

Parameters:
  • S2D (array_like of shape (...,Nf,Ntheta,...)) – Directional wave spectrum [m^2.s/unit_theta], as a function of frequency in Hertz and wave direction in specified unit (unit_theta).

  • freq (array_like of shape (Nf,)) – Vector of (discretized) wave frequencies [Hz] (must include \(f =\) 0 Hz).

  • theta (array_like of shape (Ntheta,)) –

    Vector of wave headings [the unit is specified in unit_theta].

    Attention

    theta must be in a wrapped format, i.e., corresponding to [0,360] deg.

  • unit_theta ({'deg','rad'}, optional) – Unit of the wave directions. This applies for the expression of the wave spectrum too. Can be 'deg' (for degrees), or 'rad' (for radians). 'deg' is the default.

  • smooth_peak (bool, optional) – Specify whether the output Tp and theta_p values should be smoothened by fitting a polynomial of order 3 in the vicinity of the spectral peak and estimating the peak period and direction through the fitted polynomial. The default is False.

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 [-].

  • theta_p (float, or array_like) – Peak wave direction [deg].

  • theta_m (float, or array_like) – Mean overall wave direction [deg].

  • sigma_m (float, or array_like) – Mean directional spreading [deg].

See also

spec1d_to_params

Computes the main sea state parameters from a given 1-D wave spectrum.

Example

>>> m, Hm0, Tp, Tm01, Tm02, Tm24, TE, Sm02, epsilon, Qp, theta_p, theta_m, sigma_m =
...     spec2d_to_params(S2D,freq,theta,unit_theta='deg',smooth_Tp=False)