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

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

replace fcommands save, load and print by function calls

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