xoa.grid

This module provides 1d to nD grid utilities to get information or perform operations on a grid.

For operations between different grids, please see xoa.regrid.

Functions

apply_along_dim(ds, dim, func[, coord_func, ...])

Apply an operator on data array or dataset dimensions

decode_cf_dz2depth(ds[, errors])

Compute depth from layer thickness in a dataset

diff(da, dim)

Compute the difference between consecutive grid points

dz2depth(dz[, positive, zdim, ref, ...])

Integrate layer thicknesses to compute depths

get_centers(da, dim)

Interpolate the data array at mid grid points along the dim dimension(s)

get_edges(da, dim[, mode])

Interpolate and extrapolate a data array at grid edges along the dim dimension(s)

pad(da, pad_width[, mode, coord_mode, ...])

Pad data and coordinates along dimensions

shift(da, shift_dirs[, mode])

Shift the grid by an half grid cell along specified dimensions and directions

to_rect(da[, tol, errors])

Convert the curvilinear coordinates of array/dataset to rectangular axis coordinates

Classes

dz2depth_ref_types([value])

Integration ref types for dz2depth()

shift_directions(value[, names, module, ...])

Shift directions for shift()