Skip to contents

Functions for generating soil carbon IC files from SoilGrids250m data

Usage

soilgrids_ic_process(
  settings,
  dir,
  depth = c(0.3, 2),
  overwrite = FALSE,
  verbose = FALSE
)

Arguments

settings

PEcAn settings list containing site information

dir

Output directory for IC files

depth

Numeric vector of depth values in meters. Can be single value or multiple values c(0.3, 2.0). Default: c(0.3, 2.0)

overwrite

Overwrite existing files? (Default: FALSE)

verbose

Print detailed progress information? (Default: FALSE)

Value

List of paths to generated IC files, organized by site ID

Details

This module provides functions for extracting, processing, and generating ensemble members for soil carbon initial conditions using SoilGrids data. All soil carbon values are in kg/m2.

Process SoilGrids data for initial conditions

Author

Akash

Examples

if (FALSE) { # \dontrun{
# Process both depths (default)
settings <- PEcAn.settings::read.settings("pecan.xml")
output_dir <- withr::local_tempdir()
ic_files <- soilgrids_ic_process(settings, dir = output_dir)  

# Process only 30cm depth
ic_files <- soilgrids_ic_process(settings, dir = output_dir, depth = 0.3)
} # }