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

WorkhorseParser - wrong assignment of velocity components #741

Closed ocehugo closed 3 years ago

ocehugo commented 3 years ago

This bug affects v2.6.11 & v2.6.12

When reading ENU datasets with the newly refactored workhorse Parser, the variable mappings are reversed and a wrong assignment is being done. The current bug lies in assigning velocity1->VCUR and velocity2->UCUR, while the correct is the reverse.

This only occurs for ENU datasets.

The problem is located in the import_mappings on the recently refactored Workhorse parser (v2.6.11+). It went undetected because even the tests got the typo (see +Workhorse/import_mappings.m). We are also missing a content regression test against ENU files, which would have picked the problem.

The origin is likely related to a wrong copy/paste/edit since the original workhorseParser firstly defined a VCUR variable, then a UCUR variable, but with the correct assignments.

Thanks to Tim Austin for reporting

ocehugo commented 3 years ago

closed by 3806980