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