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
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.
Retrieves satellite-derived ARCHER track data for this storm, if available.
Retrieve the latest available forecast discussion.
Retrieve a dictionary containing the latest official forecast.
RealtimeStorm.get_nhc_discussion
(forecast[, ...])Retrieves a single NHC forecast discussion.
Retreive a dictionary of official NHC forecasts for a valid time.
Retrieves operational model and NHC forecasts throughout the entire life duration of the storm.
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.
Creates a custom Storm object consisting of SHIPS initialized analyses.
Retrieves a Ships object containing the latest SHIPS data.
RealtimeStorm.interp
([hours, dt_window, ...])Interpolate a storm temporally to a specified time resolution.
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.
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.
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.
Searches for the given word or phrase through all NHC forecast discussions for this storm.
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.
Returns the dict entry for the storm.
Converts the storm dict into an xarray Dataset object.