Individual Season Analysis

This sample script illustrates how to retrieve, visualize and analyze seasons from the HURDAT2 dataset.

import tropycal.tracks as tracks

HURTDAT2 Dataset

Let’s start by creating an instance of a TrackDataset object. By default, this reads in the HURDAT2 dataset from the National Hurricane Center (NHC) website. For this example we’ll be using the HURDAT2 dataset over the North Atlantic basin.

HURDAT data is not available for the most recent hurricane seasons. To include the latest data up through today, the “include_btk” flag would need to be set to True, which reads in preliminary best track data from the NHC website.

basin = tracks.TrackDataset(basin='north_atlantic',source='hurdat',include_btk=False)
--> Starting to read in HURDAT2 data
--> Completed reading in HURDAT2 data (4.12 seconds)

Individual season analysis

Individual seasons can be retrieved from the dataset by calling the get_season() function, which returns an instance of a Season object.

Let’s retrieve an instance of the 2017 Atlantic Hurricane Season:

We can quickly visualize what the Season object contains by printing it:

print(season)
<tropycal.tracks.Season>
Season Summary:
    Total Storms:      18
    Named Storms:      17
    Hurricanes:        10
    Major Hurricanes:  6
    Season ACE:        224.8

More Information:
    year:          2017
    basin:         north_atlantic
    source_basin:  north_atlantic
    source:        hurdat
    source_info:   NHC Hurricane Database

The Season object can be converted to a Pandas DataFrame, which lists a summary of storms during the season:

id name vmax mslp category ace start_time end_time start_lat start_lon
0 AL012017 ARLENE 45 990 0 0.8 2017-04-19 00:00:00 2017-04-21 06:00:00 31.1 -42.6
1 AL022017 BRET 45 1007 0 0.5 2017-06-19 18:00:00 2017-06-20 09:00:00 9.2 -58.9
2 AL032017 CINDY 50 991 0 1.8 2017-06-20 18:00:00 2017-06-23 12:00:00 25.6 -90.6
3 AL042017 FOUR 25 1009 -1 0.0 2017-07-05 18:00:00 2017-07-07 12:00:00 12.0 -37.1
4 AL052017 DON 45 1005 0 0.8 2017-07-17 06:00:00 2017-07-18 12:00:00 10.4 -49.1
5 AL062017 EMILY 50 1001 0 0.6 2017-07-30 18:00:00 2017-08-01 18:00:00 28.4 -85.4
6 AL072017 FRANKLIN 75 981 1 3.7 2017-08-07 00:00:00 2017-08-10 12:00:00 16.1 -82.7
7 AL082017 GERT 95 962 2 7.8 2017-08-12 18:00:00 2017-08-17 12:00:00 24.0 -69.4
8 AL092017 HARVEY 115 937 4 11.4 2017-08-17 06:00:00 2017-09-01 00:00:00 13.4 -52.0
9 AL112017 IRMA 155 914 5 64.9 2017-08-30 00:00:00 2017-09-12 00:00:00 16.1 -26.9
10 AL122017 JOSE 135 938 4 43.3 2017-09-05 06:00:00 2017-09-22 12:00:00 11.6 -37.9
11 AL132017 KATIA 90 972 2 6.1 2017-09-05 12:00:00 2017-09-09 12:00:00 22.2 -97.2
12 AL142017 LEE 100 962 3 17.9 2017-09-14 18:00:00 2017-09-30 00:00:00 10.4 -23.1
13 AL152017 MARIA 150 908 5 44.8 2017-09-16 12:00:00 2017-09-30 12:00:00 12.2 -49.7
14 AL162017 NATE 80 981 1 4.1 2017-10-04 12:00:00 2017-10-08 18:00:00 12.0 -81.8
15 AL172017 OPHELIA 100 959 3 14.5 2017-10-09 06:00:00 2017-10-15 18:00:00 30.9 -40.0
16 AL182017 PHILIPPE 35 1000 0 0.1 2017-10-28 12:00:00 2017-10-29 00:00:00 20.1 -83.5
17 AL192017 RINA 50 991 0 1.7 2017-11-05 18:00:00 2017-11-09 00:00:00 29.2 -51.7


A more detailed summary of the season can be retrieved using the summary() method:

{'id': ['AL012017', 'AL022017', 'AL032017', 'AL042017', 'AL052017', 'AL062017', 'AL072017', 'AL082017', 'AL092017', 'AL112017', 'AL122017', 'AL132017', 'AL142017', 'AL152017', 'AL162017', 'AL172017', 'AL182017', 'AL192017'], 'operational_id': ['AL012017', 'AL022017', 'AL032017', 'AL042017', 'AL052017', 'AL062017', 'AL072017', 'AL082017', 'AL092017', 'AL112017', 'AL122017', 'AL132017', 'AL142017', 'AL152017', 'AL162017', 'AL172017', 'AL182017', 'AL192017'], 'name': ['ARLENE', 'BRET', 'CINDY', 'FOUR', 'DON', 'EMILY', 'FRANKLIN', 'GERT', 'HARVEY', 'IRMA', 'JOSE', 'KATIA', 'LEE', 'MARIA', 'NATE', 'OPHELIA', 'PHILIPPE', 'RINA'], 'max_wspd': [45, 45, 50, 25, 45, 50, 75, 95, 115, 155, 135, 90, 100, 150, 80, 100, 35, 50], 'min_mslp': [990, 1007, 991, 1009, 1005, 1001, 981, 962, 937, 914, 938, 972, 962, 908, 981, 959, 1000, 991], 'category': [0, 0, 0, -1, 0, 0, 1, 2, 4, 5, 4, 2, 3, 5, 1, 3, 0, 0], 'ace': [0.8, 0.5, 1.8, 0.0, 0.8, 0.6, 3.7, 7.8, 11.4, 64.9, 43.3, 6.1, 17.9, 44.8, 4.1, 14.5, 0.1, 1.7], 'season_start': datetime.datetime(2017, 4, 19, 0, 0), 'season_end': datetime.datetime(2017, 11, 9, 0, 0), 'season_storms': 18, 'season_named': 17, 'season_hurricane': 10, 'season_major': 6, 'season_ace': 224.8, 'season_subtrop_pure': 0, 'season_subtrop_partial': 0}

Plot Season

Plotting a Season object can be quickly done using the plot() method.

Note that you can pass various arguments to the plot function, such as customizing the map and track aspects. The “Customizing Storm Plots” example script has more examples on how to customize such plots. Read through the documentation for more customization options.

2017 Atlantic Hurricane Season, 17 named • 10 hurricanes • 6 major 224.8 Cumulative ACE
<GeoAxes: title={'left': '2017 Atlantic Hurricane Season', 'right': '17 named • 10 hurricanes • 6 major\n224.8 Cumulative ACE'}>

Multiple Season Analysis

Seasons can also be combined for multi-season analyses by simply adding multiple season objects together.

<tropycal.tracks.Season>
Season Summary:
    Total Storms:      [18, 16, 21]
    Named Storms:      [17, 15, 21]
    Hurricanes:        [10, 8, 7]
    Major Hurricanes:  [6, 2, 4]
    Season ACE:        [224.8, 132.5, 145.3]

More Information:
    year:          [2017, 2018, 2021]
    basin:         north_atlantic
    source_basin:  north_atlantic
    source:        hurdat
    source_info:   NHC Hurricane Database

The combined seasons can then be plotted on the same map:

[2017, 2018, 2021] Atlantic Hurricane Season, 53 named • 25 hurricanes • 12 major 502.6 Cumulative ACE
<GeoAxes: title={'left': '[2017, 2018, 2021] Atlantic Hurricane Season', 'right': '53 named • 25 hurricanes • 12 major\n502.6 Cumulative ACE'}>

The summary method also generates summaries for all seasons in this object:

