Calculate the tropical cyclone ventilated Potential Intensity (vPI) and the Genesis Potential Index using vPI (GPIv) from gridded datafiles. Supports both monthly mean and hourly ERA5 data. See Chavas Camargo Tippett (2025, J. Clim.) for details.
Project description
tcpyVPI
A Python package to calculate the tropical cyclone ventilated Potential Intensity (vPI) and the Genesis Potential Index using vPI (GPIv) from gridded datafiles.
See Chavas, Camargo, & Tippett (2025, J. Clim.) for details.
Author: Dan Chavas (2025)
Collaborators: Aaron Kruskie, Jose Ocegueda Sanchez (2025)
Installation
pip install tcpyVPI
Or install from source:
git clone https://github.com/drchavas/tcpyVPI.git
cd tcpyVPI
pip install -e .
Features
- Monthly Mean Data: Compute GPIv from ERA5 monthly mean reanalysis (d633001)
- Hourly Data: Compute GPIv from ERA5 hourly reanalysis (d633000) via THREDDS remote access
- Climatology: Compute and store monthly climatologies of GPIv and its components
- Anomalies: Calculate anomalies relative to climatological means
- Standardized Anomalies: Compute z-scores for statistical analysis
Quick Start
Monthly Mean Computation
from tcpyVPI import run_vpigpiv
# Compute GPIv for September 2022
results = run_vpigpiv(2022, 9)
Hourly Computation
from tcpyVPI import run_vpigpiv_hourly
# Compute GPIv for August 15, 2020 at 12Z
results = run_vpigpiv_hourly(2020, 8, 15, hour=12)
With Anomalies
from tcpyVPI import run_vpigpiv_hourly
# First, compute or load a climatology
results = run_vpigpiv_hourly(
2020, 8, 15, hour=12,
compute_anomalies=True,
climatology_path='gpiv_climatology.nc'
)
Data Loading
The package provides flexible data loading from NCAR RDA THREDDS servers:
from tcpyVPI import load_era5_data, load_era5_hourly
# Load monthly mean data
ds_monthly = load_era5_data(2022, 9, data_source='monthly')
# Load hourly data for a specific time
ds_hourly = load_era5_data(2020, 8, day=15, hour=12, data_source='hourly')
# Load all hours of a day
ds_day = load_era5_hourly(2020, 8, 15)
ERA5 Dataset Structure
The package accesses ERA5 data via THREDDS with the following structure:
Monthly Mean (d633001):
- All 12 months in a single file per variable per year
- Both surface and pressure level variables
Hourly (d633000):
- Surface variables: Monthly files containing all hours
- Example:
e5.oper.an.sfc.128_165_10u.ll025sc.2020080100_2020083123.nc
- Example:
- Pressure level variables: Daily files containing 24 hours
- Example:
e5.oper.an.pl.128_131_u.ll025uv.2020081500_2020081523.nc
- Example:
Climatology Computation
from tcpyVPI import compute_monthly_climatology, compute_gpiv_from_dataset
# Compute 40-year climatology (1980-2020)
climatology = compute_monthly_climatology(
compute_gpiv_from_dataset,
years=range(1980, 2020),
output_path='gpiv_climatology.nc'
)
Computing Components Individually
from tcpyVPI import (
load_era5_data,
calculate_potential_intensity,
calculate_vws,
calculate_entropy_deficit,
calculate_etac,
)
# Load data
ds = load_era5_data(2022, 9, data_source='monthly')
# Calculate individual components
PI, asdeq = calculate_potential_intensity(ds)
VWS = calculate_vws(ds)
Chi = calculate_entropy_deficit(ds, asdeq)
eta_c = calculate_etac(ds)
Output Variables
The main computation returns a dataset with:
| Variable | Description | Units |
|---|---|---|
GPIv |
Ventilated Genesis Potential Index | - |
vPI |
Ventilated Potential Intensity | m/s |
PI |
Potential Intensity | m/s |
VWS |
Vertical Wind Shear (200-850 hPa) | m/s |
Chi |
Entropy Deficit | - |
eta_c |
Capped Absolute Vorticity (850 hPa) | s⁻¹ |
ventilation_index |
Ventilation Index | - |
When computing anomalies, additional fields are added:
*_anom: Anomaly fields*_clim: Climatological values
Dependencies
- numpy
- xarray
- tcpyPI
- matplotlib (for plotting)
- cartopy (for plotting)
License
MIT License - see LICENSE file for details.
Citation
If you use this package, please cite:
Chavas, D. R., Camargo, S. J., & Tippett, M. K. (2025). "Tropical cyclone genesis potential using a ventilated potential intensity". Journal of Climate.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tcpyvpi-1.0.0.tar.gz.
File metadata
- Download URL: tcpyvpi-1.0.0.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
965cc38d78757f49da8c2410013b59cf9fef2ae353969a63a5db90fcea361b28
|
|
| MD5 |
4fc646ccdd2d1b8872f6e529fc3de75c
|
|
| BLAKE2b-256 |
037d68d17f513edcff9ed4c99383bc5739d7b6e4991db25c7bec95a0ece05859
|
Provenance
The following attestation bundles were made for tcpyvpi-1.0.0.tar.gz:
Publisher:
publish.yml on drchavas/tcpyVPI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tcpyvpi-1.0.0.tar.gz -
Subject digest:
965cc38d78757f49da8c2410013b59cf9fef2ae353969a63a5db90fcea361b28 - Sigstore transparency entry: 1191936560
- Sigstore integration time:
-
Permalink:
drchavas/tcpyVPI@24f8731762c2c7d098e380c955194ed7e1f5bc17 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/drchavas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24f8731762c2c7d098e380c955194ed7e1f5bc17 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tcpyvpi-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tcpyvpi-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c49b88efa8cde4aec9a6efb7cdde05ec96b1ffe26d58b9c6152591b2814365e
|
|
| MD5 |
e21836c1f3d6fa2b13dcec4a582c1ad4
|
|
| BLAKE2b-256 |
aeb94905881f1a6d596fd44f78db4bb79f968a336e9727736187e01a4c8f02cc
|
Provenance
The following attestation bundles were made for tcpyvpi-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on drchavas/tcpyVPI
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tcpyvpi-1.0.0-py3-none-any.whl -
Subject digest:
9c49b88efa8cde4aec9a6efb7cdde05ec96b1ffe26d58b9c6152591b2814365e - Sigstore transparency entry: 1191936561
- Sigstore integration time:
-
Permalink:
drchavas/tcpyVPI@24f8731762c2c7d098e380c955194ed7e1f5bc17 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/drchavas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@24f8731762c2c7d098e380c955194ed7e1f5bc17 -
Trigger Event:
release
-
Statement type: