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

Restructure constant classes to split into more module specific groups. #76

Closed davidorme closed 10 months ago

davidorme commented 1 year ago

Is your feature request related to a problem? Please describe.

The original constants class for the PModel (pyrealm.constants.pmodel_const.PModelConst) is bloated by a whole bunch of constants and parameters for functions that aren't purely PModel specific. For example the parameterisation of the density of water calculation is in there, and that functionality isn't PModel specific - particularly now that the splash draft (#69) also requires that calculation.

Describe the solution you'd like

The existing constants classes need to be revised to break them into more logical groupings. That will also involve updating some functions and classes to require extra constants classes in order to be able to pass in modified values.

Describe alternatives you've considered

There isn't an obvious alternative - everything got shoved in PModelConst in the early implementations and that is not a good long term organisation.