A parallel framework for solving geophysical flow problems at both planetary and non-hydrostatic scales using mixed mimetic spectral elements. The code is based on spatial and temporal discretisations that preserve the exact balance of energy exchanges for an improved representation of dynamical processes.
Includes solvers (and test configurations) for:
- The 2D advection equation with explicit time integration
- solid body rotation (on the sphere)
- deformational flow (on the sphere)
- The rotating shallow water equations with semi-implicit time integration
- Wilkinson2 steady flow (on the sphere)
- Rossby-Haurwitz wave (on the sphere)
- Barotropic instability (Galewsky) (on the sphere)
- The 3D compressible Euler equations with horizontally explicit/vertically implicit time integration
- Baroclinic instability (on the sphere)
- Non-hydrostatic gravity wave (on the sphere)
- Warm bubble (doubly periodic planar)
Supports geometric configurations for:
- Doubly periodic box (3D)
- Cubed-sphere (2D/3D)
Optional stabilisation/forcing terms include:
- Biharmonic viscosity for horizontal momentum and temperature equations
- Energetically consistent variational upwinding for potential vorticity (in the horizontal) and potential temperature (in the vertical)
- Held-Suarez forcing of temperature and lower atmosphere Rayleigh friction
- Install the dependencies (C++, Python3, OpenBLAS, MPI, PETSc)
- Clone the repository
- Run the set up script:
./scr/Setup.py <polynomial_degree> <number_of_elements_per_dimension> <number_of_processors>
wherepolynomial_degree
is the polynomial order of thebasis functions in the horizontal
number_of_elements_per_dimension
is the number of elements in each dimension on each of the six faces of the cubed spherenumber_of_processors
is the number of cores to run the code on. Note that this must befor integer n, ie: 6, 24, 54, 96, etc, and
number_of_elements_per_dimension
must fit evenly into n
- Build the code:
cd eul/; make mimsem
- Run the code:
mpirun -np <number_of_processors> ./mimsem <start_dump>
, where0
indicates starting from the analytic initial condition rather than a start dump - Plot an image:
../scr/WriteImage_NorthHemi.py <file_path> <field_name> <plot_contours> <vertical_level> <dump_time>
Baroclinic instability on the sphere, day 9: surface level Exner pressure, and potential temperature and vertical voricity component at z=1.5km
Baroclinic instability on the sphere, day 11: surface level Exner pressure, and potential temperature and vertical voricity component at z=1.5km
Global simulation with Held-Suarez forcing at day 40, surface level Exner pressure, potential temperature at z = 2.36km and vertical vorticity component at z = 3.14km
Vorticity field at days 5, 6 and 7 for the Galewsky test case for the rotating shallow water on the sphere using energetically balanced upwinding of potential vorticity and and energetically balanced IMEX time splitting without dissipation.
Potential temperature for the 3D rising bubble test case in planar geometry without dissipation and with energetically consistent variational upwinding at times 200s (left) and 400s (right)
Ricardo, K., Lee, D. and Duru, K. (2024) Entropy and energy conservation for thermal atmospheric dynamics using mixed compatible finite elements J. Comp. Phys. 496 112605
Lee, D., Martin, A., Bladwell, C. and Badia, S. (2024) A comparison of variational upwinding schemes for geophysical fluids, and their application to potential enstrophy conserving discretisations in space and time Comput. Math. Appl. 165 150-162
Lee, D. and Palha, A. (2021) Exact spatial and temporal balance of energy exchanges within a horizontally explicit/vertically implicit non-hydrostatic atmosphere J. Comp. Phys. 440 110432
Lee, D. (2021) An energetically balanced, quasi-Newton integrator for non-hydrostatic vertical atmospheric dynamics J. Comp. Phys. 429 109988
Lee, D. (2021) Petrov-Galerkin flux upwinding for mixed mimetic spectral elements, and its application to geophysical flow problems Comput. Math. Appl. 89 68-77
Lee, D. and Palha, A. (2020) A mixed mimetic spectral element model of the 3D compressible Euler equations on the cubed sphere J. Comp. Phys. 401 108993
Lee, D. and Palha, A. (2018) A mixed mimetic spectral element model of the rotating shallow water equations on the cubed sphere J. Comp. Phys. 375 240-262
Lee, D., Palha, A. and Gerritsma, M. (2018) Discrete conservation properties for shallow water flows using mixed mimetic spectral elements J. Comp. Phys. 357 282-304
Email Dave Lee at [email protected]