source: trunk/src/mode_sahelien/reconstitution.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: 3.1 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
70
71% On selectionne la demaine geographique
72olr_centre=reshape(olr_centre,2684,17,25);
73cosa4=olr_centre(:,7:12,9:17);
74clear olr_centre;
75cosa4=reshape(cosa4,2684,taille);
76clear taille;
77cosa4=cosa4';
78cosa4=mean(cosa4);
79cosa4=cosa4';
80cosa4=reshape(cosa4,122,22);
81
82for a=1:22;
83     if a<12;
84        figure(1);
85        subplot(4,3,a);
86     else
87        figure(2);
88        subplot(4,3,a-11);
89     end
90     y1=cosa1(:,a);
91     y2=cosa2(:,a);
92     y3=cosa3(:,a);
93     y4=cosa4(:,a);
94     x=[1:122]';
95     plot(x,y1,'r');
96     hold on;
97     plot(x,y2);
98     plot(x,y3,'g');
99     plot(x,y4,'k');
100     y5=zeros(122,1);
101     plot(x,y5,'k:');
102
103     title(a+1978,'Fontsize',8);
104     if a==2;
105         text(0,65,'OLR 5 -17.5N et 10W - 10E');
106     elseif a==13;
107         text(0,65,'OLR 5 - 17.5N et 10W - 10E');
108     end
109     set (gca,'tickDir','out');
110     if a==11;
111        aa=legend('OLR VP1','OLR VP1-2','OLR VP1-3','OLR NOAA');
112        set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.1270 0.1642])
113        legend boxoff;
114     elseif a==22;
115        clear aa;
116        aa=legend('OLR VP1','OLR VP1-2','OLR VP1-3','OLR NOAA');
117        set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.1270 0.1642])
118        legend boxoff;
119     elseif a==22;
120        clear aa;
121        aa=legend('OLR VP1','OLR VP1-2','OLR VP1-3','OLR NOAA');
122        set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.1270 0.1642])
123        legend boxoff;
124     end;
125     axis([1 122 -40 40]);
126     set (gca,'YTick',[-40:20:40],'YTickLabel',[-40:20:40],'fontname','Arial','fontsize',6);
127   set (gca,'XTick',[10:10:90],'XTickLabel',[10:10:90],'fontname','Arial','fontsize',6);
128
129end;
130
131
132
133figure(1);
134print -depsc2 reconstitution_OLR_JJAS_part1.eps;
135figure(2);
136print -depsc2 reconstitution_OLR_JJAS_part2.eps;
137figure(3);
138print -depsc2 reconstitution_OLR_JJAS_part3.eps;
Note: See TracBrowser for help on using the repository browser.