-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fastslow initval #190
Fastslow initval #190
Conversation
This is a WIP, @surbhigoel77 ? Can you convert to a draft (link in Reviewers pane). |
Also - have you branched this off the |
Yes, I realised that when I pushed changes to |
No bother - it isn't a big deal 😄 I guess we could |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely the right inputs, but then we need to feed those forward into the calculations. This is a little more finicky than I first thought - I'm going to take it off the list for version 1.0.0 (#206)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #190 +/- ##
===========================================
+ Coverage 95.29% 95.85% +0.56%
===========================================
Files 28 34 +6
Lines 1720 2487 +767
===========================================
+ Hits 1639 2384 +745
- Misses 81 103 +22 ☔ View full report in Codecov by Sentry. |
@MarionBWeinzierl It looks good - I've added a higher level test to run it through the whole SubdailyPModel process. That revealed a couple of minor issues in the value checking. I've also updated the variable name and docstrings in Unfortunately, the new test is failing for reasons I don't quite understand yet. |
OK.
|
Description
The
subdaily
module uses an extended form of PModel called theFastSlowPModel
. 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 amemory_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:This PR intends to use an approach in which the last available realised value is used as the initial value for$\xi$ , $V_{max}$ and $J_{max}$ .
[ETA - @davidorme 2024-10-18]
In addition to adjusting the equation above (so that$R_1$ can be updated from the provided previous values $R_0$ and not just be set as $O_1$ ), the previous values also need to be supplied to
SubdailyScaler.fill_daily_to_subdaily
to replace the leadingnp.nan
values before the first acclimation window.Fixes #82
Type of change
Key checklist
pre-commit
checks:$ pre-commit run -a
$ poetry run pytest
Further checks