Versions Compared

Key

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

...

PG2 data: Cell fill using FV quads. (best for PG2 data): NCL has a CellBounds option which allows the user to specify the FV cell bounds for cell-centered data such as PG2. This option, combined with “CellFill”, each PG2 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. All values in the original data set will be preserved. Unfortunately this option is not directly supported with matplotlib?Matplotlib does not natively support this option, but see below for matplotlib code which can implement this approach.

Regridding

Perhaps the “easiest” way to plot data on the SE grid is to not plot it on the SE grid at all, but to regrid the data first to a regular latitude-longitude grid and use standard tools to plot. This is the approach that E3SM-Diags uses, and once the data is regridded it can be quite quick to plot, outperforming the rest of the options here. It’s also pretty easy to regrid on the fly using scipy.interpolate.griddata. For example, the follow will regrid SE data pretty quickly:

...

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

Dual

...

grid

For PG2 data, this is the most natural approach, with the PG2 dual grid made up of uniform quadrilaterals given in the PG2 SCRIP file.

For GLL data, the dual grid approach is less natural, because the data on the Gauss-Lobatto-Legendre (GLL) grid exists at cell vertices (i.e., data is point values), while most existing analysis tools expect cell-centered data (i.e., data points represent values over some representative area bounded by each “cell”). We can sort of mimic this cell-centered view by constructing a new mesh that is a “finite volume dual grid” to the SE GLL grid, in which we construct bounding polygons around each GLL node and pretend that the data at the GLL node is representative of the value across the area of the polygon. When adding a new SE grid to E3SM, we construct a SCRIP-formatted file with this information, primarily because some of our remapping tools used to/still do require this cell-centered representation of the data. And example

There are two approaches to constructing this dual grid: One can read the information from the GLL SCRIP file used to construct mapping files, or the GLL data can be triangulated, and then the dual grid of the triangulation (Voronoi grid) is constructed. For the Voronio approach, one sets sfXArray and sfYArray with the GLL node locations and the triangulation and Voronio grid will be computed internally.

For the SCRIP approach, an example SCRIP file can be found in the inputdata repository for the ne4np4 grid here:

...