Learn R Programming

oceanwaves provides a set of functions to calculate summary statistics for ocean waves, using a record of sea surface elevation as input. For sea surface elevations derived from bottom-mounted pressure transducers, the package also contains a function prCorr() to correct for depth attenuation of the pressure signal, and the swDepth() function from the package oce can be used to convert pressure data into ocean surface elevations (see the included package vignette).

waveStatsSP() produces wave height and period statistics using spectral analysis methods, while waveStatsZC() calculates additional wave height and period statistics based on a zero-crossing algorithm.

See the package vignette for example workflows to proceed from raw pressure data to summary wave statistics.

Pressure corrections and wave statistics functions were adapted from Urs Neumeier’s waves functions for MATLAB, developed from earlier work by Travis Mason and Magali Lecouturier. http://neumeier.perso.ch/matlab/waves.html

The release version of this package can be obtained from https://cran.r-project.org/package=oceanwaves. To install this package within R, run the following at the R command line:

install.packages('oceanwaves')

To install the development version of this package from within R, first install the package devtools https://CRAN.R-project.org/package=devtools and then install this package from Github:

install.packages('devtools')
library(devtools)
install_github('millerlp/oceanwaves')

Copy Link

Version

Install

install.packages('oceanwaves')

Monthly Downloads

260

Version

0.2.0

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Luke Miller

Last Published

June 2nd, 2021

Functions in oceanwaves (0.2.0)

waveStatsSP

Calculate ocean wave parameters using spectral analysis methods
waveNumL

A function to calculate wave number.
prCorr

Correct for depth attenuation of a water surface elevation pressure signal.
plotWaveSpectrum

Plot a basic spectrum
almostZero

Test whether vector elements are effectively zero
detrendHeight

Remove trend from a time series
wavedata

Example wave records
waveStatsZC

Calculate wave statistics using zero-crossing method