An R package was developed for computing permafrost indices (PIC v1.3) that integrates meteorological observations, gridded
meteorological datasets, soil databases, and field measurements to compute
the factors or indices of permafrost and seasonal frozen soil. At present, 16
temperature- and depth-related indices are integrated into the PIC v1.3 R package
to estimate the possible trends of frozen soil in the Qinghai–Tibet Plateau
(QTP). These indices include the mean annual air temperature (MAAT), mean
annual ground surface temperature (MAGST), mean annual ground temperature
(MAGT), seasonal thawing–freezing

Permafrost, which is soil, rock, or sediment with temperatures that have
remained at or below 0

Given the possibility of future climate warming, an evaluation of the magnitude of changes in the ground thermal regime has become desirable to assess the possible eco-environmental response and the impact on QTP infrastructure. Permafrost modeling maximizes quantitative analytical, numerical, or empirical methods to predict the thermal condition of the ground in environments where permafrost may be present (Harris et al., 2009; Lewkowicz and Bonnaventure, 2008; Riseborough, 2011; Riseborough et al., 2008; Yi et al., 2014b; Y. Zhang et al., 2008). At present, dozens of different factors or indices are used to evaluate the characteristics and dynamics of permafrost presence or absence (Riseborough, 2011; Riseborough et al., 2008), including the freezing–thawing index, mean annual air temperature (MAAT), mean annual ground temperature (MAGT), mean annual ground surface temperature (MAGST), temperature at the top of the permafrost (TTOP), and the active layer thickness (ALT). The type and distribution of frozen soil can be classified in a variety of manners depending on the range and magnitude of these indices. For example, frozen soil can be divided into highly stable, stable, substable, transitional, unstable, and extremely unstable permafrost, as well as seasonal frozen soil that depends on the magnitude of MAGT (Chen et al., 2012; Ran et al., 2012). These indices can be used to evaluate and predict the temporal and spatial variation in the thermal response of permafrost to the changing climatic conditions and properties of Earth's surface and subsurface in one, two, or three dimensions (Juliussen and Humlum, 2007; Nelson et al., 1997; Riseborough et al., 2008; Wu et al., 2010; Zhang et al., 2005). Accordingly, successfully summarizing and categorizing a variety of frozen-soil indices requires permafrost modeling that concerns analytical, numerical, and empirical methodologies to compute the past and present conditions. The Stefan solution (Nelson et al., 1997), Kudryavtsev's approach (Kudryavtsev et al., 1977), the TTOP model (Smith and Riseborough, 1996), and the Geophysical Institute Permafrost Lab model (Romanovsky and Osterkamp, 1997; Sazonova and Romanovsky, 2003) are several important developments for permafrost modeling in recent years. Permafrost is a subsurface feature that is difficult to directly observe and map. These methods integrate the effects of air and ground temperatures, topography, vegetation, and soil properties to map permafrost spatially and explicitly (Gisnås et al., 2013; Jafarov et al., 2012; Zhang et al., 2014). Weather observation data, including air and soil temperatures at different depths, are the main inputs for single-point simulation, whereas the spatial and temporal resolution of the atmospheric forcing dataset are the main input data of permafrost spatial modeling. These permafrost indices consist mainly of temperature-related and depth-related indices. The temperature-related indices depict the status of air or land surface temperature in frozen-soil environments, whereas the depth-related indices reveal the status of the active layer. Preparing atmospheric forcing, snow depth and density, vegetation types, and soil class datasets from multisource data fusion, particularly remote sensing and ground observation data, is generally required for multidimensional permafrost simulation.

The transparency and repeatability of data, parameters, model codes,
computational processes, simulation output, visualization, and statistical
analysis are fundamental principles of scientific research in Earth system
modeling. At present, there is a lack of open source software and shared data
and parameters for permafrost modeling in the QTP. Although many scientists
in China have field data and models on hand, their integration into a new
open source model can facilitate the deepening of the discussion and
unfolding of permafrost research on the QTP. Given the current situation of
permafrost modeling in the QTP, a comprehensive R package for computing permafrost
indices (PIC v1.3,

PIC v1.3 was developed in the R language and environment for statistical computing v3.3.3 and is distributed as open source software under the GNU-GPL 3.0 License (R Core Team, 2017). Therefore, the PIC v1.3 code can be modified as required to meet the needs of every user. The R package PIC v1.3 provides all the necessary functionality to perform the calculation, statistics, and drawing of permafrost indices with over 38 functions based on the user's specific requirements (see Fig. 2). The following packages are required to set up PIC v1.3 (type library(PIC)): ggplot2 (Wickham et al., 2009), ggmap (Kahle and Wickham, 2013), RNetCDF (Michna and Woods, 2013), and animation (Xie, 2013). These packages are automatically added to the R user's library during installation. A dataset that contains the daily weather observations, parameters, and information (i.e., from 1951 to 2010) of 52 weather stations in the QTP was bundled into this package. However, the regional data with the NetCDF format were placed in the GitHub repository. The dataset variables excluded in the calculation can also be used as a reference or provide support to further develop PIC. These variables include wind speed, precipitation, evaporation, humidity, and soil temperature at different depths. PIC v1.3 was primarily designed to compute indices of permafrost and seasonal frozen soil from observations and forcing data. Therefore, the current stable version of the program (v1.1) includes functionalities that cover temperature-related indices (i.e., MAAT, MAGST, and TTOP) and depth-related indices (i.e., ALT and freeze depth) that are commonly used in permafrost research. It is possible to better evaluate the changes in frozen soil by combining multiple indices for overall analysis.

Map of the data location over the QTP.

PIC v1.3 enables the calculation of the thawing–freezing degree-days for air
and ground surface
(DDT

Most important user functions in the R package PIC v1.3. The equation column of this table corresponds to the equation in Sect. 2.

Mind map of the R package PIC v1.3.

Statistical analysis can facilitate evaluation of the trends and the overall
modeling performance. In particular, each statistic has strengths and
weaknesses. Thus, we adopted over 10 statistical methods to evaluate these
indices in station computing for time series data. The quantitative
statistics include the slope,

The spatial trend can also be calculated to evaluate regional computing for
temporal–spatial data through the function below. The index represents one
permafrost index,

Input data and parameters.

Table 2 shows detailed information of the data and parameters. Meteorological
data were obtained from the China Meteorological Administration (CMA;

Parameters of thermal conductivity in the thawed/frozen
state. The UADS Code came from soil texture classification of United States
Department of Agriculture (USDA). The Qinghai-Tibet Plateau does not have
the 1 and 8 of soil classification codes.

The Qinghai–Tibet Engineering Corridor (QTEC), located at the center of the
QTP, was selected in preparing the atmospheric forcing data. The Global Land Data
Assimilation System (GLDAS;

The parameters for the ground conditions were based on soil property data and
field observations. The parameter data have two sets: one for weather
stations and another for the QTEC region. The Harmonized World Soil Database
(HWSD, version 1.21) provides information on soil parameters that are
available for evaluating soil thermal conductivity with field observations
and can be used as input parameters to the PIC v1.3 package (Bicheron et al.,
2008; FAO/IIASA/ISRIC/ISSCAS/JRC, 2009). The thermal conductivity of ground in a
thawed or frozen state,

The volumetric heat capacity during thawing,

Spatial parameters for PIC v1.3 over the Qinghai–Tibet Plateau.

Permafrost occurrence map. Google Maps is a base map that uses the Exist_Permaforst function. “Other” indicates seasonal frozen soil.

TTOP using the Smith and Kudryavtsev functions.

Index changes over time for MAAT. These graphs are animated in GIF mode.

Regional visualization of ALT.

Spatial trend of MAAT, DDT

PIC v1.3 supports two computational modes: the station and regional
calculations that enable statistical analysis and visual displays of the time
series and spatial simulations. The regional calculation adopts GIS
approaches to compute each spatial grid. PIC v1.3 was initially developed to
address the immediate need for a reliable and easy-to-use program for
estimating temporal–spatial changes in frozen QTP soil. Thus, the workflow is
comprised of deliberately simplified steps throughout the entire process.
Once PIC v1.3 is installed, the workflow of the weather observations is
considerably straightforward: (1) an index of a weather station for one year
or multiple years is calculated, (2) an index of 52 weather stations from
1951 to 2010 is calculated, and (3) an index of all stations or permafrost
stations from 1951 to 2010 is drawn through a curve and spatial
visualization. Step (1) is an optional step. The forcing data workflow has
only two steps: (1) a total of four indices from 1980 to 2010 are calculated,
including MAAT, DDT

Several examples of PIC v1.3 use and application are presented here. This
section highlights several significant features of the package in terms of
specific functions, including station and regional calculation, statistics,
and visualization. However, PIC v1.3 includes numerous illustrations from the
literature and possible detailed analyses. PIC v1.3 has built-in station
data. The dataset comprises two tables (data frame), namely QTP_ATM for
daily weather observations and Station_Info for information and parameters
from each station. Users can modify or adjust the parameters in the
Station_Info and use the data and parameters. Additional examples can be
referenced in the GitHub repository
(

We can use different functions in the R console to perform the calculations
based on the selected method. For example, if users want to obtain a MAAT
value for a certain station year, they can enter the following command.
TempName and data are optional in the MAAT function.

A user can also obtain the MAAT values for a specified period of years in a
station.

Given that the freezing–thawing index can be divided into freezing–thawing
degree-days of the air and ground surface, the VarName option should add
“_air” or “_ground” at the ends of the Freezing_index and
Thawing_index. However, the abbreviation can also be utilized as the option
input. The “Thawing_index_air” and “ta” are the same.

A total of four indices, including MAAT, DDF

The stat function contains all the statistical methods for station
calculation. PIC v1.3 provides two calculations for computing the statistical
values of all stations using Com_Stats_QTP: (1) the indices that vary with
changing years and (2) the comparison of the same two indices for different
computational methods. Options ind1 and ind2 were used; however, ind2 can be
disregarded when computing the statistical values between a single datum and
years.

The statistical values of TTOP apply Com_
Stats_QTP for the stations where permafrost exists.
Intercept:

A spatial trend can also be computed using the Spatial_Stat function after
the regional calculation. The function simultaneously saves the spatial trend
of the five indices into the NetCDF file. In addition, the function draws the
animation of the spatial trend (see Sect. 4.4).

Station visualization can be produced by Plot_ TTOP_ALT and Plot_3M. The
Plot_TTOP_ALT function plots two TTOP or two ALT indices in a figure for
all stations or stations with permafrost. VarName has the “TTOP” and
“ALT” options, whereas SID has the “permafrost” and “all” options. The
Plot_3M function draws the MAAT, MAGST, and MAGT indices. The two functions
plot only the stations where permafrost exists when SID

The input and output of the regional calculation can be drawn using the
Netcdf_Multiplot function (see Fig. 7), which uses animation to display the
values. The spatial trend can also be drawn in the Spatial_Stat apart from
calculating the spatial statistics. This function draws all four indices when
“VarName” has no input (see Fig. 8).

This study proposes permafrost modeling to compute the changes in the active layer and permafrost with the climate, and this considers station and regional modeling over the QTP. We apply the two approaches to 52 weather stations and a central region of the QTP. The PIC v1.3 simulation results using the Exist_Permafrost function show that permafrost was detected at 12 of the 52 observation stations (Fig. 4). The permafrost areas began to shrink from the southern and northern parts to the central QTEC region (Fig. 7). The permafrost, whether in permafrost stations or QTEC, continued to thaw with increasing ALT, low surface offset, and thermal offset, as well as high MAAT, MAGST, MAGT, and TTOP for most areas of QTP.

PIC v1.3 computes and maps the temporal dynamics and spatial distribution of permafrost in the stations and region. There were more challenges in the regional modeling than the stations' input data and parameters. The station calculation can estimate the long-term temporal trend of permafrost dynamics, whereas the regional calculation can estimate the temporal–spatial trend. In addition, the simulated TTOP and ALT using the Stefan and Smith functions are higher than the Kudryavtsev function. Although the overall trend of TTOP and ALT are coincidental, the two different computational methods can be combined to simulate their variation. Furthermore, 16 indices can be collectively employed for a comprehensive analysis. The station and regional modeling can be integrated to evaluate the temporal–spatial evolution of permafrost in the QTP. In particular, the station modeling can be applied to validate the simulated results of the region. Moreover, the regional calculation can extend from QTEC to the entire QTP and even the other permafrost regions.

The “for” loop is discarded, whereas the “apply” functions are used extensively to significantly lower the computation time. PIC v1.3 was run natively as a single process in the Windows 7 Operating System. The calculations were performed independently through RStudio Desktop v1.1 software (RStudio, Inc., USA). The utilized processor is an Intel Core i7-2600 CPU 3.40 GHz, and the available memory is 32 GB. The current regional calculation takes only approximately 11 s. Apart from the Kudryavtsev model that requires considerable computation time (i.e., approximately 5 min), the station calculation also exhibited an improved efficiency. Therefore, PIC v1.3 can be considered an efficient R package.

Climate change indicates a pronounced warming and permafrost degradation in
the QTP with active layer deepening (Chen et al., 2013; Cheng and Wu, 2007;
Wu and Zhang, 2010; Wu et al., 2010), and both the simulation of stations and
the region in PIC v1.3 also show widespread permafrost degradation
(Figs. 4–8). Meanwhile, as shown in Figs. 7 and 8, the permafrost in the
QTEC also continued to thaw, with the ALT growing. The QTEC is the most
accessible area of the QTP. Most boreholes were drilled in the QTEC to
monitor changes in permafrost conditions, and these monitoring data provide
support for model performance evaluation. Meanwhile, ALT was widely used, so
we adopted the permafrost index to estimate PIC v1.3 simulation performance.
The simulated PIC v1.3 ALT and previous literature in the QTEC are compared
in Table 5. The increasing rate of ALT averaged 0.50–7.50 cm yr

The active layer thickness (ALT) and its trend between the PIC v1.3 simulation and literature analysis in the Qinghai-Tibet Engineering Corridor (QTEC).

Previous studies on the QTP (1) used one or two indices, such as MAAT and MAGST, to evaluate the permafrost changes (Yang et al., 2010), (2) constructed a regression analysis method through the relationship between MAGT and elevation, latitude, and slope aspects that presented a static permafrost distribution (Lu et al., 2013; Nan, 2005), and (3) did not share the model data and codes; hence, other researchers could not validate their results and conduct further research (McNutt, 2014). Compared with the previous permafrost modeling on the QTP, PIC v1.3 is considerably open, easy, intuitive, and reproducible for integrating data and most of the temperature- and depth-related indices. The PIC v1.3 function supports the computation of multiple indices and different time periods, and the encoding mode is reusable and universal. This package can also be easily adopted to intuitively display the changes in the active layer and permafrost, as well as assess the impact of climate change. The PIC v1.3 workflow is extremely simple and requires only one or two steps to obtain the simulated results and visual images. All running examples, data, and code can be obtained from the GitHub repository. However, the permafrost modeling integrates a gridded meteorological dataset, soil database, weather and field observations, parameters, and multiple functions and models supporting dynamic parameter changes such as vegetation and ground condition changes. Over 50 QTP weather stations were introduced, and they can partially resolve the spatial change in the permafrost area. The QTEC region is an example of spatial modeling that classifies land cover and topographic features to determine the spatial input parameters. Spatial modeling also uses the temporal–spatial data to provide spatially detailed information on the active layer and permafrost. The static–dynamic maps and statistical values of these indices can facilitate the understanding of the current condition of the near-surface permafrost and identify stations and ranges at high risk of permafrost thawing with the changing climate and human activities. Permafrost thawing causes significant changes in the environment and characteristics of frozen-soil engineering (Larsen et al., 2008; Niu et al., 2016). A comprehensive assessment of permafrost can provide guidance regarding the future of highways and high-speed railway systems in the QTP.

PIC v1.3 was developed with numerous indices as well as support stations and regional simulations. PIC v1.3 can be used to estimate the frozen-soil status and possible changes over the QTP by calculating permafrost indices. This package has many engineering applications and can be used to assess the impact of climate change on permafrost. Moreover, it provides observational data and a comprehensive analysis ability for multiple indices. The probability of permafrost occurrence and the most likely permafrost conditions are determined by computing the 16 indices. Although PIC v1.3 quantitatively integrates most of them based on previous studies (Jafarov et al., 2012; Nelson et al., 1997; Riseborough et al., 2008; Smith and Riseborough, 2010; Wu et al., 2010; Zhang et al., 2005, 2014), it still has several limitations and uncertainties. First, the regional calculation is one-dimensional and assumes that each grid cell is uniform without water–heat exchange. Second, the heterogeneity in the ground conditions of the QTP also brings along uncertainties of parameter preparation. Third, soil moisture at different depths affects the thermal conductivity and thermal capacity of the soil (Shanley and Chalmers, 1999; Yi et al., 2007). Thus, the soil input parameters should be dynamically changed. Lastly, climate forcing has several uncertainties (Zhang et al., 2014), including input air and ground temperatures (i.e., the quality of the ground temperature in the QTP is currently unreliable). Thus, the regional calculation supports fewer indices than the station calculation. These deficiencies can be significant for the permafrost dynamics with environmental evolution.

An R package PIC v1.3 that computes the temperature- and depth-related permafrost indices with daily weather observations and atmospheric forcing has been developed. This package is open source software and can be easily used with input data and parameters that users can customize. A total of 16 permafrost indices for stations and the region are developed, and datasets of 52 weather stations and a central region of the QTP were prepared. Permafrost modeling and data are integrated into the PIC v1.3 R package to simulate the temporal–spatial trends of permafrost with the climate estimate and estimate the status of the active layer and permafrost in the QTP. The current functionalities also include time series statistics, spatial statistics, and visualization. Multiple visual methods display the temporal and spatial variability of the stations and the region. The package produces high-quality graphics that illustrate the status of frozen soil and may be used for subsequent publication in scientific journals and reports. The simulated PIC v1.3 results generally indicate that the temporal–spatial trends of permafrost conditions essentially agree with previously published studies. The transparency and repeatability of the PIC v1.3 package and its data can be used to assess the impact of climate change on permafrost. Additional features may be implemented in future releases of PIC to broaden its application range. In the future, the observational data of the active layer will be integrated into the PIC datasets, and the simulation results will be compared with it. PIC v1.3 will also be used to predict the future state of permafrost by utilizing projected climate forcing and scenarios. Additional functions and models will be absorbed into PIC to improve the simulation and perform comparative analyses with other functions and models. Parallel computation will be added to improve the computation efficiency. The key impact that PIC v1.3 is expected to provide to the open community is an increase in consistency within and comparability among studies. Furthermore, we encourage contributions from other scientists and developers, including suggestions and assistance, to modify and improve the proposed PIC v1.3.

The PIC v1.3 code that supports the findings of this study
is stored in the GitHub repository
(

The data are included in the Supplement files and/or the GitHub repository.

The supplement related to this article is available online at:

The authors declare that they have no conflict of interest.

This research was supported by the National Natural Science Foundation of China (41301508, 41630636, 41771074). We would like to express our gratitude to the editor and the two anonymous reviewers for their insightful comments and suggestions that improved this paper.Edited by: David Lawrence Reviewed by: two anonymous referees