xoa.grid.decode_cf_dz2depth

xoa.grid.decode_cf_dz2depth(ds, errors='raise', **kwargs)[source]

Compute depth from layer thickness in a dataset

Needed stuff is inferred from CF conventions.

Parameters
  • ds (xarray.Dataset) – Dataset than contains everything

  • errors ({'ignore', 'warn', 'raise'}) –

    In case of errors

    • ignore: silently ignore

    • warn: emit a warning

    • raise: raise an exception

  • kwargs (dict) – Extra keywords are passed to dz2depth()

Returns

xarray.Dataset – A new dataset with a depth coordinate

See also

dz2depth