ImperialCollegeLondon / ImperialCollegeLondon/virtual_ecosystem
Unpack the `PlantsModel.calculate_turnover` constant values into real functionality
- Dominant language
- Python
- Stars
- 20
- Forks
- 5
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 34
Description
At the moment, `PlantsModel.calculate_turnover` is a dumping ground of hardcoded values that other models need `PlantsModel` to provide.
We don't currently have a science model firmed up for many of these, so they are going to be fixed traits of plants. That might end up as being values specific to plant functional types, but it isn't clear whether that goes into ``pyrealm`` or not. For the moment, we move these into constant values in the plant configuration and then see where we are in a month or two.
https://github.com/ImperialCollegeLondon/virtual_ecosystem/blob/c5565d2897e05da56b69ed32d0a25e119a1dbd14/virtual_ecosystem/models/plants/plants_model.py#L608-L657
There are more incoming changes though in #738, so we need to coordinate with that PR.
The changes required are broken out in sub issues below.
@jacobcook1995: should we rename `plant_reproductive_tissue_turnover_...` to `plant_reproductive_tissue_...` and `root_turnover_...` to `root_...` as we don't expect these to differ after turnover. Leaves are a different matter and we probably need to add `leaf_...` alongside `leaf_turnover_...` to capture the differences between active and senesced leaves. It might also be clearer to have `stem_...` not `deadwood_...` since we assume the same values to hold true for both live and dead tissue.
Contributor guide
Research direction
Start in virtual_ecosystem/models/plants/plants_model.py around lines 608-657, then inspect the plant configuration that should hold these traits. Coordinate the change with PR #738 and resolve the naming questions in the issue. Done means the hardcoded turnover values are represented in configuration and provided to the models that need them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100