netsse.model.envir_cond.wavespec1dto2d ====================================== .. py:function:: netsse.model.envir_cond.wavespec1dto2d(S1d, theta, theta0, s) Transforms a 1-D wave spectrum into a 2-D wave spectrum. A cosine-2s function is used for the directional spreading distribution. :param S1d: 1-D wave spectrum. :type S1d: array_like of shape (Nfreq,) :param theta: Vector of wave headings [deg] at which the 2-D spectrum must be computed. :type theta: array_like of shape (Ntheta,) :param theta0: Mean wave direction [deg]. :type theta0: float :param s: Spreading parameter [-], related to the exponent of the cosine function. :type s: float :returns: * **S2d** (*array_like of shape (Nfreq,Ntheta)*) -- 2-D wave spectrum, as a function of both the frequency and the wave heading [deg]. * **D_theta** (*array_like of shape (1,Ntheta)*) -- Directional spreading function, as a function of the wave heading [deg]. .. rubric:: References Naess, Arvid, and Torgeir Moan. 2010. Stochastic Dynamics of Marine Structures. Stochastic Dynamics of Marine Structures. Vol. 9780521881555. Cambridge University Press. https://doi.org/10.1017/CBO9781139021364. .. rubric:: Example >>> S2d = wavespec1dto2d(S1d,theta,theta0,s)