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
评论列表
文章目录