1 | function time_serie_jjas_df(period1, period2) |
---|
2 | % time_serie_jjas_df ++explication between period1 days and period2 days |
---|
3 | |
---|
4 | %+ |
---|
5 | % module |
---|
6 | % ====== |
---|
7 | % |
---|
8 | % ++ |
---|
9 | % |
---|
10 | % DESCRIPTION |
---|
11 | % =========== |
---|
12 | % |
---|
13 | % From eof_\ *period1*\ -\ *period2*\ d_jjas.mat, |
---|
14 | % ``time_serie_jjas_df`` compute ++. |
---|
15 | % |
---|
16 | % ``time_serie_jjas_df`` plot ++. |
---|
17 | % |
---|
18 | % ``time_serie_jjas_df`` save eof[123]\ *period1*\ -\ *period2*\ d.txt. |
---|
19 | % |
---|
20 | % 2 Postscript files |
---|
21 | % time_serie_jjas_\ *period1*\ -\ *period2*\ d_part[12].eps are |
---|
22 | % written. |
---|
23 | % |
---|
24 | % EXAMPLES |
---|
25 | % ======== |
---|
26 | % |
---|
27 | % Following line read ``eof_10-30d_jjas.mat``, |
---|
28 | % compute ++, |
---|
29 | % plot ++, |
---|
30 | % write ``eof[123]_10-30d.txt`` and |
---|
31 | % write ``time_serie_jjas_eof1_10-30d_part[12].eps`` |
---|
32 | % :: |
---|
33 | % |
---|
34 | % >> time_serie_jjas_df(10,30); |
---|
35 | % |
---|
36 | % SEE ALSO |
---|
37 | % ======== |
---|
38 | % |
---|
39 | % composite_olr_eof_df_ |
---|
40 | % |
---|
41 | % .. _composite_olr_eof_df : composite_olr_eof_df.html |
---|
42 | % |
---|
43 | % TODO |
---|
44 | % ==== |
---|
45 | % |
---|
46 | % improve description |
---|
47 | % |
---|
48 | % improve file pb |
---|
49 | % |
---|
50 | % use return function |
---|
51 | % |
---|
52 | % nb of figure depends on number of years to be plot : so figure(3) contains |
---|
53 | % something only if nb years > 23 (or so), so Postscript file of figure(3) |
---|
54 | % shoul not be saved if nb years is less than 23 ! |
---|
55 | % |
---|
56 | % EVOLUTIONS |
---|
57 | % ========== |
---|
58 | % |
---|
59 | % $Id$ |
---|
60 | % |
---|
61 | % - fplod 2009-02-10T14:28:00Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
62 | % |
---|
63 | % * replace ndmin by period1 and ndmax by period2 |
---|
64 | % |
---|
65 | % - fplod 2009-01-28T15:28:54Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
66 | % |
---|
67 | % * created from time_serie_jjas_30100.m to replace it as well as |
---|
68 | % time_serie_jjas.m, time_serie_jjas_25_90.m and time_serie_jjas_10_25.m |
---|
69 | % |
---|
70 | % Days will be now written ``period1``\-``period2d`` (ex: 10-30d) in filenames. |
---|
71 | % |
---|
72 | %- |
---|
73 | |
---|
74 | global IRCAAM_ID; |
---|
75 | global IRCAAM_OD; |
---|
76 | |
---|
77 | if nargin==2 |
---|
78 | % period1 must be lower than period2 |
---|
79 | if (period1 > period2) |
---|
80 | disp(['period1 = ', int2str(period1)]); |
---|
81 | disp(['period2 = ', int2str(period2)]); |
---|
82 | error('eee : period1 must be lower than period2'); |
---|
83 | end |
---|
84 | else |
---|
85 | usage='usage : time_serie_jjas_df(period1, period2)'; |
---|
86 | disp(usage); |
---|
87 | error('eee : wrong arguments numbers') |
---|
88 | end |
---|
89 | |
---|
90 | % period1 and period2 will be used in xx-yyd form in filenames |
---|
91 | df = [int2str(period1),'-',int2str(period2),'d']; |
---|
92 | clear period1; |
---|
93 | clear period2; |
---|
94 | |
---|
95 | fullfilename=[IRCAAM_ID,'eof_', df, '_jjas.mat']; |
---|
96 | status=load(fullfilename); |
---|
97 | clear fullfilename; |
---|
98 | C=status.C; |
---|
99 | olr=status.olr; |
---|
100 | clear status; |
---|
101 | |
---|
102 | olr=olr'; |
---|
103 | PC1=olr*C; |
---|
104 | |
---|
105 | %%%%%%% cronique de la VP1 |
---|
106 | time_serie_olr1=PC1(:,425); |
---|
107 | time_serie_olr2=PC1(:,424); |
---|
108 | time_serie_olr3=PC1(:,423); |
---|
109 | |
---|
110 | dt_olr1=std(time_serie_olr1); |
---|
111 | dt_olr2=std(time_serie_olr2); |
---|
112 | dt_olr3=std(time_serie_olr3); |
---|
113 | |
---|
114 | for a=1:3416; |
---|
115 | time_serie_olr1(a)=time_serie_olr1(a)/dt_olr1; |
---|
116 | time_serie_olr2(a)=time_serie_olr2(a)/dt_olr2; |
---|
117 | time_serie_olr3(a)=time_serie_olr3(a)/dt_olr3; |
---|
118 | end; |
---|
119 | |
---|
120 | fullfilename=[IRCAAM_ID,'eof1_',df,'.txt']; |
---|
121 | save(fullfilename,'time_serie_olr1','-ASCII'); |
---|
122 | clear fullfilename; |
---|
123 | |
---|
124 | fullfilename=[IRCAAM_ID,'eof2_',df,'.txt']; |
---|
125 | save(fullfilename,'time_serie_olr2','-ASCII'); |
---|
126 | clear fullfilename; |
---|
127 | |
---|
128 | fullfilename=[IRCAAM_ID,'eof3_',df,'.txt']; |
---|
129 | save(fullfilename,'time_serie_olr3','-ASCII'); |
---|
130 | clear fullfilename; |
---|
131 | |
---|
132 | x=[1:3416]'; |
---|
133 | for a=1:22; |
---|
134 | if a<12; |
---|
135 | figure(1); |
---|
136 | subplot(4,3,a); |
---|
137 | elseif a<23; |
---|
138 | figure(2); |
---|
139 | subplot(4,3,a-11); |
---|
140 | else |
---|
141 | figure(3); |
---|
142 | subplot(4,3,a-22); |
---|
143 | end; |
---|
144 | clear koro1; |
---|
145 | debut=(a-1)*122+1; |
---|
146 | fin=a*122; |
---|
147 | koro1=time_serie_olr1(debut:fin); |
---|
148 | |
---|
149 | clear x; |
---|
150 | x=[1:122]'; |
---|
151 | plot(x,koro1,'r'); |
---|
152 | hold on |
---|
153 | y=zeros(122,1); |
---|
154 | plot(x,y,'k:'); |
---|
155 | title(a+1978,'FontSize',8); |
---|
156 | my_title=['serie temporelle VP1 filtrage ', df]; |
---|
157 | if a==2; |
---|
158 | text(0,5.5,my_title); |
---|
159 | elseif a==13; |
---|
160 | text(0,5.5,my_title); |
---|
161 | elseif a==24; |
---|
162 | text(0,5.5,my_title); |
---|
163 | end; |
---|
164 | set (gca,'tickDir','out'); |
---|
165 | axis([1 122 -3 3]); |
---|
166 | |
---|
167 | set (gca,'YTick',[-3:1:3],'YTickLabel',[-3:1:3],'fontname','Arial','fontsize',6); |
---|
168 | set (gca,'XTick',[0:20:120],'XTickLabel',[0:20:120],'fontname','Arial','fontsize',6); |
---|
169 | end; |
---|
170 | |
---|
171 | figure(1); |
---|
172 | fullfilename=[IRCAAM_OD,'time_serie_jjas_', df, '_part1.eps']; |
---|
173 | print('-depsc2',fullfilename); |
---|
174 | clear fullfilename; |
---|
175 | figure(2); |
---|
176 | fullfilename=[IRCAAM_OD,'time_serie_jjas_', df, '_part2.eps']; |
---|
177 | print('-depsc2',fullfilename); |
---|
178 | clear fullfilename; |
---|
179 | figure(3); |
---|
180 | fullfilename=[IRCAAM_OD,'time_serie_jjas_', df, '_part3.eps']; |
---|
181 | print('-depsc2',fullfilename); |
---|
182 | clear fullfilename; |
---|