create_conditioned_Miller1998_CONUSSoil: Mask out unrealistic variable values in CONUSSoil

View source: R/extract_soils_Miller1998_CONUSSoils.R

create_conditioned_Miller1998_CONUSSoilR Documentation

Mask out unrealistic variable values in CONUSSoil

Description

This function creates new CONUSSoil-GeoTIFFs where values below a limit are masked out (set as missing). This can be helpful when aggregating values from multiple grid cells for problematic variables such as bulk density (bd) for which some value ranges are unrealistic for representing soils .

Usage

create_conditioned_Miller1998_CONUSSoil(
  path = ".",
  vars = c("rockdepm", "rockvol", "bd", "sand", "clay", "silt"),
  lower_limits_by_vars = c(rockdepm = 0, rockvol = 0, bd = 30, sand = 0, clay = 0, silt =
    0)
)

Arguments

path

A character string. The path to the local copy of the CONUSSoil folder hierarchy, e.g., dirname(prepare_script_for_Miller1998_CONUSSoil()).

vars

A vector of character strings. The requested variables as used by CONUSSoil; see Miller et al. 1998.

lower_limits_by_vars

A named numeric vector. The names correspond to vars and values represent the lower limits that are conditioned/ masked out, i.e., set to NA.

Value

This function is called for its side effects of creating GeoTIFFs if they don't already exist. It returns invisibly a logical vector for each value of vars where TRUE indicates that the conditioned file already exists or was successfully created.


DrylandEcology/rSW2exter documentation built on May 4, 2024, 10:53 p.m.