#mod gabi para graficar AMSUA CH2 #!/usr/bin/env python # -*- coding: utf-8 -*- import string import numpy as np import matplotlib.pyplot as plt from pylab import * from mpl_toolkits.basemap import Basemap from mpl_toolkits.basemap import shiftgrid, cm #trans t zz1=iterrei tt1='terre amusa ch2' t1='terre_amsua_ch2.png' # on recupere les coordonnes xy de la projection orth standard m1 = Basemap(projection='ortho', lat_0 = -90, lon_0 = 0, resolution = 'l') xii, yii = m1(*np.meshgrid(xvec,yvec)) width = m1.urcrnrx - m1.llcrnrx height = m1.urcrnry - m1.llcrnry coef = 0.6 width = width*coef height = height*coef # on fait une nouvelle projection en zoomant sur l'antarctique map = Basemap(projection='ortho',lon_0=0,lat_0=-90,resolution='l',\ llcrnrx=-0.5*width,llcrnry=-0.5*height,urcrnrx=0.5*width,urcrnry=0.5*height) xii, yii = map(*np.meshgrid(xvec,yvec)) #, clevs, cmap=my_cmap) clevs=arange(0,1,0.001)#star, stop, step cs=map.pcolor(xii,yii,zz1) cbar =colorbar(cs) plt.title(tt1) # draw coastlines, country boundaries, fill continents. map.drawcoastlines(linewidth=1) # draw the edge of the map projection region (the projection limb) map.drawmapboundary() # draw lat/lon grid lines every 30 degrees. map.drawmeridians(np.arange(0, 360, 10)) map.drawparallels(np.arange(-90, 90, 10)) plt.show() plt.savefig(t1) close()