View source: R/sw_Pedotransfer_Functions.R
ptf_estimate | R Documentation |
SWRC
parameters from soil texture with a pedotransfer functionEstimate SWRC
parameters from soil texture with a pedotransfer function
ptf_estimate(
sand,
clay,
fcoarse,
bdensity = NULL,
swrc_name,
ptf_name,
fail = FALSE,
...
)
sand |
A numeric value or vector.
Sand content of the matric soil component
(< 2 mm fraction; units of |
clay |
A numeric value or vector.
Clay content of the matric soil component
(< 2 mm fraction; units of |
fcoarse |
A numeric value or vector.
Coarse fragments, e.g., gravel, (> 2 mm; units of |
bdensity |
A numeric value or vector.
Density of the whole soil
(matric soil plus coarse fragments; units |
swrc_name |
An character string or vector.
The selected |
ptf_name |
An character string or vector.
The selected |
fail |
A logical value.
Issue a warning ( |
... |
Additional parameters passed to selected |
swrcp
, i.e,.
a numeric matrix where rows represent soil (layers) and
columns represent a fixed number of SWRC
parameters.
The interpretation is dependent on the selected SWRC
, see
SOILWAT2
input file swrc_param.in
(
system.file("extdata", "example1", "Input", "swrc_params.in", package = "rSOILWAT2")
).
swrc_names()
lists implemented SWRCs
;
ptf_names()
lists implemented PTFs
; and
check_ptf_availability()
checks availability of PTFs
.
The soil parameters sand
, clay
, fcoarse
, and bdensity
must be of
the same length, i.e., represent one soil (length 1) or
multiple soil (layers) (length > 1); however, bdensity
may be NULL
.
The arguments selecting SWRC
(swrc_name
) and PTF
(ptf_name
)
are recycled for multiple soil layers.
Cosby, B. J., G. M. Hornberger, R. B. Clapp, & T. R. Ginn. 1984. A statistical exploration of the relationships of soil moisture characteristics to the physical properties of soils. Water Resources Research, 20:682-690, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1029/WR020i006p00682")}
ptf_estimate(sand = c(0.5, 0.3), clay = c(0.2, 0.1), fcoarse = c(0, 0))
soils <- swSoils_Layers(rSOILWAT2::sw_exampleData)
# Use PTF "Cosby1984" to estimate parameters of SWRC "Campbell1974"
ptf_estimate(
sand = soils[, "sand_frac"],
clay = soils[, "clay_frac"],
fcoarse = soils[, "gravel_content"],
swrc_name = "Campbell1974",
ptf_name = "Cosby1984"
)
# Use PTF "Rosetta3" to estimate parameters of SWRC "vanGenuchten1980"
if (check_ptf_availability("Rosetta3")) {
ptf_estimate(
sand = soils[, "sand_frac"],
clay = soils[, "clay_frac"],
fcoarse = soils[, "gravel_content"],
bdensity = soils[, "bulkDensity_g/cm^3"],
swrc_name = "vanGenuchten1980",
ptf_name = "Rosetta3"
)
}
# Use PTF "neuroFX2021" to estimate parameters of SWRC `FXW`
## Not run:
# Set neuroFX2021 file path, see details in `ptf_neuroFX2021_for_FXW()`
options(RSW2_FILENEUROFX2021 = "path/to/sscbd.RData")
## End(Not run)
if (check_ptf_availability("neuroFX2021")) {
ptf_estimate(
sand = soils[, "sand_frac"],
clay = soils[, "clay_frac"],
fcoarse = soils[, "gravel_content"],
bdensity = soils[, "bulkDensity_g/cm^3"],
swrc_name = "FXW",
ptf_name = "neuroFX2021"
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.