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