xoa.sigma.decode_cf_sigma¶
- xoa.sigma.decode_cf_sigma(ds, rename=False, errors='raise')[source]¶
Compute heights from sigma-like variable in a dataset
Needed stuff is inferred from CF conventions. If the dataset is not found to have sigma-like coordinates, a simple copy of the dataset is returned.
When a data variable that have the same dimensions is found, the the computed coordinate is transposed properly and assigned to the variable as a a coordinate array.
- Parameters
ds (xarray.Dataset) – Dataset that contains everything needed to compute heights
rename (bool) – Rename and format arrays ot make them compliant with
xoa.cferrors ({'ignore', 'warn', 'raise'}) –
In case of errors
ignore: silently ignorewarn: emit a warningraise: raise an exception
- Returns
xarray.Dataset