-
Notifications
You must be signed in to change notification settings - Fork 349
Description
Bug Description
I am attempting to use the Headfile.reverse() method to facilitate backwards particle tracking using PRT in sequence after GWF. PRT is crashing with the following error:
ERROR REPORT: 1. TIME STEP NUMBER IN HEAD FILE DOES NOT MATCH TIME STEP NUMBER IN TRANSPORT MODEL. IF THERE IS MORE THAN ONE TIME STEP IN THE HEAD FILE FOR A GIVEN STRESS PERIOD, HEAD FILE TIME STEPS MUST MATCH GWT MODEL TIME STEPS ONE-FOR-ONE IN THAT STRESS PERIOD.
It appears that the .reverse() method is adding 1 to all of the time-step indices for each stress period except for the first (which becomes the last in the reversed). The GWF model has 1 time step per stress period. Here is a screenshot showing how the time-step indices have changed:
It is possible this issue is present in the budget file too, but I am having an issue (potentially related) loading the reversed budget file with flopy.
Possible Diagnosis
I was able to fix the behavior in the Headfile by changing header["kstp"] to (header["ktsp"] - 1) in the following function, but am not sure if that is a complete fix.
System & versions
- OS: Windows
- Flopy version 3.9.1

