diff --git a/docs/src/conf.py b/docs/src/conf.py index 1e99ffbc..36130827 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -204,7 +204,7 @@ "filename_pattern": "/.*", "ignore_pattern": ( "(__init__)|(clouds)|(earthquakes)|(from_1d__synthetic)|(from_2d__synthetic)" - "|(/unstructured/)" + "|(fesom)|(icon)|(lam)|(lfric_sst)|(smc)|(tri)" ), "examples_dirs": "../../src/geovista/examples", "gallery_dirs": "generated/gallery", diff --git a/src/geovista/examples/rectilinear/from_1d__synthetic_face_m1_n1_robin.py b/src/geovista/examples/rectilinear/from_1d__synthetic_face_m1_n1_robin.py index f5c7ff31..6363a461 100755 --- a/src/geovista/examples/rectilinear/from_1d__synthetic_face_m1_n1_robin.py +++ b/src/geovista/examples/rectilinear/from_1d__synthetic_face_m1_n1_robin.py @@ -32,7 +32,7 @@ def main() -> None: - """Plot the synthetic rectilinear grid. + """Plot a projected synthetic rectilinear grid. Notes ----- diff --git a/src/geovista/examples/rectilinear/from_1d__synthetic_node_m1_n1_moll.py b/src/geovista/examples/rectilinear/from_1d__synthetic_node_m1_n1_moll.py index bc9ccf7b..1331147c 100755 --- a/src/geovista/examples/rectilinear/from_1d__synthetic_node_m1_n1_moll.py +++ b/src/geovista/examples/rectilinear/from_1d__synthetic_node_m1_n1_moll.py @@ -32,7 +32,7 @@ def main() -> None: - """Plot the synthetic rectilinear grid. + """Plot a projected synthetic rectilinear grid. Notes ----- diff --git a/src/geovista/examples/rectilinear/from_2d__synthetic_face_m1n1_robin.py b/src/geovista/examples/rectilinear/from_2d__synthetic_face_m1n1_robin.py index bd18a1af..2af215ef 100755 --- a/src/geovista/examples/rectilinear/from_2d__synthetic_face_m1n1_robin.py +++ b/src/geovista/examples/rectilinear/from_2d__synthetic_face_m1n1_robin.py @@ -32,7 +32,7 @@ def main() -> None: - """Plot the synthetic rectilinear grid. + """Plot a projected synthetic rectilinear grid. Notes ----- diff --git a/src/geovista/examples/rectilinear/from_2d__synthetic_node_m1n1_moll.py b/src/geovista/examples/rectilinear/from_2d__synthetic_node_m1n1_moll.py index 8f32f5f1..c4bf4f5a 100755 --- a/src/geovista/examples/rectilinear/from_2d__synthetic_node_m1n1_moll.py +++ b/src/geovista/examples/rectilinear/from_2d__synthetic_node_m1n1_moll.py @@ -32,7 +32,7 @@ def main() -> None: - """Plot the synthetic rectilinear grid. + """Plot a projected synthetic rectilinear grid. Notes ----- diff --git a/src/geovista/examples/spatial_index/uber_h3.py b/src/geovista/examples/spatial_index/uber_h3.py index 941936b4..024c658d 100755 --- a/src/geovista/examples/spatial_index/uber_h3.py +++ b/src/geovista/examples/spatial_index/uber_h3.py @@ -382,9 +382,9 @@ def callback(actor: Actor, flag: bool) -> None: # %% # .. note:: -# The checkboxes will **not** be rendered when viewing the documentation -# on ``ReadTheDocs``, as the appropriate VTK widget is not available -# in this headless environment. +# The checkboxes will **not** be rendered when viewing the documentation on +# ``ReadtheDocs``, as the appropriate VTK widget is not supported in this +# headless environment. # %% # Finally, we create the :class:`~geovista.geoplotter.GeoPlotter` and add the diff --git a/src/geovista/examples/unstructured/dynamico.py b/src/geovista/examples/unstructured/dynamico.py index abfaf38f..c95a2468 100755 --- a/src/geovista/examples/unstructured/dynamico.py +++ b/src/geovista/examples/unstructured/dynamico.py @@ -4,13 +4,28 @@ # This file is part of GeoVista and is distributed under the 3-Clause BSD license. # See the LICENSE file in the package root directory for licensing details. -"""Importable and runnable geovista example. +""" +DYNAMICO Mesh +------------- -Notes ------ -.. versionadded:: 0.3.0 +This example demonstrates how to render an unstructured hexagon/pentagon mesh. -""" +📋 Summary +^^^^^^^^^^ + +Creates a mesh from 2-D latitude and longitude unstructured cell bounds. + +The resulting mesh contains hexagonal cells tessellated around 12 pentagon cells, +which are centered over the 12 vertices of a base icosahedron. + +It uses surface air pressure data from the DYNAMICO project, a new dynamical core +for the Laboratoire de Météorologie Dynamique (LMD-Z), the atmospheric General +Circulation Model (GCM) part of Institut Pierre-Simon Laplace (IPSL-CM) Earth +System Model. The data targets the mesh faces/cells. + +Note that, a graticule and Natural Earth coastlines are also rendered. + +""" # noqa: D205,D212,D400 from __future__ import annotations import geovista as gv @@ -19,28 +34,24 @@ def main() -> None: - """Create a mesh from 2-D latitude and longitude unstructured cell bounds. - - The resulting mesh contains both hexagonal and pentagonal cells. - - It uses surface air pressure data from the DYNAMICO project, a new dynamical core - for the Laboratoire de Météorologie Dynamique (LMD-Z), the atmospheric General - Circulation Model (GCM) part of Institut Pierre-Simon Laplace (IPSL-CM) Earth - System Model. The data targets the mesh faces/cells. + """Plot a DYNAMICO unstructured mesh. - Note that, a graticule and Natural Earth coastlines are also rendered. + Notes + ----- + .. versionadded:: 0.1.0 """ - # load the sample data + # Load the sample data. sample = dynamico() - # create the mesh from the sample data + # Create the mesh from the sample data. mesh = gv.Transform.from_unstructured(sample.lons, sample.lats, data=sample.data) - - # provide mesh diagnostics via logging + # sphinx_gallery_start_ignore + # Provide mesh diagnostics via logging. gv.logger.info("%s", mesh) + # sphinx_gallery_end_ignore - # plot the mesh + # Plot the unstructured mesh. plotter = gv.GeoPlotter() sargs = {"title": f"{sample.name} / {sample.units}", "shadow": True} plotter.add_mesh(mesh, scalar_bar_args=sargs) @@ -59,3 +70,8 @@ def main() -> None: if __name__ == "__main__": main() + +# %% +# .. note:: +# Graticule labels will **not** be rendered when viewing the documentation on +# ``ReadtheDocs``, as labels are not supported in this headless environment. diff --git a/src/geovista/examples/unstructured/dynamico_poly.py b/src/geovista/examples/unstructured/dynamico_poly.py index 8a762fcb..0830d0e2 100755 --- a/src/geovista/examples/unstructured/dynamico_poly.py +++ b/src/geovista/examples/unstructured/dynamico_poly.py @@ -4,13 +4,29 @@ # This file is part of GeoVista and is distributed under the 3-Clause BSD license. # See the LICENSE file in the package root directory for licensing details. -"""Importable and runnable geovista example. +""" +DYNAMICO Mesh (Projected) +------------------------- -Notes ------ -.. versionadded:: 0.1.0 +This example demonstrates how to render a projected unstructured hexagon/pentagon mesh. -""" +📋 Summary +^^^^^^^^^^ + +Creates a mesh from 2-D latitude and longitude unstructured cell bounds. + +The resulting mesh contains hexagonal cells tessellated around 12 pentagon cells, +which are centered over the 12 vertices of a base icosahedron. + +It uses surface air pressure data from the DYNAMICO project, a new dynamical core +for the Laboratoire de Météorologie Dynamique (LMD-Z), the atmospheric General +Circulation Model (GCM) part of Institut Pierre-Simon Laplace (IPSL-CM) Earth +System Model. The data targets the mesh faces/cells. + +Note that, a graticule and Natural Earth coastlines are rendered, and the +mesh is also transformed to the Polyconic pseudo-conical projection. + +""" # noqa: D205,D212,D400 from __future__ import annotations import geovista as gv @@ -19,29 +35,24 @@ def main() -> None: - """Create a mesh from 2-D latitude and longitude unstructured cell bounds. - - The resulting mesh contains both hexagonal and pentagonal cells. - - It uses surface air pressure data from the DYNAMICO project, a new dynamical core - for the Laboratoire de Météorologie Dynamique (LMD-Z), the atmospheric General - Circulation Model (GCM) part of Institut Pierre-Simon Laplace (IPSL-CM) Earth - System Model. The data targets the mesh faces/cells. + """Plot a projected DYNAMICO unstructured mesh. - Note that, a graticule and Natural Earth coastlines are rendered, and the - mesh is also transformed to the Polyconic pseudo-conical projection. + Notes + ----- + .. versionadded:: 0.1.0 """ - # load the sample data + # Load the sample data. sample = dynamico() - # create the mesh from the sample data + # Create the mesh from the sample data. mesh = gv.Transform.from_unstructured(sample.lons, sample.lats, data=sample.data) - - # provide mesh diagnostics via logging + # sphinx_gallery_start_ignore + # Provide mesh diagnostics via logging. gv.logger.info("%s", mesh) + # sphinx_gallery_end_ignore - # plot the mesh + # Plot the unstructured mesh. crs = "+proj=poly" plotter = gv.GeoPlotter(crs=crs) sargs = {"title": f"{sample.name} / {sample.units}", "shadow": True} @@ -61,3 +72,8 @@ def main() -> None: if __name__ == "__main__": main() + +# %% +# .. note:: +# Graticule labels will **not** be rendered when viewing the documentation on +# ``ReadtheDocs``, as labels are not supported in this headless environment.