DOI: 10.5281/zenodo.7330549
title: Data and code from paper: The carbon sink of secondary and degraded humid tropical forests

description: This repository contains the data and code produced for the following paper: <strong>Title: </strong>The carbon sink of recovering secondary and degraded forests <strong>Contact:</strong> Viola Heinrich (viola.heinrich@bristol.ac.uk) <strong>Please note:</strong> throughout repository where files include reference to: &lt;...<strong>congo_basin</strong>...&gt; this refers to the <strong>Central Africa </strong>region as it is termed in the main paper. the <strong>code</strong> <strong>has not been amended</strong> for wider use and still contains set working directories for use with University of Bristol systems, you will need to change these for the scripts to run. The data produced in this project were produced using a combination of programming languages due to differences in the author's preferences and expertise. Overall, the initial data analysis was carried out in (i) Google Earth Engine, and (ii) Arcpy (Python3.6.10). Most of the post-processing of the initial data was then carried out in <strong>R (v3.6) for which the code and output datasets are available here.</strong> To access the code used in <strong>Google Earth Engine</strong> that was used to produce and export data from the Tropical Moist Forest dataset (e.g. Years Since Last Disturbance of secondary/degraded forest), please follow the link: https://code.earthengine.google.com/d303fc21e7b57a8fc259e0ee2b58bfb4 This repository contains the following zipped folders: <strong>data_folder</strong>: this folder contains further folders with all the data produced for this paper. Fig1_data_models: All data needed to produce Figure 1 of the main paper, including an .RDS version of the 6 main regrowth models produced for this paper (secondary and degraded forests in the three regions). These are the files beginning with "<strong>regrowthModel_..RDS</strong>. Additionally, the folder includes the dataframe files originally from GeoTiff files that were used to extract the Aboveground Biomass in old-growth (undisturbed forests) &gt; e.g. the subfolder "amazon_basin_oldG_AGB" contains the .dbf files representing the AGB in old-growth forest pixels. There are 4 files as the Amazon was split up into 4 sections for computational reasons. Similarly, the Central Africa region (here referred to as congo_basin) was split up into 2 regions. Fig2_data_models_plus_exFig3_to_5: The data needed to produce Figure 2 in the main paper as well as the Extended Data Figures 3 to 5. This includes .RDS versions of the regrowth models for secondary and degraded forests in the three regions for the different variables considered (files beginning with "<strong>regrowthModel_..RDS</strong>) e.g. "regrowtModel_borneo_deg_MaxTemo_low.rds", refers to the regrowth model shown in Figure 2c - the regrowth model for Bornean degraded forests for the variable "Maximum Temperature", where "low" refers to the lowest temperature range considered in the study. As before, files are provided giving information on the AGB in old-growth forests for each region within different conditions of each driving variable. Fig4: All the data needed to produce Figure 4 (and Supplementary Figure 18) of the main paper. This includes the file "regrowth_in_all_basins_by_country_input_data.csv", which contains data on the total number of cells for each forest type for each Years Since Last Disturbance (YSLD) in each region. Extended_dataFig1_input: The input for Extended Data Figure 1, including the values derived from other studies used in this comparison as well as additional notes/comments on how the data were assessed. Extended_dataFig2_input: the input data used to determine the standardised coefficients seen in the Extended Data Figure 2. Extended_data_table_inputs: The inputs for the Extended Data Tables 1 and 2. Inputs include the dataframe files (.dbf), of key variables that were extracted from the GeoTiff files. Only the .dbf files have been included here to limit excessively large data being uploaded. <strong>code_folder.zip</strong>: The code in this folder was used to produce the main figures and results for the extended data tables shown in the paper. this folder also contains a file "example_code_read_in_models.R" which provides an example of how best to read in the regrowth models for each region and forest type to extract important information such as the: (i) average growth rate in the first 20 years of analysis, (ii) all AGCs as a function of YSLD, and (iii) the estimated time it takes to reach the asymptote. <strong>Data and Code usage:</strong> When using any code or data in this repository or another related to this study please cite Heinrich et al. and the original paper as well as the DOI of this repository. Further source data in .xlsx format were also submitted with the main manuscript. If you need anything else, please contact the corresponding author: Viola Heinrich (viola.heinrich@bristol.ac.uk)