sections.py 文件源码

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

项目:RapidMoc 作者: cdr30 项目源码 文件源码
def _read_tcoord(self):
        """ Read time coordinate information from netcdf file(s) """
        nc = self._opennc(self.f)
        t = nc.variables[self.tcoord]

        if len(glob.glob(self.f)) > 1:
            try:
                self.dates = num2date(MFTime(t)[:], calendar=t.calendar, units=t.units)
            except:
                print 'netcdf4.MFTime incompatible with NETCDF4. Try concatenating data into a single file.'
                raise NetCDF4ERROR(err)
        else:
            self.dates = num2date(t[:], calendar=t.calendar, units=t.units)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号