CSV Forcing Provider - enhanced error checking and cleanup#83
Draft
PhilMiller wants to merge 8 commits intodevelopmentfrom
Draft
CSV Forcing Provider - enhanced error checking and cleanup#83PhilMiller wants to merge 8 commits intodevelopmentfrom
PhilMiller wants to merge 8 commits intodevelopmentfrom
Conversation
…le data, rather than reporting uninitialized catchment_id
PhilMiller
commented
Nov 19, 2025
Comment on lines
+87
to
+88
| // XXX There may be callers almost-reasonably relying on being able to request data extending one record_duration() past the end | ||
| Logger::logMsgAndThrowError("Requested forcing value runs past the end of the data from CSV file '" + forcing_file_name + "'"); |
Author
There was a problem hiding this comment.
This fails in the unit test currently. Investigating.
kyle-larkin
approved these changes
Nov 25, 2025
kyle-larkin
left a comment
There was a problem hiding this comment.
This is fine, I think narrowing the time range on the unit tests as a follow on to get this merged would be sufficient.
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.
The CSV Forcing provider is still in use, particularly for calibration use cases. I identified a number of cases in which it could currently be made to silently return bad data, thus leading to incorrect scientific results. This PR adds guard rails against those cases.
Additions
class CsvPerFeatureForcingProvider, with contents moved from the headerChanges
constsafety and copy-avoidanceTesting
Notes
Checklist