utils

Collection of basic tools used by Tropycal.

Generic Utilities

accumulated_cyclone_energy(wind_speed[, hours])

Calculate Accumulated Cyclone Energy (ACE) based on sustained wind speed in knots.

wind_to_category(wind_speed)

Convert sustained wind speed in knots to Saffir-Simpson Hurricane Wind Scale category.

category_to_wind(category)

Convert Saffir-Simpson Hurricane Wind Scale category to minimum threshold sustained wind speed in knots.

calc_ensemble_ellipse(member_lons, member_lats)

Calculate an ellipse representing ensemble member location spread.

classify_subtropical(storm_type)

Check whether a tropical cyclone was purely subtropical.

create_storm_dict(filepath, storm_name, storm_id)

Creates a storm dict from custom user-provided data.

dropsonde_mslp_estimate(mslp, surface_wind)

Apply a NHC rule of thumb for estimating a TC's minimum central MSLP.

generate_nhc_cone(forecast, basin[, ...])

Generates a gridded cone of uncertainty using forecast data from NHC.

get_basin(lat, lon[, source_basin])

Returns the current basin of the tropical cyclone.

get_storm_classification(wind_speed, ...)

Retrieve the tropical cyclone classification given its subtropical status and current basin.

get_storm_type(wind_speed, subtropical_flag)

Retrieve the 2-character tropical cyclone type (e.g., "TD", "TS", "HU") given its subtropical status.

get_two_current()

Retrieve the latest NHC Tropical Weather Outlook (TWO).

get_two_archive(time)

Retrieve an archived NHC Tropical Weather Outlook (TWO).

knots_to_mph(wind_speed)

Convert wind from knots to miles per hour, in increments of 5 as used by NHC.

nhc_cone_radii(year, basin[, forecast_hour])

Retrieve the official NHC Cone of Uncertainty radii by basin, year and forecast hour(s).

ships_parser(content)

Parses SHIPS text data into multiple sorted dictionaries.

Cartopy Utilities

add_tropycal(ax)

Adds Tropycal plotting capability to a matplotlib.pyplot axes instance with a Cartopy projection.

plot_storm(self, storm, *args, **kwargs)

Plot a Storm object on the axes instance.

plot_two(self, two_dict[, days])

Plot a NHC Tropical Weather Outlook (TWO) on the axes instance.

plot_cone(self, cone[, plot_center_line])

Plots a Tropycal derived National Hurricane Center (NHC) cone of uncertainty.

Colors

get_colors_sshws(wind_speed)

Retrieve the default colors for the Saffir-Simpson Hurricane Wind Scale (SSHWS).

get_colors_ef([colormap])

Retrieve a list of colors for the Enhanced Fujita (EF) tornado scale.

get_colors_pph(plot_type, colormap[, levels])

Retrieve a list of colors for Practically Perfect Hindcast (PPH) for tornadoes.