Predict tropical cyclone track displacements using pre-trained Random Forest models
Project description
PepC-Global Track
A Python package for predicting tropical cyclone track displacements using pre-trained Random Forest models.
Installation
pip install --upgrade pepc-global-track
Or from source:
git clone https://github.com/CongGao-CG/pepc-global-track.git
cd pepc-global-track
pip install .
Quick Start
import numpy as np
from pepc_global_track import predict_track
# Create predictor array with shape (N, 5)
# Columns: [u250, v250, u850, v850, lat]
# u250, v250: zonal and meridional wind at 250 hPa (m s^-1)
# u850, v850: zonal and meridional wind at 850 hPa (m s^-1)
# lat: storm latitude (degrees)
X = np.array([
[5.0, 1.0, 3.0, -1.0, 15.0],
[6.0, 1.5, 3.5, -0.5, 16.0],
[7.0, 2.0, 4.0, 0.0, 17.0],
])
# Predict longitude displacement for a specific basin
basin = 'NA' # North Atlantic
delta_lon = predict_track(basin, 'lon', X)
# Predict latitude displacement
delta_lat = predict_track(basin, 'lat', X)
print(f"Predicted longitude displacement: {delta_lon}")
print(f"Predicted latitude displacement: {delta_lat}")
Available Basins
| Basin Code | Name | Latitude Range | Longitude Range |
|---|---|---|---|
AS |
Arabian Sea | 5° to 22.5°N | 50° to 77.5°E |
BoB |
Bay of Bengal | 5° to 22.5°N | 80° to 100°E |
WNP |
Western North Pacific | 5° to 30°N | 102.5°E to 180° |
ENP |
Eastern North Pacific | 5° to 25°N | 177.5° to 75°W |
NA |
North Atlantic | 5° to 30°N | 97.5° to 2.5°W |
SI |
South Indian | 30° to 5°S | 20° to 145°E |
SP |
South Pacific | 30° to 5°S | 147.5°E to 100°W |
API Reference
predict_track(basin, disp_type, X)
Predict tropical cyclone track displacement (longitude or latitude).
Parameters:
basin(str): Basin name (one of: 'AS', 'BoB', 'WNP', 'ENP', 'NA', 'SI', 'SP')disp_type(str): Displacement type — 'lon' for zonal (longitude) displacement or 'lat' for meridional (latitude) displacementX(np.ndarray): 2D array of shape (N, 5) with columns [u250, v250, u850, v850, lat]
Returns:
np.ndarray: 1D array of predicted displacements (degrees)
Raises:
ValueError: If basin is invalid, disp_type is not 'lon' or 'lat', or X does not have shape (N, 5)
get_basin_names()
Get the list of valid basin names.
Returns:
list[str]: List of 7 basin names
BASINS
List of valid basin names.
Input Variables
| Variable | Description | Typical Units |
|---|---|---|
| u250 | Zonal wind at 250 hPa | m s^−1 |
| v250 | Meridional wind at 250 hPa | m s^−1 |
| u850 | Zonal wind at 850 hPa | m s^−1 |
| v850 | Meridional wind at 850 hPa | m s^−1 |
| lat | Storm latitude | degrees |
Model Details
This package contains pre-trained Random Forest models for 7 tropical cyclone basins. The models were pre-trained on ERA5 monthly data using five environmental predictors known to influence tropical cyclone track:
- Zonal wind at 250 hPa (u250): Upper-level zonal flow
- Meridional wind at 250 hPa (v250): Upper-level meridional flow
- Zonal wind at 850 hPa (u850): Lower-level zonal flow
- Meridional wind at 850 hPa (v850): Lower-level meridional flow
- Storm latitude (lat): Current storm position
Each basin has its own pre-trained models for both longitude and latitude displacement predictions.
License
MIT License
Citation
If you use this package in your research, please cite:
Gao, Cong, Ning Lin. "PepC-Global: A Basin-Tuned Probabilistic Tropical Cyclone Model with Enhanced Out-of-Sample Skill and Climate-Sensitive Over-Land Decay". Journal of Advances in Modeling Earth Systems (JAMES), under review.
Project details
Release history Release notifications | RSS feed
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 pepc_global_track-0.2.1.tar.gz.
File metadata
- Download URL: pepc_global_track-0.2.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e34b473c89e1ce9fe68e0d9ef47740b7bc5f1c4bff76fb1cc9a18d64f5b5051f
|
|
| MD5 |
435234d230a9924bf269ab74bdd8893a
|
|
| BLAKE2b-256 |
1ea9dc3a6d01551d55cfbb84f3a57e1a192cafc18bcfc40d5ce1c27105aa11d8
|
File details
Details for the file pepc_global_track-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pepc_global_track-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6ddecff8e183dc578b1efee7bc20b099c92589e27730b851be919a429517ae2
|
|
| MD5 |
d191fedf0f1dc534a8a750da1fe3d4d1
|
|
| BLAKE2b-256 |
d38366d96373af13dc0fabf4c0cf9e1764bb93cd309ebcf6ffe51c6effc38b0d
|