aodn / imos-toolbox

Graphical tool for QC'ing and NetCDF'ing oceanographic datasets
GNU General Public License v3.0
45 stars 30 forks source link

SBE timestamp guessing leads to invalid cast time #719

Open ocehugo opened 3 years ago

ocehugo commented 3 years ago

In profile mode, for a CTD cast read from a cnv file witch do not contain the time stamp of each sample, we have to guess the sampling time based on the startDate info, the scan index and the sampling frequency (fixed at 4hz).

The problem was the time stamp guessing function were not aware of offset scans within the cnv file, such as from up/downcast, multiple casts, or what the user has filtered out in the SBE processing software. The timestamp function always creates a full range vector with NaNs. Since the first time value is then picked as the cast date, this caused broken chain processing since metadata is filled with NaNs and wrong time variables.

Requirements: