Exporting Modflow results to Paraview

939 views
Skip to first unread message

César Rodriguez

unread,
Jul 20, 2018, 5:50:29 AM7/20/18
to MODFLOW Users Group
Hey everyone,

Lately I've been trying to export results from a model that I created with ModelMuse to vtk or vtu format, in order to postprocess models in paraview (sometimes we need the pretty pictures to explain our model). I've tried working a bit with flopy, but I am not that good with coding. I've been able to export my domain active cells as an unstructured grid, but it doesn't contain results, and it doesn't have the real coordinates, so I can't use the csv point data to resample it to the grid. I don't know if the function flopy.export.vtk function even supports exporting results, but I haven't found a way yet.

Any way to export the grid as a georeferenced .vtu file? That would allow me to resample the csv point data you can export with modelmuse, and then postprocess in paraview.

Alterenatively, if there's no way of doing that, any way of exporting the non-georeferenced vtu file, but with the binary results appended to it? Just any way to have the model results as continuous data would work, really.

Thanks in advance!

Richard Winston

unread,
Jul 20, 2018, 6:24:44 AM7/20/18
to mod...@googlegroups.com, MODFLOW Users Group
Instead of using paraview, why not just try using Model Viewer instead?

Sent from BlueMail

César Rodriguez

unread,
Jul 20, 2018, 8:05:34 AM7/20/18
to MODFLOW Users Group
I tried using it, and I got really close to the visualization I was looking for (except vectors show the base instead of an arrow-like tip, which is more intuitive for most people), so it works for single model analysis and presentation. The advantage paraview offers is that you can save "states", which allow you to save the steps you took to get a certain image. By using these, the final objective is to get images quick, by automating a large portion of the process. That would allow to quickly work with large amounts of similar models, in order to compare them and spend more in the modelling part of things. The idea to use paraview arose from a coworker, who uses it to do this process I've described, but with electric tomography models.

Jeff Norville

unread,
Aug 19, 2018, 10:29:21 PM8/19/18
to MODFLOW Users Group
Hi César,

Have you checked out John Doherty's utilities for Modflow? I seem to remember he thought highly of and used ParaView (though hontestly it's been years since I've taken his course):

I'm interested in hearing your solution!

Jeff

Pascual H. Benito

unread,
Dec 27, 2018, 11:32:16 PM12/27/18
to MODFLOW Users Group
FloPy, the USGS Python package for working with MODFLOW models, has functions for exporting the grid to VTK format and also for exporting results in netCDF format:


Pascual H. Benito

unread,
Dec 29, 2018, 12:21:36 AM12/29/18
to MODFLOW Users Group
You can also check out a short video tutorial on using MODFLOW with Paraview from Saul Montoya, of Hatari Labs consulting:

César Rodriguez

unread,
Jan 21, 2019, 10:55:51 PM1/21/19
to MODFLOW Users Group
FloPy seems like the best option for exporting results to paraview, but I haven't ever used it. If I ever again need to exports, that probably will be my go to, but I will have to surpass the learning curve. 

I had already checked Saul's tutorial (which is great, one of the best MM teachers out there), but his script didn't take grid rotation into account, getting my data near the correct location, but failing to orient it correctly. So finally I used a combination of analyzing the raw data (without rotation) on paraview, taking a high res screen capture of it overlayed with the boundary, then georeferencing that capture into ArcGIS so the people that had to use the spatial information got the postprocessed model results. A bit on the tedious side, but it kind of did the trick.

Oscar Fabian Sanchez Ortiz

unread,
Jul 13, 2019, 12:19:22 AM7/13/19
to MODFLOW Users Group
Maybe someday we can have an option in the model viewer to move in time easily and with a quick connection to modelmuse.

Maria Castrellon Romero

unread,
Jul 14, 2019, 10:25:20 PM7/14/19
to mod...@googlegroups.com
Hi César,

You can take a look at this tutorial on how to visualize MODFLOW results on Pythin, VTK and Paraview:


Best,
--------
Gaby Castrellon
PhD Student
Hydrologic Sciences Graduate Group
University of California, Davis


--
You received this message because you are subscribed to the Google Groups "MODFLOW Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modflow+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at https://groups.google.com/group/modflow.
To view this discussion on the web visit https://groups.google.com/d/msgid/modflow/b829d570-e1c6-400f-b469-7bfacc1dec50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages