Properties of conditionally filtered equations: Conservation, normal modes, and variational formulation

Conditionally filtered equations have recently been proposed as a basis for modeling the atmospheric boundary layer and convection. Conditional filtering decomposes the fluid into a number of categories or components, such as convective updraughts and the background environment, and derives governing equations for the dynamics of each component. Because of the novelty and unfamiliarity of these equations, it is important to establish some of their physical and mathematical properties and to examine whether their solutions might behave in counterintuitive or even unphysical ways. It is also important to understand the properties of the equations in order to develop suitable numerical solution methods. The conditionally filtered equations are shown to have conservation laws for mass, entropy, momentum or axial angular momentum, energy, and potential vorticity. The normal modes of the conditionally filtered equations include the usual acoustic, inertio‐gravity, and Rossby modes of the standard compressible Euler equations. In addition, the equations support modes with different perturbations in the different fluid components that resemble gravity modes and inertial modes but with zero pressure perturbation. These modes make no contribution to the total filter‐scale fluid motion, and their amplitude diminishes as the filter scale diminishes. Finally, it is shown that the conditionally filtered equations have a natural variational formulation, which can be used as a basis for systematically deriving consistent approximations.


INTRODUCTION
Conditionally filtered equations have recently been proposed as a basis for mathematical and numerical modeling of the atmospheric boundary layer and convection (Thuburn et al., 2018). Conditional filtering itself is an extension of coarse-graining ideas that are commonly used in large-eddy turbulence modeling, which enable one to write down equations of motion valid for a particular scale of motion, with the subgrid-scale terms then appearing on the right-hand side and in need of parameterization -see Leonard (1975), Frisch (1995), and Aluie et al. (2018) for a range of examples. The conditionally filtered equations extend this idea, so that prognostic equations can be constructed for particular fluid types as well as particular scales, for example for different "components" of the fluid, such as convective updraughts, downdraughts, and the background environment. These prognostic equations may then be solved in a numerical model, even when the individual convective updraughts and downdraughts are too small-scale to be resolved.
The conditionally filtered equations provide a natural way of representing qualitatively quite different types of small-scale physical process within the same mathematical framework. For example, local turbulent fluxes might be represented by right-hand side subgrid terms as an eddy diffusion, while fluxes associated with coherent structures such as deep boundary-layer thermals or convective updraughts might be represented by one of the fluid components, the dynamics of which is explicitly represented by the left-hand side terms (see Equations 1-5 and Figure 1 below). By making certain approximations to the conditionally filtered equations and certain choices for the parameterized terms, they can be shown to reduce to a typical mass-flux convection scheme, or to a typical eddy diffusion scheme, coupled to resolved-scale dynamics. Thus, the conditionally filtered equations could provide a useful and self-consistent basis for improving the coupling of different parameterization schemes with each other and with the resolved dynamics, or for building unified parameterization schemes that can transition smoothly between different regimes, for example between a dry convective boundary layer and shallow convection. A particular motivation for us is the possibility of extending the dynamical core of a weather or climate model to solve the left-hand sides of the conditionally filtered equations for all fluid components, thus capturing some of the dynamics of convection explicitly. Ultimately, we wish to explore the potential of this approach to improve some of the well-known modeling problems in convection-dynamics coupling, including memory of the dynamical state of convection, the propagation of convective systems to neighboring grid columns, and the horizontal location of compensating subsidence. These motivations are discussed in more detail by Thuburn et al. (2018).
Similar ideas, leading to prognostic equations for multiple fluid components, may be found in the work of Yano et al. (2010) and Yano (2012), and in the prognostic cloud scheme of Randall and Fowler (1999). The conditionally filtered approach, however, is more systematic and leads to consistent prognostic equations for all the dynamical variables, as well as thermodynamic variables and component volume fractions. Similar equation sets are also used for modeling multiphase flows in engineering applications (e.g. Drew, 1983;Abgrall and Karni, 2001). The conditionally filtered compressible Euler equations are given in section 2 below.
The right-hand sides of the conditionally filtered equations represent a range of important, subgrid-scale physical processes, such as local turbulent fluxes and entrainment and detrainment. The eventual applications envisaged for the conditionally filtered equations will depend critically on the choices made to parameterize these terms. The focus of the present article, however, is on the left-hand sides, which represent a modified form of the resolved-scale dynamics of the compressible Euler equations. Complex models, built from multiple components that are themselves complex, can behave in unexpected and unphysical ways if the individual components are not sufficiently well-understood and well-behaved (see e.g. Gross et al., 2017 for some examples). This motivates us to analyse and document some of the physical and mathematical properties of the conditionally filtered equations when their right-hand sides are zero. We consider this an important preliminary, before attempting to increase the complexity of the system by coupling to parameterized right-hand side terms. It is also important to understand the properties of the equations in order to develop suitable numerical solution methods. This article examines their conservation properties and normal modes, and presents a variational formulation.
Conservation properties are fundamental properties of a physical system, and respecting relevant conservation properties is widely regarded as essential in any mathematical model. Budgets of conserved quantities can help us to understand physical mechanisms (e.g. Hoskins et al., 1985;Peixoto and Oort, 1992;Pauluis and Held, 2002), and respecting conservation properties in numerical models can help to ensure their stability and accuracy (e.g. Thuburn, 2008 and references therein). Section 3 discusses conservation of mass, entropy, momentum, energy, and potential vorticity for the conditionally filtered equations.
The conditionally filtered equations have a rather unusual structure, with separate density, entropy, and velocity fields for each fluid component, but a single common pressure field (section 2). This raises the question of what types of motion the equations might support; these might be counterintuitive or even unphysical. One way to address this question is to examine the normal modes of the linearized equations (e.g. Gill, 1982;Vallis, 2017). This is done for the conditionally filtered equations in section 4. Normal modes can also give useful insight in the development of numerical solution methods, including the choice of grid staggering to best capture mode structures (Arakawa and Lamb, 1977;Thuburn et al., 2002), identification of modes that might be most challenging for a numerical method, identification of computational modes, and understanding the structure of the Helmholtz problem that arises for implicit time integration schemes. They are also valuable as test cases for numerical models (e.g. Baldauf and Brdar, 2013;Shamir and Paldor, 2016).
A variational formulation of fluid dynamical equations can be useful in several ways. The conservation properties of the system can be related to certain symmetries of the Lagrangian (e.g. Salmon, 1998). Approximate versions of the governing equations, for example hydrostatic, pseudo-incompressible, or Boussinesq, can be derived in a systematic way by approximating the Lagrangian and the conservation properties will be preserved by the approximation provided the corresponding symmetries are preserved (e.g. Cotter and Holm, 2014;Dubos and Voitus, 2014;Staniforth, 2014;Tort and Dubos, 2014). Such approximate versions of the governing equations might be useful for more idealized modeling or as the basis for simple theoretical models. Section 5 confirms that the conditionally filtered compressible Euler equations can be obtained from a variational formulation.

GOVERNING EQUATIONS
As in the derivation of the coarse-grained equations used in large-eddy simulation (LES), conditional filtering makes use of an Eulerian spatial filter that retains only the flow variations on scales larger than some filter scale. However, in addition to the filter it also employs a set of quasi-Lagrangian labels I i , i = 1, … , n; at any point in the fluid, exactly one of the I i is equal to 1 and the rest are equal to 0. In the proposed application, it is envisaged that the labels might be used to pick out coherent structures in the flow, such as convective updraughts and downdraughts and their environment. This quasi-Lagrangian labeling of fluid parcels is intended to capture, in mathematical form, some of the intuitive ideas behind the way we think about coherent structures such as cumulus clouds. For example, we typically think of an air parcel as retaining its identity as a cloud parcel over some time period until physical processes such mixing and evaporation change its physical properties, at which point it may be relabeled as an environment parcel.
To proceed, the fluid dynamical equations are multiplied by each I i before applying the spatial filter. This then leads to a set of equations of motion for each fluid component i. When the starting equations are the dry non-hydrostatic compressible Euler equations, the resulting conditionally filtered equations are the following (Thuburn et al., 2018): Here i , i , i , and u i are the volume fraction, density, specific entropy, and velocity, respectively, of the ith fluid component on the filter scale, p is the filter-scale pressure, and Φ is the geopotential. See Figure 1 for a schematic illustration of the meaning of the conditionally filtered fields. Equation 1 expresses the fact that the volume fractions must sum to one, Equation 2 expresses mass conservation, Equation 3 entropy conservation, and Equation 4 momentum conservation, while Equation 5 is a generic form for the equation of state relating pressure to entropy and density. For simplicity, the Coriolis terms associated with planetary rotation have been neglected here. However, it is straightforward to reintroduce them and we do so for the purpose of section 4 below. The right-hand sides of the above equations allow for the possibility that fluid parcels may be relabeled as the flow evolves; this could represent processes such as entrainment and detrainment of fluid between convective updraughts and their environment. Thus, for example,  ij is the rate per unit volume at which mass is relabeled from type j to type i, and̂i j andû ij are representative values of specific entropy and velocity for that relabeled fluid. If the fluid labels I i were exactly materially conserved, then the relabeling terms  ij would vanish. Note also that the time over which a parcel keeps a recognizable identity is much longer than a model time step-the lifetimes of small individual clouds are of the order of several minutes, but in a model approaching cloud resolution the time step is measured in seconds. In a climate model, the time step might be of order tens of minutes, but the cloud populations at that resolution last for the order of hours. Relabeling, and its relation to physical processes such as evaporation and mixing, is discussed further by Thuburn et al. (2018).
As in the equations of LES, subfilter-scale variability contributes to the filter-scale behavior. Here F i SF is a subfilter-scale flux of entropy, F u i SF is a subfilter-scale momentum flux tensor, and P i SF accounts for variations in pressure between the fluid components, as well as effects of filtering a nonlinear equation of state. The right-hand sides cannot be derived from the equations of motion; rather, they must be parameterized, as must terms representing similar processes in, for example, a mass-flux scheme.
Note that the same filter-scale pressure p appears in the pressure-gradient term on the left-hand side of the momentum equation 4 for every i. This is a similar assumption to that made in conventional parcel arguments, where it is assumed that the parcel takes on the pressure of the environment (e.g. Bohren and Albrecht, 1998). The assumption may be justified by noting that (in most convective circumstances) the acoustic adjustment time-the time required for an acoustic wave to propagate the width of a cloud and so remove unbalanced pressure fluctuations-is short compared with the time-scales of interest. Thus, acoustic oscillations will very quickly equilibrate the pressure between components, and by making the equal-pressure assumption we are supposing this adjustment to take place instantaneously. A consequence of the assumption is that the equations do not support those acoustic modes for which fluid component i has a different pressure from fluid component j ≠ i (see also section 4). These acoustic modes would, in any case, have very small amplitude, and resolving them explicitly would present unnecessary difficulties for numerical solution methods, with no gain in accuracy. In the Boussinesq and anelastic approximations, acoustic modes are eliminated ab initio because the speed of sound is taken to be infinite. The acoustic adjustment between different fluid components then occurs instantaneously, and the assumption of the same filter-scale pressure is a very natural one.
In a convecting fluid, the pressure gradient is not, in fact, homogeneous on the scale of the convective updraughts, and rising thermals experience a significant drag due to pressure variations on the scale of the thermal (e.g. Romps and Charn, 2015). These pressure variations do not represent acoustic waves; they are present in Boussinesq and anelastic numerical simulations. In the conditionally filtered equations, the fact that the net pressure gradient experienced by fluid i departs from p is accounted for by the terms (−b i − ∑ j d ij ) on the right-hand side. In particular, d ij is minus the pressure drag exerted by fluid j on fluid i. These terms have the properties that and These terms are not predicted by the conditionally filtered equations and so, in general, must be parameterized, just as the analogous terms are parameterized in typical mass-flux convection schemes (e.g. de Roode et al., 2012 and references therein). In this article, we will be concerned mainly with the left-hand sides of the conditionally filtered equations, so we will often neglect these terms, along with the other right-hand side terms.
It may be useful to note how the conditionally filtered Equations 1-5 are related to the usual filtered single-fluid equations. The conditionally filtered equations reduce to the usual filtered single-fluid equations simply by setting the number of fluid components n to 1; in that case, the fluid relabeling terms  ij and the terms representing pressure forces between fluid components b i and d ij all vanish, and 1 ≡ 1. Thuburn et al. (2018) also show that the usual filtered single-fluid equations are obtained by summing the conditionally filtered equations over all fluid components i. Note also that, although the left-hand sides of Equations 2-4 are written here in Eulerian flux form, this is not a requirement; it is straightforward to convert them to Lagrangian form, as we do, for example, in Equations 18 and 24 below.
In the absence of the right-hand sides, Equations 1-5 form a closed system (see below). All of the right-hand side terms, on the other hand, must be modelled or parameterized by making some additional assumptions. The present article focuses mainly on the properties of the equations in the absence of the parameterized terms, whereupon they reduce to where Equation 8 is the same as Equation 1 but is included for completeness.
In the case of a single fluid component n = 1, Equations 8-12 reduce to the usual non-hydrostatic compressible Euler equations. For n > 1, the equations for different i are coupled by the common pressure-gradient term p and the requirement Equation 8 (these two points are related-see section 5). Also, for n > 1, it is not immediately obvious that Equations 8-12 form a closed system. It can be confirmed, simply by counting, that the number of equations is equal to the number of unknowns. Appendix A outlines how the given equations imply the time evolution of i , i , and p and how they allow p to be diagnosed. For the linearized version of these equations, the fact that a dispersion relation can be derived (section 4) provides further confirmation that they form a closed system.
A potentially useful variant of the conditionally filtered equations, mentioned by Thuburn et al. (2018), is one in which all fluid components are constrained to have identical horizontal velocity: In this variant, the horizontal components of the interfluid pressure forces b i + ∑ j d ij are assumed to be just what is required to maintain the equality of the v i . The ansatz that the horizontal velocities are all the same is an additional physical assumption that may be useful in some circumstances, but it is not demanded by the mathematical structure of the equations. Making this assumption does not change the vertical part of 4, namely where subscript z indicates a vertical derivative and superscript (z) indicates a vertical component. However, the horizontal part is replaced by the sum over all fluid components, where H is the horizontal part of the gradient, 1 The notation X to indicate a filtered value of X and X * to indicate a density-weighted filtered value, so that X * = X, is retained for consistency with Thuburn et al. (2018).
is the total filter-scale density, and u * is the density-weighted filter-scale velocity, given by The b and d terms have cancelled in Equation 14 because of Equations 6 and 7, while the relabeling terms also cancel when summed over i and j. Appendix B summarizes how the main results of the article carry over to this equal-v i variant.

CONSERVATION PROPERTIES
This section examines the conservation properties of the conditionally filtered equations. We focus on the compressible Euler equations, but similar derivations may be carried out for other, approximate, governing equation sets such as hydrostatic, pseudo-incompressible, or Boussinesq equations.

Mass
Equation 9 is manifestly in the form of a conservation law for the mass of the ith fluid component. If there is no mass flux across domain boundaries, then it implies that the mass of each fluid component is individually conserved, and hence that their sum, the total fluid mass, is also conserved. If relabeling terms are reintroduced, Equations 9 becomes Equation 2. Then the mass of each fluid component is no longer conserved. However, summing Equation 2 over i and noting that the relabeling terms then cancel (because they are relabeling terms) gives with and u * given by Equations 15 and 16. Thus the total fluid mass is conserved even when relabeling terms are included.

Entropy
Equation 10 is manifestly in the form of a conservation law for the entropy of the ith fluid component. If there is no entropy flux across domain boundaries, then it implies that the entropy of each fluid component is individually conserved, and hence that their sum, the total fluid entropy, is also conserved. Subtracting i times Equation 9 from Equation 10 gives This shows that i is materially conserved following fluid parcels that move with velocity u i . If the subfilter-scale flux term ⋅F i SF is included in Equation 10, then the equation is still in the form of a flux-form conservation law, so the entropy of each fluid component is still conserved in an integral sense, though it is no longer materially conserved. If, in addition, the relabeling terms are included to give Equation 3, then the entropy of each fluid component is no longer conserved. However, summing Equation 3 over i and noting the canceling of the relabeling terms shows that where the total filter-scale specific entropy of the fluid * is given by and the total entropy flux is given by Analogous results would hold for any function of entropy, for example potential temperature , and also for any materially conserved scalar such as specific humidity in the absence of precipitation or a chemical tracer mixing ratio. Note that the derivation of Equation 3 neglects sources of entropy due to diabatic heating and also those due to mixing and other irreversible processes. In realistic flows, such sources are often not negligible (Pauluis and Held, 2002;Raymond, 2013), so a comprehensive model would need to take them into account.

Momentum
The geopotential gradient Φ provides an external force and hence an external source of momentum. Even if this term is ignored for the moment, Equation 11 does not conserve the momentum of the ith fluid component, because the i p term is not in conservation form. However, the i p term does represent a conservative exchange of momentum between different fluid components, as do the b i , d ij , and relabeling terms. This can be seen by summing Equation 4 over i and using Equations 6 and 7 to obtain where u * is given by Equation 16 and is the total momentum flux tensor, with I the identity matrix. Thus, the total fluid momentum is conserved except for the effect of the external force.
If the Coriolis terms are reintroduced for a rotating planet, then the relevant conserved quantity is the axial angular momentum. The axial angular momentum of the ith fluid is not conserved, but it is straightforward to verify that the p, b i , d ij , and relabeling terms all describe conservative transfers between fluid components and the total axial angular momentum is conserved.

Energy
In this subsection we ignore the subfilter-scale flux terms and the relabeling terms; in general, they do not conserve the energy of the filter-scale flow. For the moment, the b i and d ij terms are retained. Subtracting u i times Equation 9 from Equation 4 and neglecting F u i SF and  ij gives the advective form of the momentum equation: Taking the dot product of u i with Equation 24 gives .
(25) Next, defining e i ( i , i ) to be the specific internal energy of fluid component i, Noting that and using Equation 9 to obtain the material derivative of i , and Equation 18 for the material derivative of i , Equation 26 becomes Adding this result to Equation 25 gives is the total filter-scale energy per unit mass of the ith fluid component. Finally, adding i times Equation 9 to Equation 30 gives .
The quantity i i i is the contribution from the ith fluid component to the total filter-scale energy density. In general, it is not conserved. The term p i ∕ t represents a conservative exchange of energy between fluid components, since j d ij will typically tend to reduce differences between the u i ; they thus represent a sink of filter-scale energy and a transfer to subfilter scales. If the b i + ∑ j d ij terms can be ignored, then summing Equation 32 over i shows that the total filter-scale energy is conserved:

Potential vorticity
Using standard vector calculus identities, the advective form of the momentum equation 24 may be written in so-called vector-invariant form: For now, suppose the right-hand side can be neglected. Taking the curl and using further vector calculus identities gives the vorticity equation for the ith fluid component: Rewriting Equation 9 in the form allows the velocity divergence term to be eliminated: Now consider a scalar that is materially conserved following the velocity field u i , i.e. D i ∕Dt = 0. Taking the gradient, expanding, and rearranging gives If we construct the quantity and use the product rule to evaluate its material derivative, we obtain If is chosen to be the specific entropy i , or any function of the specific entropy, such as the potential temperature (Π i is then the potential vorticity of the ith fluid), then can be expressed as a function of i and p, at every point is a linear combination of i and p, and so the scalar triple product term in Equation 40 vanishes, leaving Thus the potential vorticity of the ith fluid component is materially conserved following u i . This derivation closely parallels the standard textbook derivation of potential vorticity conservation for a single-component fluid (e.g. Vallis, 2017). A notable difference is the appearance of i as well as i in the denominator of Equation 39.
If the b i + ∑ j d ij terms cannot be neglected. then they may be carried through the derivation to appear as source terms in Equation 41. The potential vorticity of the ith fluid component is then no longer materially conserved. Haynes and McIntyre (1987) showed that potential vorticity satisfies a flux-form conservation law even in the presence of diabatic heating and frictional forces. They also proved the impermeability theorem, that there is no net flux of potential vorticity across an isentropic surface. These results are purely kinematic (Bretherton and Schär, 1993;Vallis, 2017); they do not depend on the governing dynamical equations, only on the definition of potential vorticity and the fact that the vorticity is the curl of a vector and hence divergence-free. It comes as no surprise, then, that the conservation law and impermeability theorem generalize straightforwardly to the conditionally filtered equations, as follows.
The conservation law is obtained from Equation 39, setting = i and using ⋅ i = 0, Taking the time derivative then gives where The time derivative in the expression for  i can be removed using the prognostic equations for i and i (including diabatic heating and friction, if present). Note also that the flux is not unique; any divergence-free vector may be added to  i , leaving the conservation law intact.
Next consider the integral of potential vorticity within a volume bounded by an isentropic surface, i.e. a surface of constant i . For example, this surface might envelope the Earth.
where the last integral is the area integral of the outward normal component of i i over the boundary of the original volume. Since i is constant on this boundary, it can be brought outside the integral: Similarly, the integral of potential vorticity within a volume bounded by a pair of isentropic surfaces must also vanish. Finally, consider the integral of potential vorticity within a volume that is bounded in part by an isentropic surface A on which i = ( Thus the integral of potential vorticity within the volume, and therefore its rate of change, depends only on contributions from surface B; there is no contribution from surface A. In summary, for the conditionally filtered equations, the potential vorticity of each fluid component i satisfies a flux-form conservation law and the impermeability theorem.

NORMAL MODES
In this section, we focus mainly on the case of two-fluid components. The case of more fluid components is discussed briefly at the end. To analyse the normal modes, all of the right-hand side terms in Equations 2-5 are neglected, so the starting point is Equations 8-12. For simplicity, planar geometry is assumed and the equations are written in Cartesian coordinates. However, Coriolis terms are reintroduced, with a linear dependence of the Coriolis parameter on the northward coordinate y, i.e. we use a -plane, because the Coriolis terms and -effect are crucial to the dynamics of the normal modes. Small perturbations to a basic state are considered. The basic state (indicated by superscript (r)) is at rest and in hydrostatic balance, and the basic state thermodynamic quantities (r) , (r) , p (r) are identical for the two-fluid components, though their volume fractions (r) 1 , (r) 2 might be different. Basic-state quantities are functions of the vertical coordinate z only.
Equations 8-12 are linearized about the basic state and wavelike solutions proportional to exp{i(kx + ly − t)} are sought, where k, l are the horizontal components of the wave vector and is the frequency. The -effect is included, while still permitting such wavelike solutions, following the approximation made by Thuburn and Woollings (2005). Including the -effect is useful for identifying the Rossby modes and distinguishing them from any zero-frequency modes.
The resulting linearized equations are ) Here, i , i , i , and p are now the perturbations to volume fraction, density, specific entropy, and pressure, respectively, and u i , v i , w i are the velocity perturbation components. f is a mean Coriolis parameter and is the northward gradient of the Coriolis parameter, both taken as constant. The gravitational acceleration g is minus the vertical component of Φ = (0, 0, −g). Subscript z indicates a vertical derivative. The modified frequencỹis given bỹ= where K 2 = k 2 + l 2 . The linearized equation of state 54 has been obtained by writing = (p, ) and considering small perturbations to the reference state; the quantity Q is given by while is the sound speed squared in the reference state. An equation for a single unknown perturbation field, in this case p, is derived by systematically eliminating the other unknowns. First use Equation 50 to eliminate i from 54: where the buoyancy frequency squared N 2 for a general equation of state is given by Also, combining Equations 51 and 52 gives Using Equation 58 to eliminate i gives Now u i , v i , and w i may be eliminated using Equations 61, 62, and 60, giving an equation in the single unknown p: This equation can be simplified by noting that ∑ i (r) For a general equation of state and for arbitrary basic state profiles, Equation 66 could be solved numerically. Normal modes can be obtained analytically if a perfect gas equation of state is assumed, the basic state is assumed to be isothermal, and g is taken to be constant. In that case, c 2 and N 2 are constant, and so is the density scale height H, which is given by 1 Then Equation 66 is a constant coefficient equation for p. The solutions have a simpler structure when expressed in terms of a rescaled variable, Equation 66 then reduces to ( where the inverse length-scale Γ is given by

Single-fluid-equivalent modes
Equation 69  and canceling q gives the dispersion relation, relating to k, l and m: It is clear that Equation 71 is a quintic equation for , and it is easily confirmed that it is identical to the dispersion relation obtained by Thuburn and Woollings (2005) for the single-fluid-component compressible Euler equations. The five roots for for any given (k, l, m) correspond to five branches of normal modes: eastward-and westward-propagating acoustic modes, eastward-and westward-propagating inertio-gravity modes, and westward-propagating Rossby modes.
To examine the structure of these normal modes, note that Equations 60-62 imply (u 1 , v 1 , w 1 ) = (u 2 , v 2 , w 2 ). (It has been assumed here that 2 ≠ N 2 and̃2 ≠ f 2 , but it can be confirmed that such values of are not solutions of Equation 71, except for very special and unrealistic parameter values.) It then follows from Equations 50 and 54 that 1 = 2 and 1 = 2 , while Equation 49 implies that that 1 and 2 are determined simply by vertical advection of the background values (r) 1 and (r) 2 . Thus, these normal modes have identical perturbations in the two-fluid components. Their structure, as well as their frequency, is exactly that of the normal modes for the single-fluid-component compressible Euler equations. In other words, the single-fluid normal modes are a subset of the two-fluid normal modes.
The single-fluid compressible Euler equations also support external modes, with zero vertical velocity and entropy perturbation (assuming a rigid-lid upper boundary condition) and exponential profiles of the other perturbation variables. Seeking such modes in the two-fluid case, only the first line is retained on the left-hand sides of Equations 64, 65, 66, and 69, and the dispersion relation becomes This is a cubic equation for , giving three branches of normal modes: eastward and westward external acoustic modes, and westward external Rossby modes. Again, the frequencies are identical to those in the single-fluid case, and the mode structures are identical in the two-fluid components, so again the single-fluid normal modes are a subset of the two-fluid normal modes. In order to obtain Equation 71 from Equation 69, it was assumed that q was non-zero in order to cancel q. Another way to satisfy Equation 69 is for q to be identically zero. There are then three ways to obtain non-trivial solutions.

Two-fluid gravity modes
To have zero p but non-zero vertical velocity, Equation 60 implies that 2 = N 2 . Equations 61 and 62 then imply that u i = v i = 0; the motion is purely vertical. From Equations 58 and 54, the entropy and density perturbations are related to the vertical velocity perturbation by Equation 64 reduces to The bottom boundary condition implies  for i in Equation 49 gives the volume-fraction perturbations in terms of w i : The essential dynamics of these motions involves the coupling of vertical velocity with buoyancy perturbations, and their structure and frequency are reminiscent of deep internal gravity waves. This justifies our classification of them as two-fluid gravity modes. At the same time, there are some important differences from fully resolved gravity modes of the single-fluid equations. For example, because the pressure and horizontal velocity perturbations vanish, there is no horizontal coupling. The frequency of these motions is independent of their vertical structure. Therefore, there is no unique way to define a set of vertical normal modes. A convenient choice is w 1 ∝ ( (r) 2 ∕ (r) 1 (r) ) 1∕2 exp{imz}, and so forth. This choice ensures that the modes for different m are indeed mutually orthogonal (i.e. normal) with respect to the energy of the linearized equations: and it allows us to discuss the vertical wavenumber m. [The expression Equation 77 reduces to that given by, for example, Phillips (1990) and Thuburn et al. (2002) in the case of a single fluid component.] For any given (k, l, m), there are two possible frequencies, = ±N, giving two branches to the dispersion relation. Although the structures and frequencies of these modes resemble those of deep internal gravity modes in some respects, these features hold for all m, including large m, so the mode structures do not, in fact, have to be deep.
Finally, since the frequency of these modes is independent of k, l, and m, their group velocity is identically zero. They propagate neither horizontally nor vertically.

Two-fluid inertial modes
To have zero p with non-zero horizontal velocity, Equations 61 and 62 imply that̃2 = f 2 , i.e. = ±f − k ∕K 2 . Equation 60 then implies that w i = 0, and hence i = 0 and i = 0.

Either Equation 51 or Equation 52 shows that
from which it follows that the horizontal divergence, is in quadrature with the vertical component of vorticity, i u i vanishes everywhere. The essential dynamics of these motions involves the coupling between u and v via the Coriolis term, and they have structure and frequency resembling inertial modes, but with compensating horizontal mass fluxes in the two-fluid components, rather than in layers at nearby heights. Hence we classify them as two-fluid inertial modes. As for the two-fluid gravity modes, the pressure perturbation vanishes, but now there is the possibility for horizontal coupling through horizontal advection.
As for the two-fluid gravity modes, the frequency of these motions is independent of their vertical structure. Again, there is no unique way to define a set of vertical normal mode structures, but a convenient choice is u 1 ∝ ( (r) 2 ∕ (r) 1 (r) ) 1∕2 exp{imz}, and so forth, so that the modes for different m are orthogonal with respect to Equation 77.
For any given (k, l, m), there are two branches of these normal modes, with frequencies = ±f − k∕K 2 . The frequency is independent of m, so their vertical group velocity is zero. Their horizontal group velocity is small but non-zero, similar to that of barotropic Rossby waves.

Relabeling modes
One further branch of modes is possible, in which u i , v i , w i , i , i , and p all vanish. The frequency is zero, but the volume-fraction perturbations are non-zero and satisfy These represent modes in which some fluid has been relabeled, but the physical state of the system is identical to the basic state. The energy perturbation Equation 77 vanishes for these modes.

Normal modes for n > 2 fluid components
The normal modes for the two-fluid case discussed above generalize in a straightforward way to the case of any number n of fluid components. The derivation of Equation 71 carries through exactly as before, so we have the same branches of single-fluid-equivalent modes: eastwardand westward-propagating acoustic modes, eastwardand westward-propagating inertio-gravity modes, and westward-propagating Rossby modes. As before, i , i , and u i are all indedependent of i. The two branches of two-fluid gravity modes become 2(n − 1) branches of multi-fluid gravity modes. They all have u i and v i identically zero, and satisfy ∑ i (r) i (r) w i = 0. One way to confirm the number of branches is to note that, for = ±N (hence the factor 2), and for any vertical profile w 1 (z), there are n − 1 linearly independent modes with (r) 1 w 1 + (r) i w i = 0 and w j = 0 when j ≠ i, for i = 2, … , n. If an orthogonal set of modes is needed, then this can be obtained (non-uniquely) by writing the vertical velocity of the jth mode as where and a (j) As before, all of these modes have zero group velocity.
In an analogous way, the two branches of two-fluid inertial modes become 2(n − 1) branches of multi-fluid inertial modes. They all have i , i , and w i identically zero, and satisfy ∑ i (r) i u i = 0. An orthogonal set of modes is obtained by defining the u i for the jth mode as and so forth, with f (m) (z) and a (j) i as above. As before, all these modes have zero vertical group velocity.
Finally, the branch of two-fluid relabeling modes becomes n − 1 branches of multi-fluid relabeling modes.

Normal modes in the Boussinesq equations
To interpret the normal modes, it is helpful to consider the two-fluid Boussinesq equations. These equations eliminate acoustic modes ab initio, and if we restrict attention further to the f -plane, we expose the physically new modes of the system more transparently. Allowing density to vary only in terms associated with gravity, the Boussinesq versions of Equations 8-12 are given by the following, now including the Coriolis term: Volume fractions must sum to unity: Mass or volume conservation: Momentum equation: Buoyancy conservation: where k is the unit vector in the vertical, is the deviation of the kinematic filter-scale pressure (p∕ 0 ) from a hydrostatic reference state, and b i is the buoyancy of the ith component.
If we take f to be a constant and linearize these equations around a state of rest of given basic-state volume fractions (r) i and constant stratification N 2 , we obtain the following: Perturbation volume fractions sum to zero: Mass conservation: The are now all perturbation quantities. Eliminating b i from the buoyancy and vertical momentum equations gives The two horizontal momentum equations may be written as If the pressure perturbation is non-zero, then these equations reduce to This is just the standard dispersion relation for an inertio-gravity wave (e.g., Vallis, 2017 chapter 7). If the pressure perturbation is zero, then, using Equations 97 and 98, we find the additional two-fluid modes, and 2 = f 2 , w i = 0.
(101) These modes are gravity-wave modes and inertial modes, respectively. They are similar to their one-fluid counterparts, but they obey an additional constraint that arises from Equations 91 and 92, namely ∑ i (r) The gravity and inertial waves must then obey, respectively, and 1 (ku 1 + lv 1 ) = − (r) 2 (ku 2 + lv 2 ).
The two-fluid gravity-wave mode, Equation 103, is of particular note. Since (r) i is positive for all i, the mode represents ascending motion by one fluid and descending motion by the other fluid. (The mode is, of course, present in the fully compressible equations, but in the Boussinesq derivation it is seen most plainly.) It is not an unphysical mode, since the conditionally filtered equations represent motion on a large scale. Rather, within that large scale there is an oscillation consisting of ascent of one fluid component and descent of the other. It may be the most important new mode introduced by conditional filtering, since subfilter-scale buoyancy-driven motions such as cumulus convection will project strongly on to this mode.

Behavior in the limit of short filter scale
One of the motivations for the introduction of the conditionally filtered equations was the desire to formulate a mathematical framework that could represent cumulus convection in both the unresolved case, where the scale of convection is much smaller than the filter scale, and the resolved case, where the scale of convection is greater than the filter scale, with the potential to be able to work also for intermediate cases in the so-called "grey zone". Since the usual single-fluid equations are able to represent convection in the resolved case, a desirable property of the conditionally filtered equations is that their behavior should reduce smoothly to that of the single-fluid equations as the filter scale is reduced. Among other things, this will require the parameterized relabeling terms and interfluid pressure forces to behave appropriately in the limit of short filter scale. Here we focus on the behavior of the normal modes.
In the limit of short filter scale, it is desirable that the flow field u should be represented more and more completely by the mean filter-scale field u * . That is, u should project more and more on to the single-fluid-equivalent normal modes, with the multi-fluid normal modes as well as the subfilter-scale contributions becoming less significant. Let us examine this behavior in the simplest possible scenario. Consider a field w that is a function only of x, such as that illustrated in Figure 1, and suppose that there are two Lagrangian labels I 1 and I 2 , which pick out updraughts and environment, respectively. For simplicity, take the density to be constant, so that it can be ignored in the rest of this subsection. Using the normal mode structures for gravity modes discussed above, at each point x the filter-scale vertical mass fluxes (r) 1 w 1 and (r) 2 w 2 can be projected on to the single-fluid-equivalent and two-fluid modes: where A 1 is the amplitude of the single-fluid-equivalent mode and A 2 is the amplitude of the two-fluid mode. Solving for A 1 and A 2 gives A 1 = (r) 1 w 1 + (r) 2 w 2 (106) and We consider the behavior of this decomposition as the filter scale approaches zero, holding the field w(x) and the labels I 1 (x) and I 2 (x) fixed. The amplitude of the single-fluid-equivalent mode A 1 is just the total mass-weighted filter-scale velocity w * . It will approach w in the limit of short filter scale, as it would in the usual unconditionally filtered equations. The amplitude of the two-fluid mode A 2 , on the other hand, depends on (r) 1 and (r) 2 . Since i will approach I i as the filter scale diminishes. Thus, at almost every point in the domain either (r) 1 or (r) 2 will approach zero. (There will be exceptions at those points where the I i switch between zero and one.) If the filter kernel is non-zero only over a finite range, which shrinks with the filter scale, then (r) 1 will become equal to zero when there are no points with I 1 = 1 within range of the filter, and similarly for (r) 2 . In this way, the amplitude A 2 will approach zero, or actually become zero, at almost every point in the fluid as the filter scale tends to zero.
Thus, as desired, the representation of the complete flow field by the conditionally filtered equations converges to its representation by the single-fluid or unconditionally filtered equations, and the contribution from multi-fluid modes tends to zero as the filter scale tends to zero. Table 1 summarizes the normal modes of the conditionally filtered equations. It is notable that the only acoustic modes are the single-fluid-equivalent acoustic modes. This is expected, since all fluid components have the same pressure, and, as mentioned in the Introduction, this is a desirable feature of the conditionally filtered equations. The table also shows that the effect of constraining the horizontal velocities of different fluid components to be equal is to remove the multi-fluid inertial modes; the other modes are unchanged. See Appendix B for a brief discussion.

VARIATIONAL FORMULATION
Hamilton's principle expresses the equations of motion as the stationarity of the action under arbitrary small variations of some state variables X, where the action  is the integral of the Lagrangian density Multi-fluid gravity Deep gravity waves 2(n − 1) 2(n − 1) 2(n − 1) Multi-fluid inertial Inertial waves 2(n − 1) 0 2 (n − 1) Multi-fluid relabeling (n − 1) (n − 1) (n − 1) Total number of branches 5n 3n + 2 5 n − 2 L(X) over space and time: The Lagrangian density is essentially the kinetic energy density minus the potential and internal energy density, but there are different flavours of the idea depending on whether an Eulerian or Lagrangian description of the fluid motion is of interest, and whether constraints such as conservation of mass are imposed through restricting the allowed perturbations X or through Lagrange multipliers in Equation 108 (e.g. Salmon, 1998).
In this section, we focus on an Eulerian description of the fluid motion, following chapter 7, section 8 of Salmon (1998). As we would for a single fluid, we impose conservation of mass, and also material conservation of entropy and material conservation of another Lagrangian label, via Lagrange multipliers, for each fluid component i. (See Salmon, 1998 for a discussion of how the extra Lagrangian label relates to Lin's constraint.) Equality of the pressures in the different fluid components and the requirement for the volume fractions to sum to unity are also imposed through Lagrange multipliers. Hence the appropriate expression for  is Here, i is the Lagrange multiplier associated with conservation of mass of the ith fluid, A i is the Lagrange multiplier associated with material conservation of i , i is a Lagrangian label for the ith fluid and C i is the Lagrange multiplier associated with material conservation of i , the i are a set of Lagrange multipliers associated with the equality of pressure in the different fluid components, and is the Lagrange multiplier associated with the volume fractions summing to unity.
The pressure p i is related to the internal energy density e i by Hamilton's principle now states that  = 0 for arbitrary, independent, small variations of and . Boundary conditions (in space and time) are assumed to be such that any boundary terms arising through integration by parts vanish. For variations in , thus the pressures in all the fluid components take the same value, which we can call p for consistency with the earlier notation. For variations in A i and C i ,  = 0 implies consistent with Equation 18, and For variations in i ,  = 0 implies, after integration by parts, consistent with Equation 9. For variations in i and in i , and Thus p is the Lagrange multiplier corresponding to the requirement for the volume fractions to sum to unity. This is reflected in the fact that the volume fractions summing to unity is crucial for determining p; see Equation A7. This result is analogous to the well-known interpretation of pressure as the Lagrange multiplier corresponding to the incompressibility condition for an incompressible fluid. For variations in i and i ,  = 0 implies, after integration by parts, and where is the temperature of the ith fluid. Finally, for variations in u i , To obtain the equations of motion, we systematically eliminate the remaining Lagrange multipliers and the materially conserved scalars i . Taking Equation 120 minus A i times Equation 116 gives while Equation 121 minus C i times Equation 116 gives Taking ∕ t of 123 gives Taking the curl of Equation 123 gives so that Hence, Equation 128 simplifies to Finally, noting that ( Equation 131 reduces to which agrees with Equation 34 in the absence of its right-hand side.

SUMMARY AND DISCUSSION
We have documented the conservation properties, normal modes, and a variational formulation of the conditionally filtered equations. The results confirm that these equations have a natural mathematical structure, respecting key physical properties, lending them some credibility for their use in modeling atmospheric flows. In particular, the normal mode results, with real frequency provided N 2 > 0, imply that the equations are free from spurious unphysical instabilities, at least for small perturbations to a simple basic state. Furthermore, the modes themselves have a sensible physical interpretation. The usual Rossby, inertio-gravity and acoustic modes exist and have the same frequency and structure as in the single-fluid case. In addition, we have identified inertia and gravity modes with zero pressure perturbation in which the fluid components move separately, and in general in opposite vertical and horizontal directions. This is precisely a property one might wish for when modeling subgrid-scale convection, in which some of the subgrid-scale fluid ascends while some of it descends. Furthermore, the amplitude of these modes goes to zero as the filter scale diminishes, which is an attractive property when considering how the fluid system might behave as the model resolution increases. The availability of a variational formulation implies that a variety of standard approximations, such as hydrostatic or pseudo-incompressible, should be applicable to the conditionally averaged equations, leading to simpler equation sets that might be appropriate for some applications, both theoretical and numerical. We have already begun to experiment with hydrostatic and Boussinesq versions of the conditionally filtered equations. It is even possible to make different approximations in different fluid components: for example, making one component hydrostatic (though some thought must then be given to the relabeling terms if strict energy consistency is required). However, one would of course normally wish for the fluid component that represents convecting fluid to be treated non-hydrostatically. The results may also be of use in developing and testing numerical methods for the solution of the conditionally filtered equations. For example, numerical methods should respect the conservation properties of the continuous equations, at least to within the numerical truncation error. The normal modes derived here provide known, exact, stable, linear solutions that a numerical method should be able to reproduce.
Finally, the results also give some early indications of the suitability of the conditionally filtered equations for modeling cumulus convection, the application for which they were originally proposed. The multi-fluid gravity modes show that the conditionally filtered equations can capture the essential dynamics of vertical buoyancy-driven motion of one fluid component relative to another, which will be required in order to model convective updraughts and downdraughts. Of course the subfilter-scale terms, interfluid pressure terms, and relabeling terms, that is, the right-hand sides of Equations 2-4, which would need to parameterized, are also of leading-order importance for such flows (Siebesma et al., 2007;de Rooy et al., 2013;Romps and Charn, 2015). On the other hand, the vanishing group velocity of the multi-fluid gravity modes suggests that the conditionally filtered equations would not help us to capture convectively generated gravity waves (e.g. Lane and Moncrieff, 2010) unless those waves project on to the single-fluid-equivalent gravity modes. It is also conceivable that, away from the region of convection, the two-fluid gravity modes and inertial modes might have undesirable behavior. For example, their disperion properities might lead to behavior analogous to that of some numerical computational modes. If this turns out to be the case, then some measures to suppress them might be needed. The analysis presented here should, at least, help to identify such problems.
The derivation of the energy equation 32 does not depend on any assumption about the b i + ∑ j d ij terms, so it holds for the equal-v i variant too. Because the b i + ∑ j d ij terms can no longer be assumed zero, we can no longer make the step to Equation 33. However, the contributions to the change in total energy from the horizontal components of b i + ∑ j d ij sum to zero, leaving only the vertical components (indicated by superscript (z)) contribute to the change in total energy. Material conservation of potential vorticity (Equation 41) does depend on the vanishing of the b i + ∑ j d ij terms and therefore no longer holds for the equal-v i variant. The impermeability theorem, however, involves no assumptions about the forcing terms and continues to hold.

B2
Normal modes The single-fluid-equivalent modes, multi-fluid gravity modes, and relabeling modes found in section 4 all have identical v i for all i. Therefore they continue to exist, with exactly the same frequency and structure, in the equal-v i variant. The multi-fluid inertial modes, on the other hand, must satisfy ∑ i (r) i v i = 0. This could only hold with equal v i if v i = 0 for all i, but then there would be no disturbance at all. Thus, the multi-fluid inertial modes do not exist in the equal-v i variant. These rather general arguments are confirmed by detailed calculation analogous to that in section 4.

B3 Variational formulation
We have not, so far, been able to discover a suitable variational formulation of the equal-v i variant of the conditionally filtered equations. There appear to be considerable technical subtleties associated with the equal-v i constraint.