calc_cell_ISRICWISE: Calculate weighted mean soil variables from one of the...

Description Usage Arguments

View source: R/ExtractData_Soils.R

Description

Areas with no soil are 'removed' and the remaining data 'scaled' to 1.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
calc_cell_ISRICWISE(
  i,
  i_sim_cells_SUIDs,
  sim_soils,
  layer_N,
  layer_Nsim,
  ldepth,
  dat_wise,
  nvars,
  var_tags,
  val_rocks = NULL
)

Arguments

i

An integer value. The number of the simulation site/cell location.

i_sim_cells_SUIDs

A named numeric vector. A row of of the data.frame returned by ISRICWISE_extract_SUIDs.

sim_soils

A named numeric vector. First element is 'i' and second is 'depth'. The following elements represent the soil variables (currently, "density", "sand", "clay", "rock", "carbon"; see prepare_ExtractData_Soils) for each of the maximally possible soil layers (see SFSW2_glovars[["slyrs_maxN"]]). Input is an empty template.

layer_N

An integer value. The number of soil layers in the dataset (i.e., 5, see extract_soil_ISRICWISE).

layer_Nsim

An integer value. The number of soil layers of a rSFSW2 project representing the dataset (i.e., 6, see extract_soil_ISRICWISE).

ldepth

An integer vector. The depth limits of the extracted rSFSW2 project soil layers including zero where layer_Nsim + 1 == length(ldepth).

dat_wise

A data.frame representing the main ‘ISRIC-WISE’ database.

nvars

An integer value. The number of soil variables extracted from a ‘ISRIC-WISE’ dataset (currently, 5; see prepare_ExtractData_Soils).

var_tags

A vector of character string. The column names for “suid”, bulk density (“density”), “sand”, “clay”, coarse fragments (“rock”), and organic carbon content (“carbon”).

val_rocks

An integer vector. The (negative) values which correspond to rocky outcrops and/or rocky subsoils. Soil depth is limited to above layers that have values in val_rocks.


Burke-Lauenroth-Lab/rSFSW2 documentation built on Aug. 14, 2020, 5:20 p.m.