Commit d2e9577d authored by Pierre Cazenave's avatar Pierre Cazenave

Fix incompatibility with MATLAB R2015b and break no longer being a synonym for return.

parent 922c3a10
......@@ -33,13 +33,13 @@ dir_check=exist('DATA','dir');
if(dir_check==0);
disp('Subdirectory DATA not found. You must navigate to');
disp('location of Model files from current directory.');
break
return
else
eval('cd DATA');
end
cfile=0;
[cfile,pname]=uigetfile('Model*','Open MODEL files listed in ');
if cfile==0,eval(['cd ' curdir]);break;end
if cfile==0,eval(['cd ' curdir]);return;end
CFname=[pname cfile];
fid=fopen(CFname,'r');
hfile=fgetl(fid);ufile=fgetl(fid);Gname=fgetl(fid);Fxy_ll=fgetl(fid);
......@@ -69,7 +69,7 @@ if exist(Gname,'file')==0,
end
if k==1,
fprintf('Check control file: %s\n',CFname);
break
return
end
%
km=0;
......@@ -88,7 +88,8 @@ if km==1 & Fxy_ll==-1,
fprintf(' lat,lon to x,y and back MUST be given in 4-th line of\n');
fprintf('%s\n',CFname);
fprintf('TMD exiting...\n');
break;close all
close all
return
end
if km==0, Fxy_ll='Fdum';end
% define model name by comparing strings hfile and ufile
......
......@@ -68,7 +68,7 @@ else
[nnz,mmz]=size(z);
if check_dim(CFname,n,m,nnz,mmz)==0,
fprintf('hfile: %s\n ufile: %s\n grid: %s\n',hfile,ufile,Gname);
break;
return;
end
nnanz=find(z~=0);z(find(z==0))=NaN;
icz1=ic1;
......@@ -79,7 +79,7 @@ else
[nnu,mmu]=size(u);
if check_dim(CFname,n,m,nnu,mmu)==0,
fprintf('hfile: %s\n ufile: %s\n grid: %s\n',hfile,ufile,Gname);
break;
return;
end
nnanuv=find(u~=0 & v~=0);
u(find(u==0))=NaN+i*NaN;
......
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