Processing waves

stglib supports the computing of wave statistics, using pressure and sea-surface elevation as well as PUV for directional wave statistics. Pressure derived wave statistics can be computed both with fixed frequency cutoffs, as well as dynamic cutoffs based on water depth. Spectra tails beyond the cutoff frequency are applied following Jones & Monismith (2007). For more information, see the code in stglib/core/waves.py.

Additionally, stglib now supports computing directional and non-directional wave spectra and statistics using pyDIWASP library, a python translation by Chuan Li and Spicer Bak, Field Research Facility, US Army Corps of Engineers, of diwasp package (DIWASP: DIrectional WAve SPectrum analysis Version 1.4 - Copyright (C) 2002 David Johnson Coastal Oceanography Group, CWR, UWA, Perth). stglib implementation of pyDIWASP library supports triplet processing of surface track derived sea-surface elevatations with velocity components u and v (suv) and puv type with pressure and u,v velocities for directional wave processing. Non-directional processing is available using pressure and elevation inputs. Available methods for directional wave spectra estimation are IMLM (Iterative Maximum Likelihood Method) and DFTM (Direct Fourier Transform Method). Inclusion of more input data types and estimation methods are planned.

In brief, stglib’s wave-statistics code (stglib.core.waves.make_waves_ds()) does the following:

  1. Compute the pressure spectra using Welch’s method in stglib.core.waves.pressure_spectra().

  2. Compute the transfer function from wavenumber, water depth, and sensor height in stglib.core.waves.transfer_function().

  3. Compute the surface-elevation spectra by dividing the pressure spectra by the transfer function in stglib.core.waves.elevation_spectra().

  4. Define the cutoff following Jones & Monismith (2007) in stglib.core.waves.define_cutoff().

  5. Add a tail following Jones & Monismith (2007) in stglib.core.waves.make_tail().

  6. Compute the zeroth and second moments of the surface-elevation spectra using stglib.core.waves.make_moment().

  7. Compute significant wave height, mean period, and peak period using stglib.core.waves.make_Hs(), stglib.core.waves.make_Tm(), and stglib.core.waves.make_Tp().

and stglib pyDIWASP processing code (stglib.core.waves.make_diwasp_puv_suv()) does the following:

  1. Make DIWSP input parameters ID, SM, and EP in stglib.core.waves.make_diwasp_inputs().

  2. Compute the directional wave specrta using user specified method in stglib.lib.pyDIWASP.dirspec().

  3. Compute significant wave height, peak period, direction of peak energy, and dominant wave direction in stglib.lib.pyDIWASP.infospec().

  4. Compute mean period and mean wave direction in stglib.core.waves.make_Tm() and stglib.core.waves.make_mwd().

The above list is for information only. The user does not need to apply these steps manually; they are all called by the run script.

stglib.core.waves.make_waves_ds(ds)

stglib.core.waves.pressure_spectra(x[, fs, ...])

Compute pressure spectral density using Welch's method

stglib.core.waves.transfer_function(k, h, z)

Compute pressure transfer function

stglib.core.waves.elevation_spectra(Pxx, Kp)

Compute elevation spectra using linear wave theory and transfer function

stglib.core.waves.define_cutoff(f, Pxx, Kp)

Define cutoff based on Jones & Monismith (2007) values for the noise floor cutoff (12*noise), f_peak cutoff (1.1*f_peak), along with a cutoff based on 0.1 K_p (pressure transfer function)

stglib.core.waves.make_tail(f, Pnn, tailind)

Make f^-4 tail following Jones & Monismith (2007)

stglib.core.waves.make_moment(f, Pnn, n)

Compute nth moment (m0, m1, m2, etc.) of power spectra

stglib.core.waves.make_Hs(m0)

Compute significant wave height as 4 * np.sqrt(m0)

stglib.core.waves.make_Tm(m0, m2)

Compute mean period as sqrt(m0 / m2)

stglib.core.waves.make_Tp(Pnn)

Compute peak period as 1 / fp, where fp is the frequency with greatest energy in the elevation spectra