Simulating the evolution the ice shelf mass balance using equation 1 requires a time-stepping scheme. In order to allow numerical stability with large time steps, a semi-implicit method is used. This works by defining the residual operator where the subscript indicates the value at the time step being solved for, while subscript indicates the value at the previous time step. This is a semi-implicit scheme (rather than fully implicit) because melt rate is used from the previous time step, rather using from the current time step. In this equation, and represent vectors of thickness and velocity values at each grid point at time step , while is a vector of thickness values at the previous time step and is evaluated using the Chebyshev differentiation procedure previously described. This is a nonlinear system and can be solved using Newton's method, where the root is determined iteratively by solving the linear equation Here, is the current value of the ice thickness, is the Jacobian of , and the new iterate .
In order to avoid having to evaluate the Jacobian of this system, a Jacobian-free Newton-Krylov method (Knoll and Keyes, 2004) is used. This solves the linear equation 23 iteratively via a Krylov method which only requires the product of the Jacobian with the iterate, and not the actual Jacobian itself. This product is approximated as a finite difference: The NITSOL implementation (Pernice and Walker, 1998) of a Newton-Krylov solver was chosen, as it is very flexible and written in Fortran, which was the language other portions of the code were to be implemented with.
The spectral discretisation used here corresponds to dense matrices, making equation 23 very poorly conditioned. As a result, the Krylov solvers in NITSOL were unable to converge on a solution without a preconditioner. Even with relatively-sparse matrices, preconditioners are often needed for iterative methods (e.g.: Pernice and Walker, 1998; Knoll and Keyes, 2004). A right preconditioner, , is chosen so that the modified problem is well-conditioned and can be solved for . It is then easy to find using . A good preconditioner will have , so that to a decent approximation. A tradeoff must be made between a preconditioner which is a sufficiently good approximation of to be useful and one which is not too expensive or unstable to apply (e.g. would be a perfect preconditioner but constructing it is of equal difficulty to solving the original, unpreconditioned problem).
The Jacobian of equation 1 can be expressed as where we define , and is the differential operator in the -direction. Although will be a dense matrix when using a spectral method, it can be approximated as a sparse finite difference operator, as proposed by Orszag (1980). In this case , and thus also , are tridiagonal matrices. This means that the finite difference form of the Jacobian can be "inverted" simply by solving the tridiagonal system, which can be done efficiently using a routine in LAPACK (Anderson et al., 1999). This proved effective at preconditioning the Krylov solver in NITSOL, whilst maintaining the accuracy of the underlying pseudospectral method.
The term in equation 1 can itself be found by solving a nonlinear system, this time with the form This has a Jacobian Every time a new residual is calculated using equation 22, equation 26 is solved iteratively using NITSOL.
It is also possible to construct a nonlinear system which takes both and as arguments and solve for both simultaneously. While this avoids the need to repeatedly solve for , it proved to be much less stable and tended to require smaller time-steps in order to prevent failure. As such, the approach outlined above proved to be computationally cheaper overall.
Of the three linear solvers provided with NITSOL, only GMRES proved reliable, with the BiCGSTAB and TFQMR solvers typically failing. Consult Pernice and Walker (1998) for more details on these routines. It was also found that the "backtracking" globalisation used in NITSOL, which is meant to prevent the solution from starting to diverge, had a tendency to make the solver get trapped in local minima for this problem. As such, it was turned off and this was found to greatly improve the robustness of the nonlinear solver.