Skip to main content
Log in

Equilibrium Statistical Mechanics and Energy Partition for the Shallow Water Model

  • Published:
Journal of Statistical Physics Aims and scope Submit manuscript

Abstract

The aim of this paper is to use large deviation theory in order to compute the entropy of macrostates for the microcanonical measure of the shallow water system. The main prediction of this full statistical mechanics computation is the energy partition between a large scale vortical flow and small scale fluctuations related to inertia-gravity waves. We introduce for that purpose a semi-Lagrangian discrete model of the continuous shallow water system, and compute the corresponding statistical equilibria. We argue that microcanonical equilibrium states of the discrete model in the continuous limit are equilibrium states of the actual shallow water system. We show that the presence of small scale fluctuations selects a subclass of equilibria among the states that were previously computed by phenomenological approaches that were neglecting such fluctuations. In the limit of weak height fluctuations, the equilibrium state can be interpreted as two subsystems in thermal contact: one subsystem corresponds to the large scale vortical flow, the other subsystem corresponds to small scale height and velocity fluctuations. It is shown that either a non-zero circulation or rotation and bottom topography are required to sustain a non-zero large scale flow at equilibrium. Explicit computation of the equilibria and their energy partition is presented in the quasi-geostrophic limit for the energy–enstrophy ensemble. The possible role of small scale dissipation and shocks is discussed. A geophysical application to the Zapiola anticyclone is presented.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

Notes

  1. In the particular case of a bi-periodic domain, i.e. with periodic boundary conditions for the velocity \(\mathbf {u}\), one would need to describe in addition the homogeneous part of the velocity field, which is both divergence-less and irrotational.

  2. The actual circulation is usually defined as \(\Gamma \equiv \int _{\partial D}\mathrm {d}\mathbf {l}\cdot \mathbf {u}\), where \(\mathrm {d}\mathbf {l}\) is a vector tangent to the domain boundary. Stokes theorem yields to \(Z_{1}=\Gamma +f\).

  3. The letter “\(\mu \)” appearing in the measure denoted \(\mathrm {d}\mu \) is not related to the divergent field denoted \(\mu \).

  4. The \(h^{3}\) term that appears after the change of variables in the functional integral must be understood as a “functional product” \(\prod _{\mathbf {x}\in \mathscr {D}}h^{3}\left( \mathbf {x}\right) \), see also the finite-dimensional representation of this measure given in the next subsection.

  5. Here, the bottom topography is assumed sufficiently smooth to be considered constant over a grid site. A fluctuating topography would require further discussion.

  6. The fact that the variable \(\chi _{k}\) have to be bounded is the reason why we set the cutoffs on the values of \(h_{n}\), \(q_{n}\) and \(\mu _{n}\).

  7. Here, Z depends on the cutoffs introduced in Sect. 3.2. But we will see that it will vanish from the expression of the entropy in the end.

  8. Here we dropped the term \(\log N\) coming from Eq. (78) as it is constant that can be discarded by redefining \(\Omega _{E,\{Z_{k}\}_{k\ge 0}}\).

  9. Strictly speaking, the equal sign should be noted \(\asymp \) which means that the logarithm of the terms on both sides are equivalent, see e.g. Ref. [43].

  10. For the shallow water model, the fluid is at hydrostatic balance. Thus the pressure in the fluid is \(P(x,y,z,t)=P_{o}+\rho g(H+\eta (x,y,t)-z)\). Then the pressure horizontal gradient is simply proportional to the interface height horizontal gradient. Hence, the geostrophic balance simply writes \(R^{2}\nabla ^{\bot }\overline{\eta }=\mathbf {u}_{mf}\).

  11. This change of variable is a guess guided by the fact that the QG potential vorticity is usually obtained by expanding the SW potential vorticity in the limit of small height variations minus a constant and unimportant term. Here we start by removing the unimportant constant (1 in our unit system) from the potential vorticity levels, and then perform the small scale expansion in height.

  12. For such a bottom topography, the topography, the stream function and the potential vorticity field are all proportional to each other for any initial condition for the enstrophy \(Z_{2}\) and the energy E. That is why we do not show plots of the flows for different point of the phase diagram in Fig. 2. We rather choose to consider the case of the Zapiola drift in Sect. 5.3 to see the effect of different value for the initial energy.

  13. The divergent part of the velocity field can not be treated in the same way. Indeed, the operator \(\Delta ^{-1/2}\) is less smooth than the operator \(\Delta ^{-1}\), and one can not derive \(\phi =\phi _{mf}\) by inverting \(\mu =\Delta ^{1/2}\phi \). One may want to use \(\zeta =\Delta \phi \), but the result would be the same since \(\zeta \) is not bounded (the field \(\mu \) is characterized by fluctuations which are controlled by the kinetic energy, and hence by the total energy, but this is not the case for \(\zeta \)).

