def truncate_latitudes(ds, dp=10, lat_dim="lat"):
    """
    Return provided array with latitudes truncated to specified dp.

    This is necessary due to precision differences from running forecasts on
    different systems

    Parameters
    ----------
    ds : xarray Dataset
        A dataset with a latitude dimension
    dp : int, optional
        The number of decimal places to truncate at
    lat_dim : str, optional
        The name of the latitude dimension
    """
    for dim in ds.dims:
        if "lat" in dim:
            ds = ds.assign_coords({dim: ds[dim].round(decimals=dp)})
    return ds