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

Built-in support for (relative) potential vorticity #36

Open
sadielbartholomew opened this issue Feb 24, 2020 · 2 comments
Open

Built-in support for (relative) potential vorticity #36

sadielbartholomew opened this issue Feb 24, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@sadielbartholomew
Copy link
Member

A user has requested direct support for potential vorticity, stating that it is rare for scientists to use the already-supported relative vorticity directly & instead they will usually work with vorticity via this potential quantity.

I've had a look at the definitions & (as conveyed well in this resource, see sections 3.5.2 & 3.5.3) it is the normalised dot product of the (absolute - but I assume relative potential vorticity is defined & used with the relative equivalent) vorticity with the gradient of some conserved quantity, in practice potential temperature.

That should not be too difficult to implement(?) as a function akin to cf.relative_voriticty taking, as well as u & v wind fields, two other input fields, temperature & pressure level. Though we might need to be careful to document mathematical assumptions made by any algorithm applied, as per the literature.

After a brief look around across other libraries, I found a pair of NCL functions that calculate the potential vorticity, possibly useful as a reference.

@sadielbartholomew sadielbartholomew added the enhancement New feature or request label Feb 24, 2020
@davidhassell
Copy link
Collaborator

Sounds like a good addition, and I agree that it should be straightforward to implement.

The appropriate NCL function (http://www.ncl.ucar.edu/Document/Functions/Built-in/uv2vr_cfd.shtml) was used as the reference for the existing relative vorticity function (https://ncas-cms.github.io/cf-python/function/cf.relative_vorticity.html), so NCL could be a good starting point again.

@sadielbartholomew
Copy link
Member Author

I'm just thinking this involves (two consecutive) binary operations such that, whilst the logic may be simple, implementing it with a LAMA approach would be more involved, as per #38. So I think this needs to wait on that Issue.

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

No branches or pull requests

2 participants