At SAMS, Dr Dmitry Aleynik has developed numerous physical oceanographic models using the FVCOM (Finite-Volume, primitive equation Community Ocean Model) architecture. Run on a high-performance computer cluster, models such as these allow scientists to perform experiments which would often not be possible in reality. The example shown here covers the complex inland waters of western Scotland which are known for strong tides and inclement weather.
I wanted to develop a methodology for importing FVCOM outputs into Paraview for visualisation in future projects, and this article details some of my initial findings.
Unstructured mesh vs. gridded data for particle tracking
FVCOM employs an unstructured grid comprised of interconnected triangles. This allows the designer to increase the model resolution in complex regions. While Paraview seems fine with this data format, at the time I struggled to use it to produce time-evolving features, for instance particle tracks. This was a year or so back so many of the challenges may have just been lack of experience. For particle tracking I elected to first interpolate onto a regular 4D (3D x time) grid using Matlab.
Building a 3D bathymetry (sea floor data)
The FVCOM output includes an implicit bathymetry (the bottom z-level) which covers the extent of the model. However I wanted to be able to pan and zoom beyond the extent of the model domain so utilised GEBCO bathymetry data, stitched on beyond the FVCOM extent. Note that GEBCO also includes positive relief (i.e. hills!) which allows a more complete 3D map to be drawn.
The ‘Warp by scalar’ filter in Paraview allows you to take a 2D ‘sheet’ and pull it into a 3D shape by mapping corresponding z-values (in this case bathymetry data). In order to depict the peaks and troughs of the shallow European continental shelf, I exaggerated the bathymetry by a factor of roughly 50. However the relief of the land is approximately realistic so as not to distract from the bathymetry. I found a nice colour scheme in Paraview which switches from green to brown hues at depth = 0, and played around with the colour mapping until I got a good result. I’m currently working with a flat reference plane; in reality the curvature of the Earth should result in a noticable taper towards the pole at our latitude.
Visualising velocity data
FVCOM outputs a 3D, time-varying velocity field. After some experimentation, I found that the depth component added little to the visual depiction of velocity, so only imported a single near-surface level into Paraview.
There are numerous ways of visualising vector data in Paraview, including quiver arrows and streamlines, but I’ve mostly been investigating particle tracks as to me they best convey the smoothness and complexity of flow in the ocean. If you’ve used Paraview, you’ll know that I have not picked the simple route as particle tracking involves integration over time and rapidly becomes a huge computational load as you progress through the time-steps. It is the number one way of crashing Paraview (and there’s some stiff competition on that front)! All I can suggest is to do all your experimenting at a small scale, limit the track length, and whatever you do – don’t try to skip to a later timestep with the particles switched on! Your computer will lock down for an ice age while it calculates the progress of particles through every timestep up to the one you’ve picked.
I’m reasonably pleased with where I’ve got to with particle tracks; still just releasing them at regular grid spacing whereas ideally the releases would be at random. They’ve also got a habit of getting stuck in ‘dead-ends’ which results in the cumulative pile-up of tracks in sink areas as the animation progresses – I haven’t got to the bottom of this.
Flows around Scotland are dominated by tides, and so this represents the bulk of particle flows also. I’ve experimented with filtering out tidal frequencies to view residual flows driven by wind and pressure gradients – this works well but the problem of particles stuck in ‘dead-ends’ increases.
Visualising 3D temperature / salinity
There are lots of ways of approaching this, but the challenge is always the same: how do you show information on the interior of a 3D volume, and not just its surface? In the animation at the top of the page, I didn’t want to distract from the velocities, so just displayed the 3D salinity field as a translucent volume. You can’t see much detail or change over time with this approach so it acts more as a backdrop to other features.
If you were interested in subtle changes in the 3D salinity field, a better approach might be to show an isosurface at a level of interest, such as I employed for this project.