RadarDataset.py 文件源码

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

项目:PyGEOMET 作者: pygeomet 项目源码 文件源码
def setGridList(self, year,month,day):
        s3conn = boto.connect_s3()
        bucket = s3conn.get_bucket('noaa-nexrad-level2')
        keys = bucket.list(prefix= year + '/' + month + '/' + day + '/',
                           delimiter='/')
        tmp = []
        for key in keys:
            tmp.append(key.name.split('/')[-2])

        self.gridList = tmp
        if(self.grid not in self.gridList):
            print("The site selected is not available for " + year 
             + ' ' + month + '/' + day + '. The site has defaulted to : ' +
             self.gridList[0] + 
             '. Please re-select the site you would like to view')
            self.selectionChangeHour(0)
            self.selectionChangeMMSS(0)
            self.selectionChangeGrid(0)
        else:
            self.currentGridIndex = np.where(np.array(self.gridList) == self.grid)[0][0]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号