Description Usage Arguments Details Value Note Examples
Master module that calls four major modules and associated helper functions, to create a single land use tradeoff scenario.
1 2 | tradeoff_mod(prod_targ, cbetas, currprodmod = 1, exist_list = NULL,
it = 1, input_key = "ZA", ybetas, ybeta_update = 0, silent = TRUE)
|
prod_targ |
Production targets passed as list. See examples for format. |
cbetas |
Vector of constraints to apply to land use. See examples. |
currprodmod |
Modifiers of current yield/production (default 1) |
exist_list |
NULL, otherwise list of inputs (from input_handler) |
it |
Iteration number, default 1, used to suffix for run_code |
input_key |
Country/location code indicating input data to load. |
ybetas |
list of 2 rasters or 2 vectors providing yield modifications |
ybeta_update |
1 or 0 (default) - determines whether yield_mod_* is run. |
silent |
Silent or verbose mode (TRUE [default] or FALSE) |
Much of the detail of running the model, and examples that help to illustrate it, are in the examples for the individual model components, including checks for consistency between "D" and "R" versions.
Data.frame of impacts, and data.table referencing conversions.
The impacts module has to be fixed still to not double-count impacts resulting from multi-season cropping in converted pixels. The iter parameter is used to keep the grid outputs from batch run in sequence.
1 2 3 4 5 6 7 8 9 | prod_targ <- c("maize" = 4, "soy" = 2)
# cbeta vector
cbetas <- c(0.5, 0.5, 0, 0)
names(cbetas) <- c("Y", "C", "BD", "COST")
tdt <- tradeoff_mod("ZA", prod_targ, ybetas, cbetas)
CRSobj <- projection(raster("external/ext_data/ZA-carbon-priorities.tif"))
plot(dt_to_raster(tdt$conv, CRSobj = CRSobj) - tdr$conv) # check maps
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.