Skip to content
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 classmethod to construct BoundaryCondition from iMOD5 data #994

Open
JoerivanEngelen opened this issue Apr 29, 2024 · 0 comments
Open

Comments

@JoerivanEngelen
Copy link
Contributor

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)
...
@JoerivanEngelen JoerivanEngelen changed the title Add classmethod to convert BoundaryCondition data Add classmethod to construct BoundaryCondition from iMOD5 data Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🤝 Accepted
Development

No branches or pull requests

1 participant