Potential intensity (PI) is the maximum speed limit of a tropical cyclone found by modeling the storm as a thermal heat engine. Because there are significant correlations between PI and actual storm wind speeds, PI is a useful diagnostic for evaluating or predicting tropical cyclone intensity climatology and variability. Previous studies have calculated PI given a set of atmospheric and oceanographic conditions, but although a PI algorithm – originally developed by Kerry Emanuel – is in widespread use, it remains under-documented. The Tropical Cyclone Potential Intensity Calculations in Python (pyPI, v1.3) package develops the PI algorithm in Python and for the first time details the full background and algorithm (line by line) used to compute tropical cyclone potential intensity constrained by thermodynamics. The pyPI package (1) provides a freely available, flexible, validated Python PI algorithm, (2) carefully documents the PI algorithm and its Python implementation, and (3) demonstrates and encourages the use of PI theory in tropical cyclone analyses. Validation shows pyPI output is nearly identical to the previous potential intensity computation but is an improvement on the algorithm's consistency and handling of missing data. Example calculations with reanalyses data demonstrate pyPI's usefulness in climatological and meteorological research. Planned future improvements will improve on pyPI's assumptions, flexibility, and range of applications and tropical cyclone thermodynamic calculations.

Tropical cyclones pose significant risks to coastal societies, being among the
costliest and deadliest of global natural hazards

Potential intensity (PI) is a theoretical model for the upper bound
(colloquially known as the “speed limit”) on tropical cyclone intensity,
given environmental conditions and energetic constraints

The algorithm to compute PI was originally developed by

online at