References

  1. Bouchet, F.: Simpler variational problems for statistical equilibria of the 2D Euler equation and other systems with long range interactions. Physica D 237(14), 1976–1981 (2008)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  2. Bouchet, F.: Statistical mechanics for geophysical flows. PhD Thesis, Université Joseph Fourier-Grenoble (December 2008)

  3. Bouchet, F., Sommeria, J.: Emergence of intense jets and Jupiter’s Great Red Spot as maximum-entropy structures. J. Fluid Mech. 464, 165–207 (2002). doi:10.1017/S0022112002008789

    Article  ADS  MathSciNet  MATH  Google Scholar 

  4. Bouchet, F., Venaille, A.: Statistical mechanics of two-dimensional and geophysical flows. Phys. Rep. 515, 227–295 (2012). doi:10.1016/j.physrep.2012.02.001

    Article  ADS  MathSciNet  Google Scholar 

  5. Bourgain, J.: Periodic nonlinear Schrödinger equation and invariant measures. Commun. Math. Phys. 166(1), 1–26 (1994)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  6. Chavanis, P.H., Sommeria, J.: Classification of self-organized vortices in two-dimensional turbulence: the case of a bounded domain. J. Fluid Mech. 314, 267–297 (1996)

    Article  ADS  MATH  Google Scholar 

  7. Chavanis, P.H., Sommeria, J.: Statistical mechanics of the shallow water system. Phys. Rev. E 65(2), 026302 (2002)

    Article  ADS  MathSciNet  Google Scholar 

  8. Dubinkina, S., Frank, J.: Statistical relevance of vorticity conservation in the Hamiltonian particle-mesh method. J. Comput. Phys. 229, 2634–2648 (2010). doi:10.1016/j.jcp.2009.12.012

    Article  ADS  MathSciNet  MATH  Google Scholar 

  9. Dubinkina, S., Frank, J.: Statistical relevance of vorticity conservation in the Hamiltonian particle-mesh method. J. Comput. Phys. 229(7), 2634–2648 (2010)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  10. Eyink, G.L., Sreenivasan, K.R.: Onsager and the theory of hydrodynamic turbulence. Rev. Mod. Phys. 78, 87–135 (2006). doi:10.1103/RevModPhys.78.87

    Article  ADS  MathSciNet  MATH  Google Scholar 

  11. Farge, M., Sadourny, R.: Wave-vortex dynamics in rotating shallow water. J. Fluid Mech. 206, 433–462 (1989)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  12. Fofonoff, N.P.: Steady flow in a frictionless homogeneous ocean. J. Mar. Res. 13, 254–262 (1954)

    MathSciNet  Google Scholar 

  13. Frank, J., Gottwald, G., Reich, S.: A Hamiltonian particle-mesh method for the rotating shallow-water equations. In: Meshfree Methods for Partial Differential Equations, pp. 131–142. Springer, Berlin (2003)

  14. Gertz, A., Straub, D.N.: Near-inertial oscillations and the damping of midlatitude gyres: a modeling study. J. Phys. Oceanogr. 39(9), 2338–2350 (2009)

    Article  ADS  Google Scholar 

  15. Herbert, C.: Additional invariants and statistical equilibria for the 2D Euler equations on a spherical domain. J. Stat. Phys. 152(6), 1084–1114 (2013)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  16. Herbert, C., Pouquet, A., Marino, R.: Restricted equilibrium and the energy cascade in rotating and stratified flows. J. Fluid Mech. 758, 374–406 (2014)

    Article  ADS  MATH  Google Scholar 

  17. Majda, A.J., Wang, X.: Nonlinear Dynamics and Statistical Theories for Basic Geophysical Flows. Cambridge University Press, Cambridge (2006)

    Book  MATH  Google Scholar 

  18. Majda, A.J., Wang, X.: The emergence of large-scale coherent structure under small-scale random bombardments. Commun. Pure Appl. Math. 59(4), 467–500 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  19. Merryfield, W.J.: Effects of stratification on quasi-geostrophic inviscid equilibria. J. Fluid Mech. 354, 345–356 (1998)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  20. Merryfield, W.J., Cummins, P.F., Holloway, G.: Equilibrium statistical mechanics of barotropic flow over finite topography. J. Phys. Oceanogr. 31, 1880–1890 (2001)

    Article  ADS  Google Scholar 

  21. Michel, J., Robert, R.: Large deviations for young measures and statistical mechanics of infinite dimensional dynamical systems with conservation law. Commun. Math. Phys. 159, 195–215 (1994)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  22. Miller, J.: Statistical mechanics of euler equations in two dimensions. Phys. Rev. Lett. 65(17), 2137–2140 (1990). doi:10.1103/PhysRevLett.65.2137

    Article  ADS  MathSciNet  MATH  Google Scholar 

  23. Miller, J., Weichman, P.B., Cross, M.C.: Statistical mechanics, Euler’s equation, and Jupiter’s Red Spot. Phys. Rev. A 45, 2328–2359 (1992). doi:10.1103/PhysRevA.45.2328

    Article  ADS  Google Scholar 

  24. Miranda, A., Barnier, B., Dewar, W.K.: On the dynamics of the Zapiola anticyclone. J. Geophys. Res. (1978–2012) 104(C9), 21137–21149 (1999)

  25. Nageswaran, V., Turkington, B.: Minmax variational principle for steady balanced solutions of the rotating shallow water equations. Commun. Math. Sci. 8(2), 321–339 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  26. Naso, A., Chavanis, P.H., Dubrulle, B.: Statistical mechanics of two-dimensional Euler flows and minimum enstrophy states. Eur. Phys. J. B 77, 187–212 (2010)

    Article  ADS  MathSciNet  Google Scholar 

  27. Naso, A., Monchaux, R., Chavanis, P., Dubrulle, B.: Statistical mechanics of Beltrami flows in axisymmetric geometry: theory reexamined. Phys. Rev. E 81, 066318 (2010)

    Article  ADS  MathSciNet  Google Scholar 

  28. Onsager, L.: Statistical hydrodynamics. Nuovo Cimento 6 2(Suppl.), 249–286 (1949)

  29. Pedlosky, J.: Geophysical Fluid Dynamics. Springer, Berlin (1982)

    Book  MATH  Google Scholar 

  30. Robert, R.: Etats d’équilibre statistique pour l’écoulement bidimensionnel d’un fluide parfait. C. R. Acad. Sci. 1(311), 575–578 (1990)

    MATH  Google Scholar 

  31. Robert, R.: A maximum-entropy principle for two-dimensional perfect fluid dynamics. J. Stat. Phys. 65, 531–553 (1991)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  32. Robert, R.: On the statistical mechanics of 2D Euler equation. Commun. Math. Phys. 212, 245–256 (2000)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  33. Robert, R., Sommeria, J.: Statistical equilibrium states for two-dimensional flows. J. Fluid Mech. 229, 291–310 (1991). doi:10.1017/S0022112091003038

    Article  ADS  MathSciNet  MATH  Google Scholar 

  34. Robert, R., Sommeria, J.: Relaxation towards a statistical equilibrium state in two-dimensional perfect fluid dynamics. Phys. Rev. Lett. 69(19), 2776–2779 (1992). doi:10.1103/PhysRevLett.69.2776

    Article  ADS  MathSciNet  MATH  Google Scholar 

  35. Salmon, R.: Lectures on Geophysical Fluid Dynamics. Oxford University Press, Oxford (1998)

    Google Scholar 

  36. Salmon, R.: The shape of the main thermocline, revisited. J. Mar. Res. 68(3–4), 541–568 (2010)

    Article  Google Scholar 

  37. Sansón, L.Z., González-Villanueva, A., Flores, L.: Evolution and decay of a rotating flow over random topography. J. Fluid Mech. 642, 159–180 (2010)

    Article  ADS  MATH  Google Scholar 

  38. Saunders, P.M., King, B.A.: Bottom currents derived from a shipborne ADCP on WOCE cruise A11 in the South Atlantic. J. Phys. Oceanogr. 25(3), 329–347 (1995)

    Article  ADS  Google Scholar 

  39. Smith, W.H.F., Sandwell, D.T.: Global seafloor topography from satellite altimetry and ship depth soundings. Science 277, 1957–1962 (1997)

    Google Scholar 

  40. Thalabard, S.: Contributions to the statistical mechanics of ideal two and a half dimensional flows. PhD Thesis, Université Paris Sud-Paris XI (2013)

  41. Thalabard, S., Dubrulle, B., Bouchet, F.: Statistical mechanics of the 3D axisymmetric Euler equations in a Taylor–Couette geometry. J. Stat. Mech. (2014). doi:10.1088/1742-5468/2014/01/P01005

  42. Thalabard, S., Saint-Michel, B., Herbert, É., Daviaud, F., Dubrulle, B.: Ferro-turbulence: a statistical mechanics framework for the large-scale structure of turbulent von Karman flows. New J. Phys. 17(6), 063006 (2015)

  43. Touchette, H.: The large deviation approach to statistical mechanics. Phys. Rep. 478(1), 1–69 (2009)

    Article  ADS  MathSciNet  Google Scholar 

  44. Turkington, B., Majda, A., Haven, K., Dibattista, M.: Statistical equilibrium predictions of jets and spots on Jupiter. Proc. Natl Acad. Sci. U.S.A. 98, 12346–12350 (2001)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  45. Vallis, G.K.: Mechanisms and parameterizations of geostrophic adjustment and a variational approach to balanced flow. J. Atmos. Sci. 49, 1144–1160 (1992)

    Article  ADS  Google Scholar 

  46. Vallis, G.K.: Atmospheric and Oceanic Fluid Dynamics (2006). doi:10.2277/0521849691

  47. Vanneste, J.: Balance and spontaneous wave generation in geophysical flows. Annu. Rev. Fluid Mech. 45, 147–172 (2013)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  48. Venaille, A.: Bottom-trapped currents as statistical equilibrium states above topographic anomalies. J. Fluid Mech. 699, 500–510 (2012)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  49. Venaille, A., Bouchet, F.: Statistical ensemble inequivalence and bicritical points for two-dimensional flows and geophysical flows. Phys. Rev. Lett. 102(10), 104501 (2009)

  50. Venaille, A., Bouchet, F.: Oceanic rings and jets as statistical equilibrium states. J. Phys. Oceanogr. 41, 1860–1873 (2011). doi:10.1175/2011JPO4583.1

    Article  ADS  Google Scholar 

  51. Venaille, A., Bouchet, F.: Solvable phase diagrams and ensemble inequivalence for two-dimensional and geophysical turbulent flows. J. Stat. Phys. 143(2), 346–380 (2011)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  52. Venaille, A., Vallis, G., Griffies, S.: The catalytic role of the beta effect in barotropization processes. J. Fluid Mech. 709, 490–515 (2012)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  53. Warn, T.: Statistical mechanical equilibria of the shallow water equations. Tellus A 38, 1–11 (1986)

    Article  ADS  Google Scholar 

  54. Weatherly, G.L.: On deep-current and hydrographic observations from a mudwave region and elsewhere in the Argentine basin. Deep Sea Res. Part II 40(4), 939–961 (1993)

    Article  ADS  Google Scholar 

  55. Weichman, P.B.: Equilibrium theory of coherent vortex and zonal jet formation in a system of nonlinear Rossby waves. Phys. Rev. E 73(3), 036313 (2006)

  56. Weichman, P.B., Petrich, D.M.: Statistical equilibrium solutions of the shallow water equations. Phys. Rev. Lett. 86, 1761–1764 (2001)

    Article  ADS  Google Scholar 

  57. Xie, J.H., Vanneste, J.: A generalised-lagrangian-mean model of the interactions between near-inertial waves and mean flow. arXiv preprint arXiv:1411.3748 (2014)

  58. Young, W., Ben Jelloul, M.: Propagation of near-inertial oscillations through a geostrophic flow. J. Mar. Res. 55(4), 735–766 (1997)

    Article  Google Scholar 

Download references

Acknowledgments

The authors warmly thank M. Potters and A. Licari for their preliminary work on this subject during a traineeship under the supervision of FB. The research leading to these results has received funding from the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007-2013 Grant Agreement no. 616811) (FB and AV). We warmly thank the three referees for their very positive evaluation of our work and for the numerous remark that helped us to improve our work. The level of commitment of the three referee in reading the detail of our computations has been extremely high, and we thank them for this important work.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to A. Venaille.

Appendices

Appendix 1: Invariant Measure and Formal Liouville Theorem

1.1 Formal Liouville Theorem for the Triplet of Fields (hhuhv)

The existence of a formal Liouville theorem for the shallow water dynamics is shown in this appendix. The shallow water system is fully described by the triplet of fields \(\left( h,hu,hv\right) \). We consider a measure written formally as

$$\begin{aligned} \mathrm {d}\mu =C\mathscr {D}\left[ h\right] \mathscr {D}\left[ hu\right] \mathscr {D}\left[ hv\right] , \end{aligned}$$

with uniform density in \(\left( h,hu,hv\right) \)-space (C is a constant). The average of any functional A over this measure is

$$\begin{aligned} \forall \mathscr {A}\left[ h,uh,vh\right] ,\ \left\langle \mathscr {A}\right\rangle _{\mu }=\int \mathrm {d}\mu \ \mathscr {A}. \end{aligned}$$
(161)

The term \(\int \mathscr {D}\left[ h\right] \mathscr {D}\left[ hu\right] \mathscr {D}\left[ hv\right] \) means that the integral is formally performed over each possible triplet of fields \(\left( h,\ hu,\ hv\right) \). The measure is said to be invariant if

$$\begin{aligned} \forall \mathscr {A},\quad \frac{\mathrm {d}}{\mathrm {d}t}\left\langle \mathscr {A}\right\rangle _{\mu }=0 \end{aligned}$$
(162)

This yields the condition

$$\begin{aligned} \forall \mathscr {A},\quad \int \mathscr {D}\left[ h\right] \mathscr {D}\left[ hu\right] \mathscr {D}\left[ hv\right] \int d\mathbf {x}\ \frac{\delta \mathscr {A}}{\delta h}\partial _{t}h+\frac{\delta \mathscr {A}}{\delta \left( hu\right) }\partial _{t}\left( hu\right) +\frac{\delta \mathscr {A}}{\delta \left( hv\right) }\partial _{t}\left( hu\right) =0. \end{aligned}$$
(163)

An integration by parts yields

$$\begin{aligned} \forall \mathscr {A} ,\quad \int \mathscr {D}\left[ h\right] \mathscr {D}\left[ hu\right] \mathscr {D}\left[ hv\right] \mathscr {A}\int d\mathbf {x}\ \left( \frac{\delta \partial _{t}h}{\delta h}+\frac{\delta \partial _{t}\left( hu\right) }{\delta \left( hu\right) }+\frac{\delta \partial _{t}\left( hv\right) }{\delta \left( hv\right) }\right) =0. \end{aligned}$$
(164)

We say that the equation follows a formal Liouville theorem if we formally have

$$\begin{aligned} \int d\mathbf {x}\ \left( \frac{\delta \partial _{t}h}{\delta h}+\frac{\delta \partial _{t}\left( hu\right) }{\delta \left( hu\right) }+\frac{\delta \partial _{t}\left( hv\right) }{\delta \left( hv\right) }\right) =0, \end{aligned}$$
(165)

which ensures that the measure \(\mathrm {d}\mu \) is invariant.

The shallow water equations (5) and (6) can be written on the form

$$\begin{aligned}&\displaystyle \partial _{t}\left( hu\right) =-\partial _{x}\left( hu^{2}+\frac{1}{2}gh^{2}\right) -\partial _{y}\left( huv\right) +fhv,\end{aligned}$$
(166)
$$\begin{aligned}&\displaystyle \partial _{t}\left( hv\right) =-\partial _{y}\left( hv^{2}+\frac{1}{2}gh^{2}\right) -\partial _{x}\left( huv\right) -fhu,\end{aligned}$$
(167)
$$\begin{aligned}&\displaystyle \partial _{t}h+\partial _{x}\left( hu\right) +\partial _{y}\left( hv\right) =0. \end{aligned}$$
(168)

We see that

$$\begin{aligned} \frac{\delta \partial _{t}h}{\delta h}+\frac{\delta \partial _{t}\left( hu\right) }{\delta \left( hu\right) }+\frac{\delta \partial _{t}\left( hv\right) }{\delta \left( hv\right) }=-\varvec{\nabla }\cdot \left( \frac{\delta \left( h\mathbf {u}\right) }{\delta h}+\frac{\delta \left( hu\mathbf {u}\right) }{\delta \left( hu\right) }+\frac{\delta \left( hv\mathbf {u}\right) }{\delta \left( hv\right) }\right) . \end{aligned}$$
(169)

As the divergence operator is a linear operator, it commutes with the functional derivatives. This allows to conclude that the measure \(\mu \) is invariant. This shows formally the existence of a Liouville theorem for the fields \(\left( h,uh,vh\right) \).

1.2 Change of Variables from (hhuhv) to \((h,q,\mu )\)

The microcanonical measure can formally be written

$$\begin{aligned} \mathrm {d}\mu _{h,hu,hv}=\mathscr {D}\left[ h\right] \mathscr {D}\left[ hu\right] \mathscr {D}\left[ hv\right] \delta \left( \mathscr {E}-E\right) \prod _{k=0}^{+\infty }\delta \left( \mathscr {Z}_{k}-Z_{k}\right) , \end{aligned}$$
(170)

The constraints are more easily expressed in terms of the variables

$$\begin{aligned} h,\quad q=\frac{-\partial _{y}u+\partial _{x}v+f}{h},\quad \mu =\Delta ^{-1/2}\left( \partial _{x}u+\partial _{y}v\right) . \end{aligned}$$
(171)

It will thus be more convenient to use these fields as independent variables. We call \(J\left[ (h,hu,hv)/(h,q,\mu )\right] \) the Jacobian of the transformation. We proceed step by step to compute this Jacobian. The change of variables \((h,hu,hv)\rightarrow (h,u,v)\) involves a upper-diagonal Jacobian matrix at each point \(\mathbf {r}\):

$$\begin{aligned} J\left[ \frac{(h,hu,hv)}{(h,u,v)}\right] =\left( \begin{array}{c@{\quad }c@{\quad }c} 1 &{} u &{} v\\ 0 &{} h &{} 0\\ 0 &{} 0 &{} h \end{array}\right) \end{aligned}$$
(172)

which implies \(\det \left( J\left[ (h,hu,hv)/(h,u,v)\right] \right) =h^{2}\) and

$$\begin{aligned} \mathscr {D}\left[ h\right] \mathscr {D}\left[ hu\right] \mathscr {D}\left[ hv\right] =h^{2}\mathscr {D}\left[ h\right] \mathscr {D}\left[ u\right] \mathscr {D}\left[ v\right] . \end{aligned}$$
(173)

The change of variable \(\left( h,u,v\right) \rightarrow (h,\omega ,\mu )\) involves linear operators that do not depend on space coordinates, thus the determinant of the Jacobian of the transformation is an unimportant constant:

$$\begin{aligned} \mathscr {D}\left[ h\right] \mathscr {D}\left[ u\right] \mathscr {D}\left[ v\right] =C\mathscr {D}\left[ h\right] \mathscr {D}\left[ \omega \right] \mathscr {D}\left[ \mu \right] . \end{aligned}$$
(174)

Using \(\omega =qh-1\), the change of variable \((h,\omega ,\mu )\rightarrow (h,q,\mu )\) involves an upper diagonal Jacobian matrix at each point \(\mathbf {r}\):

$$\begin{aligned} J\left[ \frac{(h,\omega ,\mu )}{(h,q,\mu )}\right] =\left( \begin{array}{c@{\quad }c@{\quad }c} 1 &{} q &{} 0\\ 0 &{} h &{} 0\\ 0 &{} 0 &{} 1 \end{array}\right) , \end{aligned}$$
(175)

with a determinant \(\det \left( J\left[ (h,\omega ,\mu )/(q,h,\mu )\right] \right) =h.\) Finally, the Jacobian of the transformation is \(J\left[ (hu,hv,h)/(q,h,\mu )\right] =h^{3}\) and the microcanonical measure can formally be written

$$\begin{aligned} \mathrm {d}\mu _{h,q,\mu }=Ch^{3}\mathscr {D}\left[ h\right] \mathscr {D}\left[ q\right] \mathscr {D}\left[ \mu \right] \delta \left( \mathscr {E}-E\right) \prod _{k=0}^{+\infty }\delta \left( \mathscr {Z}_{k}-Z_{k}\right) . \end{aligned}$$
(176)

We note the presence of the pre-factor \(h^{3}\) which gives the weight of each microscopic configuration in the \(\left( h,q,\mu \right) \)-space.

Appendix 2: Relevance of the Constraints for the Discrete Model

In this appendix, we explain how the dynamical invariants of the shallow water model, given in Eqs. (32) and (34) respectively, are related to the constraints of the microcanonical ensemble for the discrete model, given in Eqs. (92) and (97), respectively.

1.1 Areal Coarse-Graining for Continuous Fields

Let us consider a field \(g\left( \mathbf {x}\right) \) on the domain \(\mathscr {D}\) where the flow takes place, and let us consider the uniform grid introduced in Sect. 3.2.1. We define the local areal coarse-graining of the continuous field \(g\left( \mathbf {x}\right) \) over a site \(\left( i,j\right) \) as

$$\begin{aligned} \overline{g}_{ij}=N\int _{\hbox {site }\left( i,j\right) }\mathrm {d}\mathbf {x}\, g\left( \mathbf {x}\right) , \end{aligned}$$
(177)

where 1 / N is the area of the site \(\left( i,j\right) \) and where \(\int _{\hbox {site }\left( i,j\right) }\) means that we integrate over the site \(\left( i,j\right) \) only. With an abuse of notation, we use here the same notation \(\overline{g}_{ij}\) as in Eq. (50), since the coarse-graining operator defined in Eq. (177) generalizes to the continuous case the areal coarse-graining operator defined in Eq. (50) for the discrete microscopic model, taking into account the fact that for a fluid particle “n” of area \(\mathrm {d}\mathbf {x}_{n}\) and height \(h_{n}\), we get \(N\mathrm {d}\mathbf {x}_{n}=1/(Mh_{n})\).

We denote \(\overline{g}\) the continuous limit (large N) of \(\overline{g}_{ij}\). Integrating a continuous field g amounts to perform the integration over its local average field \(\overline{g}\):

$$\begin{aligned} \int \mathrm {d}\mathbf {x}\, g\left( \mathbf {x}\right) =\int \mathrm {d}\mathbf {x}\,\overline{g}\left( \mathbf {x}\right) . \end{aligned}$$
(178)

1.2 Potential Vorticity Moments

Using (178), the potential vorticity moments in Eq. (34) simply leads to

$$\begin{aligned} \mathscr {Z}_{k}=\int \mathrm {d}\mathbf {x}\,\overline{hq^{k}}. \end{aligned}$$
(179)

Now that the potential vorticity moments are expressed in terms of the areal coarse-graining of moments of h and q, it can directly be expressed in terms of the probability density field \(\rho \left( \sigma _{h},\sigma _{q},\sigma _{\mu }\right) \) through Eq. (90), and we recover the expression of the constraint given in Eq. (92), whose discrete representation is given in Eq. (56).

1.3 Energy

Using (178), recalling that we restrict ourself to bottom topographies such that \(\overline{h}_{b}=h_{b}\), the total energy of the shallow water model defined in Eq. (32) can be decomposed into a mean flow kinetic energy defined in Eq. (94), a potential energy term due to local height fluctuations and defined in Eq. (96), a fluctuating kinetic energy term

$$\begin{aligned}&\displaystyle \mathscr {E}_{c,fluct}\equiv \mathscr {E}-\mathscr {E}_{mf}-\mathscr {E}_{\delta h}\end{aligned}$$
(180)
$$\begin{aligned}&\displaystyle \mathscr {E}_{c,fluct}\equiv \frac{1}{2}\int \mathrm {d}\mathbf {x}\,\left( h\mathbf {u}^{2}-\overline{h}\mathbf {u}_{mf}^{2}\right) , \end{aligned}$$
(181)

where the velocity fields \(\mathbf {u}\) and \(\mathbf {u}_{mf}\) are computed from the triplet \(\left( h,q,\mu \right) \) and from the triplet \(\left( \overline{h},\overline{hq},\overline{h\mu }\right) \), respectively through

$$\begin{aligned} \mathbf {u}=\nabla ^{\bot }\psi +\nabla \phi ,\quad \left( hq-f\right) =\Delta \psi ,\quad \mu =\Delta ^{1/2}\phi , \end{aligned}$$
(182)

and through

$$\begin{aligned} \mathbf {u}_{mf}=\nabla ^{\bot }\psi _{mf}+\nabla \phi _{mf},\quad \left( \overline{hq}-f\right) =\Delta \psi _{mf},\quad \frac{\overline{h\mu }}{\overline{h}}=\Delta ^{1/2}\phi _{mf}. \end{aligned}$$
(183)

We want to discuss the relation between decomposition of the energy for the discrete model, Eq. (97) and the decomposition for the actual total energy defined in Eq. (32). Our construction is relevant if these two decomposition coincide in the continuous limit, or equivalently if \(\mathscr {E}_{c,fluct}\) is equal to \(\mathscr {E}_{\delta \mu }\) (95) in the continuous limit. In the following we show that this is the case if some cross correlations are actually negligible. More precisely, we assume that

  1. 1.

    For any positive integers klm, the coarse-grained fields \(\overline{h^{k}q^{l}\mu ^{m}}(\mathbf {x})\) defined through the coarse graining procedure in Eq. (178) exist. In the framework of our microscopic model introduced in Sect. 3.2, this hypothesis is automatically satisfied by assuming that the cut-off \(\mu _{\textit{min}},\mu _{\textit{max}},q_{\textit{min}},q_{\textit{max}},h_{\textit{max}}\) scales as \(N^{\alpha }\) with \(\alpha <1\). Other fields may be characterized by local extreme values such that the limit defined in Eq. (178) does not converge. For instance, we will see that the actual divergence \(\zeta =\Delta \phi \) of the equilibrium state is not bounded, i.e. that \(\overline{\zeta }\) would have no meaning.

  2. 2.

    The fields \(h,q,\mu \) are decorrelated (in particular, \(\overline{h^{k}q^{l}\mu ^{m}}=\overline{h^{k}}\overline{q^{l}}\overline{\mu ^{m}}\)). This point will be shown to be self-consistent when computing the equilibrium state.

  3. 3.

    The coarse-grained divergent velocity field is equal to the mean-flow velocity field \(\overline{\nabla \phi }=\nabla \phi _{mf}\).

  4. 4.

    \(\overline{\Delta \left[ \left( \phi -\phi _{mf}\right) ^{2}\right] }=0\). While \(\nabla (\phi -\phi _{mf})\) is a random vector field characterized by wild local fluctuation, this hypothesis amounts to assume that those fluctuations have no preferential direction.

We believe that these four assumptions would be satisfied by a typical triplet of fields (\(h,q,\mu )\) picked at random among all the possible states satisfying the constraints of the dynamics. By typical, we mean that an overwhelming number of fields would share these properties.

