1 |
spk |
1.1 |
Ho=5000; |
2 |
|
|
nx=31; |
3 |
|
|
ny=31; |
4 |
|
|
|
5 |
|
|
% Flat bottom at z=-Ho |
6 |
|
|
h=-Ho*ones(nx,ny); |
7 |
|
|
% Walls |
8 |
|
|
h(end,:)=0; |
9 |
|
|
h(:,end)=0; |
10 |
|
|
for j=1:5 |
11 |
|
|
h(end-6+j,end-j:end)=0; |
12 |
|
|
end |
13 |
|
|
fid=fopen('topog.box','w','ieee-be'); fwrite(fid,h,'real*4'); fclose(fid); |
14 |
|
|
|
15 |
|
|
% Wind-stress |
16 |
|
|
tauMax=0.5; |
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*sin(pi*Y); |
21 |
|
|
tau=-tauMax*cos(pi*Y); |
22 |
|
|
fid=fopen('windx.cos_y','w','ieee-be'); fwrite(fid,tau,'real*4'); fclose(fid); |