radarx.grid.mixed.grid_cones_mixed#

radarx.grid.mixed.grid_cones_mixed(obj, data_vars=None, x=None, y=None, z=None, *, order=0.5, k_e=1.3333333333333333, max_gap=2.0, min_weight=0.5, n_threads=None, engine='auto')[source]#

Grid a radar volume with mixed-order interpolation (Collis et al. 2010).

Every field is gridded twice, by radarx.grid.grid_cones() (inside each sweep first, then in height: “vertical last”, \(G_v\)) and with the reverse order of interpolation (“horizontal last”, \(G_h\): in height first, then in azimuth and range), and the two are blended

\[G = w_h\, G_h + (1 - w_h)\, G_v , \qquad w_h = \left[\frac{\sin(\pi \theta/\theta_{max} - \pi/2) + 1}{2}\right]^n ,\]

where \(\theta\) is the antenna elevation of the beam to the point and \(\theta_{max}\) the highest sweep elevation of the field (Eq. 6 of Collis et al. 2010 [1]). The weight grows from 0 at the lowest elevation to 1 at the highest; it is smaller for larger order \(n\) (\(n = 1/2\) is \(w_h = \sin(\pi\theta / 2\theta_{max})\)).

The horizontal-last grid takes, for an output point at height \(z\), the value of every sweep at the point of its beam that is at height \(z\) (at the ground distance \(s_k(z)\), with the azimuth interpolated between the rays), and interpolates linearly in ground distance between the two sweeps whose crossing points enclose the point. Between sparse beams a field that varies strongly in the vertical but little in the horizontal, such as a jet, is therefore reproduced, where the vertical-last order leaves undulations with the horizontal spacing of the beams.

Parameters:
  • obj (xarray.DataTree) – Radar volume, as for radarx.grid.grid_cones().

  • data_vars (str or list of str, optional) – Fields to grid; by default every field in the lowest sweep.

  • x, y, z (array-like) – Grid coordinates (m) east and north of the radar and above sea level.

  • order (float, optional) – The exponent \(n\), at least 0 (0 gives horizontal last everywhere, large values vertical last except at the top). Default 0.5, the value Collis et al. chose for the 0.5 to 42 degree scan strategy of C-POL; it will differ for other scan strategies.

  • k_e, max_gap, min_weight, n_threads, engine – As for radarx.grid.grid_cones().

Returns:

xarray.Dataset – As for radarx.grid.grid_cones(), with the attribute gridding_method = "mixed-order cone" and mixed_order. Cells where only one of the two orders gives a value take that value. Levels below the lowest sweep stay empty (no fill_below).

Notes

Source of the method. The two orders of ordered linear interpolation, the weighted sum and the weight \(w_h\) of Eq. 6 are those of Collis et al. (2010) [1]. The paper’s text gives the weight of the vertical-last result as \(w_v = w_h - 1\), which cannot be a weight of a weighted sum; 1 - w_h is used. The paper describes the horizontal-last order in one sentence (“interpolate in height, azimuth, and then radially”, with “very poor horizontal resolution” as the price) and gives no equations for it; the construction above, the beam crossing points at the output height, is radarx’s reading of that sentence, chosen because it has the two properties the paper reports (no vertical-gradient undulations, poor horizontal resolution). It is not their code. The paper’s data had the rays and gates of one radar; the sweeps here need not share them. The beam height is that of the effective Earth radius model (Doviak and Zrnić 1993 [2], Eq. 2.28b), as in radarx.grid.grid_cones(). The use of the median elevation of a sweep for the crossing points, max_gap and min_weight are radarx choices.

What it does and does not do. Horizontal last removes the undulations at the beam spacing and smooths the field horizontally at high elevations (the paper: “at the cost of reduced horizontal resolution at higher elevations”). Whether it also removes real small-scale updrafts has not been studied (the paper, section 6, leaves it for later). The paper tested the scheme on synthetic flow and on one TWP-ICE case with two C-band radars; radarx checks it on synthetic flow (see the tests) and does not claim more.

References

Examples

>>> grid = radarx.grid.grid_cones_mixed(dtree, "VRADH", x, y, z)