MetPy icon indicating copy to clipboard operation
MetPy copied to clipboard

ENH: Add shear and curvature vorticity calculations

Open Z-Richard opened this issue 2 years ago • 4 comments

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

  • [x] Tests added
  • [x] Fully documented

Z-Richard avatar Jan 16 '24 19:01 Z-Richard

@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.

kgoebber avatar Jan 17 '24 15:01 kgoebber

@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 avatar Jan 17 '24 19:01 Z-Richard

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

Z-Richard avatar Jan 19 '24 18:01 Z-Richard

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.

DWesl avatar Jun 05 '24 14:06 DWesl