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 get_flow_residuals and get_flow_lower_face #327

Merged
merged 6 commits into from
Mar 6, 2024

Conversation

rubencalje
Copy link
Collaborator

@rubencalje rubencalje commented Feb 22, 2024

See the title of this PR

@rubencalje rubencalje marked this pull request as ready for review February 23, 2024 08:59
So it also works for multiple packages of the same type (for example 3 DRN-packages), by summing the budgets
nlmod/gwf/output.py Outdated Show resolved Hide resolved
nlmod/gwf/output.py Show resolved Hide resolved
Parameters
----------
ds : xarray.Dataset
Xarray dataset with model data.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xarray dataset with model data and the 'botm' datavar.

return da


def get_flow_lower_face(ds, kstpkper=None, grb_file=None, lays=None):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sluikreclame? Why not layers instead of lays?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omdat het integers zijn. layer duidt meer op de laag-naam.

flowja = cbf.get_data(text="FLOW-JA-FACE", kstpkper=kstpkper)

if ds.gridtype == "vertex":
# detemine flf_index first
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: determine

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

return np.ma.sum(data, axis=0)


def _get_binary_budget_record(fobj, ipos, header, column):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring?

@rubencalje
Copy link
Collaborator Author

Thanks for the review. I implemented most of the requested changes. On top of that, I renamed grbfile to grb_file everywhere, as this is also the way FloPy names this variable.

@rubencalje rubencalje merged commit 7232234 into dev Mar 6, 2024
5 checks passed
@rubencalje rubencalje deleted the output_from_flow-ja-face branch March 6, 2024 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants