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

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

parametrisation of time_serie_ER_rossby_...complet.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_1030.m_
35%
36% .. _carte_eof_ER_jjas_1030.m : carte_eof_ER_jjas_1030.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%     days will be now written ``ndmin``\-``ndmaxd`` (ex: 10-30d) in filenames
63%
64%-
65
66global IRCAAM_ID;
67global IRCAAM_OD;
68
69if nargin==2
70 % ndmin must be lower than ndmax
71 if (ndmin > ndmax)
72  disp(['ndmin = ', int2str(ndmin)]);
73  disp(['ndmax = ', int2str(ndmax)]);
74  error('eee : ndmin must be lower than ndmax');
75 end
76else
77  usage='usage : time_serie_ER_rossby_df(ndmin, ndmax)';
78  disp(usage);
79  error('eee : wrong arguments numbers')
80end
81
82% ndmin and ndmax will be used in xx-yyd form in filenames
83df = [int2str(ndmin),'-',int2str(ndmax),'d'];
84clear ndmin;
85clear ndmax;
86
87fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat'];
88status=load(fullfilename,'C','olr');
89clear fullfilename;
90C=status.C;
91olr=status.olr;
92clear status;
93
94olr=olr';
95PC1=olr*C;
96
97time_serie_olr1=PC1(:,425);
98time_serie_olr2=PC1(:,424);
99year=zeros(122,28);
100for a=1:122
101    for b=1:28;
102       year(a,b)=1979+(b-1);
103    end;
104end;
105year=reshape(year,3416,1);
106
107day=zeros(122,28);
108for a=1:122
109    for b=1:28;
110       day(a,b)=31+28+31+30+31+a;
111    end;
112end;
113day=reshape(day,3416,1);
114
115table_ER=zeros(3416,4);
116for a=1:3416;
117     for b=1:4;
118        table_ER(a,1)=year(a);
119        table_ER(a,2)=day(a);
120        table_ER(a,3)=time_serie_olr1(a);
121        table_ER(a,4)=time_serie_olr2(a);
122     end;
123end;
124
125fullfilename=[IRCAAM_OD,'table_ER_',df,'.txt'];
126save(fullfilename,'table_ER','-ASCII');
127clear fullfilename;
128
129a=1;
130clear koro1
131debut=(a-1)*122+1;
132fin=a*122;
133koro1=time_serie_olr1(debut:fin);
134koro2=time_serie_olr2(debut:fin);
135x=[1:122]';
136aa=plot(x,-koro1,'r');
137hold on;
138bb=plot(x,-koro2,'k');
139cc=legend('EOF1','EOF2');
140set (cc,'fontsize',6);
141legend boxoff
142y=zeros(122,1);
143plot(x,y,'k:');
144
145set (gca,'tickDir','out');
146axis([1 122 -100 100]);
147
148set (gca,'YTick',[-100:20:100],'YTickLabel',[-100:20:100],'fontname','Arial','fontsize',6);
149set (gca,'XTick',[0:20:120],'XTickLabel',[0:20:120],'fontname','Arial','fontsize',6);
Note: See TracBrowser for help on using the repository browser.