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

Adding equation and code for Ertel Potential Vorticity #231

Open
winash12 opened this issue Oct 14, 2016 · 8 comments
Open

Adding equation and code for Ertel Potential Vorticity #231

winash12 opened this issue Oct 14, 2016 · 8 comments
Labels
Area: Calc Pertains to calculations Type: Feature New functionality

Comments

@winash12
Copy link

EPV is a well known equation in meteorology. Any interest in adding it ?

@dopplershift
Copy link
Member

I would absolutely accept a pull request implementing such a function somewhere in the metpy.calc package. I can also add it myself, but make no promises as to when that would climb to the top of my todo list.

Either way, we'd need a solid reference (not some random web page) to include in the documentation and on which to base the implementation.

@dopplershift dopplershift added Type: Feature New functionality Area: Calc Pertains to calculations good first issue Straightforward issues suitable for new and inexperienced contributors to the project labels Oct 14, 2016
@dopplershift
Copy link
Member

Actually, the only thing missing from MetPy is density. NumPy has gradient and diff, and we have a wrapper for gradient to handle units.

@jrleeman
Copy link
Contributor

jrleeman commented Mar 6, 2017

Density was added in #337

@ahaberlie
Copy link
Contributor

ahaberlie commented Mar 7, 2017

Working on project implementing eq. 2.2 from this paper:
http://journals.ametsoc.org/doi/pdf/10.1175/1520-0493(1991)119%3C1929:PVDOC%3E2.0.CO;2

spherical_epv

which is EPV using spherical coordinates. By the way, its not pi in that equation, it is something called the Exner function. Thought it might be a good addition to MetPy and it is related to this issue.

Would the ideal function interface (in relation to other EPV types) be something like:

epv(..., kind='spherical')

or

spherical_epv(...)

Trying to figure out if can be generalized.

@jrleeman
Copy link
Contributor

jrleeman commented Mar 7, 2017

I would argue for spherical_epv(...) to keep the functions as simple and encapsulated as possible.

@dopplershift
Copy link
Member

@ahaberlie happy to have the functionality

In my ideal world, this would be encapsulated by projection and coordinate information attached to the relevant variables. But:

  1. We're not yet able to utilize xarray
  2. I'm not even sure that would work for something as complex as this

While I agree with @jrleeman in principle, what about vertical vorticity? Advection? Geostrophic wind? Just a nasty rabbit hole.

Go with spherical_epv for now, and we can revisit if/when a better solution presents itself.

@dopplershift dopplershift modified the milestone: Fall 2017 Mar 10, 2017
@jrleeman jrleeman modified the milestones: Fall 2017, Winter 2017 Oct 26, 2017
@jrleeman jrleeman removed this from the 0.7 milestone Nov 15, 2017
@dopplershift
Copy link
Member

  1. For now, just use metpy's existing vorticity implementation. We can go back and add support for map factors there (however we end up doing that) and everything will benefit.

  2. I don't think they should need to be

  3. If you pass the proper sign for the increment in the longitudinal direction, then the calculation should work correctly. (i.e. if the data are N-S oriented, the increments should be negative, and vice-versa for S-N oriented data)

@dopplershift
Copy link
Member

Looks smooth. My question is: have you actually tried interpolating using T vs. ln P? Is the difference discernible?

@jrleeman jrleeman removed the good first issue Straightforward issues suitable for new and inexperienced contributors to the project label Apr 24, 2018
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

No branches or pull requests

4 participants