[Meta] Improve API and functionality for restarting subdaily models #333
Labels
enhancement
New feature or request
icebox
Issues that are not currently a priority for development
meta
Issues that act as the central point of reference for a larger piece of work
In #190, we implemented a way of "restarting" a SubdailyPModel. This allows the internal interpolation of realised values for
xi
,vcmax25
andjmax25
to pick up where a previous contiguous time period ended and avoid:The code in PR #190 implements this by allowing previous realised values to be passed in to restart calculations but:
SubdailyPModel
instance but those can be quite bulky if there is a large number of observations or datetimes. Better would be to have aSubdailyPModel.get_restart
method that creates a minimalRestartSubdailyPModel
dataclass with some de/serialisation options for saving to disk and passing around.previous
interpolation method and not for thelinear
interpolation. The interpolation takes place in theSubdailyScaler.fill_daily_to_subdaily
method. Without previous values, there is a gap filled withnp.nan
for the observations that fall on the first day but at times before the first acclimation window. Those need to be filled from previous values to make the values usingprevious_value
identical to simply merging the two contiguous time blocks and running in one go.previous
method as this is just duplicating the exact same value at the start of the interpolationlinear
. In addition to the previous realised values, thefill_daily_to_subdaily
needs the last set of daily acclimation values as there is an offset in acclimation to avoid plants "knowing" where they are acclimating towards.However - this is quite a lot of effort and I think we should wait for user demand before committing more time to this functionality. We have a proof of concept and this issue is mostly to record what the next steps might be if that demand materialises. At that point we can convert those tick boxes to issues.
The text was updated successfully, but these errors were encountered: