1 |
ieee='b'; |
2 |
accuracy='real*8'; |
3 |
|
4 |
Ho=5000; |
5 |
nx=60; |
6 |
ny=60; |
7 |
|
8 |
% Flat bottom at z=-Ho |
9 |
h=-Ho*ones(nx,ny); |
10 |
% Walls |
11 |
h(end,:)=0; |
12 |
h(:,end)=0; |
13 |
fid=fopen('topog.box5000','w',ieee); fwrite(fid,h,accuracy); fclose(fid); |
14 |
|
15 |
% Wind-stress |
16 |
tauMax=0.1; |
17 |
x=((1:nx)-0.5)/(nx-1); % nx-1 accounts for a solid wall |
18 |
y=((1:ny)-0.5)/(ny-1); % ny-1 accounts for a solid wall |
19 |
[X,Y]=ndgrid(x,y); |
20 |
tau=-tauMax*cos(2*pi*Y); |
21 |
fid=fopen('windx.m01cos2y','w',ieee); fwrite(fid,tau,accuracy); fclose(fid); |
22 |
|
23 |
% dye |
24 |
dye=zeros(60,60,1); |
25 |
dye(2,30,1)=1; |
26 |
fid=fopen('dye.bin','w',ieee); fwrite(fid,dye,accuracy); fclose(fid); |