1 |
% This is a matlab script that generates the input data |
2 |
|
3 |
% Dimensions of grid |
4 |
nx=80; |
5 |
ny=42; |
6 |
nz=8; |
7 |
% Nominal depth of model (meters) |
8 |
H=4500; |
9 |
% Scale of bump (m) |
10 |
L=25e3; |
11 |
% Height of bump (m) |
12 |
dh=0.90*H; |
13 |
% Horizontal resolution (m) |
14 |
dx=5e3; |
15 |
% Rotation |
16 |
f=1e-4; |
17 |
% Stratification |
18 |
N=1.5 * f*L/H; |
19 |
|
20 |
% Gravity |
21 |
g=9.81; |
22 |
% E.O.S. |
23 |
alpha=2.e-4; |
24 |
|
25 |
Tz=N^2/(g*alpha) |
26 |
|
27 |
dz=H/nz; |
28 |
sprintf('delZ = %d * %7.6g,',nz,dz) |
29 |
|
30 |
x=(1:nx)*dx;x=x-mean(x); |
31 |
y=(1:ny)*dx;y=y-mean(y); |
32 |
z=-dz/2:-dz:-H; |
33 |
|
34 |
[Y,X]=meshgrid(y,x); |
35 |
|
36 |
% Temperature profile |
37 |
[sprintf('Tref =') sprintf(' %8.6g,',Tz*z-mean(Tz*z))] |
38 |
|
39 |
% Gaussian bump |
40 |
h=-H+dh*exp( -(X.^2+Y.^2)/(2*(L^2)) ); |
41 |
f77write('topog.bump',h,'real*8','b'); |
42 |
|
43 |
% Side walls + bump |
44 |
h(:,1)=0; |
45 |
h(:,ny)=0; |
46 |
f77write('topog.bumpchannel',h,'real*8','b'); |
47 |
|
48 |
% Simple channel |
49 |
h(:,1)=0; |
50 |
h(:,2:ny)=0; |
51 |
h(:,ny)=0; |
52 |
f77write('topog.channel',h,'real*8','b'); |