tropycal.tracks.Storm

class tropycal.tracks.Storm(storm, stormTors=None)[source]

Initializes an instance of Storm, retrieved via TrackDataset.get_storm().

Parameters

storm (dict) – Dict entry of the requested storm.

Other Parameters

stormTors (dict, optional) – Dict entry containing tornado data assicated with the storm. Populated directly from tropycal.tracks.TrackDataset.

Returns

Storm – Instance of a Storm object.

Notes

A Storm object is retrieved from TrackDataset’s get_storm() method. For example, if the dataset read in is the default North Atlantic and the desired storm is Hurricane Michael (2018), it would be retrieved as follows:

from tropycal import tracks
basin = tracks.TrackDataset()
storm = basin.get_storm(('michael',2018))

Now Hurricane Michael’s data is stored in the variable storm, which is an instance of Storm and can access all of the methods and attributes of a Storm object.

All the variables associated with a Storm object (e.g., lat, lon, time, vmax) can be accessed in two ways. The first is directly from the Storm object:

>>> storm.lat
array([17.8, 18.1, 18.4, 18.8, 19.1, 19.7, 20.2, 20.9, 21.7, 22.7, 23.7,
       24.6, 25.6, 26.6, 27.7, 29. , 30. , 30.2, 31.5, 32.8, 34.1, 35.6,
       36.5, 37.3, 39.1, 41.1, 43.1, 44.8, 46.4, 47.6, 48.4, 48.8, 48.6,
       47.5, 45.9, 44.4, 42.8, 41.2])

The second is via storm.vars, which returns a dictionary of the variables associated with the Storm object. This is also a quick way to access all of the variables associated with a Storm object:

>>> variable_dict = storm.vars
>>> lat = variable_dict['lat']
>>> lon = variable_dict['lon']
>>> print(variable_dict.keys())
dict_keys(['time', 'extra_obs', 'special', 'type', 'lat', 'lon', 'vmax', 'mslp', 'wmo_basin'])

Storm objects also have numerous attributes with information about the storm. storm.attrs returns a dictionary of the attributes for this Storm object.

>>> print(storm.attrs)
{'id': 'AL142018',
 'operational_id': 'AL142018',
 'name': 'MICHAEL',
 'year': 2018,
 'season': 2018,
 'basin': 'north_atlantic',
 'source_info': 'NHC Hurricane Database',
 'source': 'hurdat',
 'ace': 12.5,
 'realtime': False,
 'invest': False}

Methods Summary

Storm.download_tcr([save_path])

Downloads the NHC offical Tropical Cyclone Report (TCR) for the requested storm to the requested directory.

Storm.get_archer()

Retrieves satellite-derived ARCHER track data for this storm, if available.

Storm.get_nhc_discussion(forecast[, save_path])

Retrieves a single NHC forecast discussion.

Storm.get_nhc_forecast_dict(time)

Retreive a dictionary of official NHC forecasts for a valid time.

Storm.get_operational_forecasts()

Retrieves operational model and NHC forecasts throughout the entire life duration of the storm.

Storm.get_recon([path_vdm, path_hdobs, ...])

Retrieves all aircraft reconnaissance data for this storm.

Storm.get_ships(time)

Retrieves a Ships object containing SHIPS data for a requested time.

Storm.get_ships_analysis()

Creates a custom Storm object consisting of SHIPS initialized analyses.

Storm.interp([hours, dt_window, dt_align, ...])

Interpolate a storm temporally to a specified time resolution.

Storm.list_nhc_discussions()

Retrieves a list of NHC forecast discussions for this storm, archived on https://ftp.nhc.noaa.gov/atcf/archive/.

Storm.plot([domain, plot_all_dots, ax, ...])

Creates a plot of the observed track of the storm.

Storm.plot_TCtors_rotated([dist_thresh, ...])

Plot tracks of tornadoes relative to the storm motion vector of the tropical cyclone.

Storm.plot_ensembles([forecast, fhr, ...])

Creates a plot of individual GEFS ensemble tracks.

Storm.plot_models([forecast, plot_btk, ...])

Creates a plot of operational model forecast tracks.

Storm.plot_models_wind([forecast, plot_btk])

Creates a plot of operational model forecast wind speed.

Storm.plot_nhc_forecast(forecast[, ...])

Creates a plot of the operational NHC forecast track along with observed track data.

Storm.plot_tors([dist_thresh, Tors, domain, ...])

Creates a plot of the storm and associated tornado tracks.

Storm.query_nhc_discussions(query)

Searches for the given word or phrase through all NHC forecast discussions for this storm.

Storm.search_ships()

Searches for available SHIPS files for this storm, if available.

Storm.sel([time, lat, lon, vmax, mslp, ...])

Subset this storm by any of its parameters and return a new storm object.

Storm.to_dataframe([attrs_as_columns])

Converts the storm dict into a pandas DataFrame object.

Storm.to_dict()

Returns the dict entry for the storm.

Storm.to_xarray()

Converts the storm dict into an xarray Dataset object.