divergence#
- rojak.core.derivatives.divergence(u, v, *, units, geod=None, crs=None)[source]#
Horizontal divergence of a 2D vector field
\[\delta = \frac{ \partial u }{ \partial x } + \frac{ \partial v }{ \partial y }\]Computed using
vector_derivatives()so that the derivatives are corrected for map projection distortion.- Parameters:
u (DataArray) – x-component of the vector field
v (DataArray) – y-component of the vector field
units (LatLonUnits) – Units
u/v’s latitude/longitude coordinates are expressed ingeod (Geod | None) – Geodesic used to compute the nominal grid spacing. Defaults to a WGS84 ellipsoid.
crs (CRS | None) – Coordinate reference system used to compute projection correction factors. Defaults to plain latitude/longitude.
- Returns:
Horizontal divergence of
uandv- Return type: