Return the simulated radar reflectivity. This functions extracts the necessary variables from the NetCDF file object in order to perform the calculation. Args: wrfin (:class:`netCDF4.Dataset`, :class:`Nio.NioFile`, or an \ iterable): WRF-ARW NetCDF data
(wrfin, timeidx=0, method="cat",
squeeze=True, cache=None, meta=True, _key=None,
use_varint=False, use_liqskin=False)
| 12 | description="radar reflectivity", |
| 13 | units="dBZ") |
| 14 | def get_dbz(wrfin, timeidx=0, method="cat", |
| 15 | squeeze=True, cache=None, meta=True, _key=None, |
| 16 | use_varint=False, use_liqskin=False): |
| 17 | """Return the simulated radar reflectivity. |
| 18 | |
| 19 | This functions extracts the necessary variables from the NetCDF file |
| 20 | object in order to perform the calculation. |
| 21 | |
| 22 | Args: |
| 23 | |
| 24 | wrfin (:class:`netCDF4.Dataset`, :class:`Nio.NioFile`, or an \ |
| 25 | iterable): WRF-ARW NetCDF |
| 26 | data as a :class:`netCDF4.Dataset`, :class:`Nio.NioFile` |
| 27 | or an iterable sequence of the aforementioned types. |
| 28 | |
| 29 | timeidx (:obj:`int` or :data:`wrf.ALL_TIMES`, optional): The |
| 30 | desired time index. This value can be a positive integer, |
| 31 | negative integer, or |
| 32 | :data:`wrf.ALL_TIMES` (an alias for None) to return |
| 33 | all times in the file or sequence. The default is 0. |
| 34 | |
| 35 | method (:obj:`str`, optional): The aggregation method to use for |
| 36 | sequences. Must be either 'cat' or 'join'. |
| 37 | 'cat' combines the data along the Time dimension. |
| 38 | 'join' creates a new dimension for the file index. |
| 39 | The default is 'cat'. |
| 40 | |
| 41 | squeeze (:obj:`bool`, optional): Set to False to prevent dimensions |
| 42 | with a size of 1 from being automatically removed from the shape |
| 43 | of the output. Default is True. |
| 44 | |
| 45 | cache (:obj:`dict`, optional): A dictionary of (varname, ndarray) |
| 46 | that can be used to supply pre-extracted NetCDF variables to the |
| 47 | computational routines. It is primarily used for internal |
| 48 | purposes, but can also be used to improve performance by |
| 49 | eliminating the need to repeatedly extract the same variables |
| 50 | used in multiple diagnostics calculations, particularly when using |
| 51 | large sequences of files. |
| 52 | Default is None. |
| 53 | |
| 54 | meta (:obj:`bool`, optional): Set to False to disable metadata and |
| 55 | return :class:`numpy.ndarray` instead of |
| 56 | :class:`xarray.DataArray`. Default is True. |
| 57 | |
| 58 | _key (:obj:`int`, optional): A caching key. This is used for internal |
| 59 | purposes only. Default is None. |
| 60 | |
| 61 | use_varint (:obj:`bool`, optional): When set to False, |
| 62 | the intercept parameters are assumed constant |
| 63 | (as in MM5's Reisner-2 bulk microphysical scheme). |
| 64 | When set to True, the variable intercept |
| 65 | parameters are used as in the more recent version of Reisner-2 |
| 66 | (based on Thompson, Rasmussen, and Manning, 2004, Monthly weather |
| 67 | Review, Vol. 132, No. 2, pp. 519-542.). |
| 68 | |
| 69 | use_liqskin (:obj:`bool`, optional): When set to True, frozen particles |
| 70 | that are at a temperature above freezing are assumed to scatter |
| 71 | as a liquid particle. Set to False to disable. |
no test coverage detected