the Creative Commons Attribution 4.0 License.
the Creative Commons Attribution 4.0 License.

The discontinuous Galerkin coastal and estuarine modelling system (DGCEMS v1.0.0): a three-dimensional, nonsplit-mode, implicit–explicit Runge–Kutta hydrostatic model
Zereng Chen
Guoquan Ran
Yang Nie
Numerical methods of discontinuous Galerkin (DG) discretisation for coastal ocean modelling have advanced significantly, but there are still challenges in accurately simulating phenomena such as wetting and drying processes and baroclinic flows in coastal and estuarine regions. This study develops a novel three-dimensional (3D) coastal and estuarine modelling system named DGCEMS, using a quadrature-free nodal DG method. The model adopts σ coordinates, employs a nonsplit-mode framework, and integrates a semi-implicit Runge–Kutta scheme. A series of numerical experiments demonstrate the model's second-order convergence, low spurious mixing, and capability to simulate salt–freshwater interactions in the presence of wetting and drying boundaries.
- Article
(3506 KB) - Full-text XML
- Companion paper
- BibTeX
- EndNote
During the past few decades, numerical methods have evolved dramatically, and coastal ocean models can benefit from these advanced numerical methods (Blaise et al., 2010). Classical three-dimensional (3D) hydrodynamic models, e.g. ROMS (Shchepetkin and McWilliams, 2005), Delft3D (Lesser et al., 2004), FVCOM (Chen et al., 2003), TELEMAC (Moulinec et al., 2011), and SCHISM (Zhang et al., 2016), can be utilised to predict storm surges, tsunamis, and floods and assess environmental qualities by adding additional equations (e.g. transport and reaction) to model oil slicks, contaminant plume propagation, temperature, and salinity transport, among other problems (Bertsch et al., 2022; Zhou et al., 2024; Sanz-Ramos et al., 2023).
In coastal and estuary waters, the presence of large gradients and strong discontinuity processes (e.g. wetting and drying processes and saline flow) may pose challenges for these classical circulation models, such as maintaining high numerical accuracy, minimising numerical mixing, and preventing excessive diffusion. From the perspective of numerical discretisation methods in the above models, the finite-volume (FV) method is known to have limitations in developing high-order accuracy schemes and incorporating so-called hp adaptivity (Lee, 2019). High-order FV models can increase the order by wide stencils, but they have to perform complex numerical reconstruction, which significantly increases computational complexity (Cheng et al., 2016). Models based on the finite-element (FE) method can also achieve high order, but they do not have local conservation. In the wet–dry (WD) fronts and in small-scale dynamics like baroclinic eddies, where local conservation of mass and momentum is critical, the property of local conservation is a preferred characteristic of a numerical scheme (Lee, 2020).
As a combination of both FV and FE methods, the discontinuous Galerkin (DG) method, with a relatively small number of elements, is well suited to modelling of 3D flows exhibiting strong velocity or density gradients. Dawson and Aizinger (2005) first developed a 3D shallow-water equation (SWE) model based on DG methods called UTBEST3D. They used z coordinates in a vertical direction and a local discontinuous Galerkin (LDG) method for vertical diffusion (Aizinger and Dawson, 2007). To reduce the degrees of stiffness, Blaise et al. (2010) and Comblen et al. (2010) developed a 3D baroclinic marine model called SLIM3D and used the symmetric interior penalty Galerkin method (SIPG) to discrete the vertical diffusion. In addition, the mode-splitting procedure, which splits the 2D external mode and the 3D internal mode, is used to save computational time (Kowalik and Murty, 1993). Later, Delandmeter et al. (2018) added a fully consistent and conservative vertically adaptive coordinate system in SLIM3D. At the same time, Kärnä et al. (2018) also developed a 3D DG baroclinic model called Thetis. Thetis includes a more accurate mode-splitting method, revised viscosity formulation, and new second-order time integration scheme, which has lower or comparable numerical dissipation. The above three models all choose z coordinates, considering that σ coordinates enable a smooth representation of the bottom topography, which is particularly appropriate for coastal applications. Using σ coordinates, Conroy and Kubatko (2016) explicitly treated the vertical diffusion term to study the water column concerning barotropic forcing by building a 3D DG SWE model. The model of Conroy and Kubatko (2016) does not consider nonlinear advective terms and can only investigate 3D linear problems. The mentioned models use the quadrature-based nodal DG method. In explicit and semi-implicit time stepping schemes commonly used in connection with the SWE models, the most computationally expensive parts of a DG algorithm are the element and edge integrals computed via loops over quadrature points (Faghih-Naini et al., 2020). One criticism of the original DG method is that it requires expensive quadrature rules to reduce the aliasing error arising in the nonlinear system. The essence of the quadrature-free approach is to convert the nonlinear fluxes to polynomials or polynomial operations, which can be integrated analytically into the element or element boundaries (Li, 2024). The quadrature-free DG scheme has a comparable order and L2 errors even at the 7th order of accuracy compared to the quadrature-based DG scheme for the isentropic vortex problem (Nair, 2015). In the MATLAB–C hybrid framework, Ran et al. (2022) developed a 3D barotropic model based on the quadrature-free nodal DG method. They choose the nonsplit-mode scheme considering that this method does not need to adjust the differences in the momentum calculation between the 2D external mode and the 3D internal mode and has fewer excessive errors (Chen et al., 2022; Conroy and Kubatko, 2016). A series of numerical experiments have proven the accuracy and potential application value of the barotropic model, but its computational efficiency is low, which limits the applicability of the model.
In addition to the utilisation of different numerical discretisation schemes, wetting and drying (WD) processes should be included in coastal and estuarine modelling, which is a challenge for 3D DG models. At present, within existing 3D DG models, Vallaeys (2018) noted that the WD processes can be considered in the external mode of the mode-splitting SLIM3D model, but this kind of wetting and drying module cannot be operated together with the baroclinic module. Chen et al. (2024) developed a WD treatment in a 3D DG model with the nonsplit-mode scheme, but there is still no description and verification of the coexistence of WD processes and thermohaline transport.
To adapt to the complex terrain of estuary and coastal areas and have a comparable calculation accuracy to existing 3D DG baroclinic models, this work aims to develop a new share-code discontinuous Galerkin coastal and estuarine modelling system (DGCEMS) for a 3D nonsplit-mode, implicit–explicit Runge–Kutta baroclinic model using σ coordinates with a WD module based on a quadrature-free nodal DG scheme. The arrangement of this paper is as follows. Section 2 describes the model with the discretisation of each term in the model, while Sect. 3 presents numerical tests and applications to show the main functionality of the model. Conclusions are given in Sect. 4.
2.1 Governing equations
The conservative and pre-balanced scheme of 3D shallow-water equations in the σ coordinates, with advection–diffusion equations of temperature T and salinity S, can be written as
Here , where D is the water depth, and u and v are the velocity components along the x and y directions, respectively. The convective term , and each part in this term can be written as
where g is gravitational acceleration; zb is the bottom elevation, and ω is the vertical velocity along the σ direction. The right side of Eq. (1) contains the terms of
where Sb, Sf, Sd,h, Sd,v, and Sbaro represent the bottom topography term, Coriolis acceleration term, horizontal diffusion term, vertical diffusion term, and baroclinic term, respectively. The five terms are given as follows:
where is the surface elevation; f is the Coriolis coefficient; Kh and KH are the horizontal (eddy) diffusion coefficients using Smagorinsky's method (Smagorinsky, 1963); Kv and KV are the vertical (eddy) diffusion coefficients calculated by the MY-2.5 turbulent closure scheme in the General Ocean Turbulence Model (GOTM; Burchard et al., 1999); ρ0 is the reference density; and the water density ρ is defined as , which is a function of T and S. In the model, two state equations can be chosen: linear, shown in Eq. (7), and full nonlinear, from Jackett et al. (2006):
In Eq. (7), αT and βS are coefficients. T0 and S0 are reference temperature and salinity, respectively. It can be seen that the above system has seven prognostic variables, namely D (or η)T, u, v, ω, ρ, T, and S, but there are a total of six equations (Eqs. 1 and 7) to be solved. To this end, the depth-averaged continuity equation is applied to calculate the water depth (or free surface) for the nonsplit-mode model, which can be written as
where and are depth-averaged horizontal velocities. The vertical velocity is solved by combining 2D and 3D continuity equations, which can be written as
and then be integrated layer by layer along the vertical direction.
2.2 Discontinuous Galerkin discretisation
In this section, we describe the numerical implementation of DGCEMS. The DG function spaces are defined in Sect. 2.2.1, followed by the quadrature-free nodal DG discretisation (Hesthaven and Warburton, 2007) of the above governing equations.
2.2.1 Function spaces and notations
For a 3D computational domain, Ω3d, there is a corresponding projection at the horizontal plane, which is denoted as Ω2d, and it can be divided by an unstructured triangular mesh. These triangular elements extend vertically and form triangular prisms, which are computational elements in Ω3d. The DG discretisation of this model is based on the linear function space, which is denoted as in the 2D space and in the 3D space (in Fig. 1, both Nh and Nv are equal to 1, representing the stage of the function of horizontal and vertical space). It should be noted that the number of vertical layers in the model is flexible and user-defined. The vertical discretisation shown in Fig. 1 employs two layers for illustrative purposes only, to demonstrate the distribution of interpolation nodes in the σ-coordinate direction. In practical simulations, more vertical layers (e.g. 10 to 20 layers) are typically used to improve the resolution of vertical velocity profiles and stratification. Increasing the number of layers enhances vertical accuracy but does not change the order of numerical convergence and may increase computational cost. We set , , , and as the test functions in the 2D and 3D function spaces.

