pydda.cost_functions.calculate_grad_radial_vel#

pydda.cost_functions.calculate_grad_radial_vel(vrs, els, azs, u, v, w, wts, weights, rmsVr, coeff=1.0, upper_bc=1, upper_bc_mask=None, parallel=False)[source]#

Calculates the gradient of the cost function due to difference of wind field from radar radial velocities. All arrays in the given lists must have the same dimensions and represent the same spatial coordinates. :Parameters: * vrs (List of float arrays) – List of radial velocities from each radar

  • els (List of float arrays) – List of elevations from each radar

  • azs (List of azimuths) – List of azimuths from each radar

  • u (Float array) – Float array with u component of wind field

  • v (Float array) – Float array with v component of wind field

  • w (Float array) – Float array with w component of wind field

  • coeff (float) – Constant for cost function

  • vel_name (str) – Background velocity field name

  • weights (n_radars x_bins x y_bins float array) – Data weights for each pair of radars

  • upper_bc (int) – Upper boundary (impermeability) condition. 0 disables it, 1 enforces w = 0 at the top of the domain, and 2 enforces w = 0 above the echo top as given by upper_bc_mask. The legacy booleans True and False are equivalent to 1 and 0.

  • upper_bc_mask (3D bool array or None) – The grid points at which w is held fixed when upper_bc is 2, as returned by pydda.cost_functions.calculate_echo_top_mask().

Returns:

  • y (1-D float array) – Gradient vector of observational cost function.

  • More information

  • —————-

  • The gradient is calculated by taking the functional derivative of the

  • cost function. For more information on functional derivatives, see the

  • Euler-Lagrange Equation

  • https (//en.wikipedia.org/wiki/Euler%E2%80%93Lagrange_equation)