vis.cart_plot#

Contains functions for regional limited-area plots.

Requires the cartopy package.

Functions

lat_lon(topo[, fs, int])

Does a simple Plate-Carre projection of a lat-lon topography data.

lat_lon_delaunay(topo, tri, levels[, fs, ...])

Plots a Plate-Carrée projection of the topography with a Delunay triangulated grid.

error_delaunay(topo, tri[, fs, label_idxs, ...])

Plots the Delaunay triangulation of a lat-lon domain with the correponding errors.

lat_lon_icon(topo, triangles[, fs, ...])

Plots the topography given an ICON grid.

vis.cart_plot.lat_lon(topo, fs=(10, 6), int=1)#

Does a simple Plate-Carre projection of a lat-lon topography data.

Parameters#

topoarray-like

2D topography data

fstuple, optional

figure size, by default (10,6)

intint, optional

for high-resolution datasets, do we only plot every int pixel? By default 1, i.e., everything is plotted.

vis.cart_plot.lat_lon_delaunay(topo, tri, levels, fs=(8, 4), label_idxs=False, highlight_indices=[44, 45, 88, 89, 16, 17], fn='../output/delaunay.pdf', output_fig=False, int=1, raster=False)#

Plots a Plate-Carrée projection of the topography with a Delunay triangulated grid.

Parameters#

topoarray-like

2D topography data

triscipy.spatial.qhull.Delaunay

instance of the scipy Delaunay triangulation object containing tuples of the three vertice coordinates of a triangle

levelslist

user-defined elevation levels for the plot

fstuple, optional

figure size, by default (8,4)

vis.cart_plot.error_delaunay(topo, tri, fs=(8, 4), label_idxs=False, highlight_indices=[44, 45, 88, 89, 16, 17], fn='../output/delaunay.pdf', output_fig=False, iint=1, errors=None, alpha_max=0.5, v_extent=[-25.0, 25.0], raster=True, fontsize=12)#

Plots the Delaunay triangulation of a lat-lon domain with the correponding errors.

Parameters#

topoarray-like

2D topography data

triscipy.spatial.qhull.Delaunay object

instance of the scipy Delaunay triangulation object containing tuples of the three vertice coordinates of a triangle

fstuple, optional

figure size, by default (8,4)

label_idxsbool, optional

toggles index labels, by default False

highlight_indiceslist, optional

toggles highlighting of given indices, by default [44,45, 88,89, 16,17]

fnstr, optional

output file name, by default ‘../output/delaunay.pdf’

output_figbool, optional

toggles writing of output figure, by default False

iintint, optional

how many data points to skip in plotting the topography, by default 1, i.e., the full resolution is used.

errorslist, optional

list of errors computed within each triangle, by default None

alpha_maxfloat, optional

alpha of the error overlay, by default 0.5

v_extentlist, optional

vertical extent of the error, by default [-25.0, 25.0]

rasterbool, optional

toggles vector or raster output, by default True

fontsizeint, optional

fontsize, by default 12

vis.cart_plot.lat_lon_icon(topo, triangles, fs=(10, 6), annotate_idxs=True, title='', set_global=False, fn='../output/icon_lam.pdf', output_fig=False, **kwargs)#

Plots the topography given an ICON grid.

Parameters#

topoarray-like

2D topography data

triangleslist

list containing tuples of the three vertice coordinates of a triangle

Note#

Reference used: https://docs.dkrz.de/doc/visualization/sw/python/source_code/python-matplotlib-example-unstructured-icon-triangles-plot-python-3.html