source: trunk/src/mode_sahelien/reconstitution_30100_eof23.m @ 30

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

correction of usage of save function

File size: 2.6 KB
Line 
1%
2
3clear;
4close all;
5
6%lon=[-30:2.5:30], lat=[-10:2.5:30]
7
8status=load('eof_30100_jjas.mat','C','olr');
9C=status.C;
10olr=status.olr;
11clear status;
12
13olr=olr';
14PC1=olr*C;
15
16cosa=zeros(4,3416,425);
17% boucle sur les VP
18for a=1:4;
19      for b=1:3416 % boucle sur le temps
20          for c=1:425 % boucle sur l espace
21             cosa(a,b,c)=PC1(b,426-a)*C(c,426-a);
22          end;
23      end;
24end;
25
26cosa1(:,:)=cosa(1,:,:);
27cosa1=reshape(cosa1,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
51cosa23=cosa23(:,lon1:lon2,lat1:lat2);
52clear cosi2;
53cosa23=reshape(cosa23,3416,taille);
54cosa23=cosa23';
55cosa23=mean(cosa23);
56cosa23=cosa23';
57save('eof23_30100.txt','cosa23','-ASCII');
58std23=std(cosa23);
59cosa23=cosa23/std23;
60cosa23=reshape(cosa23,122,28);
61
62% On selectionne la demaine geographique
63
64cosa1=cosa1(:,lon1:lon2,lat1:lat2);
65clear olr;
66cosa1=reshape(cosa1,3416,taille);
67clear taille;
68cosa1=cosa1';
69cosa1=mean(cosa1);
70cosa1=cosa1';
71std1=std(cosa1);
72cosa1=cosa1/std1;
73cosa1=reshape(cosa1,122,28);
74
75for a=1:28;
76     if a<12;
77        figure(1);
78        subplot(4,3,a);
79     elseif a<24
80        figure(2);
81        subplot(4,3,a-11);
82     else
83        figure(3);
84        subplot(4,3,a-23);
85     end;
86     y1=cosa1(:,a);
87     y2=cosa23(:,a);
88     x=[1:122]';
89     aa=plot(x,y1,'k','Linewidth',1);
90     hold on;
91     bb=plot(x,-y2,'r','Linewidth',1);
92     y5=zeros(122,1);
93     plot(x,y5,'k:','Linewidth',1);
94
95     title(a+1978,'Fontsize',8);
96     if a==2;
97         text(0,65,'OLR 7.5 -12.5N et 10W - 10E');
98     elseif a==13;
99         text(0,65,'OLR 7.5 -12.5N et 10W - 10E');
100     end;
101     set (gca,'tickDir','out');
102     if a==11;
103        aa=legend('OLR EOF1','OLR EOF23');
104        set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.2470 0.1642])
105        legend boxoff;
106     elseif a==22;
107        clear aa;
108        aa=legend('OLR EOF1','OLR EOF23');
109        set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.2470 0.1642])
110        legend boxoff;
111     end;
112     axis([1 122 -3 3]);
113     set (gca,'YTick',[-3:1:3],'YTickLabel',[-3:1:3],'fontname','Arial','fontsize',6);
114   set (gca,'XTick',[10:10:122],'XTickLabel',[10:10:122],'fontname','Arial','fontsize',6);
115
116end;
117
118figure(1);
119print('-depsc2','reconstitution1_eof23_30100.eps');
120figure(2);
121print('-depsc2','reconstitution2_eof23_30100.eps');
122figure(3);
123print('-depsc2','reconstitution3_eof23_30100.eps');
Note: See TracBrowser for help on using the repository browser.