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 itspositiveattribute, or its name when it has none, is not"down".- Parameters:
errors ({'ignore', 'warn', 'raise'}) –
In case of errors
'ignore': silently ignore'warn': emit a warning'raise': raise an exception
kwargs – Extra parameters are passed to
xoa.meta.MetaSpecs.search()
- Returns:
xarray.DataArray or None