huracanpy.tc.ace#
- huracanpy.tc.ace(wind, sum_by=None, threshold=<Quantity(34, 'knot')>, wind_units='m s-1')[source]#
Calculate accumulate cyclone energy (ACE)
\[\mathrm{ACE} = 10^{-4} \sum v_\mathrm{max}^2 \quad (v_\mathrm{max} \ge 34 \mathrm{kn})\]By default, this function will return the “ACE” for each individual point in wind. To calculate more useful quantities of ACE, use the sum_by keyword.
For example, to calculate the ACE of each individual track, doing
>>> ace_by_track = huracanpy.tc.ace(tracks.wind, sum_by=tracks.track_id)
will return a DataArray with track_id as a coordinate and the sum of ACE for each track as the data. Note that this is equivalent to using groupby:
>>> ace_by_point = huracanpy.tc.ace(tracks.wind) >>> ace_by_track = ace_by_point.groupby(tracks.track_id).sum()
To calculate the average ACE by track, you can do
>>> ace_by_track_mean = ace_by_track.mean()
Similarly to calculate a climatological mean ACE by year, run
>>> climatological_ace = huracanpy.tc.ace( >>> tracks.wind, sum_by=tracks.time.dt.year >>> ).mean()
- Parameters:
wind (array_like) – Maximum velocity of a tropical cyclone associated with the tracks dataset
sum_by (array_like) – Variable to take the sum of ACE values across. Must have the same length as wind
threshold (scalar, default=34 knots) – ACE is set to zero below this threshold wind speed. The default argument is in knots. To pass an argument with units, use
metpy.units, otherwise any non-default argument will be assumed to have the units of “wind_units” which is “m s-1” by default.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
- Returns:
The ACE for each track in wind
- Return type:
array_like