wrf.dbz¶
- wrf.dbz(pres, tkel, qv, qr, qs=None, qg=None, use_varint=False, use_liqskin=False, meta=True)¶
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 computational algorithm and does not extract any variables from WRF output files. Use
wrf.getvar()
to both extract and compute diagnostic variables.- Parameters:
pres (
xarray.DataArray
ornumpy.ndarray
) –Full pressure (perturbation + base state pressure) in [Pa], with the rightmost dimensions as bottom_top x south_north 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.tkel (
xarray.DataArray
ornumpy.ndarray
) – Temperature in [K] with same dimensionality as pres.qv (
xarray.DataArray
ornumpy.ndarray
) – Water vapor mixing ratio in [kg/kg] with the same dimensionality as pres.qr (
xarray.DataArray
ornumpy.ndarray
) – Rain water vapor mixing ratio in [kg/kg] with the same dimensionality as pres.qs (
xarray.DataArray
ornumpy.ndarray
, optional) – Snow mixing ratio in [kg/kg] with the same dimensionality as pres.qg (
xarray.DataArray
ornumpy.ndarray
, optional) – Graupel mixing ratio in [kg/kg] with the same dimensionality as pres.use_varint (
bool
, optional) – When set to False, the intercept parameters are assumed constant (as in MM5’s Reisner-2 bulk microphysical scheme). When set to True, the variable intercept parameters are used as in the more recent version of Reisner-2 (based on Thompson, Rasmussen, and Manning, 2004, Monthly weather Review, Vol. 132, No. 2, pp. 519-542.).use_liqskin (
bool
, optional) – When set to True, frozen particles that are at a temperature above freezing are assumed to scatter as a liquid particle. Set to False to disable.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 simulated radar reflectivity. 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