Repository navigation
Issue #1952 improve timeseries resampling further - #1955
Merged
ClaireDons merged 14 commits intoNov 3, 2026
Merged
Conversation
ClaireDons
marked this pull request as ready for review
November 2, 2026 14:25
JoerivanEngelen
approved these changes
Nov 3, 2026
JoerivanEngelen
left a comment
Contributor
There was a problem hiding this comment.
Thanks for cleaning this up, and clarifying the code, I think it is much more understandable now. I have 2 comments, one just to ease my mind. Approving in advance!
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Nov 3, 2026
|
ClaireDons
enabled auto-merge
November 3, 2026 14:18
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Nov 3, 2026
ClaireDons
deleted the
issue_#1952-improve-timeseries-resampling-further
branch
November 3, 2026 17:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #1952 , following on from #1953
(Github refuses to let me stack these PRs, I probably did something wrong)
Description
This is needed for porting the MKWELLIPF iMOD5 function properly (Deltares/iMOD-Suite-transition-regional-models#17) but can be useful more generally.
Main change is that a skipna flag was added to resample_timeseries() that skips NaN values and then takes weighted average rather the forward filling values. It's by default False, so default behaviour remains unchanged. While implementing this I also went around and refactored things a little (hopefully for the best). The other change is that if all values are nodata in average_timeseries(), then the rate is set to 0 rather than staying as NaN (which is consistent with iMOD5).
Remaining questions:
Checklist
Issue #nr, e.g.Issue #737pixi run generate-sbomand committed changes