Commit a98789cf authored by Pierre Cazenave's avatar Pierre Cazenave

Add graceful failure if the model domain does not fall within the extent of...

Add graceful failure if the model domain does not fall within the extent of the supplied time series stations
parent d55de02c
......@@ -90,4 +90,11 @@ for s=1:nPos
inc = inc + 1;
end
Mobj.stations = out;
if ~isempty(out)
Mobj.stations = out;
else
Mobj.stations = [];
if ftbverbose
fprintf('No stations found within the model domain.\n')
end
end
......@@ -36,7 +36,7 @@ end
% Parse input arguments
%--------------------------------------------------------------------------
if exist('Mobj', 'var') ~= 1 || exist('filename', 'var') ~= 1
error('arguments to write_FVCOM_grid are incorrect')
error('arguments to %s are incorrect', subname)
end
%--------------------------------------------------------------------------
......
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