{'id': [['AL012017', 'AL022017', 'AL032017', 'AL042017', 'AL052017', 'AL062017', 'AL072017', 'AL082017', 'AL092017', 'AL112017', 'AL122017', 'AL132017', 'AL142017', 'AL152017', 'AL162017', 'AL172017', 'AL182017', 'AL192017'], ['AL012018', 'AL022018', 'AL032018', 'AL042018', 'AL052018', 'AL062018', 'AL072018', 'AL082018', 'AL092018', 'AL102018', 'AL112018', 'AL122018', 'AL132018', 'AL142018', 'AL152018', 'AL162018'], ['AL012021', 'AL022021', 'AL032021', 'AL042021', 'AL052021', 'AL062021', 'AL072021', 'AL082021', 'AL092021', 'AL102021', 'AL112021', 'AL122021', 'AL132021', 'AL142021', 'AL152021', 'AL162021', 'AL172021', 'AL182021', 'AL192021', 'AL202021', 'AL212021']], 'operational_id': [['AL012017', 'AL022017', 'AL032017', 'AL042017', 'AL052017', 'AL062017', 'AL072017', 'AL082017', 'AL092017', 'AL112017', 'AL122017', 'AL132017', 'AL142017', 'AL152017', 'AL162017', 'AL172017', 'AL182017', 'AL192017'], ['AL012018', 'AL022018', 'AL032018', 'AL042018', 'AL052018', 'AL062018', 'AL072018', 'AL082018', 'AL092018', 'AL102018', 'AL112018', 'AL122018', 'AL132018', 'AL142018', 'AL152018', 'AL162018'], ['AL012021', 'AL022021', 'AL032021', 'AL042021', 'AL052021', 'AL062021', 'AL072021', 'AL082021', 'AL092021', 'AL102021', 'AL112021', 'AL122021', 'AL132021', 'AL142021', 'AL152021', 'AL162021', 'AL172021', 'AL182021', 'AL192021', 'AL202021', 'AL212021']], 'name': [['ARLENE', 'BRET', 'CINDY', 'FOUR', 'DON', 'EMILY', 'FRANKLIN', 'GERT', 'HARVEY', 'IRMA', 'JOSE', 'KATIA', 'LEE', 'MARIA', 'NATE', 'OPHELIA', 'PHILIPPE', 'RINA'], ['ALBERTO', 'BERYL', 'CHRIS', 'DEBBY', 'ERNESTO', 'FLORENCE', 'GORDON', 'HELENE', 'ISAAC', 'JOYCE', 'ELEVEN', 'KIRK', 'LESLIE', 'MICHAEL', 'NADINE', 'OSCAR'], ['ANA', 'BILL', 'CLAUDETTE', 'DANNY', 'ELSA', 'FRED', 'GRACE', 'HENRI', 'IDA', 'KATE', 'JULIAN', 'LARRY', 'MINDY', 'NICHOLAS', 'ODETTE', 'PETER', 'ROSE', 'SAM', 'TERESA', 'VICTOR', 'WANDA']], 'max_wspd': [[45, 45, 50, 25, 45, 50, 75, 95, 115, 155, 135, 90, 100, 150, 80, 100, 35, 50], [55, 70, 90, 45, 40, 130, 60, 95, 65, 45, 30, 55, 80, 140, 55, 95], [40, 55, 40, 40, 75, 55, 105, 65, 130, 40, 50, 110, 50, 65, 40, 45, 50, 135, 40, 55, 50]], 'min_mslp': [[990, 1007, 991, 1009, 1005, 1001, 981, 962, 937, 914, 938, 972, 962, 908, 981, 959, 1000, 991], [990, 991, 969, 998, 1003, 937, 996, 967, 995, 995, 1007, 998, 968, 919, 995, 966], [1004, 992, 1003, 1009, 991, 991, 967, 986, 929, 1004, 993, 953, 1000, 988, 1005, 1005, 1004, 927, 1008, 997, 983]], 'category': [[0, 0, 0, -1, 0, 0, 1, 2, 4, 5, 4, 2, 3, 5, 1, 3, 0, 0], [0, 1, 2, 0, 0, 4, 0, 2, 1, 0, -1, 0, 1, 5, 0, 2], [0, 0, 0, 0, 1, 0, 3, 1, 4, 0, 0, 3, 0, 1, 0, 0, 0, 4, 0, 0, 0]], 'ace': [[0.8, 0.5, 1.8, 0.0, 0.8, 0.6, 3.7, 7.8, 11.4, 64.9, 43.3, 6.1, 17.9, 44.8, 4.1, 14.5, 0.1, 1.7], [1.8, 4.8, 7.4, 1.5, 1.4, 39.7, 2.3, 15.7, 6.8, 2.4, 0.0, 3.2, 21.3, 12.5, 2.7, 9.0], [0.8, 1.0, 1.1, 0.4, 9.9, 2.4, 8.6, 7.8, 10.6, 0.6, 1.1, 31.9, 0.4, 2.4, 0.4, 1.8, 1.4, 54.0, 0.6, 2.4, 5.7]], 'seasons': [2017, 2018, 2021], 'season_start': [datetime.datetime(2017, 4, 19, 0, 0), datetime.datetime(2018, 5, 25, 12, 0), datetime.datetime(2021, 5, 22, 6, 0)], 'season_end': [datetime.datetime(2017, 11, 9, 0, 0), datetime.datetime(2018, 10, 31, 12, 0), datetime.datetime(2021, 11, 7, 6, 0)], 'season_storms': [18, 16, 21], 'season_named': [17, 15, 21], 'season_hurricane': [10, 8, 7], 'season_major': [6, 2, 4], 'season_ace': [224.8, 132.5, 145.3], 'season_subtrop_pure': [0, 0, 1], 'season_subtrop_partial': [0, 7, 3]}

Total running time of the script: ( 0 minutes 9.017 seconds)

Gallery generated by Sphinx-Gallery