Processing of wave data from pressure sensors

Introduction


This set of routines processes data from pressure sensors to compensate the attenuation of pressure variations with depth and compute the standard (non-directional) wave parameters. These are Matlab routines, that means Matlab must be installed in order to use them.

wavesp.m computes the spectral wave-parameters after correction of the pressure attenuation. If pr_corr.m and zero_crossing.m are on the matlab-path, the zero-crossing wave-parameters are also returned.
pr_corr.m returns the attenuation-corrected water surface. It is called by wavesp.m for the zero-crossing wave-parameters.
zero_crossing.m computes the zero-crossing wave-parameters. It is called by wavesp.m.

Full help how to use is included in the comments at the beginning of each routine.

Disclaimer
– I have written these routines with care and I use them myself for my research. However, I cannot give any  guarantee for the accuracy of their results.


Download


To download the 3 routines in a zip-file, use following link
waves.zip (9 kB)
To download separately the 3 routines, right-click on the following links and select "Save target as..."
wavesp.m (version 1.11, 9 kB)
pr_corr.m (version 1.09, 8 kB)
zero_crossing.m (version 1.06, 6 kB)


Detailed description
Examples of usage

wavesp

wavesp(data,0.5,4) simple use, with sensor 0.5 m above bed and sampling frequency 4 Hz
wavesp(data,0.5,4,[0.05 0.45]) with pressure correction over the frequency range 0.05-0.45 Hz
wavesp(data,0.5,4,'az') returning all spectral parameters and the zero-crossing parameters
wavesp(data,0.5,4,[],2)
divide data in segments of 1/2 instead of 1/4
[parameters,names]=wavesp(...) returning parameters (row array) and their names
[parameters,names,spectrum]=wavesp(...) returning also the wave spectrum
pr_corr
surface=pr_corr(data,2.6,4,0.5) simple use, with mean water depth 2.6 m, sampling frequency 4 Hz and sensor 0.5 above bed
surface=pr_corr(data,[],4,0.5) with undetrended data (sea-surface above bottom)
surface=pr_corr(data,2.6,4,0.5,[],[0.05 0.45])
with pressure correction over the frequency range 0.05-0.45 Hz
correction=pr_corr([],2.6,4,0.5) return the correction factor used to compensate the depth attenuation.


 Wave parameters computed by wavesp and zero_crossing


spectral wave-parameters

m0 Total variance
Wave energy = water-density · g · m0

Hm0 significant wave height by spectral method

Tp Peak period




T01 average period m0/m1

T02 average period (m0/m2)^0.5

Tpc calculated peak period

EPS2 spectral width parameter

EPS4 spectral width parameter


zero-crossing wave-parameters

Hs Significant wave height

Hmean mean wave height

H1/10 height of highest 10%

Hmax maximum wave height

Tmean mean wave period

Tsignificant mean period of highest 33%


Reference

Tucker M.J. & Pitt E.G. (2001) Waves in ocean engineering. Elsevier ocean engineering book series vol. 5, Elsevier, Amsterdam, 521 p.

Back to the main page