meteodatalab.operators.pot_vortic

Implementation of the potential vorticity operator.

Functions

compute_pot_vortic(u, v, w, theta, rho_tot, hhl)

Compute the potential vorticity.

meteodatalab.operators.pot_vortic.compute_pot_vortic(u: DataArray, v: DataArray, w: DataArray, theta: DataArray, rho_tot: DataArray, hhl: DataArray) DataArray[source]

Compute the potential vorticity.

The potential vorticity is computed with the following formula:

\[v_p = \frac{1}{\rho} * \frac{\partial \Theta}{\partial \z} * (c_v + 2 \Omega)\]

where \(\rho\) is the total air density, \(\frac{\partial \Theta}{\partial \z}\) is the vertical gradient of the potential temperature, \(c_v\) is the curl of the wind in y direction and :math`Omega` is the coriolis term.

Parameters:
  • u (xarray.DataArray) – Wind in x direction [m/s]

  • v (xarray.DataArray) – Wind in y direction [m/s]

  • w (xarray.DataArray) – Wind in z direction [m/s]

  • theta (xarray.DataArray) – Potential Temperature [K]

  • rho_tot (xarray.DataArray) – Total density [kg m-3]

  • hhl (xarray.DataArray) – Height at half levels [m]

Returns:

The potential vorticity

Return type:

xarray.DataArray