%clear clear path global Nx Ny Nz global lat long dz dm mdep global delt_su su_its t_su delt global descriptor this_path global f deltaf Q beta r_expt r_heat H global time rots it global g Cp rho_bar alpha global u v t w global iterations param_file_name = ... input(' Please enter the name of the m-file with the parameters for this run : ','s') ; feval(param_file_name) ; iterations itstart = input(' Please enter start iteration : ','s') itend = input(' Please enter end iteration : ','s') sizeit=size(iterations); for i=1:sizeit(1) iter(i)=eval(iterations(i,1:10)); end nitstart=find(iter==eval(itstart)) nitend=find(iter==eval(itend)) path = this_path cmdstr=['cd ' path ]; eval(cmdstr); path=pwd sumw=zeros(Nx,Ny,Nz); counter=0; for i=nitstart:nitend ufilename=(['U.' iterations((i),1:10) ]) ; vfilename=(['V.' iterations((i),1:10) ]) ; wfilename=(['W.' iterations((i),1:10) ]) ; u=rdmds(ufilename,'b'); v=rdmds(vfilename,'b'); w=rdmds(wfilename,'b'); %w=zeros(Nx,Ny,Nz+1); %dx=dm; %dy=dm; % %for k=Nz:-1:1, % w(1:Nx-1,1:Ny-1,k)= w(1:Nx-1,1:Ny-1,k+1)... % -u(2:Nx,1:Ny-1,k)*dz/dx +u(1:Nx-1,1:Ny-1,k)*dz/dx ... % -v(1:Nx-1,2:Ny,k)*dz/dy +v(1:Nx-1,1:Ny-1,k)*dz/dy ; %end sumw=sumw+w; counter=counter+1; end meanw=sumw/counter; cmin=-1.e-4; cmax=1.e-4, V=[cmin cmax]; title='mean vertical velocity at the 4th level from the top'; imagesc(lat,long,squeeze(meanw(:,:,4))');shading flat;axis image;caxis(V);colorbar('horizontal'); set(gca,'ydir','norm') text(0,-30,descriptor); text(0,140,title); text(0,-20,'timestep');text(50,-20,num2str(it)) figure meanw=smooth3(meanw); meanw=smooth3(meanw); meanw=smooth3(meanw); meanw=smooth3(meanw); meanw=smooth3(meanw); meanw=smooth3(meanw); meanw=smooth3(meanw); meanw=smooth3(meanw); meanw=smooth3(meanw); meanw=smooth3(meanw); cmin=-1.e-4; cmax=1.e-4, V=[cmin cmax]; title='mean vertical velocity at the 4th level from the top'; imagesc(lat,long,squeeze(meanw(:,:,4))');shading flat;axis image;caxis(V);colorbar('horizontal'); set(gca,'ydir','norm') text(0,-30,descriptor); text(0,140,title); text(0,-20,'timestep');text(50,-20,num2str(it))