ClimFlowsPlots
Documentation for ClimFlowsPlots.
ClimFlowsPlots.SphericalInterpolationsClimFlowsPlots.SphericalInterpolations.SubGraphClimFlowsPlots.SphericalInterpolations.TreeClimFlowsPlots.SphericalInterpolations.linear_interpolatorClimFlowsPlots.SphericalInterpolations.lonlat_interpClimFlowsPlots.SphericalInterpolations.meshtreeClimFlowsPlots.SphericalInterpolations.spheretreeClimFlowsPlots.SphericalInterpolations.spherical_treeClimFlowsPlots.SphericalInterpolations.subgraphsClimFlowsPlots.SphericalInterpolations.traverseClimFlowsPlots.VoronoiSphere.plot_2DClimFlowsPlots.VoronoiSphere.plot_native_3DClimFlowsPlots.VoronoiSphere.plot_orthographic
ClimFlowsPlots.VoronoiSphere.plot_2D — Function
data = Makie.Observable(data) # must be on primal mesh
fig = plot_2D(sphere, data ; resolution=1.0)
display(fig)
data[] = new_data # updates the plot
display(fig)Plots scalar data as a function of longitude and latitude. Data must be a scalar defined at primal cells of a spherical Voronoi mesh and passed as a Makie.Observable. Data is interpolated linearly to a regular lon-lat grid of resolution resolution before plotting.
ClimFlowsPlots.VoronoiSphere.plot_native_3D — Function
data = Makie.Observable(data) # must be on primal mesh
fig = plot_native_3D(sphere, data ; zoom=1.6)
display(fig)
data[] = new_data # updates the plot
display(fig)
Plots scalar data in a stereographic view. Data must be a scalar defined at primal cells of a spherical Voronoi mesh and passed as a Makie.Observable. Data on
native mesh is used without interpolation, but plotting interpolates linearly between
primal cell centers (which coincides with triangle vertices).ClimFlowsPlots.VoronoiSphere.plot_orthographic — Function
data = Makie.Observable(data) # must be on primal mesh
fig = plot_voronoi_orthographic(sphere, data ; zoom=1.6)
display(fig)
data[] = new_data # updates the plot
display(fig)Plots scalar data in a stereographic view. Data must be a scalar defined at primal cells of a spherical Voronoi mesh and passed as a Makie.Observable. Data is interpolated linearly to a regular lon-lat grid of resolution resolution before plotting.
ClimFlowsPlots.SphericalInterpolations — Module
Acceptably fast computation of interpolation weights from an unstructured spherical triangulation to arbitrary points on the unit sphere. The mesh is first recursively decomposed into submeshes using Metis, resulting in a tree. Bounding spheres are constructed starting from the leaves. The tree structure is used to search for the triangle containing a given point in logarithmic time. Interpolation itsef is linear with positive weights.
ClimFlowsPlots.SphericalInterpolations.SubGraph — Type
Subset of a parent graph. Keeps the mapping from indices in the subgraph to indices in the parent graph.
ClimFlowsPlots.SphericalInterpolations.Tree — Type
Tree with data of type Node
ClimFlowsPlots.SphericalInterpolations.linear_interpolator — Method
data_lin = linear_interpolator(data, mesh, tree=spherical_tree(mesh))
data_lonlat = data_lin(lon, lat)Return data_lin, which interpolates data linearly at point with longitude lon and latitude lat in radians :
data_lin(mesh.lon_i[ij], mesh.lat_i[ij]) == data[ij]ClimFlowsPlots.SphericalInterpolations.lonlat_interp — Function
interp = lonlat_interp(lons, lats, mesh, tree=spherical_tree(mesh))
data_lonlat = interp(data_mesh)Return function interp, which interpolates data given at mesh nodes onto the longitude-latitutde grid defined by vectors lons and lats in degrees.
ClimFlowsPlots.SphericalInterpolations.meshtree — Method
Turns a graph into a tree by recursive partitioning into parts subgraphs.
ClimFlowsPlots.SphericalInterpolations.spheretree — Function
Given bounding spheres for leaves, constructs bounding spheres at each level of the tree.
ClimFlowsPlots.SphericalInterpolations.spherical_tree — Method
tree = spherical_tree(mesh)Return a tree structure obtained by recursively partitioning mesh and computing spheres bounding each partition. Pass this tree to linear_interpolator.
ClimFlowsPlots.SphericalInterpolations.subgraphs — Method
Partitions a (sub)graph into parts subgraphs using Metis.
ClimFlowsPlots.SphericalInterpolations.traverse — Method
Applies function fun to x, v for all triangles v of tree tree whose bounding sphere contains x until fun returns anything different from nothing.