oceanspy.compute.divergence

oceanspy.compute.divergence(od, iName=None, jName=None, kName=None, aliased=True)[source]

Compute divergence of a vector field.

\[\nabla \cdot {\bf F} = \frac{\partial F_x}{\partial x} + \frac{\partial F_y}{\partial y} + \frac{\partial F_z}{\partial z}\]
Parameters:
od: OceanDataset

oceandataset used to compute.

iName: str or None

Name of variable corresponding to i-component.

jName: str or None

Name of variable corresponding to j-component.

kName: str or None

Name of variable corresponding to k-component.

aliased: bool

Set it False when working with private ds and grid.

Returns:
ds: xarray.Dataset
d[varName]_d[axis]

References

Numerical Method: https://mitgcm.readthedocs.io/en/latest/algorithm/algorithm.html#notation