polaris.mesh.vector.get_coordinate_matrix

polaris.mesh.vector.get_coordinate_matrix(ds: Dataset, location: Literal['cell', 'edge', 'vertex'] = 'cell') → DataArray[source]

Get the Cartesian coordinates of the mesh elements at a given location as a single array

Parameters:
  • ds (xr.Dataset) – MPAS mesh Dataset

  • location ({'cell', 'edge', 'vertex'}, optional) – The mesh location to get the coordinates of

Returns:

xr.DataArray (nCells or nEdges or nVertices, R3) – The Cartesian coordinates of each element at location