ieee='b';
accuracy='real*8';

Ho=1500;
nx=132;
ny=120;

% Flat bottom at z=-Ho
h=-Ho*ones(nx,ny);
% Walls
h(1:6,:)=0;
h(end-5:end,:)=0;
h(:,end-1:end)=0;
fid=fopen('topog.box','w',ieee); fwrite(fid,h,accuracy); fclose(fid);

% Wind-stress
tauMax=0.1;
x=((1:nx)-0.5)/(nx-1); % nx-1 accounts for a solid wall
y=((1:ny)-0.5)/(ny-1); % ny-1 accounts for a solid wall
[X,Y]=ndgrid(x,y);
tau=tauMax*sin(pi*Y);
fid=fopen('windx.sin_y','w',ieee); fwrite(fid,tau,accuracy); fclose(fid);
