aodn / imos-toolbox

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

imosTimeSeriesSpikeQC applied to 2D RDI variables #676

Closed sspagnol closed 3 years ago

sspagnol commented 4 years ago

I have a situation where imosTimeSeriesSpikeQC is operating on an RDI, but the list of variables being considered is also including 2D variables (like ECUR etc), generated from

load_timeseries_variables(sample_data);

but when code gets to line 226

 [l, r] = validBounds(pqc_var.flags);

validBounds is operating on a 2D flags array, which I don't it's set up for, and in my case returns values which are then applied in a manner which doesn't make sense and causes it to fails (usually at line 236).

ocehugo commented 4 years ago

Thanks, confirmed. Yes, validBounds accepts only vectors. Problem here is that load_timeseries_variables is missing a size filter for those invalid variables