NCL Website header
NCL Home> Application examples> Non-uniform grids || Data files for some examples

Example pages containing: tips | resources | functions/procedures

Triangular Meshes

Contouring triangular meshes

If your data is represented by a triangular mesh, that is, if you have three one-dimensional arrays which represent the X/Y coordinate points and the data value at each point, then you can use NCL to contour it.

The examples below are finite element grids. For more information on other non-uniform grids that NCL can handle, see the document "Non-uniform grids that NCL can contour."

trimesh_1.ncl: Since the lat/lon arrays you are dealing with here are NOT coordinate arrays in the classic sense, you need to set both the sfYArray and sfXArray resources to these lat/lon arrays respectively.

You also need to set the sfElementNodes resource to the node array that indicates how the triangles are connected.

trimesh_2.ncl: This example is very similar to the previous example, except it uses a different dataset.