Skip to content

Refactor: Move iMOD5 converter logic to separate module #1319

Description

@JoerivanEngelen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    📯 New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions