Skip to content

Conversation

wpbonelli
Copy link
Member

@wpbonelli wpbonelli commented Mar 28, 2025

Add a class method to reconstruct a ModelTime from an array of mf6 binary output file headers, and a method to reverse the time discretization. These are useful for binary file reversal.

Copy link

codecov bot commented Mar 28, 2025

Codecov Report

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

Project coverage is 76.1%. Comparing base (bb9824e) to head (8e9d977).
Report is 71 commits behind head on develop.

Files with missing lines Patch % Lines
flopy/discretization/modeltime.py 97.5% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2481     +/-   ##
=========================================
+ Coverage     68.4%   76.1%   +7.6%     
=========================================
  Files          294     296      +2     
  Lines        59390   64082   +4692     
=========================================
+ Hits         40652   48782   +8130     
+ Misses       18738   15300   -3438     
Files with missing lines Coverage Δ
flopy/discretization/modeltime.py 76.9% <97.5%> (+26.9%) ⬆️

... 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 wpbonelli requested a review from jlarsen-usgs March 28, 2025 15:12
@wpbonelli wpbonelli marked this pull request as ready for review March 28, 2025 15:12
@wpbonelli
Copy link
Member Author

discussed offline

@wpbonelli wpbonelli merged commit 932bdcc into modflowpy:develop Mar 29, 2025
9 of 10 checks passed
@wpbonelli wpbonelli deleted the modeltime branch March 29, 2025 01:14
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