Anyone tried 3D visualization of ROMS output using Mayavi?

Discussion about analysis, visualization, and collaboration tools and techniques

Moderators: arango, robertson

Post Reply
Message
Author
rsignell
Posts: 124
Joined: Fri Apr 25, 2003 9:22 pm
Location: USGS

Anyone tried 3D visualization of ROMS output using Mayavi?

#1 Unread post by rsignell »

Gang,
Has anyone tried doing 3D visualization of ROMS output using Mayavi?

It looks like the underlying VTK data model might be capable of supporting the curvilinear grid, but don't know about the vertical:
http://www.vtk.org/Wiki/index.php?title ... ed_Grid.29

If it worked, it would be cool, as Mayavi/VTK is free, high performance, and interacts well with Python.

-Rich

mastrorocco
Posts: 7
Joined: Tue Dec 12, 2006 7:31 pm
Location: RSMAS, University of Miami
Contact:

Re: Anyone tried 3D visualization of ROMS output using Mayav

#2 Unread post by mastrorocco »

Hi Rich,

I've used Mayavi in the past, but recently I started using Visit (https://wci.llnl.gov/codes/visit/) instead. The latter is also free, high performance, and interacts with Python.

The following tutorial (see Section 5.4) explains how to write a curvilinear mesh with data (vectors and scalars) in a VTK file using the visit_writer library: https://wci.llnl.gov/codes/visit/2.0.0/ ... t2.0.0.pdf

The attached figure shows a curvilinear ROMS mesh written in a VTK file and visualized using Visit.

Best,

Gustavo
Attachments
visit-roms-mesh.png

asujrpv

Re: Anyone tried 3D visualization of ROMS output using Mayav

#3 Unread post by asujrpv »

Gustavo,
this is very interesting, I am quite familiar with paraview, also interacts with python and uses vtk.
http://www.paraview.org/

Do you have a translator to visualize the results from netcdf (whch paraview seems to support but I have not used there) and vtk?

thanks,
rafael

mcobas

Re: Anyone tried 3D visualization of ROMS output using Mayav

#4 Unread post by mcobas »

Hello,

I have not used mayavi, but I have used VTK with python. This animation was done using VTK and python. My experience is that the resultant code is very long, sometimes it is difficult to find information and you have to do a lot of trial and error. I am a newbe in VTK, but I don't think using a curvilinear grid is a problem with VTK, though I didn't try.

I only knew recently about the possibility of using mayavi with python. I didn't try it thoroughly, but it seems to simplify things VERY much. The only thing is that VTK has lots of filters, objects and utilities (to select sections, surface contours, layers, assign colors dependign on depth, interpolate fields, compute splines, streamlines, etc. ) that are very helpful. Does anybody know if mayavi has utilities like these?

Marcos Cobas
Centro de Supercomputacion de Galicia

rsignell
Posts: 124
Joined: Fri Apr 25, 2003 9:22 pm
Location: USGS

Re: Anyone tried 3D visualization of ROMS output using Mayav

#5 Unread post by rsignell »

Gustavo,
I'm curious about why you chose VisIT over Mayavi or Paraview. Are there certain features you found there that make life easier for visualizing ROMS results?
Thanks,
Rich

mastrorocco
Posts: 7
Joined: Tue Dec 12, 2006 7:31 pm
Location: RSMAS, University of Miami
Contact:

Re: Anyone tried 3D visualization of ROMS output using Mayav

#6 Unread post by mastrorocco »

Rafael,
The following tutorial (see Section 5.4) explains how to write a curvilinear mesh with data (vectors and scalars) in a VTK file using the visit_writer library: https://wci.llnl.gov/codes/visit/2.0.0/ ... t2.0.0.pdf
I read the netcdf file using Python and then I follow the above tutorial (see example using Python on Section 5.4) to write the mesh with data in a VTK file. Install Visit, so you can import the visit_writer library from Python.

Rich,
The main reason I changed to Visit is because it is also used by others in my group (although not for visualizing ROMS results). I like better the Visit's GUI interface, but I found easier to interact with Mayavi using scripts. I don't know much about them, but overall I believe they are very similar.

Gustavo

Post Reply