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

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

replace fcommands save, load and print by function calls

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