bug message reminder

When adressing a model crash or bug, please remember to include an entire model setup in your post that reproduces the crash or exposes the bug. Also add the XBlog.txt file. This is necessary information for people that are trying to help you. Including your model setup can be achieved by adding the zipped run directory (excluding output) as an attachment to the post.

Forum

Toolbox spectrum

AW
Andy W, modified 4 Years ago.

Toolbox spectrum

Capillary Posts: 1 Join Date: 2/16/16 Recent Posts
Hi All,

I am relatively new to XBeach and the Matlab Toolbox. I am interested in the low frequency waves/ infragravity waves/bound long waves and therefore I am looking at the low frequency part of a spectrum. Therefore, I am doing a spectral analysis with the XBeach Matlab Toolbox.

Using the Matlab Toolbox and the command xb_get_spectrum, xb_plot_spectrum, I obtain 2 spectra in 1 plot, see attachment. The input I gave is a time serie (6 hours, every second a water level) of water level. Other settings I just leave it as default.
spectrum1 = xb_get spectrum(ts);
xb_plot_spectrum(spectrum1);

where ts is my time serie of water level (see attachment).

I do not understand what these 2 spectra indicate. The left one has very low energy over the whole frequency domain (which I do expect from my simulations). The right one has a large peak at the low frequency, but I have no idea where this comes from. Initially I thought it was a zoom-in of the left picture, but it looks like two different spectra.

Could someone tell me what is going on?
I greatly appreciate your help!

Cheers,
Bas Hoonhout, modified 4 Years ago.

RE: Toolbox spectrum

Infra-gravity Posts: 362 Join Date: 5/20/11 Recent Posts
Hi Andy,

I think the first spectrum is the spectrum of time itself :-)

The function xb_get_spectrum assumes the time series has equidistant points in time. Therefore you do not need to supply time as a column in "ts". Each colum is treated as a separate time series and ends up as a subplot in the figure created by xb_plot_spectrum. You can set the sample frequency using the keyword "sfreq". So this is probably what you want:

s = xb_get_spectrum(ts(:,2), 'sfreq', 1)


Although the default of "sfreq" is 1, so you can skip that part.

Bas
SM
sweetz mwtey, modified 3 Months ago.

RE: Toolbox spectrum

Capillary Posts: 16 Join Date: 12/4/19 Recent Posts
WB
will burn, modified 3 Months ago.

RE: Toolbox spectrum

Capillary Posts: 1 Join Date: 12/23/19 Recent Posts
Nice to see this post here and thanks for sharing this to us. Get more about tcswebmail.vip here. TCS Webmail is a mailing service, which has been developed by Tata Consultancy Services for its employees all over the world.