A Micro-Mechanical Model for the Transformation of Dry Polar Firn Into Ice Using the Level-Set Method

Interpretation of greenhouse gas records in polar ice cores requires a good understanding of the mechanisms controlling gas trapping in polar ice, and therefore of the processes of densification and pore closure in firn (compacted snow). Current firn densification models are based on a macroscopic description of the firn and rely on empirical laws and/or idealized geometries to obtain the equations governing the densification and pore closure. Here, we propose a physically-based methodology explicitly representing the porous structure and its evolution over time. In order to handle the complex geometry and topological changes that occur during firn densification, we rely on a Level-Set representation of the interface between the ice and the pores. Two mechanisms are considered for the displacement of the interface: (i) mass surface diffusion driven by local pore curvature and (ii) ice dislocation creep. For the latter, ice is modeled as a viscous material and the flow velocities are solutions of the Stokes equations. First applications show that the model is able to densify firn and split pores. Using the model in cold and arid conditions of the Antarctic plateau, we show that gas trapping models do not have to consider the reduced compressibility of closed pores compared to open pores in the deepest part of firns. Our results also suggest that the mechanism of curvature-driven surface diffusion does not result in pore splitting, and that ice creep has to be taken into account for pores to close. Future applications of this type of model could help quantify the evolution and closure of firn porous networks for various accumulation and temperature conditions.


INTRODUCTION
Polar ice cores are important natural archives to study past climate dynamics. Indeed, ice cores are the only archive to encapsulate bubbles of air from past atmospheres, enabling direct measurements of past concentrations of greenhouse gases. The parallel study of ice core bubbles and isotopic composition of the ice matrix (which is used to reconstruct past temperatures: Dansgaard, 1953;Johnsen et al., 1989) has highlighted the strong link between greenhouse gases and climate (Barnola et al., 1987;Lüthi et al., 2008). In order to properly interpret the gas records of ice cores in terms of atmospheric concentrations, it is necessary to understand how atmospheric air gets embedded in ice. Gas trapping is the result of the slow compaction of snow near the surface of polar ice sheets.
The surface snow is a highly porous material, and its interstitial air can freely exchange with the above atmosphere. Due to the continuous deposition of new snow at the surface, snow strata are buried and compressed by the weight of the overlying column (Herron and Langway, 1980;Wilkinson, 1988;Arnaud et al., 2000). This buried snow is referred to as firn. In response to the compression, the firn medium densifies and the interstitial porous network shrinks in size. When density reaches relative values to pure ice of about 0.9 (corresponding to 10% porosity in volume), the pores start to pinch and encapsulate the interstitial air in airtight bubbles (Schwander and Stauffer, 1984;Stauffer et al., 1985;Schaller et al., 2017). The transformation of firn into airtight ice happens at depths ranging from 50 to 120 m depending on the site and the local climatic conditions . The mechanism of gas trapping has impacts for the interpretation of the gas records. First, as the closure of pores happens after the deposition of snow (from a few decades to a few millennia, e.g., Schwander et al., 1993;Bazin et al., 2013;Veres et al., 2013), the air is always younger than the surrounding ice. To temporally synchronize the measurements performed in the ice matrix and in the gaseous phase it is thus necessary to quantify the duration of the firn densification (Shakun et al., 2012;Parrenin et al., 2013). Moreover, the closure of pores in a single stratum at the bottom of the firn takes place over a period of time, rather than instantaneously (Schwander and Stauffer, 1984;Stauffer et al., 1985). It induces a smoothing of the fast atmospheric variations in ice core records (Spahni et al., 2003;Joos and Spahni, 2008;Fourteau et al., 2017).
The trapping of atmospheric gases in polar ice is usually modeled with the combination of a firn densification model (providing the evolution of density with depth; Lundin et al., 2017), coupled with a parametrization of pore closure with density (Goujon et al., 2003;Buizert et al., 2012;Witrant et al., 2012). A variety of firn densification models have been proposed in the literature (e.g., Herron and Langway, 1980;Arnaud et al., 2000;Arthern et al., 2010), with original applications covering topics from ice core interpretation to ice-sheet mass balance. These models represent the entirety of the firn column as a continuous material, from the surface to the firn/ice transition. The 3D microstructure of the firn is not explicitly represented, but can be partially taken into account with variables such as the coordination number of ice aggregates (Arnaud et al., 2000) or the size of ice crystallographic grains (Arthern et al., 2010). Similarly, several parameterizations relating the closure of pores to the density of firn have been proposed, based on measurements performed on firn cores (Goujon et al., 2003;Mitchell et al., 2015;Schaller et al., 2017). However, these measurements only take into account a few conditions of temperature and accumulation, and it is not clear how well they apply to firns undergoing different climatic conditions. In particular, it remains unclear how the progressive closure of bubbles took place in the firns of the very cold and arid conditions of the East Antarctic plateau during glacial periods. This is an issue as East Antarctic ice cores are the oldest known ice cores and are thus of crucial importance for paleoclimatology (Barnola et al., 1987;Loulergue et al., 2008;Lüthi et al., 2008). It thus appears important to be able to quantify how the pores progressively close in firns for a wide range of temperature and accumulation conditions. A potential way to answer this question is to develop physics-based micro-mechanical models of dry firn, explicitly representing the 3D structure of pores and their closure.
With these questions in mind, we began implementing a general micro-mechanical model able to handle the closure and splitting of pores in a firn layer. Contrary to other models, ours explicitly represents the 3D microstructure of the ice and pore phases of the firn layer, and their evolutions over time. However, we only represent a single firn layer and not the entire firn column. Therefore, this type of micro-mechanical model should be seen as complementary to macro-scale models representing the whole firn column. In order to model the coalescence and splitting of pores, we rely on a Level-Set representation of the ice/pore interface. The idea of this method is to replace the biphasic nature of firn by a scalar field, whose zero-value level marks the position of the interface (Osher and Sethian, 1988;Osher and Fedkiw, 2001). Indeed, the Level-Set method naturally handles the topological changes of the ice and pores phases, that happen when pores split or coalesce. Level-set approaches have already been used in the field of glaciology to track large scale glacier geometry features (Pralong and Funk, 2004;Bondzio et al., 2016). To our knowledge, we present here its first use to model firn microstructure evolution. The model takes into account the mechanisms of polycrystalline ice dislocation creep (Duval et al., 1983) and curvature-driven surface diffusion (Maeno and Ebinuma, 1983). Yet, it has been developed in a modular fashion so that other mechanisms can be implemented. The emphasis of this paper is to demonstrate the capability of the developed micro-mechanical model to handle the densification of deep firn, including pore closure, rather than address a specific scientific question. In section 2.1 of the article, we present the general principles of the model, while the specific implementation is detailed in the following section 2.2. In section 3.1, we asses the capability of the model to conserve mass. We then propose two applications of the model. In section 3.2, we quantify the impact of the building pressure of closed pores in the deepest part of firns. Finally, in section 3.3 we study the contributions of dislocation creep and curvature-driven surface diffusion to the closure of pores.

DESCRIPTION OF THE MODEL
The aim of the model presented in this article is to simulate the evolution of a centimeter scale firn sample under the compression imposed by the overlying firn column, as represented in Figure 1. In particular, we aim to explicitly represent the 3D porous microstructure, and its transformation over time.

General Principles
This section aims to describe the general principles behind our 3D model, independent of their specific numerical implementation. First, we describe the two physical mechanisms taken into account in the model, namely the ice dislocation creep and surface curvature-driven diffusion. Note that other mechanisms, such as the sublimation and deposition of water molecules with transport through the pore phase (Calonne et al., 2014) could be added in the future. We then present the Level-Set method, that is used to represent the position of the ice/pore interface in the model.

Ice Dislocation Creep
The first physical mechanism taken into account for the deformation of the porous network is the dislocation creep of the ice phase, due to the compression forces of the firn column above (Wilkinson and Ashby, 1975;Arzt et al., 1983). In the model we consider that the ice matrix can be represented as polycrystalline ice, neglecting the influence of individual crystallographic grains. The creep deformation of the ice is a viscoplastic motion with a low Reynolds number. The equations governing the motion of the ice matrix are the Stokes equations: where ∇· is the divergence operator,σ is the stress tensor, ρ ice is the density of ice, g is the gravity acceleration vector, and v c is the ice creep velocity. To fully characterize the deformation of the ice matrix, the Stokes equations have to be completed with a constitutive law, describing the rheology of the ice material. Here, the creep of ice is represented by a Norton-Hoff power law (also referred to as Glen's law in glaciology; Duval et al., 1983;Schulson and Duval, 2009;Cuffey and Paterson, 2010): where i and j represent Cartesian coordinates (x, y, or z),ǫ ij = 1 2 ( ∂v c i ∂x j + ∂v c j ∂x i ) is the strain rate tensor (v c i being a Cartesian component of the creep velocity), σ ′ ij = σ ij − 1/3 Tr(σ )δ ij is the deviatoric stress tensor, with σ ij being a component of the stress tensorσ and δ ij the Kronecker delta, and τ 2 = 1 2 σ ′ ij σ ′ ij is the effective shear stress. The parameter n is set to 3 (Schulson and Duval, 2009;Cuffey and Paterson, 2010). For the rest of the article, the pre-factor A is set to 0.08 MPa −n yr −1 which is the expected value for ice around the −50 • C temperature. However, the model could be run at other temperatures by taking into account the documented dependence of A to temperature (Schulson and Duval, 2009;Cuffey and Paterson, 2010).

Surface Diffusion
The second mechanism implemented in the model is the diffusion of ice molecules due to gradients of chemical potential created by local curvature conditions. There are several mechanisms for the diffusion of water molecules as a response to these curvature differences (Ashby, 1974;Maeno and Ebinuma, 1983). Diffusive mechanisms transport mass from regions of high curvature toward regions of low curvature. As it has already been successfully implemented in Level-Set simulations (Bruchon et al., 2010(Bruchon et al., , 2012, we implemented the specific mechanism of surface diffusion in which water molecules diffuse at the surface of the ice/pore interface. Following the work of Bruchon et al. (2010) and Bruchon et al. (2012), the equation governing the velocity of the interface is: with C 0 being a parameter representing the effectiveness of the diffusive mechanism, K the curvature of the interface, n the normal vector to the interface pointing in the ice phase, and s is the "surface Laplacian" (the Laplace-Beltrami operator). The value of the parameter C 0 governing surface diffusion depends on the thickness in which diffusion occurs, the free energy of the ice surface, and the diffusion coefficient of water molecules at the ice surface (Bruchon et al., 2010). Unfortunately, these quantities are not well constrained, leading to a large uncertainty on the value of C 0 and its dependence to temperature (Petrenko and Whitworth, 1999). To overcome this issue, we evaluated that the mechanism of diffusion results in interface velocities similar to ice creep for C 0 ≃ 10 −6 mm 4 yr −1 . Therefore, in the rest of the study the parameter C 0 will be set to the values 10 −6 or 10 −7 mm 4 yr −1 to, respectively represent the presence of a strong or mild influence of the diffusion process, relatively to ice creep.
Finally, as the mechanism of surface diffusion redistributes mass from some regions to others, it is mass conserving and does not modify the density of firn layers. A mathematical proof of this mass conservation, involving the generalized divergence theorem over closed surfaces, is presented in Bruchon et al. (2010).

The Level-Set Method
The goal of this model is to explicitly simulate the evolution of the ice/pore interface in firn. This evolution notably includes topological changes, resulting from pore closure or coalescence (Burr et al., 2019). In the model, the bi-phasic nature of the firn is replaced by a mono-phasic medium with the addition of a characteristic function retaining the position of the ice/pore interface, the so called Level-Set (LS) function φ (Osher and Sethian, 1988;Gibou et al., 2018). This Level-Set framework naturally handles topological changes, which is needed to model the closure or coalescence of pores (Osher and Sethian, 1988). A typical choice for the LS function is the signed distance to the interface.
Considering a 3D domain D of firn the LS function φ is given by: where x is a point of D, is the interface between the ice and pore phases, and dist(x, ) is the distance of point x to the interface. The position of the interface is thus captured by the zero-level of the LS function, as one can retrieve it with = {x | φ(x) = 0}. The evolution of the porous network is therefore represented by the evolution of the zero-level of the LS function.
The velocity v tot of the ice/pore interface is the sum of the velocities induced by each individual physical mechanism. This velocity is then used to advect the LS function by solving the transport equation (Olsson and Kreiss, 2005;Bernacki et al., 2008):

Numerical Implementation
For our specific implementation, we rely on the Finite Element Method (FEM) to solve the equations involved in the model. The FEM allows us to use unstructured tetrahedral meshes, that can be adapted to the represent the 3D geometries of the ice and pore phases. In our case, we use first order tetrahedral elements. Moreover, we rely on the open source Finite Element software Elmer 1 (Gagliardini et al., 2013), that notably provides a module to compute the deformation of the ice matrix, as well as a general framework to solve equations with the FEM. In Elmer, we use Biconjugate Gradient Stabilized iterative solvers, with the standard Incomplete LU factorization for preconditioning. When transient equations are used in Elmer, we rely on the Backward Difference Formula (second order) for time-stepping. Furthermore, in our implementation all vectorial equations are treated with 3D Cartesian coordinates.
To compute the evolution of the firn microstructure our model goes through three main stages at each time-step t: (i) the tetrahedral mesh is adapted to the firn microstructure given by the LS function, (ii) the interface velocities for each physical mechanisms are computed, (iii) the LS function is advected to represent the movement of the interface. The overall algorithm, with the mesh adaptation, computation of velocities, advection steps, as well as the initialization of the model, is summarized in The mesh is adapted to the LS function at the beginning of each time-step. The first goal of the mesh adaptation is to improve the computational efficiency of the model by keeping a refined mesh near the ice/pore interface and a coarser resolution away, where a high density of elements is not needed (Olsson et al., 2007;Bruchon et al., 2010). The second goal is to produce two sub-meshes, referred to as M i and M p . The first one is meant to cover the ice phase only, and the second one the pore phase only. Note that an equivalent model could have been developed using passive elements instead of producing the sub-meshes M i and M p . However, we chose the latter method as it simplifies the visualization of the results.
At the end of the nth time-step, the LS function is defined on a tetrahedral mesh M n D covering the whole domain. Its zerovalue level gives the position of the ice/pore interface for the following time-step. At the start of the new time-step, the mesh adaptation procedure produces three meshes To mesh the domain according to the LS function, we rely on the remeshing library MMG 2 (based on Dapogny et al., 2014), that we have interfaced with Elmer. The library yields a tetrahedral mesh that is refined around the ice/pore interface, with tetrahedral elements either in the ice or pore phase, and tagged accordingly. The boundaries between the elements of the ice and pore regions thus lie on the zero-value level of the LS function. The MMG library includes parameters to adjust the mesh refinement. The main ones are the h grad and h ausd parameters, that respectively set the gradation of element sizes and the maximal distance between the ideal interface (defined by the LS function) and the interface captured by the tetrahedral mesh.
The mesh obtained with the MMG library is used as the domain mesh M n+1 D . Furthermore, the sub-meshes M saved under the form of two arrays of integers. For a given node of index i in the domain mesh, the ith value of the permutation table is the index of the corresponding node in the ice mesh (respectively pore mesh) or 0 if the node does not lie in the ice phase (respectively pore phase). This allows to transfer variables from one mesh to another without interpolation, and with a FIGURE 2 | Scheme of the model algorithm. Each blue box represents a core stage of the simulation. good numerical efficiency. The complete mesh adaptation step procedure is summarized in Figure 3.

Computation of the Ice Creep Velocity
To compute the deformation of the ice matrix a numerical oedometric compression is performed, where the ice is compressed at the top and retained on all other sides. The enforced boundary conditions are therefore ones of nonpenetration on all the domain sides (v c · n = 0, where n is the normal vector to the boundary), except for the top side where a normal stress is enforced on the ice (σ n = −Pn, where P is the pressure imposed by the overlying column and the atmosphere). This overburden pressure increases with time according to the accumulation rate. The difference between high and low accumulation sites can therefore be modeled with appropriate choices for the increase of the overburden pressure over time. Finally, the force exerted by the air pressure in the pores is applied at the ice/pore interface. The Stokes equations are solved on the ice mesh M i using the module readily available in Elmer.
The output velocity field of this oedometric compression produces a lot of displacement at the top of domain and practically none at the bottom. This means that at the top of the domain, the LS function would have to be advected over a long distance during a single time-step, which is numerically detrimental as it increases the Courant number (Courant et al., 1967). In order not to have all the displacement concentrated in one zone, we subtracted its average vertical value to the oedometric ice creep velocity field. This results in a field with the same strain and thus the same deformation of the porous network, but with a vertical velocity field distributed between the top and bottom parts of the sample, as seen in the left panel of Figure 4. This distributed velocity field is the velocity used in the model for the creep movement of the ice matrix. Note that performing an oedometric compression and subtracting the average vertical velocity, is equivalent to enforcing a Dirichlet condition of null vertical velocity in the middle of the domain. After solving Equation (1) and subtracting the average vertical value, the creep velocities are known within the ice material. However, to advect the LS function it is necessary for the advection velocity field to be defined on each side of the interface, and thus also inside the pore phase. This is a classical problem of the Level-Set method that can be solved with the aid of velocity extension methods (Adalsteinsson and Sethian, 1999). Here, the ice velocity is extended to the pore phase by solving the Equation: where is the Laplace operator, v ext the extended velocity, and α a smoothing parameter. The equation is solved on the pore mesh M p , with the boundary condition setting the extended velocity equal to the dislocation creep velocity on the ice/pore interface. The solution of Equation (6) is a smooth velocity field, that is equal to the ice creep velocity at the ice/pore interface. The creep velocity on the ice mesh, and the extended velocity on the pore mesh are then transferred to the domain mesh M D . This results in a continuous velocity field defined on the whole domain D, that matches the ice creep in the ice region. An example of ice creep velocity extension is given in Figure 4.

Computation of the Surface Diffusion Velocity
To compute the surface diffusion velocity using Equation (3), one requires the curvature K and the normal vector n. They can be calculated using: and However, Equations (3) and (8) require second-order derivatives, which are not easily computed using first order elements. To reduce numerical noise, Equations (3) and (8) are stabilized with the introduction of diffusion parameters A k and A v : where v d is the norm of v d .
To compute the diffusion velocity vector v d , the normal vector n is first computed using Equation (7). The curvature K is then computed by solving the first equation of Equations (9). The norm v d of v d is computed by solving the second equation of Equations (9). The vector v d is finally obtained by applying the norm v d to the direction supported by n. These computations are performed using Elmer modules specifically developed for this firn model.

Advection of the Level-Set
Once the total velocity of the interface (the sum of the creep and diffusion velocities) is computed, it is used to modify the porous structure of the firn material by advecting the LS function. However, the sole advection of the LS function using the velocity field is not sufficient to ensure a good representation of the evolution of the interface. Indeed, the property of the LS function to be a signed distance function is lost during the advection step, although it is fundamental for the computation of normal vectors and curvatures (Equation 7 for instance). That is why the LS function is regularly re-distanced, meaning that it is recomputed to remain a signed distance (Osher and Fedkiw, 2001). However, the re-distancing introduces errors and numerical diffusion in the model, that results in unphysical gain or loss of volume (Olsson and Kreiss, 2005 It is a smeared Heaviside function, with a width of the order of ǫ. Similarly to the LS function, H captures the position of the ice/pore interface, that is located at H = 1/2. Moreover, H can also be used to compute the normal vector to the interface using Equation (7). The implementation of the ICLS method works as follows. The LS and H functions are both advected on the mesh M D using the total interface velocity. The advection is performed using the Advect software 3 . The LS function is then re-distanced to remain a signed distance function, using the mshdist software 4 (based on Dapogny and Frey, 2012). Next, the normal vectors to the new interface are computed. Near the interface the normal vector n is computed using the H function, and far from it is computed using the re-distanced LS function. This choice was made because using the H function to compute the normal vectors far from the interface yields spurious oscillations, a problem that does not arise with the LS function (Zhao et al., 2014a,b;Zhao L.-H. et al., 2014). A point of the domain is considered to be in the vicinity of the interface if its distance to the interface is smaller than twice the parameter ǫ in Equation (10). Then, the shape and the width of the H function are maintained thanks to a re-initialization step (Olsson et al., 2007;Zhao et al., 2014a,b;Zhao L.-H. et al., 2014). It consists in solving the equation: In this equation, T is non-dimensionalized fictional time, distinct from the actual time, that is solely used to relax the equation to equilibrium (Olsson et al., 2007). The term on the left-hand side of Equation (11) compresses the width of the H function, while the right-hand side term expands it. The equation should be solved until the two terms balance, and a steady-state is reached (Olsson et al., 2007;Zhao et al., 2014a,b;Zhao L.-H. et al., 2014). In our model, the fictional time-step is set T = 1, and the equation is solved for a total 15 fictional time-steps, which is enough to reach a steady state (Olsson et al., 2007). Once the H function has been re-initialized, the LS function φ is updated in the vicinity of the interface using: The advection step is then finished and the LS function defines the interface for the following time-step.

Initialization of the Model
The model needs to be initialized with a LS function, representing either a real firn porous structure or an idealized geometry. The initial porous structure can be derived from 3D voxel models obtained with Xray tomography of firn samples (Barnola et al., 2004;Gregory et al., 2014;Burr et al., 2018). To simplify the boundary conditions, the tomography models are padded with ice material on all sides, meaning that the ice/pore interface lies away from the boundaries of the domain D.
Starting from a 3D voxel model, the signed distance is computed on a Cartesian grid using the Fast Marching Method (FMM; Sethian, 1999). It is performed using the scikit-fmm 5 python package. The signed distance is then smoothed using a gaussian filter to remove the jags of the interface. The resulting signed distance defines the initial LS function, and is interpolated on the initial mesh M 0 D . Since, the position of the ice/pore interface is not known in advance, M 0 D is finely resolved over the whole domain to properly capture its initial position.
Next, the H function is determined using Equation (10). In order to further smooth the interface and remove remaining jags, we perform a re-initialization step of H solving Equation (11) to equilibrium, followed by a LS function update using Equation (12). At this stage, the simulation can start with a mesh adaptation step.

NUMERICAL EXPERIMENTS
In this part we present a few numerical experiments, performed with the 3D firn model presented before. The aim of section 3.1 is to assess the capability of our model to conserve mass thank to the ICLS method. In section 3.2, we then use the model to quantify the impact of building pressure on the compressibility of closed pores in deep firn. Finally, section 3.3 discusses the contribution of individual physical mechanisms to the splitting of pores.

Mass Conservation
The goal of the ICLS method (Equation 11) and of the reinitialization is to ensure mass and volume conservation (Olsson et al., 2007;Zhao et al., 2014a,b;Zhao L.-H. et al., 2014). Similarly to Zhao et al. (2014b), we test the mass conservation of our micromechanical model by considering the advection of an idealized structure, in our case a sphere.
The domain is composed of a column of ice with dimensions 1 ×1 ×4 mm. The LS function is initialized to represent a spherical pore of radius 0.25 mm at the bottom of the column (see the left panel of Figure 5). This sphere is advected upward with a constant velocity of 10 −3 mm yr −1 . Note that this advection velocity is imposed and does not depend on the computation of the mechanisms of surface diffusion or ice dislocation creep. Pictures of the sphere at the beginning and the end of the simulation are shown in Figure 5. The volume of the sphere is computed at the end of each time-step using the volume enclosed by the LS function.
With several sets of parameters, we tested the influence of the h grad (mesh size gradation), h ausd (controlling the mesh size at the interface), and ǫ (width of the H function) parameters on mass conservation. The different parameters of the simulations are listed in Table 1. The volume error evolutions are displayed in Figure 6. In the two best experiments (Exp2 and Exp7), the volume error does not exceed 2.5% after 20 time-steps and a total displacement of the sphere of 2 mm. These two cases are represented as orange pentagons and gray rhombuses in both panels of Figure 6. The results of the experiments show that smaller time-steps do not necessarily imply a better mass conservation. Indeed, comparing the blue dots ( t = 100 yr, Exp1) and the yellow crosses ( t = 50 yr, Exp8) points in Figure 6 indicates a larger error at the end of the total advection in the case of the smaller time-step. Our understanding is that each time-step introduces volume errors during the advection step, and that multiplying time-steps accumulates the errors.
Moreover, it appears that a poor choice of parameters can lead to an important accumulation of errors over time, as seen with Exp3, 4, and 5 in Figure 6. It is however not straightforward to estimate the ideal parameters for a given simulation, as they depend on the specific geometry and velocity field of the problem. To limit problems of mass conservation, the rest of the simulations of this paper will not be run for more than 10 time-steps. Figure 6 indicates that this should result in total errors of <5%. In contrast, a simulation without the ICLS results in a ∼ 10% volume error after three time steps (black squares in Figure 6). This experiment highlights the necessity of the ICLS method to maintain small volume errors. For the rest of the article, the mesh adaptation parameters are set to h ausd = 0.01 mm, h grad = 1.15, and ǫ = 0.1 mm. This results in boundary triangle elements with an average side of about 0.06 mm. Zhao et al. (2014b) report a similar mass conservation experiment for a 2D case using an advected circle. They manage to maintain a relative error below 2%, for a total advection of about 250 diameters of the circle. Even though the 3D and 2D cases cannot be directly compared, it suggests that the model could be improved to obtain a better mass conservation. Moreover, there is a broad scientific literature on the implementation of conservative advection schemes for the Level-Set method (e.g., Kees et al., 2011;Owkes and Desjardins, 2013;Chiodi and Desjardins, 2017), that could benefit to the mass conservation capacity of our model in the future.

Effect of Internal Pressure on Pore Compression
As a first application of the model, we quantify the impact of internal pressure on the compression of closed pores. Indeed, current gas trapping models assume that in deep firn, open, and already closed pores compress in a similar fashion (Rommelaere et al., 1997;Buizert et al., 2012;Witrant et al., 2012). In real firn, the increased pressure in the already closed bubbles might slow their compression compared to open pores. A recent study by Fourteau et al. (2019) has shown that reducing the compressibility of closed pores by an amount of 50% in gas trapping models could explain a discrepancy between model results and direct measurements of air content in ice cores. It is however not clear if this reduced compressibility of 50% is physically sound or not.
To answer this question, we simulate the densification of a layer of the Lock-In firn, on the East Antarctic plateau. This site is characterized by an accumulation rate of 3.9 cm yr −1 (ice equivalent), a surface temperature of −53 • C, and a surface pressure evaluated at 0.0645 MPa (645 mbar) (Fourteau et al., 2019). The model is initialized with the microstructure obtained with a 2.5 × 2.5 × 2.5 mm tomography image, and selected at 80 m depth, near the start of the pore closure zone. Two distinct simulations are performed. In the first one, the internal pressure of the pores is set to 0.065 MPa, the pressure of open pores found ∼ 100 m below surface. This thus corresponds to the compression of open pores. In the second case, the internal pressure of the pores increases according to its reduction of volume, following an ideal gas law. This represents the compression of closed pores. In both cases, the compression forces of the overlying column start at 0.62 MPa and increases over time due to the surface accumulation rate of 3.9 cm of ice equivalent per year. Furthermore, the mechanism of surfacediffusion is removed from the simulations. As this mechanism does not theoretically modify the total volume of the porosity, it should not influence the effect of pore pressure on their compressibility. The time-step is set to 200 yr, which results in a maximum displacement of the interface that does not exceed a few percents of the characteristic size of the pores.
The relative volume evolutions of the pores for 10 time-steps are displayed in Figure 7. The volume variations are larger than the uncertainties reported in section 3.1, and cannot be explained solely by mass conservation errors. It appears that the effect of building pressure does not have a strong impact on pore volume until more than 500 years have passed. At that point, the building pressure in the closed pores reaches 0.16 MPa, more than twice the initial value. The measured thickness of the pore closure zone at Lock-In is of about 20 m (Fourteau et al., 2019). With an accumulation of 3.9 cm per year, a given firn stratum takes about 500 yr to cross the pore closure zone. Therefore, this simulation suggests that the effect of building pressure in closed bubbles does not play a major role in the pore closure zone.
To better quantify this effect, we computed the compression speed of the porosity in each case (building pressure and no pressure building cases). The compression speed is defined here as ∂ t V/V, where V is the volume of the porosity and ∂ t V is its temporal derivative. Figure 8 shows the reduction of compression speed due to the building of internal pressure, compared to the case with pressure kept constant. Within the pore closure zone (t ≤ 500 years), the compression speed with increasing pressure is reduced on average by 10%. The discrepancy between modeled and measured air content values in ice cores reported by Fourteau et al. (2019) cannot therefore be explained solely by the reduced compressibility of closed pores.

Contributions of Dislocation Creep and Surface Diffusion to Pore Splitting
In a recent article, Burr et al. (2019) performed different types of cold-room experiments to study the decoupled contributions of ice creep and curvature-driven diffusion to the evolution of firn and its porosity. They conclude that both compression and diffusive mechanisms contribute to the separation of pores.
In this section, we modeled the equivalent of Burr et al. (2019) experiments to study the individual contributions of dislocation creep and surface diffusion to the densification of firn and the closure of pores. In total, we run four different experiments, all initialized with the same porous network. The structure is extracted from the tomography image of a real firn sample excavated around the 100 m depth in the Lock-In firn core, described in the previous section. A 5.35 × 5.35 × 3.75 mm rectangular cuboid was extracted from a tomography image and used for initialization. The initial structure is shown in the left side of Figure 9. The compression imposed by the overlying firn column starts at 0.66 MPa and increases over time according to the 3.9 cm of ice per year accumulation rate. The internal pressure of the pores is maintained at 0.065 MPa, as we have seen that the building pressure in closed pores is small in the pore closure zone. All simulations are performed with a 100 years time-step, for a maximum of 10 time-steps.

Surface Diffusion Only
In the first simulation, the process of ice creep is removed and only the curvature-driven surface diffusion is taken into account. The parameter C 0 is set to 10 −6 mm 4 yr −1 . The evolution of the initial firn structure after 700 years of evolution with surface diffusion only is displayed in Figure 9A. As seen in the figure, the mechanism of surface diffusion leads to a rounding of pores over time. This is consistent with a mass transport occurring from regions of high curvature toward regions of low curvature, as exemplified in Figure 10. While Burr et al. (2019) report that letting firn samples evolve at rest in a relatively hightemperature environment (−2 • C) without compression leads to pore splitting, we did not observe such phenomenon in our simulation.
As the LS function gives the position of the ice/pore interface, it is possible to convert the output of the simulation into binary images, similar to tomographic images. We performed this conversion for the time-steps t = 0 and t = 700 years. The binary images can then be analyzed as tomographic images, and the number of individual pores in the medium can be counted (using the ImageJ plug-in Analysis_3D here; Boulos et al., 2012). It reveals that the simulation starts with 39 individual pores in FIGURE 6 | Volume error of the advected sphere, expressed in percent of its initial volume. The orange pentagons and gray rhombuses correspond to the best parameterizations for mass conservation, and the black squares to an advection experiment without the ICLS method. The specific parameters of the other simulations are given in Table 1. The lower panel is a zoom to the best simulation results. the volume and drops to only 9 individual pores after 700 years. This highlights that pore coalescence happened multiple times during the simulation. Thanks to the LS function, the density of the medium during the simulation can be quantified. The initial ice volume fraction is 0.902, and drops to 0.884 after 700 years, that is to say a decrease of about 2%. However, the mechanism of surface diffusion should theoretically not modify the density of the medium (Bruchon et al., 2010). This drop in ice volume fraction could be explained by the insufficient mass conservation of the model, as it is of the order of the volume error reported in section 3.1. Furthermore, a closer look at the surface diffusion velocity field in Figure 10, indicates that despite the stabilization of the equations (introduced in Equations 9) the velocity field exhibits a lot of variability that is likely related to numerical noise, rather than physically-relevant variability. We might therefore expect our representation of surface diffusion to introduce some numerical noise in the results, which could also contribute to the decrease in density.

Ice Creep Only
The second simulation is performed with solely the mechanism of ice creep. The evolution of the initial structure after compression is displayed in Figure 9B. As seen in the figure, this simulation leads to a densification of the medium, with a smaller porous network. This observation is confirmed by the analysis of the ice volume fraction, that increased from 0.902 to 0.960 after 700 years. This increase is larger than the uncertainties reported in section 3.1, and cannot therefore be solely explained by a mass conservation problem.
The simulation also visually exhibits pore splitting. This is confirmed by counting the number of individual pores before and after the compression. This number increased from 39 to 57 pores, showing the ability of the ice creep mechanism to split and isolate pores from the atmosphere. The same observation of pore splitting was made by Burr et al. (2019). They report pore separations of a sample during ongoing densification that is subject to solely mechanical loading.

Combined Ice Creep and Surface Diffusion
The third and fourth simulations take into account the combined effects of curvature-driven surface diffusion and ice creep. The parameter C 0 is set to values of 10 −6 and 10 −7 mm 4 yr −1 , to represent different levels of curvature-driven diffusion, respectively referred to as the high-diffusion and low-diffusion cases for the rest of the section.
2D cut-views of both simulations after 700 years are displayed in Figure 9C (low-diffusion case) and Figure 9D (high-diffusion case) in the right side of Figure 9. The results show an increase in ice volume fraction from 0.902 to 0.959 for the low-diffusion case, and to 0.953 for the high-diffusion case. Increasing the role of diffusion in the simulation leads to a slightly smaller density. This is consistent with the 0.960 value reported in the absence of surface diffusion. Moreover, observation of the Lock-In firn core shows that ice volume fractions of 0.95 are found around the 130 m depth. This is consistent with the 700 years sinking time of the simulation, which corresponds to about 30 m of depth increase.
Analysis of the results also shows an increase in the number of individual pores from 39 to 61 and 50 for the low and highdiffusion, respectively. It appears that in the high-diffusion case, the mechanism of surface diffusion slows down the splitting of pores. Our understanding is that the diffusive mechanism leads to a rounding of the pores, preventing the development of small necks that would eventually lead to pore splitting. Surprisingly, the low-diffusion case displays a little more pore splitting than the case without any surface diffusion, that resulted in 57 individual pores after 700 years. It is not clear if this is related to a specific inter-play between the diffusion and creep mechanisms that would accelerate the splitting of pores, or simply numerical noise.

DISCUSSION
Combining the Finite Element and Level-Set methods is a promising modeling approach to simulate the topological evolution of firn under compression. Notably, the use of a mesh for the ice phase enables to easily compute deformation velocities as response to mechanical compression. This velocity field can then be used to simulate the evolution of the ice/pore interface with the LS function.
Yet, several optimizations and improvements of the model are still required before its operational application to study the closure of pores in polar firn. First, the model is currently fully sequential. Running a 10 steps simulation on a single processor and for a 5.35 × 5.35 × 3.75 mm firn sample requires roughly a day of computation. The parallelization of the model would curb down this time, and allow to use the model on severalcentimeter large domains, which have been shown to be more representative of real firn (Schaller et al., 2017;Burr et al., 2018). Moreover, parallelization would allow to use finer meshes and more complex numerical schemes that could improve the mass conservation and numerical stability of the model. The current version of the model cannot indeed ensure a mass conservation better than about 5% after ten time steps. This limits the ability of the model to perform simulations covering large time periods, and to accurately quantify the density increase of firn samples. Future work on the model should improve this mass conservation problem, potentially with the use of other mass-conserving advection schemes from the literature (e.g., Kees et al., 2011;Owkes and Desjardins, 2013;Chiodi and Desjardins, 2017). Finally, as shown in section 3.3.1, the current implementation of the surface diffusion mechanism leads to a noisy velocity field that might deteriorate the robustness of the results. The use of a very fine mesh near the interface could help resolve this problem, but would lead to a sharp increase in the computation time. On the other hand, the use of more sophisticated stabilization techniques (such as in Bruchon et al., 2010) could resolve this issue without an additional computational cost. Another solution could be the use of secondorder elements for the computation of the second-derivatives required for the diffusive mechanism. As diffusion appears to play a significant role in the morphology of pores (Burr et al., 2019), it seems important to implement a fast and robust representation of diffusive mechanisms in the model. This would help to decipher the relative contributions of ice creep and diffusion to the evolution of the porous network, and provide insights on the evolution of pores at very low temperature.
In the article we first use our model to assess the impact of internal building pressure on the compressibility of closed pores. This allows to test the proposed hypothesis of Fourteau et al. (2019) that a lower compressibility of closed pores could explain a discrepancy between modeled and measured air content values in ice cores. Our results indicate that the compressiblity of closed pores is only reduced by an amount of ∼ 10%, much lower than the reduction needed to fully explain the model/data mismatch of Fourteau et al. (2019). Other potential mechanisms advanced by Fourteau et al. (2019) to explain this discrepancy are the brittle reopening of pores under pressure or the effusion of gases trough small capillaries not visible with Xray tomography or pycnometry measurements. Further work on the physical processes at play at the microstructural scale in firn is needed to resolve this question.
Then, we compare results of the model with cold-room experiments performed by Burr et al. (2019). While they report that both diffusive mechanisms and ice dislocation creep contribute to the separation of pores, we did not observe such a phenomenon in the simulations. In the model, the creep of the ice matrix leads to the separation of pores, but on the other hand the mechanism of surface diffusion leads to the rounding and even coalescence of pores. As seen in Figure 10, the surface diffusion velocity field exhibits numerical noise. This noise might lead to an unphysical movement of the ice/pore interface in the model, explaining some of the discrepancy with the experiment of Burr et al. (2019). However, we expect the mechanism of surface diffusion to transport mass from zones of high curvature to zones of low curvature. This would lead to the rounding of the pores, rather than the pore separation observed by Burr et al. (2019). Another potential explanation could be that the mechanism of surface diffusion implemented in the model is not representative of the diffusive mechanisms at play during (Burr et al., 2019) experiments. It is indeed possible that the dominant diffusive mechanism is the sublimation and redeposition of water molecules at the ice/pore interface, rather than the surface diffusion implemented in our model (Maeno and Ebinuma, 1983). However, the diffusion of water molecules through sublimation and redeposition would also transport matter from regions of higher curvature to regions of lower curvature. We might therefore also expect a rounding of the pores, hindering the formation of necks and their separation.

CONCLUSION
This article presents the development and implementation of a 3D micro-mechanical model of firn compression. In order to handle the topological changes occurring in the porous network of deep firn (such as pore splitting or pore coalescence) the model relies on the Level-Set framework to represent the position of the ice/pore interface. The model is able to determine the movement of the interface due to the creep of the ice matrix as a response to the mechanical stress imposed by the overlying firn column. Moreover, mechanisms of curvature-driven diffusion (in our case surface diffusion) can be added to the model. Finally, we implemented the Improved Conservative Level-Set Method (ICLS, Zhao et al., 2014a,b;Zhao L.-H. et al., 2014) to improve the mass conservation properties of the model. Numerical experiments on an idealized case indicate that the implementation of the ICLS method greatly improves the mass conservation. Yet, errors of several percent after ten time-steps are still present.
As a first application, we assess the impact of internal pressure in the compression of closed pores near the firn/ice transition. In order not to rely on an idealized geometry we used a real porous network, extracted from a tomographic image, to carry out the simulations. Our results indicate that the increase of internal pressure can be ignored at the bottom of the firn column, as assumed by existing gas trapping models (Rommelaere et al., 1997;Buizert et al., 2012;Witrant et al., 2012). Finally, we study the contributions of ice dislocation creep and surface diffusion to the densification of a small firn sample and to the separation of pores. As expected the mechanical compression of the firn sample leads to an increase in density, as well as pore splitting reflected by an increase in the number of individual pores. On the other hand, the mechanism of surface diffusion appears to lead to pore rounding which hinders their separation.
Our results suggest that the Level-Set method, combined with Finite Element modeling, can be adequate to study polar firn densification and pore isolation from the atmosphere, although several improvements are still required.

DATA AVAILABILITY STATEMENT
The datasets generated for this study are available on request to the corresponding author.

AUTHOR CONTRIBUTIONS
The model was developed by KF with the help of FG-C, following an idea of KF, PM, and XF. The manuscript was written by KF, with the help of all co-authors.