[17] | 1 | % |
---|
[18] | 2 | |
---|
[17] | 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 | hgt925=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('hgt925.1979.nc'); hgt925(:,:,:,1)=hgt(siz:sizbis,1,:,:); clear hgt; |
---|
| 15 | ncload('hgt925.1980.nc'); hgt925(:,:,:,2)=hgt(siz+1:sizbis+1,1,:,:); clear hgt; |
---|
| 16 | ncload('hgt925.1981.nc'); hgt925(:,:,:,3)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 17 | ncload('hgt925.1982.nc'); hgt925(:,:,:,4)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 18 | ncload('hgt925.1983.nc'); hgt925(:,:,:,5)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 19 | ncload('hgt925.1984.nc'); hgt925(:,:,:,6)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
| 20 | ncload('hgt925.1985.nc'); hgt925(:,:,:,7)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 21 | ncload('hgt925.1986.nc'); hgt925(:,:,:,8)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 22 | ncload('hgt925.1987.nc'); hgt925(:,:,:,9)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 23 | ncload('hgt925.1988.nc'); hgt925(:,:,:,10)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
| 24 | ncload('hgt925.1989.nc'); hgt925(:,:,:,11)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 25 | ncload('hgt925.1990.nc'); hgt925(:,:,:,12)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 26 | ncload('hgt925.1991.nc'); hgt925(:,:,:,13)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 27 | ncload('hgt925.1992.nc'); hgt925(:,:,:,14)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
| 28 | ncload('hgt925.1993.nc'); hgt925(:,:,:,15)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 29 | ncload('hgt925.1994.nc'); hgt925(:,:,:,16)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 30 | ncload('hgt925.1995.nc'); hgt925(:,:,:,17)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 31 | ncload('hgt925.1996.nc'); hgt925(:,:,:,18)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
| 32 | ncload('hgt925.1997.nc'); hgt925(:,:,:,19)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 33 | ncload('hgt925.1998.nc'); hgt925(:,:,:,20)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 34 | ncload('hgt925.1999.nc'); hgt925(:,:,:,21)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 35 | ncload('hgt925.2000.nc'); hgt925(:,:,:,22)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
| 36 | ncload('hgt925.2001.nc'); hgt925(:,:,:,23)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 37 | ncload('hgt925.2002.nc'); hgt925(:,:,:,24)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 38 | ncload('hgt925.2003.nc'); hgt925(:,:,:,25)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 39 | ncload('hgt925.2004.nc'); hgt925(:,:,:,26)=hgt(siz+1:sizbis+1,1,:,:);clear hgt; |
---|
| 40 | ncload('hgt925.2005.nc'); hgt925(:,:,:,27)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 41 | ncload('hgt925.2006.nc'); hgt925(:,:,:,28)=hgt(siz:sizbis,1,:,:);clear hgt; |
---|
| 42 | |
---|
| 43 | clear siz1 siz1bis; |
---|
| 44 | |
---|
| 45 | hgt=permute(hgt925,[1 4 2 3]); |
---|
| 46 | clear hgt925; |
---|
| 47 | |
---|
| 48 | %%%%%%%%%%%%%%% FICHIER OLR |
---|
| 49 | % ouverture / lecture du fichier |
---|
[23] | 50 | status=load('eof12_rossby_30100.txt'); |
---|
[24] | 51 | eof12_rossby_30100=status; |
---|
| 52 | clear status; |
---|
[17] | 53 | ind_olr=reshape(eof12_rossby_30100,122,28); |
---|
| 54 | k=122*28; |
---|
| 55 | clear eof12_rossby_30100 |
---|
| 56 | % on calcule l ecart type sur la serie entiere de l OLR |
---|
| 57 | ind_olr1=reshape(ind_olr, k,1); |
---|
| 58 | ind_olr2=std(ind_olr1); |
---|
| 59 | clear ind_olr1; |
---|
| 60 | |
---|
| 61 | % GEOPOTENTIEL |
---|
| 62 | % intialisation des tableaux |
---|
| 63 | hgt925_filtre_compomax=NaN*ones(60,31,49,144); |
---|
| 64 | hgt925_filtre_compomin=NaN*ones(60,31,49,144); |
---|
| 65 | |
---|
| 66 | compteurmax=0; |
---|
| 67 | compteurmin=0; |
---|
| 68 | |
---|
| 69 | % boucle sur les annees |
---|
| 70 | for a=1:28; |
---|
| 71 | clear delta; |
---|
| 72 | delta=zeros(122,1); |
---|
| 73 | % boucle sur les jours : on prepare avant |
---|
| 74 | for b=1:122; |
---|
| 75 | if b>1; |
---|
| 76 | delta(b)=ind_olr(b,a)-ind_olr(b-1,a); |
---|
| 77 | end; |
---|
| 78 | end; |
---|
| 79 | % boucle sur les jours |
---|
| 80 | for b=1:122; |
---|
| 81 | % 1ere condition (laisser une marge de 10) |
---|
| 82 | if (b>22 && b<112); |
---|
| 83 | % cas 1 : max deltas apres negetifs et deltas avant postifs |
---|
| 84 | if (delta(b+1)<0 && delta(b)<0 && delta(b-1)>0 && delta(b-2)>0 && ind_olr(b,a)>ind_olr2); |
---|
| 85 | compteurmax=compteurmax+1; |
---|
| 86 | hgt925_filtre_compomax(compteurmax,1,:,:)=hgt(b-21,a,:,:); |
---|
| 87 | hgt925_filtre_compomax(compteurmax,2,:,:)=hgt(b-20,a,:,:); |
---|
| 88 | hgt925_filtre_compomax(compteurmax,3,:,:)=hgt(b-19,a,:,:); |
---|
| 89 | hgt925_filtre_compomax(compteurmax,4,:,:)=hgt(b-18,a,:,:); |
---|
| 90 | hgt925_filtre_compomax(compteurmax,5,:,:)=hgt(b-17,a,:,:); |
---|
| 91 | hgt925_filtre_compomax(compteurmax,6,:,:)=hgt(b-16,a,:,:); |
---|
| 92 | hgt925_filtre_compomax(compteurmax,7,:,:)=hgt(b-15,a,:,:); |
---|
| 93 | hgt925_filtre_compomax(compteurmax,8,:,:)=hgt(b-14,a,:,:); |
---|
| 94 | hgt925_filtre_compomax(compteurmax,9,:,:)=hgt(b-13,a,:,:); |
---|
| 95 | hgt925_filtre_compomax(compteurmax,10,:,:)=hgt(b-12,a,:,:); |
---|
| 96 | hgt925_filtre_compomax(compteurmax,11,:,:)=hgt(b-11,a,:,:); |
---|
| 97 | |
---|
| 98 | hgt925_filtre_compomax(compteurmax,12,:,:)=hgt(b-10,a,:,:); |
---|
| 99 | hgt925_filtre_compomax(compteurmax,13,:,:)=hgt(b-9,a,:,:); |
---|
| 100 | hgt925_filtre_compomax(compteurmax,14,:,:)=hgt(b-8,a,:,:); |
---|
| 101 | hgt925_filtre_compomax(compteurmax,15,:,:)=hgt(b-7,a,:,:); |
---|
| 102 | hgt925_filtre_compomax(compteurmax,16,:,:)=hgt(b-6,a,:,:); |
---|
| 103 | hgt925_filtre_compomax(compteurmax,17,:,:)=hgt(b-5,a,:,:); |
---|
| 104 | hgt925_filtre_compomax(compteurmax,18,:,:)=hgt(b-4,a,:,:); |
---|
| 105 | hgt925_filtre_compomax(compteurmax,19,:,:)=hgt(b-3,a,:,:); |
---|
| 106 | hgt925_filtre_compomax(compteurmax,20,:,:)=hgt(b-2,a,:,:); |
---|
| 107 | hgt925_filtre_compomax(compteurmax,21,:,:)=hgt(b-1,a,:,:); |
---|
| 108 | |
---|
| 109 | hgt925_filtre_compomax(compteurmax,22,:,:)=hgt(b,a,:,:); |
---|
| 110 | hgt925_filtre_compomax(compteurmax,23,:,:)=hgt(b+1,a,:,:); |
---|
| 111 | hgt925_filtre_compomax(compteurmax,24,:,:)=hgt(b+2,a,:,:); |
---|
| 112 | hgt925_filtre_compomax(compteurmax,25,:,:)=hgt(b+3,a,:,:); |
---|
| 113 | hgt925_filtre_compomax(compteurmax,26,:,:)=hgt(b+4,a,:,:); |
---|
| 114 | hgt925_filtre_compomax(compteurmax,27,:,:)=hgt(b+5,a,:,:); |
---|
| 115 | hgt925_filtre_compomax(compteurmax,28,:,:)=hgt(b+6,a,:,:); |
---|
| 116 | hgt925_filtre_compomax(compteurmax,29,:,:)=hgt(b+7,a,:,:); |
---|
| 117 | hgt925_filtre_compomax(compteurmax,30,:,:)=hgt(b+8,a,:,:); |
---|
| 118 | hgt925_filtre_compomax(compteurmax,31,:,:)=hgt(b+9,a,:,:); |
---|
| 119 | |
---|
| 120 | % cas 2 : min deltas apres positifs et deltas avant negatifs |
---|
| 121 | elseif (delta(b+1)>0 && delta(b)>0 && delta(b-1)<0 && delta(b-2)<0 && ind_olr(b,a)<(-ind_olr2)); |
---|
| 122 | compteurmin=compteurmin+1; |
---|
| 123 | hgt925_filtre_compomin(compteurmin,1,:,:)=hgt(b-21,a,:,:); |
---|
| 124 | hgt925_filtre_compomin(compteurmin,2,:,:)=hgt(b-20,a,:,:); |
---|
| 125 | hgt925_filtre_compomin(compteurmin,3,:,:)=hgt(b-19,a,:,:); |
---|
| 126 | hgt925_filtre_compomin(compteurmin,4,:,:)=hgt(b-18,a,:,:); |
---|
| 127 | hgt925_filtre_compomin(compteurmin,5,:,:)=hgt(b-17,a,:,:); |
---|
| 128 | hgt925_filtre_compomin(compteurmin,6,:,:)=hgt(b-16,a,:,:); |
---|
| 129 | hgt925_filtre_compomin(compteurmin,7,:,:)=hgt(b-15,a,:,:); |
---|
| 130 | hgt925_filtre_compomin(compteurmin,8,:,:)=hgt(b-14,a,:,:); |
---|
| 131 | hgt925_filtre_compomin(compteurmin,9,:,:)=hgt(b-13,a,:,:); |
---|
| 132 | hgt925_filtre_compomin(compteurmin,10,:,:)=hgt(b-12,a,:,:); |
---|
| 133 | hgt925_filtre_compomin(compteurmin,11,:,:)=hgt(b-11,a,:,:); |
---|
| 134 | |
---|
| 135 | hgt925_filtre_compomin(compteurmin,12,:,:)=hgt(b-10,a,:,:); |
---|
| 136 | hgt925_filtre_compomin(compteurmin,13,:,:)=hgt(b-9,a,:,:); |
---|
| 137 | hgt925_filtre_compomin(compteurmin,14,:,:)=hgt(b-8,a,:,:); |
---|
| 138 | hgt925_filtre_compomin(compteurmin,15,:,:)=hgt(b-7,a,:,:); |
---|
| 139 | hgt925_filtre_compomin(compteurmin,16,:,:)=hgt(b-6,a,:,:); |
---|
| 140 | hgt925_filtre_compomin(compteurmin,17,:,:)=hgt(b-5,a,:,:); |
---|
| 141 | hgt925_filtre_compomin(compteurmin,18,:,:)=hgt(b-4,a,:,:); |
---|
| 142 | hgt925_filtre_compomin(compteurmin,19,:,:)=hgt(b-3,a,:,:); |
---|
| 143 | hgt925_filtre_compomin(compteurmin,20,:,:)=hgt(b-2,a,:,:); |
---|
| 144 | hgt925_filtre_compomin(compteurmin,21,:,:)=hgt(b-1,a,:,:); |
---|
| 145 | |
---|
| 146 | hgt925_filtre_compomin(compteurmin,22,:,:)=hgt(b,a,:,:); |
---|
| 147 | hgt925_filtre_compomin(compteurmin,23,:,:)=hgt(b+1,a,:,:); |
---|
| 148 | hgt925_filtre_compomin(compteurmin,24,:,:)=hgt(b+2,a,:,:); |
---|
| 149 | hgt925_filtre_compomin(compteurmin,25,:,:)=hgt(b+3,a,:,:); |
---|
| 150 | hgt925_filtre_compomin(compteurmin,26,:,:)=hgt(b+4,a,:,:); |
---|
| 151 | hgt925_filtre_compomin(compteurmin,27,:,:)=hgt(b+5,a,:,:); |
---|
| 152 | hgt925_filtre_compomin(compteurmin,28,:,:)=hgt(b+6,a,:,:); |
---|
| 153 | hgt925_filtre_compomin(compteurmin,29,:,:)=hgt(b+7,a,:,:); |
---|
| 154 | hgt925_filtre_compomin(compteurmin,30,:,:)=hgt(b+8,a,:,:); |
---|
| 155 | hgt925_filtre_compomin(compteurmin,31,:,:)=hgt(b+9,a,:,:); |
---|
| 156 | |
---|
| 157 | end; |
---|
| 158 | end; |
---|
| 159 | end; |
---|
| 160 | end; |
---|
| 161 | |
---|
| 162 | % on fait la somme des valeurs de hgt925_filtreentiel sur le nbre d occurences |
---|
| 163 | % on obtent un tableau de la forme (jours-avant-apres,lon,lat) |
---|
| 164 | hgt925_filtre_compomin1(:,:,:)=nanmean(hgt925_filtre_compomin); |
---|
| 165 | clear hgt925_filtre_compomin; |
---|
| 166 | hgt925_filtre_compomax1(:,:,:)=nanmean(hgt925_filtre_compomax); |
---|
| 167 | clear hgt925_filtre_compomax; |
---|
| 168 | |
---|
| 169 | x=[-10:1:10]'; |
---|
| 170 | |
---|
| 171 | figure(1); |
---|
| 172 | orient('landscape'); |
---|
| 173 | lat=lat'; |
---|
| 174 | |
---|
| 175 | for e=1:31; |
---|
| 176 | clear delta_hgt925_filtre_min; |
---|
| 177 | delta_hgt925_filtre_min=zeros(49,144); |
---|
| 178 | for b=1:49; |
---|
| 179 | for c=1:144; |
---|
| 180 | delta_hgt925_filtre_min(b,c)=hgt925_filtre_compomin1(e,b,c)-hgt925_filtre_compomax1(e,b,c); |
---|
| 181 | end; |
---|
| 182 | end; |
---|
| 183 | delta_hgt925=zeros(49,144); |
---|
| 184 | delta_hgt925(:,1:72)=delta_hgt925_filtre_min(:,73:144); |
---|
| 185 | delta_hgt925(:,73:144)=delta_hgt925_filtre_min(:,1:72); |
---|
| 186 | delta_hgt925_filtre_min=flipud(delta_hgt925); |
---|
| 187 | if e==1; |
---|
| 188 | sauvegrads('composite_hgt925_mode_rossby_30100_moins21',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 189 | elseif e==2; |
---|
| 190 | sauvegrads('composite_hgt925_mode_rossby_30100_moins20',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 191 | elseif e==3; |
---|
| 192 | sauvegrads('composite_hgt925_mode_rossby_30100_moins19',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 193 | elseif e==4; |
---|
| 194 | sauvegrads('composite_hgt925_mode_rossby_30100_moins18',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 195 | elseif e==5; |
---|
| 196 | sauvegrads('composite_hgt925_mode_rossby_30100_moins17',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 197 | elseif e==6; |
---|
| 198 | sauvegrads('composite_hgt925_mode_rossby_30100_moins16',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 199 | elseif e==7; |
---|
| 200 | sauvegrads('composite_hgt925_mode_rossby_30100_moins15',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 201 | elseif e==8; |
---|
| 202 | sauvegrads('composite_hgt925_mode_rossby_30100_moins14',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 203 | elseif e==9; |
---|
| 204 | sauvegrads('composite_hgt925_mode_rossby_30100_moins13',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 205 | elseif e==10; |
---|
| 206 | sauvegrads('composite_hgt925_mode_rossby_30100_moins12',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 207 | elseif e==11; |
---|
| 208 | sauvegrads('composite_hgt925_mode_rossby_30100_moins11',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 209 | elseif e==12; |
---|
| 210 | sauvegrads('composite_hgt925_mode_rossby_30100_moins10',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 211 | elseif e==13; |
---|
| 212 | sauvegrads('composite_hgt925_mode_rossby_30100_moins9',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 213 | elseif e==14; |
---|
| 214 | sauvegrads('composite_hgt925_mode_rossby_30100_moins8',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 215 | elseif e==15; |
---|
| 216 | sauvegrads('composite_hgt925_mode_rossby_30100_moins7',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 217 | elseif e==16; |
---|
| 218 | sauvegrads('composite_hgt925_mode_rossby_30100_moins6',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 219 | elseif e==17; |
---|
| 220 | sauvegrads('composite_hgt925_mode_rossby_30100_moins5',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 221 | elseif e==18; |
---|
| 222 | sauvegrads('composite_hgt925_mode_rossby_30100_moins4',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 223 | elseif e==19; |
---|
| 224 | sauvegrads('composite_hgt925_mode_rossby_30100_moins3',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 225 | elseif e==20; |
---|
| 226 | sauvegrads('composite_hgt925_mode_rossby_30100_moins2',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 227 | elseif e==21; |
---|
| 228 | sauvegrads('composite_hgt925_mode_rossby_30100_moins1',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 229 | elseif e==22; |
---|
| 230 | sauvegrads('composite_hgt925_mode_rossby_30100_0',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 231 | elseif e==23; |
---|
| 232 | sauvegrads('composite_hgt925_mode_rossby_30100_plus1',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 233 | elseif e==24; |
---|
| 234 | sauvegrads('composite_hgt925_mode_rossby_30100_plus2',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 235 | elseif e==25; |
---|
| 236 | sauvegrads('composite_hgt925_mode_rossby_30100_plus3',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 237 | elseif e==26; |
---|
| 238 | sauvegrads('composite_hgt925_mode_rossby_30100_plus4',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 239 | elseif e==27; |
---|
| 240 | sauvegrads('composite_hgt925_mode_rossby_30100_plus5',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 241 | elseif e==28; |
---|
| 242 | sauvegrads('composite_hgt925_mode_rossby_30100_plus6',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 243 | elseif e==29; |
---|
| 244 | sauvegrads('composite_hgt925_mode_rossby_30100_plus7',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 245 | elseif e==30; |
---|
| 246 | sauvegrads('composite_hgt925_mode_rossby_30100_plus8',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 247 | elseif e==31; |
---|
| 248 | sauvegrads('composite_hgt925_mode_rossby_30100_plus9',delta_hgt925_filtre_min,[-180 2.5 -10 2.5]); |
---|
| 249 | end |
---|
| 250 | |
---|
| 251 | end |
---|