Refactor BADM_IC_process() for Robust Single/Multi-site Handling#3773
Draft
ayushman1210 wants to merge 22 commits intoPecanProject:developfrom
Draft
Refactor BADM_IC_process() for Robust Single/Multi-site Handling#3773ayushman1210 wants to merge 22 commits intoPecanProject:developfrom
ayushman1210 wants to merge 22 commits intoPecanProject:developfrom
Conversation
Co-authored-by: Chris Black <chris@ckblack.org>
Co-authored-by: Chris Black <chris@ckblack.org>
Co-authored-by: Chris Black <chris@ckblack.org>
Co-authored-by: Chris Black <chris@ckblack.org>
Co-authored-by: Chris Black <chris@ckblack.org>
Co-authored-by: Chris Black <chris@ckblack.org>
Co-authored-by: Chris Black <chris@ckblack.org>
Co-authored-by: Chris Black <chris@ckblack.org>
Co-authored-by: Chris Black <chris@ckblack.org>
mdietze
requested changes
Jan 12, 2026
Member
mdietze
left a comment
There was a problem hiding this comment.
Note that most of this PR has to do with unit conversions, not the stated aim of refactoring BADM_IC_process. Recommend splitting into separate PRs
…anProject#3706 - BADM_IC_process now only accepts single Settings objects, not Multisettings - Validates input has 'run' element; throws clear error if Multisettings attempted - Multi-site processing should be handled by higher-level wrapper functions - Updated tests: removed multi-site test, added test for Multisettings rejection - Uses consistent terminology: 'Settings' instead of 'Settings-like list' - Aligns with design decision from issue PecanProject#3706 on ic process function interface
Member
|
Seconding @mdietze request -- I think many of the unit conversions added here have already been merged in other PRs; please resolve conflicts and if there are any unit changes that are still new here, move them to a separate PR. I'll mark this as draft while you work on that; ping us for review when done. |
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.
Description
Refactored
BADM_IC_process()inmodules/data.land/R/IC_BADM_Utilities.Rto robustly handle both single-site and multi-site settings with proper coordinate validation.Changes:
BADM_IC_process(): Replaced manual normalization with explicit single/multi-site detectionMotivation
Code review feedback: improve clarity and robustness of initial condition processing. Original manual handling was prone to coordinate type issues in multi-site workflows.
Types of changes
Fixes
#3699