Fabrice Lacroix

Sönke Zaehle

Silvia Caldararu

Jörg Schaller

Peter Stimmler

David Holl

Lars Kutzbach

Mathias Göckede

| David Holl

Mismatch of N release from the permafrost and vegetative uptake opens pathways of increasing nitrous oxide emissions in the high Arctic

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

unexplored until now. Here, we enhance the terrestrial ecosystem model QUINCY (QUantifying Interactions between terrestrial Nutrient CYcles and the climate system), which simulates fully coupled carbon (C), nitrogen (N) and phosphorus (P) cycles in vegetation and soil, with processes relevant in high latitudes (e.g., soil freezing and snow dynamics). In combination with site-level and satellite-based observations, we use the model to investigate impacts of increased nutrient availability from permafrost thawing in comparison to other climate-induced effects and CO 2 fertilization over 1960 to 2018 across the high Arctic. Our simulations show that enhanced availability of nutrients following permafrost thaw account for less than 15% of the total Gross primary productivity increase over the time period, despite simulated N limitation over the high Arctic scale. As an explanation for this weak fertilization effect, observational and model data indicate a mismatch between the timing of peak vegetative growth (week 26-27 of the year, corresponding to the beginning of July) and peak thaw depth (week 32-35, mid-to-late August), resulting in incomplete plant use of nutrients near the permafrost table. The resulting increasing N availability approaching the permafrost table enhances N loss pathways, which leads to rising nitrous oxide (N 2 O) emissions in our model. Site-level emission trends of 2 mg N m -2 year -1 on average over the historical time period could therefore predict an emerging increasing source of N 2 O emissions following future permafrost thaw in the high Arctic.

K E Y W O R D S

carbon, climate, high Arctic, nitrogen, nitrous oxide, permafrost, vegetation

| INTRODUC TI ON

High-latitude permafrost-affected soils cover over one-sixth of the exposed northern hemisphere land surface and store vast amounts of carbon and nitrogen [START_REF] Hugelius | A new data set for estimating organic carbon storage to 3 m depth in soils of the northern circumpolar permafrost region[END_REF][START_REF] Hugelius | Large stocks of peatland carbon and nitrogen are vulnerable to permafrost thaw[END_REF][START_REF] Obu | How much of the Earth's surface is underlain by permafrost[END_REF]Palmtag et al., in review). However, large uncertainties remain associated to the past and future perturbation of greenhouse gas fluxes in these regions, which could have an impact on achieving global climate targets [START_REF] Biskaborn | Permafrost is warming at a global scale[END_REF][START_REF] Bruhwiler | The Arctic carbon cycle and its response to changing climate[END_REF]Canadell et al., 2022;[START_REF] Natali | Permafrost carbon feedbacks threaten global climate goals[END_REF][START_REF] Schädel | Divergent patterns of experimental and model-derived permafrost ecosystem carbon dynamics in response to Arctic warming[END_REF][START_REF] Schuur | The central role of diminishing sea ice in recent Arctic temperature amplification[END_REF]. On the one hand, increased carbon fixation linked to enhanced vegetation growth in these regions has already been reported over the past few decades, with further drastic changes expected in the future (Canadell et al., 2022;[START_REF] Pearson | Shifts in Arctic vegetation and associated feedbacks under climate change[END_REF][START_REF] Winkler | Earth system models underestimate carbon fixation by plants in the high latitudes[END_REF]. On the other hand, the warming and thawing of frozen soils expose large organic carbon and nitrogen pools, which were conserved for thousands of years, to aerobic or anaerobic degradation, contributing to increased greenhouse gas emissions to the atmosphere [START_REF] Burke | Quantifying uncertainties of permafrost carbon-climate feedbacks[END_REF]de Vrese & Brovkin, 2021;[START_REF] Mcguire | Dependence of the evolution of carbon dynamics in the northern permafrost region on the trajectory of climate change[END_REF]Schädel et al., 2016;[START_REF] Schuur | The central role of diminishing sea ice in recent Arctic temperature amplification[END_REF][START_REF] Voigt | Nitrous oxide emissions from permafrost-affected soils[END_REF]. The feedback could be especially critical in the high Arctic, a region with disproportionate carbon and nitrogen stocks vulnerable to permafrost thaw [START_REF] Hugelius | Large stocks of peatland carbon and nitrogen are vulnerable to permafrost thaw[END_REF]Palmtag et al., in review).

Since temperatures in Arctic regions have already increased substantially over the historical time period [START_REF] Ballinger | Arctic report card 2020: Surface air temperature[END_REF]Screen & Simmonds, 2010) and are projected to further increase in the future [START_REF] Cai | Accelerated decline of summer Arctic Sea ice during 1850-2017 and the amplified Arctic warming during the recent decades[END_REF][START_REF] Previdi | Arctic amplification of climate change: a review of underlying mechanisms[END_REF], estimating the degree of permafrost thawing and its feedbacks on vegetation and soil carbon stocks is of high importance in the context of quantifying the greenhouse gas budget of high latitudes [START_REF] Schuur | The central role of diminishing sea ice in recent Arctic temperature amplification[END_REF]. In addition to implications of climate warming for the exchange of greenhouse gases CO 2 and CH 4 in high latitudes, recent measurement campaigns have reported evident sources of nitrous oxide (N 2 O) to the atmosphere from the high Arctic [START_REF] Marushchak | Thawing Yedoma permafrost is a neglected nitrous oxide source[END_REF][START_REF] Voigt | Nitrous oxide emissions from permafrost-affected soils[END_REF][START_REF] Wilkerson | Permafrost nitrous oxide emissions observed on a landscape scale using the airborne eddy-covariance method[END_REF]. Previously, N 2 O emissions from the high latitudes were largely neglected in the global greenhouse gas budgets, owing to low nitrogen availability in the upper soil [START_REF] Voigt | Nitrous oxide emissions from permafrost-affected soils[END_REF]. Strong uncertainty still exists with respect to the high-latitude N 2 O flux for the present day [START_REF] Marushchak | Thawing Yedoma permafrost is a neglected nitrous oxide source[END_REF][START_REF] Voigt | Nitrous oxide emissions from permafrost-affected soils[END_REF][START_REF] Wilkerson | Permafrost nitrous oxide emissions observed on a landscape scale using the airborne eddy-covariance method[END_REF], as well as in terms of its the future evolution of [START_REF] Voigt | Increased nitrous oxide emissions from Arctic peatlands after permafrost thaw[END_REF].

The implications that changing climatic conditions and permafrost thaw have for vegetation and microbial dynamics in the high latitudes are still poorly constrained. In particular, the perturbations that the thaw of permafrost may impose on nutrient cycles in these regions are largely unexplored [START_REF] Beermann | Permafrost thaw and liberation of inorganic nitrogen in eastern Siberia[END_REF][START_REF] Chadburn | Carbon stocks and fluxes in the high latitudes: Using sitelevel data to evaluate earth system models[END_REF]. Since Arctic tundra ecosystems are usually strongly nutrient-limited [START_REF] Finger | Effects of permafrost thaw on nitrogen availability and plant-soil interactions in a boreal Alaskan lowland[END_REF][START_REF] Haag | Nutrient limitations to plant production in two tundra communities[END_REF][START_REF] Natali | Increased plant productivity in Alaskan tundra as a result of experimental warming of soil and permafrost[END_REF][START_REF] Pedersen | Foraging deeply: Depth-specific plant nitrogen uptake in response to climateinduced N-release and permafrost thaw in the high Arctic[END_REF][START_REF] Street | Why are Arctic shrubs becoming more nitrogen limited?[END_REF], increased nutrient mobilization from permafrost layers could potentially enhance vegetation growth through plant uptake and/or microbial activity.

Such fertilization effects have been demonstrated in a variety of

Arctic site-level investigations [START_REF] Blume-Werry | Dwelling in the deep-Strongly increased root growth and rooting depth enhance plant interactions with thawing permafrost soil[END_REF][START_REF] Pedersen | Foraging deeply: Depth-specific plant nitrogen uptake in response to climateinduced N-release and permafrost thaw in the high Arctic[END_REF][START_REF] Street | Phosphorus availability determines the response of tundra ecosystem carbon stocks to nitrogen enrichment[END_REF][START_REF] Yang | Phosphorus rather than nitrogen regulates ecosystem carbon dynamics after permafrost thaw[END_REF]. Large stocks of highly labile nitrogen are reported in the high-Arctic permafrost [START_REF] Fouché | Canadian permafrost stores large pools of ammonium and optically distinct dissolved organic matter[END_REF][START_REF] Hugelius | Large stocks of peatland carbon and nitrogen are vulnerable to permafrost thaw[END_REF][START_REF] Salmon | Nitrogen availability increases in a tundra ecosystem during five years of experimental permafrost thaw[END_REF]Palmtag et al., in review), which would likely be rapidly degraded to biologically-available compounds upon soil thaw.

The fate of nitrogen (N) mobilized following permafrost thaw remains largely uncertain, despite being a strong limiting element for permafrost ecosystems [START_REF] Haag | Nutrient limitations to plant production in two tundra communities[END_REF][START_REF] Natali | Increased plant productivity in Alaskan tundra as a result of experimental warming of soil and permafrost[END_REF][START_REF] Pedersen | Foraging deeply: Depth-specific plant nitrogen uptake in response to climateinduced N-release and permafrost thaw in the high Arctic[END_REF]. Both plants and microbes compete for the sparse N in the shallow active soil layer [START_REF] Monteux | Carbon and nitrogen cycling in Yedoma permafrost controlled by microbial functional limitations[END_REF]. It is debated to which degree increased N release in the deeper soil, for instance owing to thaw of permafrost, would be taken up by the vegetations, thus retaining newly released N within the biosphere [START_REF] Beermann | Permafrost thaw and liberation of inorganic nitrogen in eastern Siberia[END_REF][START_REF] Blume-Werry | Dwelling in the deep-Strongly increased root growth and rooting depth enhance plant interactions with thawing permafrost soil[END_REF][START_REF] Finger | Effects of permafrost thaw on nitrogen availability and plant-soil interactions in a boreal Alaskan lowland[END_REF][START_REF] Keuper | Experimentally increased nutrient availability at the permafrost thaw front selectively enhances biomass production of deep-rooting subarctic peatland species[END_REF][START_REF] Koven | Permafrost carbon-climate feedback is sensitive to deep soil carbon decomposability but not deep soil nitrogen dynamics[END_REF][START_REF] Natali | Increased plant productivity in Alaskan tundra as a result of experimental warming of soil and permafrost[END_REF][START_REF] Norby | Controls on fine-scale spatial and temporal variability of plant-available inorganic nitrogen in a polygonal tundra landscape[END_REF][START_REF] Pedersen | Foraging deeply: Depth-specific plant nitrogen uptake in response to climateinduced N-release and permafrost thaw in the high Arctic[END_REF], used by microbes and potentially outgassed as N 2 and N 2 O [START_REF] Elberling | High nitrous oxide production from thawing permafrost[END_REF][START_REF] Voigt | Increased nitrous oxide emissions from Arctic peatlands after permafrost thaw[END_REF][START_REF] Voigt | Nitrous oxide emissions from permafrost-affected soils[END_REF], or exported laterally [START_REF] Rasmussen | Nitrogen transport in a tundra landscape: The effects of early and late growing season lateral N inputs on arctic soil and plant N pools and N 2 O fluxes[END_REF][START_REF] Treat | Longer thaw seasons increase nitrogen availability for leaching during fall in tundra soils[END_REF].

