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

Contents of /MITgcm_contrib/timour_matlab/mscripts/getTWcorrectionetc2.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, 11 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
19 iterations
20
21 it = input(' Please enter iteration : ','s')
22
23 path = this_path
24 cmdstr=['cd ' path ];
25 eval(cmdstr);
26 path=pwd
27
28 mufilename = (['TWcorrectionu.' it ]);
29 mvfilename = (['TWcorrectionv.' it ]);
30 ufilename = (['U.' it ]);
31 vfilename = (['V.' it ]);
32 tfilename = (['T.' it ]);
33 udfilename = (['Udsk.' it ]);
34 vdfilename = (['Vdsk.' it ]);
35 usfilename = (['Uspin.' it ]);
36 vsfilename = (['Vspin.' it ]);
37 unumfilename = (['UdminusU.' it ]);
38 udenfilename = (['UdminusUs.' it ]);
39 vnumfilename = (['VdminusV.' it ]);
40 vdenfilename = (['VdminusVs.' it ]);
41 mudgeu = rdmeta(mufilename,'b');
42 mudgev = rdmeta(mvfilename,'b');
43 udisk = rdmeta(udfilename,'b');
44 vdisk = rdmeta(vdfilename,'b');
45 uspin = rdmeta(usfilename,'b');
46 vspin = rdmeta(vsfilename,'b');
47 unum = rdmeta(unumfilename,'b');
48 vnum = rdmeta(vnumfilename,'b');
49 uden = rdmeta(udenfilename,'b');
50 vden = rdmeta(vdenfilename,'b');
51 u = rdmeta(ufilename,'b');
52 v = rdmeta(vfilename,'b');
53 t = rdmeta(tfilename,'b');
54
55 w=zeros(Nx,Ny,Nz+1);
56 dx=dm;
57 dy=dm;
58
59 for k=Nz:-1:1,
60 w(1:Nx-1,1:Ny-1,k)= w(1:Nx-1,1:Ny-1,k+1)...
61 -u(2:Nx,1:Ny-1,k)*dz(k)/dx +u(1:Nx-1,1:Ny-1,k)*dz(k)/dx ...
62 -v(1:Nx-1,2:Ny,k)*dz(k)/dy +v(1:Nx-1,1:Ny-1,k)*dz(k)/dy ;
63 end
64 udminusu=udisk-u(:,:,1);
65 udminusus=udisk-uspin;
66 vdminusv=vdisk-v(:,:,1);
67 vdminusvs=vdisk-vspin;
68 figure
69 subplot(4,4,1);pcolor(udisk);axis square;colorbar;shading flat;
70 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('udisk');
71
72 subplot(4,4,2);pcolor(vdisk);axis square;colorbar;shading flat
73 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('vdisk')
74
75 subplot(4,4,3);pcolor(sqrt(vdisk.*vdisk+udisk.*udisk));axis square;colorbar;shading flat
76 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('diskspeed')
77
78 subplot(4,4,4);pcolor(vspin);axis square;colorbar;shading flat
79 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('vspin')
80
81 subplot(4,4,5);pcolor(uspin);axis square;colorbar;shading flat
82 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('uspin')
83
84 subplot(4,4,6);pcolor(sqrt(vspin.*vspin+uspin.*uspin));axis square;colorbar;shading flat
85 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('spinspeed')
86
87 subplot(4,4,7);pcolor(mudgeu);axis square;colorbar;shading flat
88 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('mudgeu')
89
90 subplot(4,4,8);pcolor(mudgev);axis square;colorbar;shading flat
91 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('mudgev')
92
93 subplot(4,4,9);pcolor(u(:,:,1));axis square;colorbar;shading flat
94 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('u')
95
96 subplot(4,4,10);pcolor(v(:,:,1));axis square;colorbar;shading flat
97 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('v')
98
99 subplot(4,4,11);pcolor(sqrt(v(:,:,1).*v(:,:,1)+u(:,:,1).*u(:,:,1)));axis square;colorbar;shading flat
100 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('speed')
101 subplot(4,4,12);pcolor(udminusu);axis square;colorbar;shading flat
102 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('udminusu')
103 subplot(4,4,13);pcolor(udminusus);axis square;colorbar;shading flat
104 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('udminusus')
105 subplot(4,4,14);pcolor(vdminusv);axis square;colorbar;shading flat
106 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('vdminusv')
107 subplot(4,4,15);pcolor(vdminusvs);axis square;colorbar;shading flat
108 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('vdminusvs')
109 subplot(4,4,16);set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]); title(descriptor)
110
111 figure
112 subplot(2,2,1),pcolor(unum);axis square;colorbar;shading flat;
113 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('unumerator')
114 subplot(2,2,2),pcolor(vnum);axis square;colorbar;shading flat;
115 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('vnumerator')
116 subplot(2,2,3),pcolor(uden);axis square;colorbar;shading flat;
117 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('udenominator')
118 subplot(2,2,4),pcolor(vden);axis square;colorbar;shading flat;
119 set(gca,'XTickLabel',[]);set(gca,'YTickLabel',[]);title('vdenominator')

  ViewVC Help
Powered by ViewVC 1.1.22