pydda.cost_functions.calculate_model_cost#
- pydda.cost_functions.calculate_model_cost(u, v, w, weights, u_model, v_model, w_model, coeff=1.0)[source]#
Calculates the cost function for the model constraint. This is calculated simply as the sum of squares of the differences between the model wind field and the analysis wind field. Vertical velocities are not factored into this cost function as there is typically a high amount of uncertainty in model derived vertical velocities. :Parameters: * u (3D array) – Float array with u component of wind field
v (3D array) – Float array with v component of wind field
w (3D array) – Float array with w component of wind field
weights (list of 3D arrays) – Float array showing how much each point from model weighs into constraint.
u_model (list of 3D arrays) – Float array with u component of wind field from model
v_model (list of 3D arrays) – Float array with v component of wind field from model
w_model (list of 3D arrays) – Float array with w component of wind field from model
coeff (float) – Weighting coefficient
- Returns:
Jv (float) – Value of model cost function