Commit 9826f1e3 authored by Pierre Cazenave's avatar Pierre Cazenave

Fix verbose output and error message for a non-existent variable.

parent ca4adc99
......@@ -286,13 +286,11 @@ for aa=1:length(varnames)
varidx(aa) = find(TF);
TF = sum(TF);
dimens=ndims(aa);
if ftbverbose
fprintf('Variable %s found', vars{varidx(aa)})
end
else
netcdf.close(nc)
varargout{1} = 0;
error('\nNOT found in file. Stopping. Check input variable names.')
fprintf('\n')
error('Variable %s NOT found in file. Stopping. Check input variable names.', varnames{aa})
end
varID=netcdf.inqVarID(nc,vars{varidx(aa)});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment