Skip to content

Commit

Permalink
fix(QC): support skip of invalid datasets
Browse files Browse the repository at this point in the history
This commit forces the `imosechoIntensityVelocitySetQC`
to skip datasets that do not contain DEPTH or
HEIGHT_ABOVE_SENSOR variables.

Before, an error was raised.
  • Loading branch information
ocehugo committed Apr 15, 2021
1 parent ddb6841 commit b00323a
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions AutomaticQC/imosEchoIntensityVelocitySetQC.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,22 @@
if strcmpi(paramName, ['ABSIC' cc]), idABSIC{j} = i; end
end
end
idHeight = getVar(sample_data.dimensions, 'HEIGHT_ABOVE_SENSOR');
Bins = sample_data.dimensions{idHeight}.data';
idDepth = getVar(sample_data.variables, 'DEPTH');
depth = sample_data.variables{idDepth}.data;
try
idHeight = getVar(sample_data.dimensions, 'HEIGHT_ABOVE_SENSOR');
Bins = sample_data.dimensions{idHeight}.data';
catch
dispmsg('No HEIGHT_ABOVE_SENSOR variable. Skipping...')
return
end

try
idDepth = getVar(sample_data.variables, 'DEPTH');
depth = sample_data.variables{idDepth}.data;
catch
dispmsg('No DEPTH variable. Skipping...')
return
end


% check if the data is compatible with the QC algorithm
idMandatory = (idUcur | idVcur | idWcur | idCspd | idCdir);
Expand Down

0 comments on commit b00323a

Please sign in to comment.