Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Key "solver" is hardcoded in simulation.split #778

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

Closed
JoerivanEngelen opened this issue Jan 25, 2024 · 1 comment
Closed

Key "solver" is hardcoded in simulation.split #778

JoerivanEngelen opened this issue Jan 25, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JoerivanEngelen
Copy link
Contributor

In de Modflow6Simulation.split method we hardcode the "solver" key for the solver. This is wrong, as users are free to assign their solver package to any key. I think only the packages "time_discretization" and exchanges keys can be hardcoded, as they are generated by methods.

Therefore, we should change:

        new_simulation["solver"]["modelnames"] = xr.DataArray(
            list(get_models(new_simulation).keys())
        )

to:

        ims_key = simulation._get_pkgkey("ims")
        new_simulation[ims_key]["modelnames"] = xr.DataArray(
            list(get_models(new_simulation).keys())
        )

This requires adding a _get_pkgkey method to the Modflow6Simulation class as well, or moving the logic to utility function:

get_pkg_key(model_or_simulation, package_type)
@JoerivanEngelen JoerivanEngelen added the bug Something isn't working label Jan 25, 2024
@github-project-automation github-project-automation bot moved this to 📯 New in iMOD Suite Jan 25, 2024
@JoerivanEngelen JoerivanEngelen moved this from 📯 New to 🤝 Accepted in iMOD Suite Jan 25, 2024
@luitjansl
Copy link
Contributor

The "solver" label was removed in commit of PR 791 which solved issues #788 and #789

@github-project-automation github-project-automation bot moved this from 🤝 Accepted to ✅ Done in iMOD Suite Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants