Closed mafavaron closed 6 years ago
Get size after averaging is 2, as expected.
Get size after averages addition is 48, as expected.
On sonic data read, time stamps are generated correctly.
On eddy covariance data addition to multi-hour set, time stamp vectors get filled correctly, with a step of 1800s
Time stamp also makes sense in test program's second cycle, where data are retrieved for print.
Wind speed is zero, and rotation angle sin*cos NaN, on second element in each hourly block (EddyCovData % process(...)).
As a confirm, in each 30 minutes block the first element contains all 36000 data, while the second holds 0.
The bug is then in block indexing.
The ivTimeIndex vector within EddyCovData % addHourly(...) prints correct.
Is it really used, when saving data?
The retrieved ivNumData vector in EddyCovData % getHourly(...) is 36000, 0 - that is, incorrect: it should be 18000 instead.
The bug is then in averaging routine.
Within SonicData % averages(...), the value of ivTimeIndex is always 1 (not 2 as it should on last values based on a correct hourly time span.
Hourly time stamps, on entry to SonicData % averages(...), are all within 1800s from base time - they should be within 3600s. The problem is then with time stamp calculation? On read?
Bug was finally traced to the time stamp in AF gold files, as converted to SonicLib form. Their hourly time stamp is in fact restricted to 0..1799 instead of 0..3599.
Converter program modified, and whole chain tested. The problem reported is not present any longer. Closing issue.
As from name