uxarray.core.gradient._calculate_grad_on_edge_from_faces

uxarray.core.gradient._calculate_grad_on_edge_from_faces#

uxarray.core.gradient._calculate_grad_on_edge_from_faces(d_var, edge_faces, n_edge, edge_face_distances, normalize=False)#

Helper function for computing the horizontal gradient of a field on each cell using values at adjacent cells.

The expression for calculating the gradient on each edge comes from Eq. 22 in Ringler et al. (2010), J. Comput. Phys.

Code is adapted from theweathermanda/MPAS_utilities