Periodic Mesh Support#

We currently make the simplifying assumption that spherical meshes are a special instance of periodic meshes, which are periodic across the antimeridian. We support both planar periodic and map projected spherical meshes, using the same methods, by assuming that the period (in the x and y directions respectively) is constant. This assumption is valid for planar periodic meshes and for some map projections, but falls apart for certain map projection where the antimeridian does not follow a strait line. Therefore we only support a subset of cartopy projections, which are listed below. Future work will develop a more elaborate method of dealing with spherical mesh periodicity, which in turn will expand the list supported map projections.

Planar Periodic Meshes#

For patches of a planar periodic mesh that cross a periodic boundary we correct the patch coordinates to remove the periodicity and mirror the patches across the periodic boundary. The end product of both correcting and mirroring periodic patches is a fully periodic plot as demonstrated below:

Source code to generate figure below

import mosaic
import matplotlib.pyplot as plt

# download and read the mesh from lcrc
ds = mosaic.datasets.open_dataset("doubly_periodic_4x4")

# create the figure
fig, ax = plt.subplots(figsize=(4.5, 4.5), constrained_layout=True,)

descriptor = mosaic.Descriptor(ds)

pc = mosaic.polypcolor(
    ax, descriptor, ds.indexToCellID, alpha=0.6, antialiaseds=True, ec="k"
)

ax.scatter(descriptor.ds.xCell, descriptor.ds.yCell, c='k', marker='x')
ax.set_aspect('equal')
Downloading file 'mpas_standalonedata/mpas-ocean/mesh_database/doubly_periodic_1920km_7680x7680km.151124.nc' from 'https://web.lcrc.anl.gov/public/e3sm/mpas_standalonedata/mpas-ocean/mesh_database/doubly_periodic_1920km_7680x7680km.151124.nc' to '/home/runner/.cache/mosaic'.
  0%|                                              | 0.00/20.1k [00:00<?, ?B/s]
  0%|                                              | 0.00/20.1k [00:00<?, ?B/s]
100%|█████████████████████████████████████| 20.1k/20.1k [00:00<00:00, 34.5MB/s]

../_images/629ce6092ad483c37d397e2ae4932f6a24dfb85b7e8ccbd92c45fce058e2dd64.png

Periodic plotting (i.e. correcting and mirroring) of Edge and Vertex fields is also supported. All planar periodic patches will have the same “tight” axis limits, as defined by periods of the underlying mesh.

Future work will extend the patch mirroring functionality to spherical meshes.

Supported Map Projections for Spherical Meshes#

Currently, the only support map projection for spherical meshes are:

Note

This subset of supported project only applies to spherical meshes. Planar (non-periodic) meshes are not limited to this list and can choose from the full range of cartopy projections.