source: trunk/src/mode_sahelien/time_serie_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: 3.1 KB
Line 
1function time_serie_ER_rossby_df(ndmin, ndmax)
2% time_serie_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%
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% >> time_serie_ER_rossby_df(10,30);
22%
23% SEE ALSO
24% ========
25%
26% olr_eof_jjas2006_rossby_df.m_
27%
28% .. _olr_eof_jjas2006_rossby_df.m : olr_eof_jjas2006_rossby_df.m.html
29%
30% carte_eofER_1030_article.m_
31%
32% .. _carte_eofER_1030_article.m : carte_eofER_1030_article.m.html
33%
34% carte_eof_ER_jjas_df.m_
35%
36% .. _carte_eof_ER_jjas_df.m : carte_eof_ER_jjas_df.m.html
37%
38% time_serie_ER_rossby_df_complet.m_
39%
40% .. _time_serie_ER_rossby_df_complet.m : time_serie_ER_rossby_df_complet.m.html
41%
42% reconstitution_ER_rossby_df.m_
43%
44% .. _reconstitution_ER_rossby_df.m : reconstitution_ER_rossby_df.m.html
45%
46% TODO
47% ====
48%
49% improve description
50%
51% improve file pb
52%
53% use return function
54%
55% find where ``table_ER_??-??d.txt`` are used
56%
57% EVOLUTIONS
58% ==========
59%
60% $Id$
61%
62% - fplod 2009-01-27T10:07:29Z aedon.locean-ipsl.upmc.fr (Darwin)
63%
64%   * created from time_serie_ER_rossby_1030.m to replace it as well as
65%     time_serie_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 : time_serie_ER_rossby_df(ndmin, ndmax)';
83  disp(usage);
84  error('eee : wrong arguments numbers')
85end
86
87% ndmin and ndmax will be used in xx-yyd form in filenames
88df = [int2str(ndmin),'-',int2str(ndmax),'d'];
89clear ndmin;
90clear ndmax;
91
92fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat'];
93status=load(fullfilename,'C','olr');
94clear fullfilename;
95C=status.C;
96olr=status.olr;
97clear status;
98
99olr=olr';
100PC1=olr*C;
101
102time_serie_olr1=PC1(:,425);
103time_serie_olr2=PC1(:,424);
104year=zeros(122,28);
105for a=1:122
106    for b=1:28;
107       year(a,b)=1979+(b-1);
108    end;
109end;
110year=reshape(year,3416,1);
111
112day=zeros(122,28);
113for a=1:122
114    for b=1:28;
115       day(a,b)=31+28+31+30+31+a;
116    end;
117end;
118day=reshape(day,3416,1);
119
120table_ER=zeros(3416,4);
121for a=1:3416;
122     for b=1:4;
123        table_ER(a,1)=year(a);
124        table_ER(a,2)=day(a);
125        table_ER(a,3)=time_serie_olr1(a);
126        table_ER(a,4)=time_serie_olr2(a);
127     end;
128end;
129
130fullfilename=[IRCAAM_OD,'table_ER_',df,'.txt'];
131save(fullfilename,'table_ER','-ASCII');
132clear fullfilename;
133
134a=1;
135clear koro1
136debut=(a-1)*122+1;
137fin=a*122;
138koro1=time_serie_olr1(debut:fin);
139koro2=time_serie_olr2(debut:fin);
140x=[1:122]';
141aa=plot(x,-koro1,'r');
142hold on;
143bb=plot(x,-koro2,'k');
144cc=legend('EOF1','EOF2');
145set (cc,'fontsize',6);
146legend boxoff
147y=zeros(122,1);
148plot(x,y,'k:');
149
150set (gca,'tickDir','out');
151axis([1 122 -100 100]);
152
153set (gca,'YTick',[-100:20:100],'YTickLabel',[-100:20:100],'fontname','Arial','fontsize',6);
154set (gca,'XTick',[0:20:120],'XTickLabel',[0:20:120],'fontname','Arial','fontsize',6);
Note: See TracBrowser for help on using the repository browser.