radarx.retrieve.hail.mesh#

radarx.retrieve.hail.mesh(obj, dbz=None, *, freezing_level=None, minus20_level=None, profile=None, zl=40.0, zu=50.0, kind=None, missing=None, tolerance=0.1, n_threads=None, engine='auto')[source]#

Maximum expected size of hail (MESH) of the reflectivity columns.

MESH = 2.54 SHI^0.5 in mm (Witt et al. 1998, Eq. 6), fitted so that about 75 % of 147 hail reports were smaller (77, 70 and 73 % for the 19-33, 33-60 and above 60 mm reports of their Table 6). It is an upper estimate of the largest stone, not the size at a point. The operational value is rounded to 6.35 mm; this one is not.

Parameters:

obj (xarray.DataTree or xarray.Dataset) – A polar volume, a grid or a quasi-vertical profile.

Notes

Dask. This function computes the dask array: the result combines the gates of all sweeps of the volume. The input is loaded into memory and the result is held in memory.

dbzstr, optional

Name of the reflectivity (dBZ). By default the first found of DBZH, DBZ, reflectivity and corrected_reflectivity (for a volume, in the first sweep that has one).

freezing_level, minus20_levelfloat or xarray.DataArray, optional

Height (m above sea level) of the 0 and the -20 degC level: a number, or an array that broadcasts against the columns (a 2-D field on the grid or the polar columns, or one value per time of a profile). NaN where unknown, which gives NaN in the products. Not needed where profile gives them.

profilexarray.Dataset, optional

A sounding or ERA5 profile with temperature (K) on a height (or z) dimension, e.g. from radarx.io.sounding.read_sounding(), radarx.io.sounding.era5_profile() or radarx.io.sounding.era5_column(). The heights of the 0 and -20 degC isotherms (the highest crossing, see radarx.io.sounding.isotherm_height()) are used for the levels that are not given.

zl, zufloat, optional

Reflectivities (dBZ) between which the weight W(Z) rises from 0 to 1. Defaults 40 and 50, the values of Witt et al. (1998), who note that they are adaptable.

kind{“volume”, “grid”, “qvp”}, optional

Kind of input. By default a DataTree is a polar volume, a Dataset with x and y is a grid and one with height a quasi-vertical profile.

missing{“clear”, “gap”}, optional

What a missing (NaN) value means. "clear": no echo, which is how radar volumes mark it (for a grid or a profile, only the values above the lowest valid level); "gap": no data, left out. Default "clear" for a volume and "gap" for a grid or a profile.

tolerancefloat, optional

Volume only: sweeps closer than this in elevation (degrees) count as the same cut, and the one that reaches farthest is used. Default 0.1.

n_threadsint, optional

Threads for the compiled kernel. Default: all cores.

engine{“auto”, “compiled”, “numpy”}, optional

Implementation to use. "auto" (default) prefers the compiled kernel and falls back to NumPy.

Returns:

  • xarray.DataArray – MESH (mm); 0 where SHI is 0.

  • Raises – —— KeyError

    If the reflectivity or no sweep is found.

    ValueError

    If the levels are missing or do not fit the columns, or zu is not above zl.

    ImportError

    If engine="compiled" and the compiled kernel is not available.

  • References – ———- Witt, A., M. D. Eilts, G. J. Stumpf, J. T. Johnson, E. D. Mitchell, and K. W. Thomas, 1998: An enhanced hail detection algorithm for the WSR-88D. Wea. Forecasting, 13 (2), 286-303, https://doi.org/10.1175/1520-0434(1998)013<0286:AEHDAF>2.0.CO;2 (Eqs. 1-6 and Fig. 4).

    Waldvogel, A., W. Schmid, and B. Federer, 1978: The kinetic energy of hailfalls. Part I: Hailstone spectra. J. Appl. Meteor., 17 (4), 515-520, https://doi.org/10.1175/1520-0450(1978)017<0515:TKEOHP>2.0.CO;2 (the reflectivity to energy flux relation is taken from Witt et al. 1998 and Holleman 2001; not compared with this paper).

    Waldvogel, A., B. Federer, W. Schmid, and J. F. Mezeix, 1978: The kinetic energy of hailfalls. Part II: Radar and hailpads. J. Appl. Meteor., 17 (11), 1680-1693, https://doi.org/10.1175/1520-0450(1978)017<1680:TKEOHP>2.0.CO;2 (the relation is taken from Witt et al. 1998 and Holleman 2001; not compared with this paper).

    Holleman, I., 2001: Hail detection using single-polarization radar. KNMI Scientific Report WR-2001-01 (Eq. 2.4 for E = 5.0e-6 Z^0.84 and Eqs. 2.5 to 2.7 for the SHI).

    Graham, R. A., and J. A. Nelson, 1998: An examination into the utility of the Build 9 hail detection algorithm (HDA) across northern Utah. NWS Western Region Technical Attachment No. 98-27 (warning threshold and POSH offsets of the later adjustment).

Examples

>>> size = radarx.retrieve.mesh(
...     dtree, freezing_level=4200.0, minus20_level=7500.0
... )