SkewTobj.py 文件源码

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

项目:PyGEOMET 作者: pygeomet 项目源码 文件源码
def RotatePoints(self, x_in, y_in):
        #Rotational matrix
        angle = np.pi/1.065
        rot = np.array([[np.cos(angle),-np.sin(angle)],[np.sin(angle),np.cos(angle)]])

        #Rotation Stuff
        x = 0.
        y = np.log(1000.)*-self.rd
        d1 = np.array([[x],[y]])
        V1 = np.dot(rot,d1)
        B1 = np.linspace(d1[0],V1[0],100)
        B2 = np.linspace(d1[1],V1[1],100)
        p = np.polyfit(B1,B2,1)

        #Skew-T y-axis
        y_out = -self.rd*np.log(y_in) 

        #Skew-T x-axis
        B = (x_in + (-y/p[0]))*p[0]
        x_out = (y_out+B)/p[0]

        return x_out, y_out

    #Process winds for the hodograph
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号