Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

EAM is running on an unstructured finite element grid, with both spectral element data (“GLL data”: vertex data given on the GLL nodes) and “PG2 data”, finite volume physgrid” data, given as cell averages for each cell. See SE Atmosphere Grid Overview (EAM & CAM)

Here we compare several options for plotting this data:

1. Interpolate to lat/lon grid first. (both PG2 and GLL data)

The most common approach is to interpolate the data to a FV latitude longitude grid, either “cap” or offset: CAM-FV Grid Overview . This allows one to use a wide variety of visualization software. Offline interpolation is quick and painless with NCO’s ncremap.

For GLL data, the best algorithm to use (see Transition to TempestRemap for Atmosphere grids ) is TempestRemap’s “intbilin”, as this map is accurate, monotone, and can be used for both downscaling and upscaling. The only drawback is that it is not exactly conservative. If exact conservation is needed (so that the mass computed on the interpolation grid is the same as on the native grid), then TempestRemap’s “mono” should be used.

For PG2 data, to remap from FV (unstructured) to FV (latlon), we dont yet have a integrated bilinear option. ESMF’s “aave” option ( which can be obtained most efficiently using NCO’s ncremap) is conservative and good for downscalings, but will produce blocky plots when upscaling. For nicer looking plots when upscaling, ESMF’s “bilinear” is currently the only option.

todo plot: Example 1: standard test case with “intbilin”

todo plot: Example 2: blocky upscaled plot with aave

2. GLL vertex data: triangulation + dual grid cell fill. (ugly)

This is the standard option in NCL and pyNGL for plotting unstructured data. NCL will internally compute a Delaunay triangulation of the data (via http://www.cs.cmu.edu/~quake/triangle.html ), where the data now lives on the vertex of each triangle. NCL then appears to form the Voronoi diagram (dual grid of the triangulation). On this dual grid, the data is now located at the center of each Voronoi cells. With “RasterFill”, each of these Voronoi cells will be colored based on the value of the original data set. This results are an accurate representation of all the data points in the original field, but can be quite ugly and is a very unnatural representation of the original spectral element data.

todo plot: Example: standard test case

3. GLL vertex data: triangulation followed + Gourard shading (best)

This approach is not available in NCL, but is available in matplotlib. In this approach, a Delaunay triangulation is first computed. Then each triangle is shaded using a linear interpolating based on its three vertex values. This produces nice looking results. It also has the advantage that it is monotone and min/max/oscillation preserving. All values in the original data set will be plotted. It’s perhaps the best visual representation of GLL vertex data.

todo plot: Example: standard test case

4. PG2 data: triangularization + dual grid cell fill (unnatural)

NCL’s Delaunay approach can also be used for PG2 data: computing a Delaunay triangulation and then the associated dual grid. However, this is a lot of work to construct a dual grid mesh, when in the PG2 case, the data is already given as a cell average over nice quadrilaterals, and these PG2 quadrilaterals should be used for the dual grid when plotting.

todo: plot Example : standard test case.

5. PG2 data: Cell fill using FV quads. (best for PG2 data)

NCL has an option to specify the dual grid (polygon cell containing each data point) and it will use this grid for plotting. With “CellFill”, each quad will be colored based on the value of the data point. This will result in a blocky plot, that correctly conveys the cell average nature of each data point.

Unfortunately not supported with matplotlib?

todo: plot Example: standard test casecontent on this page has been merged into: Plotting data on SE native grid