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

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

modif. of headers for manuals hyperlinks improvements

File size: 3.6 KB
RevLine 
[56]1function time_serie_ER_rossby_df_complet(period1, period2)
2% time_serie_ER_rossby_df_complet ++explication between period1 days and period2 days
[32]3
4%+
[17]5%
[82]6%  .. _time_serie_ER_rossby_df_complet.m:
7%
[75]8% =================================
9% time_serie_ER_rossby_df_complet.m
10% =================================
11%
[32]12% ++
13%
14% DESCRIPTION
15% ===========
16%
17% plot ++ from file eof_rossby_jjas_2006_10-30d.mat
18%
19% EXAMPLES
20% ========
21%
22% Following line read eof_rossby_jjas_2006_10-30d.mat, plot ++and produce Postscript files time_serie_eof_ER_10-30d_part*.eps.
[71]23%
[32]24% ::
25%
26% >> time_serie_ER_rossby_df_complet(10,30);
27%
28% SEE ALSO
29% ========
30%
[82]31% :ref:`olr_eof_jjas2006_rossby_df.m`
[32]32%
[82]33% :ref:`carte_eofER_1030_article.m`
[32]34%
[82]35% :ref:`carte_eof_ER_jjas_df.m`
[32]36%
[82]37% :ref:`time_serie_ER_rossby_df.m`
[32]38%
39% TODO
40% ====
41%
42% improve description
[33]43%
[32]44% improve file pb
[33]45%
[32]46% use return function
47%
48% EVOLUTIONS
49% ==========
50%
[59]51% $Id$
[56]52%
[59]53% - fplod 2009-02-11T16:27:34Z aedon.locean-ipsl.upmc.fr (Darwin)
54%
55%   * add try/catch on opening file for reading
56%
[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%
[32]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%
[56]66%     Days will be now written ``period1``\-``period2d`` (ex: 10-30d) in filenames.
[33]67%
[32]68%-
[17]69
[32]70global IRCAAM_ID;
71global IRCAAM_OD;
72
73if nargin==2
[56]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');
[32]79 end
80else
[56]81  usage='usage : time_serie_ER_rossby_df(period1, period2)';
[32]82  disp(usage);
83  error('eee : wrong arguments numbers')
84end
85
[56]86% period1 and period2 will be used in xx-yyd form in filenames
87df = [int2str(period1),'-',int2str(period2),'d'];
88clear period1;
89clear period2;
[32]90
[17]91close all;
92
93figure(1);
94orient('landscape')
95figure(2);
96orient('landscape')
97figure(3);
98orient('landscape')
99
[32]100fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat'];
[59]101try
102 status=load(fullfilename,'C','olr');
103catch
104 error('eee : File %s not found\n', fullfilename);
105end
106
[32]107clear fullfilename;
[24]108C=status.C;
109olr=status.olr;
110clear status;
111
[17]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);
[21]128   end;
[17]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;
[32]144       text(0,183,['time series EOF1 and EOF2 OLR ER ' df]);
[25]145   elseif a==13;
[32]146       text(0,183,['time series EOF1 and EOF2 OLR ER ' df]);
[17]147   elseif a==24;
[32]148       text(0,183,['time series EOF1 and EOF2 OLR ER ' df]);
[21]149   end;
[17]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);
[21]156end;
[17]157
158figure(1);
[32]159fullfilename=[IRCAAM_OD,'time_serie_eof_ER_',df,'_part1.eps'];
160print('-depsc2',fullfilename);
[17]161figure(2);
[32]162fullfilename=[IRCAAM_OD,'time_serie_eof_ER_',df,'_part2.eps'];
163print('-depsc2',fullfilename);
[17]164figure(3);
[32]165fullfilename=[IRCAAM_OD,'time_serie_eof_ER_',df,'_part3.eps'];
166print('-depsc2',fullfilename);
Note: See TracBrowser for help on using the repository browser.