Skip to contents

Adds calculated wave metrics including rogue wave flag and steepness.

Usage

add_wave_metrics(data, rogue_threshold = 2)

Arguments

data

Data frame with wave_height, hmax, and wave_period columns

rogue_threshold

Threshold for rogue wave classification (default: 2.0)

Value

Data frame with additional columns: rogue_ratio, is_rogue, steepness, danger_level

Examples

data <- data.frame(
  wave_height = c(2.5, 3.0, 1.8),
  hmax = c(4.5, 6.5, 3.2),
  wave_period = c(8, 10, 7)
)
add_wave_metrics(data)
#>   wave_height hmax wave_period rogue_ratio is_rogue  steepness danger_level
#> 1         2.5  4.5           8    1.800000    FALSE 0.02504006         safe
#> 2         3.0  6.5          10    2.166667     TRUE 0.01923077         safe
#> 3         1.8  3.2           7    1.777778    FALSE 0.02354788         safe