## 1. Introduction

Available potential energy (APE) is the primary energy source for generating mesoscale eddies (e.g., Vallis 2006). The Lorenz APE is the most widely used framework of APE [Lorenz 1955; see Tailleux (2013b), which distinguishes the general concept of APE and the Lorenz APE]. For a given ocean system, the Lorenz APE is commonly defined as the potential energy (PE) of the system minus the PE of the Lorenz reference state (the absolute/global minimum PE state), which is achievable through unconstrained adiabatic parcel rearrangement. Exactly solving the Lorenz reference state is theoretically difficult due to the nonlinear nature (e.g., thermobaricity) of the equation of state (EOS) of seawater (Huang 2005). Huang (2005) and Saenz et al. (2015) provide fast but essentially approximate methods to solve the Lorenz reference state, the latter of which is based on an extension of the approach proposed by Tseng and Ferziger (2001). Hieronymus and Nycander (2015, hereinafter HN15) are the first to exactly solve the Lorenz reference state by using the linear assignment algorithm (LAA; i.e., the Hungarian algorithm). This result is encouraging due to its absolute accuracy. However, as they point out, LAA comes at a high computational cost that makes it difficult to be applied in ocean GCMs. As the first part of this study (section 2), we develop an algorithm that is ~10^{3}–10^{5} times faster than LAA in achieving the same exact Lorenz reference state for the examined World Ocean datasets, making it useful for energy diagnosis in ocean GCMs.

Our algorithm has applications to calculate APE density. Lorenz APE density is commonly defined based on the Lorenz reference state and is a positive definite function of position that integrates to the system’s Lorenz APE [Roullet and Klein 2009; Winters and Barkan 2013; Molemaker and McWilliams 2010; Scotti and White 2014; see Tailleux (2013a) for a review]. Tailleux (2013b) extends the concept of APE density to one based on an arbitrary reference state (i.e., not necessarily the Lorenz reference state); the APE density of a fluid parcel is the positive-definite work done against buoyancy forces when adiabatically displacing this parcel among the given reference state from its reference-state position to its current-state position [section 2.1 of Tailleux (2013b)]. Global Lorenz APE density is the largest around Antarctica and the Arctic, where significant amounts of dense water masses would have to move thousands of kilometers to tropical ocean bottoms to achieve the Lorenz reference state with flat isopycnals (Fig. 3d of Tailleux 2013b). Although useful for many purposes, this globally defined concept does not directly represent the local (~10–300 km) parcel rearrangement that releases local APE into eddy kinetic energy (EKE) through baroclinic instability (e.g., Vallis 2006). This causes a significant mismatch between the global patterns of Lorenz APE density and those of EKE (as shown in section 3). In the second part of this study (section 3), we aim to develop a locally defined APE framework, in strong contrast to the Lorenz APE framework, in order to better detect the EKE patterns. Our defined APE framework could compare the APE products derived from different rearrangement length scales (from the whole domain scale to an eddy scale; Fig. 2) and determine their quality for the eddy detection.

## 2. Solving the Lorenz reference state

*m*

_{0}. This can be done accurately in the presence of bottom topography, with caveats as noted below, and does not impact the solution, provided that the grid spacing has a sufficiently high resolution (e.g., the solution converges with increasing resolutions; Fig. 1a). Note that the widely used

*World Ocean Atlas 2009*(

*WOA 2009*) dataset (Antonov et al. 2010) itself, as applied in this section, only has 50 levels and cannot accurately represent the real-ocean bottom topography. Thus, in this sense there may always be some unaccounted masses on the ocean bottom, no matter how small

*m*

_{0}is. Further,

*m*

_{0}, if smaller, can only approach but typically cannot reach the resolution limit of the applied original dataset in our scenario because of the interpolation strategy here. This is a common problem for the finite-difference scheme. For parcel

*i*with salinity

*S*

_{i}and potential temperature

*θ*

_{i}, we label its current-state pressure as

*P*

_{i}(

*i*= 1, 2, …,

*n*), where

*n*is the total number of parcels in our gridded system. Therefore, the 3D system has

*n*parcels located uniquely in

*n*positions (note that lots of positions here have the same value of pressure, e.g., those positions at the top layer). Assuming hydrostatic balance, any adiabatic parcel rearrangement, which can be decomposed into a series of two-parcel exchanges, does not change the pressure distribution of the

*n*positions of the system. It is to redistribute the

*n*parcels among the

*n*positions

*P*

_{i}(

*i*= 1, 2, …,

*n*), as a transition from the current state to a rearrangement state. Our goal is to find the rearrangement state that has the absolute minimum PE (i.e., the Lorenz reference state). Note that the total number of rearrangement states for the system is the factorial of

*n*and is a huge number. Here, the assumption of hydrostatic balance is typically accurate for the global-ocean system or for the mesoscale dynamic system that we focus on; the pressure error percentage (i.e., the error here equals the real pressure minus the hydrostatic pressure) should be ≲ Ro ×

*α*

^{2}≪ 1%, where Ro is the Rossby number and

*α*is the aspect ratio [typically Ro ≪ 1 and

*α*≲ 0.1 for a system ≳ mesoscale; section 2.8.5 of Vallis (2006)]. We define

*h*

