xoa.grid.decode_dz2z#
- xoa.grid.decode_dz2z(ds, errors='raise', **kwargs)[source]#
Compute z from layer thickness in a dataset
This makes use of the
MetaSpecs()instance that is retrieved withxoa.meta.get_meta_specs()with ds as an argument in order to find needed variables. The integration starts from the bathymetry if the first level is the bottom, else from the sea surface height, with a fallback on the other one.- Parameters:
ds (xarray.Dataset) – Dataset that contains everything
errors ({'ignore', 'warn', 'raise'}) –
In case of errors
'ignore': silently ignore'warn': emit a warning'raise': raise an exception
- Returns:
xarray.Dataset – A new dataset with a z coordinate
See also