makeweather2.py 文件源码

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

项目:siren 作者: ozsolarwind 项目源码 文件源码
def get_rad_data(self, inp_file):
        unzip_file = self.unZip(inp_file)
        if self.return_code != 0:
            return
        try:
            if sys.platform == 'win32' or sys.platform == 'cygwin':
                cdf_file = Dataset(unzip_file, 'r')
            else:
                cdf_file = NetCDFFile(unzip_file, 'r')
        except:
            self.decodeError(inp_file)
            return
     #   Variable Description                         Units
     #   -------- ----------------------------------- --------
     #   swgnt    Surface net downward shortwave flux W m-2
        self.lati = cdf_file.variables[self.vars['latitude']][:]
        self.longi = cdf_file.variables[self.vars['longitude']][:]
        self.tims = cdf_file.variables['time'][:]
        self.swgnt += self.getGHI(cdf_file.variables[self.vars['swgnt']])
        cdf_file.close()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号