We then prove that these four assumptions are sufficient to prove that \(\mathscr {E}_{c,fluct}\) is equal to \(\mathscr {E}_{\delta \mu }\) (95) in the continuous limit. According to the assumption 1, \(\overline{\omega }=\overline{hq}-1\) is well defined. Classical arguments show that the streamfunction of the coarse-grained vorticity field \(\overline{\omega }\) is equal to the streamfunction of the vorticity field, i.e. that \(\nabla \psi _{mf}=\nabla \psi ,\) see e.g. [21, 33]. Qualitatively, this is due to the fact that inverting the Laplacian operator smooth out local fluctuations of the vorticity.Footnote 13 This yields

$$\begin{aligned} \mathbf {u}=\mathbf {u}_{mf}+\nabla \left( \phi -\phi _{mf}\right) . \end{aligned}$$
(184)

Injecting this expression in the kinetic energy density expression Eq. (181), using that h and \(\mu \) are not correlated (assumption 2), and using \(\overline{\nabla \phi }=\nabla \phi _{mf}\) (assumption 3) yields

$$\begin{aligned} \mathscr {E}_{c,fluct}=\frac{1}{2}\int \mathrm {d}\mathbf {x}\,\overline{h}\overline{\left( \nabla \left( \phi -\phi _{mf}\right) \right) ^{2}}. \end{aligned}$$
(185)

Let us now remember the definition of the coarse-graining operator in Eq. (178):

$$\begin{aligned} \overline{\left( \nabla \left( \phi -\phi _{mf}\right) \right) ^{2}}=\lim _{N\rightarrow \infty }N\int _{S_{ij}}\mathrm {d}\mathbf {x} \left( \nabla \left( \phi -\phi _{mf}\right) \right) ^{2},\quad \hbox {for }\mathbf {x}\in S_{ij}, \end{aligned}$$
(186)

where \(S_{ij}\) is the surface covered by a grid site \(\left( i,j\right) \). An integration by parts yields

$$\begin{aligned} N\int _{S_{ij}}\mathrm {d}\mathbf {x}\ \left( \nabla \left( \phi -\phi _{mf}\right) \right) ^{2}= & {} -N\int _{S_{ij}}\mathrm {d}\mathbf {x}\ \left[ \left( \Delta ^{-1/2}\left( \mu -\overline{\mu }\right) \right) \left( \Delta ^{1/2}\left( \mu -\overline{\mu }\right) \right) \right] \nonumber \\&+\,N\oint _{\partial S_{ij}}\mathrm {d}l\ \mathbf {n}\cdot \left( \phi -\phi _{mf}\right) \nabla \left( \phi -\phi _{mf}\right) \end{aligned}$$
(187)

Projecting the first term of the rhs on Laplacian eigenmodes allows to simplify the expression of the first term of the rhs in Eq. (187):

$$\begin{aligned} -N\int _{S_{ij}}\mathrm {d}\mathbf {x}\ \left[ \left( \Delta ^{-1/2}\left( \mu -\overline{\mu }\right) \right) \left( \Delta ^{1/2}\left( \mu -\overline{\mu }\right) \right) \right] =N\int _{S_{ij}}\mathrm {d}\mathbf {x}\ \left( \mu -\overline{\mu }\right) ^{2}. \end{aligned}$$
(188)

The second term of the rhs in Eq. (187) can be written as

$$\begin{aligned} N\oint _{\partial S_{ij}}\mathrm {d}l\ \mathbf {n}\cdot \left( \phi -\phi _{mf}\right) \nabla \left( \phi -\phi _{mf}\right) =\frac{N}{2}\int _{S_{ij}}\Delta \left[ \left( \phi -\phi _{mf}\right) ^{2}\right] \end{aligned}$$
(189)

which, according to assumption 4, vanishes in the large N limit. Finally, the kinetic energy density of the fluctuations is simply expressed as

$$\begin{aligned} \mathscr {E}_{c,fluct}=\frac{1}{2}\int \mathrm {d}\mathbf {x}\,\overline{h}\left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) . \end{aligned}$$
(190)

Finally, we use again the assumption 2 to get

$$\begin{aligned} \mathscr {E}_{c,fluct}=\frac{1}{2}\int \mathrm {d}\mathbf {x}\,\left( \overline{h\mu ^{2}}-\frac{\overline{h\mu }^{2}}{\overline{h}}\right) =\mathscr {E}_{\delta \mu }, \end{aligned}$$
(191)

which is the expected result.

Appendix 3: Critical Points of the Mean-Flow Variational Problem

In this Appendix, we compute the critical points of the mean-flow variational problem (100) stated in Sect. 3. In a first step, we solve an intermediate variational problem in order to show the factorization of the probability density \(\rho \) with a Gaussian behavior for the divergence fluctuations. Knowing that, we solve in a second step the original variational problem.

1.1 Intermediate Variational Problem

As the energy and the potential vorticity moments depend only on the coarse-grained fields \(\overline{h},\,\overline{h^{2}},\,\overline{h\mu },\,\overline{h\mu ^{2}}\) and the local potential vorticity moments \(\left\{ \overline{hq^{k}}\right\} \), we introduce an intermediate variational problem where these coarse-grained fields are given as constraint:

$$\begin{aligned} \max _{\rho ,\int \rho =1}\left\{ \mathscr {S}\left[ \rho \right] \;\left| \;\overline{h},\overline{h^{2}},\overline{h\mu },\overline{h\mu ^{2}},\left\{ \overline{hq^{k}}\right\} _{k\ge 1}\text {``fixed''}\right. \right\} . \end{aligned}$$
(192)

The idea of introducing the intermediate variational problem is to find a simpler ansatz for the probability density field \(\rho \). This ansatz will be used afterward into the general variational problem (100).

In order to compute the critical points of the variational problem (192), we introduce the Lagrange multipliers \(\alpha _{h}\left( \mathbf{x}\right) ,\,\alpha _{h2}\left( \mathbf{x}\right) ,\,\alpha _{h\mu }\left( \mathbf{x}\right) ,\,\alpha _{h\mu 2}\left( \mathbf{x}\right) ,\,\left\{ \alpha _{hq,k}\left( \mathbf{x}\right) \right\} _{k\ge 0}\text { and }\xi \left( \mathbf{x}\right) \) associated with the constraints \(\overline{h},\,\overline{h^{2}},\,\overline{h\mu },\,\overline{h\mu ^{2}},\,\left\{ \overline{hq^{k}}\right\} _{k\ge 1}\) and the normalization constraint, respectively. Using Eq. (89) and the first variations

$$\begin{aligned} \forall \delta \rho ,\ \delta S-\int \mathrm {d}\mathbf{x}\,\left[ \alpha _{h}\delta \overline{h} +\alpha _{h2}\delta \overline{h^{2}} +\alpha _{h\mu }\delta \overline{h\mu } +\alpha _{h\mu 2}\delta \overline{h\mu ^{2}} +\sum _{k=1}^{+\infty }\alpha _{hq,k}\delta \overline{hq^{k}} +\xi \int \delta \rho \right] =0, \end{aligned}$$
(193)

leads to

$$\begin{aligned} \sigma _{h}\log \left( \frac{\rho }{\sigma _{h}^{2}}\right) +\sigma _{h}+\xi +\alpha _{h}\sigma _{h}+\alpha _{h2}\sigma _{h}^{2}+\alpha _{h\mu }\sigma _{h}\sigma _{\mu }+\alpha _{h\mu 2}\sigma _{h}\sigma _{\mu }^{2}+\sum _{k=1}^{+\infty }\alpha _{hq,k}\sigma _{h}\sigma _{q}^{k}=0 \end{aligned}$$
(194)

We readily see from Eq. (194) that the probability density \(\rho \) factorizes into three decoupled probability densities \(\rho _{q},\,\rho _{h}\text { and }\rho _{\mu }\) corresponding respectively to the probability densities of the potential vorticity, the height and the divergence:

$$\begin{aligned} \rho =\rho _{q}\left( \mathbf{x},\sigma _{q}\right) \rho _{h}\left( \mathbf{x},\sigma _{h}\right) \rho _{\mu }\left( \mathbf{x},\sigma _{\mu }\right) . \end{aligned}$$
(195)

Using the constraints \(\overline{\mu }=\int \mathrm {d}\sigma _{\mu }\ \sigma _{\mu }\rho _{\mu }\), \(\overline{\mu ^{2}}=\int \mathrm {d}\sigma _{\mu }\ \sigma _{\mu }^{2}\rho _{\mu }\), as well as the normalization constraints \(\int \mathrm {d}\sigma _{\mu }\ \rho _{\mu }=\int \mathrm {d}\sigma _{h}\ \rho _{h}=\int \mathrm {d}\sigma _{q}\ \rho _{q}=1\), we get

$$\begin{aligned} {\left\{ \begin{array}{ll} \begin{array}{ccc} \rho _{q}\left( \mathbf{x},\sigma _{q}\right) &{} = &{} \frac{{\displaystyle \exp \left( -{\displaystyle \sum _{k=1}^{+\infty }\alpha _{hq,k}\left( \mathbf{x}\right) \sigma _{q}^{k}}\right) }}{{\displaystyle \int \mathrm {d}\sigma _{q}^{,}\,\exp \left( -{\displaystyle \sum _{k=1}^{+\infty }\alpha _{hq,k}\left( \mathbf{x}\right) \sigma _{q}^{,k}}\right) }}\\ \rho _{h}\left( \mathbf{x},\sigma _{h}\right) &{} = &{} \frac{{\displaystyle \sigma _{h}^{2}\exp \left( -\alpha _{h2}\left( \mathbf{x}\right) \sigma _{h}-\frac{\xi \left( \mathbf{x}\right) }{\sigma _{h}}\right) }}{{\displaystyle \int \mathrm {d}\sigma _{h}^{,}\,\sigma _{h}^{,2}\exp \left( -\alpha _{h2}\left( \mathbf{x}\right) \sigma _{h}^{,}-\frac{\xi \left( \mathbf{x}\right) }{\sigma _{h}^{,}}\right) }}\\ \rho _{\mu }\left( \mathbf{x},\sigma _{\mu }\right) &{} = &{} \frac{{\displaystyle \exp \left( -\frac{1}{2}\frac{\left( \sigma _{\mu }-\overline{\mu }\left( \mathbf{x}\right) \right) ^{2}}{\overline{\mu ^{2}}\left( \mathbf{x}\right) -\overline{\mu }^{2}\left( \mathbf{x}\right) }\right) }}{{\displaystyle \left( 2\pi \right) ^{1/2}\left( \overline{\mu ^{2}}\left( \mathbf{x}\right) -\overline{\mu }^{2}\left( \mathbf{x}\right) \right) ^{1/2}}} \end{array}&.\end{array}\right. } \end{aligned}$$
(196)

We could now re-inject these expressions into the main variational problem (100), but only factorization and the Gaussian form of \(\rho _{\mu }\) will be kept as an ansatz for \(\rho \), which will simplify the computations. Thanks to this intermediate variational problem, we now know that the critical points of the original variational problem must be of the form:

$$\begin{aligned} \rho \left( \mathbf{x},\sigma _{h},\sigma _{q},\sigma _{\mu }\right) =\rho _{h}\left( \sigma _{h},\mathbf{x}\right) \rho _{q}\left( \sigma _{q},\mathbf{x}\right) \frac{\exp \left( -\frac{1}{2}\frac{\left( \sigma _{\mu }-\overline{\mu }\right) ^{2}}{\overline{\mu ^{2}}-\overline{\mu }^{2}}\right) }{\left( 2\pi \right) ^{1/2}\left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) ^{1/2}}\ . \end{aligned}$$
(197)

