1 |
adcroft |
1.2 |
nx=80;ny=1;nz=30; |
2 |
|
|
H=4200; |
3 |
|
|
z0=400; |
4 |
adcroft |
1.1 |
|
5 |
adcroft |
1.2 |
disp('Constant DZ') |
6 |
|
|
dz=H/nz*ones(1,nz); |
7 |
|
|
zf=cumsum([0 -dz]); zc=(zf(1:end-1)+zf(2:end))/2; |
8 |
|
|
disp(['delZ=' sprintf('%4.0f.,',dz)]) |
9 |
|
|
t0=30+10/4000*zc; |
10 |
|
|
disp('Linear T') |
11 |
|
|
disp(['tRef=' sprintf('%2.5f,',t0)]) |
12 |
|
|
t0=20+20*exp(zc/300);t0(find(zc>=-z0))=max( t0(find(zc<-z0)) ); |
13 |
|
|
disp('Expontential T') |
14 |
|
|
disp(['tRef=' sprintf('%2.5f,',t0)]) |
15 |
adcroft |
1.1 |
|
16 |
adcroft |
1.2 |
disp('Variable DZ') |
17 |
|
|
dz=gen_dz(nz,H,10,300); |
18 |
|
|
zf=cumsum([0 -dz]); zc=(zf(1:end-1)+zf(2:end))/2; |
19 |
|
|
disp(['delZ=' sprintf('%4.0f.,',dz)]) |
20 |
|
|
t0=30+10/4000*zc; |
21 |
|
|
disp('Linear T') |
22 |
|
|
disp(['tRef=' sprintf('%2.5f,',t0)]) |
23 |
adcroft |
1.1 |
|
24 |
adcroft |
1.2 |
subplot(121) |
25 |
|
|
plot(t0,zc) |
26 |
|
|
xlabel('T (^oC)');ylabel('Depth (m)') |
27 |
|
|
set(gca,'Fontsize',14) |
28 |
|
|
axis([19.5 30.5 -4000 0]) |
29 |
|
|
print -djpeg100 -r90 t0lin.jpg |
30 |
|
|
print -depsc2 t0lin.eps |
31 |
|
|
|
32 |
|
|
disp('Expontential T') |
33 |
|
|
t0=20+20*exp(zc/300);t0(find(zc>=-z0))=max( t0(find(zc<-z0)) ); |
34 |
|
|
disp(['tRef=' sprintf('%2.5f,',t0)]) |
35 |
|
|
|
36 |
|
|
plot(t0([1:end end]),[zc zf(end)]) |
37 |
|
|
xlabel('T (^oC)');ylabel('Depth (m)') |
38 |
|
|
set(gca,'Fontsize',14) |
39 |
|
|
axis([19.5 24.5 -4200 0]) |
40 |
|
|
print -djpeg100 -r90 t0exp.jpg |
41 |
|
|
print -depsc2 t0exp.eps |