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

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

parametrisation of carte_eof_ER_jjas_....m

File size: 3.0 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_1030.m_
27%
28% .. _olr_eof_jjas2006_rossby_1030.m : olr_eof_jjas2006_rossby_1030.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% TODO
43% ====
44%
45% improve description
46%
47% improve file pb
48%
49% use return function
50%
51% find where ``table_ER_??-??d.txt`` are used
52%
53% EVOLUTIONS
54% ==========
55%
56% $Id$
57%
58% - fplod 2009-01-27T10:07:29Z aedon.locean-ipsl.upmc.fr (Darwin)
59%
60%   * created from time_serie_ER_rossby_1030.m to replace it as well as
61%     time_serie_ER_rossby_30100.m
62%
63%     Days will be now written ``ndmin``\-``ndmaxd`` (ex: 10-30d) in filenames.
64%
65%-
66
67global IRCAAM_ID;
68global IRCAAM_OD;
69
70if nargin==2
71 % ndmin must be lower than ndmax
72 if (ndmin > ndmax)
73  disp(['ndmin = ', int2str(ndmin)]);
74  disp(['ndmax = ', int2str(ndmax)]);
75  error('eee : ndmin must be lower than ndmax');
76 end
77else
78  usage='usage : time_serie_ER_rossby_df(ndmin, ndmax)';
79  disp(usage);
80  error('eee : wrong arguments numbers')
81end
82
83% ndmin and ndmax will be used in xx-yyd form in filenames
84df = [int2str(ndmin),'-',int2str(ndmax),'d'];
85clear ndmin;
86clear ndmax;
87
88fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat'];
89status=load(fullfilename,'C','olr');
90clear fullfilename;
91C=status.C;
92olr=status.olr;
93clear status;
94
95olr=olr';
96PC1=olr*C;
97
98time_serie_olr1=PC1(:,425);
99time_serie_olr2=PC1(:,424);
100year=zeros(122,28);
101for a=1:122
102    for b=1:28;
103       year(a,b)=1979+(b-1);
104    end;
105end;
106year=reshape(year,3416,1);
107
108day=zeros(122,28);
109for a=1:122
110    for b=1:28;
111       day(a,b)=31+28+31+30+31+a;
112    end;
113end;
114day=reshape(day,3416,1);
115
116table_ER=zeros(3416,4);
117for a=1:3416;
118     for b=1:4;
119        table_ER(a,1)=year(a);
120        table_ER(a,2)=day(a);
121        table_ER(a,3)=time_serie_olr1(a);
122        table_ER(a,4)=time_serie_olr2(a);
123     end;
124end;
125
126fullfilename=[IRCAAM_OD,'table_ER_',df,'.txt'];
127save(fullfilename,'table_ER','-ASCII');
128clear fullfilename;
129
130a=1;
131clear koro1
132debut=(a-1)*122+1;
133fin=a*122;
134koro1=time_serie_olr1(debut:fin);
135koro2=time_serie_olr2(debut:fin);
136x=[1:122]';
137aa=plot(x,-koro1,'r');
138hold on;
139bb=plot(x,-koro2,'k');
140cc=legend('EOF1','EOF2');
141set (cc,'fontsize',6);
142legend boxoff
143y=zeros(122,1);
144plot(x,y,'k:');
145
146set (gca,'tickDir','out');
147axis([1 122 -100 100]);
148
149set (gca,'YTick',[-100:20:100],'YTickLabel',[-100:20:100],'fontname','Arial','fontsize',6);
150set (gca,'XTick',[0:20:120],'XTickLabel',[0:20:120],'fontname','Arial','fontsize',6);
Note: See TracBrowser for help on using the repository browser.