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

Skip to content

refactor(gridutil): improve arg handling in get_disu_kwargs#2480

Merged
wpbonelli merged 1 commit into
modflowpy:developfrom
wpbonelli:gridutil
Apr 1, 2025
Merged

refactor(gridutil): improve arg handling in get_disu_kwargs#2480
wpbonelli merged 1 commit into
modflowpy:developfrom
wpbonelli:gridutil

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Mar 28, 2025

Copy link
Copy Markdown
Member

Use the same pattern from get_disv_kwargs to check/expand arguments in get_disu_kwargs. Also update the logic so any 1D array-like of shape (nlay,) can be used to specify constant top/bottom elevations per layer, where previously only a list was accepted.

@wpbonelli wpbonelli marked this pull request as ready for review March 28, 2025 16:14
@codecov

codecov Bot commented Mar 28, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 81.48148% with 5 lines in your changes missing coverage. Please review.

Project coverage is 76.1%. Comparing base (bb9824e) to head (f0ba8df).
Report is 72 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/utils/gridutil.py 81.4% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2480     +/-   ##
=========================================
+ Coverage     68.4%   76.1%   +7.6%     
=========================================
  Files          294     296      +2     
  Lines        59390   64092   +4702     
=========================================
+ Hits         40652   48788   +8136     
+ Misses       18738   15304   -3434     
Files with missing lines Coverage Δ
flopy/utils/gridutil.py 96.3% <81.4%> (-0.4%) ⬇️

... and 259 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wpbonelli

Copy link
Copy Markdown
Member Author

merging to get #2483 in

@wpbonelli wpbonelli merged commit 48f46fb into modflowpy:develop Apr 1, 2025
@wpbonelli wpbonelli deleted the gridutil branch April 1, 2025 14:55
wpbonelli added a commit that referenced this pull request Apr 1, 2025
Following up on #2475. Fixes #2473. #2480 was extracted from this changeset for tidiness.

Up to now the reversal methods have worked for our backwards particle tracking examples, which have very simple time discretizations. But they didn't work in the general case — only for "symmetric" tdis with no time step multiplier.

Fix several issues with binary output file reversal. Clean up and expand tests to include dis/disv/disu with both trivial and a couple non-trivial time discretizations. Make a small (but consequential) fix for #2481: when reversing we need to take the reciprocal of tsmult. Fix an issue with the ModelTime class perioddata property and add a pertim property like the totim property.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant