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