-
Notifications
You must be signed in to change notification settings - Fork 6
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
What happens when flows are not saved for every time step? #28
Comments
@RyanConway91 MODPATH reads new information from the budget only when it finds information for the current stress period and time step. If there's no information for the current stress period and time step in the budget, it should keep using the last information it read, which I assume is what you meant by "forward fill." If it doesn't appear to be doing that in your simulation, please let me know. |
Looking at the .lst file, its not clear if this is happening or not. In the first stress period, there are 20 timesteps and I am saving timestep 1, 10, and 20. Looking at the Volumetric water balance summary (is there something I should check to see what budget information is being use?), it does not appear that budget is being "forward filled". Here are the volume errors for the 20 timesteps in stress period 1: Line 120: 1889471 cells had errors less than or equal to 0.01 percent (this is SP1, TS1 (real data in cbb in hds)) |
Though I have not looked into this very deeply, I feel that MODPATH should terminate with an error if it determines that not all flows were saved. I suppose there could be some exceptions, but in general, particle tracking with an incomplete set of flows seems problematic. |
Noted. I will try simulations with every TS saved and compare. Thanks |
@RyanConway91 Thanks very much for following up on that. Based on the information you sent and a subsequent discussion with Chris (@langevin-usgs), it seems clear that there's an issue with how MODPATH is handling (or apparently not handling) the situation in which the stored budget information doesn't correspond one-for-one with the time discretization of the simulation. I agree with Chris that MODPATH should terminate if not all the flows were saved. A preliminary look at the relevant code suggests that it might not be as simple as just inserting a line to write an error message and stop, but I should be able to address this relatively quickly and will post an update as soon as possible. |
@RyanConway91 To avoid unintended consequences of simulating particle tracks based on incomplete budget information, MODPATH has been updated (commit a2c53c7) to terminate with an error message if it does not find output in the budget file for the current time step. An updated provisional executable has been posted in modpath-v7/msvs/bin_PROVISIONAL/ -- please see the accompanying README_provisional.txt file for relevant disclaimers. |
Related to this issue, am I correct that MODPATH erroneously fails when reading the model if heads are not written for the first time step? See the loop exit on line 244: modpath-v7/source/HeadReader.f90 Lines 238 to 255 in 4fb34f9
Looking at the logic here, if the first stress period and time step in the budget aren't 1 it will exit the loop early. I'm fine with the solution that the model requires you to write the very first step to the budget file. An error message when this happens would be nice then. Another way to do it would be just by making sure the loop doesn't advance to the next time step, e.g., first_period = this%RecordHeaders(1)%StressPeriod
first_step = this%RecordHeaders(1)%TimeStep
do n = 1, this%RecordCount
period = this%RecordHeaders(n)%StressPeriod
step = this%RecordHeaders(n)%TimeStep
if (period.gt.first_period .or. step.gt.first_step) exit
layer = this%RecordHeaders(n)%Layer
layerCellCount = 1 + this%RecordHeaders(n)%LastCellNumber - this%RecordHeaders(n)%FirstCellNumber
! if((period .ne. 1) .or. (step .ne. 1)) exit
if(layer .eq. nextLayer) then
layerCount = layerCount + 1
nextLayer = layerCount + 1
cellCount = cellCount + layerCellCount
else
layerCount = 0
cellCount = 0
return
end if
end do |
@scantle The provisional code was updated (commit a2c53c7) to intentionally stop with an error message if the budget does not contain information for every time step, including the very first step (please see the comment just above yours in this issue). Have you observed failure without a corresponding error message in the case of incomplete budget information when running that updated executable? |
Im saving flows every 10th timestep. However, MP7 is reporting results for every time step. Is it interpolating the flow field or doing a "forward fill" or what?
The text was updated successfully, but these errors were encountered: