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

Refactor: Move iMOD5 converter logic to separate module #1319

Open
JoerivanEngelen opened this issue Dec 3, 2024 · 0 comments
Open

Refactor: Move iMOD5 converter logic to separate module #1319

JoerivanEngelen opened this issue Dec 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@JoerivanEngelen
Copy link
Contributor

We initially started putting converter logic for iMOD5 to MODFLOW6 in a separate module: imod.mf6.utilities.imod5_converter
However, as developments progressed we kind of forgot about it.

@Manangka recently pointed out here:
#1315 (comment)

that converter logic is getting blended too much now with regular MODFLOW6 logic , and that it would be better to move this to the converter module. This has the following advantages:

  • Code duplication stands out better and can be reduced
  • Signatures can be easier aligned, as functions are next to each other

Requirements

  • iMOD5 converter logic should be separate from regular MODFLOW6 logic (e.g. writing MODFLOW6 files)
  • Move tests to separate test module as well
  • Preserve the method Modflow6Simulation.from_imod5_data for the public API, as it is very similar to Modflow6Simulation.from_file (for dumped models). This makes it consistent for users how to load simulations from file.

Nice to have

  • Preserve method from_imod5_data on package level as well. For example, Recharge.from_imod5_data as well similar to how there is a Recharge.from_file. It won't be a common usecase, but there are instances where users want to load an individual package, and it is convenient if that is consistent with Modflow6Simulation.from_imod5_data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 📯 New
Development

No branches or pull requests

1 participant