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

Contents of /MITgcm_contrib/timour_matlab/mscripts/meant.m

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


Revision 1.1 - (show 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 clear path
2
3 global Nx Ny Nz
4 global lat long dz dm mdep
5 global delt_su su_its t_su delt
6 global descriptor this_path
7 global f deltaf Q beta r_expt r_heat H
8 global time rots it
9 global g Cp rho_bar alpha
10 global u v t w
11 global iterations
12
13
14 param_file_name = ...
15 input(' Please enter the name of the m-file with the parameters for this run : ','s') ;
16 feval(param_file_name) ;
17
18
19 iterations
20
21 itstart = input(' Please enter start iteration : ','s')
22 itend = input(' Please enter end iteration : ','s')
23
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 path = this_path
33 cmdstr=['cd ' path ];
34 eval(cmdstr);
35 path=pwd
36
37 sumtheta=zeros(Nx,Ny/2,Nz);
38 counter=0;
39
40 for i=nitstart:nitend
41 tfilename=(['T.' iterations((i),1:10) ]) ;
42 t=rdmds(tfilename,'b');
43 sumtheta=sumtheta+t;
44 counter=counter+1;
45 end
46 meantheta=sumtheta/counter;
47
48 cmin=21;
49 cmax=31;
50 V=[cmin cmax];
51 V1=[0 2];
52 caxis('manual')
53
54 subplot(1,2,1)
55 title='average temperature at z=5';
56 imagesc(lat,long,squeeze(meantheta(:,:,5))');shading flat;axis image;colorbar('horizontal');
57 set(gca,'ydir','norm')
58 text(0,-30,descriptor);text(50,-30,num2str(nitend-nitstart+1));text(80,-30,'files');
59 text(0,140,title);
60 % text(0,-20,'from timestep');text(50,-20,num2str(itstart));
61 % text(0,-10,'to'); text(50,-10,num2str(itend));
62
63 subplot(1,2,2)
64 % contour(flipud(squeeze(meantheta(1:Nx-1,Ny/2,:))'),25);grid;colorbar;
65 contour(flipud(squeeze(meantheta(:,Ny/2,3:Nz))'),50);colorbar;grid
66 text(0,-2,'average temperature at mid-tank')
67 tmax=max(max(meantheta(:,:,2)));
68 [I,J]=find(meantheta(:,:,2)==tmax);
69 %figure
70 %caxis('manual')
71 %
72 %ff=zeros(Nx,Ny,Nz);
73 %for j=1:Ny
74 %ff(:,j,:)=f+beta*dm*(j-1);
75 %end
76 %
77 %subplot(1,2,1)
78 % title='average temperature at z=3';
79 % imagesc(lat,long,squeeze(meantheta(:,:,3))');shading flat;axis image;caxis(V);
80 %colorbar('horizontal');
81 % set(gca,'ydir','norm')
82 % text(0,-30,descriptor);text(50,-30,num2str(nitend-nitstart+1));text(80,-
83 %30,'files');
84 % text(0,140,title);
85
86 %subplot(1,2,2)
87 % contour(flipud(squeeze(meantheta(:,J,:))'),50);caxis(V);colorbar;grid
88 % text(0,-2,'average temperature across the warmest point')
89

  ViewVC Help
Powered by ViewVC 1.1.22