1 | % |
---|
2 | |
---|
3 | % initialisation |
---|
4 | clear; |
---|
5 | close all; |
---|
6 | |
---|
7 | % etape 1 :on selectionne les mois d ete (attention aux annees bixestiles!) |
---|
8 | % on compile sous forme d'un seul fichier |
---|
9 | |
---|
10 | hgt500=zeros(122,49,144,28); |
---|
11 | |
---|
12 | siz=31+28+31+30+31+1; |
---|
13 | sizbis=31+28+31+30+31+30+31+31+30; |
---|
14 | ncload('hgt500.1979.nc'); hgt500(:,:,:,1)=hgt(siz:sizbis,1,:,:); clear hgt; |
---|
15 | ncload('hgt500.1980.nc'); hgt500(:,:,:,2)=hgt(siz+1:sizbis+1,1,:,:); clear hgt; |
---|
16 | ncload('hgt500.1981.nc'); hgt500(:,:,:,3)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
17 | ncload('hgt500.1982.nc'); hgt500(:,:,:,4)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
18 | ncload('hgt500.1983.nc'); hgt500(:,:,:,5)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
19 | ncload('hgt500.1984.nc'); hgt500(:,:,:,6)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
20 | ncload('hgt500.1985.nc'); hgt500(:,:,:,7)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
21 | ncload('hgt500.1986.nc'); hgt500(:,:,:,8)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
22 | ncload('hgt500.1987.nc'); hgt500(:,:,:,9)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
23 | ncload('hgt500.1988.nc'); hgt500(:,:,:,10)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
24 | ncload('hgt500.1989.nc'); hgt500(:,:,:,11)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
25 | ncload('hgt500.1990.nc'); hgt500(:,:,:,12)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
26 | ncload('hgt500.1991.nc'); hgt500(:,:,:,13)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
27 | ncload('hgt500.1992.nc'); hgt500(:,:,:,14)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
28 | ncload('hgt500.1993.nc'); hgt500(:,:,:,15)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
29 | ncload('hgt500.1994.nc'); hgt500(:,:,:,16)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
30 | ncload('hgt500.1995.nc'); hgt500(:,:,:,17)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
31 | ncload('hgt500.1996.nc'); hgt500(:,:,:,18)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
32 | ncload('hgt500.1997.nc'); hgt500(:,:,:,19)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
33 | ncload('hgt500.1998.nc'); hgt500(:,:,:,20)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
34 | ncload('hgt500.1999.nc'); hgt500(:,:,:,21)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
35 | ncload('hgt500.2000.nc'); hgt500(:,:,:,22)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
36 | ncload('hgt500.2001.nc'); hgt500(:,:,:,23)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
37 | ncload('hgt500.2002.nc'); hgt500(:,:,:,24)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
38 | ncload('hgt500.2003.nc'); hgt500(:,:,:,25)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
39 | ncload('hgt500.2004.nc'); hgt500(:,:,:,26)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
40 | ncload('hgt500.2005.nc'); hgt500(:,:,:,27)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
41 | ncload('hgt500.2006.nc'); hgt500(:,:,:,28)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
42 | hgt500=hgt500+31265; |
---|
43 | |
---|
44 | clear siz1 siz1bis; |
---|
45 | |
---|
46 | hgt500=permute(hgt500,[1 4 2 3]); |
---|
47 | |
---|
48 | for a=1:122; |
---|
49 | for b=1:28; |
---|
50 | for c=1:49; |
---|
51 | for d=1:144; |
---|
52 | if hgt500(a,b,c,d)==31265; |
---|
53 | hgt500(a,b,c,d)=NaN; |
---|
54 | end; |
---|
55 | end; |
---|
56 | end; |
---|
57 | end; |
---|
58 | end; |
---|
59 | |
---|
60 | hgt1=zeros(122,28,49,144); |
---|
61 | hgt1(:,:,:,1:72)=hgt500(:,:,:,73:144); |
---|
62 | hgt1(:,:,:,73:144)=hgt500(:,:,:,1:72); |
---|
63 | clear hgt500; |
---|
64 | hgt500=hgt1; |
---|
65 | clear hgt1; |
---|
66 | |
---|
67 | hgt1=permute(hgt500,[2 1 3 4]); |
---|
68 | hgt2(:,:,:)=nanmean(hgt1); |
---|
69 | clear hgt1; |
---|
70 | hgt3=reshape(hgt500, 3416,49,144); |
---|
71 | hgt4(:,:)=nanmean(hgt3); |
---|
72 | clear hgt3; |
---|
73 | |
---|
74 | for a=1:122; |
---|
75 | for b=1:28; |
---|
76 | for c=1:37; |
---|
77 | for d=1:144; |
---|
78 | hgt500(a,b,c,d)=hgt500(a,b,c,d)-(hgt2(a,c,d)-hgt4(c,d)); |
---|
79 | end; |
---|
80 | end; |
---|
81 | end; |
---|
82 | end; |
---|
83 | clear hgt2 hgt4; |
---|
84 | |
---|
85 | %%%%%%%%%%%%%%% FICHIER OLR |
---|
86 | status=load('eof12_rossby_1030.txt'); |
---|
87 | eof12_rossby_1030=status; |
---|
88 | clear status; |
---|
89 | ind_olr=reshape(eof12_rossby_1030,122,28); |
---|
90 | clear eof12_rossby_1030 |
---|
91 | k=122*28; |
---|
92 | |
---|
93 | % on calcule l ecart type sur la serie entiere de l OLR |
---|
94 | ind_olr1=reshape(ind_olr, k,1); |
---|
95 | ind_olr2=std(ind_olr1); |
---|
96 | clear ind_olr1; |
---|
97 | |
---|
98 | % GEOPOTENTIEL |
---|
99 | % intialisation des tableaux |
---|
100 | hgt500_filtre_compomax=NaN*ones(60,31,49,144); |
---|
101 | hgt500_filtre_compomin=NaN*ones(60,31,49,144); |
---|
102 | |
---|
103 | compteurmax=0; |
---|
104 | compteurmin=0; |
---|
105 | hgt=hgt500; |
---|
106 | clear hgt500 |
---|
107 | % boucle sur les annees |
---|
108 | for a=1:28; |
---|
109 | clear delta; |
---|
110 | delta=zeros(122,1); |
---|
111 | % boucle sur les jours : on prepare avant |
---|
112 | for b=1:122; |
---|
113 | if b>1; |
---|
114 | delta(b)=ind_olr(b,a)-ind_olr(b-1,a); |
---|
115 | end; |
---|
116 | end; |
---|
117 | % boucle sur les jours |
---|
118 | for b=1:122; |
---|
119 | % 1ere condition (laisser une marge de 10) |
---|
120 | if (b>20 && b<112) |
---|
121 | % cas 1 : max deltas apres negetifs et deltas avant postifs |
---|
122 | if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); |
---|
123 | compteurmax=compteurmax+1; |
---|
124 | hgt500_filtre_compomax(compteurmax,1,:,:)=hgt(b-20,a,:,:); |
---|
125 | hgt500_filtre_compomax(compteurmax,2,:,:)=hgt(b-19,a,:,:); |
---|
126 | hgt500_filtre_compomax(compteurmax,3,:,:)=hgt(b-18,a,:,:); |
---|
127 | hgt500_filtre_compomax(compteurmax,4,:,:)=hgt(b-17,a,:,:); |
---|
128 | hgt500_filtre_compomax(compteurmax,5,:,:)=hgt(b-16,a,:,:); |
---|
129 | hgt500_filtre_compomax(compteurmax,6,:,:)=hgt(b-15,a,:,:); |
---|
130 | hgt500_filtre_compomax(compteurmax,7,:,:)=hgt(b-14,a,:,:); |
---|
131 | hgt500_filtre_compomax(compteurmax,8,:,:)=hgt(b-13,a,:,:); |
---|
132 | hgt500_filtre_compomax(compteurmax,9,:,:)=hgt(b-12,a,:,:); |
---|
133 | hgt500_filtre_compomax(compteurmax,10,:,:)=hgt(b-11,a,:,:); |
---|
134 | |
---|
135 | hgt500_filtre_compomax(compteurmax,11,:,:)=hgt(b-10,a,:,:); |
---|
136 | hgt500_filtre_compomax(compteurmax,12,:,:)=hgt(b-9,a,:,:); |
---|
137 | hgt500_filtre_compomax(compteurmax,13,:,:)=hgt(b-8,a,:,:); |
---|
138 | hgt500_filtre_compomax(compteurmax,14,:,:)=hgt(b-7,a,:,:); |
---|
139 | hgt500_filtre_compomax(compteurmax,15,:,:)=hgt(b-6,a,:,:); |
---|
140 | hgt500_filtre_compomax(compteurmax,16,:,:)=hgt(b-5,a,:,:); |
---|
141 | hgt500_filtre_compomax(compteurmax,17,:,:)=hgt(b-4,a,:,:); |
---|
142 | hgt500_filtre_compomax(compteurmax,18,:,:)=hgt(b-3,a,:,:); |
---|
143 | hgt500_filtre_compomax(compteurmax,19,:,:)=hgt(b-2,a,:,:); |
---|
144 | hgt500_filtre_compomax(compteurmax,20,:,:)=hgt(b-1,a,:,:); |
---|
145 | |
---|
146 | hgt500_filtre_compomax(compteurmax,21,:,:)=hgt(b,a,:,:); |
---|
147 | hgt500_filtre_compomax(compteurmax,22,:,:)=hgt(b+1,a,:,:); |
---|
148 | hgt500_filtre_compomax(compteurmax,23,:,:)=hgt(b+2,a,:,:); |
---|
149 | hgt500_filtre_compomax(compteurmax,24,:,:)=hgt(b+3,a,:,:); |
---|
150 | hgt500_filtre_compomax(compteurmax,25,:,:)=hgt(b+4,a,:,:); |
---|
151 | hgt500_filtre_compomax(compteurmax,26,:,:)=hgt(b+5,a,:,:); |
---|
152 | hgt500_filtre_compomax(compteurmax,27,:,:)=hgt(b+6,a,:,:); |
---|
153 | hgt500_filtre_compomax(compteurmax,28,:,:)=hgt(b+7,a,:,:); |
---|
154 | hgt500_filtre_compomax(compteurmax,29,:,:)=hgt(b+8,a,:,:); |
---|
155 | hgt500_filtre_compomax(compteurmax,30,:,:)=hgt(b+9,a,:,:); |
---|
156 | hgt500_filtre_compomax(compteurmax,31,:,:)=hgt(b+10,a,:,:); |
---|
157 | % cas 2 : min deltas apres positifs et deltas avant negatifs |
---|
158 | elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); |
---|
159 | compteurmin=compteurmin+1; |
---|
160 | |
---|
161 | hgt500_filtre_compomin(compteurmin,1,:,:)=hgt(b-20,a,:,:); |
---|
162 | hgt500_filtre_compomin(compteurmin,2,:,:)=hgt(b-19,a,:,:); |
---|
163 | hgt500_filtre_compomin(compteurmin,3,:,:)=hgt(b-18,a,:,:); |
---|
164 | hgt500_filtre_compomin(compteurmin,4,:,:)=hgt(b-17,a,:,:); |
---|
165 | hgt500_filtre_compomin(compteurmin,5,:,:)=hgt(b-16,a,:,:); |
---|
166 | hgt500_filtre_compomin(compteurmin,6,:,:)=hgt(b-15,a,:,:); |
---|
167 | hgt500_filtre_compomin(compteurmin,7,:,:)=hgt(b-14,a,:,:); |
---|
168 | hgt500_filtre_compomin(compteurmin,8,:,:)=hgt(b-13,a,:,:); |
---|
169 | hgt500_filtre_compomin(compteurmin,9,:,:)=hgt(b-12,a,:,:); |
---|
170 | hgt500_filtre_compomin(compteurmin,10,:,:)=hgt(b-11,a,:,:); |
---|
171 | |
---|
172 | hgt500_filtre_compomin(compteurmin,11,:,:)=hgt(b-10,a,:,:); |
---|
173 | hgt500_filtre_compomin(compteurmin,12,:,:)=hgt(b-9,a,:,:); |
---|
174 | hgt500_filtre_compomin(compteurmin,13,:,:)=hgt(b-8,a,:,:); |
---|
175 | hgt500_filtre_compomin(compteurmin,14,:,:)=hgt(b-7,a,:,:); |
---|
176 | hgt500_filtre_compomin(compteurmin,15,:,:)=hgt(b-6,a,:,:); |
---|
177 | hgt500_filtre_compomin(compteurmin,16,:,:)=hgt(b-5,a,:,:); |
---|
178 | hgt500_filtre_compomin(compteurmin,17,:,:)=hgt(b-4,a,:,:); |
---|
179 | hgt500_filtre_compomin(compteurmin,18,:,:)=hgt(b-3,a,:,:); |
---|
180 | hgt500_filtre_compomin(compteurmin,19,:,:)=hgt(b-2,a,:,:); |
---|
181 | hgt500_filtre_compomin(compteurmin,20,:,:)=hgt(b-1,a,:,:); |
---|
182 | |
---|
183 | hgt500_filtre_compomin(compteurmin,21,:,:)=hgt(b,a,:,:); |
---|
184 | hgt500_filtre_compomin(compteurmin,22,:,:)=hgt(b+1,a,:,:); |
---|
185 | hgt500_filtre_compomin(compteurmin,23,:,:)=hgt(b+2,a,:,:); |
---|
186 | hgt500_filtre_compomin(compteurmin,24,:,:)=hgt(b+3,a,:,:); |
---|
187 | hgt500_filtre_compomin(compteurmin,25,:,:)=hgt(b+4,a,:,:); |
---|
188 | hgt500_filtre_compomin(compteurmin,26,:,:)=hgt(b+5,a,:,:); |
---|
189 | hgt500_filtre_compomin(compteurmin,27,:,:)=hgt(b+6,a,:,:); |
---|
190 | hgt500_filtre_compomin(compteurmin,28,:,:)=hgt(b+7,a,:,:); |
---|
191 | hgt500_filtre_compomin(compteurmin,29,:,:)=hgt(b+8,a,:,:); |
---|
192 | hgt500_filtre_compomin(compteurmin,30,:,:)=hgt(b+9,a,:,:); |
---|
193 | hgt500_filtre_compomin(compteurmin,31,:,:)=hgt(b+10,a,:,:); |
---|
194 | end; |
---|
195 | end; |
---|
196 | end; |
---|
197 | end; |
---|
198 | |
---|
199 | % on fait la somme des valeurs de hgt500_filtreentiel sur le nbre d occurences |
---|
200 | % on obtent un tableau de la forme (jours-avant-apres,lon,lat) |
---|
201 | hgt500_filtre_compomin1(:,:,:)=nanmean(hgt500_filtre_compomin); |
---|
202 | clear hgt500_filtre_compomin; |
---|
203 | hgt500_filtre_compomax1(:,:,:)=nanmean(hgt500_filtre_compomax); |
---|
204 | clear hgt500_filtre_compomax; |
---|
205 | |
---|
206 | x=[-10:1:10]'; |
---|
207 | |
---|
208 | figure(1); |
---|
209 | orient('landscape'); |
---|
210 | lat=lat'; |
---|
211 | |
---|
212 | for e=1:7; |
---|
213 | a=7-(e-1)+1; |
---|
214 | f=2*(a-1)+1; |
---|
215 | clear delta_hgt500_filtre_min; |
---|
216 | delta_hgt500_filtre_min=zeros(49,144); |
---|
217 | for b=1:49; |
---|
218 | for c=1:144; |
---|
219 | delta_hgt500_filtre_min(b,c)=hgt500_filtre_compomin1(f,b,c)-hgt500_filtre_compomax1(f,b,c); |
---|
220 | end; |
---|
221 | end; |
---|
222 | for b=1:49; |
---|
223 | for c=1:144; |
---|
224 | if delta_hgt500_filtre_min(b,c)<-50; |
---|
225 | delta_hgt500_filtre_min(b,c)=-50; |
---|
226 | elseif delta_hgt500_filtre_min(b,c)>50; |
---|
227 | delta_hgt500_filtre_min(b,c)=50; |
---|
228 | end; |
---|
229 | end; |
---|
230 | end; |
---|
231 | subplot(7,1,8-e); |
---|
232 | palettejerome30 |
---|
233 | colormap(palette); |
---|
234 | delta_hgt500_filtre_min(1,1)=-50.001; |
---|
235 | delta_hgt500_filtre_min(1,2)=50.001; |
---|
236 | |
---|
237 | aa=contourf(lon-180,lat,delta_hgt500_filtre_min,[-50:2.5:50],'LineStyle','none'); |
---|
238 | if e==1; |
---|
239 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' 180';'120W';' 60W';' 0';' 60E';'120E';' 180'],'fontname','Arial','fontsize',6); |
---|
240 | else |
---|
241 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); |
---|
242 | end; |
---|
243 | set (gca,'YTick',[20:10:70],'YTickLabel',[' ';'30N';'40N';'50N';'60N';' '],'fontname','Arial','fontsize',6); |
---|
244 | if e==4; |
---|
245 | co=colorbar; |
---|
246 | set (co,'ytick',[-40:20:40],'yticklabel',[-40:20:40],'fontname','Arial','fontsize',6); |
---|
247 | end; |
---|
248 | hold on; |
---|
249 | cartemonde1; |
---|
250 | set (gca,'tickDir','out'); |
---|
251 | axis equal; |
---|
252 | axis([-180 180 20 70]); |
---|
253 | if e==7; |
---|
254 | title('EOF12 ER1030','fontsize',8); |
---|
255 | end; |
---|
256 | text(-270,50,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); |
---|
257 | pos_vert=e/10; |
---|
258 | set (gca,'position',[0.2 pos_vert 0.5 0.1]); |
---|
259 | end; |
---|
260 | |
---|
261 | print('-depsc2','compo_hgt500_eof12_ER1030a.eps'); |
---|
262 | |
---|
263 | figure(2); |
---|
264 | orient('landscape'); |
---|
265 | |
---|
266 | for e=1:7; |
---|
267 | a=7-(e-1)+1+7; |
---|
268 | f=2*(a-1)+1; |
---|
269 | clear delta_hgt500_filtre_min; |
---|
270 | delta_hgt500_filtre_min=zeros(49,144); |
---|
271 | for b=1:49; |
---|
272 | for c=1:144; |
---|
273 | delta_hgt500_filtre_min(b,c)=hgt500_filtre_compomin1(f,b,c)-hgt500_filtre_compomax1(f,b,c); |
---|
274 | end; |
---|
275 | end; |
---|
276 | for b=1:49; |
---|
277 | for c=1:144; |
---|
278 | if delta_hgt500_filtre_min(b,c)<-50; |
---|
279 | delta_hgt500_filtre_min(b,c)=-50; |
---|
280 | elseif delta_hgt500_filtre_min(b,c)>50; |
---|
281 | delta_hgt500_filtre_min(b,c)=50; |
---|
282 | end; |
---|
283 | end; |
---|
284 | end; |
---|
285 | subplot(7,1,8-e); |
---|
286 | palettejerome30; |
---|
287 | colormap(palette); |
---|
288 | |
---|
289 | delta_hgt500_filtre_min(1,1)=-50.001; |
---|
290 | delta_hgt500_filtre_min(1,2)=50.001; |
---|
291 | |
---|
292 | aa=contourf(lon-180,lat,delta_hgt500_filtre_min,[-50:2.5:50],'LineStyle','none'); |
---|
293 | if e==1; |
---|
294 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' 180';'120W';' 60W';' 0';' 60E';'120E';' 180'],'fontname','Arial','fontsize',6); |
---|
295 | else |
---|
296 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6); |
---|
297 | end; |
---|
298 | set (gca,'YTick',[20:10:70],'YTickLabel',[' ';'30N';'40N';'50N';'60N';' '],'fontname','Arial','fontsize',6); |
---|
299 | if e==4; |
---|
300 | co=colorbar; |
---|
301 | set (co,'ytick',[-40:20:40],'yticklabel',[-40:20:40],'fontname','Arial','fontsize',6); |
---|
302 | end; |
---|
303 | hold on; |
---|
304 | cartemonde1; |
---|
305 | set (gca,'tickDir','out'); |
---|
306 | axis equal; |
---|
307 | axis([-180 180 20 70]); |
---|
308 | if e==7; |
---|
309 | title('EOF12 ER1030','fontsize',8); |
---|
310 | end; |
---|
311 | text(-270,50,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10); |
---|
312 | pos_vert=e/10; |
---|
313 | set (gca,'position',[0.2 pos_vert 0.5 0.1]); |
---|
314 | end; |
---|
315 | print('-depsc2','compo_hgt500_eof12_ER1030b.eps'); |
---|