ImperialCollegeLondon / pyrealm

Development of the pyrealm package, providing an integrated toolbox for modelling plant productivity, growth and demography using Python.
https://pyrealm.readthedocs.io/
MIT License
23 stars 9 forks source link

Generate a cohort and community structure for representing plant demography. #132

Closed davidorme closed 1 month ago

davidorme commented 1 year ago

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:

But - this effort might be substantially faster than having to repeatedly unpack and pack cohort objects into community arrays for calculations?

davidorme commented 1 month ago

We can close this - these structures exist and the array vs objects question is resolved.