function plotdata()

[runid,testid,datadir]=testinfo

fid=fopen('dims.dat','r');
nt=fread(fid,[1],'double')
nx=fread(fid,[1],'double')
ny=fread(fid,[1],'double')
fclose(fid)
fixy=fopen('xy.dat','r');
x=fread(fid,[nx+1,ny+1],'double');
y=fread(fid,[nx+1,ny+1],'double');
fclose(fixy)
figure(1);
fihrms=fopen('H.dat','r');
fizb=fopen('zb.dat','r');
fizs=fopen('zs.dat','r');
ficcg=fopen('ccg.dat','r');
fik=fopen('k.dat','r');
fidir=fopen('thetamean.dat','r');
fiu=fopen('Susg.dat','r');
fiv=fopen('Svsg.dat','r');
it=0
dnx = 2; dny = 3;
movie = 0;
for i=1:nt;
    i
    hrms=fread(fihrms,[nx+1,ny+1],'double');
    zb=fread(fizb,[nx+1,ny+1],'double');
    if i==1
        z0=zb;
    end
    zs=fread(fizs,[nx+1,ny+1],'double');
    ccg=fread(ficcg,[nx+1,ny+1],'double');
    % k=fread(fik,[nx+1,ny+1],'double');
    dir=fread(fidir,[nx+1,ny+1],'double');
    u=fread(fiu,[nx+1,ny+1],'double');
    v=fread(fiv,[nx+1,ny+1],'double');
    if i>0
%        subplot(221);pcolor(x,y,zs);shading interp;axis equal;colorbar;
%        subplot(222);pcolor(x,y,hrms);shading interp;axis equal;colorbar;       
%        subplot(223);pcolor(x,y,zb);shading interp;axis equal;colorbar;   
%        subplot(224);pcolor(x,y,zb);quiver(x,y,u,v);shading interp;axis equal;colorbar;   
        it=it+1
        surf(x,y,zb);shading interp;caxis([-10 2]);axis equal; daspect([10 10 1]); colorbar; hold on;
        quiver(x(1:dnx:end,1:dny:end),y(1:dnx:end,1:dny:end),u(1:dnx:end,1:dny:end),v(1:dnx:end,1:dny:end),1);%axis([0 1000 400 1400])
        zc=[-10:10];
        %contour(x,y,z0,zc,'g','linewidth',2');
        %contour(x,y,zb,zc,'k','linewidth',2');
        title(num2str(it));drawnow;hold off;
        pause(0.1);
        if movie==1
            name = ['avi\river_outflow_',num2str(i,'%04.0f'),'.png'];
            print('-dpng','-r300',name);
        end
    end
end;
fclose(fihrms)
fclose(fizb)
fclose(fizs)
fclose(fisigm)
fclose(fik)
fclose(fidir)
fclose(fiu)
fclose(fiv)

end