View source: R/estimateVPRMPars.R
estimate_VPRM_pars | R Documentation |
This is the main function for VPRM parameter estimation. It optimizes VPRM parameters to a set of set of provided net ecosystem exchange (NEE) data by minimizing sum of squared errors (SSE) between VPRM and the provided NEE. A joint optimization of all four VPRM parameters is performed using the differential evolution global optimization algorithm as implemented by the DEoptim package.
estimate_VPRM_pars(
all_data,
opt_groups = NULL,
DE_itermax,
out_path = getwd(),
par_set_str = "",
run_parallel = FALSE,
lambda_prior = c(0, 1.5),
alpha_prior = c(0, 1.5),
beta_prior = c(-4, 4),
PAR0_prior = c(0.1, 6000),
model_form = "Mahadevan07"
)
all_data |
data frame; VPRM driver data to drive the parameter estimation. Should usually be the 'data' field of a VPRM_driver_data object. |
opt_groups |
list of factors – data will be split by the levels of opt_groups and each combination optimized separately. Groups containing less than six observations are ignored. If unspecified parameters are estimated for all of all_data. |
DE_itermax |
integer, maximum differential evolution iterations (see DEoptim documentation). Should be something like 800 for a production run – this will take some time for a typical data set. Run with a small number (5 or so) for a debugging run. |
out_path |
character string; path to directory in which to save the estimated parameters. Default is the value of getwd() |
par_set_str |
character string; phrase to denote the parameterization being considered |
run_parallel |
TRUE|FALSE; if true, use Rmpi to run optimization jobs in parallel |
lambda_prior |
2-element vector; upper and lower lambda values for optimization. Default is c(0.0, 1.5). |
alpha_prior |
2-element vector; upper and lower alpha values for optimization. Default is c(0.0, 1.5). |
beta_prior |
2-element vector; upper and lower beta values for optimization. Default is c(-4.0, 4.0). |
PAR0_prior |
2-element vector; upper and lower PAR_0 values for optimization. Default is c(0.1, 6000). |
model_form |
string, optional; form of VPRM model to use. Options are "Mahadevan07" (default) to use the VPRM formulation of Mahadevan et al. (2007), or "urban" to use the urbanVPRM formulation of Hardiman et al. (2017). If set to "urban", the driver data must include variables ISA proportion (impervious surface area, 0.0 to 1.0) and refEVI (reference EVI). |
0 on success. A list of DEoptim objects (see DEoptim documentation), one for each unique combination of factors in opt_groups, is written to an RDS file in the directory specified by out_path. The file is named in the format ParEst_PAR_SET_STR.de.rds, where PAR_SET_STR is the value of the par_set_str argument to estimate_VPRM_pars. The best fit parameter values are in a named vector in the [['optim']][['bestmem']] field of the DEoptim objects. See DEoptim documentation for further interpretation of DEoptim objects.
Timothy W. Hilton
data(Park_Falls)
pfa_dd <- VPRM_driver_data(name_long="Park Falls",
name_short = "US-PFa",
lat=45.9459,
lon=-90.2723,
PFT='MF',
tower_date=PFa_tower_obs[['date']],
NEE_obs=PFa_tower_obs[['FC']],
T=PFa_tower_obs[['TA']],
PAR=PFa_tower_obs[['PAR']],
date_nir = PFa_refl[['date']],
rho_nir=PFa_refl[['nir']],
date_swir = PFa_refl[['date']],
rho_swir = PFa_refl[['swir']],
date_EVI = PFa_evi[['date']],
EVI=PFa_evi[['evi']],
phen=NA)
par_est_status <- estimate_VPRM_pars(all_data=pfa_dd[['data']],
DE_itermax = 2,
par_set_str='ExampleRun')
par_est_status <-
estimate_VPRM_pars(all_data=pfa_dd[['data']],
DE_itermax = 2,
par_set_str='ExampleRun_Monthly',
opt_groups=months(pfa_dd[['data']][['date']]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.