Despite widespread use, the BE02 algorithm itself has never (to my knowledge)
been fully documented. Because it is an important modeling tool for tropical
cyclone intensity, there is a need for a transparent and documented PI
algorithm. It is also advantageous to implement a PI algorithm in Python
(which is freely available and has many advantages in scientific research;

I developed Tropical Cyclone Potential Intensity Calculations in Python (i.e., “pyPI”) to meet these needs. In addition to adapting the BE02 algorithm in Python and thoroughly documenting the model, pyPI provides a maintained and regularly archived repository to support open science in the tropical meteorological community. pyPI is also ideally suited for ongoing community development and improvement and for research applications which require flexibility in particular PI input parameters or components (for example, the computation of the lifting condensation level) or integration with other Python packages. This article provides context for the initial package release of pyPI (v1.3) and details its development, algorithm, validation, and sample applications.

The proceeding Sect.

Tropical cyclones arise as an indirect response to a thermodynamic gap in the
tropical atmosphere's energy budget

Driven by thermodynamic disequilibrium – which is largest in the summer and
autumn seasons – an existing mature tropical cycle will transfer heat from
the surface to the atmospheric boundary layer, largely through latent heat
release of evaporation and from the sea surface and dissipative heating

The cross section (along radius,

Following the entropy gradient, air at the outer reaches of the storm spirals
inward (branch A) toward the minimum central pressure in the eye
(

An advantage of this theoretical model of a tropical cyclone is that it
permits a formulation of the storm's theoretical maximum intensity – i.e., its
PI – in terms of the heat engine efficiency, defined by the temperatures at
each extent (reservoir) of the engine (

As derived in

In physically based axisymmetric models, mature tropical cyclone wind speeds
tend to reach their PI

Links between observed and potential intensities have been shown on seasonal

This section provides a detailed description and record (including relevant citations) of the PI algorithm with its thermodynamic/meteorological origins, assumptions, and computations.

Potential intensity may be derived following

Equation (4) in

Input and output variables and adjustable algorithm parameters for the PI module. Default parameter values are specified in the “pyPI variable” column. Parameters adjusted by the user

The pressure dependence of CAPE requires solving
Eqs. (

CAPE is defined as the sum of positive and negative areas of buoyancy energy of a lifted parcel on a sounding (e.g.,

Given an initial surface parcel temperature, pressure, and mixing ratio, the
procedure begins by finding the parcel's reversible entropy, which is
conserved as it is lifted on the sounding. The parcel's water vapor pressure
is found via the ideal gas law (e.g.,

Having determined the parcel's initial moisture properties, we next find the
lifting condensation level (LCL) of the parcel, in order to partition the
upcoming buoyancy calculation between saturated and unsaturated regions of the
profile. The pressure of the LCL,

This is likely derived empirically from

Starting with calculations at levels

Next the algorithm finds the density temperature differences for all levels

When the algorithm converges for a level, the final parcel mixing ratio is set
depending on the ascent type chosen by the user (Sect.

Note that the density temperature difference (and hence a parcel's buoyancy)
with height is not strictly higher under either ascent assumption. Parcels
lifted reversibly are always warmer than those lifted psuedoadiabatically, but
the weight of the carried condensate also means these parcels are more dense
until they reach the upper troposphere (

Having determined

The CAPE algorithm numerically solves
Eqs. (

First, we find the maximum level of positive buoyancy (

Second, noting that

Third, we find the residual negative area (if

Fourth, we find the LNB and the temperature at the LNB,

Finally, the negative and positive areas are added together with the residuals
following Eq. (

A caveat of this approach is that different thermodynamic profile analysis
routines – and especially CAPE calculations – can produce results
which vary substantially from one another

The PI module begins by checking to ensure that the input atmospheric profile
is appropriate for the PI calculation. If not, missing values are returned by
the algorithm (see Sect.

Following Algorithm 2 described above, pyPI computes

Next, pyPI iteratively solves Eqs. (

When reduced by an order of magnitude to

Next, we calculate the saturation convective available potential energy at the
radius of maximum winds,

The ratio of sea-surface and outflow temperatures in Eq. (

Next,

When the algorithm has successfully converged on a stable value of

Note that the difference,

Finally, we may find tropical cyclone potential intensity. Assuming that the
raw computed maximum gradient wind speeds are scaled to 10

pyPI (v1.3) is written in Python v3.7 and its calculations are optimized with Numba

Modeling the maximum intensity of a tropical cyclone with pyPI requires input
environmental state variables: temperature (

pyPI includes six adjustable parameters that may be set in the module call, with the caveat that each should be chosen within the defined “Values” column of Table 1. Parameters set outside these values could result in syntax errors or logical errors in the output or may give rise to unphysical PI estimates.

The ratio

The ascent process proportion determines whether the air parcels displaced in
each CAPE calculation (cf. Sect.

The dissipative heating flag determines whether dissipative heating is
accounted for (

Raw potential intensities are maximum gradient wind speeds

The upper level pressure bound is the minimum pressure below which the input
profile is ignored during PI computation. Theoretically modeled tropical
cyclone outflow can often exceed the tropical tropopause on climatological
timescales

The missing data flag prescribes how missing values are handled in the
CAPE calculation (discussed below). Following the BE02 MATLAB code
(

Mirroring the output flag convention of the BE02 MATLAB code,

One major difference between pyPI and the BE02 MATLAB algorithm is the handling of missing data and the (related) flag provided in the output. By convention, missing input variables in pyPI are assigned Python's “Not a Number”, NaN, to avoid errors. The BE02 MATLAB code default is that profiles may contain missing values (specifically temperatures on pressure levels), and the algorithm computes PI over the remaining valid levels.

Because missing values may sometimes be found at the surface – and the
primary CAPE calculation (Sect.

pyPI addresses this challenge in three ways. First, an adjustable parameter
(

pyPI status flags from September 2004 potential intensity calculations when

Figure 2 shows an example of the output algorithm status flags from pyPI
calculations with a single month's mean environment (September 2004) from
MERRA2 data (Sect.

In the example pyPI calculation (Fig. 2) there are no inputs for which the
algorithm does not converge (cf.

pyPI outputs valid (non-missing) potential intensities over

In addition to updating the original BE02 algorithm, pyPI is designed with the
intention to undergo further scientific developments as requested or created
by the community. In addition to including alternative intensity indices

A specific goal for future pyPI development is to replace the current
empirical estimate of

These examples are not exhaustive but show the range of possibilities for future pyPI development and the potential future value of this model in the tropical meteorology community.

The pyPI sample data are monthly means of state variables from the second
Modern-Era Retrospective Analysis for Research and Applications (MERRA2,

September 2004 mean potential intensities (

September 2004 mean potential intensity differences (

2004 mean potential intensities (

Potential intensity calculations are generally linear (i.e., mean potential
intensities may be estimated as a function of mean environmental variables):

The sample data uses the land–sea mask from the European Centre for
Medium-Range Weather Forecasts Interim (ERA-Interim,

Accompanying the environmental conditions in the sample data are outputs from
the BE02 MATLAB code written by Kerry Emanuel

Figure 5 shows the scatter between all potential intensity values calculated
with the two algorithms over the sample data, plotted against a 1 : 1 line
(values lying on this line exhibit perfect agreement). The

A minor PI difference between pyPI and the BE02 MATLAB algorithm arises when
the pyPI-found outflow level has a higher pressure and warmer temperature than
found by the BE02 code. The outflow property differences result from pyPI's
correction of a minor error that was present in the BE02 algorithm, where

I conclude that the PI calculations made with the pyPI algorithm are adequately validated against the BE02 MATLAB code, and that pyPI is sufficiently accurate for use in research applications.

Figure 6 shows 2004 annual mean sea-surface temperatures, as well as pyPI-calculated potential
intensities, outflow temperatures, and outflow temperature levels. The familiar pattern of warm SSTs in the tropics corresponds with high

2004 annual mean potential intensities in

2004 seasonal cycles of potential intensity in meters per second

A slightly more sophisticated application of pyPI is the calculation of
potential intensity seasonal cycles. Reproducing the methodology of

The seasonal cycles of PI are known to be quite robust year over year and
exhibit clear differences between regions. The western North Pacific has a
nearly flat seasonal cycle of PI, while the other basins are more
intraseasonally variable. While the muted sea-surface temperatures certainly
play an important role in this damped cycle, the outflow temperature pattern
is typical of the cold-point tropopause seasonal cycle
(e.g.,

The seasonal cycles of each basin illustrate the complex relationship between
sea-surface temperatures, OTLs, and outflow temperatures. Figure 8 diagrams
this relationship in more detail, showing how one assumption in the pyPI
algorithm impacts the output PI values. pyPI assumes that the outflow
temperature and its level are derived by finding the LNB assuming a saturated
parcel lifted from the sea-surface with temperature,

Skew-T log-P thermodynamic diagram with isotherms (thin black curves), dry adiabats (green curves), and moist adiabats (blue curves). The bold black line is a mean environmental temperature profile from the North Atlantic main development region, the magenta curve is the moist adiabat associated with a mean North Atlantic sea-surface temperature (SST), and the red curve is the moist adiabat associated with a sea-surface temperature 3

These properties are borne out in the example 2004 seasonal cycles computed in
Fig. 7. In the North Atlantic basin sea-surface temperature and OTL seasonal
cycles are inversely proportional: colder sea-surface temperatures have higher-pressure OTLs and warmer outflow temperatures found in the upper troposphere
(where

Seasonal amplitudes of each PI decomposition term (Eq.

The relative contributions to potential intensity may be mathematically
derived by decomposing Eq. (

After finding each term in Eq. (

In all basins, the disequilibrium term drives the largest portion of the
seasonal amplitude. This is consistent with sea-surface temperature seasonal
cycles which dominate the disequilibrium variance (Fig. 7). The efficiency
term is smaller, and in each basin it follows the same cycle as thermodynamic
disequilibrium, with the exception of the western North Pacific (where the
efficiency seasonal cycle maximizes in the boreal winter and minimizes in the
boreal summer). This opposite-signed seasonality between disequilibrium and
efficiency in the western North Pacific is directly related to the influential
seasonality of the near-tropopause outflow temperatures found with the pyPI
calculations (Sect.

These simple examples show how pyPI may be used to study tropical cyclone intensities and likewise demonstrate pyPI's ability to produce findings similar to those previously computed with the BE02 MATLAB code.

pyPI is a Python package that models the maximum potential intensity (PI) of a
tropical cyclone given its environmental conditions. pyPI(v1.3) is the first
fully documented PI algorithm, advancing on a previous MATLAB code

pyPI calculations exactly reproduce outputs from the

Because of its statistical ties with observed storms

Potential intensity is a theoretical model with several notable
limitations. Real-world tropical cyclones rarely are in quasi-steady state or
meet the idealized conditions required for the Carnot cycle model. This makes
PI less suitable for operational purposes, though it may still be incorporated
into real-time genesis or intensification indices (see below). Furthermore, PI
theory does not directly account for complicating factors such as vertical
wind shear or large-scale subsidence, which are known to have important
influences on tropical cyclone intensity. The ratio of surface exchange
coefficients,

Future planned software improvements of pyPI include an expansion of the
codebase to compute other tropical cyclone thermodynamic and statistical
indices, including the genesis potential index

Meteorological constants used in the potential intensity algorithm.

Constants used in to model potential intensity in the BE02 algorithm have been directly used in pyPI and are recorded in Table

Python functions to compute or analyze the potential intensity algorithm.

pyPI performs the calculations of Algorithms 1 and 2 through a set of
functions included in the primary module or loaded from a utility file; these
ensure consistency and enable modular changes to the codebase. Interested
readers are encouraged to review the function list in
Table

pyPI version 1.3 and accompanying
data for validation and sample analyses are available at

The author declares that there is no conflict of interest.

The code is made publicly available without any warranty, and
permissions are provided pursuant to the MIT License
(

Thanks to the two anonymous reviewers, whose comments improved this study. The author is particularly grateful to Kerry Emanuel for his encouragement and permission to develop, document, and distribute pyPI and for his development of PI theory and the original PI algorithm. Thanks to Daniel Rothenberg for implementing a Numba optimization

This research has been supported by the National Science Foundation (grant no. ICER-1663807) and the National Aeronautics and Space Administration (grant no. 80NSSC17K0698).

This paper was edited by Paul Ullrich and reviewed by two anonymous referees.