1 | function reconstitution_ER_rossby_df(ndmin, ndmax) |
---|
2 | % reconstitution_ER_rossby_df ++explication between ndmin days and ndmax days |
---|
3 | |
---|
4 | %+ |
---|
5 | % module |
---|
6 | % ====== |
---|
7 | % |
---|
8 | % ++ |
---|
9 | % |
---|
10 | % DESCRIPTION |
---|
11 | % =========== |
---|
12 | % |
---|
13 | % plot ++ from file eof_rossby_jjas_2006_10-30d.mat, |
---|
14 | % produce a ASCII file eof12_rossby_10-30d.txt, |
---|
15 | % produce 3 Postscript files reconstitution1_eof12_filtreER_10-30d.eps |
---|
16 | % |
---|
17 | % EXAMPLES |
---|
18 | % ======== |
---|
19 | % |
---|
20 | % Following line read eof_rossby_jjas_2006_10-30d.mat, produce an ASCII file |
---|
21 | % eof12_rossby_10-30d.txt, produce 3 Postscript files |
---|
22 | % reconstitution1_eof12_filtreER_10-30d.eps. |
---|
23 | % :: |
---|
24 | % |
---|
25 | % >> reconstitution_ER_rossby_df(10,30); |
---|
26 | % |
---|
27 | % SEE ALSO |
---|
28 | % ======== |
---|
29 | % |
---|
30 | % carte_eof_ER_jjas_df.m_ |
---|
31 | % |
---|
32 | % .. _carte_eof_ER_jjas_df.m : carte_eof_ER_jjas_df.m.html |
---|
33 | % |
---|
34 | % carte_eofER_1030_article.m_ |
---|
35 | % |
---|
36 | % .. _carte_eofER_1030_article.m : carte_eofER_1030_article.m.html |
---|
37 | % |
---|
38 | % time_serie_ER_rossby_df.m_ |
---|
39 | % |
---|
40 | % .. _time_serie_ER_rossby_df.m : time_serie_ER_rossby_df.m.html |
---|
41 | % |
---|
42 | % time_serie_ER_rossby_df_complet.m_ |
---|
43 | % |
---|
44 | % .. _time_serie_ER_rossby_df_complet.m : time_serie_ER_rossby_df_complet.m.html |
---|
45 | % |
---|
46 | % TODO |
---|
47 | % ==== |
---|
48 | % |
---|
49 | % improve description |
---|
50 | % |
---|
51 | % improve file pb |
---|
52 | % |
---|
53 | % use return function |
---|
54 | % |
---|
55 | % clean variables and plot |
---|
56 | % |
---|
57 | % EVOLUTIONS |
---|
58 | % ========== |
---|
59 | % |
---|
60 | % $Id$ |
---|
61 | % |
---|
62 | % - fplod 2009-01-28T07:50:45Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
63 | % |
---|
64 | % * created from reconstitution_ER_rossby_1030.m to replace it as well as |
---|
65 | % reconstitution_ER_rossby_30100.m |
---|
66 | % |
---|
67 | % Days will be now written ``ndmin``\-``ndmaxd`` (ex: 10-30d) in filenames. |
---|
68 | % |
---|
69 | %- |
---|
70 | |
---|
71 | global IRCAAM_ID; |
---|
72 | global IRCAAM_OD; |
---|
73 | |
---|
74 | if nargin==2 |
---|
75 | % ndmin must be lower than ndmax |
---|
76 | if (ndmin > ndmax) |
---|
77 | disp(['ndmin = ', int2str(ndmin)]); |
---|
78 | disp(['ndmax = ', int2str(ndmax)]); |
---|
79 | error('eee : ndmin must be lower than ndmax'); |
---|
80 | end |
---|
81 | else |
---|
82 | usage='usage : reconstitution_ER_rossby_df(ndmin, ndmax)'; |
---|
83 | disp(usage); |
---|
84 | error('eee : wrong arguments numbers') |
---|
85 | end |
---|
86 | % ndmin and ndmax will be used in xx-yyd form in filenames |
---|
87 | df = [int2str(ndmin),'-',int2str(ndmax),'d']; |
---|
88 | clear ndmin; |
---|
89 | clear ndmax; |
---|
90 | |
---|
91 | close all; |
---|
92 | |
---|
93 | %lon=[-30:2.5:30], lat=[-10:2.5:30] |
---|
94 | |
---|
95 | fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat']; |
---|
96 | status=load(fullfilename,'C','olr'); |
---|
97 | clear fullfilename; |
---|
98 | |
---|
99 | C=status.C; |
---|
100 | olr=status.olr; |
---|
101 | clear status; |
---|
102 | |
---|
103 | olr=olr'; |
---|
104 | PC1=olr*C; |
---|
105 | |
---|
106 | cosa=zeros(3,3416,425); |
---|
107 | % boucle sur les VP |
---|
108 | for a=1:3; |
---|
109 | for b=1:3416 % boucle sur le temps |
---|
110 | for c=1:425 % boucle sur l espace |
---|
111 | cosa(a,b,c)=PC1(b,426-a)*C(c,426-a); |
---|
112 | end; |
---|
113 | end; |
---|
114 | end; |
---|
115 | |
---|
116 | cosa1(:,:)=cosa(1,:,:); |
---|
117 | cosa1=reshape(cosa1,3416,25,17); |
---|
118 | |
---|
119 | cosa2(:,:)=cosa(2,:,:); |
---|
120 | cosa2=reshape(cosa2,3416,25,17); |
---|
121 | |
---|
122 | cosabis=cosa(1:2,:,:); |
---|
123 | cosa12(:,:)=sum(cosabis); |
---|
124 | clear cosabis; |
---|
125 | cosa12=reshape(cosa12,3416,25,17); |
---|
126 | |
---|
127 | figure(1); |
---|
128 | orient('landscape') |
---|
129 | figure(2); |
---|
130 | orient('landscape') |
---|
131 | figure(3); |
---|
132 | orient('landscape') |
---|
133 | |
---|
134 | % On selectionne la demaine geographique |
---|
135 | |
---|
136 | % la latitude : 7.5N (8) 12.5N (10) |
---|
137 | % la longitude : 10W (9) 10E(17) |
---|
138 | lat1=8; |
---|
139 | lat2=10; |
---|
140 | lon1=9; |
---|
141 | lon2=17; |
---|
142 | taille=(lat2-lat1+1)*(lon2-lon1+1); |
---|
143 | |
---|
144 | cosa12=cosa12(:,lon1:lon2,lat1:lat2); |
---|
145 | clear cosi2; |
---|
146 | cosa12=reshape(cosa12,3416,taille); |
---|
147 | cosa12=cosa12'; |
---|
148 | cosa12=mean(cosa12); |
---|
149 | cosa12=cosa12'; |
---|
150 | |
---|
151 | fullfilename=[IRCAAM_ID,'eof12_rossby_',df,'.txt']; |
---|
152 | save(fullfilename,'cosa12','-ASCII'); |
---|
153 | clear fullfilename; |
---|
154 | |
---|
155 | cosa12=reshape(cosa12,122,28); |
---|
156 | |
---|
157 | % On selectionne la demaine geographique |
---|
158 | olr=reshape(olr,3416,25,17); |
---|
159 | cosa4=olr(:,lon1:lon2,lat1:lat2); |
---|
160 | clear olr; |
---|
161 | cosa4=reshape(cosa4,3416,taille); |
---|
162 | clear taille; |
---|
163 | cosa4=cosa4'; |
---|
164 | cosa4=mean(cosa4); |
---|
165 | cosa4=cosa4'; |
---|
166 | cosa4=reshape(cosa4,122,28); |
---|
167 | |
---|
168 | for a=1:28; |
---|
169 | if a<12; |
---|
170 | figure(1); |
---|
171 | subplot(4,3,a); |
---|
172 | elseif a<24 |
---|
173 | figure(2); |
---|
174 | subplot(4,3,a-11); |
---|
175 | else |
---|
176 | figure(3); |
---|
177 | subplot(4,3,a-23); |
---|
178 | end; |
---|
179 | y2=cosa12(:,a); |
---|
180 | y4=cosa4(:,a); |
---|
181 | x=[1:122]'; |
---|
182 | plot(x,y2); |
---|
183 | hold on; |
---|
184 | plot(x,y4,'k'); |
---|
185 | y5=zeros(122,1); |
---|
186 | plot(x,y5,'k:'); |
---|
187 | |
---|
188 | title(a+1978,'Fontsize',8); |
---|
189 | if a==2; |
---|
190 | text(0,65,'OLR 5 -17.5N et 10W - 10E'); |
---|
191 | elseif a==13; |
---|
192 | text(0,65,'OLR 5 - 17.5N et 10W - 10E'); |
---|
193 | end; |
---|
194 | set (gca,'tickDir','out'); |
---|
195 | if a==11; |
---|
196 | aa=legend('OLR VP1-2','OLR NOAA'); |
---|
197 | set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.1270 0.1642]) |
---|
198 | legend boxoff; |
---|
199 | elseif a==22; |
---|
200 | clear aa; |
---|
201 | aa=legend('OLR VP1-2','OLR NOAA'); |
---|
202 | set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.1270 0.1642]) |
---|
203 | legend boxoff; |
---|
204 | end; |
---|
205 | axis([1 122 -15 15]); |
---|
206 | set (gca,'YTick',[-15:5:15],'YTickLabel',[-15:5:15],'fontname','Arial','fontsize',6); |
---|
207 | set (gca,'XTick',[10:10:122],'XTickLabel',[10:10:122],'fontname','Arial','fontsize',6); |
---|
208 | |
---|
209 | end; |
---|
210 | |
---|
211 | figure(1); |
---|
212 | fullfilename=[IRCAAM_OD,'reconstitution1_eof12_filtreER_',df,'.eps']; |
---|
213 | print('-depsc2',fullfilename); |
---|
214 | clear fullfilename; |
---|
215 | |
---|
216 | figure(2); |
---|
217 | fullfilename=[IRCAAM_OD,'reconstitution2_eof12_filtreER_',df,'.eps']; |
---|
218 | print('-depsc2',fullfilename); |
---|
219 | clear fullfilename; |
---|
220 | |
---|
221 | figure(3); |
---|
222 | fullfilename=[IRCAAM_OD,'reconstitution3_eof12_filtreER_',df,'.eps']; |
---|
223 | print('-depsc2',fullfilename); |
---|
224 | clear fullfilename; |
---|