| 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 |
| 16 |
for k=1:Nz |
| 17 |
k |
| 18 |
figure(1) |
| 19 |
uxy=u(:,:,k); |
| 20 |
ubx=(uxy(1:(Nx-1),:)+uxy(2:Nx,:))*0.5; |
| 21 |
ubx(Nx,:)=(uxy(Nx,:)+uxy(1,:))*0.5; |
| 22 |
uxy(find(uxy==0))=uxy(find(uxy==0))*NaN; |
| 23 |
ubx(find(ubx==0))=ubx(find(ubx==0))*NaN; |
| 24 |
% V |
| 25 |
vxy=v(:,:,k); |
| 26 |
vby=(vxy(:,1:(Ny-1))+vxy(:,2:Ny))*0.5; |
| 27 |
vby(:,Ny)=(vxy(:,1)+vxy(:,Ny))*0.5; |
| 28 |
vxy(find(vxy==0))=vxy(find(vxy==0))*NaN; |
| 29 |
vby(find(vby==0))=vby(find(vby==0))*NaN; |
| 30 |
|
| 31 |
% Scale arrow |
| 32 |
ubx(6,6) = 0.01; |
| 33 |
vby(6,6) = 0.0; |
| 34 |
[x,y]=meshgrid(long(2:4:Nx-2),lat(2:4:Ny-2)); |
| 35 |
quiver(x,y,ubx((2:4:Nx-2),(2:4:Ny-2))',vby((2:4:Nx-2),(2:4:Ny-2))',2); axis square |
| 36 |
title(['speed timestep ' num2str(eval(it)) ' level ' int2str(k) ]); |
| 37 |
text(6,8,'1 cm/s') |
| 38 |
set(gca,'Xlim',[0,max(long)]); |
| 39 |
set(gca,'Ylim',[0,max(lat)]); |
| 40 |
drawnow |
| 41 |
end |
| 42 |
return |