Released
Software

Rewetted Peatland_GHG analysis Code: software packages (R and Matlab) for the calculation of greenhouse gas (GHG) fluxes at a rewetted peatland

Cite as:

Kalhori, Aram; Wille, Christian; Gottschalk, Pia; Li, Zhan; Hashemi, Josh; Kemper, Karl; Sachs, Torsten (2024): Rewetted Peatland_GHG analysis Code: software packages (R and Matlab) for the calculation of greenhouse gas (GHG) fluxes at a rewetted peatland. GFZ Data Services. https://doi.org/10.5880/GFZ.1.4.2023.001

Status

I   N       R   E   V   I   E   W : Kalhori, Aram; Wille, Christian; Gottschalk, Pia; Li, Zhan; Hashemi, Josh; Kemper, Karl; Sachs, Torsten (2024): Rewetted Peatland_GHG analysis Code: software packages (R and Matlab) for the calculation of greenhouse gas (GHG) fluxes at a rewetted peatland. GFZ Data Services. https://doi.org/10.5880/GFZ.1.4.2023.001

Abstract

This publication provides the codes produced for the article "Temporally dynamic carbon dioxide and
methane emission factors for rewetted peatlands. Nature Communications Earth and Environment" by Aram Kalhori, Christian Wille, Pia Gottschalk, Zhan Li, Josh Hashemi, Karl Kemper, and Torsten Sachs (https://doi.org/10.1038/s43247-024-01226-9). In the article, the authors estimate the cumulative GHG emissions of a rewetted peatland in Germany using the long-term ecosystem flux measurements. They observe a source-to-sink transition of annual carbon dioxide (CO2) fluxes and decreasing trend of methane (CH4) emissions.

This software is written in R and MATLAB. Running the codes ([R files and .m files](Code)) and loading the data files ([CSV files and .mat files](Data)) requires the pre-installation of [R and RStudio] (https://posit.co/downloads/) and ([MATLAB]. The RStudio 2022.07.2 Build 576 version has been used for the R scripts. The land cover classification work was performed in QGIS, v.3.16.11-Hannover. Data were analyzed in both MATLAB and R and plots created with R (R Core Development Team 2020) in RStudio®.

The following external packages are required to be incorporated into the codes in order to run the provided codes:

"zyp" package; "missForest" package;"REddyProc" package and explained in detail in the README.

Files: Codes/Kalhori2023_SenSlopes_fig2.r
"zyp" package, Maintainer David Bronaugh <bronaugh@uvic.ca>
Depends R (>= 2.4.0), Kendall
License: LGPL-2.1
https://CRAN.R-project.org/package=zyp

Files: Codes/Kalhori2023_gapfillingMF_validation_figSI1.r
"missForest" package, Maintainer Daniel J. Stekhoven <stekhoven@stat.math.ethz.ch>
Depends randomForest,foreach,itertools
License: GPL (>= 2)
https://www.r-project.org, https://github.com/stekhoven/missForest

Files: Codes/Kalhori2023_NEEpartitioning.r
"REddyProc" package, Maintainer Thomas Wutzler <twutz@bgc-jena.mpg.de>
Depends R (>= 3.0.0), methods
Imports Rcpp, dplyr, purrr, rlang, readr, tibble, magrittr, solartime, bigleaf (>= 0.7)
License: GPL (>= 2)
https://cran.r-project.org/web/packages/REddyProc/index.html


Data are provided as .shp, CSV or text files. The MATLAB scripts for footprint calculation and the R scripts used for gapfilling (missForest) and flux partitioning (REddyProc) are also included.The full description of the data and methods is provided in the manuscript.

Additional Information

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2023 Helmholtz Centre Potsdam GFZ German Research Centre
for Geosciences, Potsdam, Germany (Aram Kalhori).

Kalhori2023_Rewetted Peatland_GHG Analysis is free software:
you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation, version 3 of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

Authors

  • Kalhori, Aram;GFZ German Research Centre for Geosciences, Potsdam, Germany
  • Wille, Christian;GFZ German Research Centre for Geosciences, Potsdam, Germany
  • Gottschalk, Pia;GFZ German Research Centre for Geosciences, Potsdam, Germany
  • Li, Zhan;GFZ German Research Centre for Geosciences, Potsdam, Germany
  • Hashemi, Josh;Alfred-Wegener-Institute Helmholtz Centre for Polar and Marine Research, Potsdam, Germany
  • Kemper, Karl;Department of Geosciences, Institute of Geography, University of Cologne, Cologne, Germany
  • Sachs, Torsten;GFZ German Research Centre for Geosciences, Potsdam, Germany

Contact

  • Kalhori, Aram (Research Scientist) ; GFZ German Research Centre for Geosciences;
  • Sachs, Torsten (Group leader, Senior Scientist) ; GFZ German Research Centre for Geosciences;

Keywords

carbon dioxide emission, CO2 emission, methane emission, CH4 emission, peatland, wetland, eddy covariance, rewetting, emission factor, mitigation

GCMD Science Keywords

Files

License: GNU GENERAL PUBLIC LICENSE (Version 3, 29 June 2007), Copyright (C) 2023 Helmholtz Centre Potsdam GFZ German Research Centre for Geosciences, Potsdam, Germany (Aram Kalhori)

Software Description

Supplement to