def _add_coordinates(domcfg):
    """
    If existing in the domcfg dataset, adds the lat/lon/depth variables as coordinates
    """
    coordinates = [
        "glamt",
        "glamu",
        "glamv",
        "glamf",
        "gphit",
        "gphiu",
        "gphiv",
        "gphif",
        "gdept_0",
        "gdepw_0",
        "gdept_1d",
        "gdepw_1d",
    ]
    for coord in coordinates:
        if coord in domcfg:
            domcfg.coords[coord] = domcfg[coord]
    return domcfg