Skip to main content

Tropical Cyclone Detection and Tracking

Project description

Warning, this project is in Alpha, it will be hard to get working and you can’t trust the documentation!

The main aim of this project is to develop an algorithm to detect and track tropical cyclones in the C20 Reanalysis Project. The algorithm will then be run against these data looking for trends in the time range of the data, from 1871 to 2013. Currently the algorithm uses vorticity maxima to locate potential candiates for cyclones, and tracks these maxima using a neareat neighbour approach from time frame to time frame. These tracks are then matched to best tracks from the IBTrACS catalogue, which it is hoped will allow for automated categorisation of these tracks (and the corresponding cyclones) through a machine learning technique: Support Vector Machines (SVMs).

Installing and Running

The project is hosted on PyPI, and can be installed using:

pypi install stormtracks

The code is hosted on github.

To run the analysis, you will first need to download some C20 Reanalysis data and the ibtracs data (

import as dl

# Data will be saved to ~/stormtracks/data/
# N.B. one year is 4.2 GB of data! This will take a while.
# It will download 3 files, two with the wind velocities at ~sea level (u9950/v9950)
# and Pressure at Sea Level (prmsl).

To run some analysis (

import datetime as dt

import pylab as plt

from stormtracks.c20data import C20Data, GlobalEnsembleMember
from stormtracks.ibtracsdata import IbtracsData
from stormtracks.match import match
from stormtracks.tracking import VortmaxNearestNeighbourTracker

import stormtracks.plotting as pl

# Create a wrapper for the C20 Reanalysis data.
c20data = C20Data(2005)
# Plot PSL for 1st of Jan 2005.
pl.plot_on_earth(c20data.lon,, c20data.psl)

# Plot vorticity for 1st of Jan 2005.
pl.plot_on_earth(c20data.lon,, c20data.vort)

# Load IBTrACS data for 2005.
ibtracs = IbtracsData()
best_tracks = ibtracs.load_ibtracks_year(2005)

# Run the analysis for 2005.
gdata = GlobalEnsembleMember(c20data, ensemble_member=0)
tracker = VortmaxNearestNeighbourTracker(gdata)
tracker.track_vort_maxima(dt.datetime(2005, 6, 1), dt.datetime(2005, 7, 1))

# Match the generated tracks agains the best tracks.
matches = match(tracker.vort_tracks_by_date, best_tracks)
good_matches = [ma for ma in matches.values() if ma.av_dist() < 5 and ma.overlap > 6]

for gm in good_matches:
    pl.plot_match(gm, None)

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

stormtracks-0.1.4.tar.gz (269.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page