1 |
clear |
2 |
clear path |
3 |
whos |
4 |
global Nx Ny Nz |
5 |
global lat long dz dm mdep |
6 |
global delt_su su_its t_su delt |
7 |
global descriptor this_path |
8 |
global f deltaf Q beta r_expt r_heat H |
9 |
global time rots it |
10 |
global g Cp rho_bar alpha |
11 |
global w3d |
12 |
global iterations |
13 |
|
14 |
|
15 |
param_file_name = ... |
16 |
input(' Please enter the name of the m-file with the parameters for this run : ','s') ; |
17 |
feval(param_file_name) ; |
18 |
path = this_path |
19 |
cmdstr=['cd ' path ]; |
20 |
eval(cmdstr); |
21 |
path=pwd |
22 |
|
23 |
figure;hold on |
24 |
|
25 |
sizeit=size(iterations); |
26 |
%centralw=zeros(sizeit(1),Nz+1); |
27 |
centralw=zeros(sizeit(1),Nz); |
28 |
|
29 |
for i=1:sizeit(1) |
30 |
ufilename=(['U.' iterations((i),1:10) ]); |
31 |
vfilename=(['V.' iterations((i),1:10) ]); |
32 |
u=rdmeta(ufilename,'b'); |
33 |
v=rdmeta(vfilename,'b'); |
34 |
w=zeros(Nx,Ny,Nz+1); |
35 |
for k=Nz:-1:1, |
36 |
w(1:Nx-1,1:Ny-1,k)= w(1:Nx-1,1:Ny-1,k+1)... |
37 |
-u(2:Nx,1:Ny-1,k)*dz(k)/dm +u(1:Nx-1,1:Ny-1,k)*dz(k)/dm ... |
38 |
-v(1:Nx-1,2:Ny,k)*dz(k)/dm +v(1:Nx-1,1:Ny-1,k)*dz(k)/dm ; |
39 |
end |
40 |
%centralw(i,:)=w(Nx/2,Ny/2,:); |
41 |
centralw(i,:)=w(Nx/2,3*Ny/4,1:Nz); |
42 |
plot(eval(iterations((i),1:10)),centralw(i,Nz/2),'o');drawnow |
43 |
% centralw(i,:)=w(Nx/2,Ny/2,1:Nz); |
44 |
% plot(eval(iterations((i),1:10)),centralw(i,:),'o');drawnow |
45 |
end |
46 |
|
47 |
title(descriptor) |
48 |
xlabel('timestep') |
49 |
ylabel('central mid-depth w (m/s)') |
50 |
grid |
51 |
|