-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add chill portion and chill units #1909
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
This looks great, thanks so much! I'll leave another reviewer to give the OK, though.
I am still trying to figure out what the functions should return. Right now, the As you can see in the current implementation of Update: |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
I am also not sure what the
sounds a little like what I am suggesting to do but I couldn't find how exactly it works? In general, I was expecting these classes to rename and add the units specified but it seems they working more as a check? e.g. I made And finally about testing: I am currently adding tests to the |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
For now, I am keeping the logic to only take certain day ranges outside the functions but I think it should be included. Happy to discuss a mechanism on how to do that if we decide to do so. Tomorrow, I will add the test for chill portions and I think its ready for review |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Ready for review @aulemahal Open questions:
|
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.
- Generally our idea is to test the indices with explicit/synthetic data, as you did. And to test the indicators with real-world data (as in the
atmosds
fixture, which comes from ERA5-Land). But, the indicator tests can be minimal if they don't really add much. However, if you add the indexing functionality as discussed, I would suggest testing it in an indicator test. - Answered in the comments.
- Same.
- Not sure I understand. Is this related to the indexing/
select_time
?
(For a better comprehension, read the comments in the order I made them, which is not in code order. 😅 )
Co-authored-by: Pascal Bourgault <[email protected]>
for more information, see https://pre-commit.ci
Remove explicit chunking in make_hourly Remove varname from indicators use sum instead of combination of cumsum and max for cp
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.
Ok I had no idea about the select_time
function and the indexing its awesome!
I think there are several ways for me to implement it for chill portions but the question is how should I deal with seasons that span over years.
By "over years", you mean periods like "YS-JUL" that contain the change in calendar year ? I'm not I see how this is problematic for |
Haha. Its only problematic if you had no idea that something like |
Closes #1753
TODO:
make_hourly_temperature
chill_portions
chill_units
number
) and pull request (:pull:number
) has been addedmake_hourly_temperature
is working with other calendars than 360_dayWhat kind of change does this PR introduce?