Heat conduction with phase change in permafrost modules of vegetation models Thanks: Received… Accepted… Published online on… Recommended by…. David Hötten, Jenny Niebsch, Ronny Ramlau, Walter Zulehner Abstract We consider the problem of heat conduction with phase change, that is essential for permafrost modeling in Land Surface Models and Dynamic Global Vegetation Models. These models require minimal computational effort and an extremely robust solver for large-scale, long-term simulations. The weak enthalpy formulation of the Stefan problem is used as the mathematical model and a finite element method is employed for the discretization. Leveraging the piecewise affine structure of the nonlinear time-stepping equation system, we demonstrate that this system has a unique solution and provide a solver that is guaranteed to find this solution in a finite number of steps from any initial guess. Comparisons with the Neumann analytical solution and tests in the Lund-Potsdam-Jena managed Land vegetation model reveal that the new method does not introduce significantly higher computational costs than the widely used DECP method while providing greater accuracy. In particular, it avoids a known nonphysical artifact in the solution. \setbibdata 1xx462017 Heat conduction permafrost keywords Stefan problem, enthalpy formulation, permafrost, decoupled energy conservation parametrization, piecewise affine function, Katzenelson algorithm {AMS} 65M60, 65M22 1 Introduction Human activities have caused a transformation of all parts of the earth system, including atmosphere, land, oceans and cryosphere. The need of discerning and evaluating the past and potential future impacts of humans on their environment renders process-based computer models as an indispensable tool, since they allow for the consideration of counterfactual scenarios. Dynamic Global Vegetation Models (DGVMs) and Land Surface Models (LSMs) represent the biophysical water, energy and substance cycles that happen within land systems and in exchange with the other system parts. While the governing laws of the involved processes come from natural sciences, mathematical modeling and numerical analysis is often necessary to formulate and solve the resulting sets of equations. In particular for cases of nonlinear dynamics, the standard methods of calculating numerical solutions are often either not applicable or too slow to be viable in long-term, global simulation runs. One example of such dynamics is the conduction of heat within the soil for regions where phase changes of the water in the soil plays a significant role in the ground thermal regime. In permafrost regions, which cover up to 22% of the area of the northern hemisphere [ 25 ] , the top layer of the soil usually thaws during summer and refreezes during winter. Without considering the release and absorption of latent heat which makes the set of differential equations nonlinear, the temperature for this type of ground cannot be accurately simulated. The numerical solution of the heat equation with phase change, commonly referred to as the Stefan problem, is a well-established and extensively studied topic in numerical analysis [ 7 , 26 ] . Numerous methods and results are available also for the enthalpy formulation adopted in this study [ 32 , 10 , 23 , 8 ] . In the field of geosciences, the enthalpy formulation is employed to model and numerically solve the energy balance in ice sheet simulations, as for example in the Parallel Ice Sheet Model (PISM) [ 4 ] . However, the application of this formulation in DGVMs and LSMs presents unique challenges: (1) handling highly heterogeneous and discontinuous data for thermal soil properties due to the layered soil structure, (2) ensuring that the method remains stable and robust while solving more than 60,000 soil columns with heterogeneous forcing and parameters in parallel over simulation periods exceeding 4,000 years (3) achieving minimal computational cost to enable such large-scale simulations. Existing approaches implemented in DGVMs and LSMs vary in terms of the governing equations and discretization schemes employed. A comprehensive overview of the methods used in different software models is provided in Table 1 of [ 30 ] . Most widely used is the decoupled energy conservation parametrization (DECP), wherein the heat conduction timestep uses the standard heat equation, while the effects of phase changes are incorporated afterwards by a correction that is based on an energy conservation argument [ 18 , 22 , 9 , 27 , 19 , 24 , 34 ] . Typically, the heat conduction timestep in DECP is solved using an implicit method such as Crank-Nicolson [ 18 , 20 , 19 , 15 , 24 , 34 ] . However, this method is known to suffer from an artificial stretch of the freezing region, which leads to inaccuracies [ 21 ] . Another commonly employed approach to circumvent the nonlinearity in time stepping is the use of an apparent heat capacity that accounts for the phase-change effect [ 14 , 5 ] . Methods that do solve the nonlinear time stepping system often lack a proven globally convergent solver for the time stepping system, which would be desirable for large-scale and long-term simulations [ 30 ] . To address this research gap, this study proposes a numerical method specifically designed for simulating soil temperatures in DGVMs and LSMs. The method is implemented and tested within the model Lund-Potsdam-Jena managed Land (LPJmL) which is a DGVM, to demonstrate its effectiveness for the intended application. The finite element method is based on the weak enthalpy formulation, which inherently incorporates phase changes, thereby eliminating the need for a posteriori corrections of numerical results. The time-stepping scheme is implicit, with both backward Euler and Crank–Nicolson methods developed and evaluated. The nonlinear solver leverages the piecewise-affine structure of the system, ensuring both computational efficiency and global convergence to the exact solution within a finite number of iterations. This solver is commonly known as the Katzenelson algorithm [ 16 ] . We begin by presenting the weak enthalpy formulation of the Stefan problem, followed by the derivation of the discretized model in Section 3 and the corresponding system of nonlinear equations in Section 4 . In Section 5 , we discuss theory on piecewise affine functions and tridiagonal matrices to prove that solutions to the system of equations are roots of a piecewise affine homeomorphism. This gives existence and uniqueness of discrete solutions as well as sufficient conditions for the Katzenelson solver to converge globally. Section 6 presents the results of a mesh convergence study and soil temperature simulations in LPJmL using the proposed method. Finally, Section 7 compares the new method to the DECP approach and discusses the key differences between the two. For readers that are not familiar with the Stefan problem and its enthalpy formulation we recommend the introductory texts [ 2 ] and [ 31 ] . An introduction to the finite element method that fits well with the terminology used in this paper can be found in [ 35 ] and [ 36 ] . Piecewise affine function theory is introduced in [ 28 ] . 2 Mathematical model LPJmL computes output variables on a spatial grid with a resolution of 0.5^{\circ} in both latitude and longitude. As is standard practice in LSMs and DGVMs, the soil temperature within each grid cell is assumed to vary only with depth, while remaining uniform in the horizontal directions. Consequently, heat conduction is modeled as a one-dimensional process in space. The spacetime domain is defined as \displaystyle G:=(0,D)\times(0,T), where D denotes the maximum depth of the soil column and T represents the total simulation duration. On this domain, the unknown temperature is denoted by u(x,t) . The given spatially dependent data include the frozen and unfrozen volumetric heat capacities, c_{f}(x) and c_{u}(x) , respectively, as well as the frozen, mushy and unfrozen thermal conductivities, k_{f}(x),k_{m}(x) and k_{u}(x) . Additionally, L(x) represents the volumetric latent heat of fusion. A Dirichlet boundary condition s(t) is assigned at the surface and a zero flux Neumann boundary condition at the bottom. The initial condition is given as u_{0}(x) . The heat conduction equation with phase change can be expressed either in terms of temperature or enthalpy. The classical two-phase Stefan problem uses temperature and assumes that the liquid and solid phases are separated by an interface with an unknown differentiable trajectory \displaystyle X:[0,T]\mapsto(0,D)\,. The spatial domain is then partitioned into two regions: (1) \displaystyle G^{-} \displaystyle:=\{(x,t)\in G\mid xX(t)\}\,. Within the subdomains G^{-} and G^{+} , the standard heat equation holds. The principle of energy conservation, applied to the moving interface, leads to the Stefan condition at the free boundary, as expressed in equation ( 2 ). Stefan problem [ 2 ] Given boundary data u_{0}(x)>0 and s(t)<0 for all (x,t)\in G , find a curve X(t) that divides G in G^{-} and G^{+} as defined by ( 1 ) and a function u(x,t) such that \displaystyle c_{f}(x)u(x,t)_{t} \displaystyle=(k_{f}(x)u(x,t)_{x})_{x}\quad \displaystyle(x,t)\in G^{-} \displaystyle c_{u}(x)u(x,t)_{t} \displaystyle=(k_{u}(x)u(x,t)_{x})_{x}\quad \displaystyle(x,t)\in G^{+} \displaystyle u(X(t),t) \displaystyle=0\quad \displaystyle(0\leq t\leq T) (2) \displaystyle L(X(t))X(t)_{t} \displaystyle=k_{f}(X(t))u(X(t)^{-},t)_{x}-k_{u}(X(t))u(X(t)^{+},t)_{x} \displaystyle(00\\ k_{m}(x)\quad&\text{for }u=0\\ k_{f}(x)\quad&\text{for }u<0\,,\end{cases} we can express the governing differential equation as: (4) e_{t}(x,t)=\bigl[k\bigl(u(x,t),x\bigr)u_{x}(x,t)\bigr]_{x}, which holds for all x within both phases G^{-} and G^{+} , though not at the interface, and thus enables a unified description of the heat conduction process. The weak formulation is derived from equation ( 4 ) by the standard procedure of multiplying both sides by test functions \phi\in H^{1}(G) , integrating over the spacetime domain G , and applying integration by parts to shift both temporal and spatial derivatives onto the test functions. Additionally, the space of admissible test functions is restricted to account for the essential boundary condition and the initial condition. Weak Formulation [ 31 ] Given data s\in L^{\infty}(0,T) and e_{0}\in L^{\infty}(0,D) , find functions e\in L^{2}(G) and u\in L^{2}(0,T;\;H^{1}(0,D)) with u(0,t)=s(t) for all t\in[0,T] such that \displaystyle u(x,t)=\beta(e(x,t),x)\quad\text{ for almost all $(x,t)\in G$ and } (5) \displaystyle\int\limits_{0}^{T}\int\limits_{0}^{D}[e\phi_{t}-k(u)u_{x}\,\phi_{x}]\,dx\,dt=-\int_{0}^{D}e_{0}(x)\phi(x,0)\,dx for all \phi\in H^{1}(G) with \phi(x,T)=0 and \phi(0,t)=0 . The above formulation eliminates the need for an explicit partition of G into frozen and unfrozen regions. Hence, the number of interfaces is not predetermined but instead can emerge dynamically during the simulation, depending on the input data. In scenarios where only a single interface is present, it can be shown that this formulation is equivalent to the classical Stefan problem. In particular, the Stefan condition can be recovered from this formulation [ 2 ] . The existence and uniqueness of solutions to the weak enthalpy formulation, considering spatially dependent thermal conductivity but constant latent heat and heat capacity, have been proven in [ 11 ] . 3 Discretization In the weak formulation, both the spatial and temporal derivatives are transferred to the test functions due to the lack of differentiability of e and u with respect to time. However, we do not employ a spacetime finite element method, because time-stepping is required to be a feature of our method. Hence, a time discretization is applied as the initial step, reducing the problem to a form that can be addressed using the standard finite element method. 3.1 Time discretization We use an idea from Andreucci and Scarpa [ 3 ] in order to show that solutions of the weak formulation also approximately satisfy a time stepping problem. Let ( u , e ) be a solution to the weak problem. Fix a space-only test function \varphi\in V_{0}=\{v\in H^{1}(0,D)|\,v(0)=0\} and let t_{1},\,t_{2}\in[0,T] with t_{1}0 with \epsilon<\frac{t_{2}-t_{1}}{2} we define \displaystyle\chi_{\epsilon}:(0,T) \displaystyle\mapsto[0,1] \displaystyle\chi_{\epsilon}(t) \displaystyle:=\min\left(1,\,\tfrac{(t-t_{1})_{+}}{\epsilon},\,\tfrac{(t_{2}-t)_{+}}{\epsilon}\right)\,, which belongs to H^{1}(0,T) (see Figure 1 ). Figure 1: Illustration of the auxiliary function \chi_{\epsilon} . The product \varphi(x)\chi_{\epsilon}(t) is thus an element of H^{1}(G) and an admissible test function of the weak formulation. Plugging it into ( 5 ) the equation reads \displaystyle\int\limits_{0}^{T}\chi_{\epsilon}(t)_{t}\int\limits_{0}^{D}e(x,t)\,\varphi(x)\,dx\,dt-\int\limits_{0}^{T}\chi_{\epsilon}(t)\int\limits_{0}^{D}k(u(x,t),x)\,u(x,t)_{x}\,\varphi(x)_{x}\,dx\,dt (6) \displaystyle=-\int_{0}^{D}e_{0}(x)\varphi(x)\chi_{\epsilon}(0)\,dx\,. Since \chi_{\epsilon}(0)=0 , the right-hand side of ( 6 ) vanishes. In addition the first left-hand side term can be expanded, yielding \displaystyle\frac{1}{\epsilon}\int\limits_{t_{1}}^{t_{1}+\epsilon}\int\limits_{0}^{D}e(x,t)\,\varphi(x)\,dx\,dt-\frac{1}{\epsilon}\int\limits_{t_{2}-\epsilon}^{t_{2}}\int\limits_{0}^{D}e(x,t)\,\varphi(x)\,dx\,dt \displaystyle=\int\limits_{0}^{T}\chi_{\epsilon}(t)\int\limits_{0}^{D}k(u(x,t),x)\,u(x,t)_{x}\,\varphi(x)_{x}\,dx\,dt\,. By the Lebesgue differentiation theorem the left-hand side limit \epsilon\rightarrow 0 exists for almost all t_{1} and t_{2} . Taking the limit, it thus holds that (7) \displaystyle\int_{0}^{D}e(x,t_{1}) \displaystyle\varphi(x)\,dx\,-\int_{0}^{D}e(x,t_{2})\,\varphi(x)\,dx \displaystyle=\int_{t_{1}}^{t_{2}}\int_{0}^{D}k(u(x,t),x)\,u(x,t)_{x}\,\varphi(x)_{x}\,dx\,dt\, for almost all t_{1} , t_{2} given our fixed test function \varphi . Different time-stepping schemes can be obtained by applying quadrature rules to the integral of the right hand side of ( 7 ). Choosing \theta\in[0,1] we use the approximation \displaystyle\int_{t_{1}}^{t_{2}}f(t)dt\approx(t_{2}-t_{1})\big[(1-\theta)\,f(t_{1})+\theta\,f(t_{2})\big]\,, for an integrable function f. The cases \theta=0 , \theta=1 and \theta=\frac{1}{2} correspond to the left rectangle , right rectangle , and trapezoid rules respectively. For discrete times t_{0}=0,t_{1},t_{2},\dots,t_{N}\in[0,T] we use the notations \displaystyle e^{n}(x):=e(x,t_{n}),\quad u^{n}(x):=u(x,t_{n}),\quad s^{n}=s(t_{n}),\quad\Delta t_{n}:=t_{n}-t_{n-1}. Based on the above argument, approximate solutions to the weak formulation can be obtained by solving this time stepping problem: Time Discrete Problem Given 0=t_{0}0 . Fully Discrete Problem Given e^{n},u^{n}\in V_{h} with u^{n}(0)=s^{n} and u^{n}=\Pi_{h}\circ\beta(e^{n}) , find e^{n+1},u^{n+1}\in V_{h} such that (9) \displaystyle\left(\tfrac{e^{n+1}-e^{n}}{\Delta t_{n+1}},\varphi\right)_{h}=-\biggl({(1-\theta)\,{\scriptstyle k(u^{n})(u^{n})_{x}}+\theta\,{\scriptstyle k(u^{n+1})(u^{n+1})_{x}}},~~\varphi_{x}\biggr)_{L^{2}} holds for all \varphi\in V_{0,h} and in addition (10) \displaystyle\text{(i)}~u^{n+1}(0)=s^{n+1}\quad\text{ and }\quad\text{(ii)}~u^{n+1}=\Pi_{h}\circ\beta(e^{n+1})\,. In the discrete setting the following data is given. The thermal conductivities are assumed to be piecewise constant functions. Let (11) \displaystyle k_{i}^{u},k_{i}^{m},k_{i}^{f}\ >0\text{ for all }i\in 1,\dots,\kappa\,. We further define the functions (12) \displaystyle k_{i}(u):=\begin{cases}k_{i}^{f}\quad&\text{ for }u<0\\ k_{i}^{m}\quad&\text{ for }u=0\\ k_{i}^{u}\quad&\text{ for }u>0\,,\end{cases} for i=1,\dots,\kappa and with that the function k(u,x) by requiring for all i\in 1,\dots,\kappa that \displaystyle k(u,x)=k_{i}(u)\quad\text{for all }x\in T_{i}\ . For the other parameters we assume piecewise linearity. Let (13) \displaystyle c_{i}^{f},~c_{i}^{u},~L_{i}>0\text{ for all }i\in 1,\dots,\kappa\,. The functions L(x),c_{f}(x),c_{u}(x)\in V_{h} are then defined by \displaystyle c_{f}(x_{i})=c_{i}^{f},\quad c_{u}(x_{i})=c_{i}^{u},\quad L(x_{i})=L_{i}\quad\text{ for all }i\in\{0,\dots,\kappa\}\,. Remark 3.4 . Equation ( 8 ) shows that using (\cdot,\,\cdot)_{h} instead of (\cdot,\,\cdot)_{L_{2}} amounts to employing the trapezoid rule to approximate the integral of the inner product. This procedure is one of the standard routes to obtain a diagonal, so called lumped mass matrix in the system of equations, which has the desirable property of enabling an explicit time-stepping method. Indeed, we will obtain a diagonal mass matrix and an explicit scheme for \theta=0 . 4 System of nonlinear equations In this section the Fully Discretized Problem will be converted to equivalent algebraic systems of nonlinear equations. Let \tilde{\eta}^{n}\in\mathbb{R}^{\kappa+1} and \gamma^{n}\in\mathbb{R}^{\kappa+1} be the coordinate vectors of e^{n} and u^{n} over the V_{h} -basis, such that \displaystyle e^{n}=\sum_{j=0}^{\kappa}\tilde{\eta}_{j}^{n}\,\varphi_{j}\quad\text{and}\quad u^{n}=\sum_{j=0}^{\kappa}\gamma_{j}^{n}\,\varphi_{j}\quad\text{ for }n=1,\dots,N\,. The aim is to derive formulas for \gamma^{n+1} and \tilde{\eta}^{n+1} , given \gamma^{n} and \tilde{\eta}^{n} such that the fully discrete problem is solved. Using the basis of V_{0,h} and the linearity of the inner product, the statement that ( 9 ) holds for all \varphi\in V_{0,h} is equivalent to (14) \displaystyle\underbrace{\bigl(\tfrac{e^{n+1}-e^{n}}{\Delta t_{n+1}},\varphi_{i}\bigr)_{h}}_{\mathbf{A}}= \displaystyle-(1-\theta)\underbrace{\bigl(k(u^{n})(u^{n})_{x},(\varphi_{i})_{x}\bigr)_{L^{2}}}_{\mathbf{B}}-\theta\underbrace{\bigl(k(u^{n+1})(u^{n+1})_{x},(\varphi_{i})_{x}\bigr)_{L^{2}}}_{\mathbf{C}}\, being satisfied for all \varphi_{i} with i\in\{1,\dots,\kappa\} . We start with computing term \mathbf{A} . It holds that \displaystyle\Bigl(\tfrac{e^{n+1}-e^{n}}{\Delta t_{n+1}},\,\varphi_{i}\Bigr)_{h}\;=\;\Bigl(\sum_{j=0}^{\kappa}\tfrac{\tilde{\eta}_{j}^{n+1}-\tilde{\eta}_{j}^{n}}{\Delta t_{n+1}}\,\varphi_{j},\,\varphi_{i}\Bigr)_{h}\;=\;\tfrac{1}{\Delta t_{n+1}}\sum_{j=0}^{\kappa}\bigl(\tilde{\eta}_{j}^{n+1}-\tilde{\eta}_{j}^{n}\bigr)\;\bigl(\varphi_{i},\varphi_{j}\bigr)_{h}. By defining the matrix \tilde{M}_{h}\in\mathbb{R}^{\kappa\times(\kappa+1)} via \displaystyle(\tilde{M}_{h})_{ij}\;:=\;\bigl(\varphi_{i},\varphi_{j}\bigr)_{h},\quad\text{where }i=1,\dots,\kappa,\;j=0,\dots,\kappa, and denoting its i -th row by \tilde{M}_{h}^{i} , the last expression can be written as (15) \displaystyle\Bigl(\tfrac{e^{n+1}-e^{n}}{\Delta t_{n+1}},\;\varphi_{i}\Bigr)_{h}\;=\;\tfrac{1}{\Delta t_{n+1}}\;\tilde{M}_{h}^{i}\,\bigl(\tilde{\eta}^{n+1}-\tilde{\eta}^{n}\bigr). The matrix \tilde{M}_{h} is called the mass matrix . Its entries can be computed using ( 8 ): \displaystyle(\tilde{M}_{h})_{ij}\;=\;\sum_{k=1}^{\kappa}\,\tfrac{h_{k}}{2}\;\bigl[\varphi_{i}(x_{k-1})\,\varphi_{j}(x_{k-1})+\varphi_{i}(x_{k})\,\varphi_{j}(x_{k})\bigr]\;=\;\tfrac{\delta_{ij}}{2}\;\sum_{k=1}^{\kappa}h_{k}\,\bigl(\delta_{i,k-1}+\delta_{i,k}\bigr). As a result we obtain \displaystyle\tilde{M}_{h}=\left[\begin{array}[]{c c}0&\begin{matrix}\tfrac{h_{1}+h_{2}}{2}&0&\cdots&0\\ 0&\ddots&\ddots&\vdots\\ \vdots&\ddots&\tfrac{h_{k-1}+h_{k}}{2}&0\\ 0&\cdots&0&\tfrac{h_{k}}{2}\end{matrix}\end{array}\right]\,. Note that the first column of \tilde{M}_{h} is zero, so the top entries of \tilde{\eta}^{n+1} and \tilde{\eta}^{n} do not contribute to ( 15 ). We define M_{h}\in\mathbb{R}^{\kappa\times\kappa} to be \tilde{M}_{h} with first column deleted and \eta_{n}\in\mathbb{R}^{\kappa} to be \tilde{\eta_{n}} with first entry deleted. The term \mathbf{A} is then equal to \displaystyle\tfrac{1}{{\Delta t_{n+1}}}M_{h}^{i}(\eta^{n+1}-\eta^{n})\,. Remark 4.1 . When s^{n}=0 the first entry of \tilde{\eta}^{n+1} is not uniquely defined by the boundary condition applied to u , as the preimage of 0 under \beta contains multiple elements. Indeed, this entry is not uniquely defined in that case, which is not a problem however, since it is not required to advance to the next time step. We continue with expanding the term \mathbf{B} . To this end, first let j\in\{1,\dots,\kappa\} and consider \big(k(u^{n})(u^{n})_{x},~({\varphi_{i}})_{x}\big)_{L^{2}(T_{j})}, where the integral is restricted to the element T_{j} . Note that for x\in T_{j} we have \displaystyle{\varphi_{i}}(x)_{x}=\frac{\delta_{j,i}-\delta_{j,i+1}}{h_{j}}\quad\text{ and }\quad u^{n}(x)_{x}=\frac{\gamma_{j}^{n}-\gamma_{j-1}^{n}}{h_{j}}\,. Hence, we obtain \displaystyle\big(k(u^{n})(u^{n})_{x},~({\varphi_{i}})_{x}\big)_{L^{2}(T_{j})} \displaystyle=\int_{T_{j}}k(u^{n})(u^{n})_{x}(\varphi_{i})_{x}\,dx \displaystyle=(\delta_{j,i}-\delta_{j,i+1})\frac{\gamma_{j}^{n}-\gamma_{j-1}^{n}}{h_{j}}\int_{T_{j}}\frac{k_{j}(u^{n})}{h_{j}}dx (17) \displaystyle=(\delta_{j,i}-\delta_{j,i+1})\frac{\gamma_{j}^{n}-\gamma_{j-1}^{n}}{h_{j}}\,\overline{k_{j}(u^{n})}^{j} where we have used the notation \overline{f}^{j} for the average of a function f over T_{j} . We define (18) \displaystyle Q_{j}(\gamma^{n}):=\frac{\gamma_{j}^{n}-\gamma_{j-1}^{n}}{h_{j}}\,\overline{k_{j}(u^{n})}^{j}, and show in Appendix A that (19) \displaystyle Q_{j}(\gamma^{n})=\frac{k_{j}(\gamma_{j}^{n})\gamma_{j}^{n}-k_{j}(\gamma_{j-1}^{n})\gamma_{j-1}^{n}}{h_{j}}. Finally, the term \mathbf{B} is computed as \displaystyle\big(k(u^{n})(u^{n})_{x},~({\varphi_{i}})_{x}\big)_{L^{2}} \displaystyle=\sum_{j=0}^{\kappa}\big(k(u^{n})(u^{n})_{x},~({\varphi_{i}})_{x}\big)_{L^{2}(T_{j})} \displaystyle=\sum_{j=0}^{\kappa}(\delta_{j,i}-\delta_{j,i+1})Q_{j}(\gamma^{n})\,. Calculating the sum in the above expression, we arrive at (20) \displaystyle\big(k(u^{n})(u^{n})_{x},~({\varphi_{i}})_{x}\big)_{L^{2}}=F_{i}(\gamma^{n}):=\begin{cases}Q_{i}(\gamma^{n})-Q_{i+1}(\gamma^{n})\quad&\text{ for }i<\kappa\\ Q_{i}(\gamma^{n})\quad&\text{ for }i=\kappa\,.\end{cases}\,, where we have also defined the functions F_{i}:\mathbb{R}^{\kappa}\rightarrow\mathbb{R} . The term \mathbf{C} is calculated analogously to term \mathbf{B} . Combining the results for the terms \mathbf{A} , \mathbf{B} and \mathbf{C} , equation ( 14 ) reads \displaystyle\tfrac{1}{{\Delta t_{n+1}}}M_{h}^{i}(\eta^{n+1}-\eta^{n})=-(1-\theta)F_{i}(\gamma^{n})-\theta F_{i}(\gamma^{n+1})\,, which we require to hold for all i\in\{1,\dots,\,\kappa\} . Pooling these equations together to a system of equations by using \displaystyle F(x):=\big[F_{1}(x)~\dots~F_{\kappa}(x)\big]^{T}\,, we arrive at \displaystyle\tfrac{1}{\Delta t_{n+1}}M_{h}(\eta^{n+1}-\eta^{n})=-(1-\theta)F(\gamma^{n})-\theta F(\gamma^{n+1})\,, which we have shown to be equivalent to ( 9 ) holding for all \varphi\in V_{0,h} . Now we incorporate the equation ( 10 ). With the notation \displaystyle\mathcal{B}(\eta):=\big[\beta(\eta_{1},x_{1})~\beta(\eta_{2},x_{2})~\dots~\beta(\eta_{\kappa},x_{\kappa})\big]^{T}\,, the condition is equivalent to \displaystyle\gamma^{n+1}=\begin{bmatrix}s^{n+1}\\ \mathcal{B}(\eta^{n+1})\end{bmatrix}\,. To see this note that \gamma_{0}^{n+1}=s^{n+1} by (i). Further the equation ( 10 ) (ii) holds if and only if u^{n+1} and \mathcal{B}(\eta^{n+1}) are equal at all nodes, by the characterization of \Pi_{h} . By defining the map (21) \displaystyle F^{n}:\mathbb{R}^{\kappa}\longrightarrow\mathbb{R}^{\kappa},~x\mapsto\ F(\big[s^{n};~x\big])\,, we have F(\gamma^{n})=F^{n}\circ\mathcal{B}(\eta^{n}) . Proposition 4.2 . A solution of the Fully Discrete Problem is implicitly defined by the nonlinear system (22) \displaystyle\tfrac{1}{{\Delta t_{n+1}}}M_{h}(\eta^{n+1}-\eta^{n})=-(1-\theta)\big[F^{n}\circ\mathcal{B}(\eta^{n})\big]-\theta\big[F^{n+1}\circ\mathcal{B}(\eta^{n+1})\big]\,. Remark 4.3 . In case of \theta=0 an explicit solution of the Fully Discrete Problem is given by the time stepping algorithm \displaystyle\eta^{n+1} \displaystyle=\eta^{n}-\Delta t_{n+1}M_{h}^{-1}F(\gamma^{n})\, \displaystyle\gamma^{n+1} \displaystyle=\big[s^{n+1};~\mathcal{B}(\eta^{n+1})\big]\,, where semicolon is MATLAB notation to stack two column vectors on top of each other. 5 Solving the nonlinear system Since the system ( 22 ) is nonlinear, no direct solution formula is available. In this section we employ theory on piecewise affine functions as well as matrix theory to prove existence and uniqueness of solutions and give a solution algorithm. 5.1 Piecewise affine function theory Following Scholtes [ 28 ] we define: Definition 5.1 . A continuous function f\,:\,\mathbb{R}^{n}\longrightarrow\mathbb{R}^{m} is called piecewise affine if there exists a finite set of functions f_{i}(x)=A^{i}\,x+b^{i},~i=1,\dots,k , such that f(x)\in\{f_{1}(x),\dots,f_{k}(x)\} for every x\in\mathbb{R}^{n} . The set of pairs (A^{i},\,b^{i}),~i=1,\dots,k is called a collection of matrix vector pairs corresponding to f. Our main result of this section is based on the below theorem of Fujisawa and Kuh [ 12 ] . Recall that a homeomorphism is a continuous bijective map with a continuous inverse. Theorem 5.2 . Let f:\mathbb{R}^{n}\rightarrow\mathbb{R}^{n} be piecewise affine and (A^{1},\,b^{1}),\dots,(A^{k},\,b^{k}) a collection of matrix vector pairs corresponding to f . We denote by A_{l}^{i} the submatrix of A^{i} composed of its first l columns and rows. If for each l=1,\dots,n the determinants of \displaystyle A_{l}^{1},\dots,A_{l}^{k} do not vanish and have the same sign, then f is a homeomorphism. To apply the theorem the following result from Gantmacher and Klein [ 13 ] about tridiagonal matrices of the form (23) \displaystyle T=\begin{bmatrix}a_{1}&b_{1}&&&0\\ c_{1}&a_{2}&\ddots&&\\ &c_{2}&\ddots&b_{n-2}&\\ &&\ddots&a_{n-1}&b_{n-1}\\ 0&&&c_{n-1}&a_{n}\end{bmatrix}\,, is needed. Theorem 5.3 . Let T be tridiagonal with the property \displaystyle b_{i},\,c_{i}<0\quad\text{ for all }i\in\{1,\dots,n-1\} where b_{i} , c_{i} are defined as in ( 23 ). Then, all eigenvalues of T are real and simple. In addition a simple consequence of the Gershgorin circle theorem will be employed: Corollary 5.4 . Let A\in\mathbb{R}^{n\times n} with a_{ii}>0 for all i\in\{1,\dots,n\} be strictly diagonally dominant. Then, for any eigenvalue \lambda of A it holds that \Re(\lambda)>0 . In combination Theorem 5.3 and Corollary 5.4 yield the following result. Proposition 5.5 . Let T be a tridiagonal matrix of form ( 23 ) such that the conditions of Corollary 5.4 hold and for each column i of T all off-diagonal entries either jointly vanish or are jointly smaller than zero. Then all leading principle minors of T are strictly positive. Proof 5.6 . Let \hat{T} be a submatrix of T composed of its first k columns and rows. We need to show that \det(\hat{T})>0 . All conditions that we assumed to hold for T also hold for \hat{T} . The first step of the prove is to reduce the problem to the case c_{i},b_{i}<0 for all i\in\{1,\dots,n\} . Assume there exists an i\in\{1,\dots,n\} such that the off-diagonal entries of the i-th column vanish. Then, \hat{T} has the form where T_{1} and T_{2} are square tridiagonal matrices for which again the assumptions on T hold. Recall that any eigenvalue of T is a complex root of \rho_{\hat{T}}(\lambda)=\det(\hat{T}-\lambda I) . By the above form of \hat{T} , expanding this determinant at column i with the Laplace expansion formula yields \displaystyle\rho_{\hat{T}}(\lambda)=\det(T_{1}-\lambda I)\det(T_{2}-\lambda I)(a_{ii}-\lambda)\,. Hence, the spectrum decomposition \displaystyle\lambda(\hat{T})=\lambda(T_{1})\cup\lambda(T_{2})\cup\{a_{ii}\} holds. Now we apply the same decomposition to T_{1} and T_{2} respectively, if columns with vanishing off-diagonal entries exist in those matrices and continue recursively. It remains to show the case c_{i},b_{i}<0 for all i\in\{1,\dots,n\} . Theorem 5.3 implies that all eigenvalues of \hat{T} are real and Corollary 5.4 further establishes strict positivity of these eigenvalues. Thus, it holds that \displaystyle\det(\hat{T})=\prod_{\lambda\in\lambda(\hat{T})}\lambda\,>0. 5.2 Homeomorphism property of the implicit system Consider the function (24) \displaystyle\Phi:\mathbb{R}^{\kappa} \displaystyle\rightarrow\mathbb{R}^{\kappa} \displaystyle x \displaystyle\mapsto\tfrac{1}{\Delta t_{n+1}}M_{h}\,(x-\eta^{n})+\theta F^{n+1}\circ\mathcal{B}(x)+(1-\theta)\big[F^{n}\circ\mathcal{B}(\eta^{n})\big]\,. Being a solution of ( 22 ) is equivalent being a root of \Phi . Thus, to apply the above theory we need to establish that (i) the function \Phi is piecewise affine and (ii) the corresponding matrices fulfill the conditions of Proposition 5.5 . Then by Proposition 5.5 the assumptions of Theorem 5.2 are fulfilled which proves that \Phi is a homeomorphism. The continuity of \Phi is given, since the the function \beta(\eta,x_{i}) is continuous in \eta and for the term k_{i}(\beta(\eta,x_{i}))\,\beta(\eta,x_{i}) in ( 19 ) the one-sided limits \eta\downarrow 0 and \eta\uparrow 0 at \eta=0 are both zero. The same holds for the one sided limits at \eta=L_{i} . To show the remaining part of (i) as well as (ii) we explore the nonlinear term F^{n+1}\circ\mathcal{B} of ( 24 ). For that we partition \mathbb{R}^{\kappa} into box-shaped polyhedra as follows. Consider the map (25) \displaystyle q_{i}:\mathbb{R} \displaystyle\longrightarrow\{-1,\,0,\,1\}, \displaystyle\eta \displaystyle\mapsto\begin{cases}-1&\text{ for }\eta<0\\ 0&\text{ for }0\leq\eta\leq L_{i}\\ 1&\text{ for }L_{i}<\eta\,,\end{cases} with i\in\{1,\dots,\kappa\} . In addition, we define the set (26) \displaystyle\mathcal{Z}:=\{-1,0,1\}^{\kappa}\,, and declare for each element (z_{1},\dots,z_{\kappa})\in\mathcal{Z} the polyhedron (27) \displaystyle P_{z}:=\bigotimes_{i=1}^{\kappa}q_{i}^{-1}(z_{i})\subseteq\mathbb{R}^{\kappa}\,. For example, it holds that P_{(1,0,1)}=(L_{1},\infty)\times[0,L_{2}]\times(L_{3},\infty) (see also Figure 3 ). Figure 3: Illustration of the partitioning of \mathbb{R}^{2} , by ( 25 ), ( 26 ) and ( 27 ). It can easily be checked that \big(P_{z}\big)_{z\in\mathcal{Z}} is a partition of \mathbb{R}^{\kappa} . To simplify notation in the matrix definition ( 28 ) of the below theorem, instead of placing z_{i} as a superscript on each variable of the i-th column for all i\in\{1,\dots,\kappa\} , the common superscript is written above each column. In addition \mathbf{1}_{x=y} denotes the indicator function \mathbf{1}_{A}(x) on the set A:=\{y\} . Theorem 5.7 . For any z\in\mathcal{Z} it holds that \displaystyle F^{n}\circ\mathcal{B}(\eta)=A(z)\big[\eta-b(z)\big]+c^{n}\quad\quad\text{ for all }\eta\in P_{z}, where (28) \displaystyle A(z):=\begin{bmatrix}\displaystyle\smash{\mathop{{\scriptstyle[r_{1}+r_{2}]}\,g_{1}}^{\raisebox{6.0pt}{$\scriptstyle z_{1}$}}}&\displaystyle\smash{\mathop{-r_{2}\,g_{2}}^{\raisebox{6.0pt}{$\scriptstyle z_{2}$}}}&&\displaystyle\smash{\mathop{{\color[rgb]{1,1,1}0}}^{\raisebox{6.0pt}{$\scriptstyle z_{\kappa-1}$}}}&\displaystyle\smash{\mathop{0}^{\raisebox{6.0pt}{$\scriptstyle z_{\kappa}$}}}\\ -r_{2}\,g_{1}&{\scriptstyle[r_{2}+r_{3}]}\,g_{2}&\ddots&&\\ &-r_{3}\,g_{2}&\ddots&-r_{\kappa-1}\,g_{\kappa-1}&\\ &&\ddots&{\scriptstyle[r_{\kappa-1}+r_{\kappa}]}\,g_{\kappa-1}&-r_{\kappa}\,g_{\kappa}\\ 0&&&-r_{\kappa}\,g_{\kappa-1}&{\scriptstyle r_{\kappa}}\,g_{\kappa}\\ \end{bmatrix}\,, \displaystyle r_{i}^{z}:=\frac{k_{i}(z)}{h_{i}},\quad g_{i}^{z}:=\frac{\mathbf{1}_{z=-1}}{c_{i}^{f}}+\frac{\mathbf{1}_{z=1}}{c_{i}^{u}},\quad\text{for }i=1,\dots,\kappa\,,~z\in\{-1,\,0,\,1\}\,, \displaystyle b(z):=[\mathbf{1}_{z_{1}=1}L_{1},\dots,\mathbf{1}_{z_{\kappa}=1}L_{\kappa}]^{T} and \displaystyle c^{n}:=[r_{1}^{\sgn(s^{n})}s^{n},0,\dots,0]^{T}\,. Proof 5.8 . Let z\in\mathcal{Z} and \mathbf{\eta}\in P_{z} . Additionally, we define \gamma:=\mathcal{B}(\eta) . We begin with computing a matrix form of \mathcal{B} . Let i\in\{1,\dots,\kappa\} . By \eta\in P_{z} we have q_{i}(\eta_{i})=z_{i} and thus it holds that \displaystyle z_{i}=1\Leftrightarrow\eta_{i}>L_{i}\text{ and }z_{i}=-1\Leftrightarrow\eta_{i}<0\,. Recalling ( 3 ) we obtain \displaystyle\mathcal{B}(\eta)_{i} \displaystyle=\beta(\eta_{i},\,x_{i})=\mathbf{1}_{\eta_{i}<0}\,\frac{\eta_{i}}{c_{i}^{f}}+\mathbf{1}_{\eta_{i}>L_{i}}\,\frac{\eta_{i}-L_{i}}{c_{i}^{u}} \displaystyle=\mathbf{1}_{z_{i}=-1}\,\frac{\eta_{i}}{c_{i}^{f}}+\mathbf{1}_{z_{i}=1}\,\frac{\eta_{i}-L_{i}}{c_{i}^{u}}=\mathbf{1}_{z_{i}=-1}\,\frac{\eta_{i}-\mathbf{1}_{z_{i}=1}L_{i}}{c_{i}^{f}}+\mathbf{1}_{z_{i}=1}\,\frac{\eta_{i}-\mathbf{1}_{z_{i}=1}L_{i}}{c_{i}^{u}} \displaystyle=\left[\frac{\mathbf{1}_{z_{i}=-1}}{c_{i}^{f}}+\frac{\mathbf{1}_{z_{i}=1}}{c_{i}^{u}}\right]\big[\eta_{i}-\mathbf{1}_{z_{i}=1}L_{i}\big]=g_{i}^{z_{i}}[\eta_{i}-b(z)_{i}]\,. It follows that \displaystyle\mathcal{B}(\eta)=\diag(g_{1}^{z_{1}},\dots,g_{\kappa}^{z_{\kappa}})\big[\eta-b(z)\big]\,. To achieve a matrix form of F^{n} we recall ( 21 ) and ( 20 ) and calculate \displaystyle F^{n}(\gamma) \displaystyle=F([s^{n};\,\gamma])=\begin{bmatrix}Q_{1}([s^{n};\,\gamma])-Q_{2}([s^{n};\,\gamma]))\\ \vdots\\ Q_{n-1}([s^{n};\,\gamma])-Q_{\kappa}([s^{n};\,\gamma])\\ Q_{\kappa}([s^{n};\,\gamma])\end{bmatrix}=\overbrace{\begin{bmatrix}1&-1&&0\\ &\ddots&\ddots&\\ &&\ddots&-1\\ 0&&&1\\ \end{bmatrix}}^{:=\mathbb{I}}\begin{bmatrix}Q_{1}([s^{n};\,\gamma])\\ \vdots\\ Q_{\kappa}([s^{n};\,\gamma])\end{bmatrix}\,. Recalling ( 19 ) and noting that \tfrac{k_{i}(\gamma_{j})}{h_{i}}=r_{i}^{z_{j}} the expression reads \displaystyle\mathbb{I}~\times\,\begin{bmatrix}\tfrac{k_{1}(\gamma_{1})\gamma_{1}-k_{1}(s^{n})s^{n}}{h_{1}}\\ \tfrac{k_{2}(\gamma_{2})\gamma_{2}-k_{2}(\gamma_{1})\gamma_{1}}{h_{2}}\\ \vdots\\ \tfrac{k_{\kappa}(\gamma_{\kappa})\gamma_{\kappa}-k_{\kappa}(\gamma_{\kappa-1})\gamma_{\kappa-1}}{h_{\kappa}}\\ \end{bmatrix} \displaystyle=\mathbb{I}~\times\,\begin{bmatrix}r_{1}^{z_{1}}&&&0\\ -r_{2}^{z_{1}}&r_{2}^{z_{2}}&&\\ &\ddots&\ddots&\\ 0&&-r_{\kappa}^{z_{\kappa-1}}&r_{\kappa}^{z_{\kappa}}\\ \end{bmatrix}\begin{bmatrix}\gamma_{1}\\ \gamma_{2}\\ \vdots\\ \gamma_{\kappa}\end{bmatrix}-c^{n} \displaystyle=\begin{bmatrix}\displaystyle\smash{\mathop{\scriptstyle r_{1}+r_{2}}^{\raisebox{6.0pt}{$\scriptstyle z^{1}$}}}&\displaystyle\smash{\mathop{-r_{2}}^{\raisebox{6.0pt}{$\scriptstyle z^{2}$}}}&\displaystyle\smash{\mathop{{\color[rgb]{1,1,1}0}}^{\raisebox{6.0pt}{$\scriptstyle\cdots$}}}&\displaystyle\smash{\mathop{0}^{\raisebox{6.0pt}{$\scriptstyle z^{\kappa}$}}}\\ -r_{2}&\scriptstyle r_{2}+r_{3}&\ddots&\\ &\ddots&\ddots&-r_{\kappa}\\ 0&&-r_{\kappa}&\scriptstyle r_{\kappa}\\ \end{bmatrix}\begin{bmatrix}\gamma_{1}\\ \gamma_{2}\\ \vdots\\ \gamma_{\kappa}\end{bmatrix}-c^{n}\, The result follows from plugging in \gamma=\mathcal{B}(\eta) . Since the other terms of ( 24 ) are linear it follows that \Phi is piecewise-linear with corresponding matrices \displaystyle J_{z}:=\tfrac{1}{\Delta t_{n+1}}M_{h}+\theta A(z)\,, and thus ( i ) is established. To conclude the prove of this subsection it remains to show the property ( ii ). The off-diagonal entries of the i-th column of J_{z} are -\theta\,r_{i}^{z_{i}}g_{i}^{z_{i}} , -\theta\,r_{i+1}^{z_{i}}g_{i}^{z_{i}} or both. Hence, if z_{i}\in\{-1,1\} by the assumption on the data ( 11 ) and ( 13 ) these values are jointly negative. On the other hand if z_{i}=0 these entries are jointly zero. In addition, the diagonal of J_{z} is \displaystyle({J_{z}})_{ii}=(M_{h})_{ii}/\Delta t_{n+1}+\theta\,r_{i}^{z_{i}}g_{i}^{z_{i}}+\theta\,r_{i+1}^{z_{i}}g_{i}^{z_{i}}\,. which is strictly positive and strictly larger than the modulus of the off diagonal entries. Thus, we have proven ( ii ) and it follows the main result of this section. Theorem 5.9 . The map \Phi as defined in ( 24 ) is a homeomorphism. In particular ( 22 ) has a unique solution \eta^{n+1} . 5.3 Katzenelson algorithm for the implicit system We apply the Katzenelson Algorithm [ 16 ] to find a root of \Phi . Fujisawa and Kuh [ 12 ] prove that this algorithm finds the exact root of a function in a finite number of steps from any initial guess, provided that the function is a piecewise affine homeomorphism. By Theorem 5.9 the latter is the case for \Phi as defined in ( 24 ) and hence the Katzenelson algorithm is well suited for solving the implicit system. The authors also provide a cost efficient variant of the algorithm that we use. The idea of their method and prove is provided here for the readers convenience. Take an initial guess x^{(0)} in the interior of P_{z^{(0)}} , where z^{(0)}\in\mathcal{Z} . Calculate the Newton increment \displaystyle v^{(0)}=-J_{z^{(0)}}^{-1}\Phi(x^{(0)}). If x^{(0)}+v^{(0)}\in P_{z^{(0)}} , then \displaystyle\Phi(x^{(0)}+v^{(0)})=\Phi(x^{(0)})+J_{z^{(0)}}v^{(0)}=\Phi(x^{(0)})-J_{z^{(0)}}J_{z^{(0)}}^{-1}\Phi(x^{(0)})=0 so the solution is found. Otherwise, let \displaystyle\lambda^{(0)}:=\max(\{\lambda>0|x^{(0)}+\lambda v\in\overline{P_{z^{(0)}}}\}) and set \displaystyle x^{(1)}:=x^{(0)}+\lambda^{(0)}v^{(0)}\,. Then x^{(1)} lies on the boundary of at least one other polygon P_{z^{(1)}} . Assume for now that no polygon corner is hit so the adjacent polygon is unique. Next calculate the new Newton increment based on the Jacobian valid on P_{z^{(1)}} . That is, v^{(1)}=-J_{z^{(1)}}^{-1}\Phi(x^{(1)}) . If x^{(1)}+v^{(1)}\in P_{z^{(1)}} , then the solution is again found. Otherwise, continue with choosing \lambda^{(1)} as described above. Figure 4: Example iterations of the Katzenelson algorithm. See also Figure 3 . To see why this algorithm converges in a finite number of steps consider L\subset\mathbb{R}^{\kappa} the line segment joining \Phi(x^{(0)})\in\mathbb{R}^{\kappa} and 0\in\mathbb{R}^{\kappa} . Since \Phi is a homeomorphism the preimage \Phi^{-1}(L) is a polygonal chain called "solution curve" in \mathbb{R}^{\kappa} with vertices lying on the the boundaries of the P_{z} . It is easy to see that the above algorithm traces the solution curve exactly if no corner is hit. If a corner is hit, the task is to determine an adjacent polyhedron to which the solution curve can be extended. Following Fujisawa and Kuh, we then apply a small enough perturbation to the solution curve to avoid hitting the corner and accomplish finding an extension. See Appendix B for the pseudo-code of the algorithm adapted to finding a root of \Phi as defined in ( 24 ). 6 Results The accuracy of the backward Euler method ( \theta=1 ), the Crank-Nicolson scheme ( \theta=\frac{1}{2} ), and the forward Euler method ( \theta=0 ) was evaluated by comparing numerical results with the Neumann analytical solution [ 29 ] . The Neumann solution is valid for the Stefan problem on a semi-infinite, homogeneous, one-dimensional domain with a Dirichlet boundary condition. The physical parameters were selected to be representative of typical conditions in permafrost soils. For all three numerical schemes, the computed results closely matched the analytical solution, provided that a sufficiently refined spatial mesh and a suitably small time step were used. The results of the implicit method for increasing spatial resolution are presented in Figure 5 . Additionally, Figure 6 depicts the convergence of the numerical error toward zero as the mesh is refined. Figure 5: Convergence of numerical results to analytical temperature distribution at day 15 with increasing resolution. Temperature is denoted by u . Figure 6: Maximum error in temperature distribution for all 20 days with increasing resolution. The backward Euler method ( \theta=1 ) and the Crank–Nicolson scheme ( \theta=0.5 ), in combination with the Katzenelson solver, were implemented in LPJmL 5 [ 33 ] to assess their robustness and stability. A 13-meter-deep soil column was discretized for each of the more than 60,000 grid cells using an unequally spaced grid that becomes progressively coarser towards the bottom ( n=24 ). The model uses a daily time step. As climate forcing the GSWP3-W5E5 dataset [ 17 ] was used. The lower air temperature of this data served as the Dirichlet boundary condition. The thermal influence of a snow cover within a grid cell was accounted for in a simplified manner by dynamically increasing the thickness and decreasing the thermal conductivity of the top layer in the presence of snow. To optimize computational efficiency, the Crank–Nicolson scheme for the standard heat equation was applied whenever all temperatures in the soil column as well as the boundary condition had the same sign. As expected, the Katzenelson method successfully converged for all grid cells throughout the entire simulation period of over 4000 years, for both the backward Euler and Crank–Nicolson schemes. Figure 7 presents the resulting deep soil temperatures obtained using the backward Euler method, in comparison with observational data. Since multiple iterations may be required to find the root of \Phi , the method is computationally more expensive than solving a linear heat equation. However, in the global LPJmL simulation, a single iteration was sufficient in most cases, indicating that no node changed state during the time step (see Figure 8 for the backward Euler method). During the first transient simulation year, an average of 1.48 and 1.93 linear system solutions per time step were required for the backward Euler and Crank–Nicolson schemes, respectively. Figure 7: Mean soil temperature u at the smallest soil depth that has practically zero fluctuations in ground temperature during the year (depth of zero annual amplitude) 2000-2014 of LPJmL (left) compared to statistically interpolated observations [ 1 ] (right). Figure 8: Number of timesteps (y-axis) that needed 1,2,3,\dots,35 linear systems solutions (x-axis) to carry out the step. The first year of the LPJmL simulation using the backward Euler method is shown. 7 Discussion It is important to recall that the most commonly used implicit DECP method for soil heat transfer in LSMs and DGVMs neglects the nonlinearity in the partial differential equation during the heat diffusion time step. It only corrects for the effects of phase changes after the diffusion time step has been fully carried out. This approach has several implications when compared to the method proposed in this study. First, the DECP method requires solving only a single linear system per time step, making it computationally more efficient than methods that handle a nonlinear system for time stepping. However, by leveraging the piecewise-linear structure of the system, the method proposed in this study typically requires solving only about 1.5 to 2 linear systems per time step, which remains computationally feasible for global-scale models. While the backward Euler method required fewer iterations per time step than the Crank–Nicolson scheme, the latter’s higher spatial order of accuracy may still well justify its use. Second, while the implicit DECP method is computationally more efficient, it is known to introduce an artificial stretch of the freezing region, leading to significant errors [ 21 ] . This effect was reproduced in the present study (see Figure 9 ). Over the full 20-day simulation period, the mean absolute difference between the analytical and numerical solutions was 0.443 for the DECP method, whereas the proposed method achieved a lower error of 0.170. Furthermore, it was observed that the explicit DECP scheme does not exhibit this nonphysical behavior and that the discrepancy increases with larger time steps. Figure 9: Implicit DECP method and new method proposed here plotted against analytical solutions at day 15. Temperature is denoted by u . Both methods used \theta=\tfrac{1}{2} . The time step was set to a day. The errors in the implicit DECP method can be attributed to the fact that, in implicit schemes, energy fluxes are computed based on the temperature distribution of the next time step. Since the phase change parametrization is applied separately, the predicted temperature distribution is not yet adjusted for phase changes, leading to inaccuracies. This explanation is supported by the observation that the explicit DECP scheme does not exhibit this issue, as the fluxes in this approach are derived from the current temperature distribution, which has already been adjusted for phase changes. A potential approach to enhance the computational performance of the implicit scheme developed in this study is to use a predictor-corrector method. In this approach, an explicit time step could be used to generate the initial guess for the Katzenelson algorithm. It is plausible that this initial guess would most of the times already lie within the same polyhedral region as the solution, thereby reducing the number of iterations needed to find the solution to one in those cases. 8 Conclusion We proposed a numerical solver for one-dimensional heat conduction with phase changes targeted at its use in global DGVMs and LSMs. The solver is implicit, allowing it to accommodate large time steps while maintaining stability. The Katzenelson solution algorithm for the nonlinear timestepping system is proven to find the exact solution in a finite number of iterations. Comprehensive tests in the LPJmL model demonstrated that this robustness also holds in practice and that the computational costs remain comparable to those of the "industry standard" implicit DECP method; i.e., within a factor of two. However, the implicit method proposed in this study has the advantage of being consistently derived from fundamental physical principles, without erroneously assuming linearity. Additionally, it avoids computing fluxes based on a temperature distribution that has not yet been adjusted for phase changes, a limitation of the implicit DECP method that leads to larger errors and an artificial extension of the freezing region. In summary, the proposed method is better physically grounded and less error-prone while remaining computationally feasible for application in DGVMs and global LSMs. Appendix A Derivation of ( 19 ) The expression (29) \displaystyle\frac{\gamma_{i}^{n}-\gamma_{i-1}^{n}}{h_{i}}\,\overline{k_{i}(u^{n})}^{i}\,, in ( 18 ) resembles the approximation to the negative heat flux, as defined by Fourier’s law. It can be explored by computing (30) \displaystyle\overline{k_{i}(u^{n})}^{i}=k_{i}(\gamma_{i}^{n})\,\omega+k_{i}(\gamma_{i-1}^{n})\,(1-\omega)\,, where \displaystyle\omega:=\frac{\gamma_{i}}{\gamma_{i}-\gamma_{i-1}} and the superscript n is momentarily omitted. To see this, consider first the case \sgn(\gamma_{i})=\sgn(\gamma_{i-1}) . The sign of u is then the same across T_{i} , hence according to ( 12 ) we have \overline{k_{i}(u^{n})}^{i}=k_{i}(\gamma_{i}^{n})=k_{i}(\gamma_{i-1}^{n}) and the claim follows for all \omega . For the case \sgn(\gamma_{i})\neq\sgn(\gamma_{i-1}) a simple geometric consideration shows that the proportion v of the interval [x_{i-1},x_{i}] where \sgn(u^{n})=\sgn(\gamma_{i}) equals the ratio of \gamma_{i} and \gamma_{i}-\gamma_{i-1} (see Figure 10 ): \displaystyle\frac{v}{h_{i}}=\frac{\gamma_{i}}{\gamma_{i}-\gamma_{i-1}}\,. Figure 10: Illustration of the function u over T_{i} , when a sign change occurs. Hence \displaystyle\overline{k_{i}(u^{n})}^{i}\cdot h_{i}=k_{i}(\gamma_{i}^{n})\cdot v+k_{i}(\gamma_{i-1}^{n})\cdot(h_{i}-v) and a division by h_{i} shows ( 30 ). Plugging ( 30 ) into ( 29 ) we obtain \displaystyle\frac{\gamma_{i}^{n}-\gamma_{i-1}^{n}}{h_{i}}\left[k_{i}(\gamma_{i}^{n})\frac{\gamma_{i}^{n}}{\gamma_{i}^{n}-\gamma_{i-1}^{n}}+k_{i}(\gamma_{i-1}^{n})\left(1-\frac{\gamma_{i}^{n}}{\gamma_{i}^{n}-\gamma_{i-1}^{n}})\right)\right] \displaystyle=\frac{k_{i}(\gamma_{i}^{n})\gamma_{i}^{n}}{h_{i}}+\frac{k_{i}(\gamma_{i-1}^{n})}{h_{i}}(\gamma_{i}^{n}-\gamma_{i-1}^{n})-\frac{k_{i}(\gamma_{i-1}^{n})\gamma_{i}^{n}}{h_{i}} \displaystyle=\frac{k_{i}(\gamma_{i}^{n})\gamma_{i}^{n}-k_{i}(\gamma_{i-1}^{n})\gamma_{i-1}^{n}}{h_{i}}\,=Q_{i}(\gamma^{n}). Appendix B Pseudocode of the used Katzenelson algorithm The \oslash sign denotes the element-wise division (Hadamard division). The \text{rand}() notation stands for a random uniform distributed real number in the interval [-1,1] . Algorithm 1 Katzenelson Algorithm. 1: Initial guess x , function \Phi(\cdot) , Jacobian D\Phi(\cdot) , volumetric latent heat vector L, absolute tolerance \text{t}_{a} , relative tolerance \text{t}_{r} , characteristic enthalpy scale s_{x} . 2: J\leftarrow D\Phi(x) 3: r\leftarrow\Phi(x) 4: r_{ini}\leftarrow\|r\| 5: while \|r\|\;>\;r_{ini}\,\text{t}_{r}+\text{t}_{a} do 6: \text{v}\leftarrow-J^{-1}\,\Phi(x) 7: \Lambda\leftarrow\,(-x\oslash v,(\,L-x\,)\oslash v) 8: \Lambda^{s}\leftarrow\text{sort}(\{\Lambda_{i}\,|i\in\{1,\dots,2\kappa\}\wedge\Lambda_{i}>\text{t}_{r}\wedge(i>\kappa\Rightarrow L_{i-\kappa}>s_{x}\,\text{t}_{r})\}) 9: \lambda_{1}\leftarrow\min(\Lambda^{s}_{1},1) 10: \lambda_{2}\leftarrow\min(\Lambda^{s}_{2},1) 11: if |\lambda_{1}-\lambda_{2}|>\text{t}_{r}\,\vee\lambda_{1}>1-\text{t}_{r} then 12: J=D\Phi(x+\frac{\Lambda^{f}_{1}+\Lambda^{f}_{2}}{2}v) 13: \lambda\leftarrow\Lambda^{f}_{1} 14: else 15: x\leftarrow x+\frac{\Lambda_{1}^{f}}{2}v+\text{rand}()\,s_{x}\,10^{-8} 16: \lambda\leftarrow 0 17: end if 18: x\leftarrow x+\lambda\,v 19: r\leftarrow\Phi(x) 20: end while For soil heat transfer the parameters \text{t}_{r}=10^{-12} , \text{t}_{a}=10^{-6} , s_{x}=10^{6} have turned out to work well and where used for most of the performed simulations.