%  Written by Tom Bolmer
%  tbolmer@whoi.edu
%  1/12/7
%
%  Reads SOGLOBEC ASCII XYZ file and plots it in MatLab
%  Change the name and lengths to fit the data you have
%
%******************************************************

%filename='surface_17_1_all_topo30_1min.xyz';
%xlen=853;
%ylen=373;
filename='surface_17_1_all_topo30_15c.xyz';
xlen=3409;
ylen=1489;

[Ax,Ay,A]=textread(filename,'%f %f %f\n');

AA=reshape(A,xlen,ylen)';
Ax=reshape(Ax,xlen,ylen)';
Ay=reshape(Ay,xlen,ylen)';


coastname='SCARcoast.xyz';


[Cx,Cy,C]=textread(coastname,'%f %f %f\n');

pcolor(Ax,Ay,AA); 
shading 'flat'; 
hold on; 
plot(Cx,Cy,'k-'); 
hold off;

title (filename);
