Wave period Tm02 computed by Quickwave 2.10Up to Waves
Wave period Tm02 computed by Quickwave 2.10Posted by Urs Neumeier at November 26. 2011
I am using Quickwave version 2.10 to compute the wave statistics from AWAC-AST data. When a burst is partially corrupted and Quickwave does output errors for this reason, I compute the non-directional wave statistics from the valid part of the burst (AST time series in the *.wst file) with my own matlab routines. I today compared the results of my matlab routine and of Quickwave 2.10 for the other bursts: most parameters are very similar. However, the wave period Tm02 computed by Quickwave was quite different, always longer than Tm02 with my routine. In fact, Tm02 reported by Quickwave is closer to T01 computed by my routine. I attach a time-series plot as example.
Tm02 (also called T02) is usually computed as sqrt(m0/m2). T01 is usually computed as m0/m1. In the help of Quickwave is written "Tm02 = sum(M0/M02)", where the "sum" does not make any sense (M0 and M2 are scalars and not not time-series). Could the formula used in the program code of Quickwave please be checked?
The version 2.10 performs much better than the previous versions, and I am quite confident in all the other parameters, but have since today now some doubt for Tm02. That there are small differences between program is quite normal, as there are different way how to apply the FFT (in how much segments the time-series is divided, etc.), but difference should not be so large.
Re: Wave period Tm02 computed by Quickwave 2.10Posted by Torstein Pedersen at November 30. 2011
Hello Urs and thank you for bringing this to my attention. I believe that the only error here is with the documentation. As you stated In the help of Quickwave is written "Tm02 = sum(M0/M02)", where the "sum" does not make any sense (M0 and M2 are scalars and not not time-series). Could the formula used in the program code of Quickwave please be checked? The text that reads "sum" should in fact read "sqrt". I believe that the code is correct, however I am always open to the possibility that there are errors.
The difference you are seeing are hard to pin point, and I probably would not be able to do that with out the data for comparison. I will say that the portion of code that we use has used this for a number of years and go through comparisons. The code has the following:
Mo_0 = Sum(Spectrum[i]*Df)
Mo_2 = Sum(Spectum[i] * Freq[i] * Freq[i] * Df)
m_dTm02 = sqrt(Mo_0/Mo_2);
I suspect that the difference comes from either (a) that we have slightly different energy density spectra - particularly at the higher frequency end, OR (b) we are using a different frequency range for our calculation - i.e., we have different end or start frequencies in our spectra.
One way to test this is to use the spectra output from QuickWave, which is found in the *.WAS file. You should be able to quickly calculate Hm0 and Tm02 from this.
Please let me know if there are still differences that can not be explained.
Re: Wave period Tm02 computed by Quickwave 2.10Posted by Urs Neumeier at December 04. 2011
I did not try computing Tm02 directly from the spectra produced by Quickwave before writing my posting. I have it done now, and with these density spectra the returned values Tm02 are exactly correct. My apologies for this critic of Quickwave.
Nevertheless there was the difference with my own Matlab routines, which took me some time to explain.
It is not due to different frequency spacing of the spectrum (I dived the 2048 record burst in 512 record segments and get the energy spectrum for the frequency bins 0.039:0.039:1 Hz).
The difference in Tm02 is due to the frequency range that is used to compute Mo_0 and Mo_2. Quickwave use exactly the frequency that are defined in the processing setting dialog window, I use generally 0.02:0.01:0.49 Hz, i.e. the range is 0.02-0.49 Hz). My routine used the range 0.039-1.0 Hz). Mo_2 (and therefore also Tm02) is very sensitive to the higher frequencies because of the Freq[i]^2 factor. Using a spectrum up to 1 Hz versus up to 0.49 Hz increased Mo_2 more than Mo_0, enough to obtain period 10-20 % longer.
If I change the requested frequency range in Quickwave to 0.02-0.99 Hz I obtain the same results than the default settings of my routines, and if I change the range in my routines to 0.04-0.5Hz I also obtain the same result than Quickwave with 0.02-0.49 Hz.
Conclusion: Quickwave is computing correctly, however the users must be aware that the frequency range settings will not only influence the produced *.WAS and *.WDS files, but also the computed period Tm02 (and by a much lesser extent Hm0).
Re: Wave period Tm02 computed by Quickwave 2.10Posted by Torstein Pedersen at December 07. 2011
I am glad we sorted this out. It always leaves me with an uneasy feeling when our end users arrive at different results.
I have taken your advice and amended the documentation so that users are aware of the consequences with the selection of the frequency range.