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
19 stars 8 forks source link

Fastslow initval #190

Open surbhigoel77 opened 6 months ago

surbhigoel77 commented 6 months ago

Description

The subdaily module uses an extended form of PModel called the FastSlowPModel. to estimate two categories of variables - fast variables (that respond to environmental changes instantaneously) and slow variables (that take time to respond to these changes). The module uses a memory_effect functions that facilitates the calculation of the slow variables as a combination of their lag values and optimal values.

In the current implementation of subdaily, at the start of the model run, the slow variables take the optimal value as the initial value and update the succeeding values using the:

$R{t} = R{t-1}(1 - \alpha) + O_{t} \alpha$

This PR intends to use an approach in which the last available realised value is used as the initial value for $x{i}$, $V_{max}$ and $J{max}$.

Fixes #82

Type of change

Key checklist

Further checks

davidorme commented 6 months ago

This is a WIP, @surbhigoel77 ? Can you convert to a draft (link in Reviewers pane).

davidorme commented 6 months ago

Also - have you branched this off the feature/new-unit-tests branch, rather than develop? I think it is bringing the commits to that PR with it?

surbhigoel77 commented 6 months ago

Also - have you branched this off the feature/new-unit-tests branch, rather than develop? I think it is bringing the commits to that PR with it?

Yes, I realised that when I pushed changes to fastslow-initval. The commit history shows changes from feature/new-unit-tests branch as well.

davidorme commented 6 months ago

No bother - it isn't a big deal 😄 I guess we could git revert those commits on this branch

codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 83.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.24%. Comparing base (2072e0b) to head (9e3d36d). Report is 34 commits behind head on develop.

Files Patch % Lines
pyrealm/pmodel/subdaily.py 83.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #190 +/- ## ======================================== Coverage 95.24% 95.24% ======================================== Files 28 28 Lines 1703 1726 +23 ======================================== + Hits 1622 1644 +22 - Misses 81 82 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.