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