diff --git a/docs/src/conf.py b/docs/src/conf.py index 5d223d2e..add10f18 100644 --- a/docs/src/conf.py +++ b/docs/src/conf.py @@ -209,7 +209,7 @@ "filename_pattern": "/.*", "ignore_pattern": ( "(__init__)|(clouds)|(earthquakes)|(from_1d__synthetic)|(from_2d__synthetic)" - "|(fesom)|(lam)|(lfric_sst)|(smc)|(tri)" + "|(fesom)|(lfric_sst)|(smc)|(tri)" ), "examples_dirs": "../../src/geovista/examples", "gallery_dirs": "generated/gallery", diff --git a/src/geovista/examples/unstructured/icon_eqc.py b/src/geovista/examples/unstructured/icon_eqc.py index d9b0b715..93bbb6c9 100755 --- a/src/geovista/examples/unstructured/icon_eqc.py +++ b/src/geovista/examples/unstructured/icon_eqc.py @@ -10,6 +10,9 @@ This example demonstrates how to render a projected unstructured triangular mesh. +📋 Summary +^^^^^^^^^^ + Creates a mesh from 2-D latitude and longitude unstructured cell bounds. The resulting mesh contains triangular cells. diff --git a/src/geovista/examples/unstructured/lam_pacific.py b/src/geovista/examples/unstructured/lam_pacific.py index 4398e791..88620148 100755 --- a/src/geovista/examples/unstructured/lam_pacific.py +++ b/src/geovista/examples/unstructured/lam_pacific.py @@ -4,13 +4,27 @@ # 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. +""" +LFRic LAM Mesh +-------------- -Notes ------ -.. versionadded:: 0.1.0 +This example demonstrates how to render an unstructured quadrilateral mesh. -""" +📋 Summary +^^^^^^^^^^ + +Creates a mesh from 1-D latitude and longitude unstructured cell points. + +The resulting mesh contains quad cells and is constructed from CF UGRID unstructured +cell points and connectivity. + +It uses a high-resolution Local Area Model (LAM) mesh of air potential +temperature data located on the mesh faces/cells. + +Note that, a Natural Earth base layer is rendered along with Natural Earth +coastlines. + +""" # noqa: D205,D212,D400 from __future__ import annotations import geovista as gv @@ -19,33 +33,29 @@ def main() -> None: - """Create a mesh from 1-D latitude and longitude unstructured cell points. - - The resulting mesh contains quad cells and is constructed from CF UGRID unstructured - cell points and connectivity. + """Plot an LFRic LAM unstructured mesh. - It uses a high-resolution Local Area Model (LAM) mesh of air potential - temperature data located on the mesh faces/cells. - - Note that, a Natural Earth base layer is rendered along with Natural Earth - coastlines. + Notes + ----- + .. versionadded:: 0.1.0 """ - # load the sample data + # Load the sample data. sample = lam_pacific() - # create the mesh from the sample data + # Create the mesh from the sample data. mesh = gv.Transform.from_unstructured( sample.lons, sample.lats, connectivity=sample.connectivity, 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) diff --git a/src/geovista/examples/unstructured/lam_pacific_moll.py b/src/geovista/examples/unstructured/lam_pacific_moll.py index 314ab2a8..e22dda18 100755 --- a/src/geovista/examples/unstructured/lam_pacific_moll.py +++ b/src/geovista/examples/unstructured/lam_pacific_moll.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. +""" +LFRic LAM Mesh (Projected) +-------------------------- -Notes ------ -.. versionadded:: 0.1.0 +This example demonstrates how to render a projected unstructured quadrilateral mesh. -""" +📋 Summary +^^^^^^^^^^ + +Creates a mesh from 1-D latitude and longitude unstructured cell points. + +The resulting mesh contains quad cells and is constructed from CF UGRID unstructured +cell points and connectivity. + +It uses a high-resolution Local Area Model (LAM) mesh of air potential +temperature data located on the mesh faces/cells. + +Note that, a Natural Earth base layer is rendered along with Natural Earth +coastlines, and the mesh is transformed to the Mollweide pseudo-cylindrical +projection. + +""" # noqa: D205,D212,D400 from __future__ import annotations import geovista as gv @@ -19,34 +34,29 @@ def main() -> None: - """Create a mesh from 1-D latitude and longitude unstructured cell points. - - The resulting mesh contains quad cells and is constructed from CF UGRID unstructured - cell points and connectivity. + """Plot a projected LFRic LAM unstructured mesh. - It uses a high-resolution Local Area Model (LAM) mesh of air potential - temperature data located on the mesh faces/cells. - - Note that, a Natural Earth base layer is rendered along with Natural Earth - coastlines, and the mesh is transformed to the Mollweide pseudo-cylindrical - projection. + Notes + ----- + .. versionadded:: 0.1.0 """ - # load the sample data + # Load the sample data. sample = lam_pacific() - # create the mesh from the sample data + # Create the mesh from the sample data. mesh = gv.Transform.from_unstructured( sample.lons, sample.lats, connectivity=sample.connectivity, 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=moll" plotter = gv.GeoPlotter(crs=crs) sargs = {"title": f"{sample.name} / {sample.units}", "shadow": True}