
addpath 'D:\Kees\Chandeleurs_Islands\InputData\Grids' 

x = load('x.grd');
XB = xb_getdimensions;
pbbed = xb_readvar('pbbed.dat',XB);
zb = xb_readvar('zb.dat',XB);

ngd = 2; 
nd = 20; 
dzbed = 0.1;

for i = 1:XB.nt 
     for m = 1:nd 
        zc(:,:,m,i) = zb(:,:,i)-(m-1)*dzbed; 
     end 
end 
x = x(2,:)' 
zb = squeeze(zb(:,2,:));
zc = squeeze(zc(:,2,:,:));
pbbed = squeeze(pbbed(:,2,:,:,:));
pcolor(repmat(x,[1 20]),zc(:,:,i),pbbed(:,:,1,i));
shading flat