clear all
nx1=40;
dx1=25;
ny1=80;
dy1=25;
nx2=50;
dx2=10;
ny2=50;
dy2=10;
xo2=500;
yo2=750;
nx3=100;
dx3=10;
ny3=200;
dy3=10;
xhump=700;
yhump=1000;
R=100;
H=4;
zb0=-11;
slope=1/80;
zbmin=-10;

for j=1:ny1+1;
    for i=1:nx1+1;
        x1(j,i)=(i-1)*dx1;
        y1(j,i)=(j-1)*dy1;
    end
end
for j=1:ny2+1;
    for i=1:nx2+1;
        x2(j,i)=(i-1)*dx2+xo2;
        y2(j,i)=(j-1)*dy2+yo2;
    end
end
for j=1:ny3+1;
    for i=1:nx3+1;
        x3(j,i)=(i-1)*dx3;
        y3(j,i)=(j-1)*dy3;
    end
end
zb1=max(zb0+slope*x1+H*exp(-((x1-xhump)/R).^2-((y1-yhump)/R).^2),zbmin);
zb2=max(zb0+slope*x2+H*exp(-((x2-xhump)/R).^2-((y2-yhump)/R).^2),zbmin);
zb3=max(zb0+slope*x3+H*exp(-((x3-xhump)/R).^2-((y3-yhump)/R).^2),zbmin);
figure(1)
pcolor(x1,y1,zb1); 
shading flat;
hold on
pcolor(x2,y2,zb2); 
shading flat;
plot(x1,y1,'k',x1',y1','k',x2,y2,'b',x2',y2','b')
axis equal
colorbar
save('x1.dep','x1','-ascii')
save('y1.dep','y1','-ascii')
save('zb1.dep','zb1','-ascii')
save('x2.dep','x2','-ascii')
save('y2.dep','y2','-ascii')
save('zb2.dep','zb2','-ascii')
save('x3.dep','x3','-ascii')
save('y3.dep','y3','-ascii')
save('zb3.dep','zb3','-ascii')
