polaris.ocean.vertical.diagnostics.surface_relative_vertical_coords
- polaris.ocean.vertical.diagnostics.surface_relative_vertical_coords(ds, ds_vert)[source]
Get layer midpoints and interfaces relative to the top of each column.
Model-written elevations are preferred, with reconstruction from thickness when necessary. The column top is the free surface or, under an ice shelf, the ice-ocean interface. Returned elevations are positive upward and dry columns are masked.
- Parameters:
ds (xarray.Dataset) – Model output with MPAS-Ocean variable names and at most one time
ds_vert (xarray.Dataset) – Vertical coordinate with
bottomDepth,maxLevelCell, and optionallyminLevelCell, using one-based level indices
- Returns:
z_mid, z_interface (xarray.DataArray) – Surface-relative midpoint and interface elevations in meters
- Raises:
ValueError – If wet-column indices or surface elevations are invalid