tropycal.ships.Ships

class tropycal.ships.Ships(content, storm_name=None, forecast_init=None)[source]

Initializes an instance of Ships.

Parameters

content (str) – SHIPS file content. If initialized via a tropycal.tracks.Storm object, this does not need to be provided.

Other Parameters

storm_name (str, optional) – If provided, overrides storm name from SHIPS text data with the provided storm name.

Returns

tropycal.ships.Ships – Instance of a Ships object.

Notes

A Ships object is best retrieved from a Storm object’s get_ships() method. For example, if the dataset read in is the default North Atlantic and the desired storm is Hurricane Michael (2018), SHIPS data would be retrieved as follows:

from tropycal import tracks
import datetime as dt

# Retrieve storm object for Hurricane Michael
basin = tracks.TrackDataset()
storm = basin.get_storm(('michael',2018))

# Retrieve instance of a Ships object
ships = storm.get_ships(dt.datetime(2018, 10, 8, 0))

Methods Summary

Ships.get_ri_prob()

Return rapid intensification probabilities.

Ships.get_snapshot(hour)

Return all variables valid at a single forecast hour.

Ships.get_variables()

Return list of available forecast variables.

Ships.plot_summary()

Generates a plot summarizing the SHIPS forecast.

Ships.to_dataframe([attrs_as_columns])

Convert data to a pandas DataFrame object.

Ships.to_xarray()

Convert data to an xarray Dataset.