def MostUnstable(self, t, p, q, td):
#Determine psfc - 300mb
minP = p[0] - 300.
diff = p - minP
ind = np.where(diff > 0)
#Determine max theta-e
vp = self.VaporPressure(td[ind])
t_lcl = self.TempLCL(t[ind]+273.15,td[ind])
thetae = self.theta[ind] * np.exp((3.376/t_lcl - 0.00254)*1000*q[ind]*(1. + 0.81 * q[ind]))
#thetae = self.theta[ind] * np.exp((3036/t_lcl - 1.78)*(q[ind]/1000.)*(1. + (0.448/1000.) * q[ind]))
indmax = np.where(thetae == np.nanmax(thetae))
#Define parcel
self.t_parcel = t[indmax]
self.q_parcel = q[indmax]
self.theta_parcel = self.theta[indmax]
self.td_parcel = td[indmax]
self.p_parcel = p[0]
#Lifted Parcel Temperature
评论列表
文章目录