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

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

parametrisation of carte_eof_ER_jjas_....m

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