_{i,j}] (

*i*,

*j*= 1, 2, …,

*n*), where

*h*

_{i,j}=

*h*(

*θ*

_{i},

*S*

_{i},

*P*

_{j}) is the specific enthalpy (in units of joules per kilogram) of parcel

*i*at pressure

*P*

_{j}. Note that the

*θ*

_{i}and

*S*

_{i}of parcel

*i*are always conserved under adiabatic parcel rearrangements. For a rearrangement state where parcel

*k*(

*k*= 1, 2, . . . ,

*n*) is at

*P*

_{l}, we define a matrix

*x*

_{i,j}] (

*i*,

*j*= 1, 2, …,

*n*) that maps the current state to the rearrangement state, with

*x*

_{k,l}= 1 and

*x*

_{k,e}= 0 (

*e*≠

*l*, 1 ≤

*e ≤ n*) (i.e.,

*x*

_{i,j}is either 0 or 1). Therefore, each rearrangement state has a unique

HN15 have derived (1) and demonstrated that the above problem is the classic linear assignment problem (LA) in applied mathematics (Kuhn 1955), which can be exactly solved by the LAA. However, as they point out, LAA is too slow to be useful for energy diagnosis in a GCM. We confirm this by using one of the fastest codes of LAA (Jonker and Volgenant 1987); LAA takes ~2 days and ~155 days, respectively, to solve the Lorenz reference state for a 628-km and 314-km gridded global ocean (blue curves in Figs. 1a,b). This is performed on a normal Unix workstation (detailed in the caption of Fig. 1b). All global datasets in section 2 have 50 vertical levels and are interpolated from the 1° grid *WOA 2009* climatology (Antonov et al. 2010).

*h*

_{i,j}]. This simplification is according to the fact that the

*n*×

*n*matrix [

*h*

_{i,j}] (

*i*,

*j*= 1, 2, …,

*n*) includes elements that are substantially repeated, as illustrated below. For the deepest column among the gridded system, we denote its total parcel/layer number as

*s*. Here,

*s*, the maximum vertical-layer number of the system, is much smaller than

*n*, the total parcel number of the 3D system (i.e.,

*s*≪

*n*). So totally the system has

*s*vertical pressure layers (i.e., each layer has a unique pressure value) by utilizing the assumption of hydrostatic balance and noting that all gridded parcels have the same mass and the same horizontal area (subject to the errors discussed above). For vertical pressure layer

*k*(

*k*= 1, 2, …,

*s*), we denote its number of horizontal positions as

*n*

_{k}, subject to

*.*These

*n*

_{k}positions in layer

*k*correspond to

*n*

_{k}numbers of

*P*

_{j}(

*j*here are among 1, 2, …,

*n*and are the indexes for these

*n*

_{k}positions), which all have a unique pressure value, denoted as Pr

_{k}. In other words, Pr

_{k}(

*k*= 1, 2, …,

*s*) is the pressure for the vertical layer

*k*that includes

*n*

_{k}numbers of parcels (or, say, positions). Therefore, the

*n*× 1 array [

*P*

_{j}] (

*j*= 1, 2, …,

*n*) has elements that are substantially repeated and includes only

*s*unique values: Pr

_{k}(

*k*= 1, 2, …,

*s*; again

*s*≪

*n*). Thus, [

*h*

_{i,j}] =

*h*(

*θ*

_{i},

*S*

_{i},

*P*

_{j}) (

*i*,

*j*= 1, 2, …,

*n*) also has elements that are substantially repeated (due to the repetition of

*P*

_{j}values) and can be reduced to

*h*(

*θ*

_{i},

*S*

_{i}, Pr

_{k}) (

*i*= 1, 2, …,

*n*;

*k*= 1, 2, …,

*s*), that is, the

*n*×

*n*matrix [

*h*

_{i,j}] can be largely reduced into a

*n*×

*s*matrix

*s*≪

*n*. Essentially, the Lorenz reference state is not unique: for a constant pressure layer in the Lorenz reference state, the adiabatic redistribution of parcels within this layer does not alter the enthalpy/PE of the system [e.g.,

*h*(

*θ*

_{i},

*S*

_{i}, Pr

_{k}) for parcel

*i*is unchanged during this redistribution since Pr

_{k}is a constant within this layer]. We define

*i*= 1, 2, …,

*n*;

*k*= 1, 2, …,

*s*), where

*i*located at pressure Pr

_{k}in the rearrangement state.

^{1}Thus, the problem (1) can be modified as follows by taking advantage of the fact that

*s*<<

*n*:

We find that this belongs to the classical minimum-cost flow problem (MCF)^{2} in applied mathematics (Goldberg and Tarjan 1989; Bland and Jensen 1992; Ahuja et al. 1992). From (1) and (2), clearly LA is just a special case of MCF by prescribing *s* = *n* and *n*_{j} = 1. Solving the Lorenz reference state is extremely simplified by using (2) rather than (1), since *n*/*s* is ≫1 due to a typical large aspect ratio in ocean systems with mesoscale circulation (e.g., *n*/*s ~* 10^{4} for a 100-km gridded global ocean, with *s* = 50 for our cases). We use one of the fastest codes of the MCF algorithm (MCFA; Goldberg 1997). We find that MCFA achieves the exact same^{3} Lorenz reference state as LAA (Fig. 1a) but is 10^{3}–10^{5} times faster, depending on the data resolution (Fig. 1b; see footnote 2 for the related time complexity). We find that the dependence of the solved APE using MCFA on the vertical resolution of the dataset (i.e., on *s*) is similar to the results shown in Table 1 of Huang (2005). MCFA only takes ~10 min to solve for a 111-km gridded global dataset. This is efficient enough for some useful energy diagnosis in ocean GCMs. The exact Lorenz reference state solved by MCFA (Fig. 1c) is largely consistent with that solved by approximate methods (e.g., Fig. 3d of Tailleux 2013b), while nonlinear effects of EOS (e.g., thermobaricity) can cause a difference between them (see appendix B of HN15).

## 3. Eddy size–constrained APE density

In this section, we aim to develop a new APE framework that may detect local EKE patterns and even individual eddies/vortices. We first investigate the energetic mesoscale eddy field in the Southern Ocean (SO) system (Fig. 2a; from the 18-km grid ECCO2 state estimate as described in the caption). EKE in Fig. 2a is defined as *u* and *υ* are, respectively, the zonal and meridional velocities, and the overbar here denotes the time mean. The EKE patterns are distinct from those of the Lorenz APE density (Fig. 2a vs Fig. 2f; vertically averaged). This is because the Lorenz APE density is based on entire domainwide parcel rearrangement, which reflects the deviation of the local current-state stratification from the Lorenz reference state in the considered system. For example, Lorenz APE density has a minimum at ~45°S (Fig. 2f), since at this latitude the current-state stratification is approximately closest to the Lorenz reference state (Fig. 4a, leftmost versus rightmost panel). In contrast, mesoscale eddies are widely considered to be mainly generated by baroclinic instability, which is associated with local parcel rearrangement that acts to flatten local isopycnals and release local APE into EKE (e.g., Pedlosky 1987). The horizontal scale of this local parcel rearrangement may not be uniquely quantified due to the nonlinear development of eddies, but it is close to the local eddy size, the deformation radius, and the width of the baroclinic zone with essentially similar magnitude (Visbeck et al. 1997). We have done a related sensitivity test, as discussed later in Fig. 2, and find that the local eddy size is generally a good proxy for the local parcel rearrangement.^{4} To better represent the generation of EKE, it is intuitive to consider a locally defined APE framework: the eddy size–constrained APE density that reflects the local baroclinicity. It is still based on adiabatic parcel rearrangement from the current state to the reference (minimum PE) state but with the strong constraint that the rearrangement should not exceed the local eddy size horizontally. Solving this new reference state is identical to problem (1), except with the extra enforced condition of *x*_{i,j} = 0 (*i*, *j* = 1, 2, …, *n*) provided that parcels *i* and *j* in the current state would be separated by a horizontal distance larger than the local eddy size around parcel *i*. This problem can be exactly and efficiently solved by MCFA.^{5} Based on the solved reference state, we obtain the eddy size–constrained APE density [APE density can be defined for an arbitrary reference state by essentially following Tailleux (2013b); note that the reference state here can be horizontally inhomogeneous, and thus the APE density here is defined as the positive-definite work done against buoyancy forces, when adiabatically displacing this parcel vertically through its reference-state column from its reference-state pressure level to its current-state pressure level].

From observations, the SO has an eddy size of around 40–80 km (Sallée et al. 2008). As a test, we prescribe an eddy size constraint of 50 km arbitrarily for the entire SO domain. The resulting eddy size–constrained APE density is in general consistent with the EKE patterns (Fig. 2b vs Fig. 2a; vertically averaged), for example, enhancement of EKE around strong ACC fronts and subtropical western boundary currents (Fig. 3a). This is consistent with the physical picture that local APE is a critical energy source^{6} for EKE. We note that there is high APE density along the southern/northern boundaries (Fig. 2b), while there is little EKE there. This is because we consider the closed SO system with solid southern/northern boundaries; this artificial inconsistency disappears in the World Ocean case as discussed later. Note that the conversion rate of local APE density to EKE can be highly inhomogeneous spatially because of the intricate influences from standing meanders, topography, zonal fronts, nonlocal energy propagation, turbulent energy cascade, and so on (Thompson and Sallée 2012; Chen et al. 2014; Chapman et al. 2015). Interestingly, high EKE between 30° and 240° longitude are generally located downstream of the corresponding APE density patterns (Fig. 2a vs Fig. 2b), while the maximum EKE is also found downstream of the baroclinically unstable regions (indicated by Eady growth rate; Williams et al. 2007). This similarity suggests the usefulness of our defined APE density to diagnose baroclinically unstable regions. This downstream relationship is likely contributed from the southward advection of eddies by the southeastward ACC fronts (Fig. 3a), while also associating with the fact that high EKE is often found downstream of significant topographic features and standing meanders (Thompson and Naveira Garabato 2014). Local baroclinicity, and hence eddy size–constrained APE density, may be strongly modulated by topography (Fig. 3b), baroclinic instability, Ekman pumping (Marshall and Speer 2012), ocean jet formation (Thompson 2010), differential surface heating (Bryan and Cox 1968), and so on.