Figure 1Schematic of vertical computational element distribution (example with two layers). Black dots represent the interpolation nodes corresponding to the horizontal first-order and vertical first-order basis functions.
Next, we use the following notations to represent the volume and surface integrals:
In surface terms, we additionally define the concept of the average, {{⋅}}, and the jump, [[⋅]], to simplify the expression of subsequent formulas:
where a represents a scalar field and b represents a vector field, − and + are the local side and adjacent side, and is the outward unit normal on the edges. Let 𝒯 and 𝒫 stand for the partition of the 2D domain Ω2d and 3D domain Ω3d, respectively. Element interfaces are denoted by , while ℐh and ℐv are notations of horizontal and vertical interfaces in 𝒫.
2.2.2 Convection terms and source terms
We multiply Eq. (1) by a test function φ∈ϕ3d and integrate the face terms by parts twice:
Here, is calculated by the Harten–Lax–van Leer–Contact (HLLC) method (Toro, 2001); means the upwind numerical flux at the interface; is the horizontal outward unit normal vector; nσ represents the vertical outward unit normal vector; and Dh and Dv are the horizontal and vertical diffusion operators, which are introduced in the next section. In computational elements, the bottom and top interfaces are horizontal (, while the side interfaces are vertical (nσ=0). For convection terms, the process of surface integration is divided into a horizontal part and a vertical part, which need to use the upwind and the HLLC approximate Riemann solver, respectively. This model uses the quadrature-free nodal DG method to avoid the complex calculation processes of the Gaussian integral for nonlinear convection terms. The DG discretisation of the source terms also contains the process of the surface integral, but it seems to be omitted in Eq. (17) because the central numerical flux is used, resulting in the surface integral being 0 as a whole.
2.2.3 Horizontal and vertical diffusion terms
The discretisation of diffusion terms differs from that of convection because they have elliptic operators, which need additional stabilisation. Thus, the symmetric interior penalty Galerkin (SIPG) method (Epshteyn and Rivière, 2007) is used, where Dh and Dv read
Here, and , and τ is called the penalty factor. Following the study by Shahbazi (2005), it can be defined as
in which N represents the order value of the horizontal or vertical basic function, γ is the number of surfaces in an element, and L is the length scale of the local element in the normal direction of the surface.
2.2.4 Primitive continuity and vertical velocity equations
We also multiply Eq. (8) by the test function and integrate the face terms by parts twice. The strong-form formulation of the primitive continuity equation is shown in Eq. (20):
Then, expanding the function space of Eq. (21) to the 3D system and subtracting that from the first line of Eq. (17), we have
Finally, the vertical integral can achieve vertical velocity from the bottom to the top.
2.3 Slope limiters and wetting/drying treatment
The slope limiters are necessary for the stabilisation of the model. Here we use a 3D anisotropic limiter to control the large gradient of the horizontal momentum and the tracers. The limited solution at the jth nodal number in the kth triangular prism element is denoted as , which is defined as
where represents the original solution at the kth triangular prism element in 𝒫; is the volume-averaged solution at the kth triangular prism element; and λ is defined by Delandmeter (2017), which ensures the anisotropy of the 3D limiter.
Considering the WD processes in the nearshore regions, the strong discontinuity at the WD fronts also frequently causes difficulties in the model stability (Le et al., 2020; Medeiros and Hagen, 2013). To avoid the WD problems that may occur in the computational processes, we follow the WD treatment method by Chen et al. (2024), where they combine the vertex-based limiter by Li and Zhang (2017), the well-balanced positivity-preserving limiter proposed by Xing and Zhang (2013), and Eq. (23) to prevent the blow-up of the water level and momentum solutions. In this model, the stencil of the 2D vertex-based limiter has been adjusted to align with the 3D limiter. This modification was identified through extensive numerical testing and has been found to enhance computational stability to a certain extent.
2.4 Time stepping
In the DG framework, the explicit Runge–Kutta time stepping method is popular. By selecting different numbers of stages, different levels of temporal accuracy can be achieved. Although the explicit scheme has a relatively low computational cost per time step, it imposes strict limitations on time steps. Specifically, for high-stiffness terms like the vertical diffusion term, the required time step should be sufficiently small. Thus, we use the implicit–explicit Runge–Kutta (IMEXRK) scheme. For clarity, the above DG discretisation processes are summarised as
where y denotes the degree of freedom over all elements; fIM(y) is the implicit system for the vertical diffusion term, and fEX(y) represents the explicit system that contains all other terms. The IMEXRK system reads
Here, when the model calculates from steps n to n+1, it has two middle steps, shown in Eqs. (25) and (26). Finally, the whole algorithm from time steps tn to tn+1 is shown in Algorithm 1. In the workflow, after the physical variables are computed at each time step, 3D slope limiters are applied to the reconstructed solution to suppress spurious oscillations and prevent the generation of non-physical values, particularly near steep gradients or discontinuities. These limiters ensure numerical stability. Subsequently, the physical fields are vertically averaged to derive depth-integrated variables. The WD treatment is then performed on these depth-averaged variables to accurately capture shoreline movement while preserving the conservation of water surface elevation and depth-averaged momentum. This sequential process improves robustness and physical consistency in simulations involving complex wetting and drying processes.
Algorithm 1: the calculation process of the model in a computational time step
First stage
-
Calculate the convection term, the horizontal diffusion term, the source terms, and the primitive continuity equation (Eqs. 17, 18, and 21) explicitly according to D(n) (or η(n)), Du(n), Dv(n), DT(n), and DS(n) at time tn.
-
Achieve the values of D(1) (or η(1)), Du(1), Dv(1), DT(1), and DS(1) at the first middle step (Eq. 25).
-
Apply slope limiters to Du(1), Dv(1), DT(1), and DS(1) (Eq. 23).
-
Calculate vertically averaged horizontal velocities by integration and update the WD statement, the density ρ(n), and the vertical velocity ω(n) (Eqs. 7 and 9).
Second stage
-
Calculate the convection term, the horizontal diffusion term, the source terms, and the primitive continuity equation (Eqs. 17, 18, and 21) explicitly according to D(1) (or η(1)), Du(1), Dv(1), DT(1), and DS(1).
-
Achieve the values of D(n+1) (or η(n+1)), Du(2), Dv(2), DT(2), and DS(2) at the second middle step using the values at time tn and the first middle step (Eq. 26).
-
Apply slope limiters to Du(2), Dv(2), DT(2), and DS(2) (Eq. 23).
Final stage
-
Calculate the vertical viscosity and vertical diffusion implicitly.
-
Achieve the values of Du(n+1), Dv(n+1), DT(n+1), and DS(n+1) at time tn+1 (Eq. 27).
-
Calculate vertically averaged horizontal velocities by integration and update the WD statement, the density ρ(n+1), and the vertical velocity ω(n+1) (Eqs. 7 and 9).
In this section, we first validate the baroclinic solver by a manufactured solution test and then verify the diffusion terms using a standard lock exchange test. An ideal river plume test case and a semi-closed estuary case of salinity intrusion are also applied to examine the performance of DGCEMS.
3.1 Baroclinic manufactured solution test
The baroclinic manufactured solution test was inspired by Kärnä et al. (2018), and their original z-coordinate formulation was converted into a σ-coordinate framework for validation. The computational domain is a rectangular box of length Lx = 15 km, width Ly = 10 km, and depth D = 40 m. At the initial time step, we define the velocity field and the tracer field as follows:
where the above three expressions are also represented using the σ coordinate, ranging from −1 to 0, in the vertical direction. In this case, the Coriolis parameter f=0.0001, while the bottom friction term, the viscosity term, and the diffusion term are omitted. The linear state equation is applied with ρ0 = 1000 kg m−3, αT = 0.2 kg m−3 °C-, and T0 = 5.0 °C. The value of βs is not defined because the salinity in the whole field is a constant. We set 10 layers at vertical directions with horizontal mesh resolutions of 2500, 1250, 625, 312.5, and 156.25 m, where the grid shapes are isosceles right-angled triangles. In the computational domain, all the boundary edges are closed, and no external force needs to be applied, which causes the system to have a time-dependent problem. To achieve a steady-state solution, we derived the analytical functions of the advection term, the baroclinic term, and the Coriolis acceleration term and then added them to the source term to balance the initial velocity and tracer field. Details can be found in Appendix A.

Figure 2Convergence of the L2 errors in the (a) surface elevation, (b) horizontal velocity, (c) vertical velocity, and (d) temperature field in the baroclinic manufactured solution test case.
For the five grid resolutions mentioned above, the model was run for 100 steps with time steps of 4.0, 2.0, 1.0, 0.5, and 0.25 s. The L2 errors in the water elevation, horizontal velocity, vertical velocity, and temperature field across the entire computational domain were calculated, as shown in Fig. 2. The red lines shown in the figure represent the best-fit lines obtained using the least-squares method, with their slopes indicating the order of convergence. For varying grid resolutions, the water elevation, horizontal velocity, and temperature exhibit near-second-order convergence. However, the vertical velocity fails to achieve second-order convergence, which is attributed to the use of the vertically averaged continuity equation in the vertical velocity computation. The numerical solution of this equation inherently contains errors that accumulate throughout the calculation process, preventing the vertical velocity from reaching optimal second-order convergence. Overall, the results from this artificial analytical solution test are consistent with those of Kärnä et al. (2018), confirming that the discretisation of the advection term, baroclinic term, and Coriolis term in σ coordinates is accurate at both the coding and the algorithmic levels.
3.2 Lock exchange
In this subsection, we validate the baroclinic term and discuss the spurious mixing caused by horizontal diffusion with a standard lock exchange test (Ilıcak et al., 2012; Petersen et al., 2015; Kärnä et al., 2018). The computational domain is a rectangular channel that is 64 km long, 1 km wide, and 20 m deep. Each element in the domain is Δx = 500 m of the triangle edge length and 1 m in the vertical direction (total of 20 layers). The initial salinity is set to a constant value of 35 psu in the whole domain, and the initial temperature is calculated by
We use Eq. (7) to update the density, where αT=0.2, βS=0, T0 = 5 °C, and S0 = 35 psu. At the location of x = 32km, the initial density difference is ρ = 6.0 kg m−3. In the model, only the convective term controls the tracer concentration, and the bottom friction is omitted. The vertical viscosity, Kv, is 10−4 m2 s−1, and the horizontal viscosity, Kh, is varied with a value of 1, 10, and 200 m2 s−1 so that the grid Reynolds numbers = 250.0, 25.0, and 1.25, where Ugrid = 0.5 m s−1 represents the characteristic velocity scale.

Figure 4Simulation results of (a) relative RPE and (b) the density front location at the bottom layer of the lock exchange test with different Re.
Figure 3a shows the initial density field, and Fig. 3b–d are the density fields at the time of 17 h, where the Re values are 250.0, 25.0, and 1.25, respectively. It seems that as the Re decreases, the density front becomes smoother, indicating that the increase in background viscosity reduces overall mixing within the system. To quantify the role of spurious mixing, we also use a reference potential energy (RPE), which can be defined as
where ρ∗ is rearranged in descending order based on actual density values ρ from the bottom to the top. Using this computational approach, RPE represents the potential energy within the system that cannot be converted into kinetic energy. When spurious mixing is present, the value of RPE in the system increases. At any given time, t, the dimensionless relative reference potential energy () is defined as follows:
The calculation results of for the three Reynolds numbers are shown in Fig. 4a. At the 17th hour, the values of are 3.06, 2.26, and 0.66 × 10−5, which agree with previous simulation results (Ilıcak et al., 2012; Kärnä et al., 2018). Additionally, the locations of the density fronts simulated under three different grid Reynolds number conditions were captured and compared with the theoretical maximum propagation distance, L, where . The spurious mixing resulted in a loss of potential energy throughout the system, leading to discrepancies between the model simulations and the theoretical values (Fig. 4b). Overall, the error remains within 4.7 %, which is consistent with Kärnä et al. (2018).
3.3 An ideal river plume
We continue to experiment with an ideal river plume (Wu 2023) to analyse the model's performance. Saltwater can be replaced by various contaminants that affect water quality. Therefore, investigating surface plume dynamics not only validates the model's accuracy but also highlights its applicability to environmental modelling and pollutant transport simulations.
3.3.1 Settings
Figure 5 shows the topography of the estuary region, where there is a 7.5 km long, 3.0 km wide, and 15 m deep river that connects to the sea. The initial computational mesh domain is shown in Fig. 6. Freshwater runoff with a rate of 1500 m3 s−1 and a salinity of 0 flows into a shelf with a bottom slope of 0.0007, where the salinity of the ocean water is 32 psu. We first use a grid resolution of 1500 m to partition the computational domain, which means that there are only two rows of grids along the width of the river channel. In this test, the Coriolis parameter is calculated by the latitude of 45° N, which is about 0.0001; the bottom friction coefficient is calculated by the MY-2.5 turbulent closure scheme with a bottom roughness parameter of 0.2 mm; and the eddy diffusivity coefficient is set to 0. Other external forces are not considered in this test. The open boundary is set to radiative according to Wu (2023) so that the boundary will have less influence on the currents in the computational domain. We also use Eq. (7) to update the density, where αT=0, βS=0.78, T0 = 20 °C, and S0 = 32 psu.

Figure 6The computational mesh domain and the initial salinity field. The salinity is 0 psu at x < 0 km and 32 psu at x≥ 0 km.
3.3.2 Analysis of plume pattern
Due to the lack of analytical solutions in the test, we illustrate the accuracy of the simulation results from the perspective of grid convergence. For numerical methods, we prefer them to be less affected by grid resolution. Here, the mesh resolution is refined by a factor of 2 and 4 in both the x and the y directions, and the simulated results at 48 h are shown in Fig. 7. Considering the impact of differences in grid resolution on images, the simulation results of the three types of grids were processed in the same way to minimise the impact of post-processing as much as possible. Based on the simulated plume pattern, as the computational grid resolution increases, the zigzag phenomenon at the plume front gradually diminishes, resulting in a smoother edge and a more pronounced bulge shape. Simultaneously, there are noticeable differences in the extent of freshwater transport along the coast; with higher grid resolution, the transport distance increases. This may be attributed to the finer grid's ability to more accurately capture buoyancy fronts, thereby enhancing the coastal extension of freshwater. Additionally, the finer resolution reduces numerical dissipation, contributing to the observed differences in transport distance.
3.3.3 Quantitative analysis
To further demonstrate the performance of the model, a series of quantitative methods are employed to analyse the numerical simulation results of freshwater content (Fc in short), plume characteristics in the near- and mid-field regions, and coastal plume transport in the far-field region under different computational grid resolutions.
Following the concept of the isohaline coordinate by MacCready et al. (2002), the calculation method of freshwater volume can be written as
where S∗ represents each salinity level. Then, we have
It can be seen in Fig. 8 that under the three grid resolutions, the freshwater content exhibits a similar trend: it increases initially and then decreases as salinity rises, with the peak freshwater content occurring at a salinity of 26 psu. This behaviour can be explained by the relationship between salinity and the distance from the river mouth. Lower salinity values indicate proximity to the river mouth, where the number of grids is relatively small, resulting in lower freshwater content in these regions. Conversely, higher salinity values correspond to regions farther from the river mouth, where more grids are present, but the freshwater content per cell is low, leading to lower overall freshwater content in high-salinity areas. These results are consistent with the research of Wu (2023).

Figure 9Surface salinity at the profile of y = 140 km under three grid resolutions. Dashed blue and red lines are the relative salinity errors for grid sizes of 1500 and 750 m, respectively, compared to the 375 m grid.
Secondly, at y = 140 km, approximately at the location of the plume's rotational centre, a cross-sectional profile was extracted to analyse the effect of grid resolution on the formation of the bulge in the near- and mid-field regions (see Fig. 9). When the grid resolution is 1500 m, the salinity at the centre of the bulge is relatively low, around 17.5 psu. As the grid resolution increases, the asymmetry of surface salinity from the centre of the bulge toward the edge of the inertial radius becomes more pronounced. Using the 375 m grid resolution as the reference, when the grid resolution is doubled or quadrupled, the salinity error relative to the reference case fluctuates within 10 %.
Finally, at y = 100 km, the relative freshwater transport carried by the coastal buoyancy current induced by the plume is calculated to assess the impact of grid resolution on the simulation results in the far-field region. The relative freshwater transport is determined by the ratio of the freshwater content at this location to that at the river mouth. At y = 100 km, the simulated surface coastal current velocity is consistently 0.30 m s−1 across all grid resolutions, indicating minimal influence of grid resolution on current velocity. The percentage of freshwater transport at this location is 59.4 %, 57.5 %, and 60.6 % for grid resolutions of 1500, 750, and 375 m, respectively.

Figure 10The calculation domain and its grid division of the semi-closed estuary. The minimum grid resolution is 200 m. The river channel cross-section is symmetric along the channel centreline and uniform along the channel direction. The initial water depth is 10.2 m and α = 0.0007. Three characteristic points are marked: the channel centre (A), the WD boundary (B), and the initially dry location (C). The initial salinity is set to 0 on the left side of the solid red line and 35 psu on the right side.
3.4 Saltwater enters an idealised semi-enclosed estuary
In addition to estuarine freshwater plumes, another phenomenon related to saltwater and freshwater interactions is saltwater intrusion into estuaries under tidal forcing. In this section, a semi-enclosed idealised river channel is configured, as shown in Fig. 10. This test case follows the setup described by Chen et al. (2022), with the computational mesh redefined accordingly. The channel is 15 km long, 3 km wide, and 10.2 m deep, with an initial salinity of 0. The channel features a riverbank slope of 0.033 and a floodplain slope of 0.0007. The right boundary is open to the sea, with a salinity of 35 psu, where a semi-diurnal tide with a 1 m amplitude is applied. The water temperature is uniformly set to 20 °C. Given that existing 3D DG baroclinic models lack empirical validation for handling WD processes, this test examines the model's applicability and reliability in solving the salinity transport equation in the presence of WD boundaries. The computational domain features a grid resolution ranging from 200 to 800 m, with the vertical dimension divided into 10 layers. The model operates with a time step of 0.2 s. The linear state equation is applied again, with αT=0, βS=0.714, T0 = 20 °C, and S0 = 35 psu, to update the density. The horizontal and vertical viscosities are set to 0.01 m2 s−1, the bottom friction coefficient is set to 0.005, and the threshold water depth is set to 0.05 m. The limiters mentioned in Sect. 2.3 are all applied to maintain robustness.
During the flood tide, seawater from the open boundary flows into the semi-closed channel and overtops the floodplain (Fig. 11). Three representative points were selected to analyse temporal variations in tidal water elevation and velocities: site A, located at the centre of the channel; site B, near the WD interface on the top of the riverbank slope at the initial time; and site C, situated in the initially dry intertidal zone (Fig. 10). At sites A and B, the surface water elevations exhibit nearly identical variations over a lunar day. However, at site C, water levels show periodic fluctuations only during the 8 h corresponding to the high-water time, remaining 0 the rest of the time (Fig. 12a). For site A, the mean velocity in the along-channel direction exhibits well-defined periodic variation, while the mean velocity in the cross-channel direction remains close to 0, indicating that the velocity field within the channel is minimally affected by the WD boundary treatment. For site B, the mean velocity in the along-channel direction is generally similar to that of site A. However, during the two flood tide phases, the velocity is slightly reduced due to the influence of the wetting and drying boundary treatment. In contrast, the mean velocity in the cross-channel direction shows periodic variation consistent with the tidal cycle. At site C, velocity is only observed during high water levels, with both the magnitude and the direction of the velocity varying during the 8 h window of tidal inundation (Fig. 12b and c). Moreover, the salinity variations along the channel centreline are shown in Fig. 13. As seawater intrudes from the estuarine mouth, the salinity values within the channel progressively increase in the negative x direction. Vertically, the salinity distribution exhibits a characteristic pattern of lower salinity near the surface and higher salinity near the bottom. Although this numerical experiment may not provide highly quantitative conclusions, the model's simulation results of the saltwater intrusion process involving WD interfaces are consistent with physical expectations.

Figure 12Time series of surface water elevation (a), depth-averaged velocity along the channel (b), and depth-averaged velocity across the channel (c) at points A, B, and C.
This study presents the development of a novel 3D discontinuous Galerkin coastal and estuarine modelling system, DGCEMS. The model distinguishes itself from existing 3D DG-based ocean models by employing σ coordinates, a nonsplit-mode framework, and a quadrature-free nodal discontinuous Galerkin method. A semi-implicit Runge–Kutta scheme is applied in the model. The code is available at https://doi.org/10.5281/zenodo.14803724 (Chen, 2025). Numerical tests show that the simulation results of the model have a second-order convergence for surface water elevation, horizontal velocity, and tracer fields, while the convergence of the vertical velocity field is approximately first order. The spurious mixing is also well controlled and comparable to the existing 3D DG coastal ocean model Thetis. The new model demonstrates low sensitivity to changes in grid resolution when simulating surface river plumes, consistently producing comparable results even with relatively coarse grids, and it has the capability to simulate salt–freshwater interactions in the presence of wetting and drying boundaries. In future work, the model will be further optimised in terms of its parallel computing strategy and overall solution framework to improve computational efficiency and scalability. Additional physical processes and modules, such as wave–current interactions, sediment transport, and biogeochemical dynamics, will also be incorporated to enhance the model's capability in simulating more complex and realistic estuarine and coastal systems.
The static version of the DGCEMS (v1.0.0) source code is available at https://doi.org/10.5281/zenodo.14803724 (Chen, 2025). The code of DGCEMS is publicly available on GitHub via https://github.com/ZerengChen/DGCEMS (last access: 5 December 2024).
No data sets were used in this article.
ZC: conceptualisation, methodology, software, validation, writing – original draft, visualisation. QZ: conceptualisation, writing – review and editing, supervision, project administration, funding acquisition. GR: methodology, software, supervision. YN: validation, formal analysis, visualisation.
The contact author has declared that none of the authors has any competing interests.
Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors.
The authors gratefully acknowledge the financial support by the joint funds of the National Natural Science Foundation of China (grant no. U1906231) and the Chongqing Water Conservancy Science and Technology Project (grant no. CQSLK-2023004).
This research has been supported by the joint funds of the National Natural Science Foundation of China (grant no. U1906231) and the Chongqing Water Conservancy Science and Technology Project (grant no. CQSLK-2023004).
This paper was edited by Simone Marras and reviewed by two anonymous referees.
Aizinger, V. and Dawson, C.: The local discontinuous Galerkin method for three-dimensional shallow water flow, Comput. Method. Appl. M., 196, 734–746, https://doi.org/10.1016/J.CMA.2006.04.010, 2007.
Bertsch, R., Glenis, V., and Kilsby, C.: Building level flood exposure analysis using a hydrodynamic model, Environ. Modell. Softw., 156, 105490, https://doi.org/10.1016/j.envsoft.2022.105490, 2022.
Blaise, S., Comblen, R., Legat, V., Remacle, J., Deleersnijder, E., and Lambrechts, J.: A discontinuous finite element baroclinic marine model on unstructured prismatic meshes: Part I: space discretization, Ocean Dynam., 60, 1371–1393, https://doi.org/10.1007/s10236-010-0358-3, 2010.
Burchard. H., Bolding, K., and Villarreal, M.: GOTM, a general ocean turbulence model: theory, implementation and test cases, Technical Report EUR 18745 EN, European Commission, Brussels, Belgium, 1999.
Chen, C., Liu, H., and Beardsley, R.: An unstructured grid, finite-volume, three-dimensional, primitive equations ocean model: application to coastal ocean and estuaries, J. Atmos. Oceanic Technol., 20, 159–186, https://doi.org/10.1175/1520-0426(2003)020<0159:AUGFVT>2.0.CO;2, 2003.
Chen, C., Qi, J., Liu, H., Beardsley, R., Lin, H., and Cowles, G.: A wet/dry point treatment method of FVCOM, part I: Stability experiments, J. Mar. Sci. Eng., 10, https://doi.org/10.3390/jmse10070896, 2022.
Chen, Z.: The discontinuous Galerkin coastal and estuarine modelling system (DGCEMS), Zenodo [code], https://doi.org/10.5281/zenodo.14803724, 2025.
Chen, Z., Zhang, Q., Ran, G., and Nie, Y.: A wetting and drying approach for a mode-nonsplit discontinuous Galerkin hydrodynamic model with application to Laizhou Bay, J. Mar. Sci. Eng., 12, 147, https://doi.org/10.3390/jmse12010147, 2024.
Cheng, J., Liu, T., and Luo, H.: A hybrid reconstructed discontinuous Galerkin method for compressible flows on arbitrary grids, Comput. Fluids, 139, 68–79, https://doi.org/10.1016/j.compfluid.2016.04.001, 2016.
Comblen, R., Blaise, S., Legat, V., Remacle, J., Deleersnijder, E., and Lambrechts, J.: A discontinuous finite element baroclinic marine model on unstructured prismatic meshes: Part II: implicit/explicit time discretization, Ocean Dynam., 60, 1395–1414, https://doi.org/10.1007/s10236-010-0357-4, 2010.
Conroy, C. and Kubatko, E.: hp discontinuous Galerkin methods for the vertical extent of the water column in coastal settings part I: Barotropic forcing, J. Comput. Phys., 305, 1147–1171, https://doi.org/10.1016/j.jcp.2015.10.038, 2016.
Dawson, C. and Aizinger, V.: A discontinuous Galerkin method for three-dimensional shallow water equations, J. Sci. Comput., 22, 245–267, https://doi.org/10.1007/s10915-004-4139-3, 2005.
Delandmeter, P.: Discontinuous Galerkin finite element modelling of geophysical and environmental flows, PhD thesis, Universite Catholique de Louvain, 2017.
Delandmeter, P., Lambrechts, J., Legat, V., Vallaeys, V., Naithani, J., Thiery, W., Remacle, J.-F., and Deleersnijder, E.: A fully consistent and conservative vertically adaptive coordinate system for SLIM 3D v0.4 with an application to the thermocline oscillations of Lake Tanganyika, Geosci. Model Dev., 11, 1161–1179, https://doi.org/10.5194/gmd-11-1161-2018, 2018.
Epshteyn, Y. and Rivière, B.: Fully implicit discontinuous finite element methods for two-phase flow, Appl. Numer. Math., 57, 383–401, https://doi.org/10.1016/j.apnum.2006.04.004, 2007.
Faghih-Naini, S., Kuckuk, S., Aizinger, V., Zint, D., Grosso, R., and Köstler, H.: Quadrature-free discontinuous Galerkin method with code generation features for shallow water equations on automatically generated block-structured meshes, Adv. Water Resour., 138, 103552, https://doi.org/10.1016/j.advwatres.2020.103552, 2020.
Hesthaven, J. and Warburton, T.: Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and Applications, Springer Science & Business Media, ISBN 978-0-387-72065-4, 2007.
Ilicak, M., Adcroft, A., Griffies, S., and Hallberg, R.: Spurious dianeutral mixing and the role of momentum closure, Ocean Model., 45, 37–58, https://doi.org/10.1016/j.ocemod.2011.10.003, 2012.
Jackett, D., McDougall, T., Feistel, R., Wright, D., and Griffies, S.: Algorithms for density, potential temperature, conservative temperature, and the freezing temperature of seawater, J. Atmos. Oceanic Technol., 23, 1709–1728, https://doi.org/10.1175/JTECH1946.1, 2006.
Kärnä, T., Kramer, S. C., Mitchell, L., Ham, D. A., Piggott, M. D., and Baptista, A. M.: Thetis coastal ocean model: discontinuous Galerkin discretization for the three-dimensional hydrostatic equations, Geosci. Model Dev., 11, 4359–4382, https://doi.org/10.5194/gmd-11-4359-2018, 2018.
Kowalik, Z. and Murty, T.: Numerical modeling of ocean dynamics, Advanced Series on Ocean Engineering (Vol. 5), World Scientific, https://doi.org/10.1142/1970, 1993.
Le, H., Lambrechts, J., Ortleb, S., Gratiot, N., Deleersnijder, E., and Soares-Frazão, S.: An implicit wetting–drying algorithm for the discontinuous Galerkin method: Application to the Tonle Sap, Mekong River Basin, Environ. Fluid Mech., 20, 923–951, https://doi.org/10.1007/s10652-019-09732-7, 2020.
Lee, H.: Implicit discontinuous Galerkin scheme for shallow water equations, J. Mech. Sci. Technol., 33, 3301–3310, https://doi.org/10.1007/s12206-019-0625-2, 2019.
Lee, H.: Implicit discontinuous Galerkin scheme for discontinuous bathymetry in shallow water equations, KSCE J. Civ. Eng., 24, 2694–2705, https://doi.org/10.1007/s12205-020-2409-8, 2020.
Lesser, G., Roelvink, J., van Kester, J., and Stelling, G.: Development and validation of a three-dimensional morphological model, Coast. Eng., 51, 883–915, https://doi.org/10.1016/j.coastaleng.2004.07.014, 2004.
Li, L. and Zhang, Q.: A new vertex-based limiting approach for nodal discontinuous Galerkin methods on arbitrary unstructured meshes, Comput. Fluids, 159, 316–326, https://doi.org/10.1016/j.compfluid.2017.10.016, 2017.
Li, W.: Quadrature-free forms of discontinuous Galerkin methods in solving compressible flows on triangular and tetrahedral grids, Math. Comput. Simulat., https://doi.org/10.1016/j.matcom.2023.11.030, 2024.
MacCready, P., Hetland, R., and Geyer, W.: Long-term isohaline salt balance in an estuary, Cont. Shelf Res., 22, 1591–1601, https://doi.org/10.1016/S0278-4343(02)00023-7, 2002.
Medeiros, S. and Hagen, S.: Review of wetting and drying algorithms for numerical tidal flow models, Int. J. Numer. Meth. Fl., 71, 473–487, https://doi.org/10.1002/fld.3668, 2013.
Moulinec, C., Denis, C., Pham, C. T., Rougé, D., Hervouet, J, Razafindrakoto, E., Barber. R., Emerson. D., and Gu, X.: TELEMAC: An efficient hydrodynamics suite for massively parallel architectures, Comput. Fluids, 51, 30–34, https://doi.org/10.1016/j.compfluid.2011.07.003, 2011.
Nair, R. D.: Quadrature-free implementation of a discontinuous Galerkin global shallow-water model via flux correction procedure, Mon. Weather Rev., 143, 1335–1346, https://doi.org/10.1175/MWR-D-14-00174.1, 2015.
Petersen, M., Jacobsen, D., Ringler, T., Hecht, M., and Maltrud, M.: Evaluation of the arbitrary Lagrangian–Eulerian vertical coordinate method in the MPAS-Ocean model, Ocean Model., 86, 93–113, https://doi.org/10.1016/j.ocemod.2014.12.004, 2015.
Ran, G. Q., Zhang, Q. H., and Chen, Z. R.: Development of a three-dimensional hydrodynamic model based on the discontinuous Galerkin method, Water, 15, https://doi.org/10.3390/w15010156, 2022.
Sanz-Ramos, M., López-Gómez, D., Bladé, E., and Dehghan-Souraki, D.: A CUDA Fortran GPU-parallelised hydrodynamic tool for high-resolution and long-term eco-hydraulic modelling, Environ. Model. Softw., 161, 105628, https://doi.org/10.1016/j.envsoft.2023.105628, 2023.
Shahbazi, K.: An explicit expression for the penalty parameter of the interior penalty method, J. Comput. Phys., 205, 401–407, https://doi.org/10.1016/j.jcp.2004.11.017, 2005.
Shchepetkin, A. and McWilliams, J.: The regional oceanic modeling system (ROMS): a split-explicit, free-surface, topography-following-coordinate oceanic model, Ocean Model., 9, 347–404, https://doi.org/10.1016/j.ocemod.2004.08.002, 2005.
Smagorinsky, J.: General circulation experiments with the primitive equations: I. The basic experiment, Mon. Weather Rev., 91, 99–164, https://doi.org/10.1175/1520-0493(1963)091<0099:GCEWTP>2.3.CO;2, 1963.
Toro, E.: Shock-capturing Methods for Free-surface Shallow Flows, Wiley-Blackwell, ISBN 978-0-471-98766-6, 2001.
Vallaeys, V.: Discontinuous Galerkin Finite Element Modelling of Estuarine and Plume Dynamics, UCL-Université Catholique de Louvain, http://hdl.handle.net/2078.1/203013, last access: 30 August 2018.
Wu, H.: Evaluation on the tracer simulation under different advection schemes in the ocean model, Anthropocene Coasts, 6, 1, https://doi.org/10.1007/s44218-023-00017-7, 2023.
Xing, Y. and Zhang, X.: Positivity-preserving well-balanced discontinuous Galerkin methods for the shallow water equations on unstructured triangular meshes, J. Sci. Comput., 57, 19–41, https://doi.org/10.1007/s10915-013-9695-y, 2013.
Zhang, Y., Ye, F., Stanev, E., and Grashorn, S.: Seamless cross-scale modeling with SCHISM, Ocean Model., 102, 64–81, https://doi.org/10.1016/j.ocemod.2016.05.002, 2016.
Zhou, W., Melack, J., and MacIntyre, S.: Hydrodynamic modeling of floodplains with inundated trees and floating plants, Environ. Model. Softw., 179, 106117, https://doi.org/10.1016/j.envsoft.2024.106117, 2024.
- Abstract
- Introduction
- Model and discretisation
- Tests and analysis
- Conclusions
- Appendix A: Terms for the baroclinic manufactured solution test
- Code and data availability
- Data availability
- Author contributions
- Competing interests
- Disclaimer
- Acknowledgements
- Financial support
- Review statement
- References
- Abstract
- Introduction
- Model and discretisation
- Tests and analysis
- Conclusions
- Appendix A: Terms for the baroclinic manufactured solution test
- Code and data availability
- Data availability
- Author contributions
- Competing interests
- Disclaimer
- Acknowledgements
- Financial support
- Review statement
- References