compass.ocean.vertical.zlevel.compute_min_max_level_cell

compass.ocean.vertical.zlevel.compute_min_max_level_cell(refTopDepth, refBottomDepth, ssh, bottomDepth)[source]

Compute minLevelCell and maxLevelCell indices as well as a cell mask for the given reference grid and top and bottom topography.

Parameters
  • refTopDepth (xarray.DataArray) – A 1D array of positive-down depths of the top of each z level

  • refBottomDepth (xarray.DataArray) – A 1D array of positive-down depths of the bottom of each z level

  • ssh (xarray.DataArray) – The sea surface height

  • bottomDepth (xarray.DataArray) – The positive-down depth of the seafloor

Returns

  • minLevelCell (xarray.DataArray) – The zero-based index of the top valid level

  • maxLevelCell (xarray.DataArray) – The zero-based index of the bottom valid level

  • cellMask (xarray.DataArray) – A boolean mask of where there are valid cells