As a sensitivity study, we loosen the eddy size constraint from 50 to 100, 300, and 700 km, respectively. As expected, this generally leads to flatter isopycnals in the reference state (Fig. 4a) and a resulting larger APE density (Figs. 2b–e), which matches better with the Lorenz APE density (Fig. 2f) but matches worse with the EKE (Fig. 2a). Figures 4c and 4b schematically explain the following two features, respectively: (i) contrasting Fig. 2e with Fig. 2f, the 700-km constrained APE (note 700 km ≪ domain scale ~ 3000 km) already accounts for most (~75%) of the Lorenz APE in the SO system; and (ii) there is a strong zonal asymmetry between regions A, B, and C (Fig. 2e vs Fig. 2f).

There is a striking feature that the minimum Lorenz APE density (blue or green areas in Fig. 2f) is located in areas with roughly the maximum eddy size–constrained APE density (red or yellow areas in Fig. 2b), which are also the ACC front areas characterized by the maximum EKE in Fig. 2a. This feature is explained as follows: In Fig. 2f, the black curve denotes the positions whose current-state surface density is equal to the surface density at the Lorenz reference state (which is a constant; e.g., see the rightmost panel of Fig. 4a). This black curve agrees well with the areas that have the minimum Lorenz APE density in Fig. 2f (blue or green areas). This is because the Lorenz APE density reflects the deviation of local current-state stratification from the Lorenz reference state (i.e., the black curve areas have roughly a zero deviation and hence have no need of parcel rearrangement to reach the Lorenz reference state and therefore have the minimum Lorenz APE density). Further, the surface density at the Lorenz reference state (i.e., also the density along the black curve) is approximately the surface-mean density of the current state in the quasigeostrophic (QG) limit (e.g., Vallis 2006). Thus, the black curve, which has about the mean density, is located meridionally right between the maximum density in the south and the minimum density in the north (see the leftmost panel in Fig. 4a). Therefore, the black curve roughly represents the locations with the maximum meridional density gradient, where the ACC fronts are located with about the maximum EKE and the maximum eddy size–constrained APE density.

Figure 2g shows the QG–APE of the SO [see, e.g., (2.6) of Roullet and Klein (2009) for the definition of QG–APE], which acts to approximate the Lorenz APE under the QG approximation (Huang 2005; Pedlosky 1987). Contrasting Fig. 2g with Fig. 2f, clearly QG–APE is basically consistent with the Lorenz APE (e.g., in region A), although having evident departures in regions B and C. This is because regions A, B, and C have similar depth, (≲500 m) deeper and (≲500 m) shallower isopycnals, respectively, contrasting to the mean of the whole SO (Fig. 4b vs the leftmost panel of Fig. 4a; especially around 50°–60°S). Therefore, regions B and C require strong isopycnal displacements to reach the Lorenz reference state and hence cause the departure of QG–APE from the Lorenz APE in these regions [see Roullet and Klein (2009) for a detailed study of this]. This suggests that QG approximation for APE, although useful, should be treated with caution for the SO.

Figure 5 shows the same energy quantities as Fig. 2 but based on a snapshot of the dataset. These transient APE densities are generally consistent with the 3-yr mean counterpart in Fig. 2, but with much more mesoscale turbulent features, as expected. There is a high correspondence between the eddies (vortices) in Fig. 5a and the APE patches in Fig. 5b (e.g., at the south of Africa; around Australia). This further demonstrates the potential usefulness of our defined eddy size–constrained APE density to diagnose/parameterize mesoscale eddies. This correspondence should be contributed by two factors: (i) local APE is a critical energy source for mesoscale eddies and is partly converted to EKE via baroclinic instability, and (ii) baroclinic eddies (vortices) are associated with local stratification (and hence APE) signals, that is, corresponding to local baroclinicity (a doming or a bowling of the isopycnals) through thermal wind balance. Indeed, EKE and APE for an eddy would scale directly with one another in the QG limit [see (4) below]. These two factors above are related and may not be separated explicitly.

*L*

_{d}is the deformation radius, and

*L*is the considered scale. Now we consider a closed system of only an eddy scale, that is, where

*L*is equal to the eddy scale

*L*

_{e}. Then the Lorenz APE of this eddy-scale system, which is approximated by the QG–APE of this system, is essentially equivalent to the eddy size–constrained APE that we focus on here (note again that the system considered here is of only eddy scale; in contrast, the Lorenz APE and QG–APE in Figs. 2 and 5 are for the whole SO system). Thus, (3) implies thatThe eddy scale

*L*

_{e}is typically larger than

*L*

_{d}(Fig. 12 of Chelton et al. 2011). Therefore, from (4), eddy size–constrained APE should be typically larger than EKE, as shown by Fig. 6a versus Fig. 6c. Note that (4), because of its scaling analysis nature, should be only treated as a qualitative argument rather than an accurate description.

