GOESRDataset.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:PyGEOMET 作者: pygeomet 项目源码 文件源码
def setProjection(self,gid,axs=None,west=None,north=None,east=None,south=None):
        i = gid-1

        #If there is input on grid extent change the corners
        if (west != None and north != None and east != None and south != None):
            llcrnrlon = west
            llcrnrlat = south
            urcrnrlon = east
            urcrnrlat = north
        else:
            llcrnrlon = self.ll_lon[i]
            llcrnrlat = self.ll_lat[i]
            urcrnrlon = self.ur_lon[i]
            urcrnrlat = self.ur_lat[i]

    #GOES is not in a specific projection so using cyl    
#        self.map[i] = Basemap(ax=axs,projection=self.projectionType,
#                                   llcrnrlon=self.ll_lon[i],llcrnrlat=self.ll_lat[i],
#                                   urcrnrlat = self.ur_lat[i],urcrnrlon = self.ur_lon[i],
#                                   resolution=self.resolution)
        self.map[i] = Basemap(ax=axs, projection=self.projectionType,
                      lat_ts = self.lat0[i], llcrnrlon = llcrnrlon,
                      llcrnrlat = llcrnrlat, urcrnrlon = urcrnrlon,
                      urcrnrlat = urcrnrlat, resolution=self.resolution)

        self.maplon[i],self.maplat[i] = self.map[i].makegrid(self.nx[i],self.ny[i])

    #This function navigate the input GOES file
    # i.e. determines the lat/long for each pixel
    # Based on the GOES-R Product Definition and User's Guide (PUG)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号