1 | % initialisation
|
---|
2 | clear; close all;
|
---|
3 |
|
---|
4 | load hgt500_trop.mat
|
---|
5 |
|
---|
6 | cd('GEOPOT_TROP')
|
---|
7 | ncload('zg_d.TrNQIVIV.197106-09.nc');
|
---|
8 | cd('..')
|
---|
9 |
|
---|
10 | % selction du domaine geographique
|
---|
11 | hgt500b=zeros(122,29,64,128);
|
---|
12 | hgt500b(:,:,:,1:64)=hgt500(:,:,:,65:128);
|
---|
13 | hgt500b(:,:,:,65:128)=hgt500(:,:,:,1:64);
|
---|
14 | clear hgt500; hgt500=hgt500b; clear hgt500b
|
---|
15 |
|
---|
16 |
|
---|
17 | % on desaisonalise
|
---|
18 | hgt1=permute(hgt500,[2 1 3 4]);
|
---|
19 | hgt2(:,:,:)=nanmean(hgt1); clear hgt1;
|
---|
20 | hgt3=reshape(hgt500, 3538,64,128);
|
---|
21 | hgt4(:,:)=nanmean(hgt3); clear hgt3;
|
---|
22 |
|
---|
23 | for a=1:122;
|
---|
24 | for b=1:28;
|
---|
25 | for c=1:37;
|
---|
26 | for d=1:128;
|
---|
27 | hgt500(a,b,c,d)=hgt500(a,b,c,d)-(hgt2(a,c,d)-hgt4(c,d));
|
---|
28 | end;
|
---|
29 | end;
|
---|
30 | end;
|
---|
31 | end;
|
---|
32 | clear hgt2 hgt4;
|
---|
33 |
|
---|
34 |
|
---|
35 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
---|
36 |
|
---|
37 | load eof2_TR_1030.txt
|
---|
38 |
|
---|
39 | % on met sous la forme annee mois
|
---|
40 | hgt500_eof=reshape(eof2_TR_1030,122,29); clear eof2_TR_1030;
|
---|
41 |
|
---|
42 | % on calcule l ecart type sur la serie temporelle de l HGT500
|
---|
43 | k=122*29;
|
---|
44 | hgt500bis=reshape(hgt500_eof,k,1);
|
---|
45 | hgt500bis=std(hgt500bis);
|
---|
46 |
|
---|
47 | % intialisation des tableaux
|
---|
48 | hgt500_filtre_compomax=NaN*ones(50,31,64,128);
|
---|
49 | hgt500_filtre_compomin=NaN*ones(50,31,64,128);
|
---|
50 |
|
---|
51 | compteurmax=0;
|
---|
52 | compteurmin=0;
|
---|
53 |
|
---|
54 | for a=1:29; % boucle sur les annees
|
---|
55 | clear delta;
|
---|
56 | delta=zeros(122,1);
|
---|
57 | for b=1:122; % boucle sur les jours : on prepare avant
|
---|
58 | if b>1;
|
---|
59 | delta(b)=hgt500_eof(b,a)-hgt500_eof(b-1,a);
|
---|
60 | end;
|
---|
61 | end;
|
---|
62 | for b=1:122; % boucle sur les jours
|
---|
63 | if (b>20 && b<112); % 1ere condition (laisser une marge de 10)
|
---|
64 | % cas 1 : max deltas apres negetifs et deltas avant postifs
|
---|
65 | if (delta(b+1)<0 && delta(b)>0 && hgt500_eof(b,a)>(hgt500bis));
|
---|
66 | compteurmax=compteurmax+1;
|
---|
67 | hgt500_filtre_compomax(compteurmax,1,:,:)=hgt500(b-20,a,:,:);
|
---|
68 | hgt500_filtre_compomax(compteurmax,2,:,:)=hgt500(b-19,a,:,:);
|
---|
69 | hgt500_filtre_compomax(compteurmax,3,:,:)=hgt500(b-18,a,:,:);
|
---|
70 | hgt500_filtre_compomax(compteurmax,4,:,:)=hgt500(b-17,a,:,:);
|
---|
71 | hgt500_filtre_compomax(compteurmax,5,:,:)=hgt500(b-16,a,:,:);
|
---|
72 | hgt500_filtre_compomax(compteurmax,6,:,:)=hgt500(b-15,a,:,:);
|
---|
73 | hgt500_filtre_compomax(compteurmax,7,:,:)=hgt500(b-14,a,:,:);
|
---|
74 | hgt500_filtre_compomax(compteurmax,8,:,:)=hgt500(b-13,a,:,:);
|
---|
75 | hgt500_filtre_compomax(compteurmax,9,:,:)=hgt500(b-12,a,:,:);
|
---|
76 | hgt500_filtre_compomax(compteurmax,10,:,:)=hgt500(b-11,a,:,:);
|
---|
77 |
|
---|
78 | hgt500_filtre_compomax(compteurmax,11,:,:)=hgt500(b-10,a,:,:);
|
---|
79 | hgt500_filtre_compomax(compteurmax,12,:,:)=hgt500(b-9,a,:,:);
|
---|
80 | hgt500_filtre_compomax(compteurmax,13,:,:)=hgt500(b-8,a,:,:);
|
---|
81 | hgt500_filtre_compomax(compteurmax,14,:,:)=hgt500(b-7,a,:,:);
|
---|
82 | hgt500_filtre_compomax(compteurmax,15,:,:)=hgt500(b-6,a,:,:);
|
---|
83 | hgt500_filtre_compomax(compteurmax,16,:,:)=hgt500(b-5,a,:,:);
|
---|
84 | hgt500_filtre_compomax(compteurmax,17,:,:)=hgt500(b-4,a,:,:);
|
---|
85 | hgt500_filtre_compomax(compteurmax,18,:,:)=hgt500(b-3,a,:,:);
|
---|
86 | hgt500_filtre_compomax(compteurmax,19,:,:)=hgt500(b-2,a,:,:);
|
---|
87 | hgt500_filtre_compomax(compteurmax,20,:,:)=hgt500(b-1,a,:,:);
|
---|
88 |
|
---|
89 | hgt500_filtre_compomax(compteurmax,21,:,:)=hgt500(b,a,:,:);
|
---|
90 | hgt500_filtre_compomax(compteurmax,22,:,:)=hgt500(b+1,a,:,:);
|
---|
91 | hgt500_filtre_compomax(compteurmax,23,:,:)=hgt500(b+2,a,:,:);
|
---|
92 | hgt500_filtre_compomax(compteurmax,24,:,:)=hgt500(b+3,a,:,:);
|
---|
93 | hgt500_filtre_compomax(compteurmax,25,:,:)=hgt500(b+4,a,:,:);
|
---|
94 | hgt500_filtre_compomax(compteurmax,26,:,:)=hgt500(b+5,a,:,:);
|
---|
95 | hgt500_filtre_compomax(compteurmax,27,:,:)=hgt500(b+6,a,:,:);
|
---|
96 | hgt500_filtre_compomax(compteurmax,28,:,:)=hgt500(b+7,a,:,:);
|
---|
97 | hgt500_filtre_compomax(compteurmax,29,:,:)=hgt500(b+8,a,:,:);
|
---|
98 | hgt500_filtre_compomax(compteurmax,30,:,:)=hgt500(b+9,a,:,:);
|
---|
99 | hgt500_filtre_compomax(compteurmax,31,:,:)=hgt500(b+10,a,:,:);
|
---|
100 | % cas 2 : min deltas apres positifs et deltas avant negatifs
|
---|
101 | elseif (delta(b+1)>0 && delta(b)<0 && hgt500_eof(b,a)<(hgt500bis));
|
---|
102 | compteurmin=compteurmin+1;
|
---|
103 |
|
---|
104 | hgt500_filtre_compomin(compteurmin,1,:,:)=hgt500(b-20,a,:,:);
|
---|
105 | hgt500_filtre_compomin(compteurmin,2,:,:)=hgt500(b-19,a,:,:);
|
---|
106 | hgt500_filtre_compomin(compteurmin,3,:,:)=hgt500(b-18,a,:,:);
|
---|
107 | hgt500_filtre_compomin(compteurmin,4,:,:)=hgt500(b-17,a,:,:);
|
---|
108 | hgt500_filtre_compomin(compteurmin,5,:,:)=hgt500(b-16,a,:,:);
|
---|
109 | hgt500_filtre_compomin(compteurmin,6,:,:)=hgt500(b-15,a,:,:);
|
---|
110 | hgt500_filtre_compomin(compteurmin,7,:,:)=hgt500(b-14,a,:,:);
|
---|
111 | hgt500_filtre_compomin(compteurmin,8,:,:)=hgt500(b-13,a,:,:);
|
---|
112 | hgt500_filtre_compomin(compteurmin,9,:,:)=hgt500(b-12,a,:,:);
|
---|
113 | hgt500_filtre_compomin(compteurmin,10,:,:)=hgt500(b-11,a,:,:);
|
---|
114 |
|
---|
115 | hgt500_filtre_compomin(compteurmin,11,:,:)=hgt500(b-10,a,:,:);
|
---|
116 | hgt500_filtre_compomin(compteurmin,12,:,:)=hgt500(b-9,a,:,:);
|
---|
117 | hgt500_filtre_compomin(compteurmin,13,:,:)=hgt500(b-8,a,:,:);
|
---|
118 | hgt500_filtre_compomin(compteurmin,14,:,:)=hgt500(b-7,a,:,:);
|
---|
119 | hgt500_filtre_compomin(compteurmin,15,:,:)=hgt500(b-6,a,:,:);
|
---|
120 | hgt500_filtre_compomin(compteurmin,16,:,:)=hgt500(b-5,a,:,:);
|
---|
121 | hgt500_filtre_compomin(compteurmin,17,:,:)=hgt500(b-4,a,:,:);
|
---|
122 | hgt500_filtre_compomin(compteurmin,18,:,:)=hgt500(b-3,a,:,:);
|
---|
123 | hgt500_filtre_compomin(compteurmin,19,:,:)=hgt500(b-2,a,:,:);
|
---|
124 | hgt500_filtre_compomin(compteurmin,20,:,:)=hgt500(b-1,a,:,:);
|
---|
125 |
|
---|
126 | hgt500_filtre_compomin(compteurmin,21,:,:)=hgt500(b,a,:,:);
|
---|
127 | hgt500_filtre_compomin(compteurmin,22,:,:)=hgt500(b+1,a,:,:);
|
---|
128 | hgt500_filtre_compomin(compteurmin,23,:,:)=hgt500(b+2,a,:,:);
|
---|
129 | hgt500_filtre_compomin(compteurmin,24,:,:)=hgt500(b+3,a,:,:);
|
---|
130 | hgt500_filtre_compomin(compteurmin,25,:,:)=hgt500(b+4,a,:,:);
|
---|
131 | hgt500_filtre_compomin(compteurmin,26,:,:)=hgt500(b+5,a,:,:);
|
---|
132 | hgt500_filtre_compomin(compteurmin,27,:,:)=hgt500(b+6,a,:,:);
|
---|
133 | hgt500_filtre_compomin(compteurmin,28,:,:)=hgt500(b+7,a,:,:);
|
---|
134 | hgt500_filtre_compomin(compteurmin,29,:,:)=hgt500(b+8,a,:,:);
|
---|
135 | hgt500_filtre_compomin(compteurmin,30,:,:)=hgt500(b+9,a,:,:);
|
---|
136 | hgt500_filtre_compomin(compteurmin,31,:,:)=hgt500(b+10,a,:,:);
|
---|
137 | end;
|
---|
138 | end;
|
---|
139 | end;
|
---|
140 | end;
|
---|
141 | hgt500_filtre_compomin=hgt500_filtre_compomin(1:compteurmin,:,:,:);
|
---|
142 | hgt500_filtre_compomax=hgt500_filtre_compomax(1:compteurmax,:,:,:);
|
---|
143 |
|
---|
144 | % on fait la somme des valeurs de hgt500_filtreentiel sur le nbre d occurences
|
---|
145 | % on obtent un tableau de la forme (jours-avant-apres,lon,lat)
|
---|
146 | hgt500_filtre_compomin1(:,:,:)=mean(hgt500_filtre_compomin); clear hgt500_filtre_compomin;
|
---|
147 | hgt500_filtre_compomax1(:,:,:)=mean(hgt500_filtre_compomax); clear hgt500_filtre_compomax;
|
---|
148 |
|
---|
149 | x=[-10:1:10]'; %'
|
---|
150 |
|
---|
151 | figure(1); orient('landscape');
|
---|
152 |
|
---|
153 | lat=lat';
|
---|
154 | lon=lon-180;
|
---|
155 | for e=1:7;
|
---|
156 | a=7-(e-1)+1;
|
---|
157 | f=2*(a-1)+1;
|
---|
158 | clear delta_hgt500_filtre_min;
|
---|
159 | delta_hgt500_filtre_min=zeros(64,128);
|
---|
160 | for b=1:64;
|
---|
161 | for c=1:128;
|
---|
162 | delta_hgt500_filtre_min(b,c)=hgt500_filtre_compomin1(f,b,c)-hgt500_filtre_compomax1(f,b,c);
|
---|
163 | end;
|
---|
164 | end;
|
---|
165 | for b=1:64;
|
---|
166 | for c=1:128;
|
---|
167 | if delta_hgt500_filtre_min(b,c)<-50;
|
---|
168 | delta_hgt500_filtre_min(b,c)=-50;
|
---|
169 | elseif delta_hgt500_filtre_min(b,c)>50;
|
---|
170 | delta_hgt500_filtre_min(b,c)=50;
|
---|
171 | end;
|
---|
172 | end;
|
---|
173 | end
|
---|
174 | subplot(7,1,8-e);
|
---|
175 | palettecomplet
|
---|
176 | delta_hgt500_filtre_min(1,1)=-50.0001;
|
---|
177 | delta_hgt500_filtre_min(1,2)=50.0001;
|
---|
178 | fin=-30+24*2.5;
|
---|
179 |
|
---|
180 | clear fin
|
---|
181 | fin=-10+16*2.5;
|
---|
182 | aa=contourf(lon,lat,delta_hgt500_filtre_min,[-50:5:50],'LineStyle','none');
|
---|
183 | if e==1;
|
---|
184 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' 180';'120W';' 60W';' 0';' 60E';'120E';' 180'],'fontname','Arial','fontsize',6);
|
---|
185 | else
|
---|
186 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6);
|
---|
187 | end
|
---|
188 | set (gca,'YTick',[30:10:70],'YTickLabel',['30N';'40N';'50N';'60N';'70N'],'fontname','Arial','fontsize',6);
|
---|
189 | if e==4;
|
---|
190 | co=colorbar;
|
---|
191 | set(co,'xtick',[-20:10:20],'xticklabel',[-20:10:20],'fontname','Arial','fontsize',6);
|
---|
192 | end;
|
---|
193 | hold on; cartemonde1;
|
---|
194 | set (gca,'tickDir','out');
|
---|
195 | axis equal
|
---|
196 | axis([-180 180 20 80]);
|
---|
197 | if e==7;
|
---|
198 | title('HGT500 composite EOF2 1030j simulation TROP ','fontsize',8) ;
|
---|
199 | end
|
---|
200 | text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10);
|
---|
201 | pos_vert=e/10;
|
---|
202 | set (gca,'position',[0.2 pos_vert 0.5 0.1])
|
---|
203 | end;
|
---|
204 | print -depsc2 composite_hgt500_trop_eof2_1030a.eps
|
---|
205 |
|
---|
206 | figure(2); orient('landscape');
|
---|
207 |
|
---|
208 | for e=1:7;
|
---|
209 | a=7-(e-1)+1+7;
|
---|
210 | f=2*(a-1)+1;
|
---|
211 | clear delta_hgt500_filtre_min;
|
---|
212 | delta_hgt500_filtre_min=zeros(64,128);
|
---|
213 | for b=1:64;
|
---|
214 | for c=1:128;
|
---|
215 | delta_hgt500_filtre_min(b,c)=hgt500_filtre_compomin1(f,b,c)-hgt500_filtre_compomax1(f,b,c);
|
---|
216 | end;
|
---|
217 | end;
|
---|
218 | for b=1:64;
|
---|
219 | for c=1:128;
|
---|
220 | if delta_hgt500_filtre_min(b,c)<-50;
|
---|
221 | delta_hgt500_filtre_min(b,c)=-50;
|
---|
222 | elseif delta_hgt500_filtre_min(b,c)>50;
|
---|
223 | delta_hgt500_filtre_min(b,c)=50;
|
---|
224 | end;
|
---|
225 | end;
|
---|
226 | end
|
---|
227 | subplot(7,1,8-e);
|
---|
228 | palettecomplet
|
---|
229 | delta_hgt500_filtre_min(1,1)=-50.0001;
|
---|
230 | delta_hgt500_filtre_min(1,2)=50.0001;
|
---|
231 | fin=-30+24*2.5;
|
---|
232 |
|
---|
233 | clear fin
|
---|
234 | fin=-10+16*2.5;
|
---|
235 | aa=contourf(lon,lat,delta_hgt500_filtre_min,[-50:5:50],'LineStyle','none');
|
---|
236 | if e==1;
|
---|
237 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' 180';'120W';' 60W';' 0';' 60E';'120E';' 180'],'fontname','Arial','fontsize',6);
|
---|
238 | else
|
---|
239 | set (gca,'XTick',[-180:60:180],'XTickLabel',[' ';' ';' ';' ';' ';' '],'fontname','Arial','fontsize',6);
|
---|
240 | end
|
---|
241 | set (gca,'YTick',[30:10:70],'YTickLabel',['30N';'40N';'50N';'60N';'70N'],'fontname','Arial','fontsize',6);
|
---|
242 | if e==4;
|
---|
243 | co=colorbar;
|
---|
244 | set(co,'xtick',[-20:10:20],'xticklabel',[-20:10:20],'fontname','Arial','fontsize',6);
|
---|
245 | end;
|
---|
246 | hold on; cartemonde1;
|
---|
247 | set (gca,'tickDir','out');
|
---|
248 | axis equal
|
---|
249 | axis([-180 180 20 80]);
|
---|
250 | if e==7;
|
---|
251 | title('HGT500 composite EOF2 1030j simulation TROP','fontsize',8) ;
|
---|
252 | end
|
---|
253 | text(-270,10,['day = ',num2str(f-21)],'fontname','Arial','fontsize',10);
|
---|
254 | pos_vert=e/10;
|
---|
255 | set (gca,'position',[0.2 pos_vert 0.5 0.1])
|
---|
256 | end;
|
---|
257 | print -depsc2 composite_hgt500_trop_eof2_1030b.eps
|
---|
258 |
|
---|
259 |
|
---|
260 |
|
---|