tropycal.realtime.RealtimeStorm

class tropycal.realtime.RealtimeStorm(storm, stormTors=None)[source]

Initializes an instance of RealtimeStorm. This object inherits all the methods and functionality of tropycal.tracks.Storm, but with additional methods unique to this object, all containing the word “realtime” as part of the function name.

Parameters

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

Returns

RealtimeStorm – Instance of a RealtimeStorm object.

Notes

A RealtimeStorm object is retrieved from a Realtime object’s get_storm() method, or directly as an attribute of the Realtime object. For example, if an active storm has an ID of ‘EP012022’, it can be retrieved as such:

from tropycal import realtime
realtime_obj = realtime.Realtime()
storm = realtime_obj.get_storm('EP012022')

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

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

>>> storm.lat
array([ 9.8, 10.3, 10.8, 11.4, 11.9, 12.1, 12.2, 12.4, 12.6, 12.8, 13. ,
       12.9, 12.8, 12.9, 13.2, 13.6, 13.8, 13.9, 14. , 14. , 14.3, 14.6,
       15.1, 15.4])

The second is via storm.vars, which returns a dictionary of the variables associated with the RealtimeStorm object. This is also a quick way to access all of the variables associated with a RealtimeStorm 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'])

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

It should be noted that RealtimeStorm objects have additional attributes that Storm objects do not, specifically for 2 and 5 day NHC formation probability. These only display values for invests within NHC’s area of responsibility; tropical cyclones or invests in JTWC’s area of responsibility display “N/A”.

>>> print(storm.attrs)
{'id': 'EP012022',
 'operational_id': 'EP012022',
 'name': 'AGATHA',
 'year': 2022,
 'season': 2022,
 'basin': 'east_pacific',
 'source_info': 'NHC Hurricane Database',
 'invest': False,
 'source_method': "NHC's Automated Tropical Cyclone Forecasting System (ATCF)",
 'source_url': 'https://ftp.nhc.noaa.gov/atcf/btk/',
 'source': 'hurdat',
 'ace': 6.055,
 'prob_2day': 'N/A',
 'prob_5day': 'N/A',
 'risk_2day': 'N/A',
 'risk_5day': 'N/A',
 'realtime': True}

Methods Summary

RealtimeStorm.download_graphic_realtime([...])

Download the latest official forecast track graphic.

RealtimeStorm.download_tcr([save_path])

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

RealtimeStorm.get_archer()

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

RealtimeStorm.get_discussion_realtime()

Retrieve the latest available forecast discussion.

RealtimeStorm.get_forecast_realtime([...])

Retrieve a dictionary containing the latest official forecast.

RealtimeStorm.get_nhc_discussion(forecast[, ...])

Retrieves a single NHC forecast discussion.

RealtimeStorm.get_nhc_forecast_dict(time)

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

RealtimeStorm.get_operational_forecasts()

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

RealtimeStorm.get_realtime_formation_prob()

Retrieve the latest NHC formation probability.

RealtimeStorm.get_realtime_info([source])

Returns a dict containing the latest available information about the storm.

RealtimeStorm.get_recon([path_vdm, ...])

Retrieves all aircraft reconnaissance data for this storm.

RealtimeStorm.get_ships(time)

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

RealtimeStorm.get_ships_analysis()

Creates a custom Storm object consisting of SHIPS initialized analyses.

RealtimeStorm.get_ships_realtime()

Retrieves a Ships object containing the latest SHIPS data.

RealtimeStorm.interp([hours, dt_window, ...])

Interpolate a storm temporally to a specified time resolution.

RealtimeStorm.list_nhc_discussions()

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

RealtimeStorm.plot([domain, plot_all_dots, ...])

Creates a plot of the observed track of the storm.

RealtimeStorm.plot_TCtors_rotated([...])

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

RealtimeStorm.plot_ensembles([forecast, ...])

Creates a plot of individual GEFS ensemble tracks.

RealtimeStorm.plot_forecast_realtime([...])

Plots the latest available official forecast.

RealtimeStorm.plot_models([forecast, ...])

Creates a plot of operational model forecast tracks.

RealtimeStorm.plot_models_wind([forecast, ...])

Creates a plot of operational model forecast wind speed.

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

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

RealtimeStorm.plot_tors([dist_thresh, Tors, ...])

Creates a plot of the storm and associated tornado tracks.

RealtimeStorm.query_nhc_discussions(query)

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

RealtimeStorm.search_ships()

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

RealtimeStorm.sel([time, lat, lon, vmax, ...])

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

RealtimeStorm.to_dataframe([attrs_as_columns])

Converts the storm dict into a pandas DataFrame object.

RealtimeStorm.to_dict()

Returns the dict entry for the storm.

RealtimeStorm.to_xarray()

Converts the storm dict into an xarray Dataset object.