MT3DMS examples p8 and p10. #1485
-
Hello I have a question about the p08 and p10 codes of the MT3DMS examples, both are showing the following error: [Errno 2] No such file or directory: '..\data\mt3d_test\mt3dms\p08shead.dat' [Errno 2] No such file or directory: '..\data\mt3d_test\mt3dms\p10shead.dat' Where do I find this shead.dat file? I looked in the files created by MT3DMS and MODFLOW and I didn't find it. Thanks in advance to anyone who can help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @AndreLuiz55, To avoid situations like this we could consider updating the example notebooks to use a utility function to locate example data instead of manually handling paths. The idea being to find An alternative possibility (probably longer-term) could be to allow automatically downloading example data. I have seen other projects do this, e.g. PyVista. This could allow working with example models without cloning the project repo, e.g. something like: from flopy import examples
mf, mt, conc, cvt, mvt = examples.download_mt3dms(workspace="some/dir") Above omits parameters for simplicity. It would probably take some work to figure out the right approach, but just an idea. |
Beta Was this translation helpful? Give feedback.
Hi @AndreLuiz55,
p08shead.dat
andp10shead.dat
are located inexamples/data/mt3d_test/mt3dms
relative to the project root, see here. Are you running the MT3DMS example notebook? Depending where you're running it from, you may need to modify the relative path. You can useos.getcwd()
to check the working location as seen by the notebook process.To avoid situations like this we could consider updating the example notebooks to use a utility function to locate example data instead of manually handling paths. The idea being to find
examples/data
automatically, providing the notebooks are run from somewhere inside theflopy
project. (We already do this in the flopy tests, so it should be a min…