Deltares / Deltares/imod-python
update imod.visualize.streamfunction for general case
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 21h 8m
- Merged PRs (30d)
- 1
Description
In GitLab by @betsyromero on May 12, 2021, 13:59
In imod.visualize.streamfunction, a more general option for:
# _meshcoords returns mesh edges, but useful here to allow 1D/2D
# dimensions in da
# go back to cell centers in 2D
X = np.vstack(da.shape[0] * [da.s])
Y = 0.5 * da.top + 0.5 * da.bottom
if Y.ndim == 1:
# promote to 2D
Y2 = xr.concat(da.shape[1] * [Y], dim=da.s)
would be:
if len(da["top"].dims) == 1:
top = da["top"] * xr.ones_like(da["s"])
else:
top = da["top"]
if len(da["bottom"].dims) == 1:
bottom = da["bottom"] * xr.ones_like(da["s"])
else:
bottom = da["bottom"]
X = xr.ones_like(da["layer"]) * da["s"]
Y = 0.5 * top + 0.5 * bottom
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the imod.visualize.streamfunction entry point and compare the current coordinate handling with the general-case example in the issue. Verify the behavior for one-dimensional and two-dimensional top and bottom coordinates, and confirm that streamfunction visualization works for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100