pydda.cost_functions.calculate_point_gradient#
- pydda.cost_functions.calculate_point_gradient(u, v, x, y, z, point_list, Cp=0.001, roi=500.0)[source]#
Calculates the gradient of the cost function related to point observations. A mean square error cost function term is applied to points that are within the sphere of influence whose radius is determined by roi. :Parameters: * u (Float array) – Float array with u component of wind field
v (Float array) – Float array with v component of wind field
x (Float array) – X coordinates of grid centers
y (Float array) – Y coordinates of grid centers
z (Float array) – Z coordinated of grid centers
point_list (list of dicts) – List of point constraints. Each member is a dict with keys of “u”, “v”, to correspond to each component of the wind field and “x”, “y”, “z” to correspond to the location of the point observation. In addition, “site_id” gives the METAR code (or name) to the station.
Cp (float) – The weighting coefficient of the point cost function.
roi (float) – Radius of influence of observations
- Returns:
gradJ (float array) – The gradient of the cost function related to the difference between wind field and points.