Skip to content

Ensuring Unit Correctness with Metpy.calc.divergence() #2350

Answered by DanielAdriaansen
Tstolarz asked this question in Q&A
Discussion options

You must be logged in to vote

Here's the documentation of first_derivative():
https://unidata.github.io/MetPy/latest/api/generated/metpy.calc.first_derivative.html#metpy.calc.first_derivative

And here's the actual source code that goes with it:

MetPy/src/metpy/calc/tools.py

Lines 952 to 1041 in df6f7c5

def first_derivative(f, axis=None, x=None, delta=None):
"""Calculate the first derivative of a grid of values.
Works for both regularly-spaced data and grids with varying spacing.
Either `x` or `delta` must be specified, or `f` must be given as an `xarray.DataArray` with
attached coordinate and projection information. If `f` is an `xarray.DataArray`, and `x` or
`delta…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dcamron
Comment options

Answer selected by dcamron
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants