1 Introduction

Models of geophysical flows involve a fluid with a free interface under the influence of gravity on a rotating domain, often forced by variations in temperature, salinity and density. In this paper, we will consider the thermal rotating shallow water equations, which is a two dimensional model that includes all of the features above. The variations of temperature and salinity are collected in a single scalar field that we call the buoyancy. The thermal rotating shallow water equations can be derived in several different ways from the rotating Euler equations with stratification. The best known method is to assume that the domain is shallow, allowing the replacement of the prognostic equation for the vertical velocity by a hydrostatic pressure relation from which the vertical velocity can be inferred. The result is the system of inviscid primitive equations. Upon assuming columnar motion, e.g., motivated by the Taylor-Proudman theorem, meaning that the horizontal velocity field does not depend on the vertical coordinate, one can vertically average the primitive equations to obtain the thermal rotating shallow water equations.

The focus in this contribution is with the preservation of key structures that characterise the governing equations and their dynamics. In geophysical fluid dynamics (GFD) models in 2D so-called conservation of Casimirs forms a major framework for the modelling and construction of methods for their numerical treatment. We present an explicit constructive method with which the Casimirs of a general class of GFD models can be explicitly computed. This provides an alternative to earlier work by Cotter and Holm [2013] that yields explicit Casimirs for 2D systems.

This entire sequence of assumptions and approximations can be performed at the level of the Lagrangian formulation of the models, as shown in Holm and Luesink [2021]. Doing so is helpful because the geometric structure associated with such a variational formulation implies various important dynamical quantities and conservation laws. For two-dimensional geophysical fluids, we find that the key dynamical quantities are the potential vorticity and the potential buoyancy, where the latter is the ratio of the buoyancy to the depth. Both quantities play a key role in cyclogenesis, as shown in Holm et al. [2021]. In the present work, we will show that the potential vorticity and potential buoyancy can also be used to give an alternative formulation of the fluid equations. This formulation is particularly useful for the identification of Casimirs, which are conserved integral quantities. The Casimirs in turn help interpret mechanisms in geophysical turbulence. For instance, in the incompressible setting without buoyancy effects in two dimensions, the enstrophy is one of the Casimirs and plays a central role in the double cascade predicted by Kraichnan [1967]. From a geometric point of view, the Casimirs are the functionals that form the kernel of the Poisson bracket. Usually, the form of the Casimirs is assumed or guessed and then verified by checking whether the Poisson bracket indeed vanishes. We will use two subsequent changes of variables to provide a constructive derivation for the form of the Casimirs.

The organization of this paper is as follows. In Sect. 2 we present the main equations relevant to 2D geophysical flow and sketch the central importance of the retaining symmetries and conserved properties of the models. Among these properties, Casimirs are a major structure for the GFD models in 2D. Explicit methods to determine these Casimirs will be sketched in Sect. 3. Concluding remarks are collected in Sect. 4.

2 Geophysical Flows

In Holm and Luesink [2021] it is shown that starting from the Lagrangian for the rotating, stratified Euler equations in three dimensions, one can derive the Lagrangian for the thermal rotating shallow water equations by assuming hydrostatic pressure and applying vertical averaging. The benefit of performing this sequence of approximations at the level of the Lagrangian is that the geometric structure is not affected. This means that the thermal rotating shallow water equations can be formulated using a Lie-Poisson bracket. As was shown in Marsden and Weinstein [1983], there exist multiple equivalent formulations in terms of Lie-Poisson brackets of the two-dimensional Euler equations. Similar formulations can be derived for the compressible two-dimensional fluid models. This was first done in Holm and Long [1989]. The retained Lagrangian structure in 2D is basic to a possible systematic approach to determining the conserved quantities associated with the thermal rotating shallow water equations. This systematic approach will be elaborated on in this paper.

It is possible to derive the equations for geophysical fluid dynamics on arbitrary smooth manifolds starting from the Euler equations, as shown in Holm et al. [1998]. This level of generality requires tools of differential topology, such as the Lie derivative, the pullback and the pushforward, see for instance Abraham and Marsden [1978], Marsden and Ratiu [2013], Holm et al. [2009]. However, if the domain is a two-dimensional compact subset \(\Omega \) embedded in \(\mathbb {R}^3\) or \(\mathbb {R}^2\) with Cartesian coordinates and appropriate boundary conditions, we can formulate the equations of motion also using vector proxies of exterior calculus. The computations are in arbitrary orthonormal coordinate systems. To this end, we start from the dimensionless Lagrangian for the thermal rotating shallow water (TRSW) equations, which are given by

$$\displaystyle \begin{aligned} {} \begin{aligned} L_{TRSW}(\boldsymbol{u},\eta,b) = \int_\Omega \left(\frac{1}{2}|\boldsymbol{u}|{}^2 + \frac{1}{\mathrm{Ro}}\boldsymbol{u}\cdot\boldsymbol{R} - \frac{1}{2\,\mathrm{Fr}^2}(1+\mathfrak{s}b)(\eta-2h)\right)\,\eta\,d\mu. \end{aligned} \end{aligned} $$
(1)

In this Lagrangian, \(\boldsymbol {u}\) is the velocity field, \(\eta =\alpha \zeta + h\) is the total depth, \(\zeta \) is the free surface elevation, h is the bottom topography, \(\boldsymbol {R}\) is the vector potential for the Coriolis parameter and b is the buoyancy variable. Furthermore, the dimensionless numbers are the aspect ratio \(\sigma \), the Rossby number \(\mathrm {Ro}\), the Froude number \(\mathrm {Fr}\), the wave amplitude \(\alpha \) and the stratification parameter \(\mathfrak {s}\). The stratification parameter represents the importance of the buoyancy variable, which itself is of order one. The vector potential for the Coriolis parameter satisfies \(\nabla ^\perp \cdot \boldsymbol {R} = f(x,y)\), where \(f(x,y)\) is the usual Coriolis parameter. The \(\perp \) operator corresponds to a Hodge star operator, which for Cartesian coordinates is defined by \((x,y)^\perp = (-y,x)\). The volume form is given by \(d\mu \), which in Cartesian coordinates is expressed as \(d\mu =dx\,dy\). The Lagrangian is a functional on \(\mathfrak {X}(\Omega )\times V^*(\Omega )\), the product space of the space of vector fields \(\mathfrak {X}(\Omega )\) and the space of advected quantities \(V^*(\Omega )\). That is, \(\boldsymbol {u}\in \mathfrak {X}(\Omega )\) and \(\eta , b\in V^*(\Omega )\). More information and details on these spaces can be found in Luesink [2021]. The thermal rotating shallow water equations associated with the Lagrangian (1) are given in the advective formulation by

$$\displaystyle \begin{aligned} {} \begin{aligned} \frac{\partial}{\partial t}\boldsymbol{u} + (\boldsymbol{u}\cdot\nabla)\boldsymbol{u} + \frac{1}{\mathrm{Ro}}f\boldsymbol{u}^\perp &= -\frac{\alpha}{\mathrm{Fr}^2}\nabla((1+\mathfrak{s}b)\zeta) + \frac{\mathrm{athfrak{s}}}{2\,\mathrm{Fr}^2}(\alpha\zeta-h)\nabla b,\\ \frac{\partial}{\partial t}\eta + \nabla\cdot(\eta\boldsymbol{u}) &= 0,\\ \frac{\partial}{\partial t}b + (\boldsymbol{u}\cdot\nabla)b &= 0. \end{aligned} \end{aligned} $$
(2)

Equations (2) describe a compressible fluid with thermal effects in a rotating frame in two dimensions. Note that the equations take the same form on the sphere. The bold symbols denote vector valued quantities, which assumes the existence of a basis. Since we are working with two dimensional manifolds, such a basis is available. We will now recall an important vector calculus identity that is central to the manipulations that we will perform. This identity follows from differential topology, as shown in Holm et al. [2009], where vector fields and differential forms in arbitrary coordinate systems can be defined. The vector-valued coefficients of these objects can be identified when the underlying space is Euclidean with the standard inner product. This means that \(\boldsymbol {u}\) is simultaneously the coefficient of a vector field and a differential 1-form. This can lead to confusion, so in what follows u denotes a vector field in arbitrary coordinates and v denotes a differential 1-form. The Lie derivative can be defined as the derivative of the pullback

$$\displaystyle \begin{aligned} {} \mathcal{L}_u v = \frac{d}{dt}\Big|{}_{t=0}\phi_t^*(v), \end{aligned} $$
(3)

where \(\phi \) is the flow associated with the vector field u. The asterisk on \(\phi \) means that v is pulled back along \(\phi \). Here, \(\phi \) is the solution to the differential equation \(d\phi /dt = u(\phi ,t)\) with arbitrary initial condition, i.e., representing a trajectory of a test-particle in the flow field u. The arbitrariness is what allows Lagrangian formulations of fluid dynamics to be related to Eulerian formulations. The Lie derivative can also be defined by means of Cartan’s formula

$$\displaystyle \begin{aligned} {} \mathcal{L}_u v = i_u dv + d(i_u v), \end{aligned} $$
(4)

where \(i_u v\) denotes the interior product of u with v and d is the exterior derivative, see e.g. Abraham and Marsden [1978], Marsden and Ratiu [2013], Holm et al. [2009]. Setting the two definitions (3) and (4) of the Lie derivative equal to one another in \(\mathbb {R}^2\) provides the following vector calculus identity

$$\displaystyle \begin{aligned} {} (\boldsymbol{u}\cdot\nabla)\boldsymbol{v} + (\nabla\boldsymbol{u})\cdot\boldsymbol{v} = (\nabla^\perp\cdot\boldsymbol{v})\boldsymbol{u}^\perp + \nabla(\boldsymbol{u}\cdot\boldsymbol{v}), \end{aligned} $$
(5)

where the left hand side results from the pullback definition (3) and the right hand side follows from the Cartan formula (4).

Using (5), an alternative formulation to (2) of the thermal rotating shallow water equations is given by

$$\displaystyle \begin{aligned} {} \begin{aligned} \frac{\partial}{\partial t}\boldsymbol{u} + \left(\omega+\frac{1}{\mathrm{Ro}}f\right) \boldsymbol{u}^\perp &= -\frac{\alpha}{\mathrm{Fr}^2}\nabla((1+\mathfrak{s}b)\zeta) - \frac{1}{2}\nabla|\boldsymbol{u}|{}^2 + \frac{\mathrm{athfrak{s}}}{2\,\mathrm{Fr}^2}(\alpha\zeta-h)\nabla b,\\ \frac{\partial}{\partial t}\eta + \nabla\cdot(\eta\boldsymbol{u}) &= 0,\\ \frac{\partial}{\partial t}b + (\boldsymbol{u}\cdot\nabla)b &= 0,\\ \end{aligned} \end{aligned} $$
(6)

where \(\omega =\nabla ^\perp \cdot \boldsymbol {u}\) is the scalar vorticity. This formulation is often called the vector invariant formulation of fluid dynamics. There are several situations where the vector invariant formulation has advantages over the advective formulation. The vector invariant form offers an easier basis for numerical discretisations because it hides the nonlinearity. Additionally, on the right hand side of the velocity equation in (6), one recognises the gradient of the Bernoulli function \(B=\frac {1}{2}|\boldsymbol {u}|{ }^2 + \frac {\alpha }{\mathrm {Fr}^2}(1+\mathfrak {s}b)\zeta \), further explaining the physical mechanisms responsible for the flow of fluid.

Both (2) and (6) can be formulated as a Hamiltonian system with a Lie-Poisson bracket. This is a crucial property of these models as it prepares for a clear formulation of conserved quantities, i.e., the desired Casimirs. By Legendre transforming the Lagrangian (1), we obtain the Hamiltonian associated with the thermal rotating shallow water equations. The Legendre transform is given by

$$\displaystyle \begin{aligned} H(\boldsymbol{m},\eta,b) = \langle \boldsymbol{m},\boldsymbol{u}\rangle - L(\boldsymbol{u},\eta,b), \end{aligned} $$
(7)

where \(\boldsymbol {m}=\delta L/\delta \boldsymbol {u}\) is the momentum variable in terms of the functional derivative of the Lagrangian. The Legendre transform only relates the velocity and the momentum and does not affect the advected quantities. The Hamiltonian is therefore a functional on the space \(\mathfrak {X}^*(\Omega )\times V^*(\Omega )\), where \(\mathfrak {X}^*(\Omega )\) is the dual space of \(\mathfrak {X}(\Omega )\) with respect to \(L^2\)-pairing on \(\Omega \). For the thermal rotating shallow water model, the momentum is given by \(\boldsymbol {m}=\eta (\boldsymbol {u}+\boldsymbol {R})\) and the Hamiltonian is

