Closed xylar closed 11 months ago
@cbegeman and @sbrus89, I could use your eyes on this when you have a chance. I am currently testing all the affected tasks on Chrysalis and can point you to a tarball with all the images once my testing is done.
So far, the approach seems better. It's faster, though not lightning fast. It has a few quirks like when it decides have a flat vs. pointy end on the colorbar. I'm sure we can manually interfere but I didn't want to take the trouble for now.
I was able to run all with_viz
test cases on Chrysalis. The images that result are tarred up in:
/lcrc/group/e3sm/ac.xylar/polaris_0.2/chrysalis/test_20231020/spherical-convergence-uxarray-viz/images.tar.gz
I'm seeing some glitches along the antimeridian that I may need to work with the uxarray
folks on fixing:
I seem to have fixed the last 2 aesthetic issues with the colorbar:
@sbrus89, could you let me know if you are happy with the handling of edge plotting, given the limitations I listed above? Is there anything else you'd like to see here?
@sbrus89 and @cbegeman, thank so much for you reviews! I really appreciate them!
This merge introduces several new dependencies used for plotting:
The approach used here is loosely based on the tutorials from
uxarray
provided here: https://uxarray.readthedocs.io/en/latest/examples/005-to-geodataframe-for-holoviz.html and here: https://uxarray.readthedocs.io/en/latest/examples/004-working-with-mpas-grids.htmlThe MPAS mesh and an associated data array are converted to a SpatialPandas GeoDataFrame for visualization in holoviews using its
matplotlib
backend. (The alternativebokeh
backend is nice for working in Jupyter notebooks within a web browser but I did not find it useful for exporting images to files.)At least for the mesh sizes and types of visualization we are currently doing on the sphere in Polaris, this new approach is much faster than generating mapping files, remapping the data to a regular grid, and then visualizing.
The
to_geodataframe()
method fromuxarray
currently only works reliably forDataArrays
on cells, not on edges or vertices. Because of this, I have dropped plots of the normal velocity on edges from thegeostrophic
tasks. We can re-introduce this later if desired but it seems like a lot of work for some pretty noisy viz.Checklist
api.md
) has any new or modified class, method and/or functions listedTesting
comment in the PR documents testing used to verify the changes