wrf.eth

wrf.eth(qv, tkel, pres, meta=True, units='K')

Return the equivalent potential temperature.

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:
  • qv (xarray.DataArray or numpy.ndarray) – Water vapor mixing ratio in [kg/kg] that is at least three dimensions, with the rightmost dimensions of bottom_top x south_north x west_east.

  • tkel (xarray.DataArray or numpy.ndarray) –

    Temperature in [K] with same dimensionality as qv.

    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 dimensionality as qv.

  • meta (bool) – Set to False to disable metadata and return numpy.ndarray instead of xarray.DataArray. Default is True.

  • units (str) – The desired units. Refer to the getvar() product table for a list of available units for ‘eth’. Default is ‘K’.

Warning

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

Returns:

The equivalent potential temperature. 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

See also

wrf.getvar(), wrf.temp(), wrf.wetbulb(), tvirtual()