polaris.mesh.reconstruct.tangential_reconstruction
- polaris.mesh.reconstruct.tangential_reconstruction(ds: Dataset, edge_normal_field: DataArray, stencil: DataArray | None = None, weights: DataArray | None = None, location: Literal['cell', 'vertex'] | None = None) tuple[DataArray, DataArray, DataArray][source]
Reconstruct a tangential vector field from an edge-normal vector field.
- Parameters:
ds (xr.Dataset) – MPAS mesh dataset
edge_normal_field (xr.DataArray (nEdges, ...)) – Scalar field defined normal to each edge (e.g.
normalVelocity). May include additional dimensions besidesnEdges(e.g.nVertLevels,Time); these are carried through unchanged.stencil (xr.DataArray (nCells or nVertices, maxEdges2 or NINE), optional) – Precomputed edge stencil for each reconstruction point. If not provided (along with
weights), it is built fromdsusinglocation.weights (xr.DataArray (nCells or nVertices, R3, maxEdges2/NINE), optional) – Precomputed reconstruction weights for each reconstruction point. If not provided (along with
stencil), it is built fromdsusinglocation.location (str ["cell", "vertex"], optional) – Point location where the reconstruction occurs. Required if
stencilandweightsare not both provided.
- Returns:
u_x (xr.DataArray (nCells or nVertices, …)) – Reconstructed x-component of the tangential vector field
u_y (xr.DataArray (nCells or nVertices, …)) – Reconstructed y-component of the tangential vector field
u_z (xr.DataArray (nCells or nVertices, …)) – Reconstructed z-component of the tangential vector field