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

Skip to content

fix(binaryfile): fix head/budget reversal methods#2475

Merged
wpbonelli merged 2 commits into
modflowpy:developfrom
wpbonelli:fix-2473
Mar 18, 2025
Merged

fix(binaryfile): fix head/budget reversal methods#2475
wpbonelli merged 2 commits into
modflowpy:developfrom
wpbonelli:fix-2473

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Mar 18, 2025

Copy link
Copy Markdown
Member

#2473 flushed out some bad kper/kstp/totim/pertim values in the reversed headers, and some sloppy tests. Also remove unused utility functions.

The reported error still needs a fix in followup.

@wpbonelli wpbonelli changed the title Fix 2473 fix(binaryfile): fix head/budget reversal methods Mar 18, 2025
@wpbonelli wpbonelli marked this pull request as ready for review March 18, 2025 12:54
@codecov

codecov Bot commented Mar 18, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.9%. Comparing base (bb9824e) to head (2f4bc84).
Report is 70 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/utils/binaryfile/__init__.py 96.6% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2475     +/-   ##
=========================================
+ Coverage     68.4%   74.9%   +6.4%     
=========================================
  Files          294     296      +2     
  Lines        59390   62699   +3309     
=========================================
+ Hits         40652   46968   +6316     
+ Misses       18738   15731   -3007     
Files with missing lines Coverage Δ
flopy/utils/binaryfile/__init__.py 84.9% <96.6%> (ø)

... and 256 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 wpbonelli merged commit 02ab7f1 into modflowpy:develop Mar 18, 2025
@wpbonelli wpbonelli deleted the fix-2473 branch March 18, 2025 13:04
wpbonelli added a commit to MODFLOW-ORG/modflow6 that referenced this pull request Mar 18, 2025
These were removed in modflowpy/flopy#2475 as they were only used in a few autotests. Second-guessing moving these into flopy (from pymake) a while back, they're just utilities to mock up binary files for testing.
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant