pydda.cost_functions.calculate_background_gradient#

pydda.cost_functions.calculate_background_gradient(u, v, w, weights, u_back, v_back, Cb=0.01)[source]#

Calculates the gradient of the background cost function. For each u, v this is given as 2*coefficent*(analysis wind - background wind). :Parameters: * 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

  • weights (Float array) – Weights for each point to consider into cost function

  • u_back (1D float array) – Zonal winds vs height from sounding

  • w_back (1D float array) – Meridional winds vs height from sounding

  • Cb (float) – Weight of background constraint to total cost function

Returns:

y (float array) – value of gradient of background cost function