1 |
edhill |
1.1 |
snx=90; |
2 |
|
|
sny=90; |
3 |
|
|
|
4 |
|
|
t0=zeros(snx,sny); |
5 |
|
|
tb=t0; |
6 |
|
|
|
7 |
|
|
x = [1:snx]-.5-snx/2; |
8 |
|
|
y = [1:sny]-.5-sny/2; |
9 |
|
|
|
10 |
|
|
[xx,yy]=meshgrid(x,y); |
11 |
|
|
|
12 |
|
|
a = 1; |
13 |
|
|
sigma=10; |
14 |
|
|
|
15 |
|
|
tb = a*exp(-.5*(xx.^2+yy.^2)/sigma); |
16 |
|
|
|
17 |
|
|
% mit_writefield('ssh.bump',tb,'real*8'); |
18 |
|
|
% mit_writefield('ssh.flat',t0,'real*8'); |
19 |
|
|
|
20 |
|
|
fid = fopen('ssh.bump', 'w', 'ieee-be'); |
21 |
|
|
fwrite(fid,tb,'real*8',0,'ieee-be'); |
22 |
|
|
fclose(fid); |
23 |
|
|
|
24 |
|
|
fid = fopen('ssh.flat', 'w', 'ieee-be'); |
25 |
|
|
fwrite(fid,t0,'real*8',0,'ieee-be'); |
26 |
|
|
fclose(fid); |
27 |
|
|
|
28 |
|
|
% topography |
29 |
|
|
delR= [50., 70., 100., 140., 190.,... |
30 |
|
|
240., 290., 340., 390., 440.,... |
31 |
|
|
490., 540., 590., 640., 690.]; |
32 |
|
|
H = sum(delR); |
33 |
|
|
|
34 |
|
|
% flat topography |
35 |
|
|
h0 = -H*ones(snx,sny); |
36 |
|
|
% $$$ fid = fopen('bathy.flat', 'w', 'ieee-be'); |
37 |
|
|
% $$$ fwrite(fid,h0,'real*8',0,'ieee-be'); |
38 |
|
|
% $$$ fclose(fid); |
39 |
|
|
|
40 |
|
|
% southern wall |
41 |
|
|
hs=h0; |
42 |
|
|
hs(:,1:35) = 0; |
43 |
|
|
% $$$ fid = fopen('bathy.wall', 'w', 'ieee-be'); |
44 |
|
|
% $$$ fwrite(fid,hs,'real*8',0,'ieee-be'); |
45 |
|
|
% $$$ fclose(fid); |
46 |
|
|
|
47 |
|
|
% write files with proper orientation |
48 |
|
|
for k = 1:17 |
49 |
|
|
fname = sprintf('bathy.%3.3u.001.data',k); |
50 |
|
|
disp( fname ) |
51 |
|
|
fid = fopen(fname, 'w', 'ieee-be'); |
52 |
|
|
if ismember(k,[1 5]) |
53 |
|
|
fwrite(fid,rot90(hs,0),'real*8',0,'ieee-be'); |
54 |
|
|
end |
55 |
|
|
if ismember(k,[13 17]) |
56 |
|
|
fwrite(fid,rot90(hs,1),'real*8',0,'ieee-be'); |
57 |
|
|
end |
58 |
|
|
if ismember(k,[9]) |
59 |
|
|
fwrite(fid,h0,'real*8',0,'ieee-be'); |
60 |
|
|
end |
61 |
|
|
if ismember(k,[2:4 6:8]) |
62 |
|
|
fwrite(fid,h0,'real*8',0,'ieee-be'); |
63 |
|
|
end |
64 |
|
|
if ismember(k,[10:12 14:16]) |
65 |
|
|
fwrite(fid,rot90(h0,1),'real*8',0,'ieee-be'); |
66 |
|
|
end |
67 |
|
|
fclose(fid); |
68 |
|
|
end |
69 |
|
|
|
70 |
|
|
|