| updateCohortData | R Documentation |
cohortData and pixelGroupMapThis is a wrapper for generatePixelGroups, initiateNewCohort and updates to
pixelGroupMap via assignment to new pixelIndex values in newPixelCohortData.
By running these all together, there is less chance that they will diverge.
There are some checks internally for consistency.
Calculate new values for B, add age, then rbindlist this
with cohortData.
updateCohortData(
newPixelCohortData,
cohortData,
pixelGroupMap,
currentTime,
speciesEcoregion,
treedFirePixelTableSinceLastDisp = NULL,
successionTimestep,
cohortDefinitionCols = c("pixelGroup", "age", "speciesCode"),
initialB = 10,
verbose = getOption("LandR.verbose", TRUE),
doAssertion = getOption("LandR.assertions", TRUE)
)
.initiateNewCohorts(
newPixelCohortData,
cohortData,
pixelGroupMap,
currentTime,
cohortDefinitionCols = c("pixelGroup", "speciesCode", "age"),
speciesEcoregion,
successionTimestep,
initialB = 10
)
newPixelCohortData |
must be a complete |
cohortData |
A |
pixelGroupMap |
A |
currentTime |
The current simulation time e.g., |
speciesEcoregion |
A |
treedFirePixelTableSinceLastDisp |
A data.table with at least 2 columns, |
successionTimestep |
The time between successive seed dispersal events. In LANDIS-II, this is called "Succession Timestep". |
cohortDefinitionCols |
the columns in |
initialB |
the initial biomass of new cohorts. Defaults to 10.
If initialB = asInteger(pmin(maxANPP, asInteger(pmax(1, maxANPP \* exp(-1.6 \* sumB / maxB_eco))))) where |
verbose |
Controls message output. Defaults to |
doAssertion |
A logical indicating whether some internal tests should be run to
ensure the function is running correctly.
Default: |
Does the following:
add new cohort (not survivor) data into cohortData;
assign initial B and age for new cohort;
assign the new pixelGroup to the pixels that have new cohort;
update the pixelGroup map.
Note that if newPixelCohortData is generated after a disturbance
it must contain a type column indicating the origin of the cohorts
(e.g. "survivor", "serotiny", "resprouting"). "Survivor" cohorts will
not be added to the output objects, as they are assumed to be accounted
for in the input cohortData and, correspondingly, pixelGroupMap.
A list of length 2, cohortData and pixelGroupMap, with
newPixelCohortData inserted.
A data.table with a new rbindlisted cohortData
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.