source: trunk/src/mode_sahelien/carte_eof_ER_jjas_df.m @ 45

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

parametrisation of reconstitution_ER_rossby_....m

File size: 5.0 KB
Line 
1function carte_eof_ER_jjas_df(ndmin, ndmax)
2% carte_eof_ER_jjas_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
19% produce a PostScript file resultats_eof_jjas_2006_10-30d.eps  and a
20% vecteurs_eof_ER10-30d.txt file
21% ::
22%
23% >> carte_eof_ER_jjas_df(10,30);
24%
25% SEE ALSO
26% ========
27%
28% olr_eof_jjas2006_rossby_df.m_
29%
30% .. _olr_eof_jjas2006_rossby_df.m : olr_eof_jjas2006_rossby_df.m.html
31%
32% carte_eofER_1030_article.m_
33%
34% .. _carte_eofER_1030_article.m : carte_eofER_1030_article.m.html
35%
36% time_serie_ER_rossby_df.m_
37%
38% .. _time_serie_ER_rossby_df.m : time_serie_ER_rossby_df.m.html
39%
40% time_serie_ER_rossby_df_complet.m_
41%
42% .. _time_serie_ER_rossby_df_complet.m : time_serie_ER_rossby_df_complet.m.html
43%
44% reconstitution_ER_rossby_df.m_
45%
46% .. _reconstitution_ER_rossby_df.m : reconstitution_ER_rossby_df.m.html
47%
48% TODO
49% ====
50%
51% improve description
52%
53% improve file pb
54%
55% use return function
56%
57% clean variables and plot
58%
59% find where ``vecteurs_eof_ER??-??d30.txt`` are used
60%
61% EVOLUTIONS
62% ==========
63%
64% $Id$
65%
66% - fplod 2009-01-27T12:39:15Z aedon.locean-ipsl.upmc.fr (Darwin)
67%
68%   * created from carte_eof_ER_jjas_1030.m to replace it as well as
69%     carte_eof_ER_jjas_30100.m
70%
71%     Days will be now written ``ndmin``\-``ndmaxd`` (ex: 10-30d) in filenames.
72%
73%-
74
75global IRCAAM_ID;
76global IRCAAM_OD;
77
78if nargin==2
79 % ndmin must be lower than ndmax
80 if (ndmin > ndmax)
81  disp(['ndmin = ', int2str(ndmin)]);
82  disp(['ndmax = ', int2str(ndmax)]);
83  error('eee : ndmin must be lower than ndmax');
84 end
85else
86  usage='usage : carte_eof_ER_jjas_df(ndmin, ndmax)';
87  disp(usage);
88  error('eee : wrong arguments numbers')
89end
90
91% ndmin and ndmax will be used in xx-yyd form in filenames
92df = [int2str(ndmin),'-',int2str(ndmax),'d'];
93clear ndmin;
94clear ndmax;
95
96fullfilename=[IRCAAM_ID,'eof_rossby_jjas_2006_',df,'.mat'];
97status=load(fullfilename,'C','L');
98clear fullfilename;
99
100C=status.C;
101L=status.L;
102clear status;
103
104carte1=C(:,425);
105
106carte=reshape(carte1,25,17);
107carte=carte';
108
109clear carte1;
110% defintion des lat et lon
111lon=[-30:2.5:30]';
112lat=[-10:2.5:30];
113
114figure(1);
115orient('landscape');
116subplot(3,2,1);
117palette;
118for a=1:17;
119    for b=1:25;
120        if carte(a,b)>0.2;
121            carte(a,b)=0.2;
122        elseif carte(a,b)<-0.2;
123            carte(a,b)=-0.2;
124        end;
125    end;
126end;
127carte(1,1)=-0.2001;
128carte(1,2)=0.2001;
129
130contourf(lon,lat,-carte,[-0.2:0.02:0.2],'LineStyle','none');
131colorbar;
132title('OLR EOF1','Fontsize',8);
133hold on;
134cartemonde;
135set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';'  0';'10N';'20N';'30N'],'fontname','Arial','fontsize',6);
136set (gca,'XTick',[-30:10:30],'XTickLabel',['30W';'20W';'10W';'  0';'10E';'20E';'30E'],'fontname','Arial','fontsize',6);
137set (gca,'tickDir','out');
138
139clear carte1 x y a b carte coco;
140carte1=C(:,424);
141carte=reshape(carte1,25,17);
142carte=carte';
143
144clear carte1;
145lon=[-30:2.5:30]';
146lat=[-10:2.5:30];
147
148subplot(3,2,3);
149palette;
150for a=1:17;
151    for b=1:25;
152        if carte(a,b)>0.2;
153            carte(a,b)=0.2;
154        elseif carte(a,b)<-0.2;
155            carte(a,b)=-0.2;
156        end;
157    end;
158end;
159carte(1,1)=-0.2001;
160carte(1,2)=0.2001;
161
162contourf(lon,lat,carte,[-0.2:0.02:0.2],'LineStyle','none');
163colorbar;
164
165title('OLR EOF2','Fontsize',8);
166hold on;
167cartemonde;
168set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';'  0';'10N';'20N';'30N'],'fontname','Arial','fontsize',6);
169set (gca,'XTick',[-30:10:30],'XTickLabel',['30W';'20W';'10W';'  0';'10E';'20E';'30E'],'fontname','Arial','fontsize',6);
170set (gca,'tickDir','out');
171
172clear carte1 x y a b carte coco;
173carte1=C(:,423);
174carte=reshape(carte1,25,17);
175carte=carte';
176clear carte1;
177
178% defintion des lat et lon
179lon=[-30:2.5:30]';
180lat=[-10:2.5:30];
181
182subplot(3,2,5);
183palette;
184for a=1:17;
185    for b=1:25;
186        if carte(a,b)>0.2;
187            carte(a,b)=0.2;
188        elseif carte(a,b)<-0.2;
189            carte(a,b)=-0.2;
190        end;
191    end;
192end;
193carte(1,1)=-0.2001;
194carte(1,2)=0.2001;
195
196contourf(lon,lat,-carte,[-0.2:0.02:0.2],'LineStyle','none');
197colorbar;
198title('OLR EOF3','Fontsize',8);
199hold on;
200cartemonde;
201set (gca,'YTick',[-10:10:30],'YTickLabel',['10S';'  0';'10N';'20N';'30N'],'fontname','Arial','fontsize',6);
202set (gca,'XTick',[-30:10:30],'XTickLabel',['30W';'20W';'10W';'  0';'10E';'20E';'30E'],'fontname','Arial','fontsize',6);
203set (gca,'tickDir','out');
204
205subplot(3,2,2);
206vaude=0;
207for a=1:425;
208   vaude=vaude+L(a,a);
209end;
210vecteurs=zeros(20,1);
211for a=1:20;
212   b=425-(a-1);
213   vecteurs(a)=100*(L(b,b)/vaude);
214end;
215x=[1:20]';
216
217bar(x,vecteurs,'LineStyle','none')
218
219fullfilename=[IRCAAM_OD,'vecteurs_eof_ER',df,'.txt'];
220save(fullfilename,'vecteurs','-ASCII');
221clear fullfilename;
222
223axis([0.5 20.5 0 25]);
224set (gca,'YTick',[0:5:25],'YTickLabel',[0:5:25],'fontname','Arial','fontsize',6);
225set (gca,'XTick',[2:2:20],'XTickLabel',[2:2:20],'fontname','Arial','fontsize',6);
226set (gca,'tickDir','out');
227
228fullfilename=[IRCAAM_OD,'resultats_eof_jjas_2006_',df,'.eps'];
229print('-depsc2',fullfilename);
230clear fullfilename;
Note: See TracBrowser for help on using the repository browser.