def richardson(self):
u = self.dataSet.readNCVariable('U')
v = self.dataSet.readNCVariable('V')
u_corr = wrf.unstaggerX(u)
v_corr = wrf.unstaggerY(v)
wind = (u_corr*u_corr + v_corr*v_corr)**(0.5)
height = wrf.unstaggerZ(self.height)
#compute the vertical gradient of theta
dtheta = np.gradient(self.theta)[0]
du = np.gradient(wind)[0]
dz = np.gradient(height)[0]
#compute the richardson number
self.u10 = u_corr
self.v10 = v_corr
self.var = ((self.g/self.theta)*(dtheta/dz))/(du/dz)**(2)
self.var2 = self.var
self.varTitle = "Richardson Number\n" + self.dataSet.getTime()
#Set short variable title for time series
self.sTitle = "Richardson Number"
评论列表
文章目录