radarx.retrieve.tc_diagnostics.tc_ring_stats#

radarx.retrieve.tc_diagnostics.tc_ring_stats(obj, center=None, *, center_latlon=None, field=None, radii=None, min_radius=1000.0, max_radius=100000.0, radius_step=1000.0, ring_width=2000.0, max_wavenumber=2, min_points=30, max_gap=180.0, threshold=None, k_e=1.3333333333333333, n_threads=None, engine='auto')[source]#

Azimuthal mean and wavenumbers of a polar field on rings around a centre.

For every ring radius the gates of a plan position indicator within the half width of the ring are fitted with a mean and the azimuthal harmonics up to max_wavenumber (equations in radarx.retrieve.tc_diagnostics). Applied to the reflectivity this gives the radial profile of the eyewall and the rainbands and their asymmetry, for tc_structure().

Parameters:
  • obj (xarray.DataArray, xarray.Dataset or xarray.DataTree) – A plan position indicator with azimuth (one value per ray), range (m) and elevation (per ray, else sweep_fixed_angle) and the radar altitude (latitude and longitude for geographic output); a DataArray is the field itself. For a volume every sweep that has the field is processed. Dask-backed input gives a lazy result.

  • center (tuple of float or xarray.Dataset or xarray.DataTree, optional) – (x, y) of the centre in m east and north of the radar, or the result of radarx.retrieve.tc_center() (for a volume, its tree).

  • center_latlon (tuple of float, optional) – (latitude, longitude) of the centre instead of center.

  • field (str, optional) – Name of the field. Default: the first of DBZH, DBZ, reflectivity and corrected_reflectivity.

  • radii (array-like, optional) – Ring radii (m). Default min_radius to max_radius in steps of radius_step.

  • min_radius, max_radius, radius_step (float, optional) – Default radii (m): 1 to 100 km in 1 km steps.

  • ring_width (float, optional) – Full width of the triangular weight of a ring (m). Default 2000.

  • max_wavenumber (int, optional) – Highest azimuthal wavenumber (0 to 3), reduced where the data have wide gaps. Default 2.

  • min_points (int, optional) – Fewest gates in a ring. Default 30.

  • max_gap (float, optional) – Largest angular gap (degrees) of the data of a ring that is still fitted. Default 180.

  • threshold (float, optional) – Value (in the units of the field) for ECHO_FRACTION, the fraction of the weight of the ring with values at or above it. Default None: no ECHO_FRACTION.

  • k_e (float, optional) – Effective Earth radius factor of the beam geometry. Default 4/3.

  • n_threads (int, optional) – Threads of the compiled kernel. Default: all cores.

  • engine ({"auto", "compiled", "numpy"}, optional) – Implementation. "auto" (default) prefers the compiled kernel.

Returns:

xarray.Dataset or xarray.DataTree – On the dimension radius (m): MEAN (the azimuthal mean, in the units of the field), STD (the standard deviation of the gates of the ring), WAVE<n>_AMPLITUDE and WAVE<n>_AZIMUTH (amplitude and azimuth in degrees clockwise from north of the first maximum, seen from the centre) for the wavenumbers n up to max_wavenumber, N_POINTS, DATA_GAP (degrees), FIT_ORDER and FIT_RMS, and ECHO_FRACTION with threshold. Scalars CENTER_X and CENTER_Y (m) and CENTER_LATITUDE and CENTER_LONGITUDE. A ring without enough gates or with a wide gap is NaN. For a volume a DataTree with one node per sweep. The input is not changed.

Raises:
  • ValueError – For invalid options, a sweep without the geometry, or a centre that is not finite or at the radar.

  • KeyError – If no sweep of a volume has the field.

  • TypeError – If obj is not an xarray object.

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

Notes

Gates are weighted by their area (the ground range), so that the mean is the mean over the area of the ring. A mean of reflectivity in dBZ is a mean of decibels; convert to linear units first for a mean rain rate or mean reflectivity factor.

Dask. Dask arrays stay lazy: the result is a dask array and nothing is computed until it is.

References