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 sumtheta=zeros(Nx,Ny,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; h=zeros(Nx,Ny); hh=zeros(Nx,1); t0=input('Enter temperature : ') % t0=20.5; 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 % hh=h(:,NNN); hmax=max(hh); I=find(hh==hmax); ii=find(h(:,NNN)>0); ii1=size(ii); istart=ii(1) iend=ii(ii1(1)) x0=(I-istart)/(iend-istart) plot(hh);