source: trunk/src/mode_sahelien/reconstitution_30100_eof1.m @ 16

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

remove trailing blanks, split lines with multiple statements

File size: 2.6 KB
Line 
1%
2
3clear;
4close all;
5
6%lon=[-30:2.5:30], lat=[-10:2.5:30]
7
8load eof_30100_jjas.mat;
9olr=olr';
10PC1=olr*C;
11
12cosa=zeros(4,3416,425);
13% boucle sur les VP
14for a=1:4;
15      for b=1:3416 % boucle sur le temps
16          for c=1:425 % boucle sur l espace
17             cosa(a,b,c)=PC1(b,426-a)*C(c,426-a);
18          end;
19      end;
20end;
21
22cosa1(:,:)=cosa(1,:,:);
23cosa1=reshape(cosa1,3416,25,17);
24
25
26cosa2(:,:)=cosa(2,:,:);
27cosa2=reshape(cosa2,3416,25,17);
28
29cosabis=cosa(2:3,:,:);
30cosa23(:,:)=sum(cosabis);
31clear cosabis;
32cosa23=reshape(cosa23,3416,25,17);
33
34figure(1);
35orient('landscape')
36figure(2);
37orient('landscape')
38figure(3);
39orient('landscape')
40
41% On selectionne la demaine geographique
42
43% la latitude : 7.5N (8) 12.5N (10)
44% la longitude : 10W (9) 10E(17)
45lat1=8;
46lat2=10;
47lon1=9;
48lon2=17;
49taille=(lat2-lat1+1)*(lon2-lon1+1);
50
51
52cosa1=cosa1(:,lon1:lon2,lat1:lat2);
53clear cosi2;
54cosa1=reshape(cosa1,3416,taille);
55cosa1=cosa1';
56cosa1=mean(cosa1);
57cosa1=cosa1';
58save eof1_30100.txt cosa1 -ascii;
59cosa1=reshape(cosa1,122,28);
60
61% On selectionne la demaine geographique
62olr=reshape(olr,3416,25,17);
63cosa4=olr(:,lon1:lon2,lat1:lat2);
64clear olr;
65cosa4=reshape(cosa4,3416,taille);
66clear taille;
67cosa4=cosa4';
68cosa4=mean(cosa4);
69cosa4=cosa4';
70cosa4=reshape(cosa4,122,28);
71
72for a=1:28;
73     if a<12;
74        figure(1);
75        subplot(4,3,a);
76     elseif a<24
77        figure(2);
78        subplot(4,3,a-11);
79    else
80        figure(3);
81        subplot(4,3,a-23);
82     end
83     y2=cosa1(:,a);
84     y4=cosa4(:,a);
85     x=[1:122]';
86     plot(x,y2);
87     hold on;
88     plot(x,y4,'k');
89     y5=zeros(122,1);
90     plot(x,y5,'k:');
91
92     title(a+1978,'Fontsize',8);
93     if a==2;
94         text(0,65,'OLR 7.5 -12.5N et 10W - 10E');
95     elseif a==13;
96         text(0,65,'OLR 7.5 -12.5N et 10W - 10E');
97     end
98     set (gca,'tickDir','out');
99     if a==11;
100        aa=legend('OLR VP1','OLR NOAA');
101        set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.2470 0.1642])
102        legend boxoff;
103     elseif a==22;
104        clear aa;
105        aa=legend('OLR VP1','OLR NOAA');
106        set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.2470 0.1642])
107        legend boxoff;
108     end;
109     axis([1 122 -15 15]);
110     set (gca,'YTick',[-15:5:15],'YTickLabel',[-15:5:15],'fontname','Arial','fontsize',6);
111   set (gca,'XTick',[10:10:122],'XTickLabel',[10:10:122],'fontname','Arial','fontsize',6);
112
113end;
114
115figure(1);
116print -depsc2 reconstitution1_eof1_filtreER_30100.eps;
117figure(2);
118print -depsc2 reconstitution2_eof1_filtreER_30100.eps;
119figure(3);
120print -depsc2 reconstitution3_eof1_filtreER_30100.eps;
Note: See TracBrowser for help on using the repository browser.