ClimFlowsPlots

Documentation for ClimFlowsPlots.

ClimFlowsPlots.VoronoiSphere.plot_2DFunction
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.

source
ClimFlowsPlots.VoronoiSphere.plot_native_3DFunction
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).
source
ClimFlowsPlots.VoronoiSphere.plot_orthographicFunction
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.

source
ClimFlowsPlots.SphericalInterpolationsModule

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.

source
ClimFlowsPlots.SphericalInterpolations.linear_interpolatorMethod
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]
source
ClimFlowsPlots.SphericalInterpolations.lonlat_interpFunction
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.

source