$$\displaystyle \begin{aligned} H_{TRSW}(\boldsymbol{m},\eta,b) = \int_\Omega \left(\frac{1}{2\eta^2}|\boldsymbol{m}|{}^2 + \frac{1}{2\,\mathrm{Fr}^2}(1+\mathfrak{s}b)(\eta-2h)\right)\,\eta\,d\mu. \end{aligned} $$
(8)

The Poisson bracket that will allow us to formulate the equations of motion has the following general form, see e.g. Holm et al. [2009],

$$\displaystyle \begin{aligned} \{F,G\} = \int_\Omega \left(\begin{matrix} \delta F/\delta \boldsymbol{m} \\ \delta F/\delta \eta\\ \delta F/\delta b \end{matrix}\right)\cdot \mathbb{J}(\boldsymbol{m},\eta,b) \left(\begin{matrix} \delta G/\delta \boldsymbol{m} \\ \delta G/\delta \eta\\ \delta G/\delta b \end{matrix}\right) \,d\mu\,, \end{aligned} $$
(9)

where F and G are two arbitrary functionals on the space \(\mathfrak {X}^*(\Omega )\times V^*\). The matrix \(\mathbb {J}\) is operator valued and depends on the state. \(\mathbb {J}\) can be explicitly derived using reduction theorems, following Marsden and Weinstein [1974], Holm et al. [1998]. We speak of Hamiltonian dynamics if the evolution of a functional F is expressed by

$$\displaystyle \begin{aligned} \frac{d}{dt}F = -\{F,H\}, \end{aligned} $$
(10)

where H is the Hamiltonian of the system. We obtain the equations of motion (2) by choosing \(G=H\) and using \(\mathbb {J}(\boldsymbol {m},\eta ,b)\) as in Holm et al. [2021] to find

(11)

and reproduces Eqs. (2) after using the definition of the momentum, rewriting the momentum equation using the continuity equation and applying the Lie derivative identity (5) to the vector potential of the Coriolis parameter. We have used Einstein’s summation convention of summing over repeated indices and the notation \(b_{,i}\) refers to i-th component of the gradient of b (the comma denotes a spatial derivative). Note that the dependence on the state \((\boldsymbol {m},\eta ,b)\) is linear. This means that the Poisson bracket is in fact a Lie-Poisson bracket. The kernel of a Lie-Poisson bracket is nontrivial and is precisely the kernel of the linear operator \(\mathbb {J}\). The kernel is spanned by functionals known as Casimirs and the goal of the remainder of this work is to derive these Casimir functionals explicitly.

In Holm and Long [1989], the momentum bracket (11) is transformed by means of a change of variables to the rotational form. The change of variables is \((m_1,m_2,\eta ,b)\mapsto (u,v,\eta ,b)\), where \(u=\frac {m_1}{\eta }\) and \(v=\frac {m_2}{\eta }\), which is invertible as long as \(0< \eta < \infty \). This change of variables is not the same as just formulating the Hamiltonian and the Lie-Poisson bracket in terms of velocity because of the role of the rotating frame. Performing the transformation of Holm and Long [1989], we obtain the following formulation

(12)

where \(q = \frac {1}{\eta }(\omega + \frac {1}{\mathrm{Ro}}f)\) is the potential vorticity, \(B = \frac {1}{2}|\boldsymbol {u}|{ }^2 + \frac {1}{2\,\mathrm{Fr}^2}(1+\mathfrak {s}b)(\eta -2h)\) is the Bernoulli function and \(T=\frac {\mathrm{athfrak{s}}}{2\,\mathrm{Fr}^2}(\eta ^2 - 2\eta h)\). This Hamiltonian formulation corresponds to (6) and extends the bracket of Holm and Long [1989] to include thermal variations. This bracket is linear and it is a simple exercise to show that it is skew-symmetric with respect to the \(L^2\)-pairing. To prove that it satisfies the Jacobi identity, we repeat the argument of Holm and Long [1989] and state that the bracket in (12) is an invertible transformation of variables in the Lie-Poisson bracket (11).

We now wish to express the bracket (12) in another set of variables to achieve a formulation in independent scalar variables. This is accomplished using the transformation \((u,v,\eta ,b)\mapsto (\omega ,D,\eta ,\eta b)\), where \(\omega = \nabla ^\perp \cdot \boldsymbol {u}\) is the vorticity and \(D=\nabla \cdot \boldsymbol {u}\) is the divergence. If the domain \(\Omega \) has no holes, then the vector Laplace equation has a unique solution. This is the Helmholtz theorem for Euclidean space. If the domain does have holes (or islands) then appropriate boundary conditions are required to eliminate harmonic functions in order to guarantee uniqueness of solutions. In either case, provided with appropriate boundary conditions when necessary, one can uniquely split up the vector field \(\boldsymbol {u}\) into potentials via the Helmholtz decomposition

