Skip to content

Commit

Permalink
Merge pull request #1197 from kgoebber/fix_divergence
Browse files Browse the repository at this point in the history
fix divergence unit requirement
  • Loading branch information
zbruick committed Oct 7, 2019
2 parents b3bd00f + 5ff8700 commit 4ae9545
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/metpy/calc/kinematics.py
Expand Up @@ -128,16 +128,16 @@ def vorticity(u, v, dx, dy):
@exporter.export
@preprocess_xarray
@ensure_yx_order
@check_units('[speed]', '[speed]', '[length]', '[length]')
@check_units(dx='[length]', dy='[length]')
def divergence(u, v, dx, dy):
r"""Calculate the horizontal divergence of the horizontal wind.
r"""Calculate the horizontal divergence of a vector.
Parameters
----------
u : (M, N) `pint.Quantity`
x component of the wind
x component of the vector
v : (M, N) `pint.Quantity`
y component of the wind
y component of the vector
dx : `pint.Quantity`
The grid spacing(s) in the x-direction. If an array, there should be one item less than
the size of `u` along the applicable axis.
Expand Down

0 comments on commit 4ae9545

Please sign in to comment.