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