Calculate Soil Moisture Grid, Linear Trapezoid
Source:R/trapezoid_utilities.R
linear_soil_moisture.Rd
Prepare soil moisture grid from STR and VI images for a single date, using linear trapezoid method, and using the derived slope and intercept coefficients
Note
This function is used after preparing the OPTRAM model coefficients with:
optram_wetdry_coefficients
. Typically a new image date,
(that was not used for preparing the model),
will be referenced in the img_date
parameter.
The resulting soil moisture raster is saved to output_dir
.
Examples
img_date <- "2023-03-11"
VI_dir <- system.file("extdata", "NDVI", package = "rOPTRAM")
STR_dir <- system.file("extdata", "STR", package = "rOPTRAM")
SM <- optram_calculate_soil_moisture(img_date,
VI_dir, STR_dir,
data_dir = tempdir())
#> No coefficients file, Exiting...