generate_nhc_cone¶
- tropycal.utils.generate_nhc_cone(forecast, basin, shift_lons=False, cone_days=5, cone_year=None, grid_res=0.05, return_xarray=False)[source]¶
Generates a gridded cone of uncertainty using forecast data from NHC.
- Parameters
forecast (dict) – Dictionary containing forecast data
basin (str) – Basin for cone of uncertainty radii. Please refer to Map Domain Options for available basin options.
- Other Parameters
shift_lons (bool, optional) – If true, grid will be shifted to +0 to +360 degrees longitude. Default is False (-180 to +180 degrees).
cone_days (int, optional) – Number of forecast days to generate the cone through. Default is 5 days.
cone_year (int, optional) – Year valid for cone radii. If None, this fuction will attempt to retrieve the year from the forecast dict.
grid_res (int or float, optional) – Horizontal resolution of the cone of uncertainty grid in degrees. Default is 0.05 degrees.
return_xarray (bool, optional) – If True, returns output as an xarray Dataset. Default is False, returning output as a dictionary.
- Returns
dict or xarray.Dataset – Depending on return_xarray, returns either a dictionary or an xarray Dataset containing the gridded cone of uncertainty and its accompanying attributes.
Notes
Forecast dicts can be retrieved for realtime storm objects using
RealtimeStorm.get_forecast_realtime()
, and for archived storms usingStorm.get_nhc_forecast_dict()
.