Takes a pixelCohortData table (see makeAndCleanInitialCohortData), the speciesEcoregion list and returns a modified pixelCohortData and the cohortData tables to be used in the simulation. This function mainly removes unnecessary columns from pixelCohortData, subsets pixels with biomass > 0, generates pixelGroups, and adds ecoregionGroup and totalBiomass columns to pixelCohortData. cohortData is then created by subsetting unique combinations of pixelGroup and whatever columns are listed in columnsForPixelGroups. The resulting cohortData table has the following columns:

• speciesCode (factor)

• ecoregionGroup (factor)

• pixelGroup (integer)

• age (integer)

• B (integer)

makeCohortDataFiles(
pixelCohortData,
columnsForPixelGroups,
speciesEcoregion,
pixelGroupBiomassClass,
pixelGroupAgeClass,
minAgeForGrouping = 0,
pixelFateDT
)

Arguments

pixelCohortData The full cohortData data.table Default columns that define pixel groups A data.table with speciesEcoregion values. Integer. When assigning pixelGroup membership, this defines the resolution of biomass that will be considered 'the same pixelGroup', e.g., if it is 100, then 5160 and 5240 will be the same Integer. When assigning pixelGroup membership, this defines the resolution of ages that will be considered 'the same pixelGroup', e.g., if it is 10, then 6 and 14 will be the same. Minimum age for regrouping. This may be because there is a source of ages for young stands/trees that is very reliable, such as a fire database. Ages below this will not be grouped together. Defaults to -1, meaning treat all ages equally. If this is related to known ages from a high quality database, then use age of the oldest trees in that database. A data.table of pixelFateDT; if none provided, will make an empty one.

Value

A list with a modified pixelCohortData, cohortData, and pixelFateDT data.tables.