1 |
function flow |
2 |
clear |
3 |
clear path |
4 |
whos |
5 |
global Nx Ny Nz |
6 |
global lat long dz dm mdep |
7 |
global delt_su su_its t_su delt |
8 |
global descriptor this_path |
9 |
global f deltaf Q beta r_expt r_heat H |
10 |
global time rots it |
11 |
global g Cp rho_bar alpha |
12 |
global u v t w |
13 |
global iterations |
14 |
|
15 |
figure;k=1; |
16 |
uxy=u(:,:,k); |
17 |
ubx=(uxy(1:(Nx-1),:)+uxy(2:Nx,:))*0.5; |
18 |
ubx(Nx,:)=(uxy(Nx,:)+uxy(1,:))*0.5; |
19 |
uxy(find(uxy==0))=uxy(find(uxy==0))*NaN; |
20 |
ubx(find(ubx==0))=ubx(find(ubx==0))*NaN; |
21 |
% V |
22 |
vxy=v(:,:,k); |
23 |
vby=(vxy(:,1:(Ny-1))+vxy(:,2:Ny))*0.5; |
24 |
vby(:,Ny)=(vxy(:,1)+vxy(:,Ny))*0.5; |
25 |
vxy(find(vxy==0))=vxy(find(vxy==0))*NaN; |
26 |
vby(find(vby==0))=vby(find(vby==0))*NaN; |
27 |
|
28 |
% Scale arrow |
29 |
ubx(6,6) = 0.01; |
30 |
vby(6,6) = 0.0; |
31 |
% [x,y]=meshgrid(long(2:4:Ny-2),lat(2:4:Nx-2)); |
32 |
[x,y]=meshgrid(long,lat); |
33 |
% quiver(x,y,ubx((2:4:Nx-2),(2:4:Ny-2))',vby((2:4:Nx-2),(2:4:Ny-2))',2); axis square |
34 |
quiver(x,y,ubx,vby,2); axis square |
35 |
title(['speed timestep ' num2str(eval(it)) ' level ' int2str(k) ]); |
36 |
text(6,8,'1 cm/s') |
37 |
set(gca,'Xlim',[0,max(long)]); |
38 |
set(gca,'Ylim',[0,max(lat)]); |
39 |
drawnow |
40 |
return |