Phosphorus (P) could also provide an important constraint for plants and microbial activity in high-latitude ecosystems [START_REF] Salmon | Adding depth to our understanding of nitrogen dynamics in permafrost soils[END_REF][START_REF] Schaller | Silicon increases the phosphorus availability of Arctic soils[END_REF][START_REF] Street | Phosphorus availability determines the response of tundra ecosystem carbon stocks to nitrogen enrichment[END_REF][START_REF] Yang | Phosphorus rather than nitrogen regulates ecosystem carbon dynamics after permafrost thaw[END_REF][START_REF] Zhang | The soil carbon/nitrogen ratio and moisture affect microbial community structures in alkaline permafrost-affected soils with different vegetation types on the Tibetan plateau[END_REF], thus its increasing availability could impact the degradation of organic matter in the deep soil.

Impacts of climate change on high Arctic terrestrial systems have been assessed in the past using terrestrial land surface models (e.g., de Vrese & Brovkin, 2021;de Vrese et al., 2021;[START_REF] Koven | Permafrost carbon-climate feedback is sensitive to deep soil carbon decomposability but not deep soil nitrogen dynamics[END_REF].

However, important uncertainties in representing biophysical processes in these regions certainly still exist [START_REF] Chadburn | Carbon stocks and fluxes in the high latitudes: Using sitelevel data to evaluate earth system models[END_REF][START_REF] Schädel | Divergent patterns of experimental and model-derived permafrost ecosystem carbon dynamics in response to Arctic warming[END_REF][START_REF] Yokohata | Model improvement and future projection of permafrost processes in a global land surface model[END_REF]. These approaches have, for one, largely omitted nutrient dynamics in the high latitudes and their impacts on vegetation growth and microbial activity. They have also used either coarse vertical distributions, or even only two layers, to represent vertical soil profiles at the global scale [START_REF] Chadburn | Carbon stocks and fluxes in the high latitudes: Using sitelevel data to evaluate earth system models[END_REF]. Both these factors strongly limit the assessment of effects caused by thawing of the permafrost on vegetative growth and microbial activity, and thus of greenhouse gas exchange.

To advance the understanding of the fate of nutrients originating from permafrost thaw in the high Arctic, we enhanced the terrestrial biosphere model QUINCY (QUantifying Interactions between terrestrial Nutrient CYcles and the climate system) with additional modules addressing specific bio-physical features important in the high Arctic. Using this enhanced model version, in addition to sitelevel observational data, we analysed transient simulations over 1960 to 2018 to quantify the impacts that deepening of the active layer and increased nutrient availability have on vegetation dynamics and greenhouse gas exchange, with a particular focus on the fate of N upon thaw of permafrost and pathways leading to N 2 O emissions.

| ME THODS

We used observational data collected at the site level and performed site-level simulations over the Arctic Tundra for 1901-2018 with the | 5975

LACROIX et al.
global terrestrial model QUINCY. We thereby aimed to improve the understanding of impacts caused by nutrients (N and P) mobilized following the thaw of permafrost, both for vegetation growth and greenhouse gas emissions. We implemented additional features in both plant and soil modules of QUINCY to better represent physical soil processes taking place in this cold region (i.e., soil freezing, snow and inundation) but also including specific soil conditions for permafrost-affected soils, as well as alterations to vegetation dynamics as a response to changes in the soil state (i.e., dynamic root depths). Using this extended model version, we performed sets of simulations to isolate effects arising from increased nutrient availability following permafrost thaw, other changes in climate, as well as CO 2 fertilization, while also using site-level observational data to verify our analysis when possible.

| The QUINCY model

The QUINCY terrestrial biosphere model simulates water and energy exchanges, as well as coupled C, N and P cycles in soil and vegetation [START_REF] Thum | A new model of the coupled carbon, nitrogen, and phosphorus cycles in the terrestrial biosphere (QUINCY v1.0; revision 1996)[END_REF]. The model has already been applied and validated within a number of studies investigating nutrient cycles in vegetation and soils [START_REF] Caldararu | Whole-plant optimality predicts changes in leaf nitrogen under variable CO 2 and nutrient availability[END_REF][START_REF] Caldararu | Long-term ecosystem nitrogen limitation from foliar δ 15 N data and a land surface model[END_REF][START_REF] Yu | Jena Soil Model (JSM v1. 0; revision 1934): A microbial soil organic carbon model integrated with nitrogen and phosphorus processes[END_REF].

It provides improvements compared to other terrestrial biosphere models used in global assessments (e.g., Canadell et al., 2022) through its state-of-the-art representation of vegetation dynamics [START_REF] Thum | A new model of the coupled carbon, nitrogen, and phosphorus cycles in the terrestrial biosphere (QUINCY v1.0; revision 1996)[END_REF]Text S1) and vertically explicit representation of N and P cycling [START_REF] Caldararu | Whole-plant optimality predicts changes in leaf nitrogen under variable CO 2 and nutrient availability[END_REF][START_REF] Thum | A new model of the coupled carbon, nitrogen, and phosphorus cycles in the terrestrial biosphere (QUINCY v1.0; revision 1996)[END_REF]Figure 1;

Text S2). The model also includes the production of N-containing gases N 2 O and N 2 through nitrification and denitrification (Figure 1; Text S2). QUINCY discretises both soil physical parameters and biogeochemical pools in the vertical plane, which is highly relevant for permafrost-affected soils. Omitting or poorly representing nutrient cycles and vertical gradients in permafrost-affected soils have been identified as important reasons for the poor performance of global terrestrial biosphere models in the high latitudes [START_REF] Chadburn | Carbon stocks and fluxes in the high latitudes: Using sitelevel data to evaluate earth system models[END_REF].

The model accounts for five pools of soil organic matter, that is, structural, polymeric, and woody litter, fast and slow degrading soil organic matter, which have dynamic C to N stoichiometries (Table S1; [START_REF] Thum | A new model of the coupled carbon, nitrogen, and phosphorus cycles in the terrestrial biosphere (QUINCY v1.0; revision 1996)[END_REF]. Organic N is mineralized to ammonium (NH 4 ), which in turn can be further oxidized to nitrate (NO 3 ) under aerobic conditions (nitrification), both of which are dependent on temperature and soil moisture conditions (Table S1).

Mineralization is constrained to nil at temperatures below zero.

During nitrification, N 2 O is produced at a fixed ratio of N nitrified.

QUINCY computes uptake of NH 4 and NO 3 within the root zone dependently on available C for growth and tissue stoichiometry, and proportional to the current soil N availability and fine root distribution in the model (Table S1). Stored reserve N and dynamic stoichiometry within plants further allow the plants to adapt to fluctuations and low nutrient levels [START_REF] Caldararu | Whole-plant optimality predicts changes in leaf nitrogen under variable CO 2 and nutrient availability[END_REF]. Under anaerobic soil conditions, NO 3 can undergo denitrification, producing N 2 O and N 2 at a fixed ratio, dependently on temperature (Table S1). Aerobic and anaerobic volume fractions of the soil are calculated as in [START_REF] Zaehle | Carbon benefits of anthropogenic reactive nitrogen offset by nitrous oxide emissions[END_REF].

F I G U R E 1 Conceptual scheme of N fluxes and pools in the QUINCY model extended for high-latitude processes. Note that our both active layer and the permanently frozen part of the soil comprise multiple model layers, and that the difference between rooting depth and permafrost table depth is exaggerated here. Atmospheric deposition inputs were also not considered in this study.

| Upgraded physical processes for high latitudes: Soil freezing, snow dynamics, organic matter effects, and inundation

To provide an improved representation of permafrost-affected ecosystems, we adapted the physical modules in QUINCY to account for effects of soil freezing and thawing, as well as of snow, on soil layer heat and water exchanges.

We extended the heat budget calculation with latent heat fluxes induced by soil freezing and thawing for every soil layer (Text S3). In similarity to other model implementations [START_REF] Chadburn | An improved representation of physical permafrost dynamics in the JULES land-surface model[END_REF][START_REF] Ekici | Simulating high-latitude permafrost regions by the JSBACH terrestrial ecosystem model[END_REF], we assumed that a supercooled liquid water fraction remained present in the soil at freezing temperatures, which can also be observed in soil moisture measurements (Text S5). Additionally, water content is kept above the computed permanent wilting point in the surface soil layer for plant organs to survive the winter. The implementation of a multi-layer snow module (Text S4) served to represent the effects of snow coverage on the soil heat and water balance, preventing extreme cooling of the soil in the winter, while also delaying liquid water inputs to the soil until the melting season. Here, we used the same five-layer model structure as described in [START_REF] Ekici | Simulating high-latitude permafrost regions by the JSBACH terrestrial ecosystem model[END_REF], with differences explained in Text S4.

We also accounted for the lower heat conductivity and higher specific heat capacity observed in soils with high organic contents, as often found in permafrost-affected soils. Similar to [START_REF] Burke | Quantifying uncertainties of permafrost carbon-climate feedbacks[END_REF], we used lower heat conductivity constants for the upper 30 cm of unfrozen soil, which is also where the highest soil organic carbon (SOC) contents are also simulated in the model and usually found in observations (Table S3).

We also implemented an inundation scheme to reproduce the retention of water over permanently frozen layers, which leads to saturated conditions in the spring/early summer as is the case in observations (Text S5; [START_REF] Göckede | Negative feedback processes following drainage slow down permafrost degradation[END_REF].

| Upgraded soil biogeochemistry for high latitudes: Initialisation and dynamics

Biogeochemical features in permafrost soils are unique in that organic material below the permafrost table is largely preserved, meaning that the permafrost stores stabile pools of carbon and nutrients. Achieving an initial vertical state of the soil adequate for the representation of permafrost gradients is challenging in terrestrial models [START_REF] Chadburn | Carbon stocks and fluxes in the high latitudes: Using sitelevel data to evaluate earth system models[END_REF], and many global terrestrial land surface models only resolve surface and subsurface soil as two layers.

Here, we used 18 vertical layers up to a maximum depth of 9.5 meters, leading to layer thicknesses between 10 and 20 cm at the simulated permafrost table.

We initialised total SOC contents and organic soil C:N ratios at our two case study sites Cherskiy and Samoylov using measurements undertaken at these sites (Table S3, [START_REF] Zubrzycki | Organic carbon and total nitrogen stocks in soils of the Lena River Delta[END_REF].

We used the land cover type estimations of Palmtag et al. (2022, in review) for the other high-Arctic sites. This approach quantifies specific Arctic land cover type carbon and N contents based on 651 soil pedons from 16 study areas. For all sites, we used the averaged C:N ratio over the entire vertical plane. We assumed 5% of soil organic matter to be fast degrading, a conservative estimate with respect to estimates of up to 10% [START_REF] Hugelius | Large stocks of peatland carbon and nitrogen are vulnerable to permafrost thaw[END_REF][START_REF] Strauss | Organic-matter quality of deep permafrost carbon-A study from Arctic Siberia[END_REF]. To initialize organic P contents, we used the default organic N:P mole ratio of 55 used in [START_REF] Thum | A new model of the coupled carbon, nitrogen, and phosphorus cycles in the terrestrial biosphere (QUINCY v1.0; revision 1996)[END_REF] for the global scale due to the lack of observational constraints.

The SOC contents were initialised to maintain a higher content and reactivity of organic carbon in deeper layers (Figure S1). This is not the case in the standard model, which prescribes exponentially decreasing SOC with depth, thus yielding close to zero contents at permafrost depths. The SOC was prescribed to follow fitted exponential distributions derived for Cherskiy (k = -3.88 cm -2 ) and Samoylov (k = -0.009 cm -2 ) in the first 50 cm, and constant past this depth as an approximated permafrost table. The SOC and organic N concentrations were then normalized using observations for the available estimates for 1-300 cm and 1-100 cm made for Cherskiy and Samoylov. Due to lacking data, we used an average of the two vertical distributions to determine the vertical distribution of the other sites, which was then normalized according to SOC contents taken from Palmtag et al. (in review). To preserve reactive SOC at permafrost depths, our simulations were initialized at negative temperatures to prevent its degradation during the model spin-up. We performed a spin-up simulation for the soil active layer to equilibrate to an approximately non-perturbed state with respect to humancaused warming (Figure S1). As a result, total SOC and N slightly deviate from observations that they were initialized for, especially in the top soil (Figure S1).

Due to the changes made to the soil hydrology as a result of soil freezing and inundation (Text S5), vertical leaching of biogeochemical compounds past the permafrost table is essentially inhibited in the model. Within the active layer, however, vertical transport of biogeochemical compounds can happen as a result of drainage, diffusion or due to bio-turbation.

| Upgraded vegetation dynamics for high latitudes: Timing of growth and frozen-soil-dependent root depth

In our model version, the start of the growing season was delayed by snow cover. The growing degree day count only began when snow coverage was less than the minimum coverage threshold, defined here as 2 cm snow thickness (Table S2).

Additionally, we developed a module that considers plant roots to be adaptive to the seasonal freezing and thawing of the soil. In this scheme, fine root growth is only possible in unfrozen soil layers at every model time step. Instead of using a fixed root distribution, we prescribed the root distribution used in the standard QUINCY model in the upper 30 cm of the soil, which dictates an exponential decrease of root mass with a decay constant of 5.5 m -1 , determined for grasses by [START_REF] Jackson | A global analysis of root distributions for terrestrial biomes[END_REF]. This reflects that most roots in permafrost systems are found in shallow soil depths and do decrease with depth there [START_REF] Blume-Werry | Dwelling in the deep-Strongly increased root growth and rooting depth enhance plant interactions with thawing permafrost soil[END_REF][START_REF] Finger | Effects of permafrost thaw on nitrogen availability and plant-soil interactions in a boreal Alaskan lowland[END_REF][START_REF] Iversen | The unseen iceberg: Plant roots in arctic tundra[END_REF]. Below 30 cm, we did not use a weighed profile, meaning that in these soil layers, root growth would happen at the same rate in all layers as long as they are not frozen. A major consequence of the dynamic root scheme is that nutrients stored within permanently frozen layers are unavailable for uptake by the plants. At the same time, nutrient pools at the bottom of the active layer only gradually become available for root uptake due to slowly increasing thaw depths during the summer.

| Simulation inputs, forcing, and strategy

We performed model simulations from 1901-2018 for 15 tundra sites of continuous permafrost over the high-Arctic region, represented by the C3 grass plant functional type in the model (Figure S2, soil parameters for every site are given in Supplement site_info_arc-tic_grasslands.csv). The model was driven with meteorological data from the University of East Anglia Climatic Research Unit Japanese Reanalysis (CRU-JRA; Harris, 2019), which is a reanalysis of incoming solar radiation, surface temperature, humidity, precipitation, surface pressure, and surface winds with the goal of providing atmospheric forcing for land surface models. The dataset is available at a spatial resolution of 0.5 × 0.5° and a 6-hourly temporal resolution. The atmospheric forcing data for our chosen sites were extracted from the CRU-JRA dataset according to their geographic coordinates, and the data were subsequently transformed to half-hourly timestep intervals using a weather generator [START_REF] Zaehle | Carbon and nitrogen cycle dynamics in the O-CN land surface model: 1. Model description, sitescale evaluation, and sensitivity to parameter estimates[END_REF]. Furthermore, we used a vertical soil profile resolution of 18 layers, with increasing width down to a depth of 9.5 m. In our simulations, this set-up proved to be adequate for shallow permafrost table depths of 0.3-1.5 m that we simulated in the high Arctic.

We differentiated between effects of (i) atmospheric CO 2 fertilization, (ii) changes arising from perturbation of the climate, and (iii) increased availability of C, N and P from the permafrost on carbon cycle processes by conducting several sets of simulations for each high-Arctic site (Table 1). These simulations were performed after model spin-up periods of 300 years, which were driven with atmospheric conditions for 1901-1930, and were subsequently checked for important variable drifts. We conducted the first set of simulations (climate + withoutpermafrostCNP, Table 1), considering changes in climate, but initialising carbon and nutrients contents to exponentially decrease with depth, as in the standard model. By doing this, C, N and P contents at depth are close to zero, thus excluding any potential fertilization effect linked to a deepening active layer.

The second set of simulations was again driven by changing climate (climate), but this time also considering the release of carbon and nutrient pools from previously permanently frozen layers, that is, release from the permafrost. The third set of simulations additionally considered the impact of increasing atmospheric CO 2 levels on vegetation dynamics and carbon cycle processes (climate + CO 2 ). To isolate the effects of increasing nutrients/carbon availability following permafrost thaw, other climate effects and CO 2 fertilization, differences between scenario simulation trends were computed.

Furthermore, we performed a simulation without the model implementations for high latitudes (withoutHighLat). To further elucidate effects caused by nutrient limitation, we conducted an additional simulation with the same atmospheric forcing conditions as climate + CO 2 , but fixed soil N and P concentrations at fivefold their prescribed levels (Nutrients5x), values chosen during test simulations with the goal of largely alleviating nutrient-limiting conditions.

| Case study sites and observation datasets

We examined detailed results, including the evolution of biogeochemical fluxes, for two Siberian tundra sites with underlying continuous permafrost: Cherskiy (CHE) and Samoylov (SAM). The sites were chosen due to availability of datasets for soil conditions (soil temperature, snow depths, soil moisture, SOCC, and soil N), as well as eddy-covariance-based Gross primary productivity (GPP) estimates, to validate our results.

The Cherskiy site is located in Northeastern Siberia, in proximity to the Kolyma River. Mean annual temperature is around -11°C [START_REF] Göckede | Shifted energy fluxes, increased Bowen ratios, and reduced thaw depths linked with drainageinduced changes in permafrost ecosystem structure[END_REF]. Underneath an organic peat layer of around 20 cm, silty loam can be found up to the permafrost table depth of around 60 cm. Vegetation near the site is dominated by tussockforming species [START_REF] Kittler | Impacts of a decadal drainage disturbance on surface-atmosphere fluxes of carbon dioxide in a permafrost ecosystem[END_REF]. Soil temperature, snow depths, soil moisture and eddy-covariance fluxes for GPP were obtained as described in [START_REF] Kittler | Impacts of a decadal drainage disturbance on surface-atmosphere fluxes of carbon dioxide in a permafrost ecosystem[END_REF] and [START_REF] Göckede | Shifted energy fluxes, increased Bowen ratios, and reduced thaw depths linked with drainageinduced changes in permafrost ecosystem structure[END_REF]. Vertical profiles of SOC and total N were measured at the site and are provided in Table S3.

TA B L E 1 Overview of simulations and their drivers

The Samoylov site is a river terrasse situated on an island of the Lena River delta. While the organic layer near the site can be up to 30 cm in thickness, it is typically less than 10 cm on the dry polygon rims due to differing hydrological conditions [START_REF] Boike | Measurements in soil and air at Samoylov Station[END_REF][START_REF] Boike | A 16-year record (2002-2017) of permafrost, active-layer, and meteorological conditions at the Samoylov Island Arctic permafrost research site, Lena River delta, northern Siberia: An opportunity to validate remote-sensing data and land surface, snow, and permafrost models[END_REF]. The active layer is found at around 50 cm depth in mid-August, and the permafrost depth extends to over 400 m below the surface. Vegetation coverage is dominated by sedges and mosses, dwarf shrubs and forbs [START_REF] Kutzbach | Effect of microrelief and vegetation on methane emission from wet polygonal tundra, Lena Delta, Northern Siberia[END_REF][START_REF] Kutzbach | The exchange of carbon dioxide between wet arctic tundra and the atmosphere at the Lena River Delta, Northern Siberia[END_REF]. We used soil temperature and snow depth measurements at the site reported in In addition to the site-level data, we also compared modelled GPP to the MOD17A2H MODIS/Terra Gross Primary Productivity product [START_REF] Running | MOD17A2H MODIS/Terra gross primary productivity 8-day L4 global 500m SIN grid V006 [data set[END_REF], which was extracted for the geographic coordinates of the individual sites at the original 500 m resolution.

| Analysis strategy

We analysed trends in fluxes and temperatures for the time frame Simulated mean maximum thaw depths of 0.7 and 0.6 m adequately reproduce averaged observed maximum thaw depths of 0.5-0.7 m and 0.4-0.6 m at Cherskiy and Samoylov, respectively [START_REF] Boike | A 16-year record (2002-2017) of permafrost, active-layer, and meteorological conditions at the Samoylov Island Arctic permafrost research site, Lena River delta, northern Siberia: An opportunity to validate remote-sensing data and land surface, snow, and permafrost models[END_REF][START_REF] Göckede | Shifted energy fluxes, increased Bowen ratios, and reduced thaw depths linked with drainageinduced changes in permafrost ecosystem structure[END_REF]. Snow seasonality is reasonably represented over the year, although snow depth is overestimated at Samoylov and underestimated at Cherskiy with respect to observational data (Figure S4). The model struggles at estimating magnitudes of water content fluctuations and field saturation capacity; however, it reproduces low soil moisture in the winter period and majorly saturated conditions in the deeper soil over the entire summer (Figure S3).

| Mismatch of GPP and soil thaw peaks

Simulated annual GPP at Cherskiy and Samoylov amount to 353 and 107 g C m -2 year -1 in the climate + CO 2 simulation over a multiple year mean (Figure 3a,b), respectively. For the same sites, our eddycovariance derived products provide annual mean GPP estimates of 321 and 134 g C m -2 year -1 , and the MODIS-based product quantifies annual mean GPP of 266 and 125 g C m -2 year -1 (Figure 3a,b;

Figure S5). Over the pan-Arctic scale, we compute an average GPP of 307 g C m -2 year -1 and find good agreement of modelled GPP with the MODIS dataset on the individual site level (r 2 = .72, Figure S6), although it should be noted that our model performs better than the MODIS product when comparing to eddy-covariance based magnitude and seasonal variations of GPP for the two sites we analysed (Figure S5). Modelled annual GPP in climate + CO 2 is 3-fold lower on average than in the simulations Nutrients5x (Figure S7), emphasizing that soil nutrient levels are limiting GPP in climate + CO 2 and provide a strong constraint for reproducing observed GPP at the site level.

Our model performs well overall in terms of reproducing peak and seasonal variation of site-level GPP over multi-year means for both case-study sites with respect to the eddy-covariance estimates (Figure 3a,b). The weekly averaged simulated GPP peak is reached during week 27 on average at both case study sites (end of June), at magnitudes of 4.9 μmol m -2 s -1 (Cherskiy) and 1.6 μmol m -2 s -1 (Samoylov). Over all Arctic sites, the GPP peak is also reached at week 27 on average, at an Arctic-average GPP level peak of 3.7 μmol m -2 s -1 . After reaching this peak, GPP at both case study sites sharply declines in both the eddy-covariance products observations and in the model (Figure 3a,b). The seasonality found in the monthly averaged MODIS dataset also suggests a GPP peak early in the summer (Figure S5). Our model also indicates that GPP decreases past the peak owe to depletion of soil N, since modelled soil N availability cannot meet plant N demand at week 26 at Cherskiy and at week 27 at Samoylov over the multi-year year average (Figure S7).

Averaged over all high-Arctic sites, plant N demand exceeds N soil availability at week 26 (Figure S8). This is in concurrence with declines of both simulated and observed GPP. Both observational data and model simulations show seasonal thawing maxima succeeds the GPP maxima by several weeks at both case study sites, as well as for the Arctic average (Figure 3a,c). In

| Perturbation of active layer depth and increased deep-soil nutrient availability

Our observation-based forcing dataset prescribes rising atmospheric CO 2 levels, from 312 ppm in 1960 to 409 ppm in 2018, as well as annual mean surface temperatures, rising by 2.3 and 2.5°C over 1960-2018

for the Cherskiy and Samoylov sites, respectively (Figure 4a,d,h).

The perturbation of heat exchange between atmosphere and soil surface is also reflected through warming rates in simulated annual mean upper-soil temperatures (30 cm), which show increases of 1.6 and 2.0°C at the both sites. Over the same time period and all Arctic sites, atmospheric temperatures rise by 2.4°C, leading to a soil temperature increase of 2.1°C at 30 cm depth. The warming impacts the depth of the permanently frozen layer in our simulations, with the | 5981

LACROIX et al.
all sites, we compute an increase of 0.6 g N m -2 year -1 and 0.04 g P m -2 year -1 of organic N and P mineralization for the same time period. In the case of N, this means a steep 2-to-3-fold increase with respect to 1950-1970 organic N mineralization levels, which were close to zero (Figure 4c,g,k). In the case of P, the net transformation of mineral-bound P to biologically available P increases by 0.06-0.19 g P m -2 year -1 in the deep soil at the Arctic average.

| Implications for GPP compared with other perturbations

Our simulations indicate an increase in GPP for all case-study sites over 1960-2018 in the climate + CO 2 simulation, as result of all perturbations (Figure 4d,h,l). Increased nutrient availability from the thawing of permafrost thereby contributes to GPP increases of 9

and 5 g C m -2 year -1 aggregated over the entire 1960-2018 timespan at the Cherskiy and Samoylov sites, and 10 g C m -2 year -1 on average over all Arctic sites (Figures 6 and9). Other climate-induced changes account for increases in the GPP of 58 and 32 g C m -2 year -1 at both sites, and 57 g C m -2 year -1 at the Arctic scale. Alone, CO 2 fertilization accounts for rising the GPP by only 18 g C m -2 year -1 at Cherskiy, and a non-significant effect at Samoylov. Over the high-Arctic average, GPP increases by 11 g C m -2 year -1 . At the Cherskiy and Samoylov sites, GPP trends arising from all perturbations account for a total increase in GPP of 84 and 37 g C m -2 year -1 aggregated, respectively. Averaged over all Arctic sites, the GPP increase resulting from all perturbations is of 79 g C m -2 year -1 . These changes , over 1950-1970 and 1998-2018.

| Implications for N loss pathways and N 2 O emissions

Since newly mineralized N from previously frozen organic soil layers is not completely removed from the deep soil through plant uptake (Figure 5), solute N concentrations increase at the permafrost front (Figure S9). This leads to increasing deep-soil loss pathways of N (i.e., nitrification, denitrification, and transport) in the CO 2 + climate simulation. At Cherskiy and Samoylov, we compute increases in nitrification of 166 (+10%) and 95 (+25%) mg N m -2 year -1 , and of 77 (+44%) and 14 (+40%) mg N m -2 year -1 in denitrification over the simulation time period, respectively. At the high Arctic average, we compute an increase in nitrification of 138 mg N m -2 year -1 (+12%) and an increase in denitrification of 43 mg N m -2 year -1 (+25%). Both increases in nitrification and denitrification occur in concurrence to the period of deepest thaw depths in the model (Figure 7a-c). The increases in nitrification and denitrification cause a simulated rise in N 2 O fluxes of 1.6 and 0.4 mg N m -2 year -1 to the atmosphere at Cherskiy and Samoylov, respectively, leading to present-day fluxes of 5.2 and 1.1 mg N m -2 year -1 for 1998-2018 (Figure 8b-d). Over all high-Arctic sites the 2.2 mg N m -2 year -1 mean increase in N 2 O emissions lead to contemporary emissions of 3.5 mg N m -2 year -1 .

This suggests an increase of more than 50% over all sites over 1960- The magnitude of N 2 O emission rise shows an increasing relation with prescribed total soil N (Figure 10a). The magnitude in the sitelevel N 2 O emissions trend is also dependent on degree of soil thaw, with increasing soil thaw seemingly leading to increasing N 2 O emissions (Figure 10b). Indeed, our model shows a stronger response of N 2 O emissions to increasing thaw depths than for GPP (Figure 10b).

We also show significant correlation in the simulated year-to-year magnitude of the N 2 O fluxes shows with surface air temperature

(2 m) at Cherskiy (0.39) and Samoylov (0.5).

| DISCUSS ION

| Modelling the terrestrial biosphere of high latitudes in QUINCY

Estimating human-caused changes in greenhouse gas exchanges over time is presently strongly dependent on global land surface models (Canadell et al., 2022;[START_REF] Friedlingstein | Global carbon budget 2020[END_REF]. The representation of high-latitude biophysical processes in these models is, however, still associated with strong limitations. Models have, for one, been lacking in terms of their vertical representation of physical and biogeochemical features in permafrost-affected soils (Schädel et al., 2016). Second, nutrient cycles in high latitudes are either omitted or strongly simplified in these models [START_REF] Chadburn | Carbon stocks and fluxes in the high latitudes: Using sitelevel data to evaluate earth system models[END_REF], even though both N and P impose important constrains for microbial and vegetation dynamics in the high latitudes [START_REF] Finger | Effects of permafrost thaw on nitrogen availability and plant-soil interactions in a boreal Alaskan lowland[END_REF][START_REF] Haag | Nutrient limitations to plant production in two tundra communities[END_REF][START_REF] Natali | Increased plant productivity in Alaskan tundra as a result of experimental warming of soil and permafrost[END_REF][START_REF] Pedersen | Foraging deeply: Depth-specific plant nitrogen uptake in response to climateinduced N-release and permafrost thaw in the high Arctic[END_REF][START_REF] Schaller | Silicon increases the phosphorus availability of Arctic soils[END_REF][START_REF] Yang | Phosphorus rather than nitrogen regulates ecosystem carbon dynamics after permafrost thaw[END_REF]. Through Important challenges remain in terms of representing soil moisture and energy fluxes associated with snow cover. These are largely community-scale problems, since land surface models struggle to represent the observed local conditions of these variables. In our study, we assume fixed constants for snow density, specific heat conductivity, and heat capacity, which are partly computed dynamically in other models [START_REF] Chadburn | An improved representation of physical permafrost dynamics in the JULES land-surface model[END_REF]Guimberteau et al., 2018).

We also assume soil heat conductivity and specific heat capacity also do not change dynamically as a response to soil water content and soil organic matter, which could lead to certain bias in soil temperatures. A further source of uncertainty arises from the handling of species composition in the model. Assuming homogenous grassland coverage could cause biases in GPP as shown for instance at the Samoylov site, where GPP is reported to be majorly affected by mosses [START_REF] Holl | A long-term (2002 to 2017) record of closed-path and open-path eddy covariance CO 2 net ecosystem exchange fluxes from the Siberian Arctic[END_REF]. Such biases could potentially be reduced by improving the representation of Arctic plant functional types in global vegetation models [START_REF] Sulman | Integrating arctic plant functional types in a land surface model using above-and belowground field observations[END_REF].

Our model only represents limited spatial heterogeneity, both in the vertical and horizontal plane, which is partly linked with the polygonal tundra landscape found at many sites. The heterogeneity in soil variables such as heat conductivity, even at the local scale [START_REF] Boike | A 16-year record (2002-2017) of permafrost, active-layer, and meteorological conditions at the Samoylov Island Arctic permafrost research site, Lena River delta, northern Siberia: An opportunity to validate remote-sensing data and land surface, snow, and permafrost models[END_REF][START_REF] Göckede | Negative feedback processes following drainage slow down permafrost degradation[END_REF], could strongly impact the degree of thaw at these scales. Our results should thus be interpretated as the bulk mean of the spatial fluxes with a strong degree of local uncertainty, and also omitting non-linear effects such as landscape collapse following deep-soil thaw (e.g., [START_REF] Yang | Phosphorus rather than nitrogen regulates ecosystem carbon dynamics after permafrost thaw[END_REF]. consistent with increases in greenness of around 10% per decade since the 1980s derived from satellite estimates [START_REF] Winkler | Earth system models underestimate carbon fixation by plants in the high latitudes[END_REF].

Our model suggests that increased nutrient input from permafrost thaw is responsible for less than 15% of the total GPP change over 1960-2018 at the high-Arctic scale. This effect could be increased the future, with increased thaw meaning further increases in nutrient supply, as well as longer growing season periods of potential vegetation uptake [START_REF] Pedersen | Foraging deeply: Depth-specific plant nitrogen uptake in response to climateinduced N-release and permafrost thaw in the high Arctic[END_REF]. Other climate effects have the largest effect on the simulated GPP trend over our investigated time period.

Our results also suggest a trend towards a slightly earlier start and peak of the growing season with our simulations showing a 2 weeks earlier growing season peak of GPP at Cherskiy, and 1-week earlier peak at Samoylov and at the Arctic scale over the 1960 to 2018 period (Figure S10). This feature is in agreement with the study of [START_REF] Park | Changes in timing of seasonal peak photosynthetic activity in northern ecosystems[END_REF], who report a historical trend in start and peak of vegetation growth of 1 day per decade derived from a satellite-based approach.

CO 2 fertilization plays only a small role in explaining the GPP increase at the Arctic scale in our model, which likely owes to vegetation growth being strongly N limited at our case-study sites, which is also confirmed by the simulated GPP trend being dependent on total soil N.

| Root dynamics as response to deep-soil thaw and incomplete use of deep-soil N

Ecosystems in the Arctic tundra are reported to be strongly nutrientlimited during the growing season [START_REF] Martin | Common mechanisms explain nitrogendependent growth of Arctic shrubs over three decades despite heterogeneous trends and declines in soil nitrogen availability[END_REF][START_REF] Schuur | The central role of diminishing sea ice in recent Arctic temperature amplification[END_REF], owing to shallow active layers meaning a limited nutrient pool accessible for plant roots and lower mineralization rates due to thermal constraints. In accordance to this, nutrients added to the active layer in fertilization experiments have been shown to strongly enhance vegetation growth [START_REF] Natali | Increased plant productivity in Alaskan tundra as a result of experimental warming of soil and permafrost[END_REF][START_REF] Pedersen | Foraging deeply: Depth-specific plant nitrogen uptake in response to climateinduced N-release and permafrost thaw in the high Arctic[END_REF][START_REF] Street | Phosphorus availability determines the response of tundra ecosystem carbon stocks to nitrogen enrichment[END_REF].

In our simulations, historical increases in permafrost organic matter mineralization led to the release of additional N to the active layer, especially in late summer. This N fertilization effects is, however, only minorly impacted the change in GPP, which our results suggest is a consequence of incomplete plant use of the N released in the deep soil.

The incomplete use of increased N supply firstly owes to the mismatch in the timing of simulated peak vegetation growth and soil thaw. through the use of stable isotopes, but overall, the magnitude that a competitive advantage of individual species exhibits at the larger scale still remains enigmatic, since most plant species found in the Arctic Tundra seldomly root past 40 cm depth [START_REF] Iversen | The unseen iceberg: Plant roots in arctic tundra[END_REF]. [START_REF] Finger | Effects of permafrost thaw on nitrogen availability and plant-soil interactions in a boreal Alaskan lowland[END_REF] postulate in their analysis of N availability over permafrost thaw gradients that vegetation uses additional N made available through permafrost thaw over time-scales of years to centuries. Thus longer time periods may be needed for plants to adapt to increasing N availability in the deeper permafrost-affected soil. A key uncertainty in our study is that we cannot resolve with the present observational basis, is the deep-soil uptake rate of N by plants, which could be dictated by adaptation abilities of the vegetation to increase their rooting depth with increasing soil thaw.

| Implications for N loss pathways and N 2 O emissions

Due to the incomplete use of deep active layer nutrients by plants, our model shows accumulation of both biologically available N near the permafrost table. Ultimately, three pathways are plausible following increased N concentrations in the deep soil. Either they are mixed into the active soil layer and thus made available for plant uptake over longer timescales [START_REF] Finger | Effects of permafrost thaw on nitrogen availability and plant-soil interactions in a boreal Alaskan lowland[END_REF], exported laterally [START_REF] Treat | Longer thaw seasons increase nitrogen availability for leaching during fall in tundra soils[END_REF], or used microbially for denitrification and outgassed as either N 2 O or N 2 [START_REF] Voigt | Nitrous oxide emissions from permafrost-affected soils[END_REF].

Our model suggests an important increase in N loss pathways through nitrification and denitrification, which results in an enhancement of N 2 O emissions over the high Arctic. The magnitude in the N 2 O emissions increase is dependent on local total soil N, meaning the accumulation is larger with higher N mobilization from the permafrost. Our model also simulates higher loss of N and higher sitelevel N 2 O emission trends with larger trends with deep thawing on average. The limited accessibility of roots to increasingly deeper soil layers could lead to a less N efficient uptake of the deep-soil N, and thus exposing larger amounts of N to other loss pathways. This is illustrated by Cherskiy having a reduced relative response in GPP but higher relative N 2 O increase than at Samoylov, with a higher degree of thaw. In turn, our model even suggests a decrease in emissions only at Kangerlussuaq, Greenland (DK-KAN, Figure S2), where thaw depths do not exceed 50 cm, thus providing poor conditions accumulation of N and for production of N 2 O.

Since lateral exports remove biogeochemical compounds from permafrost systems, it could affect the potential use of nutrients originating from permafrost thaw by plants and microbes [START_REF] Treat | Longer thaw seasons increase nitrogen availability for leaching during fall in tundra soils[END_REF].

Lateral water and biogeochemical exports from the permafrost are, however, still poorly constrained [START_REF] Lacroix | Historical increases in land-derived nutrient inputs may alleviate effects of a changing physical climate on the oceanic carbon cycle[END_REF]Lacroix et al., 2020), and difficult to assess in our model-based study.

These lateral exports could however have important implications for high-Arctic freshwater systems [START_REF] Sanders | Seasonal nitrogen fluxes of the Lena River Delta[END_REF] and Arctic shelves [START_REF] Dai | Carbon fluxes in the Coastal Ocean: Synthesis, boundary processes, and future trends[END_REF]Lacroix, Ilyina, Laruelle, et al., 2021;[START_REF] Terhaar | Around one third of current Arctic Ocean primary production sustained by rivers and coastal erosion[END_REF].

4.5 | High Arctic as a weak, but emergent source of N 2 O gas N 2 O is a strongly potent greenhouse gas and its global budget could impact the global climate in the future [START_REF] Tian | A comprehensive quantification of global nitrous oxide sources and sinks[END_REF].

The magnitude of N 2 O emissions from high latitudes has, however, been largely disregarded due to low active layer nutrient contents in these regions [START_REF] Marushchak | Thawing Yedoma permafrost is a neglected nitrous oxide source[END_REF]. Recent studies that have measured N 2 O fluxes at site-level, have reported weak emissions per area in permafrost-affected ecosystems, that could add up to an important component of the global N 2 O budget [START_REF] Voigt | Nitrous oxide emissions from permafrost-affected soils[END_REF], in addition to hot-spot emmissions that could disproportionally affect the N 2 O budget in the high latitudes [START_REF] Marushchak | Thawing Yedoma permafrost is a neglected nitrous oxide source[END_REF][START_REF] Wilkerson | Permafrost nitrous oxide emissions observed on a landscape scale using the airborne eddy-covariance method[END_REF]. The overall magnitude of our present-day N 2 O emission average at the high Arctic scale (4 mg N m -2 year -1 ) is still around three-fold lower than the reported estimate of 11 mg N m -2 year -1 of [START_REF] Voigt | Nitrous oxide emissions from permafrost-affected soils[END_REF]. The simulated seasonally changing soil hydrological conditions, and thus changes in soil aeration that are needed for nitrification and denitrification, impact the magnitude of the fluxes. Short aerobic periods are a requisite for nitrification, whereas longer anaerobic timespans are needed for denitrification [START_REF] Voigt | Nitrous oxide emissions from permafrost-affected soils[END_REF], both of which are simulated at our case studies. However, there remains strong uncertainty in our model in terms of accurately representing soil moisture (Figure S3), a notable problem for terrestrial biosphere models that remains to be resolved. Our model does, however, re-

| CON CLUS IONS

Our model results show that N release from permafrost thaw since the 1960s leads to a fertilization effect on plant growth and vegetation C uptake. These effects are low in comparison to other

|

  Figure2e,f), where soil temperature remains near the freezing point for an extended time period in the summer. Our simulations still yield positive summertime biases of 3-6°C for 6-8 cm and 28-32 cm

F

  our multi-year averaged observational data, where we derived the soil thaw depth through interpolation of the temperature between the coarsely measured layers, we find maximum thaw depths of 0.7 and 0.6 m at weeks 34 and 33 and at Cherskiy and Samoylov on average, respectively. The model reflects this pattern, simulating the same maximum thaw depth at weeks 35 and 34, respectively. The timing of maxima N mineralization, or N release, in the deep soil (50-100 cm), occurs in concurrence with or closely following the thaw depth maxima in the model (Figure3a,c). F I G U R E 2 Weekly mean observed and modelled soil temperature, without highlatitude processes (withoutHighLat) and with (climate + CO 2 ) permafrost-specific implementations. Panels a,b show soil temperature at 6-8 cm, panels c,d 28-32 cm and panels e,f 60-64 cm depths at Cherskiy (left panels) and Samoylov (right panels), averaged over 2015-2018 and 2009-2014 for Cherskiy and Samoylov, respectively. Weekly mean Gross primary productivity (GPP) and thaw depth climatology averaged over 1998-2018 in the climate + CO 2 simulation (model) and in observations at (a) Cherskiy (2015-2018), (b) Samoylov (2014-2018) and (c) averaged over all Arctic sites (no observation values given). Additionally, the simulated weekly deep-soil (50-100 cm) N mineralization climatology is shown in gray. Observed thaw depths were computed by finding the depth of the freezing point from the observed soil temperature profile. This was computed by linearly interpolating between measurements at different depths at the sites. Point-dotted green and pointed light brown lines indicate the timing of the GPP peak and of maximum soil thaw, respectively.

  active layer depth increasing by 0.19 and 0.15 m over 1960-2018 due to increased thaw at Cherskiy and Samoylov, respectively, and by 0.20 m at the high Arctic average (Figure 4b,f,j). Based on SOC contents averaged for the period 1950-1970 in climate + CO 2 , these increases in active layer depth would expose 1.4-6.9 kg C m -2 year -1to potential degradation over 1960-2018 (low value for Samoylov, high value for Cherskiy), of which 71-338 g C m -2 year -1 is fastdegrading. Following exposure of permafrost carbon to non-freezing temperatures, soil respiration increases by 105 and 26 g C m -2 year -1 at Cherskiy and Samoylov, with the deep soil (50-100 cm) responsible for 21 and 5 g C m -2 year -1 of the increase. Over all Arctic sites, the soil respiration increase is of 66 g C m -2 year -1 , with deep-soil respiration increasing by 13 g C m -2 year -1 . The shallowest layer of the deep-soil vertical range (~50 cm) is only exposed to above-zero temperatures for 2-6 weeks of the year (low value for Samoylov, high value for Cherskiy) over 1998-2018 on average. Soil thaw simulated by the model also exposes 5.9 and 21 g N m -2 year -1 and 2.0 and 9.4 g P m -2 year -1 of fast-degrading organic N and P at Cherskiy and Samoylov, respectively, to temperatures above zero, and thus mineralisation. Over the Arctic mean, the increases in active layer depth over the 1960-2018 time period increase organic N and P mineralization by 0.6 and 0.2 g N m -2 year -1 and 0.01-0.03 g P m -2 year -1 in the deep soil aggregated over the time span at Cherskiy and Samoylov, respectively. Averaged over F I G U R E 4 Temporal evolution of annual mean air surface temperature (left column, panels a,e,i), simulated average August thaw depth (middle left, panels b,f,j), simulated annual N mineralization from 50 to 100 cm (deep-soil N min., middle right, panels c,g,k) and simulated annual Gross primary productivity (GPP) (right column, panels d,h,l) over 1960 to 2018. Deep-soil min. and GPP are shown for simulations considering CO 2 fertilization and climate perturbations (climate + CO 2 ), as climate perturbations alone (climate) and climate perturbations without permafrost carbon and nutrient initialisations (climate + withoutpermafrostCNP) at Cherskiy (CHE), Samoylov (SAM) and averaged over all high Arctic sites.

  As a result of the deepening of the active layer, annual mean root carbon content undergoes a strong relative increase at depths of 50-100 cm (+0.3 g C m -2 , or +156% in relative terms). Overall, however, the root carbon distribution only experiences minor changes in our simulations when comparing the beginning of the 1960s with present-day conditions, with around 85% of roots still simulated in the upper 20 cm of the soil (Figure5a-c) for 1998-2018. Root growth past 50 cm is inhibited to 2-6 weeks during the year due to freezing temperatures in the deep soil.Plant nutrient uptake in the deep soil is enhanced by 0.6 and 0.1 g N m -2 year -1 , and 0.06 and 0.09 g P m -2 year -1 at Cherskiy and Samoylov, respectively, over the simulation time period (Figure5d-f).Averaged over all sites, deep-soil plant nutrient uptake increases by 0.3 g N m -2 year -1 . This leads to a total mismatch in 1998-2018 deepsoil N mineralization of 1.2 and 0.2 g N m -2 year -1 and 1998-2018 plant N uptake of 0.3 and 0.1 g N m -2 year -1 at Cherskiy and Samoylov, respectively (Figure5d-f). Averaged over the high-Arctic scale, mean 1998-2018 deep-soil N mineralisation is 1.1 g N m -2 year -1 and plant N uptake is 0.6 g N m -2 year -1 . Our results suggest that, averaged over all Arctic sites, around 40%-60% of N mineralised in the deep soil is taken up through plant uptake over the course of a year for the 1998-2018 time slice. Due to the mismatch of N and P release and plant uptake in the deep soil, our model also simulates a vertical gradient in nutrient availability increasing towards the permafrost front for 1998-2018 (FigureS9).

  represent increases of 30% and 27% with respect to 1950-1970 mean levels at our case study sites, and a 36% increase at the high Arctic scale. Climate-induced effects (including increased nutrient availability due to permafrost thaw) overall account for over 70% of the total GPP change in all cases at the high Arctic scale, while increased nutrient availability following permafrost thaw, and CO 2 fertilization, account for around 15% of the GPP increase each. F I G U R E 5 Panels a-c show mean root carbon and panels d-f show annual mean deep-soil (50-100 cm) N mineralization (deep-soil N min) and plant N uptake (plant N uptake) at Cherskiy, Samoylov and averaged over all Arctic sites

  2018 at the Arctic average. The growing season emissions computed by our model compare well to median emissions observed by Marushchak et al. (2021) for the Yedoma domain in Eastern Siberia, and is situated within the wide range of estimates made until now for the Arctic (Figure 8e). N 2 O emissions and their trends over 1960-2018 are higher in climate + CO 2 than in climate + withoutpermafrostCNP, which does not consider increased N availability via the mobilization of permafrost pools, at both case study sites and at the high Arctic average (Figures 8b-d and 9c). While denitrification and nitrification are enhanced shortly before or following soil thawing peaks, increased N 2 O emissions occur later when the deep-soil re-freezes during weeks 40 to 42. This is also the timeframe when the deep soil is aerated again in the model during freezing (Figure S2). Overall, the months of September and October account for over half of total yearly N 2 O emissions averaged over all sites for 1998-2018.

  the full vertical discretization of both physical and biogeochemical variables, our extended QUINCY model version permits the analysis of changes associated with vertical permafrost thaw and their impact on vegetation and soil dynamics, while also taking into account a full representation of C, N and P cycles. Our model representation of dynamic changes in root distributions following soil thaw offers a simple, yet improved formulation to assess impacts of changing longterm and seasonal soil conditions on vegetation growth and increased nutrient availability in the deep soil. Until now, only strongly simplified impacts of N release from the permafrost have been assessed using bucket-type approaches[START_REF] Beermann | Permafrost thaw and liberation of inorganic nitrogen in eastern Siberia[END_REF], whereas we offer an improved dynamic representation of the interaction of permafrost F I G U R E 6 Statistically significant relative trends in site Gross primary productivity (GPP) induced by increased permafrost C, N and P availability (permafrost-ind.), other climate-induced perturbations (climate-ind.), CO 2 -fertilization (CO 2 -ind.) and total changes (Total), relative to 1950-1970 GPP averages. thaw, increased C-N-P mobilization following the thaw, and vegetative uptake and microbial dynamics.The model presented here still has clear limitations in its biophysical representation of high-latitude permafrost ecosystems. Strong simplifications are made in both physical soil processes, as well as vegetation dynamics. The parametrizations implemented here are often of first order, with organic matter mineralization for instance being constrained by a singular rate constant in combination with a temperature and soil moisture scaling factor. While parameters in our model have been assessed in terms of representing important land surface variables at the global scale (e.g.,[START_REF] Thum | A new model of the coupled carbon, nitrogen, and phosphorus cycles in the terrestrial biosphere (QUINCY v1.0; revision 1996)[END_REF], as well as the assessments for permafrost-affected soils we provide in this study, improvements in quantifying both vegetative and soil processes both from observational and modelling perspectives are still needed in the high Arctic.

4. 2 |

 2 Changes in vegetation growth due to increased nutrient availability from the permafrost compared with increases caused by other driversOver the past century, Arctic regions have been subject to disproportionate warming due to climate change (e.g.,[START_REF] Serreze | Processes and impacts of Arctic amplification: A research synthesis[END_REF], which has been reported to already affect dynamics of vegetation in the high latitudes. Through our set of simulations, we can decompose total perturbations caused by increased nutrient and carbon availability through permafrost thaw, other climate effects (e.g., earlier growth season, higher atmospheric and soil temperatures) and CO 2 fertilization alone. Our computed GPP increase of around 40% for the 1960-2018 period is F I G U R E 7 Weekly mean nitrification and denitrification rates (a-c), as well as weekly mean N 2 O emission rates (d-f) averaged for 1950-1970 and 1998-2018 at Cherskiy, Samoylov and averaged over all Arctic sites. F I G U R E 8 Panel (a) shows trends in N 2 O emissions over all Arctic sites individually, aggregated over the 1960-2018 time span. Panel (b) shows the evolution of annual mean N 2 O emissions over 1960-2018 at Cherskiy (b), Samoylov (c) and all high Arctic sites (d). Panel (e) shows averaged growing season (June-August) emission rates averaged over all Arctic sites in CO 2 + climate versus observed estimate means (solid lines) and upper and lower ranges (dashed lines) reported by Wilkerson et al. (2019) and Marushchak et al. (2021). F I G U R E 9 Simulated response of Gross primary productivity (GPP) and total ecosystem respiration (TER, panel a), net ecosystem production (NEP, panel b) and N 2 O emissions (panel c) to climate effects other than increased permafrost nutrients and carbon (other climate, green), permafrost C, N, and P (orange) and CO 2 fertilization (khaki), all averaged over all sites.

  Both our model and collected observations show that peak vegetation growth occurs 4-8 weeks earlier than the timing of maximum permafrost thaw, the time period when new nutrients in the deep active soil are mineralized to biologically available compounds. In addition to this, soil conditions only allow for root growth in the deep soil for several weeks in the late summer before the deep soil re-freezes, greatly limiting the potential for deep-soil build-up of root mass. Due to this temporal and spatial mismatch, plants only use around half of increased N mineralised in the deep soil in our model, leading to accumulation of N in the deep soil.[START_REF] Treat | Longer thaw seasons increase nitrogen availability for leaching during fall in tundra soils[END_REF] suggest a similar mismatch due to increased N availability in the fall owing to deep-soil thaw, leading to higher biologically available N in the deep soil in this season.Few studies have assessed seasonal and long-term dynamics of root growth and plant uptake in relation the dynamics of soil thaw.In our model, the vast majority (>85%) of roots are simulated in the top 20-to-30 cm of the soil, which is in accordance to observed vertical root distribution profiles[START_REF] Blume-Werry | Dwelling in the deep-Strongly increased root growth and rooting depth enhance plant interactions with thawing permafrost soil[END_REF][START_REF] Iversen | The unseen iceberg: Plant roots in arctic tundra[END_REF][START_REF] Monteux | Carbon and nitrogen cycling in Yedoma permafrost controlled by microbial functional limitations[END_REF]. Since the vegetation is already in senescence by the time the seasonal thaw maximum is reached, the vegetation's investment into root growth is low in the model. However, it remains unclear if these relatively small root fractions in the deep soil (<5% of total root mass) could lead to disproportionate uptake of nutrients in the deeper soil. In the case of Eriophorum vaginatum, adapted uptake in the late summer could give the species a competitive advantage in the case of active layer deepening[START_REF] Blume-Werry | Dwelling in the deep-Strongly increased root growth and rooting depth enhance plant interactions with thawing permafrost soil[END_REF]. Uptake of deep-soil N in late autumn has also been demonstrated for Salix arctica by Pedersen et al. (2020) F I G U R E 1 0 Averaged Gross primary productivity (GPP) and N 2 O emission trends for sites with low (<25 kg N m -2 year -1 ), mid (25-75 kg N m -2 year -1 ), and high (>75 kg N m -2 year -1 ) prescribed soil N initialisations (a), and less than 15 cm, 15-25 cm and over 25 cm trends in thaw depths over1960-2018.

  However, our averaged growing season emissions at the Arctic scale are close to the median measured over the Yedoma domain by[START_REF] Marushchak | Thawing Yedoma permafrost is a neglected nitrous oxide source[END_REF], with estimates of[START_REF] Wilkerson | Permafrost nitrous oxide emissions observed on a landscape scale using the airborne eddy-covariance method[END_REF] being larger for August emissions for the Alaskan Tundra. Our model shows that high-Arctic N 2 O emissions are threefold higher when considering permafrost nutrients and carbon contents, and thus are already driven by historical thaw of the permafrost. The results also suggest pathways leading to N 2 O emissions could increase disproportionally with future deeper soil thawing because Arctic plants could have limited access to the newly released nutrients in the deeper soil.

  produce the time of thawing, and ensuing anaerobic conditions in the deep soil. Our results suggest an increase in total nitrification and denitrification following deep-soil thaw in the late summer. The emission peak only takes place later during soil re-freezing, when the soil is aerated again in the model. These simulated temporal dynamics entail substantial uncertainty, and further work is needed to improve observational constraints on magnitudes and seasonality of N fluxes in permafrost-affected soils.

  13652486, 2022, 20, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/gcb.16345 by Cochrane France, Wiley Online Library on [02/10/2023]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License

13652486, 2022, 20, Downloaded from https://onlinelibrary.wiley.com/doi/10.1111/gcb.16345 by Cochrane France, Wiley Online Library on [02/10/2023]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License

Funding information

Deutsche Forschungsgemeinschaft, Grant/Award Number: 390683824, GO1380/3-1 and SCHA1322/12-1; Horizon 2020 Framework Programme, Grant/Award Number: 101003536, 647204 and 951288; Max-Planck-Gesellschaft

DATA AVA I L A B I L I T Y S TAT E M E N T

Model results and code, as well as constructed eddy-covariance GPP seasonality, are available under https://doi.org/10.5281/ zenodo.6832235.

ACK N OWLED G M ENTS

We acknowledge technical advice and model run scripts provided by Jan Engel. We also acknowledge discussion inputs from Lin Yu. Open Access funding enabled and organized by Projekt DEAL.

CO N FLI C T O F I NTE R E S T

All authors declare no conflict of interests.

S U PP O RTI N G I N FO R M ATI O N

Additional supporting information can be found online in the Supporting Information section at the end of this article.


Sebastian Jordan Montaño
email: sebastian.jordan@inria.fr

Guillermo Polito
email: guillermo.polito@inria.fr

Stéphane Ducasse
email: stephane.ducasse@inria.fr

Pablo Tesone
email: pablo.tesone@inria.fr

ILLIMANI Memory Profiler -A Technical Report

Keywords: Memory allocation, profiling, Pharo, allocation site

Modern programming languages provide automatic memory management with an efficient garbage collector making the memory management of an application transparent to the developer. There is a need for practical tools to support developers in their understanding of the memory consumption of their applications. In this paper, we present a prototype version of ILLIMANI: a precise object allocation profiler. It has a rich object model that provides information about the objects' allocation context, the evolution of memory usage, and garbage collector stress.

We were able to find an object allocation site in the class UITHEME that was making 99,9% redundant allocations. We developed a Color Palette cache at the domain level that removed all the redundant allocations. We were also able to identify 2 other object allocation sites in the methods MAR-GIN»#INSETRECTANGLE and NUMBER»#ASMARGIN.

I. INTRODUCTION

Modern programming languages, such as Java, Python, or Pharo, provide automatic memory management with an efficient garbage collector. This makes the memory management of an application transparent to the developer. Debugging memory issues is known for being a tedious activity [START_REF] Chis | Patterns of memory inefficiency[END_REF]. There is a need for practical tools to support developers in their understanding of the memory consumption of their applications.

In this paper we present prototype version ILLIMANI 1 2 : a precise object allocation profiler for the Pharo Smalltalk programming language [START_REF] Ducasse | Pharo 9 by Example. Book on Demand -Keepers of the lighthouse[END_REF]. It profiles the object allocations that are produced during the execution of an application. It provides information about the allocation context for each of the allocated objects, the evolution of memory usage, and garbage collector stress. It instruments the code to control the execution of the methods that are responsible for allocating objects using method wrappers. It also calculates the application's memory consumption. 1 The version of the tool and the technical report are dated March 2023 2 This work © 2023 is licensed under CC BY 4.0 We used ILLIMANI to profile the object allocations in the Morphic UI, a Pharo framework that is used to draw the Pharo IDE. We were able to detect object allocation sites. We found a color object allocation site in the class UITHEME. We analyzed the allocated objects and we discover that 99,9% of the allocated colors were redundant. We developed a Color Palette at the domain level introducing an important missing architectural element that serves as a natural cache. With the Color Palette, we reduced the memory stress of the application by removing all the redundant allocations. We were also able to identify 2 other object allocation sites in the methods MARGIN»#INSETRECTANGLE and NUMBER»#ASMARGIN.

Outline. Section II gives an insight of ILLIMANI and its features; Section III explains the functioning mechanisms of the profiler; Section IV presents a use case example where we profiled the object allocation during the execution of opening 30 Pharo tools and rendering each of them for 100 rendering cycles; Section V talks about the related work; and Section VI and Section VII finalize explaining the limitations, the conclusion, and the future work.

II. ILLIMANI MEMORY PROFILER

ILLIMANI 3 is a memory profiler developed for the Pharo Smalltalk [START_REF] Ducasse | Pharo 9 by Example. Book on Demand -Keepers of the lighthouse[END_REF] programming language that is available under an open-source MIT license. Pharo is a dynamically typed, purely object-oriented, and reflective modern programming language. ILLIMANI profiles and extracts relevant information of the profiled application, such as the objects' allocation context, memory usage, and garbage collector stress. It presents this information with memory usage tables, accumulative allocation evolution charts, and a heat map visualization. It is also possible to query the profiler to make a custom analysis. ILLIMANI is capable of filtering the profiling for a given specific domain. In this paper, we present a prototype version of ILLIMANI. The user can specify which types of objects she wants to capture or to capture the allocations that a given set Fig. 1: Overview of ILLIMANI user interface of classes produce. Figure 1 shows an overview of the user interface of ILLIMANI.

ILLIMANI offers the following features:

• Summary and statistics report • Memory usage tables • Navigation of query results

• Heat map visualization with the relationship: allocatorallocated • Accumulative allocation evolution

A. Summary and Statistics

ILLIMANI provides a summary of the studied execution. It provides information on the total allocated objects, the allocator classes and methods, the memory usage, and the garbage collector stress.

ILLIMANI shows information on how many garbage collections were made, both incremental and full, and the time spent doing garbage collections. Pharo has a two-generation garbage collector [START_REF] Ungar | Generation Scavenging: A Non-Disruptive High Performance Storage Reclamation Algorithm[END_REF]. It has a young and an old space. The newly allocated objects are allocated in the young space and after they survive a threshold of garbage collections they are moved to the old space. The garbage collections done in the old space are orders of magnitude slower than the ones done in the young space [START_REF] Polito | Heap fuzzing: Automatic garbage collection testing with expert-guided random events[END_REF], [START_REF] Miranda | Two decades of Smalltalk VM development: live VM development through simulation tools[END_REF].

The profiler groups the allocations by allocator classes or methods. It shows this information in memory tables that can be sorted by the number of allocations or by the total memory size in bytes.

Different executions have different allocation paths. ILLI-MANI provides a chart with the allocation paths for the top allocators. The number of top allocators is a customizable parameter that can be changed by the user. On the one hand, Figure 2 shows that the class GRAFPORT, the second most allocator, allocates all of its objects in the first moment

B. Allocation queries

ILLIMANI gives access to the raw information of the allocated objects such as the allocator class and method, the object's total size in memory, the object's allocation time, and its allocation context stack. Listing 1: Querying ILLIMANI C. Heat map ILLIMANI presents the information with a heat map. It shows the relationship between the most allocator classes, or methods, and the most allocated objects. Key questions developers ask about memory are related to who is responsible for most creating instances and of each class, or method [START_REF] Sillito | Managing software change tasks: An exploratory study[END_REF]. Heat map visualizations are particularly adapted to display such relationships. Their matrix architecture supports the identification of key players: most created vs. most creating classes per entity [START_REF] De Pauw | Visualizing the execution of java programs[END_REF]- [START_REF] De Pauw | Modeling object-oriented program execution[END_REF].

The most allocators are ordered from top to bottom, the top is the one that allocates the most and the bottom one is the one that allocates the less. The allocated classes are ordered from right, the most allocated, to the left, the less allocated. ILLIMANI groups the allocations by classes and by methods. This heat map supports a drill-down version where methods creating most objects are displayed instead of the classes: Figure 3 shows that method MARGIN»#INSETRECTANGLE is the one creating all rectangle objects.

III. PRECISE MEMORY PROFILING

In Pharo, almost all computations are done by sending messages (invoking methods) [START_REF] Bergel | Counting messages as a proxy for average execution time in pharo[END_REF]. Allocating an object is done also by sending a message. The methods BEHAVIOR»#BASICNEW, BEHAVIOR»#BASICNEW:, ARRAY CLASS»NEW:, and NUMBER»@ are the four methods that allocate objects in Pharo.

ILLIMANI automatically instruments the execution of the profiled application to capture its object allocations. It instruments the four allocator methods to control their execution before and after being invoked. We use the library Method-Proxies4 for instrumenting the methods. MethodProxies add defined actions to be executed and or after the method that is being instrumented.

Each time that one of those methods is invoked, ILLIMANI intercepts the call and registers important information about the allocation context, the object's type, and its size in memory. Right after the allocation is made, we store the allocated object's type, its allocator class and method, and different information about the allocation's context. The MethodProxies architecture ensures that the code will be de-instrumented after the profiling is finished. None of the allocations that are made in the process of extracting the information are intercepted.

IV. USE CASE: IDENTIFYING ALLOCATION SITES

A Pharo expert had a hint about a memory leak of objects of the type COLOR. ILLIMANI provides the possibility of filtering the profiling for a given specific domain. We configure the profiler to capture all the COLOR allocations that an application creates. We run the profiler on Pharo 11, commit 1a5afe1.

Our target application was MorphicUI, a graphics framework for Pharo. It has 669 classes with 11236 methods in Pharo 11.

We opened 30 Pharo core tools and we let each of the instances of the tools render for 100 Morphic rendering cycles. Through this we are able to control how many times each of the tools is rendered, making the profiling reproducible. The tools are: Iceberg, Playground, and the Pharo Inspector. We opened 10 of each making 30 in total. The code to reproduce the experiment is available as a script 5 .

Figure 2 presents an allocation paths plot for the top 5 allocator classes. One can observe that the class PHARO-DARKTHEME is the allocation site with the most allocations. PHARODARKTHEME is a subclass of UITHEME. UITHEME is a central class in Pharo that is responsible for setting drawing configurations and also to provide the theme colors that are used in the Pharo IDE.

During the application's execution, we observed 23,686 total COLOR object allocations. Table I shows that the PHARO-DARKTHEME class is responsible for 66% of all the COLOR allocations. Using the customizable queries of ILLIMANI we analyzed the allocated objects by the UI Theme and we detected that only 15 out of 23,686 colors were different, meaning that 99,9% of the allocations were redundant.

Summary: Using ILLIMANI we identified an allocation site in the class PHARODARKTHEME that was allocating 66% of all the colors with 99,9% redundant allocations.

A. Color Palette

Looking at the implementation of UITHEME we identified the cause of the redundant allocations: each time that a user asks for a color, the UITHEME class creates a new instance of it. We developed a Color Palette as a solution. The Color Palette lazily allocates the colors when they are requested by a user and caches them once created. When the UITHEME changes, for example changing from a dark theme to a light theme, the caches are invalidated and they are recalculated on demand. The Color Palette was integrated into Pharo 11 in the commit d540bcf.

With the Color Palette fix, we profiled again the same execution to compare the baseline implementation against the Color Palette. In Table II and in Figure 4 we see that with the Color Palette implementation, the PHARODARKTHEME does no longer allocate COLOR objects.

B. Other allocation sites

We profiled the same execution setup, opening 30 Pharo tools, this time not filtering the allocated objects but capturing all of the allocations. We observe in Table III that the classes RECTANGLE and MARGIN are the ones that are allocated the most, summing 64% of all the allocations between them. The methods MARGIN»#INSETRECTANGLE and NUMBER»#ASMARGIN are the two methods producing all of those allocations. We did not investigate further the causes of these object allocation sites. The heat map presented in Figure 3 shows the relationship between the most allocators and the most allocated for this profile. One observes that the method MARGIN»#INSETRECTANGLE allocates mostly RECTANGLE objects while NUMBER»#ASMARGIN allocates MARGIN objects. Summary: ILLIMANI reports other two object allocation sites that allocate objects of type RECTANGLE and MARGIN that represent 64% of the allocations.

V. RELATED WORK

Visualizing object allocation sites. Infante et al. [START_REF] Infante | Efficiently identifying object production sites[END_REF] have developed a Pharo memory profiler that reports object production sites and memory usage called Memory Blueprint. Memory Blueprint shows a call graph with the methods that produce objects and a visualization of the memory usage of the allocated objects. Their work focuses on identifying object production sites while ILLIMANI also has a rich model for representing the object allocations that allows the user to query them to calculate other statistics. It can be also queried without the user interface as it is independent of it and it allows inspecting the reified stacks of the allocation contexts. Fernandez et al. [START_REF] Blanco | Effective visualization of object allocation sites[END_REF] made a visualization related to Memory Blueprint, but that keeps the context of the method and the source code of it. ILLIMANI also provides for each of the allocated objects the allocator method and class as well as the allocation context. Fernandez et al. [START_REF] Blanco | Visualizing memory consumption with vismep[END_REF] have developed a call graph visualization, similar to their previous work but analyzing the memory consumption of Python applications.

Allocation matrix. De Pauw et al. [START_REF] De Pauw | Modeling object-oriented program execution[END_REF] developed an Allocation matrix, which is a visualization that shows the relationship between the most allocators and the most allocated for the C++ programming language. We used this idea to implement our heat map visualization.

Resources consumption reduction. Bergel et al. [START_REF] Bergel | Reducing resource consumption of expandable collections: The pharo case[END_REF] have worked on analyzing the memory footprint of the expandable collections of Pharo. They analyzed the allocation of internal arrays and their use to propose an optimized version of the expandable collections. Our work is different but complementary in the sense that we profiled the memory allocation of Pharo tools to identify allocation sites to reduce its memory footprint.

Domain specific profilers. Ressia et al. [START_REF] Ressia | Modeling domainspecific profilers[END_REF] developed a domain-specific profiler framework in Pharo that the user can specify the profiled domain to allow the profiler to give more precise information about the specific domain. They developed this technique to profile a know performance issue that they had and the profiling tools that were available at that moment were not sufficient to localize the problem. The profiler that we developed allowed us to identify a problem that we were not aware of. Thanks to its architecture, ILLIMANI also allows filtering the profiling for a given specific domain. The user can specify which set of classes wants to profile and which type of object allocations she wants to capture.

Tracking of Allocation Sites. Odaira et al. [START_REF] Odaira | Efficient runtime tracking of allocation sites in java[END_REF] have working on tracking object allocation sites in Java. They developed two new approaches to trace the object allocation sites with a minimum slowdown of the execution. They store the allocation information on the object hash code field or in the object header. They use the allocation information to optimize the garbage collector copying directly into a tenured space certain objects. Our work does not focus on the tracing technique, we use method wrappers. Our solution does not require running the profiler on a modified virtual machine and it has a rich model that offers the possibility of extracting information from the allocation context.

VI. LIMITATIONS

In Pharo, there are special methods, called primitives that are executed natively. At the moment of writing this paper, we were not able to wrap these special methods. In Pharo 11 we identified in total 3 primitive methods that allocate objects of classes ARRAY, POINT and INTERVAL.

Our profiler has an overhead of around 10×. However, this not affects the precession of the measurements as the application will make the same number of allocations.

ILLIMANI does 3 object allocations that are registered during the profile. The number does not vary no matter the code that is being profiled. This is not a significant perturbation for our profiles.

VII. CONCLUSION AND FUTURE WORK

ILLIMANI is a memory profiler that can precisely capture object allocations. It provides a rich object model that allows a user to query and group the object allocations. ILLIMANI also shows the information with tables and visualizations. We profiled the execution of opening 30 Pharo tools: Iceberg, Playground, and the Inspector. We opened 10 times each making 30 in total and we let render each of the applications for 100 Morphic cycles. We were able to detect object allocation sites. ILLIMANI reported that the class UITHEME was making 99,9% redundant object allocations. We were able to fix the excessive allocations by introducing the architectural concept of a Color Palette removing all the redundant allocations that the UITHEME was making.

We were able to identify other two allocation sites related to the MorphicUI framework. For the same execution of opening the 30 Pharo tools, 1,565,352 objects were allocated in total and the classes RECTANGLE and MARGIN are the ones that are allocated the most, summing 64% of all the allocations. The methods MARGIN»#INSETRECTANGLE and NUMBER»#ASMARGIN are the two methods producing all of those allocations.

There is previous work done on energy profiling in Pharo [18]. We want to continue this work to include energy measurements along with the object allocations. We will also develop a solution at the bytecode level to be able to wrap the primitive methods too.

Fig. 2 :

 2 Fig. 2: The 5 top most allocator classes

Fig. 4 :

 4 Fig. 4: The 5 topmost color allocator classes with the Color Palette implementation

  Pharo supports full-stack Allocator methods heat map reification thanks to its reflective properties. ILLIMANI uses this language property to copy the full execution stack of each one of the allocations. The user can query ILLIMANI to extract this information and to make a custom analysis. We developed custom data structures with constant time insertion and accessing to support the queries.

	Margin>>#insetRectangle: Number>>#asMargin Point>>#corner: SpClassStyle>>#fullName Morph>>#invalidRect:from: R e c t a n g l e M a r g i n B y t e S t r i n g Allocators Allocated	0 77387 154775 232162 309550
	Fig. 3:

"Allocations bigger than 4 KB" profiler objectAllocations select: [ :e | e totalSizeInBytes > 4096 ]. "Most allocator methods grouped allocations" profiler allocationsByMethod first groupedAllocations.

TABLE I :

 I Top 5 color allocations when opening 30 Pharo tools

	Allocator class	Allocated colors	%
	PharoDarkTheme	15,629	66%
	GrafPort	4,096	17%
	RubScrollBar	1,842	8%
	GeneralScrollBarMorph	480	2%
	TabLabelMorph	346	1%
	Rest of the classes	1293	2%

TABLE II :

 II Object Allocations in Baseline vs Color Palette implementation

	Allocator class	Baseline	Color Palette	Diff
	PharoDarkTheme	15,629	0	∞
	RubScrollBar	4,096	4,096	1×
	Total Allocations	23,686	7,974	3×
	Summary: With the Color Palette implementation the
	PHARODARKTHEME class does not longer allocates
	redundant colors.

TABLE III :

 III Allocated Objects

	Allocated object class	Allocations	%
	Rectangle	699,625	45%
	Margin	300,663	19%
	ByteString	111,662	7%
	OrderedCollection	78,474	5%
	WriteStream	60,448	4%
	Rest of the classes	314,480	20%

https://github.com/jordanmontt/illimani-memory-profiler

https://github.com/pharo-contributions/MethodProxies

https://gist.github.com/jordanmontt/05c51c5527bf1c8e375117a3b9020c1e