source: trunk/src/mode_sahelien/time_serie_ER_rossby_df.m @ 71

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

add man troff output of manuals and some light modification in sources due to docutils upgrade (0.6); warning : new troubles with target

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