OceanDataset.set_grid_coords(grid_coords, add_midp=False, overwrite=None)[source]

Set grid coordinates used by xgcm.Grid.

grid_coords: str

Grid coordinates used by xgcm.Grid. Keys are axes, and values are dict with key=dim and value=c_grid_axis_shift. Available c_grid_axis_shift are {0.5, None, -0.5}. E.g., {‘Y’: {‘Y’: None, ‘Yp1’: 0.5}} See oceanspy.OCEANSPY_AXES for a list of axes

add_midp: bool

If true, add inner dimension (mid points) to axes with outer dimension only. The new dimension will be named as the outer dimension + ‘_midp’

overwrite: bool or None

If None, raises error if grid_coords has been previously set. If True, overwrite previous grid_coors. If False, combine with previous grid_coors.