The entropy defined in Eq. (89) is therefore (up to a constant):

$$\begin{aligned} \mathscr {S}\left[ \rho _{h},\rho _{q},\bar{\mu },\bar{\mu ^{2}}-\bar{\mu }^{2}\right]= & {} -\int \mathrm {d}\mathbf{x}\mathrm {d}\sigma _{h}\;\sigma _{h}\rho _{h}\log \left( \frac{\rho _{h}}{\sigma _{h}^{2}}\right) \nonumber \\&-\int \mathrm {d}\mathbf{x}\,\overline{h}\int \mathrm {d}\sigma _{q}\rho _{q}\log \left( \rho _{q}\right) +\int \mathrm {d}\mathbf{x}\;\frac{\overline{h}}{2}\log \left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) . \end{aligned}$$
(198)

As a consequence of Eq. (197), the height field, the potential vorticity field and the divergence field are decorrelated. This property allows to rewrite the energy defined in Eq. (93)

$$\begin{aligned} \mathscr {E}\left[ \rho _{h},\rho _{q},\overline{\mu },\overline{\mu ^{2}}-\overline{\mu }^{2}\right] =\mathscr {E}_{mf}\left[ \overline{h},\overline{q},\overline{\mu }\right] +\mathscr {E}_{\delta \mu }\left[ \overline{h},\overline{\mu ^{2}}-\overline{\mu }^{2}\right] +\mathscr {E}_{\delta h}\left[ \overline{h},\overline{h^{2}}\right] , \end{aligned}$$
(199)

where

$$\begin{aligned} {\left\{ \begin{array}{ll} \mathscr {E}_{mf}\left[ \overline{h},\overline{q},\overline{\mu }\right] =\frac{1}{2}\int \mathrm {d}\mathbf{x}\,\left( \overline{h}\mathbf{u}_{mf}^{2}+g\left( \overline{h}+h_{b}-1\right) ^{2}\right) \\ \mathscr {E}_{\delta \mu }\left[ \overline{h},\overline{\mu ^{2}}-\overline{\mu }^{2}\right] =\frac{1}{2}\int \mathrm {d}\mathbf{x}\,\overline{h}\left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) \\ \mathscr {E}_{\delta h}\left[ \overline{h},\overline{h^{2}}\right] =\frac{g}{2}\int \mathrm {d}\mathbf{x}\,\left( \overline{h^{2}}-\overline{h}^{2}\right) \end{array}\right. } \end{aligned}$$
(200)

with \(\mathbf{u}_{mf}=\nabla ^{\bot }\Delta ^{-1}\left( \overline{q}\overline{h}-f\right) +\nabla \Delta ^{-1/2}\overline{\mu }\) . Similarly the potential vorticity moments (96) can be rewritten

$$\begin{aligned} \forall k\quad \mathscr {Z}_{k}\left[ \overline{h},\overline{q^{k}}\right] =\int \mathrm {d}\mathbf{x}\,\overline{h}\overline{q^{k}} \end{aligned}$$
(201)

where the coarse-grained moments are now defined as

$$\begin{aligned} \overline{h^{l}}=\int \mathrm {d}\sigma _{h}\;\sigma _{h}^{l}\rho _{h},\qquad \overline{q^{m}}=\int \mathrm {d}\sigma _{q}\;\sigma _{q}^{m}\rho _{q}. \end{aligned}$$
(202)

Thus, the general variational problem of the equilibrium theory given in Eq. (100) can be recast into a new variational problem on the independent variables \(\rho _{h}\left( \mathbf {x},\sigma _{h}\right) ,\,\rho _{q}\left( \mathbf {x},\sigma _{q}\right) ,\;\overline{\mu }\left( \mathbf {x}\right) \) and \(\left[ \overline{\mu ^{2}}-\overline{\mu }^{2}\right] \left( \mathbf {x}\right) \):

$$\begin{aligned} S\left( E,D\right)= & {} \max _{\underset{\int \rho _{h}=1,\int \rho _{q}=1}{\rho _{h},\rho _{q},\overline{\mu },\overline{\mu ^{2}}-\overline{\mu }^{2}}}\left\{ \mathscr {S}\left[ \rho _{h},\rho _{q},\overline{\mu },\overline{\mu ^{2}}-\overline{\mu }^{2}\right] \Big |\ \right. \nonumber \\&\qquad \qquad \ \quad \qquad \left. \mathscr {E}\left[ \rho _{h},\rho _{q},\overline{\mu },\overline{\mu ^{2}}-\overline{\mu }^{2}\right] = E,\ \forall k\quad \mathscr {Z}_{k}\left[ \rho _{h},\rho _{q}\right] =Z_{k} \right\} .\nonumber \\ \end{aligned}$$
(203)

1.2 Computation of the Critical Points

In this section, we compute the critical points of the variational problem defined in Eq. (203). We introduce the Lagrange multiplier \(\beta ,\;\left\{ \alpha _{k}\right\} _{k\ge 0},\;\xi _{q}\left( \mathbf{r}\right) \text { and }\xi _{h}\left( \mathbf{r}\right) \) associated respectively with the energy, the potential vorticity moments and the normalization constraints. Critical points of the variational problem (203) are solutions of

$$\begin{aligned}&\forall \delta \rho _{q},\delta \rho _{h},\delta \overline{\mu },\delta \left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) ,\nonumber \\&\quad \delta \mathscr {S}-\beta \delta \mathscr {E}-\sum _{k=0}^{+\infty }\,\alpha _{k}\delta \mathscr {Z}_{k}-\int \mathbf {dx}\,\left( \xi _{q}\int \delta \rho _{q}+\xi _{h}\int \delta \rho _{h}\right) =0. \end{aligned}$$
(204)

The first variations of the macrostate entropy \(\mathscr {S}\) (198) are

$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{\delta \mathscr {S}}{\delta \rho _{h}} =-\sigma _{h}\left( \log \left( \frac{\rho _{h}}{\sigma _{h}^{2}}\right) +1\right) -\sigma _{h}\int \mathrm {d}\sigma _{q}\rho _{q}\log \left( \rho _{q}\right) +\sigma _{h}\frac{1}{2}\log \left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) \\ \frac{\delta \mathscr {S}}{\delta \rho _{q}} =-\overline{h}\left( \log \left( \rho _{q}\right) +1\right) \\ \frac{\delta \mathscr {S}}{\delta \overline{\mu }} =0\\ \frac{\delta \mathscr {S}}{\delta \left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) } =\frac{\overline{h}}{2\left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) } \end{array}\right. }. \end{aligned}$$
(205)

First variations of the energy given in Eqs. (199) and (200) contain three contributions: \(\delta \mathscr {E}=\delta \mathscr {E}_{mf}+\delta \mathscr {E}_{\delta \mu }+\delta \mathscr {E}_{\delta h}\). The first contribution is

$$\begin{aligned} \delta \mathscr {E}_{mf}=\int \mathrm {d}\mathbf{x}\;\left[ B_{mf}\delta \overline{h}+\left( \overline{h}\mathbf{u}_{mf}\right) \cdot \delta \mathbf{u}_{mf}\right] , \end{aligned}$$
(206)

where \(B_{mf}=\mathbf{u}_{mf}^{2}/2+g\left( \overline{h}+h_{b}-1\right) \) is the mean-flow Bernoulli function defined in Eq. (115). Then, using the Helmholtz decompositions \(\mathbf{u}_{mf}=\nabla ^{\bot }\psi _{mf}+\nabla \phi _{mf}\) and recalling that \(\overline{h}\mathbf{u}_{mf}=\nabla ^{\bot }\Psi _{mf}+\nabla \Phi _{mf}\), two integrations by parts with the impermeability boundary condition yield

$$\begin{aligned} \delta \mathscr {E}_{mf}=\int \mathrm {d}\mathbf{x}\;\left[ B_{mf}\delta \overline{h}-\Psi _{mf}\delta \Delta \psi _{mf}-\Phi _{mf}\delta \Delta \phi _{mf}\right] . \end{aligned}$$
(207)

Using \(\Delta \psi _{mf}=\overline{h}\overline{q}-f\) and \(\Delta ^{1/2}\phi _{mf}=\overline{\mu }\) and the definition of the operator \(\Delta ^{1/2}\) leads to the final expression

$$\begin{aligned} \delta \mathscr {E}_{mf}=\int \mathrm {d}\mathbf{x}\;\left[ \left( B_{mf}-\overline{q}\Psi _{mf}\right) \delta \overline{h}-\overline{h}\Psi _{mf}\delta \overline{q}-\Delta ^{1/2}\Phi _{mf}\delta \overline{\mu }\right] . \end{aligned}$$
(208)

Finally, we get:

$$\begin{aligned} {\left\{ \begin{array}{ll} \frac{\delta \mathscr {E}}{\delta \rho _{h}} =\sigma _{h}\left( B_{mf}-\overline{q}\Psi _{mf}+\frac{\overline{\mu ^{2}}-\overline{\mu }^{2}}{2}+g\left( \frac{\sigma _{h}}{2}-\overline{h}\right) \right) \\ \frac{\delta \mathscr {E}}{\delta \rho _{q}} =-\sigma _{q}\Psi _{mf}\overline{h}\\ \frac{\delta \mathscr {E}}{\delta \bar{\mu }} =-\Delta ^{1/2}\Phi _{mf}\\ \frac{\delta \mathscr {E}}{\delta \left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) } =\frac{\overline{h}}{2} \end{array}\right. }, \end{aligned}$$
(209)

First variations of the potential vorticity moments are

$$\begin{aligned} \forall k\in \mathbb {N}\quad {\left\{ \begin{array}{ll} \frac{\delta \mathscr {Z}_{k}}{\delta \rho _{h}} =\sigma _{h}\overline{q^{k}}\\ \frac{\delta \mathscr {Z}_{k}}{\delta \rho _{q}} =\bar{h}\sigma _{q}^{k}\\ \frac{\delta \mathscr {Z}_{k}}{\delta \overline{\mu }} =0\\ \frac{\delta \mathscr {Z}_{k}}{\delta \left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) } =0 \end{array}\right. }, \end{aligned}$$
(210)

Injecting Eqs. (205), (209), and (210) in Eq. (204), and collecting the term in factor of \(\delta \left( \overline{\mu ^{2}}-\overline{\mu }^{2}\right) \) leads to

$$\begin{aligned} \overline{\mu ^{2}}-\overline{\mu }^{2}=\frac{1}{\beta }. \end{aligned}$$
(211)

Injecting Eq. (211) in the expression of \(\rho _{\mu }\) given in Eq. (196) yields then

$$\begin{aligned} \rho _{\mu }\left( \mathbf{x},\sigma _{\mu }\right) =\left( \frac{\beta }{2\pi }\right) ^{1/2}{\displaystyle \exp \left( -\frac{1}{2}\beta \left( \sigma _{\mu }-\overline{\mu }\left( \mathbf{x}\right) \right) ^{2}\right) }. \end{aligned}$$
(212)

Similarly, collecting the term in factor of \(\delta \rho _{q}\) in Eq. (204) leads to

$$\begin{aligned} 0=\bar{h}\left( \log \left( p_{q}\right) +1\right) -\beta \sigma _{q}\Psi _{mf}\bar{h}+\sum _{k=0}^{+\infty }\alpha _{k}\bar{h}\sigma _{q}^{k}+\xi _{q}, \end{aligned}$$
(213)

which, using the normalization constraint, leads to

$$\begin{aligned}&\rho _{q}\left( \mathbf{x},\sigma _{q}\right) =\frac{1}{\mathbb {G}_{q}}{\displaystyle \exp \left( \beta \sigma _{q}\Psi _{mf}-\sum _{k=1}^{+\infty }\alpha _{k}\sigma _{q}^{k}\right) },\nonumber \\&\quad \mathbb {G}_{q}={\displaystyle \int \mathrm {d}\sigma _{q}^{,}\;\exp \left( \beta \sigma _{q}^{,}\Psi _{mf}-\sum _{k=1}^{+\infty }\alpha _{k}\sigma _{q}^{,k}\right) }. \end{aligned}$$
(214)

Note that the sum inside the exponential is performed from \(k=1\) to \(k=+\infty \). The Lagrange parameter \(\xi _{q}\) has been determined using the normalization condition for the pdf.

Collecting the term in factor of \(\delta \rho _{h}\) in Eq. (204) yields

$$\begin{aligned}&-\left( \log \left( \frac{\rho _{h}}{\sigma _{h}^{2}}\right) +1\right) -\int \mathrm {d}\sigma _{q}\rho _{q}\log \left( \rho _{q}\right) -\frac{1}{2}\log \left( \beta \right) -\beta \left( B_{mf}+\frac{\beta ^{-1}}{2}+g\left( \frac{\sigma _{h}}{2}-\overline{h}\right) \right) \nonumber \\&\quad -\frac{\xi _{h}}{\sigma _{h}}+\beta \overline{q}\Psi _{mf}-\sum _{k\ge 0}\alpha _{k}\overline{q^{k}}=0, \end{aligned}$$
(215)

which, using Eq. (214), leads to

$$\begin{aligned}&-\left( \log \left( \frac{\rho _{h}}{\sigma _{h}^{2}}\right) +1\right) +\log \left( \mathbb {G}_{q}\right) -\frac{1}{2}\log \beta \nonumber \\&\quad -\beta \left( B_{mf}+\frac{\beta ^{-1}}{2}+g\left( \frac{\sigma _{h}}{2}-\overline{h}\right) \right) -\frac{\xi _{h}}{\sigma _{h}}-\alpha _{0}=0. \end{aligned}$$
(216)

Using the fact that \(\mathbb {G}_{q}\) and \(B_{mf}\) are fields depending only on \(\mathbf {x}\), and using the normalization constraint for the pdf \(\rho _{h}(\mathbf {x},\sigma _{h})\), Eq. (216) yields

$$\begin{aligned} \rho _{h}\left( \mathbf{x},\sigma _{h}\right) =\frac{{\displaystyle \sigma _{h}^{2}}}{{\displaystyle \mathbb {G}_{h}}}\exp \left( -\beta \frac{g}{2}\sigma _{h}-\frac{\xi _{h}}{\sigma _{h}}\right) ,\quad \mathbb {G}_{h}=\int \mathrm {d}\sigma _{h}^{,}\;\sigma _{h}^{2}\exp \left( -\beta \frac{g}{2}\sigma _{h}^{,}+\frac{\xi _{h}}{\sigma _{h}^{,}}\right) . \end{aligned}$$
(217)

Injecting Eq. (217) back into Eq. (216) yields

$$\begin{aligned} B_{mf}=\beta ^{-1}\log \left( \mathbb {G}_{q}\mathbb {G}_{h}\right) +g\overline{h}+\beta ^{-1}\left( -\alpha _{0}-\frac{3}{2}+\frac{1}{2}\log \beta \right) . \end{aligned}$$
(218)

One can notice that \(\alpha _{0}\) the Lagrange parameter related to the conservation of the total mass appears only here. Thus the last term \(\beta ^{-1}\left( \alpha _{0}-3/2+\log \left( \beta \right) /2\right) \) in Eq. (218) can be computed from the conservation of the total mass \(\mathscr {Z}_{0}=Z_{0}\) and will be denoted \(A_{0}\) in the following.

Collecting the terms in factor of \(\delta \overline{\mu }\) in Eq. (204) leads to

$$\begin{aligned} \Phi _{mf}=0. \end{aligned}$$
(219)

Appendix 4: Global Maximizers of the Entropy of the Large Scale Flow

We compute in this appendix an upper-bound for the macrostate entropy of the large scale flow defined in Eq. (130), for a given set of potential vorticity moment constraints defined in Eq. (92) (and arbitrary energy), and then show that when \(Z_{1}=f\) and \(h_{b}=0\), this upper bound for the macroscopic entropy is reached by the rest state.

This upper bound is the solution of the following variational problem:

$$\begin{aligned} S_{mf,max}=\max _{\begin{array}{c} \overline{h},\rho _{q}\\ \int \rho _{q}=1 \end{array} }\left\{ \mathscr {S}_{mf}\left[ \overline{h},\rho _{q}\right] \ \left| \ \forall k\quad \mathscr {Z}_{k}\left[ \overline{h},\rho _{q}\right] =Z_{k}\right. \right\} . \end{aligned}$$
(220)

Introducing Lagrange parameters \(\left\{ \gamma _{k}\right\} _{k\ge 0}\) associated with the potential vorticity moment constraints and the Lagrange parameter \(\xi (\mathbf {x})\) associated with the normalization constraint, the cancellation of first variations yields

$$\begin{aligned} \forall \delta \rho _{q},\delta \overline{h},\quad \delta \mathscr {S}_{mf}-\sum _{k=0}^{+\infty }\gamma _{k}\delta \mathscr {Z}_{k}+\int \mathrm {d\mathbf {x}}\mathrm {\ }\xi \delta \overline{1}=0. \end{aligned}$$
(221)

The solution of this equation is

$$\begin{aligned} \rho _{q}=\frac{\exp ^{-\sum _{k=1}^{+\infty }\gamma _{k}\sigma ^{k}}}{\int \mathrm {d}\sigma \ \exp ^{-\sum _{k=1}^{+\infty }\gamma _{k}\sigma ^{k}}}\equiv \rho _{global}\left( \sigma \right) \end{aligned}$$
(222)

where \(\rho _{global}\) depends only on the potential vorticity moments constraints \(\left\{ Z_{k}\right\} _{k\ge 1}\), and is independent from \(\mathbf {x}\) and

$$\begin{aligned} \overline{h}\left( \mathbf {x}\right) =1 \end{aligned}$$
(223)

Note that the states characterized \(\rho _{q}=\rho _{global}\), \(\overline{h}=1\) are solutions of the variational problem in Eq. (220), but this is only a subclass of the solutions of the variational problem of the equilibrium theory given in Eq. (153), which includes an additional energy constraint.

We have shown in Sect. 4.1 that for a given \(\rho _{q}\), the large scale flow which is a solution (153) is obtained by solving Eqs. (117) and (118) for \(\Psi _{mf}\) and \(\overline{h}\). Here we consider the particular case \(\rho _{q}=\rho _{global}\) and \(\overline{h}=1\). One can compute \(\overline{h}\overline{q}_{global}=\int \mathrm {d}\mathbf {x}\ \sigma \rho _{global}=Z_{1}\). We conclude that the large scale flow of the equilibrium state is also a global entropy maximizer, i.e. a solution of (220) when

$$\begin{aligned}&\displaystyle Z_{1}-f=\Delta \Psi _{mf}\ ,\end{aligned}$$
(224)
$$\begin{aligned}&\displaystyle \frac{1}{2}\left( \nabla \Psi _{mf}\right) ^{2}+gh_{b}=A_{2}. \end{aligned}$$
(225)

where \(A_{2}=\beta \log \mathbb {G}_{q}-A_{1}\) is a constant. We see that in the case (\(Z_{1}=f\), \(h_{b}=0\)), the solution of Eqs. (224) and (225) is the rest state \(\Psi _{mf}=cst\) (with \(A_{2}=0\)). We conclude that the maximum of the macroscopic entropy of the large scale flow is reached by a flow at rest when there is no circulation (\(Z_{1}=f\)) and no bottom topography (\(h_{b}=0\)).

Appendix 5: Comparison with a Eulerian Discrete Model

The aim of this appendix is to discuss the construction of a possible invariant measure for the shallow water equations through an Eulerian discretization. We prove that the obtained equilibrium states differ from the one obtained through the semi-Lagrangian discretization used in the core of the paper. Moreover, we prove that the equilibrium states are not stationary states of the shallow water equations and that the statistical equilibria are not stable through coarse-graining.

We define a purely Eulerian discrete model by considering the same uniform \(N\times N\) grid as for the semi-Lagrangian model, but assuming that each node is now divided into a finer \(n\times n\) uniform microscopic grid. A microscopic configuration is given by the values of the fields \((h,q,\mu )\) for all the nodes of the microscopic grid:

$$\begin{aligned} y_{\mathrm {micro}}\equiv \{h_{IJ,ij},q_{IJ,ij},\mu _{IJ,ij}\}_{\begin{array}{c} 1\le I,J\le N\\ 1\le i,j \le n \end{array}}, \end{aligned}$$
(226)

where (IJ) and (ij) correspond respectively to the position on the macroscopic grid and the position on the microscopic grid within the macroscopic node.

Contrary to the semi-Lagrangian model, the Eulerian model has the desired property to possibly be compatible with the formal Liouville theorem derived in Appendix 1 for the continuous dynamics (although no mathematical result exist). However, the volume of fluid varies from one microscopic grid node to another in the Eulerian model, depending on the value of the height \(h_{IJ,ij}\). By comparison, our semi-Lagrangian approach respects the Lagrangian conservation laws (the height h is defined through the particle mass conservation). Because of the need to go through a discretization to build the microcanonical measure, we see that both the Eulerian and the semi-Lagrangian approaches necessarily break part of the geometric conservation laws of the continuous model. Hopefully rigorous mathematical proof of the convergence of the measures of one of the discretized model to an invariant measure of the continuous equations will settle rigorously this issue in a near future, however nobody seem to know how to attack this problem mathematically. We are thus led to the conclusion that based on current knowledge, there is no clear mathematical or theoretical a priori argument to choose either the Eulerian or the semi-Lagrangian discretization in order to guess the microcanonical measures. For now, the use of one discrete model or another to guess the microcanonical measure of the continuous shallow water equations can therefore only be justified a posteriori.

Let us now define the empirical density field as

$$\begin{aligned} d_{IJ}(\sigma _{h},\sigma _{q},\sigma _{\mu })[y_{\mathrm {micro}}]=\frac{1}{n}\sum _{i,j=1}^{n}\delta (h_{IJ,ij}-\sigma _{h})\delta (q_{IJ,ij}-\sigma _{q})\delta (\mu _{IJ,ij}-\sigma _{\mu }). \end{aligned}$$
(227)

One can now compute the entropy of the macrostates \(\rho =\left\{ y_{\textit{micro}}\left| \,\forall I,J\,\, d_{IJ}\left[ y_{\textit{micro}}\right] =\rho _{IJ}\right. \right\} \), which, after taking first the limit \(n\rightarrow \infty \) and then the limit \(N\rightarrow \infty \) leads to

$$\begin{aligned} \mathscr {S}_{\mathrm {Eul}}[\rho ]=-\int \mathrm {d}\mathbf {x}\mathrm {d}\sigma _{h}\mathrm {d}\sigma _{q}\mathrm {d}\sigma _{\mu }\quad \rho (\mathbf {x},\sigma _{h},\sigma _{q},\sigma _{\mu })\log \left( \frac{\rho (\mathbf {x},\sigma _{h},\sigma _{q},\sigma _{\mu })}{\sigma _{h}^{3}}\right) . \end{aligned}$$
(228)

This Eulerian macrostate entropy has to be compared with the macrostate entropy for the semi-Lagrangian discrete model given in Eq. (89). We can switch from expression to the other by changing \(\rho \) into \(\sigma _{h}\rho \). We note that the two entropies become equivalent at lowest order in the limit of weak height fluctuations and weak height variations. However, in the general case, they are different, and therefore lead to different equilibrium states. In particular, is it straightforward to show that because of the absence of the factor \(\sigma _h\) in the expression of this Eulerian macrostate entropy (228), the critical points \(\rho (\mathbf {x},\sigma _h,\sigma _q,\sigma _{\mu })\) of the microcanonical variational problem do not factorize. Consequently, small scale height and velocity fluctuations of the equilibrium state are correlated. One can then show that those correlations are associated with non-zero Reynolds stresses in the momentum equations. In particular, the equilibrium state of Eulerian model satisfies

$$\begin{aligned} J(\Psi ,\overline{q})=-\overline{J(\Psi ^{\prime },q^{\prime })}-\overline{J(\Phi ^{\prime },q^{\prime })} , \end{aligned}$$
(229)

where the r.h.s. is non-zero. If one removes those small scale fluctuations, the large scale flow is not a stationary state of the dynamics since \(J(\Psi ,\overline{q})\ne 0\). In other words, the equilibrium states of the Eulerian model are not stable by coarse-graining, contrary to the equilibria of the semi-Lagrangian model. Moreover, Eq. (229) and the properties of stationary states derived in Sect. 2.2 imply that neither the potential vorticy field \(\overline{q}\) nor the Bernoulli potential \(B_{\mathrm {mf}}\) can simply be expressed as a function of \(\Psi _{\mathrm {mf}}\). As shown in Sect. 4.3.1, the fact that \(B_{\mathrm {mf}}\) is a function of \(\Psi _{\mathrm {mf}}\) is essential to prove that the equilibrium is characterized by geostrophic balance at lowest order in the Rossby number Ro, when \(Ro\rightarrow 0\). Consequently, the proof of geostrophic balance derived in the framework of the semi-Lagrangian model does not hold in the framework of the Eulerian model, unless the bottom topography is sufficiently small (\(h_b\sim Ro\)).

Let us finally argue that the stability by coarse-graining is a desirable physical property for the equilibrium states.

The first argument is a body of empirical observations. In either experiments, geophysical flows or numerical simulations flows governed by the shallow water equations (or the Navier-Stokes equations or the primitive equations in a shallow water regime) in the inertial limit (when they are subjected to weak forcing and dissipation, with a clear time scale separation) do actually self-organize and form large scale coherent structures for which there is a gradual decoupling of the flow large scales and small scales. A prominent example is the velocity field of Jupiter’s troposphere.

The second argument follows. Macrostates that evolve through an autonomous equation, must increase the Boltzmann entropy. This is a general result in statistical mechanics, which is a consequence of the definition of the macrostate entropy as a Boltzmann entropy. Indeed as the Boltzmann’s entropy measure the number of microstates corresponding to a given macrostate, it must increase for most of initial conditions. When there is furthermore a concentration property (which is the case for the shallow water case, both the the Eulerian and sem–Lagrangian discretizations), the number of initial conditions for which the entropy can decrease decays exponentially with N (N is often the number of particles in statistical mechanics, here the number of degrees of freedom of our discretization). As a consequence, the set of equilibrium macrostates (entropy maxima) has to be stable through the dynamics for most initial conditions. In the shallow water case, in statistical equilibrium, obtained either using the semi-Lagrangian or Eulerian discretization discussed above, the stream function concentrates close to a single field (the stream function fluctuations vanish in the large N limit). As a consequence the macrostate stream function, which is a single field thanks to this concentration property, has to be stationary for the dynamics. Those two properties, that follow from the definition of the Boltzmann entropy, are actually verified for the equilibrium measure constructed from a semi-Lagrangian discretization, but not for the equilibrium measure constructed from a Eulerian discretization. For this reason, we conclude that the microcanonical measure constructed from the purely Eulerian discretization is inconsistent with the shallow water dynamics.

We note moreover that the stability of the equilibrium macrostates through coarse graining ensures that the equilibrium states of the inviscid system are not affected by perturbations such as a weak small scale dissipation in momentum equations. This property is not a-priori required for the invariant measure of the shallow-water equations. However It is extremely interesting as it is a hint that this invariant measure may be relevant for non perfect flow in the inertial limit.

Appendix 6: Energy–enstrophy Ensemble

1.1 Computation of the Critical Points

In this Appendix, we compute the solutions of the variational problem (158) and describe the corresponding phase diagram. Critical points of the variational problem (158) are computed through the variational principle:

$$\begin{aligned} \forall \delta \rho _{g},\quad \delta \mathscr {S}_{mf,g}-\frac{1}{E_{\textit{fluct}}}\delta \mathscr {E}_{mf,g}-\gamma _{2}\delta \mathscr {Z}_{g2}-\gamma _{1}\delta \mathscr {Z}_{g1}-\int \mathrm {d}\mathbf {x}\ \xi (\mathbf {x})\int \mathrm {d}\sigma _{q}\ \delta \rho _{g}=0, \end{aligned}$$
(230)

where \(\gamma _{2},\gamma _{1}\) and \(\xi (\mathbf {x}\) are Lagrange multipliers associated with the enstrophy conservation, the circulation conservation, and the normalization respectively. Anticipating the coupling between the large scale quasi-geostrophic flow and the small scale fluctuations, the temperature is denoted \(E_{\textit{fluct}}\) (the inverse temperature is the Lagrange parameter associated with energy conservation).This yields

$$\begin{aligned} \rho _{g}\left( \mathbf{x},\sigma _{q}\right) =\sqrt{\frac{1}{2\pi \left( Z_{2}-\overline{Z}_{2}\right) }}\exp \left[ -\frac{1}{2\left( Z_{2}-\overline{Z}_{2}\right) }\left( \sigma _{q}-\left( \frac{\psi _{mf}}{E_{\textit{fluct}}}-\gamma _{1}\right) \left( Z_{2}-\overline{Z}_{2}\right) \right) ^{2}\right] \end{aligned}$$
(231)

where we have introduced the enstrophy of the coarse-grained potential vorticity

$$\begin{aligned} \overline{Z}_{2}\equiv \int \mathrm {d}\mathbf {x}\overline{q}_{g}^{2}. \end{aligned}$$
(232)

Injecting (231) in Eq. (147), using the mass conservation constraint given in Eq. (144) and the zero circulation constraint \(\mathscr {Z}_{1}\left[ \overline{q}_{g}\right] =0\) yields

$$\begin{aligned} \overline{q}_{g}=\widetilde{\beta }\psi _{mf}\quad \hbox {with }\widetilde{\beta }\equiv \frac{\left( Z_{2}-\overline{Z_{2}}\right) }{E_{\textit{fluct}}}. \end{aligned}$$
(233)

Note that \(\widetilde{\beta }\) is necessarily positive given that \(Z_{2}-\overline{Z_{2}}\ge 0\). Injecting Eq. (233) in Eq. (149), the streamfunction can be computed explicitly by solving

$$\begin{aligned} \widetilde{\beta }\psi _{mf}=\Delta \psi _{mf}-\frac{1}{R^{2}}\psi _{mf}+h_{b}. \end{aligned}$$
(234)

In order to solve this equation, it is convenient to introduce the Laplacian eigenmodes of the domain \(\mathscr {D}\), with \(k\in \mathbb {N}^{+}\):

$$\begin{aligned} \Delta e_{k}=-\lambda _{k}^{2}e_{k}\quad \hbox {with }e_{k}=0\ \hbox {on} \partial \mathscr {D}, \end{aligned}$$
(235)

where the eigenvalues \(-\lambda _{k}^{2}\) are arranged in decreasing order. We assume those eigenvalues are pairwise distinct. We also assume that the bottom topography is sufficiently smooth such that \(\sum _{k}\left| h_{bk}\right| ^{2}\lambda _{k}^{2}<+\infty \). Then, given that \(\widetilde{\beta }>0\), the projection of the mean flow streamfunction on the Laplacian eigenmode \(e_{k}(\mathbf {x)}\) is obtained directly from Eq. (234):

$$\begin{aligned} \psi _{k}=\frac{h_{bk}}{\widetilde{\beta }+\lambda _{k}^{2}+R^{-2}}. \end{aligned}$$
(236)

We see that there is a unique solution \(\psi _{mf}\) for each value of \(\widetilde{\beta }\). This solution is therefore the equilibrium state. All the large scale flows associated with statistical equilibrium states of the shallow water system restricted to the energy–enstrophy ensemble with zero circulation are obtained from Eq. (236) when varying \(\widetilde{\beta }\) from 0 to \(+\infty \).

1.2 Construction of the Phase Diagram

The problem is now to find which equilibrium state is associated with the constraints \((E,Z_{2})\). In the following, we explain how to find the equilibrium states associated with parameters \((E_{mf},Z_{2})\), and how to compute the temperature \(E_{fluc}\) for each of those states. It is then straightforward to obtained the total energy \(E=E_{mf}+E_{fluc}\).

Injecting Eq. (236) in the expression of the quasi-geostrophic mean-flow energy defined in Eq. (150) yields

$$\begin{aligned} E_{mf}=\frac{1}{2}\sum _{k=1}^{+\infty }\left( \lambda _{k}^{2}+R^{-2}\right) \left( \frac{\left| h_{bk}\right| }{\widetilde{\beta }+\lambda _{k}^{2}+R^{-2}}\right) ^{2}. \end{aligned}$$
(237)

The mixing energy \(E_{\textit{mix}}\) defined in Eq. (155) is recovered for \(\widetilde{\beta }=0\), given that \(Z_{1}=0\). In the range \(\widetilde{\beta }>0\), the energy \(E_{mf}\) is a decreasing function of \(\widetilde{\beta }\), varying from \(E_{mf}=E_{\textit{mix}}\) to \(E_{mf}=0\), see Fig. 5b, d.

Injecting Eq. (236) in the expression of the macroscopic enstrophy given in Eq (232) yields

$$\begin{aligned} \overline{Z}_{2}=\sum _{k=1}^{+\infty }\left| h_{bk}\right| ^{2}\left( 1-\frac{\lambda _{k}^{2}+R^{-2}}{\widetilde{\beta }+\lambda _{k}^{2}+R^{-2}}\right) ^{2}. \end{aligned}$$
(238)

The potential enstrophy \(Z_{b}\) defined in Eq. (159) is recovered for \(\widetilde{\beta }=+\infty \). The macroscopic enstrophy \(\overline{Z}_{2}\) is an increasing function of \(\widetilde{\beta }\), varying from \(\overline{Z_{2}}=0\) (for \(\widetilde{\beta }=0\)) to \(\overline{Z_{2}}=Z_{b}\) for (\(\widetilde{\beta }=+\infty \) ), see Fig. 5a, c.

Two expressions of the macroscopic enstrophy \(\overline{Z_{2}}\) in terms of the parameters \(\widetilde{\beta }\) have been obtained: one is given by Eq. (238), the other arises from the definition of \(\widetilde{\beta }\) in Eq. (233), which yields

$$\begin{aligned} \overline{Z_{2}}=Z_{2}-E_{\textit{fluct}}\widetilde{\beta }. \end{aligned}$$
(239)

For given values of \(E_{\textit{fluct}}\) and \(Z_{2}\), the values of \(\widetilde{\beta }\) and \(\overline{Z_{2}}\) are obtained by finding the intersection between the two curves defined in Eq. (238) and (239), respectively. Once \(\widetilde{\beta }\) is obtained, Eq. (237) gives directly the value of the mean-flow energy \(E_{mf}\). The phase diagram presented in Fig. 2 is obtained numerically by using this procedure. Graphical arguments presented in the following allow to understand the structure of this phase diagram.

Fig. 5
figure 5

a Variation of the macroscopic enstrophy \(Z_{2}\) over \(\widetilde{\beta }\), case \(Z_2>Z_b\). b Variation of the mean-flow energy \(E_{mf}\) with \(\widetilde{\beta }\), case \(Z_2<Z_b\). c) Variation of the macroscopic enstrophy \(Z_{2}\) with \(\widetilde{\beta }\), case \(Z_2<Z_b\). d) Variation of the mean-flow energy \(E_{mf}\) with \(\widetilde{\beta }\), case \(Z_2<Z_b\)

1.3 Limit Cases for the Energy Partition

Let us first note through Fig. 5a, c that \(\widetilde{\beta }\) is an decreasing function of \(E_{\textit{fluct}}\). Indeed, \(\widetilde{\beta }\) is given by the intersection between the solid curve representing the expression of \(\overline{Z}_{2}\) given Eq. (238) and the dashed line representing the affine expression of \(\overline{Z}_{2}\) given Eq. (239) where \(-E_{\textit{fluct}}\) is the slope. Then we know that the total energy \(E=E_{mf}(\widetilde{\beta })+E_{\textit{fluct}}\) is an increasing function of \(E_{\textit{fluct}}\). Let us now consider different limit cases.

The limit \({E\rightarrow \infty }\) with \({Z_2}\) fixed In this limit, we have also \(E_{\textit{fluct}}\rightarrow \infty \). and \(\widetilde{\beta }\rightarrow 0\) Hence, one gets from Eq. (237) (see also Fig. 5b, d):

$$\begin{aligned} \lim _{E\rightarrow +\infty }E_{mf}=E_{\textit{mix}},\quad \lim _{E\rightarrow +\infty }\frac{E_{mf}}{E}=0. \end{aligned}$$
(240)

The lowest E limit with \({Z_2<Z_{b}}\) fixed In this limit, we have also \(E_{\textit{fluct}}\rightarrow 0\). One gets from Fig. 5-c that \(\widetilde{\beta }\rightarrow \widetilde{\beta }_{\textit{max}}\left( Z_2\right) \). Hence, \(E_{mf}\) reaches a minimum admissible energy \(E_{\textit{min}}\left( Z_2\right) =E_{mf}\left( \widetilde{\beta }_{\textit{max}}\left( Z_2\right) \right) \). Then:

$$\begin{aligned} \lim _{E\rightarrow E_{\textit{min}}\left( Z_2\right) }\frac{E_{mf}}{E}=1. \end{aligned}$$
(241)

The limit \({E\rightarrow 0}\) with \({Z_2>Z_{b}}\) fixed In this limit, we have also \(E_{\textit{fluct}}\rightarrow 0\). One gets from Fig. 5a that \(\widetilde{\beta }\rightarrow \infty \) and that \(\overline{Z}_2 \rightarrow Z_b\). Hence, from Eqs. (237) and (239), we obtain:

$$\begin{aligned} {\left\{ \begin{array}{ll} E_{mf}=C_b\widetilde{\beta }^{-2}+o\left( \widetilde{\beta }^{-2}\right) \\ \widetilde{\beta }\underset{E\rightarrow 0}{\sim }\;\left( Z_2-Z_b\right) E_{\textit{fluct}}^{-1} \end{array}\right. },\quad \text {with}\quad C_b=\frac{1}{2}\sum _{k=1}^{+\infty }\left| h_{bk}\right| ^{2}\left( \lambda _{k}^{2}+R^{-2}\right) . \end{aligned}$$
(242)

Here, \(C_b\) is a constant depending on the topography only. Thus we have \(E_{mf}\sim E_{\textit{fluct}}^{2}C_{b}/\left( Z_2-Z_b\right) ^{2}\), which leads to:

$$\begin{aligned} \lim _{E\rightarrow 0}\frac{E_{mf}}{E_{\textit{fluct}}}=0,\quad \lim _{E\rightarrow 0}\frac{E_{mf}}{E}=0. \end{aligned}$$
(243)

The limit \({E\rightarrow 0}\) with \({Z_2-Z_{b}\sim C_{\alpha }E^{\alpha }}\) with \({\alpha \ge 0}\) In this limit, we have \(E_{\textit{fluct}}\rightarrow 0\). One gets from Fig. 5a that \(\widetilde{\beta }\rightarrow \infty \). Hence, from Eqs. (237) and (238), we obtain:

$$\begin{aligned} {\left\{ \begin{array}{ll} E_{mf}=C_b\widetilde{\beta }^{-2}+o\left( \widetilde{\beta }^{-2}\right) \\ Z_b-\overline{Z}_2=4C_b\widetilde{\beta }^{-1}+o\left( \widetilde{\beta }^{-1}\right) \end{array}\right. }, \end{aligned}$$
(244)

where \(C_b\) is defined in Eq. (242). From those two equations along with Eq. (239) and using \(Z_2-Z_b\sim C_{\alpha }E^{\alpha }\), we can extract:

$$\begin{aligned} \widetilde{\beta }\underset{E\rightarrow 0}{\sim }\frac{C_{\alpha }E^{\alpha }+\sqrt{C_{\alpha }^{2}E^{2\alpha }+20C_{b}E}}{2E}. \end{aligned}$$
(245)

Now, we have to consider different cases for the value of \(\alpha \).

For \(\alpha >1/2\), we have from Eq. (245) that \(\widetilde{\beta }\sim \sqrt{5C_b}E^{-1/2}\). Injecting this in Eq. (244), we gets:

$$\begin{aligned} \lim _{E\rightarrow 0}\frac{E_{mf}}{E}=\frac{1}{5} \end{aligned}$$
(246)

For \(\alpha <1/2\), we have from Eq. (245) that \(\widetilde{\beta }\sim C_{\alpha }E^{\alpha -1}\). Injecting this in Eq. (244), we gets:

$$\begin{aligned} \lim _{E\rightarrow 0}\frac{E_{mf}}{E}=0 \end{aligned}$$
(247)

For \(\alpha =1/2\), we have from Eq. (245) that \(\widetilde{\beta }\sim C_{1/2}E^{-1/2}\left( 1+\sqrt{1+20C_{b}/C_{\alpha }^{2}}\right) /2\). Injecting this in Eq. (244), we gets:

$$\begin{aligned} \lim _{E\rightarrow 0}\frac{E_{mf}}{E}=\frac{2C_{b}/C_{\alpha }^{2}}{\left( 1+\sqrt{1+20C_{b}/C_{\alpha }^{2}}\right) ^{2}}. \end{aligned}$$
(248)

Contrary to the previous cases, here, the partition of the energy depends on the bottom topography.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Renaud, A., Venaille, A. & Bouchet, F. Equilibrium Statistical Mechanics and Energy Partition for the Shallow Water Model. J Stat Phys 163, 784–843 (2016). https://doi.org/10.1007/s10955-016-1496-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10955-016-1496-x

Keywords

Navigation