Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(ParticleTrackFile): fetch correct particleids in get_alldata#2223

Merged
wpbonelli merged 2 commits into
modflowpy:developfrom
martclanor:fix_pathline_data
Jun 11, 2024
Merged

fix(ParticleTrackFile): fetch correct particleids in get_alldata#2223
wpbonelli merged 2 commits into
modflowpy:developfrom
martclanor:fix_pathline_data

Conversation

@martclanor

Copy link
Copy Markdown
Member

This PR aims to fix the fetching of correct particleids in the get_alldata method of ParticleTrackFile.

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, 107 out of 658 particles were successfully tracked. If the mppth is read as a ParticleTrackFile and if the get_alldata method is called on it,

pl = fp.utils.PathlineFile("pathlinefile.mppth")
pl_data = pl.get_alldata()

pl_data is returned as a list of length 107 but with all elements being empty arrays.

Iiuc, that is because the get_alldata method uses the first 107 particles which are not necessarily the ones that were tracked successfully.

@martclanor martclanor marked this pull request as ready for review June 11, 2024 19:36
@wpbonelli wpbonelli merged commit f15caaa into modflowpy:develop Jun 11, 2024
@martclanor martclanor deleted the fix_pathline_data branch June 12, 2024 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants