Create new cohorts based on provenance table with unique pixelGroup and add to cohortData

plantNewCohorts(
  newPixelCohortData,
  cohortData,
  pixelGroupMap,
  currentTime,
  successionTimestep
)

Arguments

newPixelCohortData

the cohorts that were harvested

cohortData

A data.table with columns: pixelGroup, ecoregionGroup, speciesCode, and optionally age, B, mortality, aNPPAct, and sumB.

pixelGroupMap

A RasterLayer with pixel values equal to a pixel group number that corresponds exactly to pixelGroup column in cohortData.

currentTime

The current simulation time e.g., time(sim).

successionTimestep

succession timestep used in the simulation

Value

A data.table with a new cohortData