radarx.retrieve.vvp.vvp_winds#
- radarx.retrieve.vvp.vvp_winds(obj, field=None, *, model='linear', radius=10000.0, depth=1000.0, x=None, y=None, z=None, min_gates=100, fall_speed=None, vorticity=None, min_elevation=0.0, max_elevation=90.0, max_range=None, k_e=1.3333333333333333, n_threads=None, engine='auto')[source]#
Linear wind in analysis volumes from the radial velocities of one radar.
Fits the linear wind model of volume velocity processing (equations in
radarx.retrieve.vvp) to the gates inside a cylinder around every node of a grid, and returns the wind, its gradients, the divergence and the deformation with their standard errors.- Parameters:
obj (
xarray.Datasetorxarray.DataTree) – A sweep or a volume withsweep_*groups (xradar layout) with the radial velocity,azimuth,range,elevation(orsweep_fixed_angle) and the radaraltitude. 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.model (
{"uniform", "linear", "linear_w", "full"}, optional) – Unknowns of the fit, seeradarx.retrieve.vvp. Default"linear": the horizontal wind, its horizontal gradients and its vertical shear. Terms that the model omits are not in the result.radius (
float, optional) – Radius of the cylinder of an analysis volume (m). Default 10000.depth (
float, optional) – Depth of the cylinder (m); the volume reachesdepth / 2above and below the centre. Default 1000.x, y (array-like, optional) – Centres of the volumes east and north of the radar (m). Default: a grid with the spacing
radiusthat covers the gates.z (array-like, optional) – Heights of the centres above sea level (m). Default: the middles of layers of the thickness
depththat cover the gates.min_gates (
int, optional) – Fewest gates in a volume. Default 100. A volume with fewer gates, or whose gates do not determine the unknowns (for instance the vertical terms of a single sweep), is NaN.fall_speed (
floatorstr, optional) – Terminal fall speed of the hydrometeors (m s-1, positive downward) or the name of a field of it, removed from the radial velocity as \(v_r + v_t \sin\theta\). Default None: not removed,wthen includes the fall speed.vorticity (
float, optional) – Vertical vorticity (s-1) of the flow, used to turn the modified wind components into the wind at the centre of a volume, \(u = u_0' - y_0\zeta/2\), \(v = v_0' + x_0\zeta/2\). Default None:uandvare the modified components.min_elevation, max_elevation (
float, optional) – Elevation angles (degrees) of the sweeps used. Default 0 to 90.max_range (
float, optional) – Use only gates up to this slant range (m).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– On the grid(z, y, x)(coordinates in m;zabove sea level):uandv(m s-1), and for the models that have themw,du_dx,dv_dy,shear(\(u_y + v_x\)),du_dz,dv_dz,dw_dx,dw_dyanddw_dz(s-1), each with its standard error as<name>_error;divergence(\(u_x + v_y\)),divergence_error,stretching_deformation(\(u_x - v_y\)),shearing_deformationanddeformation(their root sum of squares, s-1) when the model has the horizontal gradients;vvp_rms(the r.m.s. residual, m s-1) andvvp_gates(gates in the volume). The vorticity is not retrievable.- Raises:
ValueError – For invalid options, a sweep without the geometry, or a volume without a valid velocity.
KeyError – If no sweep has the velocity field.
TypeError – If
objis not an xarray Dataset or DataTree.ImportError – If
engine="compiled"and the kernel is not available.
Notes
The retrieval is biased where the wind is not linear in the volume or the model leaves out a term that matters; the standard errors describe the random error of the radial velocity only. Use a larger volume to reduce the random error and a smaller one to reduce the bias.
Dask. This function computes the dask array: it fits the wind to all gates of the volume. The input is loaded into memory and the result is held in memory.
References