NCAS-CMS / NCAS-CMS/cf-python

Built-in support for (relative) potential vorticity

Open
#36 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
150
Forks
23
Avg merge
1d 11h
Merged PRs (30d)
2

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing cf.relative_voriticity functionality and the definitions in sections 3.5.2 and 3.5.3 of the linked resource. Compare the proposed calculation with the NCL potential-vorticity functions, resolve the relative versus absolute interpretation and required inputs, and document the mathematical assumptions when the feature is complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.