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