Issue #949 allocate river layers#952
Merged
Merged
Conversation
…tage, dim order and/or grid type was not preserved.
luitjansl
approved these changes
Apr 9, 2024
luitjansl
left a comment
Contributor
There was a problem hiding this comment.
looks good, some comments
| top of model layers | ||
| bottom: GridDataArray | ||
| bottom of model layers | ||
| bottom_elevation: GridDataArray |
Contributor
Author
There was a problem hiding this comment.
bottom_elevation is used in the River package, wanted to stick to that convention as much as possible.
| top: GridDataArray, | ||
| bottom: GridDataArray, | ||
| head: GridDataArray, | ||
| ) -> GridDataArray: |
Contributor
There was a problem hiding this comment.
for all these allocation functions, input arrays like "top" and "bottom" should all be xr.DataArray or xu.UgridDataArray but they should (I assume) be all of the same type. If so, could you do some validation? you can probably use the same validation function for all allocators.
Contributor
Author
There was a problem hiding this comment.
Not necessarily true:
You can supply top and bottom as scalar xr.DataArray and 1D xr.DataArray with layer dimension and provide unstructured grids to the other variables.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #949
Description
polygonizeutil function to work around a nasty circular import. The solution also prevents changes to the public API.Checklist
Issue #nr, e.g.Issue #737