oocgcm.core.grids.generic_2d_grid.horizontal_gradient_tensor

generic_2d_grid.horizontal_gradient_tensor(vectorfield)

Return the horizontal gradient tensor of a two-dimensional vector field at u,v locations.

Parameters:

vectorfield : VectorField2d

namedtuple of a vector field defined at u,v points

Returns:

gradtensor : Tensor2d

namedtuple holding the component of the horizontal gradient of the vector field at at t and f points.

Notes

The gradient of a vector field \(\mathbf{u} = (u,v)\) is defined as follows :

\[\begin{split}\nabla \mathbf{u} = \begin{pmatrix} \partial_x u & \partial_y u \\ \partial_y v & \partial_y v \end{pmatrix}\end{split}\]
where:
  • \(\partial_x u\) is defined at t grid location.
  • \(\partial_y u\) is defined at f grid location.
  • \(\partial_x v\) is defined at f grid location.
  • \(\partial_y v\) is defined at t grid location.