source: trunk/src/mode_sahelien/reconstitution.m @ 18

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

squeeze multiple blank lines

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