def setProjection(self,gid=None,axs=None,west=None,north=None,east=None,south=None):
self.map = [None]*1
lon = self.variables['lon']
lat = self.variables['lat']
self.glons[0], self.glats[0] = np.meshgrid(lon,lat)
self.nx = [self.glons[0].shape[1]]
self.ny = [self.glons[0].shape[0]]
self.dx = [50000.]
self.dy = [62500.]
if self.projectionType == None or self.projectionType == 'robin':
self.projectionType = 'robin'
self.lon0 = [0.0]
self.lat0 = [0.0]
self.ll_lon = [-179.375]
self.ll_lat = [-90]
self.ur_lon = [180]
self.ur_lat = [90]
self.map[0] = Basemap(ax=axs, projection=self.projectionType,
lat_0 = self.lat0[0],
lon_0 = self.lon0[0], llcrnrlon = self.ll_lon[0],
llcrnrlat = self.ll_lat[0], urcrnrlon = self.ur_lon[0],
urcrnrlat = self.ur_lat[0], resolution=self.resolution)
else:
self.lon0 = [270.0]
self.lat0 = [0.0]
self.map[0] = Basemap(ax=axs, projection=self.projectionType,
lon_0 = self.lon0[0], boundinglat = self.lat0[0],
resolution=self.resolution)
评论列表
文章目录