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
Issue #921 Update uzf #867
Conversation
imod/mf6/out/cbc.py
Outdated
@@ -261,6 +269,7 @@ def read_imeth6_budgets_dense( | |||
size: int, | |||
shape: tuple, | |||
return_variable: str, | |||
return_id: np.ndarray | None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would call these indices
, you're not returning any of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
…ired for advanced packages budget files
This branch contains all fixes that I needed to work with the UZF-package. The branch contains: 1- Changes to UZF- package methods There are some breaking changes in budget output names: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the PR makes some necessary changes to iMOD Python, but I have some comments.
Furthermore, could you update the changelog with all your changes? Something like:
Added
-------
- Support reading fluxes in the CBC file for boundary packages that contain multiple fluxes (e.g. UZF)
Changed
----------
- Package type added to name of CBC output in fluxnames. E.g. a River package named ``primary-sys`` will get fluxname ``riv_primary-sys``.
- Fluxes in inactive cells now have value ``np.nan`` instead of 0.0
UPDATE: I also miss a test where the new UZF cbc fluxes are read. I think that can be added to the test in imod/tests/test_mf6/test_mf6_uzf_model.py
?
imod/mf6/out/cbc.py
Outdated
@@ -261,6 +269,7 @@ def read_imeth6_budgets_dense( | |||
size: int, | |||
shape: tuple, | |||
return_variable: str, | |||
return_id: np.ndarray | None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I got one minor comment, which you can fix while resolving the changelog merge conflict ;-)
docs/api/changelog.rst
Outdated
- Budget arrays now contain np.nan for cells where budget variables are not defined. | ||
Based on new budget output a disquisition between active cells but zero flow and | ||
inactive cells can be made. Changes affect: | ||
:func:`imod.mf6.open_cbc` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nitpick: Best to put function at start of message. Something like:
- Budget arrays now contain np.nan for cells where budget variables are not defined. | |
Based on new budget output a disquisition between active cells but zero flow and | |
inactive cells can be made. Changes affect: | |
:func:`imod.mf6.open_cbc` | |
- :func:`imod.mf6.open_cbc` now returns arrays which contain np.nan for cells where budget variables are not defined. | |
Based on new budget output a disquisition between active cells but zero flow and | |
inactive cells can be made. |
docs/api/changelog.rst
Outdated
named ``primary-sys`` will get a budget name ``riv_primary-sys``. An UZF package | ||
with name ``uzf-sys1`` will get a budget name ``uzf-gwrch_uzf-sys1`` for the | ||
groundwater recharge budget from the UZF-CBC. Changes affect: | ||
:func:`imod.mf6.open_cbc` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem
Fixes #921
Description
This branch contains all fixes that I needed to work with the UZF-package. The branch contains:
1- Changes to UZF- package methods
2- Changes to the open_cbc methods to deal with cbc-files of advanced packages
3- Changes to the UZF-tests + all tests that deal with budget output
There are some breaking changes in budget output names:
1- The new names support now support output of multiple equal boundary packages, since the package name is used.
2- The budget arrays now contain nans if a package is not active, since zero is a valid budget output.
Checklist
Issue #nr
, e.g.Issue #737