EDR.Rd
This function provides a convenient way to call the ED radiative transfer module (EDR, which simulates full spectral return of an ED patch for a given point in time) directly from R.
EDR(
img_path,
ed2in_path,
spectra_list,
trait.values,
soil_reflect_path = system.file("extdata", "soil_reflect_par.dat", package =
"PEcAnRTM"),
wood_reflect_path = system.file("extdata", "wood_reflect_par.dat", package =
"PEcAnRTM"),
par.wl = 400:2499,
nir.wl = 2500,
edr_exe_path = NULL,
output.path = dirname(normalizePath(ed2in_path, mustWork = TRUE)),
settings = list(model = list(revision = "git", config.header = NULL)),
singularity_args = list(),
clean = FALSE,
stderr = TRUE,
verbose_error = TRUE,
...
)
Path to Singularity container (usually a .simg
file)
Path to ED2IN file.
List of spectral data matrices. Names must exactly match
the PFTs given in trait.values
. Each item must be a matrix of
reflectance (labeled 'R' or 'reflectance') and transmittance (labeled 'T' or
'transmittance') values. If the matrix is not of class spectra
(see
spectra()
), it must also have a column of wavelength values (labeled
'wl'). Such a matrix is returned by default by all versions of PROSPECT in
this package.
Named, hierarchical list of trait values for generating
config.xml file. Names must be PFTs, and must exactly match names of
spectra_list
.
Path to soil reflectance file (defaults to spectra
in package extdata
)
Path to wood reflectance file (defaults to spectra
in package extdata
)
Vector of wavelengths defining PAR region
Vector of wavelengths defining NIR region
If img_path
is NULL
, a full path to the EDR
executable. Ignored otherwise.
Directory in which to execute the run. Defaults to
dirname(ed2in_path)
.
PEcAn settings list. Default is list(model = list(revision = "git", config.header = NULL))
.
Additional arguments to be passed to singularity run
(before)
Logical. If TRUE
, remove all files generated by this function
(e.g. cloned history file, ED2IN, output HDF files).
Logical. If TRUE
(default), internalize system2
results as
R character vector. TRUE
is recommended because it allows EDR to check its
execution and to run more quietly.
Logical. If TRUE
(default), spit out the full ED
if EDR execution fails.
Additional arguments to system2