The transcript from the Webinar, Visualizing Ocean Models, has been edited and timestamped. The data from this webinar can’t be shared, but Python scripts are on Github. Scott Fowler is the Webinar host.
Well, good morning, everybody. My name is Scott Fowler. I’m the Product Manager of Tecplot 360. I’m joined today by Wen Long, PhD. He’s our Senior Technical Product Manager. Wen joined us here at Tecplot from Pacific Northwest National Labs. Previous to that, he was a modeler at the University of Maryland. He and I have spent the last year working to understand the needs of the geoscience community, in particular those doing ocean modeling.
Our webinar today is going to be an overview of Tecplot 360 and how it can be used to visualize ocean models. In our research over the past year, we found that nearly everyone uses a script-based workflow. This has some advantages, but some inherent disadvantages. The disadvantages being that:
- It can take a long time to write scripts.
- It can take a long time to get the plot looking just the way you want for presentation purposes.
- It can take a long time to learn APIs to develop your visualizations and do your analysis.
- Overview of Tecplot, the Company and Products
- Visualizing of FVCOM Results Using Tecplot 360
- How to Purchase Tecplot 360
The data we will use in the demonstration was given to us by Pacific Northwest National Labs, Seattle, Washington. These results are from their Salish Sea Model.
Overview of Tecplot, the Company and Products
Tecplot is a data visualization and analysis company. We were founded in 1981 by a couple of Boeing engineers; hence, a fairly large user base in CFD, particularly external aerodynamics. We are known as the largest CFD post-processor provider with approximately 47,000 users worldwide. Our users tell us that we are the most complete post-processor out there, given that we have high quality plotting, 2D, XY, and 3D.
In the past few years, we’ve been focused on the emerging needs of the CFD community. Models are getting larger as CPU power grows. We are working on techniques to help you save time in your analysis and visualization. If you have questions, please email me at firstname.lastname@example.org.
What are the big problems in post-processing these days?
Well, data are getting larger. With the number of CPUs that are increasing and the speed of the CPUs, your data sizes are growing roughly with Moore’s Law. Discs are not getting any faster. Discs are really becoming the bottleneck to loading your data. Tecplot has some very intelligent disc IO and memory management capabilities to make sure that you can load large datasets—large transient datasets—on a constrained machine.
Just to give you a frame of reference, the machine that I’m demonstrating on today is a Microsoft Surface Book with four CPUs, 16 gigs of RAM. I’m able to load some very large datasets on this machine with Tecplot 360.
Tecplot 360 is our flagship visualization and analysis tool that I will be talking about and demonstrating today.
Chorus helps you understand ensembles of data. If you are doing a large number of CFD runs for comparison with one another, Chorus may be a good tool for you. We’re not going to demonstrate that today, but know that it’s there if you are doing multiple CFD runs and need to do comparisons. Chorus is included with Tecplot 360 (and TecPLUS maintenance).
TecIO. If you are a code-developer and want to export Tecplot file format from your code, you can use our TecIO library. The TecIO library is completely free. We offer an MPI version if you need to write your data in parallel. We also offer source code if you need to compile it. With so many different versions of MPI available out there, most people do need to compile the source if they’re using the MPI version of the library. We have C++ and Fortran bindings available for that.
Tecplot ADK. Much of the Tecplot user interface is developed using the Tecplot ADK, so you can actually customize the user interface, you can develop custom readers, custom data writers using C++ and Fortran bindings. Feel free to contact us if you’re interested in using that and improving and streamlining your workflows. Contact email@example.com.
PyTecplot. When post-processing, you need to be able to automate. We’ve developed a Python API that we released in early 2017. We’ve only improved it and made it faster in the time since then. We will demonstrate some of our Python API, which we call. Python has really become the glue layer for data science and engineering. We think that this is really an important component moving forward to help automate and allow advanced analysis.
Try Tecplot 360 for Free
Visualizing of FVCOM Results Using Tecplot 360
Quick Tour of the Tecplot 360 User Interface[7:29] — You can follow along by Watching the Webinar (opens new tab).
Here is the general overview of Tecplot 360. Just a quick tour of the user interface, we have the menu system up top, toolbars where you can load and save files. We have our mouse tools for zooming and translating and rotating your data. We have tools here for annotating your plot with text, lines, geometries, et cetera.
On the left side is what we call the plot sidebar. This is where you’re going to change a lot of the attributes, the visual attributes, of your plot.
On the right side, we have a probe sidebar. If you do need to learn more about data within a cell, it’ll show up here. Then what we call a quick macro panel. If there are any repetitive actions that you’re taking, you can record a Tecplot macro or a Tecplot plot script and register it with the quick macro panel so you can just quick double-click to perform the actions that are there.
Right here in the middle, we call this big gray area the work space or the work area. Then right in the middle, your initial view is what we call the welcome screen. The welcome screen stores recent Tecplot layouts that you’ve opened. We have links to documentation and online resources.
One of the really great resources here is called the Quick Reference Guide. This is documentation that lets you know about all the keyboard shortcuts and mouse tools and some customization’s that you can do with Tecplot 360. Take a look at the Quick Reference Guide in our Documentation.
Loading FVCOM Data[9:14]
All right, so let’s go ahead and load our data. I’ll go to the File menu > Load Data, and we’ll go to my desktop where I have my FVCOM dataset. I have a netCDF file here. This came from FVCOM. You can see I have FVCOM selected right here. If you do have results from other solvers or other file formats, we have about 30–35 different formats that we can load here. Like I said, with the Tecplot ADK, you can create your own dataset readers. If you have a custom format, you can extend this list.
We have simple text readers, our general text loader, spreadsheet loader, which can load CSVs as well. If you’re on Windows, we do have an Excel reader. You can load some of your measured data as well for comparison. Today we’re going to focus on FVCOM.
The first thing Tecplot 360 tells me is that the aspect ratio of my data has been adjusted, which you’ll see as you load it. Now this dataset represents a … It’s in a UTM coordinate system and the depth is fairly shallow, so we’ve expanded the Z dimension of my dataset.
Now you’ll see we don’t see anything except this outer bounding box of my data. Tecplot is trying to do as little work as possible when you initially load your dataset. We don’t want to load data that’s unnecessary. We haven’t really loaded anything; we’ve just loaded some of the metadata about your dataset. Let’s take a look at what data we have.
A good way to get a view of your data is turn on the contour layer. This is going to activate the outer boundaries of my dataset. Let’s just click on the snapped orientation, the X, Y view. That’s going to give me a plan view of my data. I want to see a more interesting contour variable, so I’ll double-click on the contour legend and select, let’s say, temperature.
Now I can see my dataset. I’ll rotate this around. You can see that I do have a full 3D model here. It is a little bit difficult to see where we are in the world here, so let’s bring in a georeferenced image. I can go to Insert > Georeferenced Image. This capability is also available right here on the toolbar. It’ll save you a couple of clicks from having to go up to Insert. We’ll select my georeferenced image.
Tecplot does support BMP, JPEG, and PNG image formats. We also will look for the corresponding world file. A georeferenced image is simply an image file with a paired world file that explains where it should be placed in the scene. These files can be easily created by GIS tools such as ArcGIS or QGIS. You can then bring them into Tecplot. Do note that Tecplot doesn’t do any coordinate transformation here, so make sure that your world files are in the same coordinate system as your data.
Here I can select either the PNG or the world file, and hit open and it’ll bring it in. In this case, I’m really interested in just this lower section of my dataset, which is why I have a smaller image here. This georeferenced image is actually a 3D object, so it’ll rotate around with the scene. That makes it quite nice if you do want to rotate around.
Animate Through Time[12:56]
Let’s go ahead and animate through time.
We can see that the image is initially placed at zero and is drawn on top of the data as the tides go in and out. We’ll just double-click on our image and let’s bring this down to -15. We can animate through again. Now our data is going to be shown above the georeferenced image the entire time. A nice, easy way to bring in the georeferenced images.
Examine the Loaded Data[13:32]
Let me give you an explanation quickly of actually what the data looks like that we’ve loaded in. One of the most important dialogues in Tecplot is the dataset information dialogue. This will give you some info about what we’ve actually loaded.
Here we have what are called zones. Each zone is effectively a block of your data. In this case, each zone represents one time-step. You can see that it’s a finite element brick. Each zone has a solution time associated with it and a strand number. The strand number simply says that all of these zones are the same object through time.
You can see that this total dataset is fairly small, about 3.3 million total elements through all of the time steps. We have X, Y, lat, long, our spatial variables here. We have some vector components. You can see we have our salinity and temperature. You can see some interesting information about these as well.
Loading Large Datasets[14:37]
Like I said, Tecplot does a very good job of memory management. One of the things that Tecplot will do is it won’t load data until it’s demanded by the plot. In this case, we’re showing X, Y, Z variables and we’re showing temperature. As we go through this list, we can see that the variables that are not required are not loaded, such as latitude has not been loaded, initial density not loaded.
This is a way of Tecplot saving memory as you’re loading your data. You really don’t have to be concerned about loading very large datasets. I have a 250 gig dataset of Boston Bay simulation out in Boston, and I’m able to load it on my machine because of that memory management.
That’s zones and variables.
What we have here is this is what we call a frame. You can have multiple frames in Tecplot to show different views of your data. We’ll get more into that later. Each frame can have a name. You can manage your frames down here on the frame sidebar.
Contouring and Colormaps[15:49]
Let’s look at contouring. Contouring is a pretty important part of your creating presentation quality plots, and choosing the right colormap is quite important. Here we’ve chosen temperature and we’re showing the viridis colormap. This is a perceptually linear colormap. It’s good for people who are color blind and gives a nice, even view of your data. It has a fairly linear increase of luminosity across the scale. These sequential colormaps are really important.
Now we’ll double-click on the legend. A better colormap for temperature is actually one developed by Kristen Thyng. She’s developed the cmocean colormaps (http://kristenthyng.com/blog/2015/10/28/cmocean/), and she’s been nice enough to release those in open source. We’ve been able to bring those into Tecplot. Let’s choose the cmocean thermal colormap, which is a nice one for temperature. We’ll do a continuous contouring so you can see the difference between continuous and banded. This can give a really nice, blended view.
Now let’s say I also want to look at salinity. I’ll set up what we call contour groups. I’ll set up another contour group and I’ll have this one 0.2 salinity. We’ll choose again one of the cmocean colormaps. We’ll choose Haline, which is very similar to the viridis, but it has some slightly softer tones. We’ll also make this a continuous colormap.
Now if I want to switch between temperature and salinity, I can simply right-click, select my contour item on the toolbar, and I’ll select salinity. Now we’re looking at the salinity of our dataset. Again, I can advance through time here.
At this point, we’re only looking at the upper surface of our data. Now what happens if we want to see a lower level of our data? Well, a good way to do that is with isosurfaces. Let’s go ahead and set up an isosurface. I can go isosurface details.
Now a quick note here is we have what we call zone layers. These are going to be the attributes of the actual physical data that you’ve imported. Then we have derived objects. These are going to be objects that are going to cut through your data, your model data, an isosurface being a derived object.
We want to use an isosurfaces at siglev (siglev defines the sigma levels in the dataset). This dataset has values ranging from -1 to zero. -1 is going to be the bottom or the bathymetry. Zero is going to be the surface. Let’s take a look at the bathymetry. We’ll go ahead and show this.
Now we can’t quite see it yet because it’s being obscured by my zone data. Let’s go ahead and turn off the contour and shade of my zone and my images getting in the way. Let’s go ahead and move this all the way down to the bottom. We still have it, and now we can see this is being colored by temperature. Let’s look at the salinity on this as well.
This is the bottom or the bathymetry of my data. We can go ahead and look at the XY plan view again. A nice way to look at what’s going on through the depth of my data is just to animate that isosurface. Let’s go from -1 to zero. I need to type in zero here. We’ll do 50 steps and then I can simply animate.
You can see how my salinity is changing as I go through the depth. Now if we were to look at the side view, we can see how this is going and changing through the layers. This is my isosurface at this particular time step. If I want to see how that isosurface is changing at another time step, I can simply change my time step and then animate through again.
Another way to look at what’s going on in your dataset is to use slices. We can use our slice tool here. I can simply point and click where I want that slice. Just put in a constant X. Let’s say I want to also look at salinity. Again, I can simply right-click and select the salinity contour group.
Let’s say I want to go through the Strait of Juan de Fuca here. Let’s change this to a Y slice. With the slice tool active, I can simply press the Y key on the keyboard and that will change to the Y dimension. If I want another slice, I can add a slice group, too. Let’s go back to X, and we’ll show this. Again, we’ll right-click and change that to salinity. Now I have a couple of slices in here.
Creating Transects with Python[21:27]
Well, the coastlines are never straight. Really, what we want to do here is we want to do a curved slice or a transect. Tecplot doesn’t have that capability built in, so this is where the Python language comes in. Let’s go ahead and we’ll turn off the slice and the isosurface, and we’ll come back to my full volume dataset. Let’s go back into the X, Y plan view.
Let’s take a look at a curved slice that goes down through the Puget Sound here. We’ve developed a Python script to use a couple of tools in Tecplot 360 to help out with this. We’ll use the geometry tool. We’ll start here at the opening of the Strait of Juan de Fuca and we’ll just try to go mid-channel down through Puget Sound here.
I can just click, and I can adjust these points at the end if I don’t quite get through mid-channel. We’ll come down in here to … I believe that’s Tacoma, Washington down there. We’ll zoom in and let’s just adjust a couple of these points. I have the adjuster tool here. I’ll just move this guy a little, maybe move this one around. Let’s move this one down just a little bit.
Now I’m happy with where this path is. I’ll just do a Ctrl + F to do a view fit. Now what I’m going to do is I’m going to extract these points to a new Tecplot zone. Let’s go into the dataset information dialogue and show you what we’ve done here.
By doing that extract, I now have a new zone that we’ve created. It’s I-ordered, so that means it’s just an array of data. A Python script that I’m going to execute is going to use the XY locations to define the path of the transect.
One of the important things with a script is to ensure that you’ve captured your grid correctly. Let’s just take a look at the grid. I’m going to turn on the scatter layer and we’ll take a look at how many points we have along that line. Let’s turn off scatter for my main zone and we’ll just look at scatter for my extracted points.
You can see each one of these points or this zone, the XY locations, are capturing the grid correctly. We have pretty good density here. We’re not jumping over cells. In a couple of places, we have a couple of points within a cell, and that’s fine. OK, that geometry that I created, I’m done with, so we can go ahead and delete that. Now I’m going to execute my Python script.
We have a scripting menu here. There are a number of ways that you can interact with Tecplot with scripts. We have the Tecplot macro language, which is a language that we developed probably 20 or 25 years ago, but we’ve recently introduced Python. Python is much more powerful. It gives you the ability to deal with arrays and string manipulation and actually allows you to extract data out of Tecplot and deal with it.
In order for our Python scripts to run outside of Tecplot and communicate with Tecplot, we need to allow PyTecplot connections. Our Python language actually communicates over sockets. Then I’ll come here to a command prompt and I’ll just execute my vertical transect script.
What this is going to do, first it’s going to connect with Tecplot 360. Then for each time step, it’s going to create a new set of points which represents my transect. Then it’s interpolating all the variable values from the volume dataset onto that new point. Then it’s going to round out by actually creating a plot of the new transect zone.
There you go. It took about 22 seconds to do that. Again, we have about three million total points in this dataset, 24 time steps. Here we have our transect showing salinity along that path.
These two frames are now linked together. If I animate one, both of them animate. We can see both of these animated. It’s a little hard to see the animation in this upper plot. Let’s turn off the mesh. Let me show you what that transect actually looks like up in this upper mesh.
We’ll, again, go into the zone style dialogue. This created a new zone, actually a new set of zones, one zone per time step that are called transect. We’ll turn that on and we’ll turn off our extracted points. For this, the transect is inside. How do we see inside there?
Well, let’s turn off the contour layer and we’ll turn on translucency. Let’s make it 70% translucent. Now I can see the path of that transect. It chose our first contour group as the coloring. In the zone style dialogue, we can say, well, we want this to be colored by salinity. Let’s also turn off the mesh. Now we can see what that transect looks like in our dataset. Again, animate through time.
One of the other things that people have asked us for is once they’ve computed a transect, how do you compute a time average? Again, this is something that is not directly built into Tecplot 360, but Tecplot 360 does have the capability through the running of equations. I’m going to run another Python script here to compute the time average.
What this script does is it asks for which strand do you want to average. Remember we looked at the dataset information dialogue earlier and we pointed out the strand index. We want to do the time average of my transect. Let’s go into the dataset information dialogue and find out what strand number that is. All of our transect zones have the same strand number. That’s strand number two. We’ll come back into the command prompt and we’ll just type two.
Now what this is going to do is it’s going to create one new zone and compute the average of all of the other zones. You can see, for instance, temperature and distance used to the Tecplot equation syntax, which we’ll go into in a minute, and did the summation of all of my transect zones divided by 24. We now have a new zone called Time Average, which has the same grid topology as the transect zones. You see Imax of 200, the Jmax of 11. This is the same grid topology. Now all of the variable values here represent the average of the transects.
Now we want to view that data. We like this view, so let’s just copy this frame. I’m doing a Ctrl + C and then Ctrl + V. Then we’ll move our copied frame up. Here I want to have this be my time average. Let’s make sure to put an annotation so we know what we’re looking at, Time Average. Down here we’re going to be looking at the transect at a particular solution time. Tecplot has what we call dynamic text. This is a keyword that will show us the time step.
Now let’s go ahead and animate through here. You see that this is not our time average yet, so we’ll go into Select this Frame, go into Zone Style, and we’ll select Time Average. We want this to be colored by salinity. Now we have a transient frame and a time average frame. We can, again, animate through time. You can see that this is now static and representing my time average.
What happens if we want to look at another quantity that we don’t actually have in the dataset? For instance, I have my vector components U, V, and W, but what I really want to do is I want to look at the velocity magnitude. Well, we can do that quite easily in Tecplot. One way to do it is through the Analyze menu > Calculate Variables. This has a large number of formulas that you can execute, one being velocity magnitude, so quite easy through here. But let me calculate velocity magnitude by hand to give you a description of the equation syntax.
We go into Data Alter > Specify Equations. One of the key things to know here is the use of curly braces. Curly braces are going to represent variable names. We’re going to do the square root of the U variable squared plus V squared plus WW squared. That’s all there is to it to compute a new variable, curly braces being the big thing you need to know here.
We have a lot of built-in functions, square roots, cosines, et cetera. Those are all available in the Help menu. Here we can just hit Compute. Now I’ve computed velocity magnitude for each zone. Now let’s contour by that.
I’ll just double-click on the contour legend. That’s a nice, quick way to come up to the contour dialogue. We’ll select Velocity Magnitude. We’ll do the same thing down here. Now I can go ahead and animate that through time and see how my velocity magnitude is changing through my dataset over time. We’ve talked about annotations; we’ve talked about calculating new variables.
Exporting Images and Movies[32:52]
Now let’s talk about how to actually get the data out to your colleagues and so they can see your results.
Tecplot does have a number of ways of exporting images. We have, through the export dialog, we can export static images such as PNG, JPEG. We also have vector formats like EPS postscript, WMF. If you’re publishing to a paper, those are some very nice formats to use. But in this case, we have transient data, so we want to create a movie.
Let’s reorganize our frames here a bit to take advantage of our 3D data as well. I’ll bring this frame over and down. Let’s go back to this XY plan view and we’ll hide the contour legend, hide this guy. We can zoom in on our data. Let’s make sure that we’re showing our transect. Let’s say we like this view. Now we want to export this to a movie format, which we can do here through the details dialogue.
Time animation details. We want to export to a movie, so we’ll just click on this filmstrip icon. Let’s go to an MP4. A critical thing here is that we need to select the proper region. The current frame will export just this one frame with the bold border around it, but we want to export all the frames.
We’ll specify a width. Let’s go 1024. Let’s specify an anti-aliasing of three. Anti-aliasing is nice. It makes your text look nice and smooth on output. Let’s specify our animation speed. We only have 24 frames here, so let’s go six frames per second. We’ll end up with about a four-second video. We’ll hit OK, and let’s put this right in our folder here, just call it movie. We’ll hit Save. This will take just a minute to render. Then we’ll take a look at what that movie looks like.
At each one of these times steps, it’s loading the data, it’s rendering to an image. Then, finally, it compiles all those images into an MP4 file. It looks like it’s done. We’ll just double-click on the movie here. There’s our output. Really nice way to create images for sharing and movies to share with your colleagues. That’s what we had for the live demo. Let’s jump back into the PowerPoint presentation.
Let’s summarize what we saw today. We saw really a nice way to load your data and interact with your data without having to write too many scripts. Now we did show the use of some Python, which may be required for doing advanced analysis, for doing really advanced movie creation, but for the most part, Tecplot 360 really allows a way to load your data and interact with it, make all those fine-tune adjustments for your final plots in an interactive manner rather than having to rerun scripts to get text in the right location or a contour legend with the right values on it. You can automate your analysis with PyTecplot.
How to Purchase
One of the great things about buying Tecplot 360 is you get access to our technical support staff. We have a great staff here that can help you write some of these scripts. Rather than you having to go into Google and try to find out how to write a script to create a curved transect, you can just call up our tech support staff and they can help you out. Learn more and contact Tecplot Technical Support.
You can load really large datasets. Like I said before, Tecplot 360 has been developed with large datasets in mind. We’ve added parallelism to the product so it’ll take advantage of all your CPUs when you’re doing things like creating slices or isosurfaces or calculating new variables.
You can get recognized. Your papers are going to look great with the high quality raster and vector export formats that we have. I know that a lot of people doing ocean research are in academia and you use LaTeX quite a bit. We do actually have support for LaTeX fonts within Tecplot 360. Many universities already have Tecplot 360. If you don’t know if you have 360, access to it, you can always contact us to see if you already have access.
Now what you saw today, we’ve sent out to a number of people already to do some beta testing for us, and these are some of my favorite quotes from people that we’ve worked with. I really love the one. Blake came from a pure scripting background, and he said that he was really able to accelerate his work and get his work done faster using the point and click interface. Being able to record Python scripts directly from the Tecplot 360 user interface gave him a great head start in using our Python API as well.
“This is way better than what I was using before. It’s really easy to navigate.”
—Blake Clark, Graduate Research Assistant,
University of Maryland Center for Environmental Science
Then just as a kudos to our tech support guys, this is another of my favorite quotes. It shows that we do really have a great tech support staff and we’re always eager to help you guys out.
“I’ve been in the IT business for 25 years, and you provided the best support of any vendor I’ve worked with to date.”
– IT Administrator, College of Pharmacy & Health Sciences, Western New England University