xoa.grid.decode_cf_dz2depth¶
- xoa.grid.decode_cf_dz2depth(ds, errors='raise', **kwargs)[source]¶
Compute depth from layer thickness in a dataset
This makes use of the
CFSpecs()instance that is retreived withxoa.cf.get_cf_specs()with ds as an argument in order to find needed variables.- Parameters
ds (xarray.Dataset) – Dataset that contains everything
errors ({'ignore', 'warn', 'raise'}) –
In case of errors
ignore: silently ignorewarn: emit a warningraise: raise an exception
kwargs (dict) – Extra keywords are passed to
dz2depth()
- Returns
xarray.Dataset – A new dataset with a depth coordinate
See also