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 sumtheta=zeros(Nx,Ny/2,Nz); counter=0; for i=nitstart:nitend tfilename=(['T.' iterations((i),1:10) ]) ; t=rdmds(tfilename,'b'); sumtheta=sumtheta+t; counter=counter+1; end meantheta=sumtheta/counter; cmin=21; cmax=31; V=[cmin cmax]; V1=[0 2]; caxis('manual') subplot(1,2,1) title='average temperature at z=5'; imagesc(lat,long,squeeze(meantheta(:,:,5))');shading flat;axis image;colorbar('horizontal'); set(gca,'ydir','norm') text(0,-30,descriptor);text(50,-30,num2str(nitend-nitstart+1));text(80,-30,'files'); text(0,140,title); % text(0,-20,'from timestep');text(50,-20,num2str(itstart)); % text(0,-10,'to'); text(50,-10,num2str(itend)); subplot(1,2,2) % contour(flipud(squeeze(meantheta(1:Nx-1,Ny/2,:))'),25);grid;colorbar; contour(flipud(squeeze(meantheta(:,Ny/2,3:Nz))'),50);colorbar;grid text(0,-2,'average temperature at mid-tank') tmax=max(max(meantheta(:,:,2))); [I,J]=find(meantheta(:,:,2)==tmax); %figure %caxis('manual') % %ff=zeros(Nx,Ny,Nz); %for j=1:Ny %ff(:,j,:)=f+beta*dm*(j-1); %end % %subplot(1,2,1) % title='average temperature at z=3'; % imagesc(lat,long,squeeze(meantheta(:,:,3))');shading flat;axis image;caxis(V); %colorbar('horizontal'); % set(gca,'ydir','norm') % text(0,-30,descriptor);text(50,-30,num2str(nitend-nitstart+1));text(80,- %30,'files'); % text(0,140,title); %subplot(1,2,2) % contour(flipud(squeeze(meantheta(:,J,:))'),50);caxis(V);colorbar;grid % text(0,-2,'average temperature across the warmest point')