NCAR / geocat-examples

GeoCAT-examples provides a gallery of visualization examples demonstrating how to reproduce plots from NCL Applications scripts with packages in Python. It also includes some longer form examples demonstrating how to use functionality from various GeoCAT packages.
https://geocat-examples.readthedocs.io
Apache License 2.0
66 stars 42 forks source link

Generate synthetic mesh data for unstructured grid visualization #272

Closed erogluorhan closed 10 months ago

erogluorhan commented 3 years ago

This is aimed at generating analysis data to be used for investigations between GeoCAT team and GeoViews - Datashader stack:

  1. Take one of GeoCAT-examples scripts and convert it from using MPL to using GeoViews. The goal here is to see what kind of results are possible with the simply GeoViews interface. GeoCAT team will determine which one script is going to be used.

  2. Explore the parallel rendering performance of Datashader:

    • Avoid using a data set stored in a file to perform the evaluation (because of size considerations and complexity of experimenting with different numbers of cells). Instead, something that could be generated programmatically, at a specified size and as memory resident, would be good. This could easily be done by discretizing a rectangle into a user-specified number of quads or triangles; however, it should not be any more complicated than is needed. Another way to look at this is that there are three use cases that can be relevant to GeoCAT:

      i. It can be a mesh with no connectivity data. I.e. all we really have are a collection of points as in the CAM-SE.py example. Hence, Delaunay triangulation is needed to triangulate the points and generate a triangle mesh that MPL and Datashader know how to render.

      ii. It can be a triangular mesh that MPL and Datashader know how to render directly. This corresponds to the MPAS “dual mesh” case.

      iii. It can be a mesh of n-gons, where n is greater than 3, and thus each n-gon must be decomposed into triangles (as is done for one of the variables in the MPAS-A.py example).

    • It could be great to see if/how the GeoViews/Datashader stack handles anything beyond case ii above, i.e. how it optimizes the performance of Delaunay triangulation or decomposing individual cells into triangles etc.

erogluorhan commented 3 years ago

@anissa111 @michaelavs please let me know if you have any preference for picking up a script for above item (1).

erogluorhan commented 3 years ago

We have created the branch "datashader" under this repo in reference to above issue description:

which would be used to analyze and propose Geoviews + Datashader stack-related (or any alternative) solutions. Under this branch, the directory Plots/UnstructuredGrids/ contains the following scripts:

(1) issue272_case1.py (2) issue272_case2i.py

Script (1) corresponds to the case 1 described in detail above. The source code of this script is indeed a copy-paste of one of GeoCAT-examples scripts (/Plots/Overlays/NCL_overlay_6.py). We tried to emphasize the concepts of this script as well as its relevance to Geoviews clearly in docstrings.

In script (2), we have implemented case 2.ii above. The concepts of this script as well as its relevance to Datashader can be also found in docstrings.

erogluorhan commented 10 months ago

All of the cases here have been being explored as part of UXarray visualziation efforts. There is still a lot to explore, but since the package is dedicated to unstructured meshes, we'll keep digging into all of these in the future as well.