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

Last change on this file since 91 was 91, checked in by pinsard, 10 years ago

fix thanks to coding rules

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