windeval.py 文件源码

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

项目:POWER 作者: pennelise 项目源码 文件源码
def convert_to_degspd(u,v):
    """Convert arrays of u,v vectors to arrays of direction (in met.deg) and speed

    Arguments:
    u - np array of the u (east) part of the vector
    v - np array of the v (north) part of the vector
    """
    dir_spd = [] 
    wind_direction = (np.rad2deg(np.arctan2(-u,-v))) % 360.0
    wind_speed = np.sqrt(u ** 2 + v ** 2)
    dir_spd.append(wind_direction)
    dir_spd.append(wind_speed)
    return np.array(dir_spd) #[[list of wind dirs], [list of wind spds]]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号