fix(ParticleTrackFile): fetch correct particleids in get_alldata#2223
Merged
Conversation
wpbonelli
approved these changes
Jun 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aims to fix the fetching of correct particleids in the
get_alldatamethod ofParticleTrackFile.This mppth file, pathlinefile.zip, is an output of a modpath simulation with the following log:
MODPATH Version 7.2.002 PROVISIONAL Program compiled Oct 16 2023 03:40:46 with IFORT compiler (ver. 20.21.7) Run particle tracking simulation ... Processing Time Step 1 Period 1. Time = 1.09500E+03 Steady-state flow Particle Summary: 0 particles are pending release. 0 particles remain active. 25 particles terminated at boundary faces. 0 particles terminated at weak sink cells. 0 particles terminated at weak source cells. 82 particles terminated at strong source/sink cells. 0 particles terminated in cells with a specified zone number. 551 particles were stranded in inactive or dry cells. 0 particles were unreleased. 0 particles have an unknown status. Normal termination.In this simulation,
107out of658particles were successfully tracked. If the mppth is read as aParticleTrackFileand if theget_alldatamethod is called on it,pl_datais returned as a list of length107but with all elements being empty arrays.Iiuc, that is because the
get_alldatamethod uses the first107particles which are not necessarily the ones that were tracked successfully.