Metpy divergence computation uses the three-point method outlined in "Derivative formulae and errors for non-uniformly spaced points" Proceedings of the Royal Society A - May 2005 DOI:10.1098/rspa.2004.1430
Free download at https://www.researchgate.net/publication/228577212