wrf.avo¶
- wrf.avo(ustag, vstag, msfu, msfv, msfm, cor, dx, dy, meta=True)¶
Return the absolute vorticity.
This function returns absolute vorticity [10-5 s-1], which is the sum of the relative vorticity at each grid point and the Coriolis parameter at the latitude.
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
ornumpy.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.
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.vstag (
xarray.DataArray
ornumpy.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.
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.msfu (
xarray.DataArray
ornumpy.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
ornumpy.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
ornumpy.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
ornumpy.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 returnnumpy.ndarray
instead ofxarray.DataArray
. Default is True.
Warning
The input arrays must not contain any missing/fill values or
numpy.nan
values.- Returns:
The absolute 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 anumpy.ndarray
object with no metadata.- Return type:
See also