pycoastkit.waves¶
Sea-state parameters from a sea-surface-elevation record (e.g. a 4 Hz wave buoy or pressure/laser gauge record during a storm).
- :func:
spectral_parameters- Welch spectrum -> Hm0, periods, steepness, peakedness, Benjamin-Feir index proxy, Ursell number, ... - :func:
individual_wave_statistics- zero-upcrossing analysis -> H1/3, Hmax, abnormality index and rogue-wave flags.
The spectral predictor set follows Häfner, Gemmrich & Jochum (2021), "Real-world rogue wave probabilities", Scientific Reports 11, 10084.
SpectralSettings
dataclass
¶
SpectralSettings(sampling_hz=4.0, water_depth_m=20.0, segment_s=180.0, overlap=0.5, band_hz=(0.04, 1.0), low_band_hz=(0.05, 0.1), high_band_hz=(0.25, 1.0), nfft=None)
Settings for :func:spectral_parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sampling_hz
|
record sampling frequency [Hz]
|
|
4.0
|
water_depth_m
|
local water depth [m] (for wavenumber, steepness, Ursell number)
|
|
20.0
|
segment_s
|
Welch segment length [s]; longer = finer frequency resolution
|
|
180.0
|
overlap
|
Welch segment overlap (0-1)
|
|
0.5
|
band_hz
|
frequency band used for the spectral moments [Hz]
|
|
(0.04, 1.0)
|
low_band_hz
|
bands for the swell/wind-sea energy fractions
|
|
(0.05, 0.1)
|
high_band_hz
|
bands for the swell/wind-sea energy fractions
|
|
(0.05, 0.1)
|
nfft
|
FFT length (None = next power of two >= segment length)
|
|
None
|
wavenumber
¶
Wavenumber k [rad/m] from the linear dispersion relation
(2 pi / T)^2 = g k tanh(k h).
Source code in src/pycoastkit/waves.py
wave_energy_flux
¶
Wave energy flux (wave power) per metre of wave crest [W/m].
P = E * cg with energy density E = rho g Hs² / 16 and group speed
cg from linear wave theory. In deep water (depth_m=None)
cg = g T / (4 pi), giving P = rho g² Hs² T / (64 pi)
(about 490 Hs² T W/m). Use the energy period Te if available; peak or
significant period is a common substitute.
Source code in src/pycoastkit/waves.py
storm_surge
¶
Storm surge = observed water level - predicted (astronomical) tide [m].
clip_negative=True sets negative surge (set-down) to 0.
Works on arrays or aligned pandas Series.
Source code in src/pycoastkit/waves.py
spectral_parameters
¶
Sea-state parameters from one continuous record (typically 20-30 min).
The record is linearly detrended and its spectrum estimated with Welch's method (Hann window).
Returns:
| Type | Description |
|---|---|
dict with
|
|
Source code in src/pycoastkit/waves.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
individual_wave_statistics
¶
Zero-upcrossing statistics of the first n_waves valid waves.
The record is linearly detrended and cut at zero upcrossings (positions
interpolated between samples). A wave counts when its period is inside
period_range_s and its height and crest are positive.
Returns:
| Type | Description |
|---|---|
dict with
|
|