Skip to main content
Log in

KarsTS: an R package for microclimate time series analysis

  • Software Article
  • Published:
Earth Science Informatics Aims and scope Submit manuscript

Abstract

KarsTS 2.2 is free, open-source, R-based software for microclimate time series, especially suited to the study of underground or highly insulated environments. The time series of interest include air temperature, humidity, and CO2 and 222Rn content, amongst others. These time series usually pose problems such as gaps, outliers, noise or relative shortness. KarsTS was born as a package for gap filling and thus, it offers multiple univariate and multivariate gap-filling tools well suited to these variables. However, as KarsTS was intended to be a self-sufficient program, it soon grew to encompass several tools for linear and nonlinear time series analysis, preprocessing and plotting. Indeed, many of these variables show a nonlinear behavior that is often disregarded; for this reason, we aim to spread and facilitate the use of some methodologically appropriate analysis tools, even amongst researcher that do not feel comfortable using a console. In this paper, we introduce an overview of KarsTS functionality and we show its potential through some practical application examples on four-year time series of temperature from the Rull cave (Spain).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

References

  • Abarbanel HD, Brown R, Sidorowich JJ, Tsimring LS (1993) The analysis of observed chaotic data in physical systems. Rev Mod Phys 65:1331–1392

    Article  Google Scholar 

  • Alvarez-Gallego M, Garcia-Anton E, Fernandez-Cortes A, Cuezva S, Sanchez-Moral S (2015) High radon levels in subterranean environments: monitoring and technical criteria to ensure human safety (case of Castañar cave, Spain). J Environ Radioact 145:19–29

    Article  Google Scholar 

  • Amritkar R, Kumar PP (1995) Interpolation of missing data using nonlinear and chaotic system analysis. J Geophys Res-Atmos 100(D2):3149–3154

    Article  Google Scholar 

  • Baldini JU, Baldini LM, McDermott F, Clipson N (2006) Carbon dioxide sources, sinks, and spatial variability in shallow temperate zone caves: evidence from Ballynamintra cave, Ireland. J Caves Karst Stud 68:4–11

    Google Scholar 

  • Bjornstad ON (2017) nlts: (non)linear time series analysis. R package version 0.2–2

  • Bourges F, Genthon P, Genty D, Lorblanchet M, Mauduit E, D'Hulst D (2014) Conservation of prehistoric caves and stability of their inner climate: lessons from Chauvet and other French caves. Sci Total Environ 493:79–91

    Article  Google Scholar 

  • Bradley E, Mantilla R (2002) Recurrence plots and unstable periodic orbits. CHAOS 12:596–600

    Article  Google Scholar 

  • Buuren S, Groothuis-Oudshoorn K (2011) mice: multivariate imputation by chained equations in R. J Stat Softw 45

  • Camuffo D, Pagan E, Bernardi A, Becherini F (2004) The impact of heating, lighting and people in re-using historical buildings: a case study. J Cult Herit 5:409–416

    Article  Google Scholar 

  • Coco MI, Dale R (2014) Cross-recurrence quantification analysis of categorical and continuous time series: an R package. Front Psychol 5

  • Cuezva S, Fernandez-Cortes A, Benavente D, Serrano-Ortiz P, Kowalski A, Sanchez-Moral S (2011) Short-term CO2(g) exchange between a shallow karstic cavity and the external atmosphere during summer: role of the surface soil layer. Atmos Environ 45:1418–1427

    Article  Google Scholar 

  • Dengel S, Zona D, Sachs T, Aurela M, Jammet M, Parmentier FJW, Oechel W, Vesala T (2013) Testing the applicability of neural networks as a gap-filling method using CH4 flux data from high latitude wetlands. Biogeosciences 10:8185–8200

    Article  Google Scholar 

  • Di Narzo A, Di Narzo F (2013) tseriesChaos: Analysis of nonlinear time series. R package version 0.1–13

  • Fairchild IJ, Smith CL, Baker A, Fuller L, Spötl C, Mattey D, McDermott F (2006) Modification and preservation of environmental signals in speleothems. Earth Sci Rev 75:105–153

    Article  Google Scholar 

  • Falge E, Baldocchi D, Olson R, Anthoni P, Aubinet M, Bernhofer C, Burba G, Ceulemans R, Clement R, Dolman H, Granier A, Gross P, Grünwald T, Hollinger D, Jensen NO, Katul G, Keronen P, Kowalski A, Lai CT, Law BE, Meyers T, Moncrieff J, Moors E, Munger JW, Pilegaard K, Rannik Ü, Rebmann C, Suyker A, Tenhunen J, Tu K, Verma S, Vesala T, Wilson K, Wofsy S (2001a) Gap filling strategies for long term energy flux data sets. Agric For Meteorol 107:71–77

    Article  Google Scholar 

  • Falge E, Baldocchi D, Olson R, Anthoni P, Aubinet M, Bernhofer C, Burba G, Ceulemans R, Clement R, Dolman H, Granier A, Gross P, Grünwald T, Hollinger D, Jensen NO, Katul G, Keronen P, Kowalski A, Lai CT, Law BE, Meyers T, Moncrieff J, Moors E, Munger JW, Pilegaard K, Rannik Ü, Rebmann C, Suyker A, Tenhunen J, Tu K, Verma S, Vesala T, Wilson K, Wofsy S (2001b) Gap filling strategies for defensible annual sums of net ecosystem exchange. Agric For Meteorol 107:43–69

    Article  Google Scholar 

  • Fernandez-Cortes A, Cuezva S, Alvarez-Gallego M, Garcia-Anton E, Pla C, Benavente D, Jurado V, Saiz-Jimenez C, Sanchez-Moral S (2015) Subterranean atmospheres may act as daily methane sinks. Nat Commun 6:ncomms8003

    Article  Google Scholar 

  • Fox J, Bouchet-Valat M (2017) Rcmdr: R commander. R package version 2.4–1

  • Garcia CA (2015) nonlinearTseries: nonlinear time series analysis. R package version 0.2.3

    Google Scholar 

  • Garcia SR, Romo MP, Figueroa-Nazuno J (2013) Characterization of ground motions using recurrence plots. Geof Inter 52:209–227

    Article  Google Scholar 

  • Garcia-Anton E, Cuezva S, Fernandez-Cortes A, Alvarez-Gallego M, Pla C, Benavente D, Cañaveras JC, Sanchez-Moral S (2017) Abiotic and seasonal control of soil-produced CO2 efflux in karstic ecosystems located in oceanic and Mediterranean climates. Atmos Environ 164:31–49

    Article  Google Scholar 

  • Giannerini S (2017) tseriesEntropy: entropy based analysis and tests for time series. R package version 0.6–0

  • Grosjean P (2014) SciViews: a GUI API for R. UMONS Mons, Belgium

    Google Scholar 

  • Grunsky EC (2002) R: a data analysis and statistical programming environment–an emerging tool for the geosciences. Comput Geosci 28:1219–1222

    Article  Google Scholar 

  • Harrell FE (2017) Hmisc: Harrell Miscellaneous. R package version 4.0–3

  • Honaker J, King G, Blackwell M (2011) Amelia II: a program for missing data. J Stat Softw 45:1–47

    Article  Google Scholar 

  • Kennel MB, Brown R, Abarbanel HD (1992) Determining embedding dimension for phase-space reconstruction using a geometrical construction. Phys Rev A 45:3403–3411

    Article  Google Scholar 

  • Letellier C, Moroz I, Gilmore R (2008) Comparison of tests for embeddings. Phys Rev E 78:026203

    Article  Google Scholar 

  • Mangiarotti S, Coudret R, Drapeau L, Jarlan L (2012a) Polynomial search and global modeling: two algorithms for modeling chaos. Phys Rev E 86:046205

    Article  Google Scholar 

  • Mangiarotti S, Mazzega P, Hiernaux P, Mougin E (2012b) Predictability of vegetation cycles over the semi-arid region of Gourma (Mali) from forecasts of AVHRR-NDVI signals. Remote Sens Environ 123:246–257

    Article  Google Scholar 

  • March TK, Chapman SC, Dendy RO (2005) Recurrence plot statistics and the effect of embedding. Physica D 200:171–184

    Article  Google Scholar 

  • Marwan N (2011) How to avoid potential pitfalls in recurrence plot based data analysis. Int J Bifurcat Chaos 21:1003–1017

    Article  Google Scholar 

  • Marwan N, Kurths J (2005) Line structures in recurrence plots. Phys Lett A 336:349–357

    Article  Google Scholar 

  • Marwan N, Trauth MH, Vuille M, Kurths J (2003) Comparing modern and Pleistocene ENSO-like influences in NW Argentina using nonlinear time series analysis methods. Clim Dyn 21:317–326

    Article  Google Scholar 

  • Marwan N, Romano MC, Thiel M, Kurths J (2007) Recurrence plots for the analysis of complex systems. Phys Rep 438:237–329

    Article  Google Scholar 

  • Moffat AM, Papale D, Reichstein M, Hollinger DY, Richardson AD, Barr AG, Beckstein C, Braswell BH, Churkina G, Desai AR, Falge E, Gove JH, Heimann M, Hui D, Jarvis AJ, Kattge J, Noormets A, Stauch VJ (2007) Comprehensive comparison of gap-filling techniques for eddy covariance net carbon fluxes. Agric For Meteorol 147:209–232

    Article  Google Scholar 

  • Nichols JM, Trickey ST, Seaver M (2006) Damage detection using multivariate recurrence quantification analysis. Mech Syst Signal Process 20:421–437

    Article  Google Scholar 

  • Perrier F, Richon P (2010) Spatiotemporal variation of radon and carbon dioxide concentrations in an underground quarry: coupled processes of natural ventilation, barometric pumping and internal mixing. J Environ Radioact 101(4):279–296

    Article  Google Scholar 

  • Pla C, Cuezva S, Garcia-Anton E, Fernandez-Cortes Á, Cañaveras JC, Sanchez-Moral S, Benavente D (2016a) Changes in the CO2 dynamics in near-surface cavities under a future warming scenario: factors and evidence from the field and experimental findings. Sci Total Environ 565(565):1151–1164

    Article  Google Scholar 

  • Pla C, Galiana-Merino JJ, Cuezva S, Fernandez-Cortes Á, Cañaveras JC, Benavente D (2016b) Assessment of CO2 dynamics in subsurface atmospheres using the wavelet approach: from cavity–atmosphere exchange to anthropogenic impacts in Rull cave (Vall d0Ebo, Spain). Environ Earth Sci 75(6). https://doi.org/10.1007/s12665-016-5325-y

  • Pla C, Cuezva S, Martínez-Martínez J, Fernandez-Cortes Á, García-Antón E, Fusi N, Crosta GB, Cuevas-González J, Cañaveras JC, Sanchez-Moral S, Benavente D (2017) Role of soil pore structure in water infiltration and CO2 exchange between the atmosphere and underground air in the vadose zone: a combined laboratory and field approach. Catena 149:402–416

    Article  Google Scholar 

  • Poulain A, Rochez G, Bonniver I, Hallet V (2015) Stalactite drip-water monitoring and tracer tests approach to assess hydrogeologic behavior of karst vadose zone: case study of Han-Sur-Lesse (Belgium). Environ Earth Sci 74:7685–7697

    Article  Google Scholar 

  • Romano MC, Thiel M, Kurths J, Kiss IZ, Hudson JL (2005) Detection of synchronization for non-phase-coherent and non-stationary data. Europhys Lett 71:466–472

    Article  Google Scholar 

  • Stekhoven DJ (2013) missForest: nonparametric missing value imputation using random Forest. R package version 1.4

  • Strozzi F, Gutierrez E, Noe C, Rossi T, Serati M, Zaldivar JM (2007) Application of non-linear time series analysis techniques to the nordic spot electricity market data. Liuc Papers

  • Su YS, Gelman A, Hill J, Yajima M (2011) Multiple imputation with diagnostics (mi) in R: opening windows into the black box. J Stat Softw 45:1–31

    Article  Google Scholar 

  • Takens F (1981) Detecting strange attractors in turbulence. In: Rand D., Young LS. (eds) Dynamical systems and turbulence, Warwick 1980. Lecture notes in mathematics, vol 898. Springer, 366–381

  • Thiel M, Romano MC, Kurths J, Rolfs M, Kliegl R (2008) Generating surrogates from recurrences. Philos Trans Royal Soc A 366:545–557

    Article  Google Scholar 

  • Webber CL (2012) Recurrence quantification of fractal structures. Front Physiol 3

  • Wuertz D, Setz T, Chalabi Y (2017) fNonlinear: Rmetrics - nonlinear and chaotic time series modelling. R package version 3042.79

  • Zhao X, Huang Y (2015) A comparison of three gap filling techniques for eddy covariance net carbon fluxes in short vegetation ecosystems. Adv Meteorol 260580:12

    Google Scholar 

  • Zhao P, Xingb L, Yuc J (2009) Chaotic time series prediction: from one to another. Phys Lett A 373:2174–2177

    Article  Google Scholar 

Download references

Acknowledgements

This research was funded by the Spanish Ministry of Economy and Competitiveness Projects [CGL2011-25162, CGL2016-78318-C2-1-R, CGL2016-78318-C2-2-R and RTI2018-099052-B-I00]. A post-doctoral research fellowship was awarded to S. Cuezva by the University of Almería (Hipatia Programme). We also thank Dr. S. Mangiarotti for his useful discussions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to D. Benavente.

Additional information

Availability and Requirements

Program title: KarsTS 2.2

Developer: Marina Sáez (email: marinasaez_andreu@hotmail.com)

Available from: https://cran.r-project.org/web/packages/KarsTS/index.html

Licensing provisions: GNU General Public License 2

Programming language: R (>= 3.4.0)

Software: minimum, Windows 7 or Mac OS v.10.11 . R (>= 3.4.0) and R Studio (>= 1.1.383).

Running time: Interactive

Software Files

Program title: KarsTS 2.2

Available from: https://cran.r-project.org/web/packages/KarsTS/index.html

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Electronic supplementary material

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Sáez, M., Pla, C., Cuezva, S. et al. KarsTS: an R package for microclimate time series analysis. Earth Sci Inform 12, 685–697 (2019). https://doi.org/10.1007/s12145-019-00393-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s12145-019-00393-0

Keywords

Navigation