def rename_SLM_to_climpred_dims(xro):
    """Rename ensemble dimensions common to SubX or CESM output:

        * ``S`` : Refers to start date and is changed to ``init``
        * ``L`` : Refers to lead time and is changed to ``lead``
        * ``M``: Refers to ensemble member and is changed to ``member``

    Args:
        xro (xr.object): input from CESM/SubX containing dimensions: `S`, `L`, `M`.
    Returns:
        xr.object: `climpred` compatible with dimensions: `member`, `init`, `lead`.
    """
    dim_dict = {"S": "init", "L": "lead", "M": "member"}
    for dim in dim_dict.keys():
        if dim in xro.dims:
            xro = xro.rename({dim: dim_dict[dim]})
    return xro