Vtk export question #1280
-
Hi, Hope this is the correct place to ask a question. Will vtk export always be limited to structured grid only? The example notebook provided doesn't appear to state anywhere that you can't use this feature with other grid types. I was trying to use it to export a vtk for a MF6 disu modelgrid but it kept failing with; 'UnstructuredGrid' object has no attribute 'nrow'. I later checked the code for the vtk class and saw an assertion for stuctured grid with a comment saying that vtk only works with structured grids. Although it seems that you never quite reach that assertion unless you do have a structured grid. The vtk class has a parameter vtk_grid_type that may take on the value "UnstructuredGrid". This made me think initially that it should work. Cheers for your time. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi @laat0003, VTK export should be set up now to work with unstructured grids as long as the vertices and incidence list are provided. @jlarsen-usgs did a nice rewrite of the VTK export functionality, and if I recall, it is only on the develop branch at the moment through commit #1249. |
Beta Was this translation helpful? Give feedback.
-
Hi @laat0003, VTK export is set up now to work with all supported modflow 6 grid types in the development version of flopy. If you update flopy using
you will have access to the new functionality. The new functionality is described in the example notebook, vtk_example_notebook, and all of the methods to export VTK are the same regardless of grid type. Let me know if you have any other questions! |
Beta Was this translation helpful? Give feedback.
Hi @laat0003, VTK export is set up now to work with all supported modflow 6 grid types in the development version of flopy. If you update flopy using
you will have access to the new functionality. The new functionality is described in the example notebook, vtk_example_notebook, and all of the methods to export VTK are the same regardless of grid type. Let me know if you have any other questions!