potential_vorticity_baroclinic

metpy.calc.potential_vorticity_baroclinic(potential_temperature, pressure, u, v, dx, dy, lats)[source]

Calculate the baroclinic potential vorticity.

\[PV = -g \left(\frac{\partial u}{\partial p}\frac{\partial \theta}{\partial y} - \frac{\partial v}{\partial p}\frac{\partial \theta}{\partial x} + \frac{\partial \theta}{\partial p}(\zeta + f) \right)\]

This formula is based on equation 4.5.93 [Bluestein1993].

Parameters
  • potential_temperature ((P, M, N) pint.Quantity) – potential temperature

  • pressure ((P, M, N) pint.Quantity) – vertical pressures

  • u ((P, M, N) pint.Quantity) – x component of the wind

  • v ((P, M, N) pint.Quantity) – y component of the wind

  • dx (pint.Quantity) – The grid spacing(s) in the x-direction. If an array, there should be one item less than the size of u along the applicable axis.

  • dy (pint.Quantity) – The grid spacing(s) in the y-direction. If an array, there should be one item less than the size of u along the applicable axis.

  • lats ((M, N) ndarray) – latitudes of the wind data in radians or with appropriate unit information attached

Returns

(P, M, N) pint.Quantity – baroclinic potential vorticity

Notes

This function will only work with data that is in (P, Y, X) format. If your data is in a different order you will need to re-order your data in order to get correct results from this function.

The same function can be used for isobaric and isentropic PV analysis. Provide winds for vorticity calculations on the desired isobaric or isentropic surface. At least three layers of pressure/potential temperature are required in order to calculate the vertical derivative (one above and below the desired surface). The first two terms will be zero if isentropic level data is used due to the gradient of theta in both the x and y-directions will be zero since you are on an isentropic surface.

This function expects pressure/isentropic level to increase with increasing array element (e.g., from higher in the atmosphere to closer to the surface. If the pressure array is one-dimensional p[:, None, None] can be used to make it appear multi-dimensional.)