MPAS_GRID_DISPLAY_OPENGL
Display MPAS Grids {#mpas_grid_display_opengl-display-mpas-grids align="center"}
MPAS_GRID_DISPLAY_OPENGL, C++ programs which read information from an MPAS Grid file, stored in NETCDF format, and display the main (mainly hexagonal) mesh or the dual triangulation, using OpenGL.
grid_cells filename**.nc**
where
- filename**.nc** is the name of the MPAS NETCDF grid file;
displays a plot of the polygonal faces of the primal mesh.
triangulation_faces filename**.nc**
where
- filename**.nc** is the name of the MPAS NETCDF grid file;
displays a plot of the faces of the dual triangulation.
triangulation_lines filename**.nc**
where
- filename**.nc** is the name of the MPAS NETCDF grid file;
displays a plot of the lines of the dual triangulation.
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
MPAS_GRID_DISPLAY_OPENGL is available in a C++ version.
FERN_OPENGL, a C++ program which uses OpenGL to display the Barnsley fractal fern.
MPAS_DRAW, a C++ program which reads an MPAS NETCDF file and allows the interactive user to select grid and solution information to be displayed using OpenGL.
MPAS_GRID_DISPLAY, MATLAB programs which can read an MPAS NETCDF grid file and display the primary polygonal mesh or the dual triangular mesh.
NETCDF, a data directory which contains examples of NETCDF files, a format for the interchange of scientific data.
NETCDF_MPAS, a data directory which contains examples of MPAS grid data stored as NETCDF files.
NETCDF_MPAS, a C++ library which reads MPAS grid data stored as NETCDF files.
- The MPAS home page, http://mpas-dev.github.io.
- Russ Rew, Glenn Davis, Steve Emmerson, Harvey Davies, Ed Hartne,
The NetCDF User's Guide,
Unidata Program Center, March 2009. - Todd Ringler, John Thuburn, Joseph Klemp, William Skamarock,
A unified approach to energy conservation and potential vorticity dynamics for arbitrarily-structured C-grids,
Journal of Computational Physics,
Volume 229, Number 9, 1 May 2010, pages 3065-3090.
GRID_CELLS retrieves the information defining the polygonal grid cells, and displays them.
- grid_cells.cpp, displays the cells of the primal mesh.
- x1.642.grid_cells.png, a PNG snapshot of display from tgrid_cells for the data file x1.642.grid.nc.
- x1.2562.grid_cells.png, a PNG snapshot of display from grid_cells for the data file x1.2562.grid.nc.
TRIANGULATION_FACES retrieves the 3 cell centers around each vertex, and draws the corresponding faces of the triangulation. The display is a triangulated sphere surface.
- triangulation_faces.cpp, displays the triangulation that is the dual of the main mesh.
- x1.642.triangulation_faces.png, a PNG snapshot of display from triangulation_faces for the data file x1.642.grid.nc.
- x1.2562.triangulation_faces.png, a PNG snapshot of display from triangulation_faces for the data file x1.2562.grid.nc.
TRIANGULATION_LINES retrieves the pairs of cell centers that are neighbors, and draws lines to connect them. This actually creates the lines of the triangulation. The display is a triangulated sphere, but there are no areas filled in on the surface, so you can see through to the other side.
- triangulation_lines.cpp, displays the triangulation that is the dual of the main mesh.
- x1.642.triangulation_lines.png, a PNG snapshot of display from triangulation_lines for the data file x1.642.grid.nc.
- x1.2562.triangulation_lines.png, a PNG snapshot of display from triangulation_lines for the data file x1.2562.grid.nc.
- x1.642.grid.nc, an MPAS grid file for a mesh on the sphere, using 642 nodes, 1280 vertices, 1920 edges.
- x1.2562.grid.nc, an MPAS grid file for a mesh on the sphere, using 2562 nodes, 5120 vertices, 7680 edges.
You can go up one level to the MATLAB source codes.
Last revised on 02 January 2011.