# q_vector#

metpy.calc.q_vector(u, v, temperature, pressure, dx=None, dy=None, static_stability=1, x_dim=-1, y_dim=-2, *, parallel_scale=None, meridional_scale=None, latitude=None, longitude=None, crs=None)[source]#

Calculate Q-vector at a given pressure level using the u, v winds and temperature.

$\vec{Q} = (Q_1, Q_2) = - \frac{R}{\sigma p}\left( \frac{\partial \vec{v}_g}{\partial x} \cdot \nabla_p T, \frac{\partial \vec{v}_g}{\partial y} \cdot \nabla_p T \right)$

This formula follows equation 5.7.55 from [Bluestein1992], and can be used with the the below form of the quasigeostrophic omega equation to assess vertical motion ([Bluestein1992] equation 5.7.54):

$\left( \nabla_p^2 + \frac{f_0^2}{\sigma} \frac{\partial^2}{\partial p^2} \right) \omega = - 2 \nabla_p \cdot \vec{Q} - \frac{R}{\sigma p} \beta \frac{\partial T}{\partial x}$
Parameters:
Returns:

tuple of (…, M, N) xarray.DataArray or pint.Quantity – The components of the Q-vector in the u- and v-directions respectively

Changed in version 1.0: Changed signature from (u, v, temperature, pressure, dx, dy, static_stability=1)

Q-Vector

Q-Vector