The distribution of eddy size–constrained APE in general well captures the high EKE in most ocean regions (Fig. 6c vs Fig. 6a), especially around the SO fronts and subtropical western boundary currents (e.g., Gulf Stream, Kuroshio, Agulhas, Brazil/Malvinas, and East Australian Currents). This is consistent with the classic hypothesis that baroclinic instability provides the dominant source for local eddy growth in most ocean regions (e.g., Arbic 2000), that is, by converting local APE to EKE (e.g., Vallis 2006). The mismatching part between Figs. 6a and 6c may be caused by some interactions as discussed before. For example, barotropic instability is an important EKE source in the Gulf Stream (Gula et al. 2015) and in tropical oceans (Jochum et al. 2004). Subpolar oceans have much larger eddy size–constrained APE density than EKE (Fig. 6c vs Fig. 6a; e.g., around the Weddell and Greenland Seas, Antarctic continental shelf). This is likely because *L*_{d}/*L*_{e} decreases with latitude and becomes very small at high-latitude regions (Fig. 12 of Chelton et al. 2011). According to (4) we should have APE much larger than EKE in these regions. Further, this may also be contributed by the underestimate of EKE in our applied 18-km grid ECCO2 dataset, the suppression of baroclinic instability above continental slope and along the ocean front (Stewart and Thompson 2013; Su et al. 2014), and the potential smallness of real-ocean parcel rearrangement scale relative to our applied eddy size.

Global patterns of Lorenz APE density are again distinct from EKE (see Fig. 6d and its caption); it mainly reflects the ocean regions with dense water production/circulation. QG–APE of the World Ocean (Fig. 6e vs Fig. 6d) has generally consistent patterns with the Lorenz APE. However, they have a significant discrepancy in magnitude especially around high-latitude regions, where the densest waters are located and hence strong isopycnal displacements are required to reach the global Lorenz reference state. This makes QG approximation less effective (Roullet and Klein 2009) in contrast to the lower-latitude regions.

## 4. Discussion

Our proposed MCFA efficiently and exactly solves the Lorenz reference state for an ocean system with a nonlinear EOS. This may be helpful for associated energy diagnosis in ocean models, especially for regions where the nonlinear effect of EOS is significant to determine the Lorenz APE (thermobaricity may compete with baroclinicity, e.g., in the Weddell Sea; Su et al. 2016a,b,c). In contrast, approximate methods such as the QG–APE typically cannot capture this nonlinear effect (see appendix B of HN15).

There is a general match, although with nonneglectable difference, between the patterns of high EKE and high eddy size–constrained APE density (i.e., high local baroclinicity; Fig. 6a vs Fig. 6c). This new APE framework is also shown to be helpful to detect individual eddies/vortices (Fig. 5a vs Fig. 5b). These suggest the likely usefulness of our APE framework in diagnosing/parameterizing mesoscale eddies and identifying the mechanisms that cause nonlocal EKE development. These results open new routes to understand the dynamics that influences the conversion of local APE to EKE (e.g., related eddy-mean energy fluxes, the vertical structure of energy transfer, the influences from topography, standing meanders, nonlocal energy propagation, waves, and so on).

Roullet et al. (2014) show the global map of the eddy APE as diagnosed from Argo data, which is highly consistent with the surface EKE patterns estimated from satellite altimetry. Note that the eddy APE is the direct source for EKE (Fig. 1 of Chen et al. 2014). In contrast, our eddy size–constrained APE density is defined only from a given dataset (rather than from a time series of datasets as required for the definition of eddy APE). However, it can still well capture the EKE patterns in most ocean regions; the strong connection between them is again explained qualitatively by (4). From a time series of datasets, we can investigate the time-mean part and the eddy part of our APE concept. The high sensitivity of our eddy size–constrained APE concept to the rearrangement length scales (Figs. 2b–f) suggests that a higher-resolution observation for the stratification (e.g., by Argo floats) would be very helpful to detect local eddy patterns.

This study focuses on the energy reservoirs (i.e., APE and EKE) rather than the conversion rate between them. Via the baroclinic instability, the mean APE is converted to the eddy APE, while the eddy APE is then converted to EKE by *ρ* is density, *w* is vertical velocity, and the prime denotes the deviation from the time mean. Roullet et al. (2012, see their Figs. 8, 11), Zhai and Marshall (2013, see their Figs. 5–7), and Chen et al. (2014, see their Table 1) have provided valuable discussions on these conversions. Figures 5a and 5b of Chen et al. (2014) show the global map of the conversion term ^{7} Their patterns generally agree with the patterns of EKE and our defined eddy size–constrained APE density (our Figs. 6a, 6c); this is consistent with the classic hypothesis that the dominant source for local eddy growth is the energy released locally from the mean flow (i.e., APE) through baroclinic instability (Tulloch et al. 2011; Chen et al. 2014). Exploring the conversion terms using our defined new APE framework will be investigated in a following study. In the Southern Ocean, the eddy field includes the transient and standing eddies. The related energy transfer between the (time and zonal) mean field and the eddy field may be more complicated than the classic Lorenz energy cycle (see, e.g., Abernathey and Cessi 2014). Our eddy size–constrained APE is likely to be closely associated with the dynamics of both the standing and the transient eddies (e.g., Fig. 5a vs Fig. 5b).

The QG–APE shown in Figs. 2g and 6e are for the SO system and the World Ocean system, respectively. The QG–APE of a parcel is traditionally defined based on the deviation of density/buoyancy of this parcel from the horizontal mean of the considered system [e.g., (4) of Huang 2005; (3.183) of Vallis 2006]. It is possible to define a new QG–APE concept, defined *not* based on the horizontal mean of the considered system, but based on the horizontal mean of an eddy-size domain surrounding the considered parcel (i.e., the domain here is a small part of the system, of only eddy size). This is essentially a similar concept as the eddy size–constrained APE density we defined in this study: the former is based on the QG approximation, while the latter is based on adiabatic parcel rearrangements. This potential new concept of QG–APE may similarly capture the EKE patterns as the eddy size–constrained APE density but should be much cheaper to compute numerically.

Z.S.’s and A.P.I.’s research was supported by NSF Award AST-1109299. We thank Andrew Thompson and Patrice Klein for useful comments. Sincere thanks go to Andrew Stewart for some constructive discussions. We gratefully acknowledge the helpful comments from two anonymous reviewers. We thank Dimitris Menemenlis for providing the ECCO2 data.

## REFERENCES

Abernathey, R., , and P. Cessi, 2014: Topographic enhancement of eddy efficiency in baroclinic equilibration.

,*J. Phys. Oceanogr.***44**, 2107–2126, doi:10.1175/JPO-D-14-0014.1.Ahuja, R. K., , A. V. Goldberg, , J. B. Orlin, , and R. E. Tarjan, 1992: Finding minimum-cost flows by double scaling.

,*Math. Program.***53**, 243–266, doi:10.1007/BF01585705.Antonov, J., and Coauthors, 2010:

*Salinity*. Vol. 2,*World Ocean Atlas 2009*, NOAA Atlas NESDIS 69, 184 pp.Arbic, B. K., 2000: Generation of mid-ocean eddies: The local baroclinic instability hypothesis. Ph.D. thesis, Massachusetts Institute of Technology and Woods Hole Oceanographic Institution, 290 pp.

Bland, R. G., , and D. L. Jensen, 1992: On the computational behavior of a polynomial-time network flow algorithm.

,*Math. Program.***54**, 1–39, doi:10.1007/BF01586039.Bryan, K., , and M. D. Cox, 1968: A nonlinear model of an ocean driven by wind and differential heating: Part I. Description of the three-dimensional velocity and density fields.

,*J. Atmos. Sci.***25**, 945–967, doi:10.1175/1520-0469(1968)025<0945:ANMOAO>2.0.CO;2.Chapman, C. C., , A. M. Hogg, , A. E. Kiss, , and S. R. Rintoul, 2015: The dynamics of Southern Ocean storm tracks.

,*J. Phys. Oceanogr.***45**, 884–903, doi:10.1175/JPO-D-14-0075.1.Chelton, D. B., , M. G. Schlax, , and R. M. Samelson, 2011: Global observations of nonlinear mesoscale eddies.

,*Prog. Oceanogr.***91**, 167–216, doi:10.1016/j.pocean.2011.01.002.Chen, R., , G. R. Flierl, , and C. Wunsch, 2014: A description of local and nonlocal eddy–mean flow interaction in a global eddy-permitting state estimate.

,*J. Phys. Oceanogr.***44**, 2336–2352, doi:10.1175/JPO-D-14-0009.1.Ferrari, R., , and C. Wunsch, 2009: Ocean circulation kinetic energy: Reservoirs, sources, and sinks.

,*Annu. Rev. Fluid Mech.***41**, 253–282, doi:10.1146/annurev.fluid.40.111406.102139.Goldberg, A. V., 1997: An efficient implementation of a scaling minimum-cost flow algorithm.

,*J. Algorithms***22**, 1–29, doi:10.1006/jagm.1995.0805.Goldberg, A. V., , and R. E. Tarjan, 1989: Finding minimum-cost circulations by canceling negative cycles.

,*J. Assoc. Comput. Mach.***36**, 873–886, doi:10.1145/76359.76368.Gula, J., , M. J. Molemaker, , and J. C. McWilliams, 2015: Gulf Stream dynamics along the southeastern U.S. seaboard.

,*J. Phys. Oceanogr.***45**, 690–715, doi:10.1175/JPO-D-14-0154.1.Hieronymus, M., , and J. Nycander, 2015: Finding the minimum potential energy state by adiabatic parcel rearrangements with a nonlinear equation of state: An exact solution in polynomial time.

,*J. Phys. Oceanogr.***45**, 1843–1857, doi:10.1175/JPO-D-14-0174.1.Huang, R. X., 2005: Available potential energy in the world’s oceans.

,*J. Mar. Res.***63**, 141–158, doi:10.1357/0022240053693770.Jochum, M., , P. Malanotte-Rizzoli, , and A. Busalacchi, 2004: Tropical instability waves in the Atlantic Ocean.

,*Ocean Modell.***7**, 145–163, doi:10.1016/S1463-5003(03)00042-8.Jonker, R., , and A. Volgenant, 1987: A shortest augmenting path algorithm for dense and sparse linear assignment problems.

,*Computing***38**, 325–340, doi:10.1007/BF02278710.Kuhn, H. W., 1955: The Hungarian method for the assignment problem.

,*Nav. Res. Logist.***2**, 83–97, doi:10.1002/nav.3800020109.Lorenz, E. N., 1955: Available potential energy and the maintenance of the general circulation.

,*Tellus***7**, 157–167, doi:10.1111/j.2153-3490.1955.tb01148.x.Marshall, J., , and K. Speer, 2012: Closure of the meridional overturning circulation through Southern Ocean upwelling.

,*Nat. Geosci.***5**, 171–180, doi:10.1038/ngeo1391.Menemenlis, D., , J.-M. Campin, , P. Heimbach, , C. Hill, , T. Lee, , A. Nguyen, , M. Schodlok, , and H. Zhang, 2008: ECCO2: High resolution global ocean and sea ice data synthesis.

*Mercator Ocean Quarterly Newsletter*, No. 31, Mercator-Ocean, Ramonville-Saint-Agne, France, 13–21.Molemaker, M. J., , and J. C. McWilliams, 2010: Local balance and cross-scale flux of available potential energy.

,*J. Fluid Mech.***645**, 295–314, doi:10.1017/S0022112009992643.Orsi, A., , G. Johnson, , and J. Bullister, 1999: Circulation, mixing, and production of Antarctic Bottom Water.

,*Prog. Oceanogr.***43**, 55–109, doi:10.1016/S0079-6611(99)00004-X.Pedlosky, J., 1987:

*Geophysical Fluid Dynamics*. 2nd ed. Springer-Verlag, 710 pp.Reid, R., , B. Elliott, , and D. Olson, 1981: Available potential energy: A clarification.

,*J. Phys. Oceanogr.***11**, 15–29, doi:10.1175/1520-0485(1981)011<0015:APEAC>2.0.CO;2.Rintoul, S., , C. Hughes, , and D. Olbers, 2001: The Antarctic Circumpolar Current system.

*Ocean Circulation and Climate*, G. Siedler, J. Church, and J. Gould, Eds., Academic Press, 271–302.Roullet, G., , and P. Klein, 2009: Available potential energy diagnosis in a direct numerical simulation of rotating stratified turbulence.

,*J. Fluid Mech.***624**, 45–55, doi:10.1017/S0022112008004473.Roullet, G., , J. C. McWilliams, , X. Capet, , and M. J. Molemaker, 2012: Properties of steady geostrophic turbulence with isopycnal outcropping.

,*J. Phys. Oceanogr.***42**, 18–38, doi:10.1175/JPO-D-11-09.1.Roullet, G., , X. Capet, , and G. Maze, 2014: Global interior eddy available potential energy diagnosed from Argo floats.

,*Geophys. Res. Lett.***41**, 1651–1656, doi:10.1002/2013GL059004.Saenz, J. A., , R. Tailleux, , E. D. Butler, , G. O. Hughes, , and K. Oliver, 2015: Estimating Lorenz’s reference state in an ocean with a nonlinear equation of state.

,*J. Phys. Oceanogr.***45**, 1242–1257, doi:10.1175/JPO-D-14-0105.1.Sallée, J., , K. Speer, , R. Morrow, , and R. Lumpkin, 2008: An estimate of Lagrangian eddy statistics and diffusion in the mixed layer of the Southern Ocean.

,*J. Mar. Res.***66**, 441–463, doi:10.1357/002224008787157458.Scotti, A., , and B. White, 2014: Diagnosing mixing in stratified turbulent flows with a locally defined available potential energy.

,*J. Fluid Mech.***740**, 114–135, doi:10.1017/jfm.2013.643.Stewart, A. L., , and A. F. Thompson, 2013: Connecting Antarctic cross-slope exchange with Southern Ocean overturning.

,*J. Phys. Oceanogr.***43**, 1453–1471, doi:10.1175/JPO-D-12-0205.1.Su, Z., , A. Stewart, , and A. Thompson, 2014: An idealized model of Weddell Gyre export variability.

,*J. Phys. Oceanogr.***44**, 1671–1688, doi:10.1175/JPO-D-13-0263.1.Su, Z., , A. P. Ingersoll, , A. Stewart, , and A. Thompson, 2016a: Ocean convective available potential energy. Part I: Concept and calculation.

,*J. Phys. Oceanogr.***46**, 1081–1096, doi:10.1175/JPO-D-14-0155.1.Su, Z., , A. P. Ingersoll, , A. Stewart, , and A. Thompson, 2016b: Convective available potential energy. Part II: Energetics of thermobaric convection and thermobaric cabbeling.

,*J. Phys. Oceanogr.***46**, 1097–1115, doi:10.1175/JPO-D-14-0156.1.Su, Z., , A. P. Ingersoll, , and F. He, 2016c: On the abruptness of Bølling–Allerød warming.

,*J. Climate***29**, 4965–4975, doi:10.1175/JCLI-D-15-0675.1.Tailleux, R., 2013a: Available potential energy and exergy in stratified fluids.

,*Annu. Rev. Fluid Mech.***45**, 35–58, doi:10.1146/annurev-fluid-011212-140620.Tailleux, R., 2013b: Available potential energy density for a multicomponent Boussinesq fluid with arbitrary nonlinear equation of state.

,*J. Fluid Mech.***735**, 499–518, doi:10.1017/jfm.2013.509.Thompson, A. F., 2010: Jet formation and evolution in baroclinic turbulence with simple topography.

,*J. Phys. Oceanogr.***40**, 257–278, doi:10.1175/2009JPO4218.1.Thompson, A. F., , and J.-B. Sallée, 2012: Jets and topography: Jet transitions and the impact on transport in the Antarctic Circumpolar Current.

,*J. Phys. Oceanogr.***42**, 956–972, doi:10.1175/JPO-D-11-0135.1.Thompson, A. F., , and A. C. Naveira Garabato, 2014: Equilibration of the Antarctic Circumpolar Current by standing meanders.

,*J. Phys. Oceanogr.***44**, 1811–1828, doi:10.1175/JPO-D-13-0163.1.Tseng, Y., , and J. H. Ferziger, 2001: Mixing and available potential energy in stratified flows.

,*Phys. Fluids***13**, 1281–1293, doi:10.1063/1.1358307.Tulloch, R., , J. Marshall, , C. Hill, , and K. S. Smith, 2011: Scales, growth rates, and spectral fluxes of baroclinic instability in the ocean.

,*J. Phys. Oceanogr.***41**, 1057–1076, doi:10.1175/2011JPO4404.1.Vallis, G. K., 2006:

*Atmospheric and Oceanic Fluid Dynamics: Fundamentals and Large-Scale Circulation*. Cambridge University Press, 769 pp.Visbeck, M., , J. Marshall, , T. Haine, , and M. Spall, 1997: Specification of eddy transfer coefficients in coarse-resolution ocean circulation models.

,*J. Phys. Oceanogr.***27**, 381–402, doi:10.1175/1520-0485(1997)027<0381:SOETCI>2.0.CO;2.Williams, R. G., , C. Wilson, , and C. W. Hughes, 2007: Ocean and atmosphere storm tracks: The role of eddy vorticity forcing.

,*J. Phys. Oceanogr.***37**, 2267–2289, doi:10.1175/JPO3120.1.Winters, K. B., , and R. Barkan, 2013: Available potential energy density for Boussinesq fluid flow.

,*J. Fluid Mech.***714**, 476–488, doi:10.1017/jfm.2012.493.Zhai, X., , and D. P. Marshall, 2013: Vertical eddy energy fluxes in the North Atlantic subtropical and subpolar gyres.

,*J. Phys. Oceanogr.***43**, 95–103, doi:10.1175/JPO-D-12-021.1.

^{1}

Our approach of constructing the pressure categories, in which the density and depth are unknown a priori, has strong parallels with constructing a probability density function for potential density in which the pressure levels and depths for each density category are unknown a priori (see Tseng and Ferziger 2001).

^{2}

In the framework of MCF, the flow network of (2) includes one source, one sink, *n* edges representing all parcels, and *s* edges representing Pr_{k} (*k* = 1, 2, . . . , *s*). The *n* arcs from the source to parcel edges all have a capacity of [1, 1] with a zero cost. The *s* arcs from Pr_{k} edges to the sink all have a zero cost with a capacity of [*n*_{k}, *n*_{k}]. The left arcs (totally *n* × *s*) are from the parcel edges (e.g., parcel *i*) to the Pr_{k} edges with a flow of *A* as the total arc number (*A* = *n + s + n* × *s*) and *E* as the total edge number (*E* = 2 + *n* + *s*); the fastest known polynomial MCFA runs in *O*[*A*(log*E*) (*A* + *E* log*E*)] ~ *O*(*A*^{2}) ~ *O*(*n*^{2}*s*^{2}), since *A* ≫ *E*, log*E* < 10, and *A* ~ *ns*. In contrast, the time complexity of LAA is ~*O*(*n*^{3}).

^{3}

For a given dataset, the discrete optimization problems (1) and (2) can be solved by LAA and MCFA, respectively, both with 100% accuracy (Kuhn 1955; Goldberg 1997). Therefore, their solutions for the Lorenz reference state are exactly the same.

^{4}

As shown in our sensitivity study in Fig. 2, using a smaller size as the constraint would consistently decrease the APE density. The first baroclinic radius of deformation is typically smaller than the eddy size (Fig. 12 of Chelton et al. 2011), thus using it rather than the eddy size as the constraint would decrease the APE density.

^{5}

This problem is essentially LA and a special case of MCF. Here, MCFA would exclude all arcs that connect parcel *i* to pressure *P*_{j} if knowing *x*_{i,j} = 0 a priori, which largely reduces computational complexity. In contrast, LAA is extremely slow: *h*_{i,j} is set as an artificially large value to represent *x*_{i,j} = 0 (i.e., too high cost to be a solution). MCFA takes a few hours to obtain the results of Figs. 2b–e, 5b–e, and 6c due to an 18-km grid spacing of ECCO2 dataset, contrasting to the ≥111-km *WOA 2009* grid spacing in section 2.

^{6}

Via baroclinic instability, mean APE is the direct source for eddy APE, while eddy APE is the direct source for EKE (Chen et al. 2014). Thus, mean APE is the indirect source for EKE. Therefore, our defined eddy size–constrained APE, no matter for the time-mean part or for the eddy part, is the direct or indirect source of EKE via baroclinic instability.

^{7}

This ECCO2 dataset of Chen et al. (2014) is essentially the same as our ECCO2 dataset for our Fig. 6, although the former has a lower resolution (3° vs 18 km).