Global influence of soil texture on ecosystem water limitation
Creators: name: Wankmüller, Fabian
name: Delval, Louis
name: Lehmann, Peter
name: Baur, Martin
name: Cecere, Andrea
name: Wolf, Sebastian
name: Or, Dani
name: Javaux, Mathieu
name: Carminati, Andrea
Publisher: name: figshare
Year: 2024
Subjects: classificationCode: 370299
subject: Climate change science not elsewhere classified
classificationCode: 370702
subject: Ecohydrology
classificationCode: 379901
subject: Earth system sciences
classificationCode: 410605
subject: Soil physics
classificationCode: 410102
subject: Ecological impacts of climate change and ecological adaptation
classificationCode: 310303
subject: Ecological physiology

description: OverviewTo test our hypothesis that critical soil water thresholds show the hypothesized soil texture dependence on a tree and an ecosystem scale, we simulated soil water thresholds for each soil textural class and compared them to the global flux-tower and sapflux derived observations across climates and biomes:Preprocessing:0. Download raw data, as described in the Methods, from the respective sources (see Data Availability Statement) of the respective sites (see Tab. S2, Supplement) for the respective periods. à Flux-tower data, stored as .csv files, must be given the appropriate folder path to be used in ‘FindThetaCrit.R’ à Sapflux data, as described by ‘sapfluxnetr’ (Granda et al. 2023), stored as .RData in a folder called ‘sapwood’ must be given the appropriate folder path to be used in ‘Raw_Data.R’. Folder structure should look like: “SapFluxNet &gt; data-raw &gt; 0.1.5 (or whatever is the current version downloaded) &gt; RData &gt; sapwood”1. Determining the flux-tower (eddy covariance) derived observations of critical soil moisture thresholds from the relationship between evaporative fraction (EF) and volumetric soil moisture content (see Methods) using ‘FindThetaCrit.R’ (package dependendencies are not managed by the ‘renv’ package here and must be installed manually). à Result: critical soil moisture thresholds per site (see Tab. S2) + visualization of EF~SM relationships including the linear-plateau model fitted through (see Fig. S10).2. Determining the sapflux derived observations of critical soil moisture thresholds (per tree) from the relationship between sapflux density and volumetric soil moisture content (see Methods) using the following sequence of R scripts contained in the ‘SapFluxNet’ folder (here all package+version dependencies are managed by the ‘renv’ package and documented in ‘renv.lock’ à for installation and initiation of ‘renv’ see https://rstudio.github.io/renv/index.html, ‘activate.R’ within the ‘renv’ folder is called when ‘SapFluxNet.Rproj’ is opened because ‘.Rprofile’ is executed automatically thereafter):<br>a. (‘FUN_SapFluxNet.R’ containing necessary R functions is called in ‘.Rprofile’)<br>b. ‘Raw_Data.R’c. ‘Tidy_Data.R’<br>d. ‘Linear_Plateaus.R’<br>-&gt; Result: critical soil moisture thresholds per tree (median per site given in Tab. S2) stored as “SapFluxNet &gt; outputs &gt; ‘daylight_dry_summer_lin_plat_sapwood.rds’” + visualization of linear-plateau models through sapflux~soil mositure data (see exemplary Fig. S11).Main Analysis<br>Main Analysis folder is “Theta-crit_2_1_Publishing”<br>Documentation of the main analysis contained in the R-Studio-Notebook “AllinOne.Rmd”, see also its html-output “AllinOne.nb.html”<br>Here all package+version dependencies are managed by the ‘renv’ package and documented in ‘renv.lock’ (for installation see above; as above ‘activate.R’ within the ‘renv’ folder is called when ‘Theta-crit.Rproj’ is opened because ‘.Rprofile’ is executed automatically thereafter):<br>0. (‘FUN_Theta-crit.R’ containing necessary R functions is called in ‘.Rprofile’)1. ‘AllinOne.Rmd’ is intended to be run as a single executable script if you consider the following details:<br>a. a. ‘AllinOne.Rmd’ performs all required steps of the main analysis, which can be run locally on a computer with standard RAM and CPU specs. However, running the soil-plant hydraulic model in a fine resolution requires a lot of RAM. Therefore, ‘AllinOne.Rmd’ loads the outputs from two scripts run on a server with a lot of RAM (ca. 100-500 GB): ‘001_Lopt-Inverse-Fitting_SERVER.Rmd’ and ‘002_Run-SOLModel-Lopt-in-FineResolution.Rmd’. Note, if you intend to run the server scripts yourself in such a fine resolution, take all necessary data and parameters from “Theta-crit_2_1_Publishing &gt; outputs &gt; cache &gt; to_Server”. The server outputs, however are small enough to be loaded locally on a standard computer from “Theta-crit_2_1_Publishing &gt; outputs &gt; cache &gt; from_Server”: ‘dtres.rds’, ‘dtsol_raw.rds’, ‘dthc_raw.rds’, ‘dtsol.rds’ and ‘dthc.rds’ as well as the finely estimated root length ‘Lopt.rds’ = 638 m m<sup>-2</sup><sub> </sub>considering both data sets (fluxnet and sapfluxnet). Note that the refined parameters of the server run are found in ‘argList_Run-SOLModel-Lopt-in-FineResolution.rds’.<br>2. 0. Result: All figures from the main analysis are created and saved as images (pdf + svg files) as well as gg-objects to be directly replotted in R ( “Theta-crit_2_1_Publishing &gt; outputs &gt; cache”).Further Analysis1. Comparing the VPD-vs-soil moisture limitation of observations (Figure 3e-f in the main text) on two contrasting soil textural classes (Sand + Clay) was performed in Matlab, see ‘Binning_fluxNet_into_Sm_VPD_clean.m’ and Methods.2. Analysis of the global sensitivity of simulated critical soil moisture thresholds to climate change (response to changes in VPD from current to future climate) to assess the global implications for terrestrial ecosystems was performed in Mathematica, see ‘6_PaperNatureCode_PLehmann.pdf’ and Methods.Repository Contents1. README file<br>Overview description<br>2. Minimal Set of Data files for the main analysis<br>(Soil textural classes, Soil hydraulic properties, Critical soil moisture thresholds …)<br>3. .Rprofile<br>Sets reproducible environment using the renv package and loads required packages and functions<br>4. R-script and R-Markdown files<br>R codes to determine, simulate and compare critical soil water thresholds (Fig. 1 + 2)<br>5. Matlab file<br>Code for the VPD vs. soil moisture limitation (Fig. 3e-f)<br>6. Mathemtatica file (as pdf)<br>Code for the global map of critical soil mositure sensitivity to VPD (Fig. 4)<br>7. Software Policy ChecklistSystem RequirementsHardware RequirementsOur codes require only a standard computer with enough RAM to support the operations defined by the user. For minimal performance, this will be a computer with about 2 GB of RAM. Some operations, such as running simulations in a finer resolution (e.g., to inversely model plant root length), benefit from high RAM.Software RequirementsOperating SystemOur codes are tested on Windows10 operating systems using R v.4.3.2 (RStudio Team 2022), Matlab R2023a (The MathWorks Inc. 2022), and Mathematica. v.13.0 (Wolfram Research, Inc. 2023).Package DependenciesR: Reproducible environments are created and documented using the renv package (v. 1.0.3) being activated upon opening the R project (.Rproj) for both the SapFluxNet and Theta-crit projects. Therefore, users should install renv and the packages listed in the renv.lock files prior to run the main code.ReferencesGranda, Victor, Rafael Poyatos, Victor Flo, Jacob Nelson, and Sapfluxnet Core Team. 2023. ‘Working with Sapfluxnet Project Data’. R. https://sapfluxnet.creaf.cat/sapfluxnetr/index.html.RStudio Team. 2022. ‘RStudio: Integrated Development Environment for R’. Boston, MA: RStudio, PBC. http://www.rstudio.com/.The MathWorks Inc. 2022. ‘MATLAB Version: 9.14.0.2239454 (R2023a)’.Natick, Massachusetts, United States: The MathWorks Inc. https://www.mathworks.com. Wolfram Research, Inc. 2023. ‘Mathematica, Version 13.3’. https://www.wolfram.com/mathematica.