Metadata-Version: 2.2
Name: pyvortex
Version: 0.3.0
Summary: Polar vortex edge detection using Nash criteria
Home-page: https://github.com/pankajkarman/pyvortex
Author: Pankaj Kumar
Author-email: pankaj.kmr1990@gmail.com
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: xarray
Provides-Extra: docs
Requires-Dist: pdoc; extra == "docs"
Provides-Extra: examples
Requires-Dist: cartopy; extra == "examples"
Requires-Dist: gif; extra == "examples"
Requires-Dist: matplotlib; extra == "examples"
Requires-Dist: pandas; extra == "examples"
Requires-Dist: scipy; extra == "examples"
Requires-Dist: tqdm; extra == "examples"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

_________________

[![PyPI version](https://badge.fury.io/py/pyvortex.svg)](http://badge.fury.io/py/pyvortex)
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://pypi.python.org/pypi/pyvortex/)
[![Downloads](https://pepy.tech/badge/pyvortex)](https://pepy.tech/project/pyvortex)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
_________________

### About

The module `pyvortex` consists of functions to calculate the [equivalent latitude](https://journals.ametsoc.org/doi/citedby/10.1175/1520-0469%282003%29060%3C0287%3ATELADT%3E2.0.CO%3B2) and edge of a polar vortex using [Nash criteria](https://agupubs.onlinelibrary.wiley.com/doi/10.1029/96JD00066).

### Installation

```
pip install pyvortex
```

install the latest version using 
```
pip install git+https://github.com/pankajkarman/pyvortex.git

```

## Documentation

Latest documentation is available [here](https://pankajkarman.github.io/pyvortex/).


### Usage

`pyvortex` is easy to use. Just import:

```python
import pyvortex as vr
```

#### Northern Hemisphere

Instantiate the `PolarVortex` class using: 
```python
pol = PolarVortex(pv, uwind, hemisphere='north')
```
Get equivalent latitude for the provided vorticity data as:
```python
eql = pol.get_eql()
```
If you want to get both equivalent latitude and Vortex edge, just use:
```python
eql = pol.get_edge(min_eql=30)
```
Example:
![Arctic Vortex](./example/arctic_polar_vortex_20110201.gif)

#### Southern Hemisphere

Instantiate the `PolarVortex` class using:

```python
pol = PolarVortex(pv, uwind, hemisphere='south')
eql = pol.get_edge(min_eql=30)
```

By default, equivalent latitude and vortex edge are returned as positive latitude magnitudes. If you want signed Southern Hemisphere output, use:

```python
pol = PolarVortex(pv, uwind, hemisphere='south', signed_output=True)
eql = pol.get_edge(min_eql=30)
```

This returns Southern Hemisphere equivalent latitudes and edges as negative values.

Example:

![Polar Vortex](./example/antarctic.gif)
