平流的标量,如温度T(* *),水平风,定义如下:——美元(\ textbf{你}\ cdot \微分算符)T $, $ \ textbf{你}是水平风矢量美元,美元\ textbf{你}= (U, v),美元被U和v美元美元的纬向和经向组件,分别([源][1])。计算网格数据,方便使用有限的差异(或类似的数值方法),指出[这][2]。使用这种方法,以下行Python编写的计算温度平流的(TAdv): ' ' ' python3 dy = 111000 # [m] lonres =朗[1]朗[0]#常数TAdv = np.zeros (np.shape (T));tadv.fill (np.nan) t范围(np.shape (t)[0]):在np.arange x (1, len(朗)1):在np.arange y (1, len (lat) 1): dx = abs (111000 * np.cos (lat [y] * (2 * np.pi / 360)) * lonres) tadv (t、y、x) = - (u (t、y、x) * (t (t、y、x + 1) - t (t、y、x - 1)) / (2 * dx) + v \ [t、y、x] * (t (t, y + 1, x) - t [t y-1 x]) / (2 * (dy))‘’我希望类似的结果从扩展风组件的温度,在每个网格单元,完成如下:“‘python3 ut = np.zeros (np.shape (T) vt = np.zeros (np.shape (T) ut = np.zeros (np.shape (T)的T范围(np.shape (T) [0]): x的范围(len(朗)):y的范围(len (lat)): ut (T, s, y, x) = u (T, s, y, x) * abs (T (T, s, y, x)) vt (T, s, y, x) = v (T, s, y, x) * abs (T (T, s, y, x)) ut (T, s, y, x) = ((ut (T, s, y, x) * * 2 + v (T, s, y, x) * * 2) * * 0.5) * np.sign (T (T, s, y, x))”“按比例缩小的风矢量的大小(UT)将类似的“T”的运输。这是乘以T(1 - 1)的迹象,因为T异常(有T < 0),为了保持其标志。然而,结果是完全不同的。我错过什么呢?在这种假设它是一个错误(这两个结果应该相当类似的)? Or is it a coding problem? In the figure below, I show the original T, u and v fields (left), and the results of the two above calculations: Tadv with u and v (middle), and the magnitude of the scaled vectors, UT, with the scaled vectors themselves uT and vT (right). TAdv is multiplied by 24*3600, so that the units are K/day. [![figure][3]][3] [1]: http://glossary.ametsoc.org/wiki/Advection [2]: //www.hoelymoley.com/questions/9634/how-to-compute-du-dx-and-dv-dy-in-moisture-flux-convergence/10667#10667 [3]: https://i.stack.imgur.com/VxJpt.png
Baidu
map