/[MITgcm]/MITgcm_contrib/timour_matlab/mscripts/radialevolution.m
ViewVC logotype

Annotation of /MITgcm_contrib/timour_matlab/mscripts/radialevolution.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed Sep 3 21:22:22 2003 UTC (21 years, 10 months ago) by edhill
Branch: MAIN
CVS Tags: HEAD
initial checkin of Timour's MatLAB scripts

1 edhill 1.1 clear
2     clear path
3    
4     global Nx Ny Nz
5     global lat long dz dm mdep
6     global delt_su su_its t_su delt
7     global descriptor this_path
8     global f deltaf Q beta r_expt r_heat H
9     global time rots it
10     global g Cp rho_bar alpha
11     global u v t w
12     global iterations
13    
14    
15     param_file_name = ...
16     input(' Please enter the name of the m-file with the parameters for this run : ','s') ;
17     feval(param_file_name) ;
18    
19     iterations
20    
21     itstart = input(' Please enter start iteration : ','s')
22     itend = input(' Please enter end iteration : ','s')
23     radmean = input(' Please enter radius of mean in gridpoints (ie 42) : ')
24    
25     sizeit=size(iterations);
26     for i=1:sizeit(1)
27     iter(i)=eval(iterations(i,1:10));
28     end
29     nitstart=find(iter==eval(itstart))
30     nitend=find(iter==eval(itend))
31    
32    
33    
34     path = this_path
35     cmdstr=['cd ' path ];
36     eval(cmdstr);
37     path=pwd
38    
39     sumtheta=zeros(Nx,Ny,Nz);
40     counter=0;
41    
42     % create circular sampling rings
43    
44    
45     Nn=Nx/2;
46    
47     rad=[1:1:(Nn-1)];
48     ring=ones(Nx,Ny,Nz);
49     weight=zeros(1,Nn-1);
50     radialmean=zeros(1,Nn-1);
51     XCenter = (Nx+1)/2 ;
52     YCenter = (Ny+1)/2 ;
53    
54    
55     for k=1:Nn-1
56     for i=1:Nx
57     for j=1:Ny
58     radius(i,j) = sqrt((i-XCenter)^2+(j-YCenter)^2);
59     end
60     end
61     radius(find( round(radius) > (k+1) ))=radius(find (round(radius) > (k+1) ))*0;
62     radius(find( round(radius) < (k) ))=radius(find (round(radius) < (k) ))*0;
63     radius(find(radius>0))=1.0;
64     ring(:,:,k)=radius;
65     weight(:,k)=length(find(ring(:,:,k) > 0));
66     end
67    
68     for i=nitstart:nitend
69     tfilename=(['T.' iterations((i),1:10) ]) ;
70     t=rdmeta(tfilename,'b');
71     for j=1:30
72     tring=t(:,:,j).*ring(:,:,radmean);
73     meant(j)=sum(sum(tring))/weight(radmean);
74     end
75     sumtheta=sumtheta+meant;
76     counter=counter+1;
77     end
78    
79    
80     plot(meant,mdep,'o-')

  ViewVC Help
Powered by ViewVC 1.1.22