Numerical solution of the continuity equation

The advective tendency is discretised on the same Arakawa C-grid (the ac-grid) used by the momentum solvers: lives on aa-nodes (cell centres) and lives on the ac-faces ( on acx, on acy). All Yelmo advection schemes evaluate the face fluxes in donor-cell upwind form,

with defined analogously on the acy-faces. The corresponding flux-divergence at cell is

The two recommended schemes — selected at runtime via the namelist parameter ytopo.solver — differ only in how the upwind fluxes are evaluated in time. Both are mass-conservative by construction (the flux leaving cell across a face is the same flux entering its neighbour), so the discrete update of summed over the whole domain matches the discrete integral of the source/sink terms exactly, up to boundary outflows.

expl-upwind — explicit forward-Euler donor-cell upwind

Selected by ytopo.solver = "expl-upwind". The implementation is calc_adv2D_expl_upwind in solver_advection.f90; the scheme follows Winkelmann et al. (2011), Eq. (18).

The flux is evaluated using and at the start of the timestep, and the ice thickness is advanced by explicit forward Euler:

where collects whatever source/sink term is being applied in the same call (zero in the standard dynamic-only call from the mass_conservation.f90 driver, since the mass-balance terms are added separately). A hard rate limiter is applied for safety.

The scheme is first-order accurate in time and space, monotone, and positivity-preserving for the depth-averaged transport problem when the CFL condition

is respected. Yelmo enforces this via an adaptive timestepper at the top level (see Parameters), so the user does not need to tune the advection step manually — but the scheme is sensitive to under-resolved velocity peaks at the grounding line.

impl-lis — implicit upwind via LIS

Selected by ytopo.solver = "impl-lis". The implementation is linear_solver_matrix_advection_csr_2D in solver_advection.f90.

The face fluxes are evaluated with the velocity field (frozen at the start of the timestep) but with the unknown thickness , so the upwind discretisation becomes a sparse linear system for instead of an explicit update:

with and analogously for . Each face contributes a single off-diagonal coefficient to the row for cell — the one corresponding to its upwind neighbour — and a diagonal contribution when cell itself is the upwind donor. The assembled operator therefore has at most five non-zeros per row (centre plus four neighbours), is stored in CSR form, and is solved each timestep by LIS. The default solver configuration is BiCG with an ILU preconditioner, configurable at runtime via ytopo.adv_lis_opt.

Boundary rows are set per face by the boundaries flag: "zero" imposes at the edge (Dirichlet), "infinite" zeroes the normal derivative (Neumann outflow), and "periodic" wraps the stencil to the opposite edge. The mask values mask = 0 and mask = -1 further allow per-cell pinning of to zero or to its previous value.

Because the implicit upwind scheme is unconditionally stable for this linear transport problem, it tolerates larger timesteps than expl-upwind — typically the limiting factor becomes the physical adaptive timestep used by Yelmo (driven by the momentum balance and the mass-balance terms) rather than a CFL constraint on the advection. The price is one sparse linear solve per timestep and a slightly more diffusive solution than the explicit upwind scheme at the same .

Choosing between the two

  • expl-upwind is fast, simple, fully local, and the natural default for high-resolution simulations where is already small for other reasons (e.g. fast streaming flow).
  • impl-lis is the right choice when the velocity field has localised fast peaks that would force expl-upwind into very small timesteps — it lets the global adaptive be set by physics elsewhere in the model.

Both schemes are mass-conservative to round-off; the choice does not change the continuum equation being solved, only the time-stepping and the resulting cost / smoothing trade-off.