def _find_pos(obj) -> str:
    """
    Pass in a Dataset/DataArray to find the coordinate position (rho/u/v)
    of the data to be worked with.
    If obj is a Dataset, 'rho' will be searched first, and then u/v.

    pos = _find_pos(obj)
    """

    pos = None
    if 'eta_rho' in obj.dims or 'xi_rho' in obj.dims:
        pos = '_rho'
    elif 'eta_psi' in obj.dims or 'xi_psi' in obj.dims:
        pos = '_psi'
    elif 'eta_u' in obj.dims or 'xi_u' in obj.dims:
        pos = '_u'
    elif 'eta_v' in obj.dims or 'xi_v' in obj.dims:
        pos = '_v'

    if pos is None:
        raise ValueError('Unknown coordinate position (rho/psi/u/v).')
    return pos