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 inradarx.retrieve.tc_diagnostics). Applied to the reflectivity this gives the radial profile of the eyewall and the rainbands and their asymmetry, fortc_structure().- Parameters:
obj (
xarray.DataArray,xarray.Datasetorxarray.DataTree) – A plan position indicator withazimuth(one value per ray),range(m) andelevation(per ray, elsesweep_fixed_angle) and the radaraltitude(latitudeandlongitudefor 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 (
tupleoffloatorxarray.Datasetorxarray.DataTree, optional) –(x, y)of the centre in m east and north of the radar, or the result ofradarx.retrieve.tc_center()(for a volume, its tree).center_latlon (
tupleoffloat, optional) –(latitude, longitude)of the centre instead ofcenter.field (
str, optional) – Name of the field. Default: the first ofDBZH,DBZ,reflectivityandcorrected_reflectivity.radii (array-like, optional) – Ring radii (m). Default
min_radiustomax_radiusin steps ofradius_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) forECHO_FRACTION, the fraction of the weight of the ring with values at or above it. Default None: noECHO_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.Datasetorxarray.DataTree– On the dimensionradius(m):MEAN(the azimuthal mean, in the units of the field),STD(the standard deviation of the gates of the ring),WAVE<n>_AMPLITUDEandWAVE<n>_AZIMUTH(amplitude and azimuth in degrees clockwise from north of the first maximum, seen from the centre) for the wavenumbersnup tomax_wavenumber,N_POINTS,DATA_GAP(degrees),FIT_ORDERandFIT_RMS, andECHO_FRACTIONwiththreshold. ScalarsCENTER_XandCENTER_Y(m) andCENTER_LATITUDEandCENTER_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
objis 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