polaris.mesh.info.is_planar

polaris.mesh.info.is_planar(ds: Dataset, default: bool | None = None) bool[source]

Whether an MPAS mesh is planar, based on the on_a_sphere global attribute of ds

Parameters:
  • ds (xarray.Dataset) – A dataset with the on_a_sphere attribute, which MPAS meshes always give as 'YES' or 'NO'

  • default (bool, optional) – The value to return if ds has no on_a_sphere attribute. By default, a missing attribute is an error; see polaris.mesh.info.is_spherical().

Returns:

planar (bool) – Whether the mesh is planar

Raises:

ValueError – If ds has no on_a_sphere attribute and no default was given, or if the attribute is neither 'YES' nor 'NO'