Skip to content

Conversation

@Z-Richard
Copy link
Contributor

Description Of Changes

This PR implements the shear and curvature vorticity calculations. A test is added to ensure the sum of two terms equals the total vorticity computed from metpy.calc.vortictiy.

Checklist

  • Tests added
  • Fully documented

@Z-Richard Z-Richard requested a review from a team as a code owner January 16, 2024 19:03
@Z-Richard Z-Richard requested review from dopplershift and removed request for a team January 16, 2024 19:03
@kgoebber
Copy link
Collaborator

@Z-Richard this is great stuff. I've checkout out the PR and used the functions on a couple of analytic datasets that I have generated and it works as intended. I was wondering if you had a reference we could use with the formations of the equations that you have used in the code? We do attempt to reference appropriate sources to help our users identify the underpinning of the choices made in the package.

@Z-Richard
Copy link
Contributor Author

@kgoebber The implementation follows the derivation by Professor Sharan Majumdar in a private communication with a friend of mine. The derivation is basically a conversion from natural coordinates to cartesian coordinates. I can ask for permission to upload the file here, but fortunately the derivation does not seem publicly available. They did indicate in the notes that the derivation is inspired by Bleck (1991): https://journals.ametsoc.org/view/journals/atsc/48/8/1520-0469_1991_048_1124_tefsac_2_0_co_2.xml?tab_body=pdf.

@Z-Richard
Copy link
Contributor Author

Curvature and Shear Vorticity in Cartesian Coordinates.pdf
@kgoebber Here is the reference document that the code is based on.

@dopplershift dopplershift added Type: Feature New functionality Area: Calc Pertains to calculations labels Feb 14, 2024
@dopplershift dopplershift added this to the 1.7.0 milestone Feb 14, 2024
@DWesl
Copy link
Contributor

DWesl commented Jun 5, 2024

Could you add a test that the curvature vorticity of a purely sheared velocity field (say, $u=y$) is zero and similarly for the shear vorticity of a purely rotational velocity field ($u = -y; v = x$, for example)?

Perhaps these checks might work better as an example than a test, but I will leave the final placement for the maintainers.

@dopplershift
Copy link
Member

@Z-Richard apologies for this lingering so long. Any problem if we include that document in our docs so we can cite it for the derivation?

@Z-Richard
Copy link
Contributor Author

@dopplershift I don't think there is an issue as long as proper authorship is acknowledged.

@dopplershift dopplershift force-pushed the shear_curvature_vorticity branch from a62ef54 to 784bec9 Compare February 6, 2025 21:26
@dopplershift dopplershift merged commit c1cf542 into Unidata:main Feb 7, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Calc Pertains to calculations Type: Feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants