The discontinuous Galerkin (DG) finite element method is well suited for the modelling, with a relatively small number of elements, of three-dimensional flows exhibiting strong velocity or density gradients. Its performance can be highly enhanced by having recourse to r-adaptivity. Here, a vertical adaptive mesh method is developed for DG finite elements. This method, originally designed for finite difference schemes, is based on the vertical diffusion of the mesh nodes, with the diffusivity controlled by the density jumps at the mesh element interfaces.

The mesh vertical movement is determined by means of a conservative arbitrary Lagrangian–Eulerian (ALE) formulation. Though conservativity is naturally achieved, tracer consistency is obtained by a suitable construction of the mesh vertical velocity field, which is defined in such a way that it is fully compatible with the tracer and continuity equations at a discrete level.

The vertically adaptive mesh approach is implemented in the three-dimensional version of the geophysical and
environmental flow Second-generation Louvain-la-Neuve Ice-ocean Model
(SLIM 3D;

The vertical discretisation strategy of marine models has
evolved drastically during the last five decades. The first models were using

Later on, the general

The

This r-adaptive method only moves the nodes in the vertical direction. In
contrast, the models using 3-D
hr-adaptation

To the best of authors' knowledge, the vertically adaptive coordinate method
has only been applied to structured grid models. The objective of this work
is to adapt the method to an unstructured-mesh discontinuous Galerkin (DG)
finite element model, namely the three-dimensional version of the
Second-generation Louvain-la-Neuve Ice-ocean Model (SLIM 3D;

SLIM 3D is a baroclinic model for coastal flows that solves the 3-D
hydrostatic equations under the Boussinesq approximation

In this work, the model is applied to Lake Tanganyika, especially its
thermocline movement, for which the depth and location where high resolution
is desirable vary in time. Lake Tanganyika is the largest of the east African
Great Lakes in terms of water volume and the second largest in terms of
surface

Lake Tanganyika bathymetry

A few 3-D modelling studies were conducted on the lake.

This paper presents the development of a vertically adaptive coordinate
system for SLIM 3D and its validation on simple benchmarks. The improved
model is then applied to Lake Tanganyika to investigate the adaptive
coordinates' efficiency in a realistic application. In
Sect.

Schematic lake configuration with no wind
stress

SLIM 3D solves the 3-D hydrostatic Boussinesq equations. The main unknowns
are the horizontal velocity

The different variables defined in this paper as well as the symbols are
listed in Tables

Symbols and physical variables defined in this paper.

Mesh adaptation and finite element specific variables defined in this paper.

The equation for the pressure

SLIM 3D equations are discretised on a mesh composed of prisms that are
either extruded triangles or extruded quads. The equations are approximated
using discontinuous functions, piecewise bi-linear for the triangle-based
mesh and piecewise tri-linear for the quad-based mesh. This approximation is
achieved using the discontinuous-Galerkin finite element method

In

The model discretises Eqs. (

The temperature

The Jacobian of the mapping (Eq.

Equation (

In

Starting from the bottom boundary condition

Using this method, the temperature equation reduces by construction to the continuity equation if the temperature is constant, and therefore the consistency property holds valid. Salinity and tracer equations follow exactly the same scheme.

In finite difference models using terrain-following meshes, the computation
of the horizontal gradient of the internal pressure gradient is complex.
Considerable efforts were made to reduce the errors in this computation and
to limit the spurious pressure gradient

The pressure gradient formulation in SLIM 3D is different from the finite
difference schemes; the equations are in

In the previous version of SLIM 3D

The new approach consists in computing the horizontal derivative before the
vertical integration

To obtain accurate results at a reasonable computational cost, the mesh
vertical resolution should be high in areas with strong stratification or
shear, and low elsewhere. In this study, the refinement is achieved as a
function of the stratification only. The shear is thus ignored, but it could
be taken into account similarly to what is developed hereinafter for the
stratification. The mesh velocity reads

The mesh resolution variation results from a diffusion process of the
Eulerian vertical coordinate

The main difference between the original approach and the implementation in
SLIM 3D is the definition of the error density

Simple mesh composed of four prisms, formed by the extrusion of two triangles. Examples of horizontal and vertical interfaces are highlighted. The discontinuous nodes are illustrated in blue (upper nodes) and red (lower nodes). The indices on the left correspond to the indexing of the vertical columns.

This diffusion algorithm is valid for meshes with both

The discrete mesh is updated by interpolating the function defined in
Eq. (

Comparison between an adapted

Illustration of the horizontal smoothing algorithm on a 2-D

Along-lake component of the daily-averaged wind stress measured in
Mpulungu, at the southern tip of the lake. Positive values indicate northwestward
blowing wind

Lake Tanganyika is very long (

Along-lake component of the daily-averaged wind stress, at the
northern, central and southern parts of the lake, between April 2002 and 2004,
as modelled by the regional climate model COSMO-CLM

Time series of the surface temperature at Kigoma (red curve) and
Mpulungu (green curve), as modelled by COSMO-CLM

Two wind data sets are available: a time series of measurements at one location and a modelled spatial wind map.

Wind speed and direction were measured every hour from April 1993 to August
1994

On the other hand, non-uniform wind data were obtained from the COSMO-CLM

Figure

Two configurations of the model are run. In the first configuration, aimed to
analyse the effect of adaptive coordinates, no vertical diffusivity is
applied to the temperature field, such that the modelled thermocline should
remain sharp. The vertical viscosity is determined from the

In the second set-up, the vertical diffusivity and viscosity are taken into
account. They are determined from the

Within the framework of the CLIMLAKE project

Before applying SLIM 3D to Lake Tanganyika, the model is evaluated on simpler
test cases. First, the internal seiche benchmark of

The first test to evaluate the adaptive coordinate system is the internal
seiche modelling of

For this application, the error measure used to diffuse vertically the mesh
is a function of the vertical jumps in the density field, with a small
background error

Figure

To evaluate the model accuracy, a convergence analysis is performed for the
internal seiche. The evolution of the interface depth at the right boundary
of the domain is compared for different simulations using a number of fixed
levels, varying between 10 and 320, which induces a level thickness varying
between 2 m and 6.25 cm, using the same time step for all the simulations
(

Comparison between the internal seiche modelling with

Convergence analysis for the internal seiche modelling. The graph shows the third oscillation of the seiche, at which moment the results are beginning to diverge from the high-resolution solution.

CPU time of the simulations for a different number of levels (using
a log–log scale). CPU times are normalised by the 10 fixed levels of simulation
time. As expected, CPU time is proportional to the number of levels.
Moreover, the computational overhead of adaptive levels is negligible. For
the same computational cost, the adaptive method is then much more accurate
(Fig.

To assess the model, the equilibrium position of the thermocline under a
constant wind stress is evaluated in a 2-D

The thermocline depth is simulated for a wind stress of 0.02 N m

Comparison between the analytical steady-state thermocline profile
using the 1-D two-layer approximation and the 2-D

Lake Tanganyika hydrodynamics is simulated using the first model
configuration. The model ability to preserve a sharp thermocline is assessed
for simulations with and without the vertically adaptive mesh. First, the
lake dynamics is simulated with a simple 2-D

Temperature profile using the uniform wind on 8 July 1993, with the
2-D

Temperature profile using the uniform wind on 8 July 1993, with the
3-D model, with a fixed mesh

Lake Tanganyika dynamics is simulated from December 2000 to April 2004 with
the second model configuration. The model is run on parallel on a cluster on
eight CPUs. The mesh is built using a simple horizontal mesh of

The temporal evolution of the vertical profile of the temperature is analysed
at Mpulungu (Fig.

At Kigoma, the modelled temperature matches the observations better than at
Mpulungu. The 26

Lake water temperature (

Lake water temperature (

The thermocline profile along the main axis shows the different regimes of
the lake dynamics during the year 2003. At the end of the wet season
(1 March, Fig.

South–north temperature transect on 1 March

South–north velocity transect on 1 March

South–north level thickness distribution transect on
1 March

Figure

Isotherm depths in Lake Tanganyika on 1 March (26

The internal seiche test case is the typical application for which adaptive
coordinates are necessary. The strong discontinuity cannot be preserved using
a fixed mesh, which introduces large numerical mixing at the interface
(Fig.

One drawback of the method is that it is necessary to manually set up the
adaptation parameters. In the case of this application, the objective is to
maintain the discontinuity at the interface, such that the error is a
function of the vertical jumps in the density field. The background error
function is a small function just big enough to avoid that small error in
the density field perturbing the mesh smoothness. Eventually, the time
relaxation

The thermocline slope under a weak constant wind stress test case results in a thermocline slope similar to the analytical solution under the 1-D two-layer approximation, with a small deviation close to the southern boundary. This difference is most likely due to the hydrostatic assumption of the model. Indeed, in the overturning circulation, there is an increase of the pressure close to the wall, but this increased pressure is not captured by the model. As a consequence, the boundary layer is not captured by the model and small errors appear in the area irrespective of the horizontal resolution close to the wall. This is not a problem for the 1-D model which does not model the overturning circulation within the epilimnion.

For a small, constant wind stress, the analytical 1-D solution and the 2-D

While the aforementioned test cases are 2-D

For the actual Tanganyika runs, vertical diffusivity and viscosity are taken into account. While data scarcity limits a complete validation, the comparison between the model and the available data indicates a good representation of the dynamics of Lake Tanganyika by SLIM 3D. The surface temperature used in the relaxation boundary condition does not match well with the vertical profiles available at Mpulungu and Kigoma, so the modelled vertical profile is biased by construction. However, a comparison can still be achieved based on the modelled and observed patterns, such as stratification and thermocline position. While the modelled stratification is similar to the observed one, it is still slightly higher, especially close to the surface where there is the mismatch issue. This stronger stratification induces lower vertical eddy diffusivity, which explains why further deep the stratification is less affected by surface forcings and is closer to the observations.

The south–north lake transects of Fig.

The southward surface current going in the opposite direction of the wind, as
it was suggested by

The presence of internal Kelvin waves in the lake, which was first simulated
by means of a 2-D reduced gravity model

A non-uniform vertically adaptive mesh is adjusted for the DG finite element method and implemented into the geophysical and environmental flow model SLIM 3D. The adaptation routine is based on the diffusion of the vertical coordinates, controlled by the vertical jump in the density field.

The adaptation efficiency was tested on simple benchmarks consisting in preserving a sharp interface between two layers of different densities. While the fixed mesh diffuses the interface and produces global errors in the hydrodynamics, the adaptive mesh is able to preserve the interface profile by aligning thin levels along it. The DG formulation with the mesh adaptation controlled by the vertical jumps preserves the expected field discontinuity with minimal mixing. The necessary manual configuration of the adaptation parameters remains a limitation.

A new formulation for the computation of the mesh vertical velocity, both conservative and consistent, was developed for the adaptive mesh. It is noteworthy that this formulation solves the tracer consistency problem with and without adaptation.

The adaptation was then evaluated by modelling the oscillations of the Lake Tanganyika thermocline. First, a simulation was run without vertical diffusivity and a uniform wind stress, showing the good behaviour of the adaptive mesh. Then, a full simulation of the lake dynamics was performed and compared to time series of vertical temperature profile in the south and the centre of the lake. Overall, the outcropping events and the stratification observed in the data are well reproduced by the model. The remaining differences are partially due to discrepancies between the data used to force the surface heat flux and the validation data.

During the 2-year simulation, the along-axis velocity shows similar patterns
to the results from

The SLIM 3D v0.4 code is licensed under GNU GPL v3. It
is available through GitLab at

The authors declare that they have no conflict of interest.

This article is part of the special issue “Modelling lakes in the climate system (GMD/HESS inter-journal SI)”. It is a result of the 5th workshop on “Parameterization of Lakes in Numerical Weather Prediction and Climate Modelling”, Berlin, Germany, 16–19 October 2017.

Computational resources were provided by the Consortium des Équipements de Calcul Intensif (CÉCI), funded by the Belgian Fund for Scientific Research (F.R.S.-FNRS) under grant no. 2.5020.11. The authors thank the FAO/FINNIDA project GCP/RAF/271/FIN for the measurements used in this study. Eric Deleersnijder is an honorary research associate of the F.R.S-FNRS. Wim Thiery is supported by an ETH Zürich Fellowship (Fel-45 15-1). Edited by: James R. Maddison Reviewed by: Jon Hill and one anonymous referee