Analyzing Meshes

Very often there will be specific regions of a set of results that are the most of interest, and in those cases it can be helpful to pull out a particular region's data for visualization in a clearer way. The LineCrossSection and SurfaceCrossSection classes allow taking cross-sections of a mesh (or some other rasterizable object) along poly-lines drawn using the PolyDraw tool, letting you make an x / z or x / z / t plot from data laid out in x / y / z or x / y / z / t (respectively). These classes rasterize the data at a fixed resolution, and then sample the data at that resolution given the underlying polylines. The resolution may be defined in the units of the underlying coordinate system.

In [1]:
import holoviews as hv
import geoviews as gv
import cartopy.crs as ccrs
from colorcet import cm_n

from earthsim.analysis import LineCrossSection, SurfaceCrossSection
from earthsim.io import read_3dm_mesh, read_mesh2d

hv.extension('bokeh')

%output holomap='scrubber'
%opts Image RGB [width=500 height=400 colorbar=True] Curve {+framewise} [height=400 width=400] VLine (color='black')
%opts Path (line_width=3 color='black') NdOverlay [legend_limit=0] Image {+framewise} [height=400 width=500]