source: trunk/src/mode_sahelien/reconstitution_ER_rossby_df.m @ 45

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

parametrisation of reconstitution_ER_rossby_....m

File size: 4.8 KB
Line 
1function reconstitution_ER_rossby_df(ndmin, ndmax)
2% reconstitution_ER_rossby_df ++explication between ndmin days and ndmax days
3
4%+
5% module
6% ======
7%
8% ++
9%
10% DESCRIPTION
11% ===========
12%
13% plot ++ from file eof_rossby_jjas_2006_10-30d.mat,
14% produce a ASCII file eof12_rossby_10-30d.txt,
15% produce 3 Postscript files reconstitution1_eof12_filtreER_10-30d.eps
16%
17% EXAMPLES
18% ========
19%
20% Following line read eof_rossby_jjas_2006_10-30d.mat, produce an ASCII file
21% eof12_rossby_10-30d.txt, produce 3 Postscript files
22% reconstitution1_eof12_filtreER_10-30d.eps.
23% ::
24%
25% >> reconstitution_ER_rossby_df(10,30);
26%
27% SEE ALSO
28% ========
29%
30% carte_eof_ER_jjas_df.m_
31%
32% .. _carte_eof_ER_jjas_df.m : carte_eof_ER_jjas_df.m.html
33%
34% carte_eofER_1030_article.m_
35%
36% .. _carte_eofER_1030_article.m : carte_eofER_1030_article.m.html
37%
38% time_serie_ER_rossby_df.m_
39%
40% .. _time_serie_ER_rossby_df.m : time_serie_ER_rossby_df.m.html
41%
42% time_serie_ER_rossby_df_complet.m_
43%
44% .. _time_serie_ER_rossby_df_complet.m : time_serie_ER_rossby_df_complet.m.html
45%
46% TODO
47% ====
48%
49% improve description
50%
51% improve file pb
52%
53% use return function
54%
55% clean variables and plot
56%
57% EVOLUTIONS
58% ==========
59%
60% $Id$
61%
62% - fplod 2009-01-28T07:50:45Z aedon.locean-ipsl.upmc.fr (Darwin)
63%
64%   * created from reconstitution_ER_rossby_1030.m to replace it as well as
65%     reconstitution_ER_rossby_30100.m
66%
67%     Days will be now written ``ndmin``\-``ndmaxd`` (ex: 10-30d) in filenames.
68%
69%-
70
71global IRCAAM_ID;
72global IRCAAM_OD;
73
74if nargin==2
75 % ndmin must be lower than ndmax
76 if (ndmin > ndmax)
77  disp(['ndmin = ', int2str(ndmin)]);
78  disp(['ndmax = ', int2str(ndmax)]);
79  error('eee : ndmin must be lower than ndmax');
80 end
81else
82  usage='usage : reconstitution_ER_rossby_df(ndmin, ndmax)';
83  disp(usage);
84  error('eee : wrong arguments numbers')
85end
86% ndmin and ndmax will be used in xx-yyd form in filenames
87df = [int2str(ndmin),'-',int2str(ndmax),'d'];
88clear ndmin;
89clear ndmax;
90
91close all;
92
93%lon=[-30:2.5:30], lat=[-10:2.5:30]
94
95fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat'];
96status=load(fullfilename,'C','olr');
97clear fullfilename;
98
99C=status.C;
100olr=status.olr;
101clear status;
102
103olr=olr';
104PC1=olr*C;
105
106cosa=zeros(3,3416,425);
107% boucle sur les VP
108for a=1:3;
109      for b=1:3416 % boucle sur le temps
110          for c=1:425 % boucle sur l espace
111             cosa(a,b,c)=PC1(b,426-a)*C(c,426-a);
112          end;
113      end;
114end;
115
116cosa1(:,:)=cosa(1,:,:);
117cosa1=reshape(cosa1,3416,25,17);
118
119cosa2(:,:)=cosa(2,:,:);
120cosa2=reshape(cosa2,3416,25,17);
121
122cosabis=cosa(1:2,:,:);
123cosa12(:,:)=sum(cosabis);
124clear cosabis;
125cosa12=reshape(cosa12,3416,25,17);
126
127figure(1);
128orient('landscape')
129figure(2);
130orient('landscape')
131figure(3);
132orient('landscape')
133
134% On selectionne la demaine geographique
135
136% la latitude : 7.5N (8) 12.5N (10)
137% la longitude : 10W (9) 10E(17)
138lat1=8;
139lat2=10;
140lon1=9;
141lon2=17;
142taille=(lat2-lat1+1)*(lon2-lon1+1);
143
144cosa12=cosa12(:,lon1:lon2,lat1:lat2);
145clear cosi2;
146cosa12=reshape(cosa12,3416,taille);
147cosa12=cosa12';
148cosa12=mean(cosa12);
149cosa12=cosa12';
150
151fullfilename=[IRCAAM_ID,'eof12_rossby_',df,'.txt'];
152save(fullfilename,'cosa12','-ASCII');
153clear fullfilename;
154
155cosa12=reshape(cosa12,122,28);
156
157% On selectionne la demaine geographique
158olr=reshape(olr,3416,25,17);
159cosa4=olr(:,lon1:lon2,lat1:lat2);
160clear olr;
161cosa4=reshape(cosa4,3416,taille);
162clear taille;
163cosa4=cosa4';
164cosa4=mean(cosa4);
165cosa4=cosa4';
166cosa4=reshape(cosa4,122,28);
167
168for a=1:28;
169     if a<12;
170        figure(1);
171        subplot(4,3,a);
172     elseif a<24
173        figure(2);
174        subplot(4,3,a-11);
175     else
176        figure(3);
177        subplot(4,3,a-23);
178     end;
179     y2=cosa12(:,a);
180     y4=cosa4(:,a);
181     x=[1:122]';
182     plot(x,y2);
183     hold on;
184     plot(x,y4,'k');
185     y5=zeros(122,1);
186     plot(x,y5,'k:');
187
188     title(a+1978,'Fontsize',8);
189     if a==2;
190         text(0,65,'OLR 5 -17.5N et 10W - 10E');
191     elseif a==13;
192         text(0,65,'OLR 5 - 17.5N et 10W - 10E');
193     end;
194     set (gca,'tickDir','out');
195     if a==11;
196        aa=legend('OLR VP1-2','OLR NOAA');
197        set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.1270 0.1642])
198        legend boxoff;
199     elseif a==22;
200        clear aa;
201        aa=legend('OLR VP1-2','OLR NOAA');
202        set (aa,'fontsize',8,'Position',[0.6800 0.1039 0.1270 0.1642])
203        legend boxoff;
204     end;
205     axis([1 122 -15 15]);
206     set (gca,'YTick',[-15:5:15],'YTickLabel',[-15:5:15],'fontname','Arial','fontsize',6);
207   set (gca,'XTick',[10:10:122],'XTickLabel',[10:10:122],'fontname','Arial','fontsize',6);
208
209end;
210
211figure(1);
212fullfilename=[IRCAAM_OD,'reconstitution1_eof12_filtreER_',df,'.eps'];
213print('-depsc2',fullfilename);
214clear fullfilename;
215
216figure(2);
217fullfilename=[IRCAAM_OD,'reconstitution2_eof12_filtreER_',df,'.eps'];
218print('-depsc2',fullfilename);
219clear fullfilename;
220
221figure(3);
222fullfilename=[IRCAAM_OD,'reconstitution3_eof12_filtreER_',df,'.eps'];
223print('-depsc2',fullfilename);
224clear fullfilename;
Note: See TracBrowser for help on using the repository browser.