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

Function dbz

src/wrf/computation.py:1207–1296  ·  view source on GitHub ↗

Return the simulated radar reflectivity. This function computes equivalent reflectivity factor [dBZ] at each model grid point assuming spherical particles of constant density, with exponential size distributions. This function is based on "dbzcalc.f" in RIP. This is the raw com

(pres, tkel, qv, qr, qs=None, qg=None, use_varint=False,
        use_liqskin=False, meta=True)

Source from the content-addressed store, hash-verified

1205@set_alg_metadata(3, "pres", units="dBZ",
1206 description="radar reflectivity")
1207def dbz(pres, tkel, qv, qr, qs=None, qg=None, use_varint=False,
1208 use_liqskin=False, meta=True):
1209 """Return the simulated radar reflectivity.
1210
1211 This function computes equivalent reflectivity factor [dBZ] at each
1212 model grid point assuming spherical particles of constant density,
1213 with exponential size distributions. This function is based on
1214 "dbzcalc.f" in RIP.
1215
1216 This is the raw computational algorithm and does not extract any variables
1217 from WRF output files. Use :meth:`wrf.getvar` to both extract and compute
1218 diagnostic variables.
1219
1220 Args:
1221
1222 pres (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Full
1223 pressure (perturbation + base state pressure) in [Pa], with the
1224 rightmost dimensions as bottom_top x south_north x west_east
1225
1226 Note:
1227
1228 This variable must be
1229 supplied as a :class:`xarray.DataArray` in order to copy the
1230 dimension names to the output. Otherwise, default names will
1231 be used.
1232
1233 tkel (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Temperature
1234 in [K] with same dimensionality as *pres*.
1235
1236 qv (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Water vapor
1237 mixing ratio in [kg/kg] with the same dimensionality as *pres*.
1238
1239 qr (:class:`xarray.DataArray` or :class:`numpy.ndarray`): Rain water
1240 vapor mixing ratio in [kg/kg] with the same dimensionality as
1241 *pres*.
1242
1243 qs (:class:`xarray.DataArray` or :class:`numpy.ndarray`, optional):
1244 Snow mixing ratio in [kg/kg] with the same dimensionality as
1245 *pres*.
1246
1247 qg (:class:`xarray.DataArray` or :class:`numpy.ndarray`, optional):
1248 Graupel mixing ratio in [kg/kg] with the same dimensionality as
1249 *pres*.
1250
1251 use_varint (:obj:`bool`, optional): When set to False,
1252 the intercept parameters are assumed constant
1253 (as in MM5's Reisner-2 bulk microphysical scheme).
1254 When set to True, the variable intercept
1255 parameters are used as in the more recent version of Reisner-2
1256 (based on Thompson, Rasmussen, and Manning, 2004, Monthly weather
1257 Review, Vol. 132, No. 2, pp. 519-542.).
1258
1259 use_liqskin (:obj:`bool`, optional): When set to True, frozen particles
1260 that are at a temperature above freezing are assumed to scatter
1261 as a liquid particle. Set to False to disable.
1262
1263 meta (:obj:`bool`): Set to False to disable metadata and return
1264 :class:`numpy.ndarray` instead of

Callers

nothing calls this directly

Calls 1

_dbzFunction · 0.85

Tested by

no test coverage detected