wrf.ctt¶
- wrf.ctt(pres_hpa, tkel, qv, qcld, height, terrain, qice=None, fill_nocloud=False, missing=<MagicMock name='mock().item()' id='140499233145616'>, opt_thresh=1.0, meta=True, units='degC')¶
Return the cloud top 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:
pres_hpa (
xarray.DataArray
ornumpy.ndarray
) –Full pressure (perturbation + base state pressure) in [hPa], with the rightmost dimensions as bottom_top x south_north x west_east
Note
The units for psfc_hpa are [hPa].
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.tkel (
xarray.DataArray
ornumpy.ndarray
) – Temperature in [K] with same dimensionality as pres_hpa.qv (
xarray.DataArray
ornumpy.ndarray
) – Water vapor mixing ratio in [kg/kg] with the same dimensionality as pres_hpa.qcld (
xarray.DataArray
ornumpy.ndarray
) – Cloud water vapor mixing ratio in [kg/kg] with the same dimensionality as pres_hpa.height (
xarray.DataArray
ornumpy.ndarray
) – Geopotential height in [m] with the same dimensionality as pres_hpa.terrain (
xarray.DataArray
ornumpy.ndarray
) – Terrain height in [m]. This is at least a two-dimensional array with the same dimensionality as pres_hpa, excluding the vertical (bottom_top/top_bottom) dimension.qice (
xarray.DataArray
ornumpy.ndarray
, optional) – Ice mixing ratio in [kg/kg] with the same dimensionality as pres_hpa.fill_nocloud (
bool
, optional) – Set to True to use fill values in regions where clouds are not detected (optical depth less than 1). Otherwise, the output will contain the surface temperature for areas without clouds. Default is False.missing (
float
, optional) – The fill value to use for areas where no clouds are detected. Only used if fill_nocloud is True. Default iswrf.default_fill(numpy.float64)
.opt_thresh (
float
, optional) – The amount of optical depth (integrated from top down) required to trigger a cloud top temperature calculation. The cloud top temperature is calculated at the vertical level where this threshold is met. Vertical columns with less than this threshold will be treated as cloud free areas. In general, the larger the value is for this threshold, the lower the altitude will be for the cloud top temperature calculation, and therefore higher cloud top temperature values. Default is 1.0, which should be sufficient for most users.meta (
bool
) – Set to False to disable metadata and returnnumpy.ndarray
instead ofxarray.DataArray
. Default is True.units (
str
) – The desired units. Refer to thegetvar()
product table for a list of available units for ‘ctt’. Default is ‘degC’.
Warning
The input arrays must not contain any missing/fill values or
numpy.nan
values.- Returns:
The cloud top 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 anumpy.ndarray
object with no metadata.- Return type:
See also