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) ; % compute the E-W asymmetry of the thermocline and its depth 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 sumps=zeros(Nx,Ny); counter=0; for i=nitstart:nitend psfilename=(['PS.' iterations((i),1:10) ]) ; ps=rdmds(psfilename,'b'); sumps=sumps+ps; counter=counter+1; end meanps=sumps/counter; % h=zeros(Nx,Ny); hh=zeros(Nx,1); %t0=input('Enter temperature : ') %meantheta(:,:,Nz)=0.; %for i=1:Nx, %for j=1:Ny, %kk=find(meantheta(i,j,:)1 %h(i,j)=(kk(1)-1)*dz+dz*(meantheta(i,j,kk(1)-1)-t0)/(meantheta(i,j,kk(1)-1)-meantheta(i,j,kk(1))); %else %h(i,j)=0; %end %end %end % hmax=max(max(h)) % [I,J]=find(h==hmax) % NNN=J % NNN=Ny/2+1 % hh=meanps(:,NNN); hmax=max(hh); I=find(hh==hmax) ii=find(hh>0); ii1=size(ii); istart=ii(1) iend=ii(ii1(1)) x0=(I-istart)/(iend-istart) plot(hh);