xoa.coords.get_depth

Contents

xoa.coords.get_depth#

xoa.coords.get_depth(da, errors='raise', **kwargs)[source]#

Get or compute the depth coordinate, which is positive down

If a depth variable cannot be found, it uses the z coordinate, if any, with to_depth(), or tries to compute it either from sigma-like coordinates or from layer thicknesses. What is found is converted when its positive attribute, or its name when it has none, is not "down".

Parameters:
Returns:

xarray.DataArray or None