wrf.pvo

wrf.pvo(ustag, vstag, theta, pres, msfu, msfv, msfm, cor, dx, dy, meta=True)

Return the potential vorticity.

This function calculates the potential vorticity [PVU] at each grid point.

This is the raw computational algorithm and does not extract any variables from WRF output files. Use wrf.getvar() to both extract and compute diagnostic variables.

Parameters:
  • ustag (xarray.DataArray or numpy.ndarray) – The u component of the wind in [m s-1] that is at least three dimensions with a staggered west_east dimension. The rightmost dimensions are bottom_top x south_north x west_east_stag.
  • vstag (xarray.DataArray or numpy.ndarray) – The v component of the wind in [m s-1] that is at least three dimensions with a staggered south_north dimension. The rightmost dimensions are bottom_top x south_north_stag x west_east.
  • theta (xarray.DataArray or numpy.ndarray) –

    The potential temperature field [K] whose rightmost dimensions are bottom_top x south_north x west_east and whose leftmost dimensions are the same as ustag.

    Note

    This variable must be supplied as a xarray.DataArray in order to copy the dimension names to the output. Otherwise, default names will be used.

  • pres (xarray.DataArray or numpy.ndarray) – Full pressure (perturbation + base state pressure) in [Pa], with the same dimensions as theta.
  • msfu (xarray.DataArray or numpy.ndarray) – The map scale factor on the u-grid that is at least two dimensions, whose rightmost two dimensions must be the same as ustag. If this array contains more than two dimensions, they must be the same as ustag and vstag’s leftmost dimensions.
  • msfv (xarray.DataArray or numpy.ndarray) – The map scale factor on the v-grid that is at least two dimensions, whose rightmost two dimensions must be the same as vstag. If this array contains more than two dimensions, they must be the same as ustag and vstag’s leftmost dimensions.
  • msfm (xarray.DataArray or numpy.ndarray) – The map scale factor on the mass grid that is at least two dimensions, whose rightmost two dimensions must be south_north x west_east. If this array contains more than two dimensions, they must be the same as ustag and vstag’s leftmost dimensions.
  • cor (xarray.DataArray or numpy.ndarray) – The Coriolis sine latitude array that is at least two dimensions, whose dimensions must be the same as msfm.
  • dx (float) – The distance between x grid points.
  • dy (float) – The distance between y grid points.
  • meta (bool) – Set to False to disable metadata and return numpy.ndarray instead of xarray.DataArray. Default is True.

Warning

The input arrays must not contain any missing/fill values or numpy.nan values.

Returns:The potential vorticity. If xarray is enabled and the meta parameter is True, then the result will be an xarray.DataArray object. Otherwise, the result will be a numpy.ndarray object with no metadata.
Return type:xarray.DataArray or numpy.ndarray