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_sphereglobal attribute ofds- Parameters:
ds (xarray.Dataset) – A dataset with the
on_a_sphereattribute, which MPAS meshes always give as'YES'or'NO'default (bool, optional) – The value to return if
dshas noon_a_sphereattribute. By default, a missing attribute is an error; seepolaris.mesh.info.is_spherical().
- Returns:
planar (bool) – Whether the mesh is planar
- Raises:
ValueError – If
dshas noon_a_sphereattribute and nodefaultwas given, or if the attribute is neither'YES'nor'NO'