$$\displaystyle \begin{aligned} \boldsymbol{u} = \nabla^\perp\psi + \nabla\chi, \end{aligned} $$
(13)

where \(\psi \) is the stream function and \(\chi \) is the velocity potential. Uniqueness of solutions to the Laplace equation is required to reconstruct \(\boldsymbol {u}\), since the potentials satisfy Poisson’s equations

$$\displaystyle \begin{aligned} \begin{aligned} \omega &= \nabla^\perp\cdot(\nabla^\perp\psi) &= \Delta\psi,\\ D &= \nabla\cdot(\nabla\chi) &= \Delta\chi. \end{aligned} \end{aligned} $$
(14)

This permits us to write the velocity field in terms of vorticity and divergence as follows

$$\displaystyle \begin{aligned} {} \boldsymbol{u} = \nabla^\perp\Delta^{-1}\omega + \nabla\Delta^{-1}D, \end{aligned} $$
(15)

which means that changing variables in the Hamiltonian amounts to substituting (15) for the velocity. The first term in (15) is analogous to the two-dimensional version of the Biot-Savart law, but since the fluid is compressible it does not determine the full velocity field. The potential buoyancy variable \(r = b/\eta \) is introduced to remove the fraction terms \(\pm b_x/\eta \) and \(\pm b_y/\eta \) in the Poisson bracket (12). This is convenient from a notation point of view, but also means that all the variables that appear inside the \(\mathbb {J}\) matrix in the Poisson bracket are “potential variables”, i.e., potential vorticity and potential buoyancy. To change variables in the Cartesian coordinate case, we sandwich the Poisson bracket of Eq. (12) with the functional Jacobian derivative operator and its \(L^2\)-adjoint as follows

$$\displaystyle \begin{aligned} \left(\begin{matrix} -\partial_y & \partial_x & 0 & 0\\ \partial_x & \partial_y & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{matrix}\right) \left(\begin{matrix} 0 & -q & \partial_x & -\frac{b_x}{\eta}\\ q & 0 & \partial_y & -\frac{b_y}{\eta}\\ \partial_x & \partial_y & 0 & 0\\ \frac{b_x}{\eta} & \frac{b_y}{\eta} & 0 & 0 \end{matrix}\right) \left(\begin{matrix} \partial_y & -\partial_x & 0 & 0\\ -\partial_x & -\partial_y & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1 \end{matrix}\right) \end{aligned} $$
(16)

Similar manipulations can be performed for different coordinate systems, provided that one takes an orthonormal coordinate basis. For the sphere this would be a latitude-longitude basis. Performing this change of coordinates in the bracket (12) leads to

(17)

This bracket formulation has a number of interesting properties. First of all, the differential operators can be factored out of the matrix upon introducing the convention \(\times \nabla = \nabla ^\perp \). Secondly, the matrix only features the potential vorticity q and the potential buoyancy r. The kernel of this bracket is the kernel of the matrix operator \(\mathbb {J}(\omega ,D,\eta , b)\), which is skew-symmetric in both q and r. The most interesting property in our opinion is that this bracket governs a number of two-dimensional fluid models through submatrices of \(\mathbb {J}\).

The full four by four setting corresponds to the thermal rotating shallow water equations. If there is no underlying rotation, one simply adapts the definition of the potential vorticity q to obtain the thermal shallow water equations. When there are no buoyancy variations, the bracket can be restricted to the three by three case, which corresponds to the rotating shallow water equations. Again, upon adapting the potential vorticity variable q, one can obtain the shallow water equations in case rotation is absent. In the incompressible case where buoyancy variations still play a role, the divergence is zero. Then one can use the submatrix consisting of the \((1,1),(1,4),(4,1),(4,4)\) elements, which corresponds to the thermal rotating Euler equations. If buoyancy variations do not play a role, the matrix is simply the \((1,1)\) element, which can describe the two-dimensional rotating Euler equations and the quasi-geostrophic (QG) equations. Important to note is that the thermal QG (TQG) model described in Warneford and Dellar [2013], Zeitlin [2018], Holm et al. [2021] does not fit into the Lie-Poisson bracket formulation because its \((1,1)\) position features \(q-b\) rather than just q, see Holm et al. [2021]. This is a result of the fact that the TQG model is derived as a perturbation around thermal geostrophic balance, rather than around geostrophic balance. To summarise, we list all models that can be described by (17) in order of complexity in Table 1.

Table 1 The models that can be described by submatrices of the Poisson bracket (17)

The transition from incompressible models to compressible models is a steep increase in complexity, since the compressible models involve an additional two equations compared to the incompressible case. The divergence and the depth variable are always paired together, since changes in D imply changes in \(\eta \) and vice-versa. This bracket is particularly useful in the explicit computation of Casimirs, which is shown in Sect. 3. It also has other uses. In ocean dynamics, gravity waves propagate at speeds that are orders of magnitude higher than the typical flow velocity. If the Rossby number, the Froude number, the wave amplitude and the stratification parameter satisfy \(\mathcal {O}(\mathrm {Ro}) = \mathcal {O}(\mathrm {Fr}) = \mathcal {O}(\alpha ) = \mathcal {O}(\mathfrak {s})\), then one can derive the thermal geostrophic balance condition. This condition provides an algebraic relation for the balanced velocity field. The balanced velocity field is divergence free. Since the bracket (17) features the divergence variable explicitly, it is natural to perform an asymptotic expansion in a small parameter \(\epsilon \) where

$$\displaystyle \begin{aligned} {} \begin{aligned} \omega &= \omega_0 + \epsilon\omega_1 + o(\epsilon),\\ D &= \epsilon D_1 + o(\epsilon). \end{aligned} \end{aligned} $$
(18)

The expansion (18) applied to the thermal rotating shallow water Lagrangian (1) and truncated at order \(o(1)\) yields the thermal extension of the L1 model of Salmon [1983]. This derivation is shown in detail in Holm et al. [2021].

3 Explicitly Determining the Casimirs

The bracket (17) is particularly helpful in the explicit computation of the Casimirs since the variables are all independent scalars. We are looking for functionals \(C(\omega ,D,\eta , b)\) such that \(\{F,C\}=0\) for any functional F. The following computations follow a procedure of step-by-step elimination. Expanding the bracket and requiring \(\{F,C\}=0\) for any F yields the equation

$$\displaystyle \begin{aligned} {} \begin{aligned} 0 = \{F,C\} &= -\int_\Omega \frac{\delta F}{\delta\omega}\nabla\cdot\left(q\nabla^\perp\frac{\delta C}{\delta \omega} - q\nabla\frac{\delta C}{\delta D} +r\nabla^\perp\frac{\delta C}{\delta b}\right) \\&\quad + \frac{\delta F}{\delta D}\nabla\cdot\left(q\nabla\frac{\delta C}{\delta \omega} + q\nabla^\perp\frac{\delta C}{\delta D} + \nabla\frac{\delta C}{\delta \eta} + r\nabla\frac{\delta C}{\delta b}\right) \\&\quad -\frac{\delta F}{\delta \eta}\nabla\cdot\left(\nabla\frac{\delta C}{\delta D}\right) \\&\quad +\frac{\delta F}{\delta b}\nabla\cdot\left(r\nabla^\perp\frac{\delta C}{\delta\omega} - r\nabla\frac{\delta C}{\delta D}\right) \, d\mu\,. \end{aligned} \end{aligned} $$
(19)

Since F is an arbitrary functional, we can solve for this functional equation per variational derivative of F and get the explicit form of the Casimirs by a process of elimination. In fact, the third line of (19), the one that features \(\delta F/\delta \eta \), will be our starting point in the explicit computations. The third line implies that C may be at most linear in D with constant coefficients, since only then the variational derivative of C with respect to D is constant in space. Applying the gradient leads to zero, meaning that the third term vanishes under the assumption of linear dependence of C on mass density D. If the variational derivative of C with respect to D is not constant with respect to space, then this term does not vanish, as \(\Delta D\) is not necessarily zero. So at this stage we know that

$$\displaystyle \begin{aligned} C(\omega,D,\eta,b) = \int_\Omega \gamma D + f(\omega,\eta,b)\,d\mu\,, \end{aligned} $$
(20)

where \(\gamma \in \mathbb {R}\) is a constant and \(f(\omega ,\eta ,b)\) is a function that is determined next. Since we have established that C must be linear in D, all terms that involve variational derivatives of C with respect to D vanish. Simplifying (19) accordingly, we obtain

$$\displaystyle \begin{aligned} {} \begin{aligned} 0 = \{F,C\} &= -\int_\Omega \frac{\delta F}{\delta\omega}\nabla\cdot\left(q\nabla^\perp\frac{\delta C}{\delta \omega} +r\nabla^\perp\frac{\delta C}{\delta b}\right) \\&\quad + \frac{\delta F}{\delta D}\nabla\cdot\left(q\nabla\frac{\delta C}{\delta \omega} + \nabla\frac{\delta C}{\delta \eta} + r\nabla\frac{\delta C}{\delta b}\right) \\&\quad +\frac{\delta F}{\delta b}\nabla\cdot\left(r\nabla^\perp\frac{\delta C}{\delta\omega}\right) \, d\mu\,. \end{aligned} \end{aligned} $$
(21)

The third line of (21), the one that features \(\delta F/\delta b\), vanishes if C depends linearly on \(\omega \). In this case we do not have to insist on constant coefficients. If the coefficient of \(\omega \) is an arbitrary differentiable function \(\Psi (r)\) of the potential buoyancy, i.e., \(\delta C/\delta \omega =\Psi (r)\), we have

$$\displaystyle \begin{aligned} \nabla\cdot\left(r\nabla^\perp\frac{\delta C}{\delta\omega}\right) = \nabla\cdot\big(r\nabla^\perp \Psi(r)\big) = \Psi'(r)(\nabla r\cdot\nabla^\perp r) + r(\nabla\cdot\nabla^\perp) \Psi(r) = 0, \end{aligned} $$
(22)

because \(\nabla r, \nabla ^\perp r\) and \(\nabla ,\nabla ^\perp \) are orthogonal. Here \(\Psi '(r)\) denotes the derivative of \(\Psi \) with respect to its argument. Recall that the potential buoyancy is defined as \(r=b/\eta \). At this stage, we know that C must have the form

$$\displaystyle \begin{aligned} C(\omega,D,\eta,b) = \int_\Omega \gamma D + \omega \Psi(r) + g(b,\eta)\,d\mu\,. \end{aligned} $$
(23)

The next step is to determine \(g(b,\eta )\). Knowing the explicit form of the variational derivative of C with respect to \(\omega \), we can simplify (21) further to obtain

$$\displaystyle \begin{aligned} {} \begin{aligned} 0 = \{F,C\} &= -\int_\Omega \frac{\delta F}{\delta\omega}\nabla\cdot\left(q\nabla^\perp\Psi(r) +r\nabla^\perp\frac{\delta C}{\delta b}\right) \\&\quad + \frac{\delta F}{\delta D}\nabla\cdot\left(q\nabla\Psi(r) + \nabla\frac{\delta C}{\delta \eta} + r\nabla\frac{\delta C}{\delta b}\right)\, d\mu\,. \end{aligned} \end{aligned} $$
(24)

We focus on the term that features \(\delta F/\delta \omega \). We have an explicitly constructed term and the variational derivative of C with respect to b. By the same argument as in the previous step, we know \(\nabla \cdot (r\nabla ^\perp (\delta C/\delta b))\) vanishes if the variational derivative of C with respect to b is a differentiable function of r. So, let \(\Phi (r)=\Phi (b/\eta )\) be this differentiable function. Since a variational derivative of \(\Phi (b/\eta )\) with respect to b produces a factor of \(1/\eta \), we introduce the term \(\eta \Phi (b/\eta )\) into C. So at this stage, after the three steps, we have an expression for C in terms of two arbitrary differentiable functions \(\Phi \) and \(\Psi \)

$$\displaystyle \begin{aligned} {} C(\omega,D,\eta,b) = \int_\Omega \eta\Phi(r) + \eta q \Psi(r) + \gamma D\,d\mu\, \end{aligned} $$
(25)

where \(\gamma \in \mathbb {R}\) is a constant and \(\eta q = \omega + \frac {1}{\mathrm {Ro}}f\). Going back to (24), we can verify whether \(C(\omega ,D,\eta ,b)\) is indeed the family of Casimirs of the Poisson bracket (17). This means that the terms multiplying variational derivatives of F must vanish. So we substitute (25) into (24) and compute the term multiplied by \(\delta F/\delta \omega \)

$$\displaystyle \begin{aligned} \begin{aligned} & \nabla\cdot\left(q\nabla^\perp\frac{\delta C}{\delta\omega}\right. - \left.q\nabla\frac{\delta C}{\delta D} + r\nabla^\perp\frac{\delta C}{\delta b}\right) \\ &\quad = \nabla\cdot\left(q\nabla^\perp\Psi(r) + r\nabla^\perp\big(\Phi'(r) + q\Psi'(r)\big)\right) \\ &\quad = \Phi''(r)(\nabla r\cdot \nabla^\perp r) + r(\nabla\cdot\nabla^\perp) \Phi'(r) \\ &\quad \quad + \Psi'(r)(\nabla q\cdot \nabla^\perp r) + \Psi'(r)(\nabla r\cdot\nabla^\perp q) \\&\quad \quad + r\Psi''(r)(\nabla r\cdot\nabla^\perp q) + r\Psi''(r)(\nabla q\cdot\nabla^\perp r)\\ &\quad = 0. \end{aligned} \end{aligned} $$
(26)

In this computation we have used orthogonality of \(\nabla , \nabla ^\perp \) and \(\nabla r,\nabla ^\perp r\) and skew-symmetry, i.e., \(\nabla r\cdot \nabla ^\perp q = -\nabla q\cdot \nabla ^\perp r\) (\( = -r_xq_y + q_xr_y\) for Cartesian coordinates). It remains to check whether the term multiplied by \(\delta F/\delta D\) also vanishes. In the following computation, we suppress the dependence of \(\Phi \) and \(\Psi \) on r for notational convenience. We compute from the second line in (19)

$$\displaystyle \begin{aligned} {} \begin{aligned} &\nabla\cdot\left(q\nabla\frac{\delta C}{\delta\omega} \right. + \left. q\nabla^\perp\frac{\delta C}{\delta D}+ \nabla\frac{\delta C}{\delta \eta} + r\nabla\frac{\delta C}{\delta b}\right) \\ &\qquad = \nabla\cdot\Big(q\nabla\Psi + \nabla\big(\Phi-r\Phi'-rq\Psi'\big) + r\nabla(\Phi'+q\Psi') \Big) \\&\qquad = \nabla\cdot\Big(q\nabla\Psi - r\nabla(q\Psi') - q\Psi'\nabla r + r\nabla(q\Psi')\Big) \\& \qquad = 0. \end{aligned} \end{aligned} $$
(27)

The computation is a sequence of applying the identity \(\nabla f(r) = f'(r)\nabla r\). In the first step we have applied this to all the terms that involve \(\Phi \). Performing the same manipulations on \(\Psi \) subsequently, implies the result. Note that in (24) we required cancellations of terms orthogonal to the terms that are required to cancel in (27). The reason that the perpendicular gradient of the variational derivative of C with respect to \(\eta \) does not appear in (24) is because it is trivially zero due to orthogonality of \(\nabla \) and \(\nabla ^\perp \). Hence we can conclude that (25) is the complete description of the Casimirs for the bracket (17) and thus also for (11). We can repeat the computation for each of the models described in Table 1 to obtain the corresponding Casimirs. This is summarised in Table 2. Here one can see that in presence of thermal effects enstrophy is no longer a Casimir.

Table 2 The Casimirs of the models that can be described by submatrices of the Poisson bracket (17)

4 Conclusion

In geometric approaches to fluid dynamics one often may exploit constructive methods to infer conservation laws via Noether’s theorem Abraham and Marsden [1978], Marsden and Weinstein [1983], Marsden and Ratiu [2013], Holm et al. [2009]. Casimirs identify conservation laws that arise as the kernel of the Poisson bracket. We provided an explicit method of determining these Casimir functionals for two-dimensional fluid dynamics by means of two changes of variables for the thermal rotating shallow water equations. We formulated the equations in vector invariant form by using an important vector calculus identity. The Poisson bracket corresponding to this vector invariant form is convenient for further manipulation. By changing coordinates from velocity to vorticity and divergence, we derive a Poisson bracket that only involves (skew) gradients and divergences. By means of this formulation, it is a systematic computation to obtain the Casimirs. The computations were performed for arbitrary coordinate systems, which means that the above computations can easily used for domains such as the sphere.