pydda.cost_functions.calculate_background_cost#

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

Calculates the background cost function. The background cost function is simply the sum of the squared differences between the wind field and the background wind field multiplied by the weighting coefficient. :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:

cost (float) – value of background cost function