Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Jacobian determinant #3422

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

sgdecker
Copy link
Contributor

@sgdecker sgdecker commented Mar 5, 2024

Description Of Changes

Implements an equivalent to GEMPAK's JCBN function. The approach is modeled on the deformation calculations.

This is a draft for now because:

  1. I still need to do testing
  2. I am unsure about the check_units decorator. I imagine the common scenario is to do J(u,v), but really the two scalar quantities can be anything, so perhaps I should use:

@check_units(dx='[length]', dy='[length]')

instead? And does this have any implications for the "Units?" column in the GEMPAK Comparison Guide?

Checklist

@sgdecker sgdecker force-pushed the fix2356 branch 2 times, most recently from 8928e9f to 77bcb91 Compare March 5, 2024 18:33
Closes Unidata#2356 as it implements an equivalent to GEMPAK's JCBN
function.  The approach is modeled on the deformation calculations.
@dopplershift
Copy link
Member

Strictly speaking, vector_derivative assumes (for purposes of math with x/y-based vectors on a Cartesian plane) that u and v are vector components. So I don't think this implementation will work for just any pair of scalars? Any idea what GEMPAK implementation needs?

@dopplershift
Copy link
Member

Looks like GEMPAK assumes scalars, so we can do that too. Probably should be using geospatial_gradient() like advection() does--which matches the check_units() you wrote above too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Jacobian determinant
2 participants