def parse_lon_lat(grid, lon, lat):
    """ Parse lat and lon parameters """
    if lat is None:
        lat = grid.axes['lat']['data'][0]
    if lon is None:
        lon = grid.axes['lon']['data'][0]
    return lon, lat