The Cohort represents the individual cohorts of different plant functional types in a size-based demographic model and the Community represents a collection of cohorts of different sizes and PFTs within an area.
These two are very tightly linked and having a clear but efficient way to store the data and then calculate rapidly across many cohorts means they need to be designed together. The most computationally efficient way to do this may be to hold the cohorts as an axis within arrays of community structure - most (if not all) of the calculations can be carried in parallel. The immediate things to be wary of there are:
A set of community arrays will (ultimately - once death and recruitment are added!) be constantly changing along the cohort dimension as new cohorts are recruited. That might be less efficient than simply managing a list of Cohort objects.
Some information is will be repeated and need indexing correctly. For example, if the community has an array giving the wood density (a PFT trait) across each cohort, this needs to be unpacked from the PFT description. Having a Cohort object with an attached PFT class is cleaner than having to having to maintain arrays of PFT attributes to align with the cohorts.
But - this effort might be substantially faster than having to repeatedly unpack and pack cohort objects into community arrays for calculations?
The
Cohort
represents the individual cohorts of different plant functional types in a size-based demographic model and theCommunity
represents a collection of cohorts of different sizes and PFTs within an area.These two are very tightly linked and having a clear but efficient way to store the data and then calculate rapidly across many cohorts means they need to be designed together. The most computationally efficient way to do this may be to hold the cohorts as an axis within arrays of community structure - most (if not all) of the calculations can be carried in parallel. The immediate things to be wary of there are:
Cohort
objects.Cohort
object with an attachedPFT
class is cleaner than having to having to maintain arrays of PFT attributes to align with the cohorts.But - this effort might be substantially faster than having to repeatedly unpack and pack cohort objects into community arrays for calculations?