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 ps 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 %it = input(' Please enter iteration : ','s') %path = this_path %cmdstr=['cd ' path ]; %eval(cmdstr); %path=pwd %psfilename=(['PS.' it ]); %ps=rdmds(psfilename,'b'); %tfilename=(['T.' it ]); %t=rdmds(tfilename,'b'); sum=zeros(Nx,Ny); for k=Nz:-1:1, sum=sum-dz*0.0002*(t(:,:,k)-20); % sum=sum-9.8*dz*0.0002*(t(:,:,k)-20); % sum=sum+999.8*9.8*dz*0.0002*(t(:,:,k)-20); end psb=sum+ps; cmax=max(max(ps)); cmin=min(min(ps)); V=[cmin cmax]; V1=[0 -min(min(sum))]; caxis('manual') subplot(1,2,1) title='bottom pressure'; imagesc(lat,long,psb');shading flat;axis image;caxis(V);colorbar('horizontal'); set(gca,'ydir','norm') % text(150,140,descriptor); text(0,140,title); text(0,-40,'timestep');text(100,-40,num2str(it)); subplot(1,2,2) title='surface pressure'; imagesc(lat,long,ps');shading flat;axis image;caxis(V);colorbar('horizontal'); set(gca,'ydir','norm') text(0,140,title); figure caxis('manual') title='baroclinic pressure'; imagesc(lat,long,-sum');shading flat;axis image;caxis(V1);colorbar('vertical'); set(gca,'ydir','norm') % text(80,130,descriptor); text(0,130,title); text(0,-20,'timestep');text(50,-20,num2str(it));