huracanpy.tc.pressure_wind_relation#

huracanpy.tc.pressure_wind_relation(pressure, wind, model=None, pressure_units='hPa', wind_units='m s-1', **kwargs)[source]#

Fit a model pressure wind relation and return the trained model

To get the predicted wind from the call the predict function (scikit-learn API)

>>> wind = model.predict(pressure)

or call the model as a function (numpy API)

>>> wind = model(pressure)

Note that the returned model supports inputs and outputs with units.

Parameters:
  • pressure (array_like) – Cyclone minimum sea-level pressure

  • wind (array_like) – Cyclone max wind

  • model (str, class, or object, optional) – The model to fit the pressure wind relation or a model with preset parameters to derive wind from pressure. Can also be set to “z2021” or “holland” for those preset models. The object must have a fit function that returns a trained model, consistent with numpy and scikit-learn models. Default is py:class:numpy.polynomial.polynomial.Polynomial with deg=2

  • wind_units (str, default="m s-1") – If the units of wind are not specified in the attributes then the function will assume it is in these units before converting to knots

  • pressure_units (str, default="hPa") – If the units of pressure are not specified in the attributes then the function will assume it is in these units

  • **kwargs – Remaining keywords are passed to the fit function of the model

Returns:

The model for mapping from pressure to wind.

Return type:

object