Skip to content
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

utilities for modpath no loading all pathlines of modpath 7 #430

Closed
crayfisher opened this issue Nov 12, 2018 · 11 comments
Closed

utilities for modpath no loading all pathlines of modpath 7 #430

crayfisher opened this issue Nov 12, 2018 · 11 comments

Comments

@crayfisher
Copy link

when using modpath 7, using flopy.utils.PathlineFile() and get_alldata() seems to get only first particle.

works fine for .TimeseriesFile(),

@langevin-usgs
Copy link
Contributor

Can you verify that this is indeed the case by providing a minimal working example that demonstrates the problem? This notebook, https://github.com/modflowpy/flopy/blob/develop/examples/Notebooks/flopy3_Modpath7_unstructured_example.ipynb, shows that it is working properly for an unstructured grid.

@crayfisher
Copy link
Author

I've replicated this problem using structured grid example:
https://github.com/modflowpy/flopy/blob/develop/examples/Notebooks/flopy3_Modpath7_structured_example.ipynb
https://user-images.githubusercontent.com/39174126/48371797-9f754580-e721-11e8-83c0-3727cf6a5dc9.png
checked modpath file, and it's ok, containing all pathlines, but they are not read properly with flopy.

here's even simpler example on my gitlab:
https://gitlab.com/crayfisher/modpath7_err_pathline
run_org directory contains my modflow and modpath run results

these are my python package versions, maybe that's a problem?
numpy version: 1.15.1
matplotlib version: 2.2.3
flopy version: 3.2.10

cheers

@langevin-usgs
Copy link
Contributor

I ran your example and it appears to work fine for me. There are two entries of particle data in p0. Maybe you just need to update your version of Flopy to develop?

image

@jtwhite79
Copy link
Contributor

I can confirm the issue is with the conda-forge version of flopy, the develop branch example works as expected.

@crayfisher
Copy link
Author

I removed conda-forge version and installed development version of flopy through pip, but problem persists.
However, I tried it in python 3.6 and it works fine now.

@chenmingzhang
Copy link

Hi, i have git cloned the recent flopy (3.2.10) version and try to run the example https://github.com/modflowpy/flopy/blob/develop/examples/Notebooks/flopy3_Modpath7_unstructured_example.ipynb in ipython2.7 in Linux. in the figure about 'Plot the pathline and timeseries data' there is only one stream path rather than multiple as shown in the example.
index.

p0 only shows the data for one stream rather than all streams"
p0
[rec.array([(4687.5 , 5257.8125, 100. , 0.0000000e+00, 2, 0),
(4687.5 , 5257.8125, 100. , 0.0000000e+00, 2, 0),
(4658.5693, 5250. , 100.02049, 1.0942441e+00, 2, 0),
(4625. , 5217.9546, 100.09107, 4.9948955e+00, 2, 0),
(4567.961 , 5187.5 , 100.22083, 1.2349938e+01, 2, 0),
(4562.5 , 5182.4766, 100.23977, 1.3444718e+01, 2, 0),
(4500. , 5144.677 , 100.4627 , 2.6459158e+01, 2, 0),
(4449.0166, 5125. , 100.6574 , 3.7920795e+01, 2, 0),
(4437.5 , 5118.3413, 100.71933, 4.1621235e+01, 2, 0),
(4375. , 5078.8296, 101.07293, 6.2709068e+01, 2, 0),
(4250. , 5021.0415, 101.8647 , 1.0986376e+02, 2, 0),
(4194.8276, 5000. , 102.25431, 1.3296767e+02, 2, 0),
(4125. , 4964.906 , 102.87046, 1.6963930e+02, 2, 0),
(4000. , 4911.951 , 104.07787, 2.4063026e+02, 2, 0),
(3891.2754, 4875. , 105.25636, 3.0888718e+02, 2, 0),
(3875. , 4868.77 , 105.44808, 3.1991879e+02, 2, 0),
(3750. , 4819.726 , 106.99556, 4.0823538e+02, 2, 0),
(3532.781 , 4750. , 110.09947, 5.7966925e+02, 2, 0),
(3500. , 4736.824 , 110.65601, 6.1012134e+02, 2, 0),
(3250. , 4672.2812, 115.34239, 8.5494788e+02, 2, 0),
(3113.365 , 4634.1997, 118.21202, 1.0000000e+03, 2, 0),
(3000. , 4599.1655, 120.80777, 1.1282064e+03, 2, 0),
(2563.2263, 4500. , 133.27914, 1.6948297e+03, 2, 0),
(2500. , 4480.5825, 135.68965, 1.7987966e+03, 2, 0),
(2382.4927, 4455.858 , 140.58685, 2.0000000e+03, 2, 0),
(2000. , 4361.2476, 160.1559 , 2.7395596e+03, 2, 0),
(1881.7502, 4336.963 , 167.80823, 3.0000000e+03, 2, 0),
(1500. , 4241.8906, 199.93729, 3.9775132e+03, 2, 0),
(1499.4033, 4241.7603, 200. , 3.9792417e+03, 2, 0),
(1499.4027, 4241.76 , 200.75323, 4.0000000e+03, 1, 0),
(1499.3889, 4241.759 , 220. , 4.5304209e+03, 1, 0),
(1419.2764, 4239.273 , 237.50923, 5.0000000e+03, 0, 0),
(1262.9227, 4233.964 , 278.11255, 6.0000000e+03, 0, 0),
(1124.158 , 4228.6333, 323.68115, 7.0000000e+03, 0, 0),
(1084.4944, 4226.981 , 338.86984, 7.3092246e+03, 0, 0)],
dtype=[('x', '<f4'), ('y', '<f4'), ('z', '<f4'), ('time', '<f4'), ('k', '<i4'), ('particleid', '<i4')])]
Thanks, Chenming

@langevin-usgs
Copy link
Contributor

You need to be using the develop version of Flopy. Can you tell what you are using?

@crayfisher
Copy link
Author

crayfisher commented Jan 29, 2019 via email

@chenmingzhang
Copy link

Hi Christian:
thanks for the fast response.
from mine:

cmzhang@ae429-3158 ~/flopy $ git rev-parse HEAD
1381f95
cmzhang@ae429-3158 ~/flopy $ git branch

  • develop
    cmzhang@ae429-3158 ~/flopy $ ipython --version
    5.8.0
    cmzhang@ae429-3158 ~/flopy $ python --version
    Python 2.7.13
    cmzhang@ae429-3158 ~/flopy $ uname -a
    Linux ae429-3158 4.9.0-8-amd64 why are modflow parameters so confusing? #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
    cheers, chenming

@langevin-usgs
Copy link
Contributor

Okay, so this is probably a problem with python, as suggested by @crayfisher. I suggest that you upgrade to Python 3.6 or newer. I've been using Python 3.7 lately with good success.

@chenmingzhang
Copy link

right, I confirm that the example runs well on python3. thanks all. Chenming

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

No branches or pull requests

5 participants