/[MITgcm]/MITgcm_contrib/high_res_cube/eddy_flux/from_Dimitris/Commands.m
ViewVC logotype

Annotation of /MITgcm_contrib/high_res_cube/eddy_flux/from_Dimitris/Commands.m

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


Revision 1.1 - (hide annotations) (download)
Tue Aug 3 15:54:26 2004 UTC (20 years, 11 months ago) by edhill
Branch: MAIN
CVS Tags: HEAD
 o sanitizing and checking in parts of the eddy flux diagnostics

1 edhill 1.1
2     % Load grids
3     xcs=rdmds(fullfile(inputDirPath,'XC'));
4     ycs=rdmds(fullfile(inputDirPath,'YC'));
5     xcg=rdmds(fullfile(inputDirPath,'XG'));
6     ycg=rdmds(fullfile(inputDirPath,'YG'));
7     x=rdmds(fullfile(inputDirPath,'XC'));
8     y=rdmds(fullfile(inputDirPath,'YC'));
9    
10     % Load data
11     t=rdmds(fullfile(inputDirPath,'Ttave'),NaN);
12     s=rdmds(fullfile(inputDirPath,'Stave'),NaN);
13    
14     % Plot temperature
15     figure(1)
16     shift=-1;
17     c1=-2;
18     c2=30;
19    
20     grph_CS(sq(t(:,:,1)),xcs,ycs,xcg,ycg,c1,c2,shift)
21     title('Annual average surface temperature (C)');
22    
23     % Plot salinity
24     figure(2)
25     shift=-1;
26     c1=25;
27     c2=40;
28    
29     grph_CS(sq(s(:,:,1)),xcs,ycs,xcg,ycg,c1,c2,shift)
30     title('Annual average surface salinity ');
31    
32    
33     %======================= EH3 =======================
34    
35     clear all, close all
36     tx = 85;
37     ty = 85;
38     nt = 216;
39     cx = 510;
40     cy = 510;
41     nz = 1;
42     % XCS
43     phi = readbin('XC.data',[tx*nt,ty,nz]);
44     foo
45     %%for i = 1:6
46     %% surf(te(:,:,i)), view(2), shading interp
47     %% pause(1)
48     %%end
49     xcs = zeros(6*510,510);
50     for i = 1:6
51     xb = (i-1)*510 + 1; xe = xb + 510 - 1;
52     yb = 1; ye = 510;
53     xcs(xb:xe,yb:ye) = te(:,:,i);
54     end
55     xcs = xcs + -360.0*(xcs > 180.0);
56     clear phi te
57     %%surf(xcs(:,:)'), view(2), axis equal, shading interp
58    
59     % YCS
60     phi = readbin('YC.data',[tx*nt,ty,nz]);
61     foo
62     ycs = zeros(6*510,510);
63     for i = 1:6
64     xb = (i-1)*510 + 1; xe = xb + 510 - 1;
65     yb = 1; ye = 510;
66     ycs(xb:xe,yb:ye) = te(:,:,i);
67     end
68     %%ycs = ycs + -360.0*(ycs > 180.0);
69     %%surf(ycs(:,:)'), view(2), axis equal, shading interp
70    
71     % XGS
72     phi = readbin('XG.data',[tx*nt,ty,nz]);
73     foo
74     xgs = zeros(6*510,510);
75     for i = 1:6
76     xb = (i-1)*510 + 1; xe = xb + 510 - 1;
77     yb = 1; ye = 510;
78     xgs(xb:xe,yb:ye) = te(:,:,i);
79     end
80     xgs = xgs + -360.0*(xgs > 180.0);
81     %%surf(xgs(:,:)'), view(2), axis equal, shading interp
82    
83     % YGS
84     phi = readbin('YG.data',[tx*nt,ty,nz]);
85     foo
86     ygs = zeros(6*510,510);
87     for i = 1:6
88     xb = (i-1)*510 + 1; xe = xb + 510 - 1;
89     yb = 1; ye = 510;
90     ygs(xb:xe,yb:ye) = te(:,:,i);
91     end
92     %%ygs = ygs + -360.0*(ygs > 180.0);
93     %%surf(ygs(:,:)'), view(2), axis equal, shading interp
94     clear phi te
95    
96     [ min(min(xcs)) max(max(xcs)) ; ...
97     min(min(ycs)) max(max(ycs)) ; ...
98     min(min(xgs)) max(max(xgs)) ; ...
99     min(min(ygs)) max(max(ygs)) ; ...
100     ]
101    
102     % ave-1995
103     %
104     phi = readbin('Tave-1995',[tx*nt,ty,nz]);
105     foo
106     %%for i = 1:6
107     %% surf(te(:,:,i)), view(2), shading interp
108     %% pause(2)
109     %%end
110     ta1995 = zeros(6*510,510);
111     for i = 1:6
112     xb = (i-1)*510 + 1; xe = xb + 510 - 1;
113     yb = 1; ye = 510;
114     ta1995(xb:xe,yb:ye) = te(:,:,i);
115     end
116     clear phi te
117     %%surf(ta1995(:,:)'), view(2), axis equal, shading interp
118    
119    
120    
121     % Plot using "grph_CS"
122    
123     shift=-1;
124     c1=0;
125     c2=0;
126     grph_CS(sq(ta1995),xcs,ycs,xgs,ygs,c1,c2,shift)
127     grph_CS(sq(ta1995),xcs,ycs,xgs,ygs,-2,32,shift)

  ViewVC Help
Powered by ViewVC 1.1.22