compass.landice.tests.ismip7_calibration.terms.stack_cells
- compass.landice.tests.ismip7_calibration.terms.stack_cells(da, cell_dims)[source]
Flatten the cell dimensions of
dainto a single dimension.- Parameters:
da (xarray.DataArray) – Array with one or more cell dimensions.
cell_dims (sequence of str) – The dimensions to flatten, e.g.
('y', 'x')for a structured grid or('nCells',)for an MPAS mesh.
- Returns:
xarray.DataArray –
dawithcell_dimsreplaced byCELL_DIM.