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 | hgt700=zeros(122,49,144,22);
|
---|
11 |
|
---|
12 | siz=31+28+31+30+31+1;
|
---|
13 | sizbis=31+28+31+30+31+30+31+31+30;
|
---|
14 | ncload('hgt700.1979.nc'); hgt700(:,:,:,1)=hgt(siz:sizbis,1,:,:); clear hgt;
|
---|
15 |
|
---|
16 | ncload('hgt700.1980.nc'); hgt700(:,:,:,2)=hgt(siz+1:sizbis+1,1,:,:); clear hgt;
|
---|
17 | ncload('hgt700.1981.nc'); hgt700(:,:,:,3)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
18 | ncload('hgt700.1982.nc'); hgt700(:,:,:,4)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
19 | ncload('hgt700.1983.nc'); hgt700(:,:,:,5)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
20 | ncload('hgt700.1984.nc'); hgt700(:,:,:,6)=hgt(siz+1:sizbis+1,1,:,:);clear hgt;
|
---|
21 | ncload('hgt700.1985.nc'); hgt700(:,:,:,7)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
22 | ncload('hgt700.1986.nc'); hgt700(:,:,:,8)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
23 | ncload('hgt700.1987.nc'); hgt700(:,:,:,9)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
24 | ncload('hgt700.1988.nc'); hgt700(:,:,:,10)=hgt(siz+1:sizbis+1,1,:,:);clear hgt;
|
---|
25 | ncload('hgt700.1989.nc'); hgt700(:,:,:,11)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
26 | ncload('hgt700.1990.nc'); hgt700(:,:,:,12)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
27 | ncload('hgt700.1991.nc'); hgt700(:,:,:,13)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
28 | ncload('hgt700.1992.nc'); hgt700(:,:,:,14)=hgt(siz+1:sizbis+1,1,:,:);clear hgt;
|
---|
29 | ncload('hgt700.1993.nc'); hgt700(:,:,:,15)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
30 | ncload('hgt700.1994.nc'); hgt700(:,:,:,16)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
31 | ncload('hgt700.1995.nc'); hgt700(:,:,:,17)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
32 | ncload('hgt700.1996.nc'); hgt700(:,:,:,18)=hgt(siz+1:sizbis+1,1,:,:);clear hgt;
|
---|
33 | ncload('hgt700.1997.nc'); hgt700(:,:,:,19)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
34 | ncload('hgt700.1998.nc'); hgt700(:,:,:,20)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
35 | ncload('hgt700.1999.nc'); hgt700(:,:,:,21)=hgt(siz:sizbis,1,:,:);clear hgt;
|
---|
36 | ncload('hgt700.2000.nc'); hgt700(:,:,:,22)=hgt(siz+1:sizbis+1,1,:,:);clear hgt;
|
---|
37 | clear siz1 siz1bis;
|
---|
38 |
|
---|
39 | hgt=permute(hgt700,[1 4 2 3]);
|
---|
40 | clear hgt700;
|
---|
41 |
|
---|
42 | load eof2_olr_rossby_jjas.txt;
|
---|
43 | % on met sous la forme annee mois
|
---|
44 | olr_eof=reshape(eof2_olr_rossby_jjas,122,22);
|
---|
45 | clear eof2_olr_rossby_jjas;
|
---|
46 |
|
---|
47 | % on calcule l ecart type sur la serie temporelle de l'olr
|
---|
48 | k=122*22;
|
---|
49 | olrbis=reshape(olr_eof,k,1);
|
---|
50 | olrbis=std(olrbis);
|
---|
51 |
|
---|
52 | % intialisation des tableaux
|
---|
53 | hgt700_filtre_compomax=NaN*ones(60,31,49,144);
|
---|
54 | hgt700_filtre_compomin=NaN*ones(60,31,49,144);
|
---|
55 |
|
---|
56 | compteurmax=0;
|
---|
57 | compteurmin=0;
|
---|
58 |
|
---|
59 | % boucle sur les annees
|
---|
60 | for a=1:22;
|
---|
61 | clear delta;
|
---|
62 | delta=zeros(122,1);
|
---|
63 | % boucle sur les jours : on prepare avant
|
---|
64 | for b=1:122;
|
---|
65 | if b>1;
|
---|
66 | delta(b)=olr_eof(b,a)-olr_eof(b-1,a);
|
---|
67 | end;
|
---|
68 | end;
|
---|
69 | % boucle sur les jours
|
---|
70 | for b=1:122;
|
---|
71 | % 1ere condition (laisser une marge de 10)
|
---|
72 | if (b>20 && b<112);
|
---|
73 | % cas 1 : max deltas apres negetifs et deltas avant postifs
|
---|
74 | if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && olr_eof(b,a)>olrbis);
|
---|
75 | compteurmax=compteurmax+1;
|
---|
76 | hgt700_filtre_compomax(compteurmax,1,:,:)=hgt(b-20,a,:,:);
|
---|
77 | hgt700_filtre_compomax(compteurmax,2,:,:)=hgt(b-19,a,:,:);
|
---|
78 | hgt700_filtre_compomax(compteurmax,3,:,:)=hgt(b-18,a,:,:);
|
---|
79 | hgt700_filtre_compomax(compteurmax,4,:,:)=hgt(b-17,a,:,:);
|
---|
80 | hgt700_filtre_compomax(compteurmax,5,:,:)=hgt(b-16,a,:,:);
|
---|
81 | hgt700_filtre_compomax(compteurmax,6,:,:)=hgt(b-15,a,:,:);
|
---|
82 | hgt700_filtre_compomax(compteurmax,7,:,:)=hgt(b-14,a,:,:);
|
---|
83 | hgt700_filtre_compomax(compteurmax,8,:,:)=hgt(b-13,a,:,:);
|
---|
84 | hgt700_filtre_compomax(compteurmax,9,:,:)=hgt(b-12,a,:,:);
|
---|
85 | hgt700_filtre_compomax(compteurmax,10,:,:)=hgt(b-11,a,:,:);
|
---|
86 |
|
---|
87 | hgt700_filtre_compomax(compteurmax,11,:,:)=hgt(b-10,a,:,:);
|
---|
88 | hgt700_filtre_compomax(compteurmax,12,:,:)=hgt(b-9,a,:,:);
|
---|
89 | hgt700_filtre_compomax(compteurmax,13,:,:)=hgt(b-8,a,:,:);
|
---|
90 | hgt700_filtre_compomax(compteurmax,14,:,:)=hgt(b-7,a,:,:);
|
---|
91 | hgt700_filtre_compomax(compteurmax,15,:,:)=hgt(b-6,a,:,:);
|
---|
92 | hgt700_filtre_compomax(compteurmax,16,:,:)=hgt(b-5,a,:,:);
|
---|
93 | hgt700_filtre_compomax(compteurmax,17,:,:)=hgt(b-4,a,:,:);
|
---|
94 | hgt700_filtre_compomax(compteurmax,18,:,:)=hgt(b-3,a,:,:);
|
---|
95 | hgt700_filtre_compomax(compteurmax,19,:,:)=hgt(b-2,a,:,:);
|
---|
96 | hgt700_filtre_compomax(compteurmax,20,:,:)=hgt(b-1,a,:,:);
|
---|
97 |
|
---|
98 | hgt700_filtre_compomax(compteurmax,21,:,:)=hgt(b,a,:,:);
|
---|
99 | hgt700_filtre_compomax(compteurmax,22,:,:)=hgt(b+1,a,:,:);
|
---|
100 | hgt700_filtre_compomax(compteurmax,23,:,:)=hgt(b+2,a,:,:);
|
---|
101 | hgt700_filtre_compomax(compteurmax,24,:,:)=hgt(b+3,a,:,:);
|
---|
102 | hgt700_filtre_compomax(compteurmax,25,:,:)=hgt(b+4,a,:,:);
|
---|
103 | hgt700_filtre_compomax(compteurmax,26,:,:)=hgt(b+5,a,:,:);
|
---|
104 | hgt700_filtre_compomax(compteurmax,27,:,:)=hgt(b+6,a,:,:);
|
---|
105 | hgt700_filtre_compomax(compteurmax,28,:,:)=hgt(b+7,a,:,:);
|
---|
106 | hgt700_filtre_compomax(compteurmax,29,:,:)=hgt(b+8,a,:,:);
|
---|
107 | hgt700_filtre_compomax(compteurmax,30,:,:)=hgt(b+9,a,:,:);
|
---|
108 | hgt700_filtre_compomax(compteurmax,31,:,:)=hgt(b+10,a,:,:);
|
---|
109 | % cas 2 : min deltas apres positifs et deltas avant negatifs
|
---|
110 | elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && olr_eof(b,a)<(-olrbis));
|
---|
111 | compteurmin=compteurmin+1;
|
---|
112 |
|
---|
113 | hgt700_filtre_compomin(compteurmin,1,:,:)=hgt(b-20,a,:,:);
|
---|
114 | hgt700_filtre_compomin(compteurmin,2,:,:)=hgt(b-19,a,:,:);
|
---|
115 | hgt700_filtre_compomin(compteurmin,3,:,:)=hgt(b-18,a,:,:);
|
---|
116 | hgt700_filtre_compomin(compteurmin,4,:,:)=hgt(b-17,a,:,:);
|
---|
117 | hgt700_filtre_compomin(compteurmin,5,:,:)=hgt(b-16,a,:,:);
|
---|
118 | hgt700_filtre_compomin(compteurmin,6,:,:)=hgt(b-15,a,:,:);
|
---|
119 | hgt700_filtre_compomin(compteurmin,7,:,:)=hgt(b-14,a,:,:);
|
---|
120 | hgt700_filtre_compomin(compteurmin,8,:,:)=hgt(b-13,a,:,:);
|
---|
121 | hgt700_filtre_compomin(compteurmin,9,:,:)=hgt(b-12,a,:,:);
|
---|
122 | hgt700_filtre_compomin(compteurmin,10,:,:)=hgt(b-11,a,:,:);
|
---|
123 |
|
---|
124 | hgt700_filtre_compomin(compteurmin,11,:,:)=hgt(b-10,a,:,:);
|
---|
125 | hgt700_filtre_compomin(compteurmin,12,:,:)=hgt(b-9,a,:,:);
|
---|
126 | hgt700_filtre_compomin(compteurmin,13,:,:)=hgt(b-8,a,:,:);
|
---|
127 | hgt700_filtre_compomin(compteurmin,14,:,:)=hgt(b-7,a,:,:);
|
---|
128 | hgt700_filtre_compomin(compteurmin,15,:,:)=hgt(b-6,a,:,:);
|
---|
129 | hgt700_filtre_compomin(compteurmin,16,:,:)=hgt(b-5,a,:,:);
|
---|
130 | hgt700_filtre_compomin(compteurmin,17,:,:)=hgt(b-4,a,:,:);
|
---|
131 | hgt700_filtre_compomin(compteurmin,18,:,:)=hgt(b-3,a,:,:);
|
---|
132 | hgt700_filtre_compomin(compteurmin,19,:,:)=hgt(b-2,a,:,:);
|
---|
133 | hgt700_filtre_compomin(compteurmin,20,:,:)=hgt(b-1,a,:,:);
|
---|
134 |
|
---|
135 | hgt700_filtre_compomin(compteurmin,21,:,:)=hgt(b,a,:,:);
|
---|
136 | hgt700_filtre_compomin(compteurmin,22,:,:)=hgt(b+1,a,:,:);
|
---|
137 | hgt700_filtre_compomin(compteurmin,23,:,:)=hgt(b+2,a,:,:);
|
---|
138 | hgt700_filtre_compomin(compteurmin,24,:,:)=hgt(b+3,a,:,:);
|
---|
139 | hgt700_filtre_compomin(compteurmin,25,:,:)=hgt(b+4,a,:,:);
|
---|
140 | hgt700_filtre_compomin(compteurmin,26,:,:)=hgt(b+5,a,:,:);
|
---|
141 | hgt700_filtre_compomin(compteurmin,27,:,:)=hgt(b+6,a,:,:);
|
---|
142 | hgt700_filtre_compomin(compteurmin,28,:,:)=hgt(b+7,a,:,:);
|
---|
143 | hgt700_filtre_compomin(compteurmin,29,:,:)=hgt(b+8,a,:,:);
|
---|
144 | hgt700_filtre_compomin(compteurmin,30,:,:)=hgt(b+9,a,:,:);
|
---|
145 | hgt700_filtre_compomin(compteurmin,31,:,:)=hgt(b+10,a,:,:);
|
---|
146 | end;
|
---|
147 | end;
|
---|
148 | end;
|
---|
149 | end;
|
---|
150 |
|
---|
151 |
|
---|
152 | % on fait la somme des valeurs de hgt700_filtreentiel sur le nbre d occurences
|
---|
153 | % on obtent un tableau de la forme (jours-avant-apres,lon,lat)
|
---|
154 | hgt700_filtre_compomin1(:,:,:)=nanmean(hgt700_filtre_compomin);
|
---|
155 | clear hgt700_filtre_compomin;
|
---|
156 | hgt700_filtre_compomax1(:,:,:)=nanmean(hgt700_filtre_compomax);
|
---|
157 | clear hgt700_filtre_compomax;
|
---|
158 |
|
---|
159 | x=[-10:1:10]';
|
---|
160 |
|
---|
161 | figure(1);
|
---|
162 | orient('landscape');
|
---|
163 | lat=lat';
|
---|
164 | pression=zeros(14,49,144);
|
---|
165 |
|
---|
166 | for e=1:7;
|
---|
167 | a=7-(e-1)+1;
|
---|
168 | f=2*(a-1)+1;
|
---|
169 | clear delta_hgt700_filtre_min;
|
---|
170 | delta_hgt700_filtre_min=zeros(49,144);
|
---|
171 | for b=1:49;
|
---|
172 | for c=1:144;
|
---|
173 | delta_hgt700_filtre_min(b,c)=hgt700_filtre_compomin1(f,b,c)-hgt700_filtre_compomax1(f,b,c);
|
---|
174 | end;
|
---|
175 | end;
|
---|
176 | for b=1:49;
|
---|
177 | for c=1:144;
|
---|
178 | if delta_hgt700_filtre_min(b,c)<-20;
|
---|
179 | delta_hgt700_filtre_min(b,c)=-20;
|
---|
180 | elseif delta_hgt700_filtre_min(b,c)>20;
|
---|
181 | delta_hgt700_filtre_min(b,c)=20;
|
---|
182 | end;
|
---|
183 | end;
|
---|
184 | end
|
---|
185 | subplot(7,1,8-e);
|
---|
186 | hold on;
|
---|
187 | palette
|
---|
188 | clear delta_hgt700;
|
---|
189 | delta_hgt700_filtre_min(1,1)=-20.0001;
|
---|
190 | delta_hgt700_filtre_min(1,2)=20.0001;
|
---|
191 | delta_hgt700=zeros(49,144);
|
---|
192 | delta_hgt700(:,1:72)=delta_hgt700_filtre_min(:,73:144);
|
---|
193 | delta_hgt700(:,73:144)=delta_hgt700_filtre_min(:,1:72);
|
---|
194 | pression(e,:,:)=delta_hgt700;
|
---|
195 | aa=contourf(lon-180,lat,delta_hgt700,[-20:2:20],'LineStyle','none');
|
---|
196 | if e==1;
|
---|
197 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' 180';'120W';' 60W';' 0';' 60E';'120E';' 180'],'fontname','Arial','fontsize',6);
|
---|
198 | else
|
---|
199 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6);
|
---|
200 | end;
|
---|
201 | set (gca,'YTick',[-10:10:40],'YTickLabel',[' ';' 0';'10N';'20N';'30N';' '],'fontname','Arial','fontsize',6);
|
---|
202 | if e==4;
|
---|
203 | co=colorbar;
|
---|
204 | set (co,'xtick',[-20:10:20],'xticklabel',[-20:10:20],'fontname','Arial','fontsize',6);
|
---|
205 | end;
|
---|
206 | hold on;
|
---|
207 | cartemonde1;
|
---|
208 | set (gca,'tickDir','out');
|
---|
209 | axis equal;
|
---|
210 | axis([-180 180 -10 40]);
|
---|
211 | if e==7;
|
---|
212 | title('EOF2 filtre Rossby','fontsize',8);
|
---|
213 | end;
|
---|
214 | text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10);
|
---|
215 | pos_vert=e/10;
|
---|
216 | set (gca,'position',[0.2 pos_vert 0.5 0.1]);
|
---|
217 | end;
|
---|
218 |
|
---|
219 |
|
---|
220 | %%%%%%%%%%%%%%%%%%%%
|
---|
221 | figure(2)
|
---|
222 | orient('landscape')
|
---|
223 |
|
---|
224 | for e=1:7;
|
---|
225 | a=7-(e-1)+1+7;
|
---|
226 | f=2*(a-1)+1;
|
---|
227 | clear delta_hgt700_filtre_min;
|
---|
228 | delta_hgt700_filtre_min=zeros(49,144);
|
---|
229 | for b=1:49;
|
---|
230 | for c=1:144;
|
---|
231 | delta_hgt700_filtre_min(b,c)=hgt700_filtre_compomin1(f,b,c)-hgt700_filtre_compomax1(f,b,c);
|
---|
232 | end;
|
---|
233 | end;
|
---|
234 | for b=1:49;
|
---|
235 | for c=1:144;
|
---|
236 | if delta_hgt700_filtre_min(b,c)<-20;
|
---|
237 | delta_hgt700_filtre_min(b,c)=-20;
|
---|
238 | elseif delta_hgt700_filtre_min(b,c)>20;
|
---|
239 | delta_hgt700_filtre_min(b,c)=20;
|
---|
240 | end;
|
---|
241 | end;
|
---|
242 | end;
|
---|
243 | subplot(7,1,8-e);
|
---|
244 | hold on;
|
---|
245 | palette
|
---|
246 | delta_hgt700_filtre_min(1,1)=-20.0001;
|
---|
247 | delta_hgt700_filtre_min(1,2)=20.0001;
|
---|
248 | clear delta_hgt700;
|
---|
249 | delta_hgt700_filtre_min(1,1)=-20.0001;
|
---|
250 | delta_hgt700_filtre_min(1,2)=20.0001;
|
---|
251 | delta_hgt700=zeros(49,144);
|
---|
252 | delta_hgt700(:,1:72)=delta_hgt700_filtre_min(:,73:144);
|
---|
253 | delta_hgt700(:,73:144)=delta_hgt700_filtre_min(:,1:72);
|
---|
254 | pression(e+7,:,:)=delta_hgt700;
|
---|
255 | aa=contourf(lon-180,lat,delta_hgt700,[-20:2:20],'LineStyle','none');
|
---|
256 | if e==1;
|
---|
257 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' 180';'120W';' 60W';' 0';' 60E';'120E';' 180'],'fontname','Arial','fontsize',6);
|
---|
258 | else
|
---|
259 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6);
|
---|
260 | end
|
---|
261 | set (gca,'YTick',[-10:10:40],'YTickLabel',[' ';' 0';'10N';'20N';'30N';' '],'fontname','Arial','fontsize',6);
|
---|
262 | if e==4;
|
---|
263 | co=colorbar;
|
---|
264 | set (co,'xtick',[-20:10:20],'xticklabel',[-20:10:20],'fontname','Arial','fontsize',5);
|
---|
265 | end;
|
---|
266 | hold on;
|
---|
267 | cartemonde1;
|
---|
268 | set (gca,'tickDir','out');
|
---|
269 | axis equal
|
---|
270 | axis([-180 180 -10 40]);
|
---|
271 | if e==7;
|
---|
272 | title('EOF2 filtre Rossby','fontsize',8) ;
|
---|
273 | end
|
---|
274 | text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10);
|
---|
275 | pos_vert=e/10;
|
---|
276 | set (gca,'position',[0.2 pos_vert 0.5 0.1])
|
---|
277 | end;
|
---|
278 |
|
---|
279 | save pression.mat pression;
|
---|