wrf.g_dbz.get_dbz

wrf.g_dbz.get_dbz(wrfin, timeidx=0, method='cat', squeeze=True, cache=None, meta=True, _key=None, use_varint=False, use_liqskin=False)

Return the simulated radar reflectivity.

This functions extracts the necessary variables from the NetCDF file object in order to perform the calculation.

Parameters:
  • wrfin (netCDF4.Dataset, Nio.NioFile, or an iterable) – WRF-ARW NetCDF data as a netCDF4.Dataset, Nio.NioFile or an iterable sequence of the aforementioned types.

  • timeidx (int or wrf.ALL_TIMES, optional) – The desired time index. This value can be a positive integer, negative integer, or wrf.ALL_TIMES (an alias for None) to return all times in the file or sequence. The default is 0.

  • method (str, optional) – The aggregation method to use for sequences. Must be either ‘cat’ or ‘join’. ‘cat’ combines the data along the Time dimension. ‘join’ creates a new dimension for the file index. The default is ‘cat’.

  • squeeze (bool, optional) – Set to False to prevent dimensions with a size of 1 from being automatically removed from the shape of the output. Default is True.

  • cache (dict, optional) – A dictionary of (varname, ndarray) that can be used to supply pre-extracted NetCDF variables to the computational routines. It is primarily used for internal purposes, but can also be used to improve performance by eliminating the need to repeatedly extract the same variables used in multiple diagnostics calculations, particularly when using large sequences of files. Default is None.

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

  • _key (int, optional) – A caching key. This is used for internal purposes only. Default is None.

  • 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.

Returns:

The simulated radar reflectivity. If xarray is enabled and the meta parameter is True, then the result will be a xarray.DataArray object. Otherwise, the result will be a numpy.ndarray object with no metadata.

Return type:

xarray.DataArray or numpy.ndarray