1 | function time_serie_eof_df(dataset,simulation,ndmin, ndmax) |
---|
2 | % time_serie_eof_df ++explication between ndmin days and ndmax days |
---|
3 | |
---|
4 | %+ |
---|
5 | % module |
---|
6 | % ====== |
---|
7 | % |
---|
8 | % ++ |
---|
9 | % |
---|
10 | % DESCRIPTION |
---|
11 | % =========== |
---|
12 | % |
---|
13 | % From eof_arpege_\ *simulation*\ _ \ *ndmin*\ -\ *ndmax*\ d.mat, |
---|
14 | % ``time_serie_eof_df`` compute ++. |
---|
15 | % |
---|
16 | % ``time_serie_eof_df`` plot ++. |
---|
17 | % |
---|
18 | % ``time_serie_eof_df`` save eof[12]_arpege_\ *simulation*\ _ \ *ndmin*\ -\ *ndmax*\ d.txt. |
---|
19 | % |
---|
20 | % 2 Postscript files |
---|
21 | % time_serie_arpege_\ *simulation*\ _ \ *ndmin*\ -\ *ndmax*\ d_part[12].eps are |
---|
22 | % written. |
---|
23 | % |
---|
24 | % EXAMPLES |
---|
25 | % ======== |
---|
26 | % |
---|
27 | % Following line read ``eof_arpege_TrNQIVIV_10-30d.mat``, |
---|
28 | % compute ++, |
---|
29 | % plot ++, |
---|
30 | % write ``eof[12]_arpege_TrNQIVIV_10-30d`` and |
---|
31 | % write ``time_serie_arpege_TrNQIVIV_10-30d_part[12].eps`` |
---|
32 | % :: |
---|
33 | % |
---|
34 | % >> time_serie_eof_df('arpege','TrNQIVIV',10,30) |
---|
35 | % |
---|
36 | % SEE ALSO |
---|
37 | % ======== |
---|
38 | % |
---|
39 | % eof_olr_ircaam_1030_as.m_ |
---|
40 | % |
---|
41 | % .. _eof_olr_ircaam_1030_as.m : eof_olr_ircaam_1030_as.m.html |
---|
42 | % |
---|
43 | % carte_eof_ircaam_1030.m_ |
---|
44 | % |
---|
45 | % .. _carte_eof_ircaam_1030.m : carte_eof_ircaam_1030.m.html |
---|
46 | % |
---|
47 | % TODO |
---|
48 | % ==== |
---|
49 | % |
---|
50 | % improve description |
---|
51 | % |
---|
52 | % improve file pb |
---|
53 | % |
---|
54 | % use return function |
---|
55 | % |
---|
56 | % EVOLUTIONS |
---|
57 | % ========== |
---|
58 | % |
---|
59 | % $Id$ |
---|
60 | % |
---|
61 | % - fplod 2009-02-02T10:01:21Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
62 | % |
---|
63 | % * created from time_serie_afr_1030.m to replace it as well as |
---|
64 | % time_serie_afr_30100.m, time_serie_as_1030.m, time_serie_as_30100.m, |
---|
65 | % time_serie_ctl_1030.m, time_serie_ctl_30100.m, time_serie_tr_1030.m and |
---|
66 | % time_serie_tr_30100.m |
---|
67 | % |
---|
68 | % Days will be now written ``ndmin``\-``ndmaxd`` (ex: 10-30d) in filenames. |
---|
69 | % |
---|
70 | % Dataset ``arpege`` will be forced in output file names.. |
---|
71 | % |
---|
72 | % Simulation name will be add to output file names (see parameters). |
---|
73 | % |
---|
74 | % Postscript files names will be suffixe by partx instead of letter. |
---|
75 | % |
---|
76 | %- |
---|
77 | |
---|
78 | global IRCAAM_ID; |
---|
79 | global IRCAAM_OD; |
---|
80 | |
---|
81 | if nargin==4 |
---|
82 | % dataset must be equal to arpege |
---|
83 | if ~strcmp(dataset,'arpege') |
---|
84 | disp(['dataset = ', dataset]); |
---|
85 | error('eee : dataset must be equal to arpege'); |
---|
86 | end |
---|
87 | if strcmp(dataset,'arpege') |
---|
88 | list_simulation={'AfNQIVIV','TrNQIVIV','AsNQIVIV','CtIV','CtCl'}; |
---|
89 | end |
---|
90 | switch simulation |
---|
91 | case list_simulation |
---|
92 | % ok |
---|
93 | otherwise |
---|
94 | disp(['simulation = ', simulation]); |
---|
95 | disp(['list_simulation = ', mat2str(list_simulation)]); |
---|
96 | error('eee : simulation must be equal to one of list_simulation'); |
---|
97 | end |
---|
98 | clear list_simulation; |
---|
99 | % ndmin must be lower than ndmax |
---|
100 | if (ndmin > ndmax) |
---|
101 | disp(['ndmin = ', int2str(ndmin)]); |
---|
102 | disp(['ndmax = ', int2str(ndmax)]); |
---|
103 | error('eee : ndmin must be lower than ndmax'); |
---|
104 | end |
---|
105 | else |
---|
106 | usage='usage : time_serie_jjas_df(dataset,simulation,ndmin, ndmax)'; |
---|
107 | disp(usage); |
---|
108 | error('eee : wrong arguments numbers') |
---|
109 | end |
---|
110 | |
---|
111 | % ndmin and ndmax will be used in xx-yyd form in filenames |
---|
112 | df = [int2str(ndmin),'-',int2str(ndmax),'d']; |
---|
113 | clear ndmin; |
---|
114 | clear ndmax; |
---|
115 | |
---|
116 | close all; |
---|
117 | |
---|
118 | fullfilename=[IRCAAM_ID,'eof_',dataset,'_', simulation, '_', df, '.mat']; |
---|
119 | status=load(fullfilename,'C','olr'); |
---|
120 | clear fullfilename; |
---|
121 | |
---|
122 | C=status.C; |
---|
123 | olr=status.olr; |
---|
124 | clear status; |
---|
125 | |
---|
126 | olr=olr'; |
---|
127 | PC1=olr*C; |
---|
128 | |
---|
129 | %%%%%%% cronique de la VP1 |
---|
130 | time_serie_olr1=PC1(:,360); |
---|
131 | time_serie_olr2=PC1(:,359); |
---|
132 | |
---|
133 | dt_olr1=std(time_serie_olr1); |
---|
134 | dt_olr2=std(time_serie_olr2); |
---|
135 | |
---|
136 | for a=1:3538; |
---|
137 | time_serie_olr1(a)=time_serie_olr1(a)/dt_olr1; |
---|
138 | time_serie_olr2(a)=time_serie_olr2(a)/dt_olr2; |
---|
139 | end; |
---|
140 | |
---|
141 | fullfilename=[IRCAAM_OD,'eof1_',dataset,'_', simulation, '_', df,'.txt']; |
---|
142 | save(fullfilename,'time_serie_olr1','-ASCII'); |
---|
143 | clear fullfilename; |
---|
144 | |
---|
145 | fullfilename=[IRCAAM_OD,'eof2_',dataset,'_', simulation, '_', df,'.txt']; |
---|
146 | save(fullfilename','time_serie_olr2','-ASCII'); |
---|
147 | clear fullfilename; |
---|
148 | |
---|
149 | x=[1:3538]'; |
---|
150 | for a=1:29; |
---|
151 | if a<12; |
---|
152 | figure(1); |
---|
153 | subplot(4,3,a); |
---|
154 | elseif a<23; |
---|
155 | figure(2); |
---|
156 | subplot(4,3,a-11); |
---|
157 | else |
---|
158 | figure(3); |
---|
159 | subplot(4,3,a-22); |
---|
160 | end; |
---|
161 | clear koro1; |
---|
162 | debut=(a-1)*122+1; |
---|
163 | fin=a*122; |
---|
164 | koro1=time_serie_olr1(debut:fin); |
---|
165 | koro2=time_serie_olr2(debut:fin); |
---|
166 | clear x; |
---|
167 | x=[1:122]'; |
---|
168 | plot(x,koro1,'r'); |
---|
169 | hold on |
---|
170 | plot(x,koro2,'k'); |
---|
171 | y=zeros(122,1); |
---|
172 | plot(x,y,'k:'); |
---|
173 | title(a+1970,'FontSize',8); |
---|
174 | my_title=['serie temporelle eof ', dataset, ' ' , simulation, ' ' , df]; |
---|
175 | if a==2; |
---|
176 | text(0,5.5,my_title); |
---|
177 | elseif a==13; |
---|
178 | text(0,5.5,my_title); |
---|
179 | elseif a==24; |
---|
180 | text(0,5.5,my_title); |
---|
181 | end; |
---|
182 | clear my_title; |
---|
183 | set (gca,'tickDir','out'); |
---|
184 | axis([1 122 -3 3]); |
---|
185 | |
---|
186 | set (gca,'YTick',[-3:1:3],'YTickLabel',[-3:1:3],'fontname','Arial','fontsize',6); |
---|
187 | set (gca,'XTick',[0:20:120],'XTickLabel',[0:20:120],'fontname','Arial','fontsize',6); |
---|
188 | end; |
---|
189 | |
---|
190 | figure(1); |
---|
191 | fullfilename=[IRCAAM_OD,'time_serie_eof_', dataset, '_', simulation, '_', df, '_part1.eps']; |
---|
192 | print('-depsc2',fullfilename); |
---|
193 | clear fullfilename; |
---|
194 | |
---|
195 | figure(2); |
---|
196 | fullfilename=[IRCAAM_OD,'time_serie_eof_', dataset, '_', simulation, '_', df, '_part2.eps']; |
---|
197 | print('-depsc2',fullfilename); |
---|
198 | clear fullfilename; |
---|
199 | |
---|
200 | figure(3); |
---|
201 | fullfilename=[IRCAAM_OD,'time_serie_eof_', dataset, '_', simulation, '_', df, '_part3.eps']; |
---|
202 | print('-depsc2',fullfilename); |
---|
203 | clear fullfilename; |
---|
204 | |
---|
205 | clear dataset; |
---|
206 | clear simulation; |
---|
207 | clear df; |
---|