source: trunk/src/mode_sahelien/composite_uwnd700_EOF24_1030.m @ 10

Last change on this file since 10 was 10, checked in by pinsard, 16 years ago

first commit with original work of Sebastien Gervois

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