1 | % |
---|
2 | % initialisation |
---|
3 | clear; |
---|
4 | close all; |
---|
5 | |
---|
6 | % etape 1 :on selectionne les mois d ete (attention aux annees bixestiles!) |
---|
7 | % on compile sous forme d'un seul fichier |
---|
8 | |
---|
9 | vwnd925=zeros(122,49,144,28); |
---|
10 | |
---|
11 | siz=31+28+31+30+31+1; |
---|
12 | sizbis=31+28+31+30+31+30+31+31+30; |
---|
13 | ncload('vwnd925.1979.nc'); vwnd925(:,:,:,1)=vwnd(siz:sizbis,1,:,:); clear vwnd; |
---|
14 | ncload('vwnd925.1980.nc'); vwnd925(:,:,:,2)=vwnd(siz+1:sizbis+1,1,:,:); clear vwnd; |
---|
15 | ncload('vwnd925.1981.nc'); vwnd925(:,:,:,3)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
16 | ncload('vwnd925.1982.nc'); vwnd925(:,:,:,4)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
17 | ncload('vwnd925.1983.nc'); vwnd925(:,:,:,5)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
18 | ncload('vwnd925.1984.nc'); vwnd925(:,:,:,6)=vwnd(siz+1:sizbis+1,1,:,:);clear vwnd; |
---|
19 | ncload('vwnd925.1985.nc'); vwnd925(:,:,:,7)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
20 | ncload('vwnd925.1986.nc'); vwnd925(:,:,:,8)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
21 | ncload('vwnd925.1987.nc'); vwnd925(:,:,:,9)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
22 | ncload('vwnd925.1988.nc'); vwnd925(:,:,:,10)=vwnd(siz+1:sizbis+1,1,:,:);clear vwnd; |
---|
23 | ncload('vwnd925.1989.nc'); vwnd925(:,:,:,11)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
24 | ncload('vwnd925.1990.nc'); vwnd925(:,:,:,12)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
25 | ncload('vwnd925.1991.nc'); vwnd925(:,:,:,13)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
26 | ncload('vwnd925.1992.nc'); vwnd925(:,:,:,14)=vwnd(siz+1:sizbis+1,1,:,:);clear vwnd; |
---|
27 | ncload('vwnd925.1993.nc'); vwnd925(:,:,:,15)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
28 | ncload('vwnd925.1994.nc'); vwnd925(:,:,:,16)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
29 | ncload('vwnd925.1995.nc'); vwnd925(:,:,:,17)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
30 | ncload('vwnd925.1996.nc'); vwnd925(:,:,:,18)=vwnd(siz+1:sizbis+1,1,:,:);clear vwnd; |
---|
31 | ncload('vwnd925.1997.nc'); vwnd925(:,:,:,19)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
32 | ncload('vwnd925.1998.nc'); vwnd925(:,:,:,20)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
33 | ncload('vwnd925.1999.nc'); vwnd925(:,:,:,21)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
34 | ncload('vwnd925.2000.nc'); vwnd925(:,:,:,22)=vwnd(siz+1:sizbis+1,1,:,:);clear vwnd; |
---|
35 | ncload('vwnd925.2001.nc'); vwnd925(:,:,:,23)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
36 | ncload('vwnd925.2002.nc'); vwnd925(:,:,:,24)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
37 | ncload('vwnd925.2003.nc'); vwnd925(:,:,:,25)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
38 | ncload('vwnd925.2004.nc'); vwnd925(:,:,:,26)=vwnd(siz+1:sizbis+1,1,:,:);clear vwnd; |
---|
39 | ncload('vwnd925.2005.nc'); vwnd925(:,:,:,27)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
40 | ncload('vwnd925.2006.nc'); vwnd925(:,:,:,28)=vwnd(siz:sizbis,1,:,:);clear vwnd; |
---|
41 | vwnd925=vwnd925*0.01; |
---|
42 | vwnd925=vwnd925-187.65; |
---|
43 | |
---|
44 | clear siz1 siz1bis; |
---|
45 | |
---|
46 | vwnd=permute(vwnd925,[1 4 2 3]); |
---|
47 | clear vwnd925; |
---|
48 | |
---|
49 | %%%%%%%%%%%%%%% FICHIER OLR |
---|
50 | % ouverture / lecture du fichier |
---|
51 | status=load('eof12_rossby_30100.txt'); |
---|
52 | eof12_rossby_30100=status; |
---|
53 | clear status; |
---|
54 | ind_olr=reshape(eof12_rossby_30100,122,28); |
---|
55 | k=122*28; |
---|
56 | clear eof12_rossby_30100 |
---|
57 | % on calcule l ecart type sur la serie entiere de l OLR |
---|
58 | ind_olr1=reshape(ind_olr, k,1); |
---|
59 | ind_olr2=std(ind_olr1); |
---|
60 | clear ind_olr1; |
---|
61 | |
---|
62 | % GEOPOTENTIEL |
---|
63 | % intialisation des tableaux |
---|
64 | vwnd925_filtre_compomax=NaN*ones(60,31,49,144); |
---|
65 | vwnd925_filtre_compomin=NaN*ones(60,31,49,144); |
---|
66 | |
---|
67 | compteurmax=0; |
---|
68 | compteurmin=0; |
---|
69 | |
---|
70 | % boucle sur les annees |
---|
71 | for a=1:28; |
---|
72 | clear delta; |
---|
73 | delta=zeros(122,1); |
---|
74 | % boucle sur les jours : on prepare avant |
---|
75 | for b=1:122; |
---|
76 | if b>1; |
---|
77 | delta(b)=ind_olr(b,a)-ind_olr(b-1,a); |
---|
78 | end; |
---|
79 | end; |
---|
80 | % boucle sur les jours |
---|
81 | for b=1:122; |
---|
82 | % 1ere condition (laisser une marge de 10) |
---|
83 | if (b>22 && b<112); |
---|
84 | % cas 1 : max deltas apres negetifs et deltas avant postifs |
---|
85 | if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); |
---|
86 | compteurmax=compteurmax+1; |
---|
87 | vwnd925_filtre_compomax(compteurmax,1,:,:)=vwnd(b-21,a,:,:); |
---|
88 | vwnd925_filtre_compomax(compteurmax,2,:,:)=vwnd(b-20,a,:,:); |
---|
89 | vwnd925_filtre_compomax(compteurmax,3,:,:)=vwnd(b-19,a,:,:); |
---|
90 | vwnd925_filtre_compomax(compteurmax,4,:,:)=vwnd(b-18,a,:,:); |
---|
91 | vwnd925_filtre_compomax(compteurmax,5,:,:)=vwnd(b-17,a,:,:); |
---|
92 | vwnd925_filtre_compomax(compteurmax,6,:,:)=vwnd(b-16,a,:,:); |
---|
93 | vwnd925_filtre_compomax(compteurmax,7,:,:)=vwnd(b-15,a,:,:); |
---|
94 | vwnd925_filtre_compomax(compteurmax,8,:,:)=vwnd(b-14,a,:,:); |
---|
95 | vwnd925_filtre_compomax(compteurmax,9,:,:)=vwnd(b-13,a,:,:); |
---|
96 | vwnd925_filtre_compomax(compteurmax,10,:,:)=vwnd(b-12,a,:,:); |
---|
97 | vwnd925_filtre_compomax(compteurmax,11,:,:)=vwnd(b-11,a,:,:); |
---|
98 | |
---|
99 | vwnd925_filtre_compomax(compteurmax,12,:,:)=vwnd(b-10,a,:,:); |
---|
100 | vwnd925_filtre_compomax(compteurmax,13,:,:)=vwnd(b-9,a,:,:); |
---|
101 | vwnd925_filtre_compomax(compteurmax,14,:,:)=vwnd(b-8,a,:,:); |
---|
102 | vwnd925_filtre_compomax(compteurmax,15,:,:)=vwnd(b-7,a,:,:); |
---|
103 | vwnd925_filtre_compomax(compteurmax,16,:,:)=vwnd(b-6,a,:,:); |
---|
104 | vwnd925_filtre_compomax(compteurmax,17,:,:)=vwnd(b-5,a,:,:); |
---|
105 | vwnd925_filtre_compomax(compteurmax,18,:,:)=vwnd(b-4,a,:,:); |
---|
106 | vwnd925_filtre_compomax(compteurmax,19,:,:)=vwnd(b-3,a,:,:); |
---|
107 | vwnd925_filtre_compomax(compteurmax,20,:,:)=vwnd(b-2,a,:,:); |
---|
108 | vwnd925_filtre_compomax(compteurmax,21,:,:)=vwnd(b-1,a,:,:); |
---|
109 | |
---|
110 | vwnd925_filtre_compomax(compteurmax,22,:,:)=vwnd(b,a,:,:); |
---|
111 | vwnd925_filtre_compomax(compteurmax,23,:,:)=vwnd(b+1,a,:,:); |
---|
112 | vwnd925_filtre_compomax(compteurmax,24,:,:)=vwnd(b+2,a,:,:); |
---|
113 | vwnd925_filtre_compomax(compteurmax,25,:,:)=vwnd(b+3,a,:,:); |
---|
114 | vwnd925_filtre_compomax(compteurmax,26,:,:)=vwnd(b+4,a,:,:); |
---|
115 | vwnd925_filtre_compomax(compteurmax,27,:,:)=vwnd(b+5,a,:,:); |
---|
116 | vwnd925_filtre_compomax(compteurmax,28,:,:)=vwnd(b+6,a,:,:); |
---|
117 | vwnd925_filtre_compomax(compteurmax,29,:,:)=vwnd(b+7,a,:,:); |
---|
118 | vwnd925_filtre_compomax(compteurmax,30,:,:)=vwnd(b+8,a,:,:); |
---|
119 | vwnd925_filtre_compomax(compteurmax,31,:,:)=vwnd(b+9,a,:,:); |
---|
120 | |
---|
121 | % cas 2 : min deltas apres positifs et deltas avant negatifs |
---|
122 | elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); |
---|
123 | compteurmin=compteurmin+1; |
---|
124 | vwnd925_filtre_compomin(compteurmin,1,:,:)=vwnd(b-21,a,:,:); |
---|
125 | vwnd925_filtre_compomin(compteurmin,2,:,:)=vwnd(b-20,a,:,:); |
---|
126 | vwnd925_filtre_compomin(compteurmin,3,:,:)=vwnd(b-19,a,:,:); |
---|
127 | vwnd925_filtre_compomin(compteurmin,4,:,:)=vwnd(b-18,a,:,:); |
---|
128 | vwnd925_filtre_compomin(compteurmin,5,:,:)=vwnd(b-17,a,:,:); |
---|
129 | vwnd925_filtre_compomin(compteurmin,6,:,:)=vwnd(b-16,a,:,:); |
---|
130 | vwnd925_filtre_compomin(compteurmin,7,:,:)=vwnd(b-15,a,:,:); |
---|
131 | vwnd925_filtre_compomin(compteurmin,8,:,:)=vwnd(b-14,a,:,:); |
---|
132 | vwnd925_filtre_compomin(compteurmin,9,:,:)=vwnd(b-13,a,:,:); |
---|
133 | vwnd925_filtre_compomin(compteurmin,10,:,:)=vwnd(b-12,a,:,:); |
---|
134 | vwnd925_filtre_compomin(compteurmin,11,:,:)=vwnd(b-11,a,:,:); |
---|
135 | |
---|
136 | vwnd925_filtre_compomin(compteurmin,12,:,:)=vwnd(b-10,a,:,:); |
---|
137 | vwnd925_filtre_compomin(compteurmin,13,:,:)=vwnd(b-9,a,:,:); |
---|
138 | vwnd925_filtre_compomin(compteurmin,14,:,:)=vwnd(b-8,a,:,:); |
---|
139 | vwnd925_filtre_compomin(compteurmin,15,:,:)=vwnd(b-7,a,:,:); |
---|
140 | vwnd925_filtre_compomin(compteurmin,16,:,:)=vwnd(b-6,a,:,:); |
---|
141 | vwnd925_filtre_compomin(compteurmin,17,:,:)=vwnd(b-5,a,:,:); |
---|
142 | vwnd925_filtre_compomin(compteurmin,18,:,:)=vwnd(b-4,a,:,:); |
---|
143 | vwnd925_filtre_compomin(compteurmin,19,:,:)=vwnd(b-3,a,:,:); |
---|
144 | vwnd925_filtre_compomin(compteurmin,20,:,:)=vwnd(b-2,a,:,:); |
---|
145 | vwnd925_filtre_compomin(compteurmin,21,:,:)=vwnd(b-1,a,:,:); |
---|
146 | |
---|
147 | vwnd925_filtre_compomin(compteurmin,22,:,:)=vwnd(b,a,:,:); |
---|
148 | vwnd925_filtre_compomin(compteurmin,23,:,:)=vwnd(b+1,a,:,:); |
---|
149 | vwnd925_filtre_compomin(compteurmin,24,:,:)=vwnd(b+2,a,:,:); |
---|
150 | vwnd925_filtre_compomin(compteurmin,25,:,:)=vwnd(b+3,a,:,:); |
---|
151 | vwnd925_filtre_compomin(compteurmin,26,:,:)=vwnd(b+4,a,:,:); |
---|
152 | vwnd925_filtre_compomin(compteurmin,27,:,:)=vwnd(b+5,a,:,:); |
---|
153 | vwnd925_filtre_compomin(compteurmin,28,:,:)=vwnd(b+6,a,:,:); |
---|
154 | vwnd925_filtre_compomin(compteurmin,29,:,:)=vwnd(b+7,a,:,:); |
---|
155 | vwnd925_filtre_compomin(compteurmin,30,:,:)=vwnd(b+8,a,:,:); |
---|
156 | vwnd925_filtre_compomin(compteurmin,31,:,:)=vwnd(b+9,a,:,:); |
---|
157 | |
---|
158 | end; |
---|
159 | end; |
---|
160 | end; |
---|
161 | end; |
---|
162 | |
---|
163 | % on fait la somme des valeurs de vwnd925_filtreentiel sur le nbre d occurences |
---|
164 | % on obtent un tableau de la forme (jours-avant-apres,lon,lat) |
---|
165 | vwnd925_filtre_compomin1(:,:,:)=nanmean(vwnd925_filtre_compomin); |
---|
166 | clear vwnd925_filtre_compomin; |
---|
167 | vwnd925_filtre_compomax1(:,:,:)=nanmean(vwnd925_filtre_compomax); |
---|
168 | clear vwnd925_filtre_compomax; |
---|
169 | |
---|
170 | x=[-10:1:10]'; |
---|
171 | |
---|
172 | figure(1); |
---|
173 | orient('landscape'); |
---|
174 | lat=lat'; |
---|
175 | |
---|
176 | for e=1:31; |
---|
177 | clear delta_vwnd925_filtre_min; |
---|
178 | delta_vwnd925_filtre_min=zeros(49,144); |
---|
179 | for b=1:49; |
---|
180 | for c=1:144; |
---|
181 | delta_vwnd925_filtre_min(b,c)=vwnd925_filtre_compomin1(e,b,c)-vwnd925_filtre_compomax1(e,b,c); |
---|
182 | end; |
---|
183 | end; |
---|
184 | delta_vwnd925=zeros(49,144); |
---|
185 | delta_vwnd925(:,1:72)=delta_vwnd925_filtre_min(:,73:144); |
---|
186 | delta_vwnd925(:,73:144)=delta_vwnd925_filtre_min(:,1:72); |
---|
187 | delta_vwnd925_filtre_min=flipud(delta_vwnd925); |
---|
188 | if e==1; |
---|
189 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins21',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
190 | elseif e==2; |
---|
191 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins20',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
192 | elseif e==3; |
---|
193 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins19',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
194 | elseif e==4; |
---|
195 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins18',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
196 | elseif e==5; |
---|
197 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins17',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
198 | elseif e==6; |
---|
199 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins16',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
200 | elseif e==7; |
---|
201 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins15',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
202 | elseif e==8; |
---|
203 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins14',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
204 | elseif e==9; |
---|
205 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins13',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
206 | elseif e==10; |
---|
207 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins12',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
208 | elseif e==11; |
---|
209 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins11',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
210 | elseif e==12; |
---|
211 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins10',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
212 | elseif e==13; |
---|
213 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins9',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
214 | elseif e==14; |
---|
215 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins8',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
216 | elseif e==15; |
---|
217 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins7',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
218 | elseif e==16; |
---|
219 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins6',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
220 | elseif e==17; |
---|
221 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins5',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
222 | elseif e==18; |
---|
223 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins4',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
224 | elseif e==19; |
---|
225 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins3',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
226 | elseif e==20; |
---|
227 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins2',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
228 | elseif e==21; |
---|
229 | sauvegrads('composite_vwnd925_mode_rossby_30100_moins1',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
230 | elseif e==22; |
---|
231 | sauvegrads('composite_vwnd925_mode_rossby_30100_0',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
232 | elseif e==23; |
---|
233 | sauvegrads('composite_vwnd925_mode_rossby_30100_plus1',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
234 | elseif e==24; |
---|
235 | sauvegrads('composite_vwnd925_mode_rossby_30100_plus2',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
236 | elseif e==25; |
---|
237 | sauvegrads('composite_vwnd925_mode_rossby_30100_plus3',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
238 | elseif e==26; |
---|
239 | sauvegrads('composite_vwnd925_mode_rossby_30100_plus4',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
240 | elseif e==27; |
---|
241 | sauvegrads('composite_vwnd925_mode_rossby_30100_plus5',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
242 | elseif e==28; |
---|
243 | sauvegrads('composite_vwnd925_mode_rossby_30100_plus6',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
244 | elseif e==29; |
---|
245 | sauvegrads('composite_vwnd925_mode_rossby_30100_plus7',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
246 | elseif e==30; |
---|
247 | sauvegrads('composite_vwnd925_mode_rossby_30100_plus8',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
248 | elseif e==31; |
---|
249 | sauvegrads('composite_vwnd925_mode_rossby_30100_plus9',delta_vwnd925_filtre_min,[-180 2.5 -10 2.5]); |
---|
250 | end; |
---|
251 | delta_vwnd925_filtre_min=flipud(delta_vwnd925_filtre_min); |
---|
252 | end; |
---|