1 | #mod gabi para graficar AMSUA CH2 |
---|
2 | #!/usr/bin/env python |
---|
3 | # -*- coding: utf-8 -*- |
---|
4 | import string |
---|
5 | import numpy as np |
---|
6 | import matplotlib.pyplot as plt |
---|
7 | from pylab import * |
---|
8 | from mpl_toolkits.basemap import Basemap |
---|
9 | from mpl_toolkits.basemap import shiftgrid, cm |
---|
10 | |
---|
11 | #trans t |
---|
12 | |
---|
13 | |
---|
14 | zz1=trpgrid_t |
---|
15 | tt1='trans amusa ch2' |
---|
16 | t1='trans_amsua_ch2.png' |
---|
17 | |
---|
18 | # on recupere les coordonnes xy de la projection orth standard |
---|
19 | m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0, |
---|
20 | resolution = 'l') |
---|
21 | |
---|
22 | xii, yii = m1(*np.meshgrid(xvec,yvec)) |
---|
23 | width = m1.urcrnrx - m1.llcrnrx |
---|
24 | height = m1.urcrnry - m1.llcrnry |
---|
25 | |
---|
26 | coef = 0.6 |
---|
27 | width = width*coef |
---|
28 | height = height*coef |
---|
29 | |
---|
30 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
31 | |
---|
32 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
33 | |
---|
34 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
35 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
36 | #, clevs, cmap=my_cmap) |
---|
37 | clevs=arange(0,1,0.001)#star, stop, step |
---|
38 | cs=map.contourf(xii,yii,zz1, clevs, cmap=cm.s3pcpn_l_r) |
---|
39 | #cmap=cm.s3pcpn_l_r) |
---|
40 | #sstanom) |
---|
41 | #s3pcpn_l_r) |
---|
42 | cbar =colorbar(cs) |
---|
43 | plt.title(tt1) |
---|
44 | |
---|
45 | # draw coastlines, country boundaries, fill continents. |
---|
46 | map.drawcoastlines(linewidth=1) |
---|
47 | # draw the edge of the map projection region (the projection limb) |
---|
48 | map.drawmapboundary() |
---|
49 | # draw lat/lon grid lines every 30 degrees. |
---|
50 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
51 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
52 | #plt.show() |
---|
53 | |
---|
54 | plt.savefig(t1) |
---|
55 | close() |
---|
56 | |
---|
57 | ######################################################################### |
---|
58 | ####emis t 1pos 2pos 3pos |
---|
59 | zz21 = trpgrid_t |
---|
60 | zz22 = trpgrid_1n |
---|
61 | zz23 = trpgrid_2n |
---|
62 | zz24 = trpgrid_3n |
---|
63 | tt21='trans amsua ch2 t' |
---|
64 | tt22='trans amsua ch2 1n' |
---|
65 | tt23='trans amsua ch2 2n' |
---|
66 | tt24='trans amsua ch2 3n' |
---|
67 | t='trans_amsua_ch2_t123.png' |
---|
68 | |
---|
69 | figure(1) |
---|
70 | subplot(221) |
---|
71 | m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0, |
---|
72 | resolution = 'l') |
---|
73 | |
---|
74 | xii, yii = m1(*np.meshgrid(xvec,yvec)) |
---|
75 | width = m1.urcrnrx - m1.llcrnrx |
---|
76 | height = m1.urcrnry - m1.llcrnry |
---|
77 | |
---|
78 | coef = 0.6 |
---|
79 | width = width*coef |
---|
80 | height = height*coef |
---|
81 | |
---|
82 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
83 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
84 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
85 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
86 | clevs=arange(0.9,1,0.001)#star, stop, step |
---|
87 | cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r) |
---|
88 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
89 | #cmap=cm.s3pcpn_l_r) |
---|
90 | #sstanom) |
---|
91 | #s3pcpn_l_r) |
---|
92 | cbar =colorbar(cs) |
---|
93 | plt.title(tt21) |
---|
94 | # draw coastlines, country boundaries, fill continents. |
---|
95 | map.drawcoastlines(linewidth=1) |
---|
96 | # draw the edge of the map projection region (the projection limb) |
---|
97 | map.drawmapboundary() |
---|
98 | # draw lat/lon grid lines every 30 degrees. |
---|
99 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
100 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
101 | |
---|
102 | subplot(222) |
---|
103 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
104 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
105 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
106 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
107 | clevs=arange(0.9,1,0.001)#star, stop, step |
---|
108 | cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r) |
---|
109 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
110 | #cmap=cm.s3pcpn_l_r) |
---|
111 | #sstanom) |
---|
112 | #s3pcpn_l_r) |
---|
113 | cbar =colorbar(cs) |
---|
114 | plt.title(tt22) |
---|
115 | # draw coastlines, country boundaries, fill continents. |
---|
116 | map.drawcoastlines(linewidth=1) |
---|
117 | # draw the edge of the map projection region (the projection limb) |
---|
118 | map.drawmapboundary() |
---|
119 | # draw lat/lon grid lines every 30 degrees. |
---|
120 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
121 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
122 | |
---|
123 | |
---|
124 | subplot(223) |
---|
125 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
126 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
127 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
128 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
129 | clevs=arange(0.9,1,0.001)#star, stop, step |
---|
130 | cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r) |
---|
131 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
132 | #cmap=cm.s3pcpn_l_r) |
---|
133 | #sstanom) |
---|
134 | #s3pcpn_l_r) |
---|
135 | cbar =colorbar(cs) |
---|
136 | plt.title(tt23) |
---|
137 | # draw coastlines, country boundaries, fill continents. |
---|
138 | map.drawcoastlines(linewidth=1) |
---|
139 | # draw the edge of the map projection region (the projection limb) |
---|
140 | map.drawmapboundary() |
---|
141 | # draw lat/lon grid lines every 30 degrees. |
---|
142 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
143 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
144 | |
---|
145 | |
---|
146 | subplot(224) |
---|
147 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
148 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
149 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
150 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
151 | clevs=arange(0.9,1,0.001)#star, stop, step |
---|
152 | cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r) |
---|
153 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
154 | #cmap=cm.s3pcpn_l_r) |
---|
155 | #sstanom) |
---|
156 | #s3pcpn_l_r) |
---|
157 | cbar =colorbar(cs) |
---|
158 | plt.title(tt24) |
---|
159 | # draw coastlines, country boundaries, fill continents. |
---|
160 | map.drawcoastlines(linewidth=1) |
---|
161 | # draw the edge of the map projection region (the projection limb) |
---|
162 | map.drawmapboundary() |
---|
163 | # draw lat/lon grid lines every 30 degrees. |
---|
164 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
165 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
166 | #plt.show() |
---|
167 | |
---|
168 | plt.savefig(t) |
---|
169 | close() |
---|
170 | |
---|
171 | ######################################################################### |
---|
172 | #### ecart type emis t 1pos 2pos 3pos |
---|
173 | zz21 = trsigma_grid_t |
---|
174 | zz22 = trsigma_grid_1n |
---|
175 | zz23 = trsigma_grid_2n |
---|
176 | zz24 = trsigma_grid_3n |
---|
177 | tt21='ecart type trans amsua ch2 t' |
---|
178 | tt22='ecart type trans amsua ch2 1n' |
---|
179 | tt23='ecart type trans amsua ch2 2n' |
---|
180 | tt24='ecart type trans amsua ch2 3n' |
---|
181 | t='ecart_type_trans_amsua_ch2_t123.png' |
---|
182 | |
---|
183 | figure(1) |
---|
184 | subplot(221) |
---|
185 | m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0, |
---|
186 | resolution = 'l') |
---|
187 | |
---|
188 | xii, yii = m1(*np.meshgrid(xvec,yvec)) |
---|
189 | width = m1.urcrnrx - m1.llcrnrx |
---|
190 | height = m1.urcrnry - m1.llcrnry |
---|
191 | |
---|
192 | coef = 0.6 |
---|
193 | width = width*coef |
---|
194 | height = height*coef |
---|
195 | |
---|
196 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
197 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
198 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
199 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
200 | clevs=arange(0,0.03,0.0001)#star, stop, step |
---|
201 | cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r) |
---|
202 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
203 | #cmap=cm.s3pcpn_l_r) |
---|
204 | #sstanom) |
---|
205 | #s3pcpn_l_r) |
---|
206 | cbar =colorbar(cs) |
---|
207 | plt.title(tt21) |
---|
208 | # draw coastlines, country boundaries, fill continents. |
---|
209 | map.drawcoastlines(linewidth=1) |
---|
210 | # draw the edge of the map projection region (the projection limb) |
---|
211 | map.drawmapboundary() |
---|
212 | # draw lat/lon grid lines every 30 degrees. |
---|
213 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
214 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
215 | |
---|
216 | subplot(222) |
---|
217 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
218 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
219 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
220 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
221 | clevs=arange(0,0.03,0.0001)#star, stop, step |
---|
222 | cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r) |
---|
223 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
224 | #cmap=cm.s3pcpn_l_r) |
---|
225 | #sstanom) |
---|
226 | #s3pcpn_l_r) |
---|
227 | cbar =colorbar(cs) |
---|
228 | plt.title(tt22) |
---|
229 | # draw coastlines, country boundaries, fill continents. |
---|
230 | map.drawcoastlines(linewidth=1) |
---|
231 | # draw the edge of the map projection region (the projection limb) |
---|
232 | map.drawmapboundary() |
---|
233 | # draw lat/lon grid lines every 30 degrees. |
---|
234 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
235 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
236 | |
---|
237 | |
---|
238 | subplot(223) |
---|
239 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
240 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
241 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
242 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
243 | clevs=arange(0,0.03,0.0001)#star, stop, step |
---|
244 | cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r) |
---|
245 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
246 | #cmap=cm.s3pcpn_l_r) |
---|
247 | #sstanom) |
---|
248 | #s3pcpn_l_r) |
---|
249 | cbar =colorbar(cs) |
---|
250 | plt.title(tt23) |
---|
251 | # draw coastlines, country boundaries, fill continents. |
---|
252 | map.drawcoastlines(linewidth=1) |
---|
253 | # draw the edge of the map projection region (the projection limb) |
---|
254 | map.drawmapboundary() |
---|
255 | # draw lat/lon grid lines every 30 degrees. |
---|
256 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
257 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
258 | |
---|
259 | |
---|
260 | subplot(224) |
---|
261 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
262 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
263 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
264 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
265 | clevs=arange(0,0.03,0.0001)#star, stop, step |
---|
266 | cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r) |
---|
267 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
268 | #cmap=cm.s3pcpn_l_r) |
---|
269 | #sstanom) |
---|
270 | #s3pcpn_l_r) |
---|
271 | cbar =colorbar(cs) |
---|
272 | plt.title(tt24) |
---|
273 | # draw coastlines, country boundaries, fill continents. |
---|
274 | map.drawcoastlines(linewidth=1) |
---|
275 | # draw the edge of the map projection region (the projection limb) |
---|
276 | map.drawmapboundary() |
---|
277 | # draw lat/lon grid lines every 30 degrees. |
---|
278 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
279 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
280 | #plt.show() |
---|
281 | |
---|
282 | plt.savefig(t) |
---|
283 | close() |
---|
284 | |
---|
285 | ######################################################################### |
---|
286 | #### nom données emis t 1pos 2pos 3pos |
---|
287 | zz21 = trnngrid_t |
---|
288 | zz22 = trnngrid_1n |
---|
289 | zz23 = trnngrid_2n |
---|
290 | zz24 = trnngrid_3n |
---|
291 | tt21='nom donnees trans amsua ch2 t' |
---|
292 | tt22='nom donnees trans amsua ch2 1n' |
---|
293 | tt23='nom donnees trans amsua ch2 2n' |
---|
294 | tt24='nom donnees trans amsua ch2 3n' |
---|
295 | t='nom_donnees_trans_amsua_ch2_t123.png' |
---|
296 | |
---|
297 | 0,0.1,0.0001figure(1) |
---|
298 | subplot(221) |
---|
299 | m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0, |
---|
300 | resolution = 'l') |
---|
301 | |
---|
302 | xii, yii = m1(*np.meshgrid(xvec,yvec)) |
---|
303 | width = m1.urcrnrx - m1.llcrnrx |
---|
304 | height = m1.urcrnry - m1.llcrnry |
---|
305 | |
---|
306 | coef = 0.6 |
---|
307 | width = width*coef |
---|
308 | height = height*coef |
---|
309 | |
---|
310 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
311 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
312 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
313 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
314 | clevs=arange(0,1000,10)#star, stop, step |
---|
315 | cs=map.contourf(xii,yii,zz21, clevs) |
---|
316 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
317 | #cmap=cm.s3pcpn_l_r) |
---|
318 | #sstanom) |
---|
319 | #s3pcpn_l_r) |
---|
320 | cbar =colorbar(cs) |
---|
321 | plt.title(tt21) |
---|
322 | # draw coastlines, country boundaries, fill continents. |
---|
323 | map.drawcoastlines(linewidth=1) |
---|
324 | # draw the edge of the map projection region (the projection limb) |
---|
325 | map.drawmapboundary() |
---|
326 | # draw lat/lon grid lines every 30 degrees. |
---|
327 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
328 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
329 | |
---|
330 | subplot(222) |
---|
331 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
332 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
333 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
334 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
335 | clevs=arange(0,1000,10)#star, stop, step |
---|
336 | cs=map.contourf(xii,yii,zz22, clevs) |
---|
337 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
338 | #cmap=cm.s3pcpn_l_r) |
---|
339 | #sstanom) |
---|
340 | #s3pcpn_l_r) |
---|
341 | cbar =colorbar(cs) |
---|
342 | plt.title(tt22) |
---|
343 | # draw coastlines, country boundaries, fill continents. |
---|
344 | map.drawcoastlines(linewidth=1) |
---|
345 | # draw the edge of the map projection region (the projection limb) |
---|
346 | map.drawmapboundary() |
---|
347 | # draw lat/lon grid lines every 30 degrees. |
---|
348 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
349 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
350 | |
---|
351 | |
---|
352 | subplot(223) |
---|
353 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
354 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
355 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
356 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
357 | clevs=arange(0,1000,10)#star, stop, step |
---|
358 | cs=map.contourf(xii,yii,zz23, clevs) |
---|
359 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
360 | #cmap=cm.s3pcpn_l_r) |
---|
361 | #sstanom) |
---|
362 | #s3pcpn_l_r) |
---|
363 | cbar =colorbar(cs) |
---|
364 | plt.title(tt23) |
---|
365 | # draw coastlines, country boundaries, fill continents. |
---|
366 | map.drawcoastlines(linewidth=1) |
---|
367 | # draw the edge of the map projection region (the projection limb) |
---|
368 | map.drawmapboundary() |
---|
369 | # draw lat/lon grid lines every 30 degrees. |
---|
370 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
371 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
372 | |
---|
373 | |
---|
374 | subplot(224) |
---|
375 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
376 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
377 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
378 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
379 | clevs=arange(0,1000,10)#star, stop, step |
---|
380 | cs=map.contourf(xii,yii,zz24, clevs) |
---|
381 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
382 | #cmap=cm.s3pcpn_l_r) |
---|
383 | #sstanom) |
---|
384 | #s3pcpn_l_r) |
---|
385 | cbar =colorbar(cs) |
---|
386 | plt.title(tt24) |
---|
387 | # draw coastlines, country boundaries, fill continents. |
---|
388 | map.drawcoastlines(linewidth=1) |
---|
389 | # draw the edge of the map projection region (the projection limb) |
---|
390 | map.drawmapboundary() |
---|
391 | # draw lat/lon grid lines every 30 degrees. |
---|
392 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
393 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
394 | #plt.show() |
---|
395 | |
---|
396 | plt.savefig(t) |
---|
397 | close() |
---|
398 | |
---|
399 | |
---|
400 | ######################################################################### |
---|
401 | #### dif emis t 1pos 2pos 3pos |
---|
402 | zz21 = edif_t1 |
---|
403 | zz22 = edif_t2 |
---|
404 | zz23 = edif_t3 |
---|
405 | zz24 = edif_13 |
---|
406 | tt21='dif emis t pos1 amsua ch2' |
---|
407 | tt22='dif emis t pos2 amsua ch2' |
---|
408 | tt23='dif emis t pos3 amsua ch2' |
---|
409 | tt24='dif emis pos1 pos2 amsua ch2' |
---|
410 | t='dif_emis_amsua_ch2.png' |
---|
411 | |
---|
412 | figure(1) |
---|
413 | subplot(221) |
---|
414 | m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0, |
---|
415 | resolution = 'l') |
---|
416 | |
---|
417 | xii, yii = m1(*np.meshgrid(xvec,yvec)) |
---|
418 | width = m1.urcrnrx - m1.llcrnrx |
---|
419 | height = m1.urcrnry - m1.llcrnry |
---|
420 | |
---|
421 | coef = 0.6 |
---|
422 | width = width*coef |
---|
423 | height = height*coef |
---|
424 | |
---|
425 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
426 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
427 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
428 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
429 | clevs=arange(-0.05,0.05,0.0001)#star, stop, step |
---|
430 | cs=map.contourf(xii,yii,zz21, clevs, cmap=cm.s3pcpn_l_r) |
---|
431 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
432 | #cmap=cm.s3pcpn_l_r) |
---|
433 | #sstanom) |
---|
434 | #s3pcpn_l_r) |
---|
435 | cbar =colorbar(cs) |
---|
436 | plt.title(tt21) |
---|
437 | # draw coastlines, country boundaries, fill continents. |
---|
438 | map.drawcoastlines(linewidth=1) |
---|
439 | # draw the edge of the map projection region (the projection limb) |
---|
440 | map.drawmapboundary() |
---|
441 | # draw lat/lon grid lines every 30 degrees. |
---|
442 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
443 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
444 | |
---|
445 | subplot(222) |
---|
446 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
447 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
448 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
449 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
450 | clevs=arange(-0.05,0.05,0.0001)#star, stop, step |
---|
451 | cs=map.contourf(xii,yii,zz22, clevs, cmap=cm.s3pcpn_l_r) |
---|
452 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
453 | #cmap=cm.s3pcpn_l_r) |
---|
454 | #sstanom) |
---|
455 | #s3pcpn_l_r) |
---|
456 | cbar =colorbar(cs) |
---|
457 | plt.title(tt22) |
---|
458 | # draw coastlines, country boundaries, fill continents. |
---|
459 | map.drawcoastlines(linewidth=1) |
---|
460 | # draw the edge of the map projection region (the projection limb) |
---|
461 | map.drawmapboundary() |
---|
462 | # draw lat/lon grid lines every 30 degrees. |
---|
463 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
464 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
465 | |
---|
466 | |
---|
467 | subplot(223) |
---|
468 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
469 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
470 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
471 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
472 | clevs=arange(-0.05,0.05,0.0001)#star, stop, step |
---|
473 | cs=map.contourf(xii,yii,zz23, clevs, cmap=cm.s3pcpn_l_r) |
---|
474 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
475 | #cmap=cm.s3pcpn_l_r) |
---|
476 | #sstanom) |
---|
477 | #s3pcpn_l_r) |
---|
478 | cbar =colorbar(cs) |
---|
479 | plt.title(tt23) |
---|
480 | # draw coastlines, country boundaries, fill continents. |
---|
481 | map.drawcoastlines(linewidth=1) |
---|
482 | # draw the edge of the map projection region (the projection limb) |
---|
483 | map.drawmapboundary() |
---|
484 | # draw lat/lon grid lines every 30 degrees. |
---|
485 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
486 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
487 | |
---|
488 | |
---|
489 | subplot(224) |
---|
490 | # on fait une nouvelle projection en zoomant sur l'antarctique |
---|
491 | map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ |
---|
492 | llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) |
---|
493 | xii, yii = map(*np.meshgrid(xvec,yvec)) |
---|
494 | clevs=arange(-0.05,0.05,0.0001)#star, stop, step |
---|
495 | cs=map.contourf(xii,yii,zz24, clevs, cmap=cm.s3pcpn_l_r) |
---|
496 | #cs=map.pcolormesh(xii,yii,zz2) |
---|
497 | #cmap=cm.s3pcpn_l_r) |
---|
498 | #sstanom) |
---|
499 | #s3pcpn_l_r) |
---|
500 | cbar =colorbar(cs) |
---|
501 | plt.title(tt24) |
---|
502 | # draw coastlines, country boundaries, fill continents. |
---|
503 | map.drawcoastlines(linewidth=1) |
---|
504 | # draw the edge of the map projection region (the projection limb) |
---|
505 | map.drawmapboundary() |
---|
506 | # draw lat/lon grid lines every 30 degrees. |
---|
507 | map.drawmeridians(np.arange(0, 360, 10)) |
---|
508 | map.drawparallels(np.arange(-90, 90, 10)) |
---|
509 | #plt.show() |
---|
510 | |
---|
511 | plt.savefig(t) |
---|
512 | close() |
---|
513 | |
---|
514 | ################################################ |
---|
515 | #histograma |
---|
516 | |
---|
517 | bins=arange(0.4,1,0.002) |
---|
518 | plt.hist(zz, bins=bins,histtype='step', label='hist',normed='True',color='black') |
---|
519 | plt.show() |
---|
520 | plt.savefig('hist_emis_amsua_ch2.png') |
---|
521 | close() |
---|