oceanspy.compute.gradient

oceanspy.compute.gradient(od, varNameList=None, axesList=None, aliased=True)[source]

Compute gradient along specified axes, returning all terms (not summed).

\[\nabla \chi = \frac{\partial \chi}{\partial x}\mathbf{\hat{x}} + \frac{\partial \chi}{\partial y}\mathbf{\hat{y}} + \frac{\partial \chi}{\partial z}\mathbf{\hat{z}}\]
Parameters
od: OceanDataset

oceandataset used to compute.

varNameList: 1D array_like, str, None

List of variables to differenciate. If None, use all variables.

axesList: None, list

List of axes. If None, compute gradient along all axes.

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