MCPcopy Create free account
hub / github.com/NCAR/wrf-python / ctt

Function ctt

src/wrf/computation.py:1093–1202  ·  view source on GitHub ↗

Return the cloud top temperature. This is the raw computational algorithm and does not extract any variables from WRF output files. Use :meth:`wrf.getvar` to both extract and compute diagnostic variables. Args: pres_hpa (:class:`xarray.DataArray` or :class:`numpy.ndarray`

(pres_hpa, tkel, qv, qcld, height, terrain, qice=None,
        fill_nocloud=False, missing=default_fill(np.float64),
        opt_thresh=1.0, meta=True, units="degC")

Source from the content-addressed store, hash-verified

1091 description="cloud top temperature")
1092@convert_units("temp", "c")
1093def ctt(pres_hpa, tkel, qv, qcld, height, terrain, qice=None,
1094 fill_nocloud=False, missing=default_fill(np.float64),
1095 opt_thresh=1.0, meta=True, units="degC"):
1096 """Return the cloud top temperature.
1097
1098 This is the raw computational algorithm and does not extract any variables
1099 from WRF output files. Use :meth:`wrf.getvar` to both extract and compute
1100 diagnostic variables.
1101
1102 Args:
1103
1104 pres_hpa (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Full
1105 pressure (perturbation + base state pressure) in [hPa], with the
1106 rightmost dimensions as bottom_top x south_north x west_east
1107
1108 Note:
1109
1110 The units for *psfc_hpa* are [hPa].
1111
1112 Note:
1113
1114 This variable must be
1115 supplied as a :class:`xarray.DataArray` in order to copy the
1116 dimension names to the output. Otherwise, default names will
1117 be used.
1118
1119 tkel (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Temperature
1120 in [K] with same dimensionality as *pres_hpa*.
1121
1122 qv (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Water vapor
1123 mixing ratio in [kg/kg] with the same dimensionality as *pres_hpa*.
1124
1125 qcld (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Cloud water
1126 vapor mixing ratio in [kg/kg] with the same dimensionality as
1127 *pres_hpa*.
1128
1129 height (:class:`xarray.DataArray` or :class:`numpy.ndarray`):
1130 Geopotential height in [m] with the same dimensionality as
1131 *pres_hpa*.
1132
1133 terrain (:class:`xarray.DataArray` or :class:`numpy.ndarray`):
1134 Terrain height in [m]. This is at least a two-dimensional array
1135 with the same dimensionality as *pres_hpa*, excluding the vertical
1136 (bottom_top/top_bottom) dimension.
1137
1138 qice (:class:`xarray.DataArray` or :class:`numpy.ndarray`, optional):
1139 Ice mixing ratio in [kg/kg] with the same dimensionality as
1140 *pres_hpa*.
1141
1142 fill_nocloud (:obj:`bool`, optional): Set to True to use fill values in
1143 regions where clouds are not detected (optical depth less than 1).
1144 Otherwise, the output will contain the surface temperature for
1145 areas without clouds. Default is False.
1146
1147 missing (:obj:`float`, optional): The fill value to use for areas
1148 where no clouds are detected. Only used if *fill_nocloud* is
1149 True. Default is
1150 :data:`wrf.default_fill(numpy.float64)`.

Callers

nothing calls this directly

Calls 2

default_fillFunction · 0.85
_cttFunction · 0.85

Tested by

no test coverage detected