def doy2dt(yr, j):
"""Convert year + integer DOY (Julian) to datetime
"""
return o2dt(dt2o(datetime(int(yr), 1, 1))+j-1)
#The solution below can't deal with jd>365
#jmod = np.modf(j)
#return datetime.strptime(str(yr)+str(int(jmod[1])), '%Y%j') + timedelta(days=jmod[0])
评论列表
文章目录