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

Contents of /MITgcm_contrib/timour_matlab/mscripts/working2.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
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 path = this_path
19 cmdstr=['cd ' path ];
20 eval(cmdstr);
21 path=pwd
22
23 iterations
24
25 % itstart = input(' Please enter start iteration : ','s')
26 itstart='0000002000'
27 sizeit=size(iterations);
28 for i=1:sizeit(1)
29 iter(i)=eval(iterations(i,1:10));
30 end
31 nitstart=find(iter==eval(itstart))
32
33
34 figure;hold on
35
36 for i=nitstart:sizeit(1)-2
37 tfilename=(['T.' iterations((i),1:10) ]);
38 iterations((i),1:10)
39 i
40 t=rdmds(tfilename,'b');
41
42 meantee=mean(mean(mean(t(1:Nx/2,1:Ny-1,1))));
43 meantee1=mean(mean(mean(t(1:Nx-1,1:Ny-1,1:Nz-1))));
44
45 % tval(i)=meantee-meantee1;
46 % tval(i)=meantee1-20;
47
48 tval(i)=max(max(max(t)))-meantee1;
49 % plot(eval(iterations((i),1:10)),tval(i),'.');drawnow
50
51 % time(i)=eval(iterations(i,1:10));
52
53 if i==1
54 time(i)=100;
55 elseif i<=30
56 time(i)=time(i-1)+100;
57 else
58 time(i)=time(i-1)+50;
59 end
60
61 % time(i)=i*50;
62 plot(time(i),tval(i),'.');drawnow
63
64
65 end
66
67
68
69 tcol=tval;
70 title(descriptor)
71 xlabel('timestep')
72 ylabel('central temperature')
73 grid
74
75 computertime=time;
76
77 %save centralt centralt
78 %save iterations iterations
79 %save tcol tcol
80 %save tincol tincol
81 %save mdep mdep
82 save working tcol tincol mdep computertime

  ViewVC Help
Powered by ViewVC 1.1.22