Deltares / Deltares/imod-python
Add classmethod to construct BoundaryCondition from iMOD5 data
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 21h 8m
- Merged PRs (30d)
- 1
Description
After #961 is fixed, we can expand this method for the BoundaryCondition package to do:
- Test if planar grid included (no layer)
- Allocate cells (for RCH, GHB, RIV, DRN)
- Distribute conductances (for GHB, RIV, DRN)
This can be done in function with something like maybe_allocate_to_layers()
class BoundaryCondition:
...
@classmethod
def from_imod5_package(cls, dis_pkg, npf_pkg, **data):
# target grid is idomain
target = dis_pkg.dataset["idomain"]
# Regrid to one consistent dataset
dataset = cls._regrid_like(target, **data)
# Allocate to layers, if has planar grids
dataset_allocated = maybe_allocate_to_layers(dataset, dis_pkg, npf_pkg)
return cls(**dataset_allocated)
...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review issue #961 first, then locate the BoundaryCondition package and its proposed from_imod5_package entry point. Trace _regrid_like and the proposed maybe_allocate_to_layers flow using dis_pkg, npf_pkg, and the provided data. Done means planar grids are detected, cells are allocated for RCH, GHB, RIV, and DRN, and conductances are distributed for GHB, RIV, and DRN.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100