Replies: 4 comments 9 replies
-
This is really great! |
Beta Was this translation helpful? Give feedback.
-
@cdeciampa this is great stuff! And it seems like the performance is reasonable as well. One minor question, how would I use scrip file data for the |
Beta Was this translation helpful? Give feedback.
-
This is great, thanks for working on this! I'm thrilled to see work being done to make analysis in native unstructured grids easier. |
Beta Was this translation helpful? Give feedback.
-
I learned about these results at the recent E3SM meeting - nice results and impressively fast! Do you happen to know how the drawing engine would compare to matplotlib's PolyCollection? For the GLL node data (CAM-SE plots), the polygons from the SCRIP file are a little unnatural and hard to compute. There's a more natural representation where the data is given by vertices of quads. Any idea if this approach could be used to shade quadrilaterals based on vertex data (i.e. a bilinear shading?) instead of cell centered data? |
Beta Was this translation helpful? Give feedback.
-
At the suggestion of @philipc2 some months back, I have successfully modified his Polymesh code to plot the native grids of MPAS and CAM-SE (ne30) using Holoviews' Polygons. I also added a couple of features, such as:
verticesOnCell
values filled those last 1-3 "empty" indices with 1, so I just replaced the empty indices with the first indices of each non-hexagon polygon (therefore connecting the polygon to itself).I wanted to share my code for those that were seeking solutions to visualize MPAS and CAM-SE's native grids in Python until they are supported by UXarray, as well as demystify Holoviews' somewhat well-kept secret of its plotting kwargs. For CAM-SE at 25 km resolution and MPAS at 3 km resolution, it takes approximately 2 seconds and 7 seconds, respectively, for Polymesh to connect a selected variable with its native grid dataset. Plot rendering by far takes the longest time at ~35 seconds (for MPAS).
My sample notebook can be found here and I've also included a couple of sample images below. The top two panel images are raster, while the bottom three are screenshots of vector images.
Beta Was this translation helpful? Give feedback.
All reactions