Skip to content

fix(binaryfile): fix head/budget file reversal #2483

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

Merged
merged 3 commits into from
Apr 1, 2025

Conversation

wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Mar 29, 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.

Copy link

codecov bot commented Mar 29, 2025

Codecov Report

Attention: Patch coverage is 45.74468% with 51 lines in your changes missing coverage. Please review.

Project coverage is 76.0%. Comparing base (bb9824e) to head (7fc3c97).
Report is 73 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/utils/binaryfile/reverse.py 0.0% 47 Missing ⚠️
flopy/discretization/modeltime.py 71.4% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2483     +/-   ##
=========================================
+ Coverage     68.4%   76.0%   +7.6%     
=========================================
  Files          294     296      +2     
  Lines        59390   64137   +4747     
=========================================
+ Hits         40652   48790   +8138     
+ Misses       18738   15347   -3391     
Files with missing lines Coverage Δ
flopy/utils/binaryfile/__init__.py 85.4% <100.0%> (ø)
flopy/discretization/modeltime.py 77.0% <71.4%> (+27.0%) ⬆️
flopy/utils/binaryfile/reverse.py 0.0% <0.0%> (ø)

... and 257 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 marked this pull request as ready for review March 29, 2025 23:31
@wpbonelli wpbonelli added this to the 3.9.3 milestone Apr 1, 2025
@wpbonelli wpbonelli merged commit 0eba4ba into modflowpy:develop Apr 1, 2025
18 of 19 checks passed
@wpbonelli wpbonelli deleted the fix-2473 branch April 1, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: budgetfile.reverse() - unable to load w/ flopy
1 participant