radarx.retrieve.wind_profile.vad_profile#
- radarx.retrieve.wind_profile.vad_profile(obj, field=None, *, height_bins=None, min_gates=50, min_spread=0.1, max_rms=None, min_elevation=1.0, max_elevation=45.0, max_range=None, n_threads=None, engine='auto')[source]#
Wind profile from radar radial velocities by the velocity-azimuth display.
The ring fit is the linear VAD of Browning and Wexler [1] (a wind that is linear across the ring; first harmonic for the wind, zeroth and second harmonics for divergence and deformation; the paper’s equation numbers are not checked). The sweep selection and rejection thresholds (
min_gates,min_spread,max_rms, elevation limits) and the height binning are radarx choices, not values from that paper.- Parameters:
obj (
xarray.Datasetorxarray.DataTree) – A sweep (azimuth,range,elevation,altitude), a single sweep node (dtree["sweep_0"]) or a volume withsweep_*groups (xradar layout). The velocities must be dealiased (e.g.radarx.retrieve.dealias_velocity()) and no-data codes masked; sweeps without the velocity field are skipped.field (
str, optional) – Velocity variable; default the first ofVRADH,VRADV,VELOCITY,velocity,VEL.height_bins (array-like, optional) – Edges of the height bins (m above sea level) in which ring winds are averaged (weighted by their gate counts). Default 100-m bins from the radar altitude to 12 km above it.
min_gates (
int, optional) – Fewest valid gates on a ring. Default 50.min_spread (
float, optional) – Smallest azimuthal coverage of the valid gates, the determinant of the covariance of \((\sin\alpha, \cos\alpha)\) (0.25 for a full circle, 0 for one direction). Default 0.1.max_rms (
float, optional) – Reject rings whose r.m.s. fit residual exceeds this (m s-1).min_elevation, max_elevation (
float, optional) – Elevation angles (degrees) of the sweeps used. Default 1-45.max_range (
float, optional) – Use only range rings up to this range (m). Far rings of low sweeps average the wind over a circle hundreds of kilometres wide; limiting the range keeps the profile local to the radar.n_threads (
int, optional) – Threads for the compiled kernel. Default: all cores.engine (
{"auto", "compiled", "numpy"}, optional) – Kernel implementation.
- Returns:
xarray.Dataset–u,v,wind_speed,wind_direction,vad_rms(mean fit residual) andvad_rings(rings per bin) onheight(bin centres, m above sea level), with the radarlatitude,longitudeandaltitude; and, from the second-harmonic fit described in the module docstring,divergence,stretching_deformation(\(u_x - v_y\)),shearing_deformation(\(u_y + v_x\)) anddeformation(their root sum of squares), all in s-1, withvad_rings_harmonics(rings per bin that have it). The second-harmonic fit needs a wider azimuth coverage than the wind: the determinant of the covariance of \((\sin\alpha, \cos\alpha, \sin 2\alpha, \cos 2\alpha)\) must be at leastmin_spread / 4(1/16 for a full circle); rings short of it keep their wind but give NaN for the four new variables. The wind variables do not depend on the second harmonic. The divergence neglects \((w - v_t)\sin\phi\).
Notes
Dask. This function computes the dask array: it fits the wind to all rays of the sweeps. The input is loaded into memory and the result is held in memory.
References