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

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

fix some links in manuals

File size: 3.6 KB
Line 
1function time_serie_ER_rossby_df_complet(period1, period2)
2% time_serie_ER_rossby_df_complet ++explication between period1 days and period2 days
3
4%+
5%
6%  .. _time_serie_ER_rossby_df_complet.m:
7%
8% =================================
9% time_serie_ER_rossby_df_complet.m
10% =================================
11%
12% ++
13%
14% DESCRIPTION
15% ===========
16%
17% plot ++ from file :file:`eof_rossby_jjas_2006_10-30d.mat`
18%
19% EXAMPLES
20% ========
21%
22% Following line read :file:`eof_rossby_jjas_2006_10-30d.mat`, plot ++and produce Postscript files :file:`time_serie_eof_ER_10-30d_part*.eps`.
23%
24% ::
25%
26% >> time_serie_ER_rossby_df_complet(10,30);
27%
28% SEE ALSO
29% ========
30%
31% :ref:`olr_eof_jjas2006_rossby_df.m`
32%
33% :ref:`carte_eof_ER_1030_article.m`
34%
35% :ref:`carte_eof_ER_jjas_df.m`
36%
37% :ref:`time_serie_ER_rossby_df.m`
38%
39% TODO
40% ====
41%
42% improve description
43%
44% improve file pb
45%
46% use return function
47%
48% EVOLUTIONS
49% ==========
50%
51% $Id$
52%
53% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin)
54%
55%   * add try/catch on opening file for reading
56%
57% - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin)
58%
59%   * replace ndmin by period1 and ndmax by period2
60%
61% - fplod 2009-01-27T11:51:31Z aedon.locean-ipsl.upmc.fr (Darwin)
62%
63%   * created from time_serie_ER_rossby_1030_complet.m to replace it as well as
64%     time_serie_ER_rossby_30100_complet.m
65%
66%     Days will be now written ``period1``\-``period2d`` (ex: 10-30d) in filenames.
67%
68%-
69
70global IRCAAM_ID;
71global IRCAAM_OD;
72
73if nargin==2
74 % period1 must be lower than period2
75 if (period1 > period2)
76  disp(['period1 = ', int2str(period1)]);
77  disp(['period2 = ', int2str(period2)]);
78  error('eee : period1 must be lower than period2');
79 end
80else
81  usage='usage : time_serie_ER_rossby_df(period1, period2)';
82  disp(usage);
83  error('eee : wrong arguments numbers')
84end
85
86% period1 and period2 will be used in xx-yyd form in filenames
87df = [int2str(period1),'-',int2str(period2),'d'];
88clear period1;
89clear period2;
90
91close all;
92
93figure(1);
94orient('landscape')
95figure(2);
96orient('landscape')
97figure(3);
98orient('landscape')
99
100fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat'];
101try
102 status=load(fullfilename,'C','olr');
103catch
104 error('eee : File %s not found\n', fullfilename);
105end
106
107clear fullfilename;
108C=status.C;
109olr=status.olr;
110clear status;
111
112olr=olr';
113PC1=olr*C;
114
115time_serie_olr1=PC1(:,425);
116time_serie_olr2=PC1(:,424);
117
118for a=1:28;
119   if a<12;
120      figure(1);
121      subplot(4,3,a);
122   elseif a<23;
123      figure(2);
124      subplot(4,3,a-11);
125   else
126      figure(3);
127      subplot(4,3,a-22);
128   end;
129   clear koro1
130   debut=(a-1)*122+1;
131   fin=a*122;
132   koro1=time_serie_olr1(debut:fin);
133   koro2=time_serie_olr2(debut:fin);
134   x=[1:122]';
135   aa=plot(x,-koro1,'r');
136   hold on;
137   bb=plot(x,-koro2,'k');
138%   cc=legend('EOF1','EOF2')
139%   set (cc,'fontsize',6)
140%   legend boxoff;
141   y=zeros(122,1);
142   plot(x,y,'k:');
143   if a==2;
144       text(0,183,['time series EOF1 and EOF2 OLR ER ' df]);
145   elseif a==13;
146       text(0,183,['time series EOF1 and EOF2 OLR ER ' df]);
147   elseif a==24;
148       text(0,183,['time series EOF1 and EOF2 OLR ER ' df]);
149   end;
150   title(a+1978,'FontSize',8);
151   set (gca,'tickDir','out');
152axis([1 122 -100 100]);
153
154set (gca,'YTick',[-100:20:100],'YTickLabel',[-100:20:100],'fontname','Arial','fontsize',6);
155set (gca,'XTick',[0:20:120],'XTickLabel',[0:20:120],'fontname','Arial','fontsize',6);
156end;
157
158figure(1);
159fullfilename=[IRCAAM_OD,'time_serie_eof_ER_',df,'_part1.eps'];
160print('-depsc2',fullfilename);
161figure(2);
162fullfilename=[IRCAAM_OD,'time_serie_eof_ER_',df,'_part2.eps'];
163print('-depsc2',fullfilename);
164figure(3);
165fullfilename=[IRCAAM_OD,'time_serie_eof_ER_',df,'_part3.eps'];
166print('-depsc2',fullfilename);
Note: See TracBrowser for help on using the repository browser.